@ministryofjustice/frontend 1.6.5 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,8 @@
3
3
  "/moj/filters/prototype-kit-13-filters.js"
4
4
  ],
5
5
  "scripts": [
6
- "/moj/all.js"
6
+ "/moj/all.jquery.min.js",
7
+ "/moj/init.js"
7
8
  ],
8
9
  "assets": [
9
10
  "/moj/assets"
@@ -0,0 +1 @@
1
+ !function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.MOJFrontend=t()}(this,function(){!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(T,F){"use strict";var t=[],H=Object.getPrototypeOf,s=t.slice,R=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},I=t.push,O=t.indexOf,P={},W=P.toString,$=P.hasOwnProperty,z=$.toString,U=z.call(Object),m={},v=function v(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},g=function g(e){return null!=e&&e===e.window},k=T.document,V={type:!0,src:!0,nonce:!0,noModule:!0};function X(e,t,n){var o,r,i=(n=n||k).createElement("script");if(i.text=e,t)for(o in V)(r=t[o]||t.getAttribute&&t.getAttribute(o))&&i.setAttribute(o,r);n.head.appendChild(i).parentNode.removeChild(i)}function h(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?P[W.call(e)]||"object":typeof e}var e="3.6.0",C=function(e,t){return new C.fn.init(e,t)};function G(e){var t=!!e&&"length"in e&&e.length,n=h(e);return!v(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}C.fn=C.prototype={jquery:e,constructor:C,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){e=C.merge(this.constructor(),e);return e.prevObject=this,e},each:function(e){return C.each(this,e)},map:function(n){return this.pushStack(C.map(this,function(e,t){return n.call(e,t,e)}))},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(C.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(C.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,e=+e+(e<0?t:0);return this.pushStack(0<=e&&e<t?[this[e]]:[])},end:function(){return this.prevObject||this.constructor()},push:I,sort:t.sort,splice:t.splice},C.extend=C.fn.extend=function(){var e,t,n,o,r,i=arguments[0]||{},a=1,s=arguments.length,u=!1;for("boolean"==typeof i&&(u=i,i=arguments[a]||{},a++),"object"==typeof i||v(i)||(i={}),a===s&&(i=this,a--);a<s;a++)if(null!=(e=arguments[a]))for(t in e)n=e[t],"__proto__"!==t&&i!==n&&(u&&n&&(C.isPlainObject(n)||(o=Array.isArray(n)))?(r=i[t],r=o&&!Array.isArray(r)?[]:o||C.isPlainObject(r)?r:{},o=!1,i[t]=C.extend(u,r,n)):n!==undefined&&(i[t]=n));return i},C.extend({expando:"jQuery"+(e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){return!(!e||"[object Object]"!==W.call(e))&&(!(e=H(e))||"function"==typeof(e=$.call(e,"constructor")&&e.constructor)&&z.call(e)===U)},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,n){X(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,o=0;if(G(e))for(n=e.length;o<n&&!1!==t.call(e[o],o,e[o]);o++);else for(o in e)if(!1===t.call(e[o],o,e[o]))break;return e},makeArray:function(e,t){t=t||[];return null!=e&&(G(Object(e))?C.merge(t,"string"==typeof e?[e]:e):I.call(t,e)),t},inArray:function(e,t,n){return null==t?-1:O.call(t,e,n)},merge:function(e,t){for(var n=+t.length,o=0,r=e.length;o<n;o++)e[r++]=t[o];return e.length=r,e},grep:function(e,t,n){for(var o=[],r=0,i=e.length,a=!n;r<i;r++)!t(e[r],r)!=a&&o.push(e[r]);return o},map:function(e,t,n){var o,r,i=0,a=[];if(G(e))for(o=e.length;i<o;i++)null!=(r=t(e[i],i,n))&&a.push(r);else for(i in e)null!=(r=t(e[i],i,n))&&a.push(r);return R(a)},guid:1,support:m}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=t[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){P["[object "+t+"]"]=t.toLowerCase()});var e=function(F){var e,f,x,i,H,h,R,I,w,u,l,T,k,n,C,m,o,r,g,j="sizzle"+ +new Date,c=F.document,S=0,O=0,P=D(),W=D(),$=D(),y=D(),z=function(e,t){return e===t&&(l=!0),0},U={}.hasOwnProperty,t=[],V=t.pop,X=t.push,A=t.push,G=t.slice,E=function(e,t){for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",a="[\\x20\\t\\r\\n\\f]",s="(?:\\\\[\\da-fA-F]{1,6}"+a+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Q="\\["+a+"*("+s+")(?:"+a+"*([*^$|!~]?=)"+a+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+s+"))|)"+a+"*\\]",Y=":("+s+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+Q+")*)|.*)\\)|)",J=new RegExp(a+"+","g"),B=new RegExp("^"+a+"+|((?:^|[^\\\\])(?:\\\\.)*)"+a+"+$","g"),Z=new RegExp("^"+a+"*,"+a+"*"),ee=new RegExp("^"+a+"*([>+~]|"+a+")"+a+"*"),te=new RegExp(a+"|>"),ne=new RegExp(Y),oe=new RegExp("^"+s+"$"),d={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),TAG:new RegExp("^("+s+"|[*])"),ATTR:new RegExp("^"+Q),PSEUDO:new RegExp("^"+Y),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+a+"*(even|odd|(([+-]|)(\\d*)n|)"+a+"*(?:([+-]|)"+a+"*(\\d+)|))"+a+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+a+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+a+"*((?:-\\d)?\\d*)"+a+"*\\)|)(?=[^-]|$)","i")},re=/HTML$/i,ie=/^(?:input|select|textarea|button)$/i,ae=/^h\d$/i,p=/^[^{]+\{\s*\[native \w/,se=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ue=/[+~]/,v=new RegExp("\\\\[\\da-fA-F]{1,6}"+a+"?|\\\\([^\\r\\n\\f])","g"),b=function(e,t){e="0x"+e.slice(1)-65536;return t||(e<0?String.fromCharCode(65536+e):String.fromCharCode(e>>10|55296,1023&e|56320))},le=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ce=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},de=function(){T()},pe=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{A.apply(t=G.call(c.childNodes),c.childNodes),t[c.childNodes.length].nodeType}catch(q){A={apply:t.length?function(e,t){X.apply(e,G.call(t))}:function(e,t){for(var n=e.length,o=0;e[n++]=t[o++];);e.length=n-1}}}function _(e,t,n,o){var r,i,a,s,u,l,c=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!o&&(T(t),t=t||k,C)){if(11!==d&&(s=se.exec(e)))if(r=s[1]){if(9===d){if(!(l=t.getElementById(r)))return n;if(l.id===r)return n.push(l),n}else if(c&&(l=c.getElementById(r))&&g(t,l)&&l.id===r)return n.push(l),n}else{if(s[2])return A.apply(n,t.getElementsByTagName(e)),n;if((r=s[3])&&f.getElementsByClassName&&t.getElementsByClassName)return A.apply(n,t.getElementsByClassName(r)),n}if(f.qsa&&!y[e+" "]&&(!m||!m.test(e))&&(1!==d||"object"!==t.nodeName.toLowerCase())){if(l=e,c=t,1===d&&(te.test(e)||ee.test(e))){for((c=ue.test(e)&&ge(t.parentNode)||t)===t&&f.scope||((a=t.getAttribute("id"))?a=a.replace(le,ce):t.setAttribute("id",a=j)),i=(u=h(e)).length;i--;)u[i]=(a?"#"+a:":scope")+" "+ve(u[i]);l=u.join(",")}try{return A.apply(n,c.querySelectorAll(l)),n}catch(p){y(e,!0)}finally{a===j&&t.removeAttribute("id")}}}return I(e.replace(B,"$1"),t,n,o)}function D(){var n=[];function o(e,t){return n.push(e+" ")>x.cacheLength&&delete o[n.shift()],o[e+" "]=t}return o}function N(e){return e[j]=!0,e}function M(e){var t=k.createElement("fieldset");try{return!!e(t)}catch(q){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function fe(e,t){for(var n=e.split("|"),o=n.length;o--;)x.attrHandle[n[o]]=t}function he(e,t){var n=t&&e,o=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(o)return o;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function me(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&pe(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function L(a){return N(function(i){return i=+i,N(function(e,t){for(var n,o=a([],e.length,i),r=o.length;r--;)e[n=o[r]]&&(e[n]=!(t[n]=e[n]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in f=_.support={},H=_.isXML=function(e){var t=e&&e.namespaceURI,e=e&&(e.ownerDocument||e).documentElement;return!re.test(t||e&&e.nodeName||"HTML")},T=_.setDocument=function(e){var e=e?e.ownerDocument||e:c;return e!=k&&9===e.nodeType&&e.documentElement&&(n=(k=e).documentElement,C=!H(k),c!=k&&(e=k.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",de,!1):e.attachEvent&&e.attachEvent("onunload",de)),f.scope=M(function(e){return n.appendChild(e).appendChild(k.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),f.attributes=M(function(e){return e.className="i",!e.getAttribute("className")}),f.getElementsByTagName=M(function(e){return e.appendChild(k.createComment("")),!e.getElementsByTagName("*").length}),f.getElementsByClassName=p.test(k.getElementsByClassName),f.getById=M(function(e){return n.appendChild(e).id=j,!k.getElementsByName||!k.getElementsByName(j).length}),f.getById?(x.filter.ID=function(e){var t=e.replace(v,b);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C)return(e=t.getElementById(e))?[e]:[]}):(x.filter.ID=function(e){var t=e.replace(v,b);return function(e){e="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,o,r,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(r=t.getElementsByName(e),o=0;i=r[o++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),x.find.TAG=f.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):f.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,o=[],r=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[r++];)1===n.nodeType&&o.push(n);return o},x.find.CLASS=f.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},o=[],m=[],(f.qsa=p.test(k.querySelectorAll))&&(M(function(e){var t;n.appendChild(e).innerHTML="<a id='"+j+"'></a><select id='"+j+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+a+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+a+"*(?:value|"+K+")"),e.querySelectorAll("[id~="+j+"-]").length||m.push("~="),(t=k.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+a+"*name"+a+"*="+a+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+j+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")}),M(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=k.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+a+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),n.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(f.matchesSelector=p.test(r=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.oMatchesSelector||n.msMatchesSelector))&&M(function(e){f.disconnectedMatch=r.call(e,"*"),r.call(e,"[s!='']:x"),o.push("!=",Y)}),m=m.length&&new RegExp(m.join("|")),o=o.length&&new RegExp(o.join("|")),e=p.test(n.compareDocumentPosition),g=e||p.test(n.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=e?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!f.sortDetached&&t.compareDocumentPosition(e)===n?e==k||e.ownerDocument==c&&g(c,e)?-1:t==k||t.ownerDocument==c&&g(c,t)?1:u?E(u,e)-E(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,o=0,r=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!r||!i)return e==k?-1:t==k?1:r?-1:i?1:u?E(u,e)-E(u,t):0;if(r===i)return he(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[o]===s[o];)o++;return o?he(a[o],s[o]):a[o]==c?-1:s[o]==c?1:0}),k},_.matches=function(e,t){return _(e,null,null,t)},_.matchesSelector=function(e,t){if(T(e),f.matchesSelector&&C&&!y[t+" "]&&(!o||!o.test(t))&&(!m||!m.test(t)))try{var n=r.call(e,t);if(n||f.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(q){y(t,!0)}return 0<_(t,k,null,[e]).length},_.contains=function(e,t){return(e.ownerDocument||e)!=k&&T(e),g(e,t)},_.attr=function(e,t){(e.ownerDocument||e)!=k&&T(e);var n=x.attrHandle[t.toLowerCase()],n=n&&U.call(x.attrHandle,t.toLowerCase())?n(e,t,!C):undefined;return n!==undefined?n:f.attributes||!C?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},_.escape=function(e){return(e+"").replace(le,ce)},_.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},_.uniqueSort=function(e){var t,n=[],o=0,r=0;if(l=!f.detectDuplicates,u=!f.sortStable&&e.slice(0),e.sort(z),l){for(;t=e[r++];)t===e[r]&&(o=n.push(r));for(;o--;)e.splice(n[o],1)}return u=null,e},i=_.getText=function(e){var t,n="",o=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[o++];)n+=i(t);return n},(x=_.selectors={cacheLength:50,createPseudo:N,match:d,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(v,b),e[3]=(e[3]||e[4]||e[5]||"").replace(v,b),"~="===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]||_.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&_.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return d.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ne.test(n)&&(t=h(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(v,b).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=P[e+" "];return t||(t=new RegExp("(^|"+a+")"+e+"("+a+"|$)"))&&P(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,o){return function(e){e=_.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===o:"!="===n?e!==o:"^="===n?o&&0===e.indexOf(o):"*="===n?o&&-1<e.indexOf(o):"$="===n?o&&e.slice(-o.length)===o:"~="===n?-1<(" "+e.replace(J," ")+" ").indexOf(o):"|="===n&&(e===o||e.slice(0,o.length+1)===o+"-"))}},CHILD:function(h,e,t,m,g){var y="nth"!==h.slice(0,3),v="last"!==h.slice(-4),b="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var o,r,i,a,s,u,l=y!=v?"nextSibling":"previousSibling",c=e.parentNode,d=b&&e.nodeName.toLowerCase(),p=!n&&!b,f=!1;if(c){if(y){for(;l;){for(a=e;a=a[l];)if(b?a.nodeName.toLowerCase()===d:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[v?c.firstChild:c.lastChild],v&&p){for(f=(s=(o=(r=(i=(a=c)[j]||(a[j]={}))[a.uniqueID]||(i[a.uniqueID]={}))[h]||[])[0]===S&&o[1])&&o[2],a=s&&c.childNodes[s];a=++s&&a&&a[l]||(f=s=0)||u.pop();)if(1===a.nodeType&&++f&&a===e){r[h]=[S,s,f];break}}else if(!1===(f=p?s=(o=(r=(i=(a=e)[j]||(a[j]={}))[a.uniqueID]||(i[a.uniqueID]={}))[h]||[])[0]===S&&o[1]:f))for(;(a=++s&&a&&a[l]||(f=s=0)||u.pop())&&((b?a.nodeName.toLowerCase()!==d:1!==a.nodeType)||!++f||(p&&((r=(i=a[j]||(a[j]={}))[a.uniqueID]||(i[a.uniqueID]={}))[h]=[S,f]),a!==e)););return(f-=g)===m||f%m==0&&0<=f/m}}},PSEUDO:function(e,i){var t,a=x.pseudos[e]||x.setFilters[e.toLowerCase()]||_.error("unsupported pseudo: "+e);return a[j]?a(i):1<a.length?(t=[e,e,"",i],x.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,t){for(var n,o=a(e,i),r=o.length;r--;)e[n=E(e,o[r])]=!(t[n]=o[r])}):function(e){return a(e,0,t)}):a}},pseudos:{not:N(function(e){var o=[],r=[],s=R(e.replace(B,"$1"));return s[j]?N(function(e,t,n,o){for(var r,i=s(e,null,o,[]),a=e.length;a--;)(r=i[a])&&(e[a]=!(t[a]=r))}):function(e,t,n){return o[0]=e,s(o,null,n,r),o[0]=null,!r.pop()}}),has:N(function(t){return function(e){return 0<_(t,e).length}}),contains:N(function(t){return t=t.replace(v,b),function(e){return-1<(e.textContent||i(e)).indexOf(t)}}),lang:N(function(n){return oe.test(n||"")||_.error("unsupported lang: "+n),n=n.replace(v,b).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=F.location&&F.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===n},focus:function(e){return e===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return ae.test(e.nodeName)},input:function(e){return ie.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(e=e.getAttribute("type"))||"text"===e.toLowerCase())},first:L(function(){return[0]}),last:L(function(e,t){return[t-1]}),eq:L(function(e,t,n){return[n<0?n+t:n]}),even:L(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:L(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:L(function(e,t,n){for(var o=n<0?n+t:t<n?t:n;0<=--o;)e.push(o);return e}),gt:L(function(e,t,n){for(var o=n<0?n+t:n;++o<t;)e.push(o);return e})}}).pseudos.nth=x.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[e]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(e);for(e in{submit:!0,reset:!0})x.pseudos[e]=function(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}(e);function ye(){}function ve(e){for(var t=0,n=e.length,o="";t<n;t++)o+=e[t].value;return o}function be(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,d=O++;return e.first?function(e,t,n){for(;e=e[s];)if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var o,r,i=[S,d];if(n){for(;e=e[s];)if((1===e.nodeType||c)&&a(e,t,n))return!0}else for(;e=e[s];)if(1===e.nodeType||c)if(r=(r=e[j]||(e[j]={}))[e.uniqueID]||(r[e.uniqueID]={}),u&&u===e.nodeName.toLowerCase())e=e[s]||e;else{if((o=r[l])&&o[0]===S&&o[1]===d)return i[2]=o[2];if((r[l]=i)[2]=a(e,t,n))return!0}return!1}}function xe(r){return 1<r.length?function(e,t,n){for(var o=r.length;o--;)if(!r[o](e,t,n))return!1;return!0}:r[0]}function we(e,t,n,o,r){for(var i,a=[],s=0,u=e.length,l=null!=t;s<u;s++)!(i=e[s])||n&&!n(i,o,r)||(a.push(i),l&&t.push(s));return a}function Te(f,h,m,g,y,e){return g&&!g[j]&&(g=Te(g)),y&&!y[j]&&(y=Te(y,e)),N(function(e,t,n,o){var r,i,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var o=0,r=t.length;o<r;o++)_(e,t[o],n);return n}(h||"*",n.nodeType?[n]:n,[]),d=!f||!e&&h?c:we(c,s,f,n,o),p=m?y||(e?f:l||g)?[]:t:d;if(m&&m(d,p,n,o),g)for(r=we(p,u),g(r,[],n,o),i=r.length;i--;)(a=r[i])&&(p[u[i]]=!(d[u[i]]=a));if(e){if(y||f){if(y){for(r=[],i=p.length;i--;)(a=p[i])&&r.push(d[i]=a);y(null,p=[],r,o)}for(i=p.length;i--;)(a=p[i])&&-1<(r=y?E(e,a):s[i])&&(e[r]=!(t[r]=a))}}else p=we(p===t?p.splice(l,p.length):p),y?y(null,t,p,o):A.apply(t,p)})}return ye.prototype=x.filters=x.pseudos,x.setFilters=new ye,h=_.tokenize=function(e,t){var n,o,r,i,a,s,u,l=W[e+" "];if(l)return t?0:l.slice(0);for(a=e,s=[],u=x.preFilter;a;){for(i in n&&!(o=Z.exec(a))||(o&&(a=a.slice(o[0].length)||a),s.push(r=[])),n=!1,(o=ee.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(B," ")}),a=a.slice(n.length)),x.filter)!(o=d[i].exec(a))||u[i]&&!(o=u[i](o))||(n=o.shift(),r.push({value:n,type:i,matches:o}),a=a.slice(n.length));if(!n)break}return t?a.length:a?_.error(e):W(e,s).slice(0)},R=_.compile=function(e,t){var n,g,y,v,b,o,r=[],i=[],a=$[e+" "];if(!a){for(n=(t=t||h(e)).length;n--;)((a=function d(e){for(var o,t,n,r=e.length,i=x.relative[e[0].type],a=i||x.relative[" "],s=i?1:0,u=be(function(e){return e===o},a,!0),l=be(function(e){return-1<E(o,e)},a,!0),c=[function(e,t,n){return e=!i&&(n||t!==w)||((o=t).nodeType?u:l)(e,t,n),o=null,e}];s<r;s++)if(t=x.relative[e[s].type])c=[be(xe(c),t)];else{if((t=x.filter[e[s].type].apply(null,e[s].matches))[j]){for(n=++s;n<r&&!x.relative[e[n].type];n++);return Te(1<s&&xe(c),1<s&&ve(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&d(e.slice(s,n)),n<r&&d(e=e.slice(n)),n<r&&ve(e))}c.push(t)}return xe(c)}(t[n]))[j]?r:i).push(a);(a=$(e,(g=i,v=0<(y=r).length,b=0<g.length,o=function(e,t,n,o,r){var i,a,s,u=0,l="0",c=e&&[],d=[],p=w,f=e||b&&x.find.TAG("*",r),h=S+=null==p?1:Math.random()||.1,m=f.length;for(r&&(w=t==k||t||r);l!==m&&null!=(i=f[l]);l++){if(b&&i){for(a=0,t||i.ownerDocument==k||(T(i),n=!C);s=g[a++];)if(s(i,t||k,n)){o.push(i);break}r&&(S=h)}v&&((i=!s&&i)&&u--,e&&c.push(i))}if(u+=l,v&&l!==u){for(a=0;s=y[a++];)s(c,d,t,n);if(e){if(0<u)for(;l--;)c[l]||d[l]||(d[l]=V.call(o));d=we(d)}A.apply(o,d),r&&!e&&0<d.length&&1<u+y.length&&_.uniqueSort(o)}return r&&(S=h,w=p),c},v?N(o):o))).selector=e}return a},I=_.select=function(e,t,n,o){var r,i,a,s,u,l="function"==typeof e&&e,c=!o&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(i=c[0]=c[0].slice(0)).length&&"ID"===(a=i[0]).type&&9===t.nodeType&&C&&x.relative[i[1].type]){if(!(t=(x.find.ID(a.matches[0].replace(v,b),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(r=d.needsContext.test(e)?0:i.length;r--&&(a=i[r],!x.relative[s=a.type]);)if((u=x.find[s])&&(o=u(a.matches[0].replace(v,b),ue.test(i[0].type)&&ge(t.parentNode)||t))){if(i.splice(r,1),e=o.length&&ve(i))break;return A.apply(n,o),n}}return(l||R(e,c))(o,t,!C,n,!t||ue.test(e)&&ge(t.parentNode)||t),n},f.sortStable=j.split("").sort(z).join("")===j,f.detectDuplicates=!!l,T(),f.sortDetached=M(function(e){return 1&e.compareDocumentPosition(k.createElement("fieldset"))}),M(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),f.attributes&&M(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),M(function(e){return null==e.getAttribute("disabled")})||fe(K,function(e,t,n){if(!n)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),_}(T),o=(C.find=e,C.expr=e.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=e.uniqueSort,C.text=e.getText,C.isXMLDoc=e.isXML,C.contains=e.contains,C.escapeSelector=e.escape,function(e,t,n){for(var o=[],r=n!==undefined;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&C(e).is(n))break;o.push(e)}return o}),K=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Q=C.expr.match.needsContext;function u(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var Y=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function J(e,n,o){return v(n)?C.grep(e,function(e,t){return!!n.call(e,t,e)!==o}):n.nodeType?C.grep(e,function(e){return e===n!==o}):"string"!=typeof n?C.grep(e,function(e){return-1<O.call(n,e)!==o}):C.filter(n,e,o)}C.filter=function(e,t,n){var o=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===o.nodeType?C.find.matchesSelector(o,e)?[o]:[]:C.find.matches(e,C.grep(t,function(e){return 1===e.nodeType}))},C.fn.extend({find:function(e){var t,n,o=this.length,r=this;if("string"!=typeof e)return this.pushStack(C(e).filter(function(){for(t=0;t<o;t++)if(C.contains(r[t],this))return!0}));for(n=this.pushStack([]),t=0;t<o;t++)C.find(e,r[t],n);return 1<o?C.uniqueSort(n):n},filter:function(e){return this.pushStack(J(this,e||[],!1))},not:function(e){return this.pushStack(J(this,e||[],!0))},is:function(e){return!!J(this,"string"==typeof e&&Q.test(e)?C(e):e||[],!1).length}});var Z,ee=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,te=((C.fn.init=function(e,t,n){if(!e)return this;if(n=n||Z,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):v(e)?n.ready!==undefined?n.ready(e):e(C):C.makeArray(e,this);if(!(o="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:ee.exec(e))||!o[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(o[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(o[1],t&&t.nodeType?t.ownerDocument||t:k,!0)),Y.test(o[1])&&C.isPlainObject(t))for(var o in t)v(this[o])?this[o](t[o]):this.attr(o,t[o]);return this}return(n=k.getElementById(o[2]))&&(this[0]=n,this.length=1),this}).prototype=C.fn,Z=C(k),/^(?:parents|prev(?:Until|All))/),ne={children:!0,contents:!0,next:!0,prev:!0};function oe(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t=C(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(C.contains(this,t[e]))return!0})},closest:function(e,t){var n,o=0,r=this.length,i=[],a="string"!=typeof e&&C(e);if(!Q.test(e))for(;o<r;o++)for(n=this[o];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&C.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(1<i.length?C.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?O.call(C(e),this[0]):O.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),C.each({parent:function(e){e=e.parentNode;return e&&11!==e.nodeType?e:null},parents:function(e){return o(e,"parentNode")},parentsUntil:function(e,t,n){return o(e,"parentNode",n)},next:function(e){return oe(e,"nextSibling")},prev:function(e){return oe(e,"previousSibling")},nextAll:function(e){return o(e,"nextSibling")},prevAll:function(e){return o(e,"previousSibling")},nextUntil:function(e,t,n){return o(e,"nextSibling",n)},prevUntil:function(e,t,n){return o(e,"previousSibling",n)},siblings:function(e){return K((e.parentNode||{}).firstChild,e)},children:function(e){return K(e.firstChild)},contents:function(e){return null!=e.contentDocument&&H(e.contentDocument)?e.contentDocument:(u(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},function(o,r){C.fn[o]=function(e,t){var n=C.map(this,r,e);return(t="Until"!==o.slice(-5)?e:t)&&"string"==typeof t&&(n=C.filter(t,n)),1<this.length&&(ne[o]||C.uniqueSort(n),te.test(o)&&n.reverse()),this.pushStack(n)}});var j=/[^\x20\t\r\n\f]+/g;function d(e){return e}function re(e){throw e}function ie(e,t,n,o){var r;try{e&&v(r=e.promise)?r.call(e).done(t).fail(n):e&&v(r=e.then)?r.call(e,t,n):t.apply(undefined,[e].slice(o))}catch(e){n.apply(undefined,[e])}}C.Callbacks=function(o){var e,n;o="string"==typeof o?(e=o,n={},C.each(e.match(j)||[],function(e,t){n[t]=!0}),n):C.extend({},o);var r,t,i,a,s=[],u=[],l=-1,c=function(){for(a=a||o.once,i=r=!0;u.length;l=-1)for(t=u.shift();++l<s.length;)!1===s[l].apply(t[0],t[1])&&o.stopOnFalse&&(l=s.length,t=!1);o.memory||(t=!1),r=!1,a&&(s=t?[]:"")},d={add:function(){return s&&(t&&!r&&(l=s.length-1,u.push(t)),function n(e){C.each(e,function(e,t){v(t)?o.unique&&d.has(t)||s.push(t):t&&t.length&&"string"!==h(t)&&n(t)})}(arguments),t&&!r&&c()),this},remove:function(){return C.each(arguments,function(e,t){for(var n;-1<(n=C.inArray(t,s,n));)s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<C.inArray(e,s):0<s.length},empty:function(){return s=s&&[],this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||r||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),r||c()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},C.extend({Deferred:function(e){var i=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],r="pending",a={state:function(){return r},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var r=arguments;return C.Deferred(function(o){C.each(i,function(e,t){var n=v(r[t[4]])&&r[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(o.notify).done(o.resolve).fail(o.reject):o[t[0]+"With"](this,n?[e]:arguments)})}),r=null}).promise()},then:function(t,n,o){var l=0;function c(i,a,s,u){return function(){var n=this,o=arguments,t=function(){var e,t;if(!(i<l)){if((e=s.apply(n,o))===a.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?u?t.call(e,c(l,a,d,u),c(l,a,re,u)):(l++,t.call(e,c(l,a,d,u),c(l,a,re,u),c(l,a,d,a.notifyWith))):(s!==d&&(n=undefined,o=[e]),(u||a.resolveWith)(n,o))}},r=u?t:function(){try{t()}catch(e){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(e,r.stackTrace),l<=i+1&&(s!==re&&(n=undefined,o=[e]),a.rejectWith(n,o))}};i?r():(C.Deferred.getStackHook&&(r.stackTrace=C.Deferred.getStackHook()),T.setTimeout(r))}}return C.Deferred(function(e){i[0][3].add(c(0,e,v(o)?o:d,e.notifyWith)),i[1][3].add(c(0,e,v(t)?t:d)),i[2][3].add(c(0,e,v(n)?n:re))}).promise()},promise:function(e){return null!=e?C.extend(e,a):a}},s={};return C.each(i,function(e,t){var n=t[2],o=t[5];a[t[1]]=n.add,o&&n.add(function(){r=o},i[3-e][2].disable,i[3-e][3].disable,i[0][2].lock,i[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?undefined:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,o=Array(t),r=s.call(arguments),i=C.Deferred(),a=function(t){return function(e){o[t]=this,r[t]=1<arguments.length?s.call(arguments):e,--n||i.resolveWith(o,r)}};if(n<=1&&(ie(e,i.done(a(t)).resolve,i.reject,!n),"pending"===i.state()||v(r[t]&&r[t].then)))return i.then();for(;t--;)ie(r[t],a(t),i.reject);return i.promise()}});var ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,se=(C.Deferred.exceptionHook=function(e,t){T.console&&T.console.warn&&e&&ae.test(e.name)&&T.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){T.setTimeout(function(){throw e})},C.Deferred());function ue(){k.removeEventListener("DOMContentLoaded",ue),T.removeEventListener("load",ue),C.ready()}C.fn.ready=function(e){return se.then(e)["catch"](function(e){C.readyException(e)}),this},C.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--C.readyWait:C.isReady)||(C.isReady=!0)!==e&&0<--C.readyWait||se.resolveWith(k,[C])}}),C.ready.then=se.then,"complete"===k.readyState||"loading"!==k.readyState&&!k.documentElement.doScroll?T.setTimeout(C.ready):(k.addEventListener("DOMContentLoaded",ue),T.addEventListener("load",ue));var c=function(e,t,n,o,r,i,a){var s=0,u=e.length,l=null==n;if("object"===h(n))for(s in r=!0,n)c(e,t,s,n[s],!0,i,a);else if(o!==undefined&&(r=!0,v(o)||(a=!0),t=l?a?(t.call(e,o),null):(l=t,function(e,t,n){return l.call(C(e),n)}):t))for(;s<u;s++)t(e[s],n,a?o:o.call(e[s],s,t(e[s],n)));return r?e:l?t.call(e):u?t(e[0],n):i},le=/^-ms-/,ce=/-([a-z])/g;function de(e,t){return t.toUpperCase()}function b(e){return e.replace(le,"ms-").replace(ce,de)}var y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function pe(){this.expando=C.expando+pe.uid++}pe.uid=1,pe.prototype={cache:function(e){var t=e[this.expando];return t||(t={},y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var o,r=this.cache(e);if("string"==typeof t)r[b(t)]=n;else for(o in t)r[b(o)]=t[o];return r},get:function(e,t){return t===undefined?this.cache(e):e[this.expando]&&e[this.expando][b(t)]},access:function(e,t,n){return t===undefined||t&&"string"==typeof t&&n===undefined?this.get(e,t):(this.set(e,t,n),n!==undefined?n:t)},remove:function(e,t){var n,o=e[this.expando];if(o!==undefined){if(t!==undefined){n=(t=Array.isArray(t)?t.map(b):(t=b(t))in o?[t]:t.match(j)||[]).length;for(;n--;)delete o[t[n]]}t!==undefined&&!C.isEmptyObject(o)||(e.nodeType?e[this.expando]=undefined:delete e[this.expando])}},hasData:function(e){e=e[this.expando];return e!==undefined&&!C.isEmptyObject(e)}};var x=new pe,l=new pe,fe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,he=/[A-Z]/g;function me(e,t,n){var o,r;if(n===undefined&&1===e.nodeType)if(o="data-"+t.replace(he,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(o))){try{n="true"===(r=n)||"false"!==r&&("null"===r?null:r===+r+""?+r:fe.test(r)?JSON.parse(r):r)}catch(i){}l.set(e,t,n)}else n=undefined;return n}C.extend({hasData:function(e){return l.hasData(e)||x.hasData(e)},data:function(e,t,n){return l.access(e,t,n)},removeData:function(e,t){l.remove(e,t)},_data:function(e,t,n){return x.access(e,t,n)},_removeData:function(e,t){x.remove(e,t)}}),C.fn.extend({data:function(n,e){var t,o,r,i=this[0],a=i&&i.attributes;if(n!==undefined)return"object"==typeof n?this.each(function(){l.set(this,n)}):c(this,function(e){var t;if(i&&e===undefined)return(t=l.get(i,n))!==undefined||(t=me(i,n))!==undefined?t:void 0;this.each(function(){l.set(this,n,e)})},null,e,1<arguments.length,null,!0);if(this.length&&(r=l.get(i),1===i.nodeType&&!x.get(i,"hasDataAttrs"))){for(t=a.length;t--;)a[t]&&0===(o=a[t].name).indexOf("data-")&&(o=b(o.slice(5)),me(i,o,r[o]));x.set(i,"hasDataAttrs",!0)}return r},removeData:function(e){return this.each(function(){l.remove(this,e)})}}),C.extend({queue:function(e,t,n){var o;if(e)return o=x.get(e,t=(t||"fx")+"queue"),n&&(!o||Array.isArray(n)?o=x.access(e,t,C.makeArray(n)):o.push(n)),o||[]},dequeue:function(e,t){t=t||"fx";var n=C.queue(e,t),o=n.length,r=n.shift(),i=C._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),o--),r&&("fx"===t&&n.unshift("inprogress"),delete i.stop,r.call(e,function(){C.dequeue(e,t)},i)),!o&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x.get(e,n)||x.access(e,n,{empty:C.Callbacks("once memory").add(function(){x.remove(e,[t+"queue",n])})})}}),C.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?C.queue(this[0],t):n===undefined?this:this.each(function(){var e=C.queue(this,t,n);C._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&C.dequeue(this,t)})},dequeue:function(e){return this.each(function(){C.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,o=1,r=C.Deferred(),i=this,a=this.length,s=function(){--o||r.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=undefined),e=e||"fx";a--;)(n=x.get(i[a],e+"queueHooks"))&&n.empty&&(o++,n.empty.add(s));return s(),r.promise(t)}});var e=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ge=new RegExp("^(?:([+-])=|)("+e+")([a-z%]*)$","i"),p=["Top","Right","Bottom","Left"],w=k.documentElement,S=function(e){return C.contains(e.ownerDocument,e)},ye={composed:!0},ve=(w.getRootNode&&(S=function(e){return C.contains(e.ownerDocument,e)||e.getRootNode(ye)===e.ownerDocument}),function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&S(e)&&"none"===C.css(e,"display")});function be(e,t,n,o){var r,i,a=20,s=o?function(){return o.cur()}:function(){return C.css(e,t,"")},u=s(),l=n&&n[3]||(C.cssNumber[t]?"":"px"),c=e.nodeType&&(C.cssNumber[t]||"px"!==l&&+u)&&ge.exec(C.css(e,t));if(c&&c[3]!==l){for(l=l||c[3],c=+(u/=2)||1;a--;)C.style(e,t,c+l),(1-i)*(1-(i=s()/u||.5))<=0&&(a=0),c/=i;C.style(e,t,(c*=2)+l),n=n||[]}return n&&(c=+c||+u||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],o&&(o.unit=l,o.start=c,o.end=r)),r}var xe={};function A(e,t){for(var n,o,r,i,a,s=[],u=0,l=e.length;u<l;u++)(o=e[u]).style&&(n=o.style.display,t?("none"===n&&(s[u]=x.get(o,"display")||null,s[u]||(o.style.display="")),""===o.style.display&&ve(o)&&(s[u]=(a=i=void 0,i=(r=o).ownerDocument,r=r.nodeName,(a=xe[r])||(i=i.body.appendChild(i.createElement(r)),a=C.css(i,"display"),i.parentNode.removeChild(i),xe[r]=a="none"===a?"block":a)))):"none"!==n&&(s[u]="none",x.set(o,"display",n)));for(u=0;u<l;u++)null!=s[u]&&(e[u].style.display=s[u]);return e}C.fn.extend({show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ve(this)?C(this).show():C(this).hide()})}});var we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ke=/^$|^module$|\/(?:java|ecma)script/i,E=(N=k.createDocumentFragment().appendChild(k.createElement("div")),(a=k.createElement("input")).setAttribute("type","radio"),a.setAttribute("checked","checked"),a.setAttribute("name","t"),N.appendChild(a),m.checkClone=N.cloneNode(!0).cloneNode(!0).lastChild.checked,N.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!N.cloneNode(!0).lastChild.defaultValue,N.innerHTML="<option></option>",m.option=!!N.lastChild,{thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]});function B(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return t===undefined||t&&u(e,t)?C.merge([e],n):n}function Ce(e,t){for(var n=0,o=e.length;n<o;n++)x.set(e[n],"globalEval",!t||x.get(t[n],"globalEval"))}E.tbody=E.tfoot=E.colgroup=E.caption=E.thead,E.th=E.td,m.option||(E.optgroup=E.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Se(e,t,n,o,r){for(var i,a,s,u,l,c=t.createDocumentFragment(),d=[],p=0,f=e.length;p<f;p++)if((i=e[p])||0===i)if("object"===h(i))C.merge(d,i.nodeType?[i]:i);else if(je.test(i)){for(a=a||c.appendChild(t.createElement("div")),s=(Te.exec(i)||["",""])[1].toLowerCase(),s=E[s]||E._default,a.innerHTML=s[1]+C.htmlPrefilter(i)+s[2],l=s[0];l--;)a=a.lastChild;C.merge(d,a.childNodes),(a=c.firstChild).textContent=""}else d.push(t.createTextNode(i));for(c.textContent="",p=0;i=d[p++];)if(o&&-1<C.inArray(i,o))r&&r.push(i);else if(u=S(i),a=B(c.appendChild(i),"script"),u&&Ce(a),n)for(l=0;i=a[l++];)ke.test(i.type||"")&&n.push(i);return c}var Ae=/^([^.]*)(?:\.(.+)|)/;function n(){return!0}function f(){return!1}function Ee(e,t){return e===function(){try{return k.activeElement}catch(e){}}()==("focus"===t)}function Be(e,t,n,o,r,i){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(o=o||n,n=undefined),t)Be(e,s,n,o,t[s],i);return e}if(null==o&&null==r?(r=n,o=n=undefined):null==r&&("string"==typeof n?(r=o,o=undefined):(r=o,o=n,n=undefined)),!1===r)r=f;else if(!r)return e;return 1===i&&(a=r,(r=function(e){return C().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=C.guid++)),e.each(function(){C.event.add(this,t,r,o,n)})}function _e(e,r,i){i?(x.set(e,r,!1),C.event.add(e,r,{namespace:!1,handler:function(e){var t,n,o=x.get(this,r);if(1&e.isTrigger&&this[r]){if(o.length)(C.event.special[r]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),x.set(this,r,o),t=i(this,r),this[r](),o!==(n=x.get(this,r))||t?x.set(this,r,!1):n={},o!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else o.length&&(x.set(this,r,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):x.get(e,r)===undefined&&C.event.add(e,r,n)}C.event={global:{},add:function(t,e,n,o,r){var i,a,s,u,l,c,d,p,f,h=x.get(t);if(y(t))for(n.handler&&(n=(i=n).handler,r=i.selector),r&&C.find.matchesSelector(w,r),n.guid||(n.guid=C.guid++),(s=h.events)||(s=h.events=Object.create(null)),(a=h.handle)||(a=h.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):undefined}),u=(e=(e||"").match(j)||[""]).length;u--;)d=f=(p=Ae.exec(e[u])||[])[1],p=(p[2]||"").split(".").sort(),d&&(l=C.event.special[d]||{},d=(r?l.delegateType:l.bindType)||d,l=C.event.special[d]||{},f=C.extend({type:d,origType:f,data:o,handler:n,guid:n.guid,selector:r,needsContext:r&&C.expr.match.needsContext.test(r),namespace:p.join(".")},i),(c=s[d])||((c=s[d]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(t,o,p,a)||t.addEventListener&&t.addEventListener(d,a)),l.add&&(l.add.call(t,f),f.handler.guid||(f.handler.guid=n.guid)),r?c.splice(c.delegateCount++,0,f):c.push(f),C.event.global[d]=!0)},remove:function(e,t,n,o,r){var i,a,s,u,l,c,d,p,f,h,m,g=x.hasData(e)&&x.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(j)||[""]).length;l--;)if(f=m=(s=Ae.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),f){for(d=C.event.special[f]||{},p=u[f=(o?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=p.length;i--;)c=p[i],!r&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||o&&o!==c.selector&&("**"!==o||!c.selector)||(p.splice(i,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));a&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,h,g.handle)||C.removeEvent(e,f,g.handle),delete u[f])}else for(f in u)C.event.remove(e,f+t[l],n,o,!0);C.isEmptyObject(u)&&x.remove(e,"handle events")}},dispatch:function(e){var t,n,o,r,i,a=new Array(arguments.length),s=C.event.fix(e),e=(x.get(this,"events")||Object.create(null))[s.type]||[],u=C.event.special[s.type]||{};for(a[0]=s,t=1;t<arguments.length;t++)a[t]=arguments[t];if(s.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,s)){for(i=C.event.handlers.call(this,s,e),t=0;(o=i[t++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==r.namespace&&!s.rnamespace.test(r.namespace)||(s.handleObj=r,s.data=r.data,(r=((C.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))!==undefined&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,o,r,i,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(i=[],a={},n=0;n<u;n++)a[r=(o=t[n]).selector+" "]===undefined&&(a[r]=o.needsContext?-1<C(r,this).index(l):C.find(r,this,null,[l]).length),a[r]&&i.push(o);i.length&&s.push({elem:l,handlers:i})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[C.expando]?e:new C.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){e=this||e;return we.test(e.type)&&e.click&&u(e,"input")&&_e(e,"click",n),!1},trigger:function(e){e=this||e;return we.test(e.type)&&e.click&&u(e,"input")&&_e(e,"click"),!0},_default:function(e){e=e.target;return we.test(e.type)&&e.click&&u(e,"input")&&x.get(e,"click")||u(e,"a")}},beforeunload:{postDispatch:function(e){e.result!==undefined&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},C.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},C.Event=function(e,t){if(!(this instanceof C.Event))return new C.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.defaultPrevented===undefined&&!1===e.returnValue?n:f,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&C.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=n,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=n,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=n,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},function(e,t){C.event.special[e]={setup:function(){return _e(this,e,Ee),!1},trigger:function(){return _e(this,e),!0},_default:function(){return!0},delegateType:t}}),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,r){C.event.special[e]={delegateType:r,bindType:r,handle:function(e){var t,n=e.relatedTarget,o=e.handleObj;return n&&(n===this||C.contains(this,n))||(e.type=o.origType,t=o.handler.apply(this,arguments),e.type=r),t}}}),C.fn.extend({on:function(e,t,n,o){return Be(this,e,t,n,o)},one:function(e,t,n,o){return Be(this,e,t,n,o,1)},off:function(e,t,n){var o,r;if(e&&e.preventDefault&&e.handleObj)return o=e.handleObj,C(e.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=undefined),!1===n&&(n=f),this.each(function(){C.event.remove(this,e,n,t)});for(r in e)this.off(r,t,e[r]);return this}});var De=/<script|<style|<link/i,Ne=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return u(e,"table")&&u(11!==t.nodeType?t:t.firstChild,"tr")&&C(e).children("tbody")[0]||e}function qe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Fe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function He(e,t){var n,o,r,i;if(1===t.nodeType){if(x.hasData(e)&&(i=x.get(e).events))for(r in x.remove(t,"handle events"),i)for(n=0,o=i[r].length;n<o;n++)C.event.add(t,r,i[r][n]);l.hasData(e)&&(e=l.access(e),e=C.extend({},e),l.set(t,e))}}function _(n,o,r,i){o=R(o);var e,t,a,s,u,l,c=0,d=n.length,p=d-1,f=o[0],h=v(f);if(h||1<d&&"string"==typeof f&&!m.checkClone&&Ne.test(f))return n.each(function(e){var t=n.eq(e);h&&(o[0]=f.call(this,e,t.html())),_(t,o,r,i)});if(d&&(t=(e=Se(o,n[0].ownerDocument,!1,n,i)).firstChild,1===e.childNodes.length&&(e=t),t||i)){for(s=(a=C.map(B(e,"script"),qe)).length;c<d;c++)u=e,c!==p&&(u=C.clone(u,!0,!0),s&&C.merge(a,B(u,"script"))),r.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,C.map(a,Fe),c=0;c<s;c++)u=a[c],ke.test(u.type||"")&&!x.access(u,"globalEval")&&C.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?C._evalUrl&&!u.noModule&&C._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):X(u.textContent.replace(Me,""),u,l))}return n}function Re(e,t,n){for(var o,r=t?C.filter(t,e):e,i=0;null!=(o=r[i]);i++)n||1!==o.nodeType||C.cleanData(B(o)),o.parentNode&&(n&&S(o)&&Ce(B(o,"script")),o.parentNode.removeChild(o));return e}C.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var o,r,i,a,s,u,l,c=e.cloneNode(!0),d=S(e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(a=B(c),o=0,r=(i=B(e)).length;o<r;o++)s=i[o],u=a[o],l=void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(i=i||B(e),a=a||B(c),o=0,r=i.length;o<r;o++)He(i[o],a[o]);else He(e,c);return 0<(a=B(c,"script")).length&&Ce(a,!d&&B(e,"script")),c},cleanData:function(e){for(var t,n,o,r=C.event.special,i=0;(n=e[i])!==undefined;i++)if(y(n)){if(t=n[x.expando]){if(t.events)for(o in t.events)r[o]?C.event.remove(n,o):C.removeEvent(n,o,t.handle);n[x.expando]=undefined}n[l.expando]&&(n[l.expando]=undefined)}}}),C.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return c(this,function(e){return e===undefined?C.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 _(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return _(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Le(this,e)).insertBefore(e,t.firstChild)})},before:function(){return _(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return _(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&&(C.cleanData(B(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return C.clone(this,e,t)})},html:function(e){return c(this,function(e){var t=this[0]||{},n=0,o=this.length;if(e===undefined&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!E[(Te.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n<o;n++)1===(t=this[n]||{}).nodeType&&(C.cleanData(B(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return _(this,arguments,function(e){var t=this.parentNode;C.inArray(this,n)<0&&(C.cleanData(B(this)),t&&t.replaceChild(e,this))},n)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){C.fn[e]=function(e){for(var t,n=[],o=C(e),r=o.length-1,i=0;i<=r;i++)t=i===r?this:this.clone(!0),C(o[i])[a](t),I.apply(n,t.get());return this.pushStack(n)}});var Ie,Oe,Pe,We,$e,ze,Ue,r,Ve=new RegExp("^("+e+")(?!px)[a-z%]+$","i"),Xe=function(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:T).getComputedStyle(e)},Ge=function(e,t,n){var o,r={};for(o in t)r[o]=e.style[o],e.style[o]=t[o];for(o in n=n.call(e),t)e.style[o]=r[o];return n},Ke=new RegExp(p.join("|"),"i");function Qe(){var e;r&&(Ue.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",r.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",w.appendChild(Ue).appendChild(r),e=T.getComputedStyle(r),Ie="1%"!==e.top,ze=12===Ye(e.marginLeft),r.style.right="60%",We=36===Ye(e.right),Oe=36===Ye(e.width),r.style.position="absolute",Pe=12===Ye(r.offsetWidth/3),w.removeChild(Ue),r=null)}function Ye(e){return Math.round(parseFloat(e))}function Je(e,t,n){var o,r,i=e.style;return(n=n||Xe(e))&&(""!==(r=n.getPropertyValue(t)||n[t])||S(e)||(r=C.style(e,t)),!m.pixelBoxStyles()&&Ve.test(r)&&Ke.test(t)&&(e=i.width,t=i.minWidth,o=i.maxWidth,i.minWidth=i.maxWidth=i.width=r,r=n.width,i.width=e,i.minWidth=t,i.maxWidth=o)),r!==undefined?r+"":r}function Ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}Ue=k.createElement("div"),(r=k.createElement("div")).style&&(r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===r.style.backgroundClip,C.extend(m,{boxSizingReliable:function(){return Qe(),Oe},pixelBoxStyles:function(){return Qe(),We},pixelPosition:function(){return Qe(),Ie},reliableMarginLeft:function(){return Qe(),ze},scrollboxSize:function(){return Qe(),Pe},reliableTrDimensions:function(){var e,t,n;return null==$e&&(e=k.createElement("table"),t=k.createElement("tr"),n=k.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",w.appendChild(e).appendChild(t).appendChild(n),n=T.getComputedStyle(t),$e=parseInt(n.height,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10)===t.offsetHeight,w.removeChild(e)),$e}}));var et=["Webkit","Moz","ms"],tt=k.createElement("div").style,nt={};function ot(e){var t=C.cssProps[e]||nt[e];return t||(e in tt?e:nt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=et.length;n--;)if((e=et[n]+t)in tt)return e}(e)||e)}var rt=/^(none|table(?!-c[ea]).+)/,it=/^--/,at={position:"absolute",visibility:"hidden",display:"block"},st={letterSpacing:"0",fontWeight:"400"};function ut(e,t,n){var o=ge.exec(t);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):t}function lt(e,t,n,o,r,i){var a="width"===t?1:0,s=0,u=0;if(n===(o?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=C.css(e,n+p[a],!0,r)),o?("content"===n&&(u-=C.css(e,"padding"+p[a],!0,r)),"margin"!==n&&(u-=C.css(e,"border"+p[a]+"Width",!0,r))):(u+=C.css(e,"padding"+p[a],!0,r),"padding"!==n?u+=C.css(e,"border"+p[a]+"Width",!0,r):s+=C.css(e,"border"+p[a]+"Width",!0,r));return!o&&0<=i&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-u-s-.5))||0),u}function ct(e,t,n){var o=Xe(e),r=(!m.boxSizingReliable()||n)&&"border-box"===C.css(e,"boxSizing",!1,o),i=r,a=Je(e,t,o),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ve.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&r||!m.reliableTrDimensions()&&u(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===C.css(e,"display",!1,o))&&e.getClientRects().length&&(r="border-box"===C.css(e,"boxSizing",!1,o),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+lt(e,t,n||(r?"border":"content"),i,o,a)+"px"}function i(e,t,n,o,r){return new i.prototype.init(e,t,n,o,r)}C.extend({cssHooks:{opacity:{get:function(e,t){if(t)return""===(t=Je(e,"opacity"))?"1":t}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,o){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,i,a,s=b(t),u=it.test(t),l=e.style;if(u||(t=ot(s)),a=C.cssHooks[t]||C.cssHooks[s],n===undefined)return a&&"get"in a&&(r=a.get(e,!1,o))!==undefined?r:l[t];"string"===(i=typeof n)&&(r=ge.exec(n))&&r[1]&&(n=be(e,t,r),i="number"),null!=n&&n==n&&("number"!==i||u||(n+=r&&r[3]||(C.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&(n=a.set(e,n,o))===undefined||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,o){var r,i=b(t);return it.test(t)||(t=ot(i)),"normal"===(r=(r=(i=C.cssHooks[t]||C.cssHooks[i])&&"get"in i?i.get(e,!0,n):r)===undefined?Je(e,t,o):r)&&t in st&&(r=st[t]),""===n||n?(i=parseFloat(r),!0===n||isFinite(i)?i||0:r):r}}),C.each(["height","width"],function(e,a){C.cssHooks[a]={get:function(e,t,n){if(t)return!rt.test(C.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,a,n):Ge(e,at,function(){return ct(e,a,n)})},set:function(e,t,n){var o=Xe(e),r=!m.scrollboxSize()&&"absolute"===o.position,i=(r||n)&&"border-box"===C.css(e,"boxSizing",!1,o),n=n?lt(e,a,n,i,o):0;return i&&r&&(n-=Math.ceil(e["offset"+a[0].toUpperCase()+a.slice(1)]-parseFloat(o[a])-lt(e,a,"border",!1,o)-.5)),n&&(i=ge.exec(t))&&"px"!==(i[3]||"px")&&(e.style[a]=t,t=C.css(e,a)),ut(0,t,n)}}}),C.cssHooks.marginLeft=Ze(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-Ge(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(r,i){C.cssHooks[r+i]={expand:function(e){for(var t=0,n={},o="string"==typeof e?e.split(" "):[e];t<4;t++)n[r+p[t]+i]=o[t]||o[t-2]||o[0];return n}},"margin"!==r&&(C.cssHooks[r+i].set=ut)}),C.fn.extend({css:function(e,t){return c(this,function(e,t,n){var o,r,i={},a=0;if(Array.isArray(t)){for(o=Xe(e),r=t.length;a<r;a++)i[t[a]]=C.css(e,t[a],!1,o);return i}return n!==undefined?C.style(e,t,n):C.css(e,t)},e,t,1<arguments.length)}}),((C.Tween=i).prototype={constructor:i,init:function(e,t,n,o,r,i){this.elem=e,this.prop=n,this.easing=r||C.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=o,this.unit=i||(C.cssNumber[n]?"":"px")},cur:function(){var e=i.propHooks[this.prop];return(e&&e.get?e:i.propHooks._default).get(this)},run:function(e){var t,n=i.propHooks[this.prop];return this.options.duration?this.pos=t=C.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:i.propHooks._default).set(this),this}}).init.prototype=i.prototype,(i.propHooks={_default:{get:function(e){return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(e=C.css(e.elem,e.prop,""))&&"auto"!==e?e:0},set:function(e){C.fx.step[e.prop]?C.fx.step[e.prop](e):1!==e.elem.nodeType||!C.cssHooks[e.prop]&&null==e.elem.style[ot(e.prop)]?e.elem[e.prop]=e.now:C.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=i.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},C.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},C.fx=i.prototype.init,C.fx.step={};var D,dt,a,N,pt=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;function ht(){dt&&(!1===k.hidden&&T.requestAnimationFrame?T.requestAnimationFrame(ht):T.setTimeout(ht,C.fx.interval),C.fx.tick())}function mt(){return T.setTimeout(function(){D=undefined}),D=Date.now()}function gt(e,t){var n,o=0,r={height:e};for(t=t?1:0;o<4;o+=2-t)r["margin"+(n=p[o])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function yt(e,t,n){for(var o,r=(M.tweeners[t]||[]).concat(M.tweeners["*"]),i=0,a=r.length;i<a;i++)if(o=r[i].call(n,t,e))return o}function M(r,e,t){var n,i,o,a,s,u,l,c=0,d=M.prefilters.length,p=C.Deferred().always(function(){delete f.elem}),f=function(){if(i)return!1;for(var e=D||mt(),e=Math.max(0,h.startTime+h.duration-e),t=1-(e/h.duration||0),n=0,o=h.tweens.length;n<o;n++)h.tweens[n].run(t);return p.notifyWith(r,[h,t,e]),t<1&&o?e:(o||p.notifyWith(r,[h,1,0]),p.resolveWith(r,[h]),!1)},h=p.promise({elem:r,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},t),originalProperties:e,originalOptions:t,startTime:D||mt(),duration:t.duration,tweens:[],createTween:function(e,t){t=C.Tween(r,h.opts,e,t,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(t),t},stop:function(e){var t=0,n=e?h.tweens.length:0;if(i)return this;for(i=!0;t<n;t++)h.tweens[t].run(1);return e?(p.notifyWith(r,[h,1,0]),p.resolveWith(r,[h,e])):p.rejectWith(r,[h,e]),this}}),m=h.props,g=m,y=h.opts.specialEasing;for(o in g)if(s=y[a=b(o)],u=g[o],Array.isArray(u)&&(s=u[1],u=g[o]=u[0]),o!==a&&(g[a]=u,delete g[o]),(l=C.cssHooks[a])&&"expand"in l)for(o in u=l.expand(u),delete g[a],u)o in g||(g[o]=u[o],y[o]=s);else y[a]=s;for(;c<d;c++)if(n=M.prefilters[c].call(h,r,m,h.opts))return v(n.stop)&&(C._queueHooks(h.elem,h.opts.queue).stop=n.stop.bind(n)),n;return C.map(m,yt,h),v(h.opts.start)&&h.opts.start.call(r,h),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always),C.fx.timer(C.extend(f,{elem:r,anim:h,queue:h.opts.queue})),h}C.Animation=C.extend(M,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return be(n.elem,e,ge.exec(t),n),n}]},tweener:function(e,t){for(var n,o=0,r=(e=v(e)?(t=e,["*"]):e.match(j)).length;o<r;o++)n=e[o],M.tweeners[n]=M.tweeners[n]||[],M.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var o,r,i,a,s,u,l,c="width"in t||"height"in t,d=this,p={},f=e.style,h=e.nodeType&&ve(e),m=x.get(e,"fxshow");for(o in n.queue||(null==(a=C._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,C.queue(e,"fx").length||a.empty.fire()})})),t)if(r=t[o],pt.test(r)){if(delete t[o],i=i||"toggle"===r,r===(h?"hide":"show")){if("show"!==r||!m||m[o]===undefined)continue;h=!0}p[o]=m&&m[o]||C.style(e,o)}if((u=!C.isEmptyObject(t))||!C.isEmptyObject(p))for(o in c&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=m&&m.display)&&(l=x.get(e,"display")),"none"===(c=C.css(e,"display"))&&(l?c=l:(A([e],!0),l=e.style.display||l,c=C.css(e,"display"),A([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===C.css(e,"float")&&(u||(d.done(function(){f.display=l}),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),u=!1,p)u||(m?"hidden"in m&&(h=m.hidden):m=x.access(e,"fxshow",{display:l}),i&&(m.hidden=!h),h&&A([e],!0),d.done(function(){for(o in h||A([e]),x.remove(e,"fxshow"),p)C.style(e,o,p[o])})),u=yt(h?m[o]:0,o,d),o in m||(m[o]=u.start,h&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?M.prefilters.unshift(e):M.prefilters.push(e)}}),C.speed=function(e,t,n){var o=e&&"object"==typeof e?C.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return C.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in C.fx.speeds?o.duration=C.fx.speeds[o.duration]:o.duration=C.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){v(o.old)&&o.old.call(this),o.queue&&C.dequeue(this,o.queue)},o},C.fn.extend({fadeTo:function(e,t,n,o){return this.filter(ve).css("opacity",0).show().end().animate({opacity:t},e,n,o)},animate:function(t,e,n,o){var r=C.isEmptyObject(t),i=C.speed(e,n,o),e=function(){var e=M(this,C.extend({},t),i);(r||x.get(this,"finish"))&&e.stop(!0)};return e.finish=e,r||!1===i.queue?this.each(e):this.queue(i.queue,e)},stop:function(r,e,i){var a=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof r&&(i=e,e=r,r=undefined),e&&this.queue(r||"fx",[]),this.each(function(){var e=!0,t=null!=r&&r+"queueHooks",n=C.timers,o=x.get(this);if(t)o[t]&&o[t].stop&&a(o[t]);else for(t in o)o[t]&&o[t].stop&&ft.test(t)&&a(o[t]);for(t=n.length;t--;)n[t].elem!==this||null!=r&&n[t].queue!==r||(n[t].anim.stop(i),e=!1,n.splice(t,1));!e&&i||C.dequeue(this,r)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=x.get(this),n=t[a+"queue"],o=t[a+"queueHooks"],r=C.timers,i=n?n.length:0;for(t.finish=!0,C.queue(this,a,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===a&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<i;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),C.each(["toggle","show","hide"],function(e,o){var r=C.fn[o];C.fn[o]=function(e,t,n){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(gt(o,!0),e,t,n)}}),C.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,o){C.fn[e]=function(e,t,n){return this.animate(o,e,t,n)}}),C.timers=[],C.fx.tick=function(){var e,t=0,n=C.timers;for(D=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||C.fx.stop(),D=undefined},C.fx.timer=function(e){C.timers.push(e),C.fx.start()},C.fx.interval=13,C.fx.start=function(){dt||(dt=!0,ht())},C.fx.stop=function(){dt=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(o,e){return o=C.fx&&C.fx.speeds[o]||o,this.queue(e=e||"fx",function(e,t){var n=T.setTimeout(e,o);t.stop=function(){T.clearTimeout(n)}})},a=k.createElement("input"),N=k.createElement("select").appendChild(k.createElement("option")),a.type="checkbox",m.checkOn=""!==a.value,m.optSelected=N.selected,(a=k.createElement("input")).value="t",a.type="radio",m.radioValue="t"===a.value;var vt,bt=C.expr.attrHandle,xt=(C.fn.extend({attr:function(e,t){return c(this,C.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){C.removeAttr(this,e)})}}),C.extend({attr:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof e.getAttribute?C.prop(e,t,n):(1===i&&C.isXMLDoc(e)||(r=C.attrHooks[t.toLowerCase()]||(C.expr.match.bool.test(t)?vt:undefined)),n!==undefined?null===n?void C.removeAttr(e,t):r&&"set"in r&&(o=r.set(e,n,t))!==undefined?o:(e.setAttribute(t,n+""),n):!(r&&"get"in r&&null!==(o=r.get(e,t)))&&null==(o=C.find.attr(e,t))?undefined:o)},attrHooks:{type:{set:function(e,t){var n;if(!m.radioValue&&"radio"===t&&u(e,"input"))return n=e.value,e.setAttribute("type",t),n&&(e.value=n),t}}},removeAttr:function(e,t){var n,o=0,r=t&&t.match(j);if(r&&1===e.nodeType)for(;n=r[o++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return!1===t?C.removeAttr(e,n):e.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),function(e,t){var a=bt[t]||C.find.attr;bt[t]=function(e,t,n){var o,r,i=t.toLowerCase();return n||(r=bt[i],bt[i]=o,o=null!=a(e,t,n)?i:null,bt[i]=r),o}}),/^(?:input|select|textarea|button)$/i),wt=/^(?:a|area)$/i;function L(e){return(e.match(j)||[]).join(" ")}function q(e){return e.getAttribute&&e.getAttribute("class")||""}function Tt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(j)||[]}C.fn.extend({prop:function(e,t){return c(this,C.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[C.propFix[e]||e]})}}),C.extend({prop:function(e,t,n){var o,r,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&C.isXMLDoc(e)||(t=C.propFix[t]||t,r=C.propHooks[t]),n!==undefined?r&&"set"in r&&(o=r.set(e,n,t))!==undefined?o:e[t]=n:r&&"get"in r&&null!==(o=r.get(e,t))?o:e[t]},propHooks:{tabIndex:{get:function(e){var t=C.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),m.optSelected||(C.propHooks.selected={get:function(e){e=e.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(e){e=e.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(t){var e,n,o,r,i,a,s=0;if(v(t))return this.each(function(e){C(this).addClass(t.call(this,e,q(this)))});if((e=Tt(t)).length)for(;n=this[s++];)if(a=q(n),o=1===n.nodeType&&" "+L(a)+" "){for(i=0;r=e[i++];)o.indexOf(" "+r+" ")<0&&(o+=r+" ");a!==(a=L(o))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,o,r,i,a,s=0;if(v(t))return this.each(function(e){C(this).removeClass(t.call(this,e,q(this)))});if(!arguments.length)return this.attr("class","");if((e=Tt(t)).length)for(;n=this[s++];)if(a=q(n),o=1===n.nodeType&&" "+L(a)+" "){for(i=0;r=e[i++];)for(;-1<o.indexOf(" "+r+" ");)o=o.replace(" "+r+" "," ");a!==(a=L(o))&&n.setAttribute("class",a)}return this},toggleClass:function(r,t){var i=typeof r,a="string"==i||Array.isArray(r);return"boolean"==typeof t&&a?t?this.addClass(r):this.removeClass(r):v(r)?this.each(function(e){C(this).toggleClass(r.call(this,e,q(this),t),t)}):this.each(function(){var e,t,n,o;if(a)for(t=0,n=C(this),o=Tt(r);e=o[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else r!==undefined&&"boolean"!=i||((e=q(this))&&x.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==r&&x.get(this,"__className__")||""))})},hasClass:function(e){for(var t,n=0,o=" "+e+" ";t=this[n++];)if(1===t.nodeType&&-1<(" "+L(q(t))+" ").indexOf(o))return!0;return!1}});var kt=/\r/g,Ct=(C.fn.extend({val:function(t){var n,e,o,r=this[0];return arguments.length?(o=v(t),this.each(function(e){1===this.nodeType&&(null==(e=o?t.call(this,e,C(this).val()):t)?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=C.map(e,function(e){return null==e?"":e+""})),(n=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&n.set(this,e,"value")!==undefined||(this.value=e))})):r?(n=C.valHooks[r.type]||C.valHooks[r.nodeName.toLowerCase()])&&"get"in n&&(e=n.get(r,"value"))!==undefined?e:"string"==typeof(e=r.value)?e.replace(kt,""):null==e?"":e:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:L(C.text(e))}},select:{get:function(e){for(var t,n=e.options,o=e.selectedIndex,r="select-one"===e.type,i=r?null:[],a=r?o+1:n.length,s=o<0?a:r?o:0;s<a;s++)if(((t=n[s]).selected||s===o)&&!t.disabled&&(!t.parentNode.disabled||!u(t.parentNode,"optgroup"))){if(t=C(t).val(),r)return t;i.push(t)}return i},set:function(e,t){for(var n,o,r=e.options,i=C.makeArray(t),a=r.length;a--;)((o=r[a]).selected=-1<C.inArray(C.valHooks.option.get(o),i))&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<C.inArray(C(e).val(),t)}},m.checkOn||(C.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in T,/^(?:focusinfocus|focusoutblur)$/),jt=function(e){e.stopPropagation()},St=(C.extend(C.event,{trigger:function(e,t,n,o){var r,i,a,s,u,l,c,d=[n||k],p=$.call(e,"type")?e.type:e,f=$.call(e,"namespace")?e.namespace.split("."):[],h=c=i=n=n||k;if(3!==n.nodeType&&8!==n.nodeType&&!Ct.test(p+C.event.triggered)&&(-1<p.indexOf(".")&&(p=(f=p.split(".")).shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,(e=e[C.expando]?e:new C.Event(p,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=n),t=null==t?[e]:C.makeArray(t,[e]),l=C.event.special[p]||{},o||!l.trigger||!1!==l.trigger.apply(n,t))){if(!o&&!l.noBubble&&!g(n)){for(a=l.delegateType||p,Ct.test(a+p)||(h=h.parentNode);h;h=h.parentNode)d.push(h),i=h;i===(n.ownerDocument||k)&&d.push(i.defaultView||i.parentWindow||T)}for(r=0;(h=d[r++])&&!e.isPropagationStopped();)c=h,e.type=1<r?a:l.bindType||p,(u=(x.get(h,"events")||Object.create(null))[e.type]&&x.get(h,"handle"))&&u.apply(h,t),(u=s&&h[s])&&u.apply&&y(h)&&(e.result=u.apply(h,t),!1===e.result&&e.preventDefault());return e.type=p,o||e.isDefaultPrevented()||l._default&&!1!==l._default.apply(d.pop(),t)||!y(n)||s&&v(n[p])&&!g(n)&&((i=n[s])&&(n[s]=null),C.event.triggered=p,e.isPropagationStopped()&&c.addEventListener(p,jt),n[p](),e.isPropagationStopped()&&c.removeEventListener(p,jt),C.event.triggered=undefined,i&&(n[s]=i)),e.result}},simulate:function(e,t,n){n=C.extend(new C.Event,n,{type:e,isSimulated:!0});C.event.trigger(n,null,t)}}),C.fn.extend({trigger:function(e,t){return this.each(function(){C.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return C.event.trigger(e,t,n,!0)}}),m.focusin||C.each({focus:"focusin",blur:"focusout"},function(n,o){var r=function(e){C.event.simulate(o,e.target,C.event.fix(e))};C.event.special[o]={setup:function(){var e=this.ownerDocument||this.document||this,t=x.access(e,o);t||e.addEventListener(n,r,!0),x.access(e,o,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=x.access(e,o)-1;t?x.access(e,o,t):(e.removeEventListener(n,r,!0),x.remove(e,o))}}}),T.location),At={guid:Date.now()},Et=/\?/,Bt=(C.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new T.DOMParser).parseFromString(e,"text/xml")}catch(o){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||C.error("Invalid XML: "+(n?C.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t},/\[\]$/),_t=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;C.param=function(e,t){var n,o=[],r=function(e,t){t=v(t)?t():t;o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==t?"":t)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!C.isPlainObject(e))C.each(e,function(){r(this.name,this.value)});else for(n in e)!function i(n,e,o,r){if(Array.isArray(e))C.each(e,function(e,t){o||Bt.test(n)?r(n,t):i(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,o,r)});else if(o||"object"!==h(e))r(n,e);else for(var t in e)i(n+"["+t+"]",e[t],o,r)}(n,e[n],t,r);return o.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=C.prop(this,"elements");return e?C.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!C(this).is(":disabled")&&Nt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,function(e){return{name:t.name,value:e.replace(_t,"\r\n")}}):{name:t.name,value:n.replace(_t,"\r\n")}}).get()}});var Mt=/%20/g,Lt=/#.*$/,qt=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ht=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Ot={},Pt="*/".concat("*"),Wt=k.createElement("a");function $t(i){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,o=0,r=e.toLowerCase().match(j)||[];if(v(t))for(;n=r[o++];)"+"===n[0]?(n=n.slice(1)||"*",(i[n]=i[n]||[]).unshift(t)):(i[n]=i[n]||[]).push(t)}}function zt(t,o,r,i){var a={},s=t===Ot;function u(e){var n;return a[e]=!0,C.each(t[e]||[],function(e,t){t=t(o,r,i);return"string"!=typeof t||s||a[t]?s?!(n=t):void 0:(o.dataTypes.unshift(t),u(t),!1)}),n}return u(o.dataTypes[0])||!a["*"]&&u("*")}function Ut(e,t){var n,o,r=C.ajaxSettings.flatOptions||{};for(n in t)t[n]!==undefined&&((r[n]?e:o=o||{})[n]=t[n]);return o&&C.extend(!0,e,o),e}function Vt(e,t,n,o){var r,i,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&o&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=l[u+" "+i]||l["* "+i]))for(r in l)if((s=r.split(" "))[1]===i&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[r]:!0!==l[r]&&(i=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}Wt.href=St.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:St.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol),global:!0,processData:!0,"async":!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,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":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,C.ajaxSettings),t):Ut(C.ajaxSettings,e)},ajaxPrefilter:$t(It),ajaxTransport:$t(Ot),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined);var u,l,c,n,d,p,f,o,h=C.ajaxSetup({},t=t||{}),m=h.context||h,g=h.context&&(m.nodeType||m.jquery)?C(m):C.event,y=C.Deferred(),v=C.Callbacks("once memory"),b=h.statusCode||{},r={},i={},a="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(p){if(!n)for(n={};t=Ft.exec(c);)n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return p?c:null},setRequestHeader:function(e,t){return null==p&&(e=i[e.toLowerCase()]=i[e.toLowerCase()]||e,r[e]=t),this},overrideMimeType:function(e){return null==p&&(h.mimeType=e),this},statusCode:function(e){if(e)if(p)x.always(e[x.status]);else for(var t in e)b[t]=[b[t],e[t]];return this},abort:function(e){e=e||a;return u&&u.abort(e),s(0,e),this}};if(y.promise(x),h.url=((e||h.url||St.href)+"").replace(Rt,St.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(j)||[""],null==h.crossDomain){e=k.createElement("a");try{e.href=h.url,e.href=e.href,h.crossDomain=Wt.protocol+"//"+Wt.host!=e.protocol+"//"+e.host}catch(w){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=C.param(h.data,h.traditional)),zt(It,h,t,x),p)return x;for(o in(f=C.event&&h.global)&&0==C.active++&&C.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ht.test(h.type),l=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Mt,"+")):(e=h.url.slice(l.length),h.data&&(h.processData||"string"==typeof h.data)&&(l+=(Et.test(l)?"&":"?")+h.data,delete h.data),!1===h.cache&&(l=l.replace(qt,"$1"),e=(Et.test(l)?"&":"?")+"_="+At.guid+++e),h.url=l+e),h.ifModified&&(C.lastModified[l]&&x.setRequestHeader("If-Modified-Since",C.lastModified[l]),C.etag[l]&&x.setRequestHeader("If-None-Match",C.etag[l])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Pt+"; q=0.01":""):h.accepts["*"]),h.headers)x.setRequestHeader(o,h.headers[o]);if(h.beforeSend&&(!1===h.beforeSend.call(m,x,h)||p))return x.abort();if(a="abort",v.add(h.complete),x.done(h.success),x.fail(h.error),u=zt(Ot,h,t,x)){if(x.readyState=1,f&&g.trigger("ajaxSend",[x,h]),p)return x;h["async"]&&0<h.timeout&&(d=T.setTimeout(function(){x.abort("timeout")},h.timeout));try{p=!1,u.send(r,s)}catch(w){if(p)throw w;s(-1,w)}}else s(-1,"No Transport");function s(e,t,n,o){var r,i,a,s=t;p||(p=!0,d&&T.clearTimeout(d),u=undefined,c=o||"",x.readyState=0<e?4:0,o=200<=e&&e<300||304===e,n&&(a=function(e,t,n){for(var o,r,i,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),o===undefined&&(o=e.mimeType||t.getResponseHeader("Content-Type"));if(o)for(r in s)if(s[r]&&s[r].test(o)){u.unshift(r);break}if(u[0]in n)i=u[0];else{for(r in n){if(!u[0]||e.converters[r+" "+u[0]]){i=r;break}a=a||r}i=i||a}if(i)return i!==u[0]&&u.unshift(i),n[i]}(h,x,n)),!o&&-1<C.inArray("script",h.dataTypes)&&C.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),a=Vt(h,a,x,o),o?(h.ifModified&&((n=x.getResponseHeader("Last-Modified"))&&(C.lastModified[l]=n),(n=x.getResponseHeader("etag"))&&(C.etag[l]=n)),204===e||"HEAD"===h.type?s="nocontent":304===e?s="notmodified":(s=a.state,r=a.data,o=!(i=a.error))):(i=s,!e&&s||(s="error",e<0&&(e=0))),x.status=e,x.statusText=(t||s)+"",o?y.resolveWith(m,[r,s,x]):y.rejectWith(m,[x,s,i]),x.statusCode(b),b=undefined,f&&g.trigger(o?"ajaxSuccess":"ajaxError",[x,h,o?r:i]),v.fireWith(m,[x,s]),f&&(g.trigger("ajaxComplete",[x,h]),--C.active||C.event.trigger("ajaxStop")))}return x},getJSON:function(e,t,n){return C.get(e,t,n,"json")},getScript:function(e,t){return C.get(e,undefined,t,"script")}}),C.each(["get","post"],function(e,r){C[r]=function(e,t,n,o){return v(t)&&(o=o||n,n=t,t=undefined),C.ajax(C.extend({url:e,type:r,dataType:o,data:t,success:n},C.isPlainObject(e)&&e))}}),C.ajaxPrefilter(function(e){for(var t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),C._evalUrl=function(e,t,n){return C.ajax({url:e,type:"GET",dataType:"script",cache:!0,"async":!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){C.globalEval(e,t,n)}})},C.fn.extend({wrapAll:function(e){return this[0]&&(v(e)&&(e=e.call(this[0])),e=C(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){C(this).wrapInner(n.call(this,e))}):this.each(function(){var e=C(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){C(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(e){return!C.expr.pseudos.visible(e)},C.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new T.XMLHttpRequest}catch(e){}};var Xt={0:200,1223:204},Gt=C.ajaxSettings.xhr(),Kt=(m.cors=!!Gt&&"withCredentials"in Gt,m.ajax=Gt=!!Gt,C.ajaxTransport(function(i){var a,s;if(m.cors||Gt&&!i.crossDomain)return{send:function(e,t){var n,o=i.xhr();if(o.open(i.type,i.url,i["async"],i.username,i.password),i.xhrFields)for(n in i.xhrFields)o[n]=i.xhrFields[n];for(n in i.mimeType&&o.overrideMimeType&&o.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)o.setRequestHeader(n,e[n]);a=function(e){return function(){a&&(a=s=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?t(0,"error"):t(o.status,o.statusText):t(Xt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=a(),s=o.onerror=o.ontimeout=a("error"),o.onabort!==undefined?o.onabort=s:o.onreadystatechange=function(){4===o.readyState&&T.setTimeout(function(){a&&s()})},a=a("abort");try{o.send(i.hasContent&&i.data||null)}catch(r){if(a)throw r}},abort:function(){a&&a()}}}),C.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),C.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 C.globalEval(e),e}}}),C.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),C.ajaxTransport("script",function(n){var o,r;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){o=C("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",r=function(e){o.remove(),r=null,e&&t("error"===e.type?404:200,e.type)}),k.head.appendChild(o[0])},abort:function(){r&&r()}}}),[]),Qt=/(=)\?(?=&|$)|\?\?/,Yt=(C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||C.expando+"_"+At.guid++;return this[e]=!0,e}}),C.ajaxPrefilter("json jsonp",function(e,t,n){var o,r,i,a=!1!==e.jsonp&&(Qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Qt,"$1"+o):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return i||C.error(o+" was not called"),i[0]},e.dataTypes[0]="json",r=T[o],T[o]=function(){i=arguments},n.always(function(){r===undefined?C(T).removeProp(o):T[o]=r,e[o]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(o)),i&&v(r)&&r(i[0]),i=r=undefined}),"script"}),m.createHTMLDocument=((e=k.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===e.childNodes.length),C.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((o=(t=k.implementation.createHTMLDocument("")).createElement("base")).href=k.location.href,t.head.appendChild(o)):t=k),o=!n&&[],(n=Y.exec(e))?[t.createElement(n[1])]:(n=Se([e],t,o),o&&o.length&&C(o).remove(),C.merge([],n.childNodes)));var o},C.fn.load=function(e,t,n){var o,r,i,a=this,s=e.indexOf(" ");return-1<s&&(o=L(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=undefined):t&&"object"==typeof t&&(r="POST"),0<a.length&&C.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(e){i=arguments,a.html(o?C("<div>").append(C.parseHTML(e)).find(o):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,i||[e.responseText,t,e])})}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,function(e){return t===e.elem}).length},C.offset={setOffset:function(e,t,n){var o,r,i,a,s=C.css(e,"position"),u=C(e),l={};"static"===s&&(e.style.position="relative"),i=u.offset(),o=C.css(e,"top"),a=C.css(e,"left"),s=("absolute"===s||"fixed"===s)&&-1<(o+a).indexOf("auto")?(r=(s=u.position()).top,s.left):(r=parseFloat(o)||0,parseFloat(a)||0),null!=(t=v(t)?t.call(e,n,C.extend({},i)):t).top&&(l.top=t.top-i.top+r),null!=t.left&&(l.left=t.left-i.left+s),"using"in t?t.using.call(e,l):u.css(l)}},C.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){C.offset.setOffset(this,t,e)});var e,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,o=this[0],r={top:0,left:0};if("fixed"===C.css(o,"position"))t=o.getBoundingClientRect();else{for(t=this.offset(),n=o.ownerDocument,e=o.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===C.css(e,"position");)e=e.parentNode;e&&e!==o&&1===e.nodeType&&((r=C(e).offset()).top+=C.css(e,"borderTopWidth",!0),r.left+=C.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-C.css(o,"marginTop",!0),left:t.left-r.left-C.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===C.css(e,"position");)e=e.offsetParent;return e||w})}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var i="pageYOffset"===r;C.fn[t]=function(e){return c(this,function(e,t,n){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),n===undefined)return o?o[r]:e[t];o?o.scrollTo(i?o.pageXOffset:n,i?n:o.pageYOffset):e[t]=n},t,e,arguments.length)}}),C.each(["top","left"],function(e,n){C.cssHooks[n]=Ze(m.pixelPosition,function(e,t){if(t)return t=Je(e,n),Ve.test(t)?C(e).position()[n]+"px":t})}),C.each({Height:"height",Width:"width"},function(a,s){C.each({padding:"inner"+a,content:s,"":"outer"+a},function(o,i){C.fn[i]=function(e,t){var n=arguments.length&&(o||"boolean"!=typeof e),r=o||(!0===e||!0===t?"margin":"border");return c(this,function(e,t,n){var o;return g(e)?0===i.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+a],o["scroll"+a],e.body["offset"+a],o["offset"+a],o["client"+a])):n===undefined?C.css(e,t,r):C.style(e,t,n,r)},s,n?e:undefined,n)}})}),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){C.fn[t]=function(e){return this.on(t,e)}}),C.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){C.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g),Jt=(C.proxy=function(e,t){var n,o;return"string"==typeof t&&(o=e[t],t=e,e=o),v(e)?(n=s.call(arguments,2),(o=function(){return e.apply(t||this,n.concat(s.call(arguments)))}).guid=e.guid=e.guid||C.guid++,o):undefined},C.holdReady=function(e){e?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=u,C.isFunction=v,C.isWindow=g,C.camelCase=b,C.type=h,C.now=Date.now,C.isNumeric=function(e){var t=C.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},C.trim=function(e){return null==e?"":(e+"").replace(Yt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return C}),T.jQuery),Zt=T.$;return C.noConflict=function(e){return T.$===C&&(T.$=Zt),e&&T.jQuery===C&&(T.jQuery=Jt),C},void 0===F&&(T.jQuery=T.$=C),C});var s=jQuery.noConflict(!0),u={removeAttributeValue:function(e,t,n){var o;e.getAttribute(t)&&(e.getAttribute(t)==n?e.removeAttribute(t):(n=new RegExp("(^|\\s)"+n+"(\\s|$)"),(o=e.getAttribute(t).match(n))&&3==o.length&&e.setAttribute(t,e.getAttribute(t).replace(n,o[1]&&o[2]?" ":""))))},addAttributeValue:function(e,t,n){e.getAttribute(t)?new RegExp("(^|\\s)"+n+"(\\s|$)").test(e.getAttribute(t))||e.setAttribute(t,e.getAttribute(t)+" "+n):e.setAttribute(t,n)},dragAndDropSupported:function(){return"undefined"!=typeof document.createElement("div").ondrop},formDataSupported:function(){return"function"==typeof FormData},fileApiSupported:function(){var e=document.createElement("input");return e.type="file","undefined"!=typeof e.files},nodeListForEach:function(e,t){if(window.NodeList.prototype.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t.call(window,e[n],n,e)},initAll:function(e){var e="undefined"!=typeof(e=void 0!==e?e:{}).scope?e.scope:document,t=e.querySelectorAll('[data-module="moj-add-another"]'),t=(u.nodeListForEach(t,function(e){new u.AddAnother(e)}),e.querySelectorAll('[data-module="moj-multi-select"]')),t=(u.nodeListForEach(t,function(e){new u.MultiSelect({container:e.querySelector(e.getAttribute("data-multi-select-checkbox")),checkboxes:e.querySelectorAll("tbody .govuk-checkboxes__input")})}),e.querySelectorAll('[data-module="moj-password-reveal"]')),t=(u.nodeListForEach(t,function(e){new u.PasswordReveal(e)}),e.querySelectorAll('[data-module="moj-rich-text-editor"]')),t=(u.nodeListForEach(t,function(e){var t={textarea:s(e)},e=e.getAttribute("data-moj-rich-text-editor-toolbar");if(e){var n,o=e.split(",");for(n in t.toolbar={},o)t.toolbar[o[n]]=!0}new u.RichTextEditor(t)}),e.querySelectorAll('[data-module="moj-search-toggle"]')),t=(u.nodeListForEach(t,function(e){new u.SearchToggle({toggleButton:{container:s(e.querySelector(".moj-search-toggle__toggle")),text:e.getAttribute("data-moj-search-toggle-text")},search:{container:s(e.querySelector(".moj-search"))}})}),e.querySelectorAll('[data-module="moj-sortable-table"]')),t=(u.nodeListForEach(t,function(e){new u.SortableTable({table:e})}),e.querySelectorAll('[data-module="moj-sortable-table"]'));u.nodeListForEach(t,function(e){new u.SortableTable({table:e})})},AddAnother:function(e){this.container=s(e),this.container.data("moj-add-another-initialised")||(this.container.data("moj-add-another-initialised",!0),this.container.on("click",".moj-add-another__remove-button",s.proxy(this,"onRemoveButtonClick")),this.container.on("click",".moj-add-another__add-button",s.proxy(this,"onAddButtonClick")),this.container.find(".moj-add-another__add-button, moj-add-another__remove-button").prop("type","button"))}};return u.AddAnother.prototype.onAddButtonClick=function(e){var t=this.getNewItem(),n=(this.updateAttributes(this.getItems().length,t),this.resetItem(t),this.getItems().first());this.hasRemoveButton(n)||this.createRemoveButton(n),this.getItems().last().after(t),t.find("input, textarea, select").first().focus()},u.AddAnother.prototype.hasRemoveButton=function(e){return e.find(".moj-add-another__remove-button").length},u.AddAnother.prototype.getItems=function(){return this.container.find(".moj-add-another__item")},u.AddAnother.prototype.getNewItem=function(){var e=this.getItems().first().clone();return this.hasRemoveButton(e)||this.createRemoveButton(e),e},u.AddAnother.prototype.updateAttributes=function(o,r){r.find("[data-name]").each(function(e,t){var n=t.id;t.name=s(t).attr("data-name").replace(/%index%/,o),t.id=s(t).attr("data-id").replace(/%index%/,o),(s(t).siblings("label")[0]||s(t).parents("label")[0]||r.find('[for="'+n+'"]')[0]).htmlFor=t.id})},u.AddAnother.prototype.createRemoveButton=function(e){e.append('<button type="button" class="govuk-button govuk-button--secondary moj-add-another__remove-button">Remove</button>')},u.AddAnother.prototype.resetItem=function(e){e.find("[data-name], [data-id]").each(function(e,t){"checkbox"==t.type||"radio"==t.type?t.checked=!1:t.value=""})},u.AddAnother.prototype.onRemoveButtonClick=function(e){s(e.currentTarget).parents(".moj-add-another__item").remove();e=this.getItems();1===e.length&&e.find(".moj-add-another__remove-button").remove(),e.each(s.proxy(function(e,t){this.updateAttributes(e,s(t))},this)),this.focusHeading()},u.AddAnother.prototype.focusHeading=function(){this.container.find(".moj-add-another__heading").focus()},u.ButtonMenu=function(e){this.container=e.container,this.menu=this.container.find(".moj-button-menu__wrapper"),e.menuClasses&&this.menu.addClass(e.menuClasses),this.menu.attr("role","menu"),this.mq=e.mq,this.buttonText=e.buttonText,this.buttonClasses=e.buttonClasses||"",this.keys={esc:27,up:38,down:40,tab:9},this.menu.on("keydown","[role=menuitem]",s.proxy(this,"onButtonKeydown")),this.createToggleButton(),this.setupResponsiveChecks(),s(document).on("click",s.proxy(this,"onDocumentClick"))},u.ButtonMenu.prototype.onDocumentClick=function(e){s.contains(this.container[0],e.target)||this.hideMenu()},u.ButtonMenu.prototype.createToggleButton=function(){this.menuButton=s('<button class="govuk-button moj-button-menu__toggle-button '+this.buttonClasses+'" type="button" aria-haspopup="true" aria-expanded="false">'+this.buttonText+"</button>"),this.menuButton.on("click",s.proxy(this,"onMenuButtonClick")),this.menuButton.on("keydown",s.proxy(this,"onMenuKeyDown"))},u.ButtonMenu.prototype.setupResponsiveChecks=function(){this.mql=window.matchMedia(this.mq),this.mql.addListener(s.proxy(this,"checkMode")),this.checkMode(this.mql)},u.ButtonMenu.prototype.checkMode=function(e){e.matches?this.enableBigMode():this.enableSmallMode()},u.ButtonMenu.prototype.enableSmallMode=function(){this.container.prepend(this.menuButton),this.hideMenu(),this.removeButtonClasses(),this.menu.attr("role","menu"),this.container.find(".moj-button-menu__item").attr("role","menuitem")},u.ButtonMenu.prototype.enableBigMode=function(){this.menuButton.detach(),this.showMenu(),this.addButtonClasses(),this.menu.removeAttr("role"),this.container.find(".moj-button-menu__item").removeAttr("role")},u.ButtonMenu.prototype.removeButtonClasses=function(){this.menu.find(".moj-button-menu__item").each(function(e,t){s(t).hasClass("govuk-button--secondary")&&(s(t).attr("data-secondary","true"),s(t).removeClass("govuk-button--secondary")),s(t).hasClass("govuk-button--warning")&&(s(t).attr("data-warning","true"),s(t).removeClass("govuk-button--warning")),s(t).removeClass("govuk-button")})},u.ButtonMenu.prototype.addButtonClasses=function(){this.menu.find(".moj-button-menu__item").each(function(e,t){"true"==s(t).attr("data-secondary")&&s(t).addClass("govuk-button--secondary"),"true"==s(t).attr("data-warning")&&s(t).addClass("govuk-button--warning"),s(t).addClass("govuk-button")})},u.ButtonMenu.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false")},u.ButtonMenu.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true")},u.ButtonMenu.prototype.onMenuButtonClick=function(){this.toggle()},u.ButtonMenu.prototype.toggle=function(){"false"==this.menuButton.attr("aria-expanded")?(this.showMenu(),this.menu.find("[role=menuitem]").first().focus()):(this.hideMenu(),this.menuButton.focus())},u.ButtonMenu.prototype.onMenuKeyDown=function(e){e.keyCode===this.keys.down&&this.toggle()},u.ButtonMenu.prototype.onButtonKeydown=function(e){switch(e.keyCode){case this.keys.up:e.preventDefault(),this.focusPrevious(e.currentTarget);break;case this.keys.down:e.preventDefault(),this.focusNext(e.currentTarget);break;case this.keys.esc:this.mq.matches||(this.menuButton.focus(),this.hideMenu());break;case this.keys.tab:this.mq.matches||this.hideMenu()}},u.ButtonMenu.prototype.focusNext=function(e){e=s(e).next();(e[0]?e:this.container.find("[role=menuitem]").first()).focus()},u.ButtonMenu.prototype.focusPrevious=function(e){e=s(e).prev();(e[0]?e:this.container.find("[role=menuitem]").last()).focus()},u.FilterToggleButton=function(e){this.options=e,this.container=this.options.toggleButton.container,this.createToggleButton(),this.setupResponsiveChecks(),this.options.filter.container.attr("tabindex","-1"),this.options.startHidden&&this.hideMenu()},u.FilterToggleButton.prototype.setupResponsiveChecks=function(){this.mq=window.matchMedia(this.options.bigModeMediaQuery),this.mq.addListener(s.proxy(this,"checkMode")),this.checkMode(this.mq)},u.FilterToggleButton.prototype.createToggleButton=function(){this.menuButton=s('<button class="govuk-button '+this.options.toggleButton.classes+'" type="button" aria-haspopup="true" aria-expanded="false">'+this.options.toggleButton.showText+"</button>"),this.menuButton.on("click",s.proxy(this,"onMenuButtonClick")),this.options.toggleButton.container.append(this.menuButton)},u.FilterToggleButton.prototype.checkMode=function(e){e.matches?this.enableBigMode():this.enableSmallMode()},u.FilterToggleButton.prototype.enableBigMode=function(){this.showMenu(),this.removeCloseButton()},u.FilterToggleButton.prototype.enableSmallMode=function(){this.hideMenu(),this.addCloseButton()},u.FilterToggleButton.prototype.addCloseButton=function(){this.options.closeButton&&(this.closeButton=s('<button class="moj-filter__close" type="button">'+this.options.closeButton.text+"</button>"),this.closeButton.on("click",s.proxy(this,"onCloseClick")),this.options.closeButton.container.append(this.closeButton))},u.FilterToggleButton.prototype.onCloseClick=function(){this.hideMenu(),this.menuButton.focus()},u.FilterToggleButton.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},u.FilterToggleButton.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false"),this.options.filter.container.addClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.showText)},u.FilterToggleButton.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true"),this.options.filter.container.removeClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.hideText)},u.FilterToggleButton.prototype.onMenuButtonClick=function(){this.toggle()},u.FilterToggleButton.prototype.toggle=function(){"false"==this.menuButton.attr("aria-expanded")?(this.showMenu(),this.options.filter.container.focus()):this.hideMenu()},u.FormValidator=function(e,t){this.form=e,this.errors=[],this.validators=[],s(this.form).on("submit",s.proxy(this,"onSubmit")),this.summary=t&&t.summary?s(t.summary):s(".govuk-error-summary"),this.originalTitle=document.title},u.FormValidator.entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},u.FormValidator.prototype.escapeHtml=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return u.FormValidator.entityMap[e]})},u.FormValidator.prototype.resetTitle=function(){document.title=this.originalTitle},u.FormValidator.prototype.updateTitle=function(){document.title=this.errors.length+" errors - "+document.title},u.FormValidator.prototype.showSummary=function(){this.summary.html(this.getSummaryHtml()),this.summary.removeClass("moj-hidden"),this.summary.attr("aria-labelledby","errorSummary-heading"),this.summary.focus()},u.FormValidator.prototype.getSummaryHtml=function(){o='<h2 id="error-summary-title" class="govuk-error-summary__title">There is a problem</h2><div class="govuk-error-summary__body"><ul class="govuk-list govuk-error-summary__list">';for(var e=0,t=this.errors.length;e<t;e++)var n=this.errors[e],o=(o=(o=(o+="<li>")+('<a href="#'+this.escapeHtml(n.fieldName)+'">'))+this.escapeHtml(n.message))+"</a>"+"</li>";return o=o+"</ul>"+"</div>"},u.FormValidator.prototype.hideSummary=function(){this.summary.addClass("moj-hidden"),this.summary.removeAttr("aria-labelledby")},u.FormValidator.prototype.onSubmit=function(e){this.removeInlineErrors(),this.hideSummary(),this.resetTitle(),this.validate()||(e.preventDefault(),this.updateTitle(),this.showSummary(),this.showInlineErrors())},u.FormValidator.prototype.showInlineErrors=function(){for(var e=0,t=this.errors.length;e<t;e++)this.showInlineError(this.errors[e])},u.FormValidator.prototype.showInlineError=function(e){var t=e.fieldName+"-error",n='<span class="govuk-error-message" id="'+t+'">'+this.escapeHtml(e.message)+"</span>",e=s("#"+e.fieldName),o=e.parents(".govuk-form-group"),r=o.find("label"),i=o.find("legend"),a=o.find("fieldset");o.addClass("govuk-form-group--error"),i.length?(i.after(n),o.attr("aria-invalid","true"),u.addAttributeValue(a[0],"aria-describedby",t)):(r.after(n),e.attr("aria-invalid","true"),u.addAttributeValue(e[0],"aria-describedby",t))},u.FormValidator.prototype.removeInlineErrors=function(){for(var e=0;e<this.errors.length;e++)this.removeInlineError(this.errors[e])},u.FormValidator.prototype.removeInlineError=function(e){var t=s("#"+e.fieldName).parents(".govuk-form-group"),e=(t.find(".govuk-error-message").remove(),t.removeClass("govuk-form-group--error"),t.find("[aria-invalid]").attr("aria-invalid","false"),e.fieldName+"-error");u.removeAttributeValue(t.find("[aria-describedby]")[0],"aria-describedby",e)},u.FormValidator.prototype.addValidator=function(e,t){this.validators.push({fieldName:e,rules:t,field:this.form.elements[e]})},u.FormValidator.prototype.validate=function(){this.errors=[];for(var e,t,n=null,o=0;o<this.validators.length;o++)for(n=this.validators[o],t=0;t<n.rules.length;t++){if("boolean"==typeof(e=n.rules[t].method(n.field,n.rules[t].params))&&!e){this.errors.push({fieldName:n.fieldName,message:n.rules[t].message});break}if("string"==typeof e){this.errors.push({fieldName:e,message:n.rules[t].message});break}}return 0===this.errors.length},u.dragAndDropSupported()&&u.formDataSupported()&&u.fileApiSupported()&&(u.MultiFileUpload=function(e){this.defaultParams={uploadFileEntryHook:s.noop,uploadFileExitHook:s.noop,uploadFileErrorHook:s.noop,fileDeleteHook:s.noop,uploadStatusText:"Uploading files, please wait",dropzoneHintText:"Drag and drop files here or",dropzoneButtonText:"Choose files"},this.params=s.extend({},this.defaultParams,e),this.params.container.addClass("moj-multi-file-upload--enhanced"),this.feedbackContainer=this.params.container.find(".moj-multi-file__uploaded-files"),this.setupFileInput(),this.setupDropzone(),this.setupLabel(),this.setupStatusBox(),this.params.container.on("click",".moj-multi-file-upload__delete",s.proxy(this,"onFileDeleteClick"))},u.MultiFileUpload.prototype.setupDropzone=function(){this.fileInput.wrap('<div class="moj-multi-file-upload__dropzone" />'),this.dropzone=this.params.container.find(".moj-multi-file-upload__dropzone"),this.dropzone.on("dragover",s.proxy(this,"onDragOver")),this.dropzone.on("dragleave",s.proxy(this,"onDragLeave")),this.dropzone.on("drop",s.proxy(this,"onDrop"))},u.MultiFileUpload.prototype.setupLabel=function(){this.label=s('<label for="'+this.fileInput[0].id+'" class="govuk-button govuk-button--secondary">'+this.params.dropzoneButtonText+"</label>"),this.dropzone.append('<p class="govuk-body">'+this.params.dropzoneHintText+"</p>"),this.dropzone.append(this.label)},u.MultiFileUpload.prototype.setupFileInput=function(){this.fileInput=this.params.container.find(".moj-multi-file-upload__input"),this.fileInput.on("change",s.proxy(this,"onFileChange")),this.fileInput.on("focus",s.proxy(this,"onFileFocus")),this.fileInput.on("blur",s.proxy(this,"onFileBlur"))},u.MultiFileUpload.prototype.setupStatusBox=function(){this.status=s('<div aria-live="polite" role="status" class="govuk-visually-hidden" />'),this.dropzone.append(this.status)},u.MultiFileUpload.prototype.onDragOver=function(e){e.preventDefault(),this.dropzone.addClass("moj-multi-file-upload--dragover")},u.MultiFileUpload.prototype.onDragLeave=function(){this.dropzone.removeClass("moj-multi-file-upload--dragover")},u.MultiFileUpload.prototype.onDrop=function(e){e.preventDefault(),this.dropzone.removeClass("moj-multi-file-upload--dragover"),this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(e.originalEvent.dataTransfer.files)},u.MultiFileUpload.prototype.uploadFiles=function(e){for(var t=0;t<e.length;t++)this.uploadFile(e[t])},u.MultiFileUpload.prototype.onFileChange=function(e){this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(e.currentTarget.files),this.fileInput.replaceWith(s(e.currentTarget).val("").clone(!0)),this.setupFileInput(),this.fileInput.focus()},u.MultiFileUpload.prototype.onFileFocus=function(e){this.label.addClass("moj-multi-file-upload--focused")},u.MultiFileUpload.prototype.onFileBlur=function(e){this.label.removeClass("moj-multi-file-upload--focused")},u.MultiFileUpload.prototype.getSuccessHtml=function(e){return'<span class="moj-multi-file-upload__success"> <svg class="moj-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25"><path d="M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"/></svg> '+e.messageHtml+"</span>"},u.MultiFileUpload.prototype.getErrorHtml=function(e){return'<span class="moj-multi-file-upload__error"> <svg class="moj-banner__icon" fill="currentColor" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" height="25" width="25"><path d="M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"/></svg> '+e.message+"</span>"},u.MultiFileUpload.prototype.getFileRowHtml=function(e){var t="";return(t+='<div class="govuk-summary-list__row moj-multi-file-upload__row">')+' <div class="govuk-summary-list__value moj-multi-file-upload__message">'+('<span class="moj-multi-file-upload__filename">'+e.name+"</span>")+'<span class="moj-multi-file-upload__progress">0%</span>'+" </div>"+' <div class="govuk-summary-list__actions moj-multi-file-upload__actions"></div>'+"</div>"},u.MultiFileUpload.prototype.getDeleteButtonHtml=function(e){var t='<button class="moj-multi-file-upload__delete govuk-button govuk-button--secondary govuk-!-margin-bottom-0" type="button" name="delete" value="'+e.filename+'">';return t+('Delete <span class="govuk-visually-hidden">'+e.originalname+"</span>")+"</button>"},u.MultiFileUpload.prototype.uploadFile=function(o){this.params.uploadFileEntryHook(this,o);var e=new FormData,t=(e.append("documents",o),s(this.getFileRowHtml(o)));this.feedbackContainer.find(".moj-multi-file-upload__list").append(t),s.ajax({url:this.params.uploadUrl,type:"post",data:e,processData:!1,contentType:!1,success:s.proxy(function(e){e.error?(t.find(".moj-multi-file-upload__message").html(this.getErrorHtml(e.error)),this.status.html(e.error.message)):(t.find(".moj-multi-file-upload__message").html(this.getSuccessHtml(e.success)),this.status.html(e.success.messageText)),t.find(".moj-multi-file-upload__actions").append(this.getDeleteButtonHtml(e.file)),this.params.uploadFileExitHook(this,o,e)},this),error:s.proxy(function(e,t,n){this.params.uploadFileErrorHook(this,o,e,t,n)},this),xhr:function(){var e=new XMLHttpRequest;return e.upload.addEventListener("progress",function(e){e.lengthComputable&&(e=e.loaded/e.total,e=parseInt(100*e,10),t.find(".moj-multi-file-upload__progress").text(" "+e+"%"))},!1),e}})},u.MultiFileUpload.prototype.onFileDeleteClick=function(e){e.preventDefault();var t=s(e.currentTarget),e={};e[t[0].name]=t[0].value,s.ajax({url:this.params.deleteUrl,type:"post",dataType:"json",data:e,success:s.proxy(function(e){e.error||(t.parents(".moj-multi-file-upload__row").remove(),0===this.feedbackContainer.find(".moj-multi-file-upload__row").length&&this.feedbackContainer.addClass("moj-hidden")),this.params.fileDeleteHook(this,e)},this)})}),u.MultiSelect=function(e){this.container=s(e.container),this.container.data("moj-multi-select-initialised")||(this.container.data("moj-multi-select-initialised",!0),this.toggle=s(this.getToggleHtml()),this.toggleButton=this.toggle.find("input"),this.toggleButton.on("click",s.proxy(this,"onButtonClick")),this.container.append(this.toggle),this.checkboxes=s(e.checkboxes),this.checkboxes.on("click",s.proxy(this,"onCheckboxClick")),this.checked=e.checked||!1)},u.MultiSelect.prototype.getToggleHtml=function(){return'<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox"> <input type="checkbox" class="govuk-checkboxes__input" id="checkboxes-all"> <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="checkboxes-all"> <span class="govuk-visually-hidden">Select all</span> </label></div>'},u.MultiSelect.prototype.onButtonClick=function(e){this.checked?(this.uncheckAll(),this.toggleButton[0].checked=!1):(this.checkAll(),this.toggleButton[0].checked=!0)},u.MultiSelect.prototype.checkAll=function(){this.checkboxes.each(s.proxy(function(e,t){t.checked=!0},this)),this.checked=!0},u.MultiSelect.prototype.uncheckAll=function(){this.checkboxes.each(s.proxy(function(e,t){t.checked=!1},this)),this.checked=!1},u.MultiSelect.prototype.onCheckboxClick=function(e){e.target.checked?this.checkboxes.filter(":checked").length===this.checkboxes.length&&(this.toggleButton[0].checked=!0,this.checked=!0):(this.toggleButton[0].checked=!1,this.checked=!1)},u.PasswordReveal=function(e){this.el=e,($el=s(this.el)).data("moj-password-reveal-initialised")||($el.data("moj-password-reveal-initialised",!0),$el.attr("spellcheck","false"),$el.wrap('<div class="moj-password-reveal"></div>'),this.container=s(this.el).parent(),this.createButton())},u.PasswordReveal.prototype.createButton=function(){this.button=s('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>'),this.container.append(this.button),this.button.on("click",s.proxy(this,"onButtonClick"))},u.PasswordReveal.prototype.onButtonClick=function(){"password"===this.el.type?(this.el.type="text",this.button.html('Hide <span class="govuk-visually-hidden">password</span>')):(this.el.type="password",this.button.html('Show <span class="govuk-visually-hidden">password</span>'))},"contentEditable"in document.documentElement&&(u.RichTextEditor=function(e){this.options=e,this.options.toolbar=this.options.toolbar||{bold:!1,italic:!1,underline:!1,bullets:!0,numbers:!0},this.textarea=this.options.textarea,this.container=s(this.textarea).parent(),this.container.data("moj-rich-text-editor-initialised")||(this.container.data("moj-rich-text-editor-initialised",!0),this.createToolbar(),this.hideDefault(),this.configureToolbar(),this.keys={left:37,right:39,up:38,down:40},this.container.on("click",".moj-rich-text-editor__toolbar-button",s.proxy(this,"onButtonClick")),this.container.find(".moj-rich-text-editor__content").on("input",s.proxy(this,"onEditorInput")),this.container.find("label").on("click",s.proxy(this,"onLabelClick")),this.toolbar.on("keydown",s.proxy(this,"onToolbarKeydown")))},u.RichTextEditor.prototype.onToolbarKeydown=function(e){switch(e.keyCode){case this.keys.right:case this.keys.down:var t,n=(t=this.toolbar.find("button[tabindex=0]")).next("button");n[0]&&(n.focus(),t.attr("tabindex","-1"),n.attr("tabindex","0"));break;case this.keys.left:case this.keys.up:n=(t=this.toolbar.find("button[tabindex=0]")).prev("button");n[0]&&(n.focus(),t.attr("tabindex","-1"),n.attr("tabindex","0"))}},u.RichTextEditor.prototype.getToolbarHtml=function(){var e="";return e+='<div class="moj-rich-text-editor__toolbar" role="toolbar">',this.options.toolbar.bold&&(e+='<button class="moj-rich-text-editor__toolbar-button moj-rich-text-editor__toolbar-button--bold" type="button" data-command="bold"><span class="govuk-visually-hidden">Bold</span></button>'),this.options.toolbar.italic&&(e+='<button class="moj-rich-text-editor__toolbar-button moj-rich-text-editor__toolbar-button--italic" type="button" data-command="italic"><span class="govuk-visually-hidden">Italic</span></button>'),this.options.toolbar.underline&&(e+='<button class="moj-rich-text-editor__toolbar-button moj-rich-text-editor__toolbar-button--underline" type="button" data-command="underline"><span class="govuk-visually-hidden">Underline</span></button>'),this.options.toolbar.bullets&&(e+='<button class="moj-rich-text-editor__toolbar-button moj-rich-text-editor__toolbar-button--unordered-list" type="button" data-command="insertUnorderedList"><span class="govuk-visually-hidden">Unordered list</span></button>'),this.options.toolbar.numbers&&(e+='<button class="moj-rich-text-editor__toolbar-button moj-rich-text-editor__toolbar-button--ordered-list" type="button" data-command="insertOrderedList"><span class="govuk-visually-hidden">Ordered list</span></button>'),e+="</div>"},u.RichTextEditor.prototype.getEnhancedHtml=function(e){return this.getToolbarHtml()+'<div class="govuk-textarea moj-rich-text-editor__content" contenteditable="true" spellcheck="false"></div>'},u.RichTextEditor.prototype.hideDefault=function(){this.textarea=this.container.find("textarea"),this.textarea.addClass("govuk-visually-hidden"),this.textarea.attr("aria-hidden",!0),this.textarea.attr("tabindex","-1")},u.RichTextEditor.prototype.createToolbar=function(){this.toolbar=document.createElement("div"),this.toolbar.className="moj-rich-text-editor",this.toolbar.innerHTML=this.getEnhancedHtml(),this.container.append(this.toolbar),this.toolbar=this.container.find(".moj-rich-text-editor__toolbar"),this.container.find(".moj-rich-text-editor__content").html(this.textarea.val())},u.RichTextEditor.prototype.configureToolbar=function(){this.buttons=this.container.find(".moj-rich-text-editor__toolbar-button"),this.buttons.prop("tabindex","-1"),this.buttons.first().prop("tabindex","0")},u.RichTextEditor.prototype.onButtonClick=function(e){document.execCommand(s(e.currentTarget).data("command"),!1,null)},u.RichTextEditor.prototype.getContent=function(){return this.container.find(".moj-rich-text-editor__content").html()},u.RichTextEditor.prototype.onEditorInput=function(e){this.updateTextarea()},u.RichTextEditor.prototype.updateTextarea=function(){document.execCommand("defaultParagraphSeparator",!1,"p"),this.textarea.val(this.getContent())},u.RichTextEditor.prototype.onLabelClick=function(e){e.preventDefault(),this.container.find(".moj-rich-text-editor__content").focus()}),u.SearchToggle=function(e){this.options=e,this.options.search.container.data("moj-search-toggle-initialised")||(this.options.search.container.data("moj-search-toggle-initialised",!0),this.toggleButton=s('<button class="moj-search-toggle__button" type="button" aria-haspopup="true" aria-expanded="false">'+this.options.toggleButton.text+'<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="moj-search-toggle__button__icon"><path d="M7.433,12.5790048 C6.06762625,12.5808611 4.75763941,12.0392925 3.79217348,11.0738265 C2.82670755,10.1083606 2.28513891,8.79837375 2.28699522,7.433 C2.28513891,6.06762625 2.82670755,4.75763941 3.79217348,3.79217348 C4.75763941,2.82670755 6.06762625,2.28513891 7.433,2.28699522 C8.79837375,2.28513891 10.1083606,2.82670755 11.0738265,3.79217348 C12.0392925,4.75763941 12.5808611,6.06762625 12.5790048,7.433 C12.5808611,8.79837375 12.0392925,10.1083606 11.0738265,11.0738265 C10.1083606,12.0392925 8.79837375,12.5808611 7.433,12.5790048 L7.433,12.5790048 Z M14.293,12.579 L13.391,12.579 L13.071,12.269 C14.2300759,10.9245158 14.8671539,9.20813198 14.866,7.433 C14.866,3.32786745 11.5381325,-1.65045755e-15 7.433,-1.65045755e-15 C3.32786745,-1.65045755e-15 -1.65045755e-15,3.32786745 -1.65045755e-15,7.433 C-1.65045755e-15,11.5381325 3.32786745,14.866 7.433,14.866 C9.208604,14.8671159 10.9253982,14.2296624 12.27,13.07 L12.579,13.39 L12.579,14.294 L18.296,20 L20,18.296 L14.294,12.579 L14.293,12.579 Z"></path></svg></button>'),this.toggleButton.on("click",s.proxy(this,"onToggleButtonClick")),this.options.toggleButton.container.append(this.toggleButton))},u.SearchToggle.prototype.onToggleButtonClick=function(){"false"==this.toggleButton.attr("aria-expanded")?(this.toggleButton.attr("aria-expanded","true"),this.options.search.container.removeClass("moj-js-hidden"),this.options.search.container.find("input").first().focus()):(this.options.search.container.addClass("moj-js-hidden"),this.toggleButton.attr("aria-expanded","false"))},u.SortableTable=function(e){this.table=s(e.table),this.table.data("moj-search-toggle-initialised")||(this.table.data("moj-search-toggle-initialised",!0),this.setupOptions(e),this.body=this.table.find("tbody"),this.createHeadingButtons(),this.createStatusBox(),this.initialiseSortedColumn(),this.table.on("click","th button",s.proxy(this,"onSortButtonClick")))},u.SortableTable.prototype.setupOptions=function(e){this.statusMessage=(e=e||{}).statusMessage||"Sort by %heading% (%direction%)",this.ascendingText=e.ascendingText||"ascending",this.descendingText=e.descendingText||"descending"},u.SortableTable.prototype.createHeadingButtons=function(){for(var e,t=this.table.find("thead th"),n=0;n<t.length;n++)(e=s(t[n])).attr("aria-sort")&&this.createHeadingButton(e,n)},u.SortableTable.prototype.createHeadingButton=function(e,t){var n=e.text(),t=s('<button type="button" data-index="'+t+'">'+n+"</button>");e.text(""),e.append(t)},u.SortableTable.prototype.createStatusBox=function(){this.status=s('<div aria-live="polite" role="status" aria-atomic="true" class="govuk-visually-hidden" />'),this.table.parent().append(this.status)},u.SortableTable.prototype.initialiseSortedColumn=function(){var o=this.getTableRowsArray();this.table.find("th").filter('[aria-sort="ascending"], [aria-sort="descending"]').first().each((e,t)=>{var n=s(t).attr("aria-sort"),t=s(t).find("button").attr("data-index"),t=this.sort(o,t,n);this.addRows(t)})},u.SortableTable.prototype.onSortButtonClick=function(e){var t=e.currentTarget.getAttribute("data-index"),n=s(e.currentTarget).parent().attr("aria-sort"),n="none"===n||"descending"===n?"ascending":"descending",o=this.getTableRowsArray(),o=this.sort(o,t,n);this.addRows(o),this.removeButtonStates(),this.updateButtonState(s(e.currentTarget),n)},u.SortableTable.prototype.updateButtonState=function(e,t){e.parent().attr("aria-sort",t);var n=this.statusMessage;n=(n=n.replace(/%heading%/,e.text())).replace(/%direction%/,this[t+"Text"]),this.status.text(n)},u.SortableTable.prototype.removeButtonStates=function(){this.table.find("thead th").attr("aria-sort","none")},u.SortableTable.prototype.addRows=function(e){for(var t=0;t<e.length;t++)this.body.append(e[t])},u.SortableTable.prototype.getTableRowsArray=function(){for(var e=[],t=this.body.find("tr"),n=0;n<t.length;n++)e.push(t[n]);return e},u.SortableTable.prototype.sort=function(e,n,o){return e.sort(s.proxy(function(e,t){e=s(e).find("td,th").eq(n),t=s(t).find("td,th").eq(n),e=this.getCellValue(e),t=this.getCellValue(t);return"ascending"===o?e<t?-1:t<e?1:0:t<e?-1:e<t?1:0},this))},u.SortableTable.prototype.getCellValue=function(e){var t=(t=e.attr("data-sort-value"))||e.html();return t=s.isNumeric(t)?parseInt(t,10):t},u});
package/moj/init.js ADDED
@@ -0,0 +1,5 @@
1
+ if (window.GOVUKPrototypeKit && window.GOVUKPrototypeKit.documentReady) {
2
+ window.GOVUKPrototypeKit.documentReady(function () {
3
+ window.MOJFrontend.initAll();
4
+ });
5
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ministryofjustice/frontend",
3
3
  "description": "The MOJ Frontend contains the code you need to start building user interfaces for UK Ministry of Justice government services.",
4
- "version": "1.6.5",
4
+ "version": "1.6.6",
5
5
  "main": "moj/all.js",
6
6
  "sass": "moj/all.scss",
7
7
  "engines": {