@ministryofjustice/frontend 4.0.1 → 4.0.2
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.
- package/moj/all.jquery.min.js +1 -1
- package/moj/all.jquery.min.js.map +1 -1
- package/moj/all.js +58 -3
- package/moj/all.js.map +1 -1
- package/moj/components/sortable-table/_sortable-table.scss +3 -42
- package/moj/components/sortable-table/sortable-table.js +57 -2
- package/moj/components/sortable-table/sortable-table.js.map +1 -1
- package/moj/components/sortable-table/sortable-table.mjs +57 -2
- package/moj/components/sortable-table/sortable-table.mjs.map +1 -1
- package/moj/moj-frontend.min.css +1 -1
- package/moj/moj-frontend.min.css.map +1 -1
- package/moj/moj-frontend.min.js +1 -1
- package/moj/moj-frontend.min.js.map +1 -1
- package/package.json +1 -1
package/moj/all.jquery.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var n=[],o=Object.getPrototypeOf,i=n.slice,r=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},s=n.push,a=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,d=c.toString,p=d.call(Object),h={},f=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},g=function(t){return null!=t&&t===t.window},m=t.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function v(t,e,n){var o,i,r=(n=n||m).createElement("script");if(r.text=t,e)for(o in y)(i=e[o]||e.getAttribute&&e.getAttribute(o))&&r.setAttribute(o,i);n.head.appendChild(r).parentNode.removeChild(r)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?u[l.call(t)]||"object":typeof t}var x="3.7.1",k=/HTML$/i,w=function(t,e){return new w.fn.init(t,e)};function D(t){var e=!!t&&"length"in t&&t.length,n=b(t);return!f(t)&&!g(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function C(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return i.call(this)},get:function(t){return null==t?i.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=w.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return w.each(this,t)},map:function(t){return this.pushStack(w.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var t,e,n,o,i,r,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||f(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)o=t[e],"__proto__"!==e&&s!==o&&(l&&o&&(w.isPlainObject(o)||(i=Array.isArray(o)))?(n=s[e],r=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,s[e]=w.extend(l,r,o)):void 0!==o&&(s[e]=o));return s},w.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==l.call(t))&&(!(e=o(t))||"function"==typeof(n=c.call(e,"constructor")&&e.constructor)&&d.call(n)===p)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){v(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,o=0;if(D(t))for(n=t.length;o<n&&!1!==e.call(t[o],o,t[o]);o++);else for(o in t)if(!1===e.call(t[o],o,t[o]))break;return t},text:function(t){var e,n="",o=0,i=t.nodeType;if(!i)for(;e=t[o++];)n+=w.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(D(Object(t))?w.merge(n,"string"==typeof t?[t]:t):s.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:a.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!k.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,o=0,i=t.length;o<n;o++)t[i++]=e[o];return t.length=i,t},grep:function(t,e,n){for(var o=[],i=0,r=t.length,s=!n;i<r;i++)!e(t[i],i)!==s&&o.push(t[i]);return o},map:function(t,e,n){var o,i,s=0,a=[];if(D(t))for(o=t.length;s<o;s++)null!=(i=e(t[s],s,n))&&a.push(i);else for(s in t)null!=(i=e(t[s],s,n))&&a.push(i);return r(a)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){u["[object "+e+"]"]=e.toLowerCase()}));var T=n.pop,j=n.sort,$=n.splice,S="[\\x20\\t\\r\\n\\f]",E=new RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g");w.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var L=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function A(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}w.escapeSelector=function(t){return(t+"").replace(L,A)};var _=m,B=s;!function(){var e,o,r,s,u,l,d,p,f,g,m=B,y=w.expando,v=0,b=0,x=tt(),k=tt(),D=tt(),L=tt(),A=function(t,e){return t===e&&(u=!0),0},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="(?:\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\["+S+"*("+H+")(?:"+S+"*([*^$|!~]?=)"+S+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+H+"))|)"+S+"*\\]",q=":("+H+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",O=new RegExp(S+"+","g"),F=new RegExp("^"+S+"*,"+S+"*"),P=new RegExp("^"+S+"*([>+~]|"+S+")"+S+"*"),I=new RegExp(S+"|>"),R=new RegExp(q),W=new RegExp("^"+H+"$"),z={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),TAG:new RegExp("^("+H+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,X=/[+~]/,Z=new RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),K=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ut()},G=pt((function(t){return!0===t.disabled&&C(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(n=i.call(_.childNodes),_.childNodes),n[_.childNodes.length].nodeType}catch(bt){m={apply:function(t,e){B.apply(t,i.call(e))},call:function(t){B.apply(t,i.call(arguments,1))}}}function Q(t,e,n,o){var i,r,s,a,u,c,d,g=e&&e.ownerDocument,v=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==v&&9!==v&&11!==v)return n;if(!o&&(ut(e),e=e||l,p)){if(11!==v&&(u=V.exec(t)))if(i=u[1]){if(9===v){if(!(s=e.getElementById(i)))return n;if(s.id===i)return m.call(n,s),n}else if(g&&(s=g.getElementById(i))&&Q.contains(e,s)&&s.id===i)return m.call(n,s),n}else{if(u[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(L[t+" "]||f&&f.test(t))){if(d=t,g=e,1===v&&(I.test(t)||P.test(t))){for((g=X.test(t)&&at(e.parentNode)||e)==e&&h.scope||((a=e.getAttribute("id"))?a=w.escapeSelector(a):e.setAttribute("id",a=y)),r=(c=ct(t)).length;r--;)c[r]=(a?"#"+a:":scope")+" "+dt(c[r]);d=c.join(",")}try{return m.apply(n,g.querySelectorAll(d)),n}catch(b){L(t,!0)}finally{a===y&&e.removeAttribute("id")}}}return vt(t.replace(E,"$1"),e,n,o)}function tt(){var t=[];return function e(n,i){return t.push(n+" ")>o.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function et(t){return t[y]=!0,t}function nt(t){var e=l.createElement("fieldset");try{return!!t(e)}catch(bt){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ot(t){return function(e){return C(e,"input")&&e.type===t}}function it(t){return function(e){return(C(e,"input")||C(e,"button"))&&e.type===t}}function rt(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&&G(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function st(t){return et((function(e){return e=+e,et((function(n,o){for(var i,r=t([],n.length,e),s=r.length;s--;)n[i=r[s]]&&(n[i]=!(o[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var e,n=t?t.ownerDocument||t:_;return n!=l&&9===n.nodeType&&n.documentElement?(d=(l=n).documentElement,p=!w.isXMLDoc(l),g=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&_!=l&&(e=l.defaultView)&&e.top!==e&&e.addEventListener("unload",J),h.getById=nt((function(t){return d.appendChild(t).id=w.expando,!l.getElementsByName||!l.getElementsByName(w.expando).length})),h.disconnectedMatch=nt((function(t){return g.call(t,"*")})),h.scope=nt((function(){return l.querySelectorAll(":scope")})),h.cssHas=nt((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(bt){return!0}})),h.getById?(o.filter.ID=function(t){var e=t.replace(Z,K);return function(t){return t.getAttribute("id")===e}},o.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n=e.getElementById(t);return n?[n]:[]}}):(o.filter.ID=function(t){var e=t.replace(Z,K);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},o.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n,o,i,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(i=e.getElementsByName(t),o=0;r=i[o++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),o.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},o.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&p)return e.getElementsByClassName(t)},f=[],nt((function(t){var e;d.appendChild(t).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||f.push("\\["+S+"*(?:value|"+M+")"),t.querySelectorAll("[id~="+y+"-]").length||f.push("~="),t.querySelectorAll("a#"+y+"+*").length||f.push(".#.+[+~]"),t.querySelectorAll(":checked").length||f.push(":checked"),(e=l.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),(e=l.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||f.push("\\["+S+"*name"+S+"*="+S+"*(?:''|\"\")")})),h.cssHas||f.push(":has"),f=f.length&&new RegExp(f.join("|")),A=function(t,e){if(t===e)return u=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!h.sortDetached&&e.compareDocumentPosition(t)===n?t===l||t.ownerDocument==_&&Q.contains(_,t)?-1:e===l||e.ownerDocument==_&&Q.contains(_,e)?1:s?a.call(s,t)-a.call(s,e):0:4&n?-1:1)},l):l}for(e in Q.matches=function(t,e){return Q(t,null,null,e)},Q.matchesSelector=function(t,e){if(ut(t),p&&!L[e+" "]&&(!f||!f.test(e)))try{var n=g.call(t,e);if(n||h.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(bt){L(e,!0)}return Q(e,l,null,[t]).length>0},Q.contains=function(t,e){return(t.ownerDocument||t)!=l&&ut(t),w.contains(t,e)},Q.attr=function(t,e){(t.ownerDocument||t)!=l&&ut(t);var n=o.attrHandle[e.toLowerCase()],i=n&&c.call(o.attrHandle,e.toLowerCase())?n(t,e,!p):void 0;return void 0!==i?i:t.getAttribute(e)},Q.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},w.uniqueSort=function(t){var e,n=[],o=0,r=0;if(u=!h.sortStable,s=!h.sortStable&&i.call(t,0),j.call(t,A),u){for(;e=t[r++];)e===t[r]&&(o=n.push(r));for(;o--;)$.call(t,n[o],1)}return s=null,t},w.fn.uniqueSort=function(){return this.pushStack(w.uniqueSort(i.apply(this)))},o=w.expr={cacheLength:50,createPseudo:et,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,K),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,K),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Q.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Q.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return z.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&R.test(n)&&(e=ct(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Z,K).toLowerCase();return"*"===t?function(){return!0}:function(t){return C(t,e)}},CLASS:function(t){var e=x[t+" "];return e||(e=new RegExp("(^|"+S+")"+t+"("+S+"|$)"))&&x(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(o){var i=Q.attr(o,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(O," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,o,i){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===o&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,d,p,h,f=r!==s?"nextSibling":"previousSibling",g=e.parentNode,m=a&&e.nodeName.toLowerCase(),b=!u&&!a,x=!1;if(g){if(r){for(;f;){for(d=e;d=d[f];)if(a?C(d,m):1===d.nodeType)return!1;h=f="only"===t&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&b){for(x=(p=(l=(c=g[y]||(g[y]={}))[t]||[])[0]===v&&l[1])&&l[2],d=p&&g.childNodes[p];d=++p&&d&&d[f]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===e){c[t]=[v,p,x];break}}else if(b&&(x=p=(l=(c=e[y]||(e[y]={}))[t]||[])[0]===v&&l[1]),!1===x)for(;(d=++p&&d&&d[f]||(x=p=0)||h.pop())&&(!(a?C(d,m):1===d.nodeType)||!++x||(b&&((c=d[y]||(d[y]={}))[t]=[v,x]),d!==e)););return(x-=i)===o||x%o==0&&x/o>=0}}},PSEUDO:function(t,e){var n,i=o.pseudos[t]||o.setFilters[t.toLowerCase()]||Q.error("unsupported pseudo: "+t);return i[y]?i(e):i.length>1?(n=[t,t,"",e],o.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,n){for(var o,r=i(t,e),s=r.length;s--;)t[o=a.call(t,r[s])]=!(n[o]=r[s])})):function(t){return i(t,0,n)}):i}},pseudos:{not:et((function(t){var e=[],n=[],o=yt(t.replace(E,"$1"));return o[y]?et((function(t,e,n,i){for(var r,s=o(t,null,i,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))})):function(t,i,r){return e[0]=t,o(e,null,r,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Q(t,e).length>0}})),contains:et((function(t){return t=t.replace(Z,K),function(e){return(e.textContent||w.text(e)).indexOf(t)>-1}})),lang:et((function(t){return W.test(t||"")||Q.error("unsupported lang: "+t),t=t.replace(Z,K).toLowerCase(),function(e){var n;do{if(n=p?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===function(){try{return l.activeElement}catch(t){}}()&&l.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:rt(!1),disabled:rt(!0),checked:function(t){return C(t,"input")&&!!t.checked||C(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!o.pseudos.empty(t)},header:function(t){return Y.test(t.nodeName)},input:function(t){return U.test(t.nodeName)},button:function(t){return C(t,"input")&&"button"===t.type||C(t,"button")},text:function(t){var e;return C(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:st((function(){return[0]})),last:st((function(t,e){return[e-1]})),eq:st((function(t,e,n){return[n<0?n+e:n]})),even:st((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:st((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:st((function(t,e,n){var o;for(o=n<0?n+e:n>e?e:n;--o>=0;)t.push(o);return t})),gt:st((function(t,e,n){for(var o=n<0?n+e:n;++o<e;)t.push(o);return t}))}},o.pseudos.nth=o.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[e]=ot(e);for(e in{submit:!0,reset:!0})o.pseudos[e]=it(e);function lt(){}function ct(t,e){var n,i,r,s,a,u,l,c=k[t+" "];if(c)return e?0:c.slice(0);for(a=t,u=[],l=o.preFilter;a;){for(s in n&&!(i=F.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(r=[])),n=!1,(i=P.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(E," ")}),a=a.slice(n.length)),o.filter)!(i=z[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),r.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return e?a.length:a?Q.error(t):k(t,u).slice(0)}function dt(t){for(var e=0,n=t.length,o="";e<n;e++)o+=t[e].value;return o}function pt(t,e,n){var o=e.dir,i=e.next,r=i||o,s=n&&"parentNode"===r,a=b++;return e.first?function(e,n,i){for(;e=e[o];)if(1===e.nodeType||s)return t(e,n,i);return!1}:function(e,n,u){var l,c,d=[v,a];if(u){for(;e=e[o];)if((1===e.nodeType||s)&&t(e,n,u))return!0}else for(;e=e[o];)if(1===e.nodeType||s)if(c=e[y]||(e[y]={}),i&&C(e,i))e=e[o]||e;else{if((l=c[r])&&l[0]===v&&l[1]===a)return d[2]=l[2];if(c[r]=d,d[2]=t(e,n,u))return!0}return!1}}function ht(t){return t.length>1?function(e,n,o){for(var i=t.length;i--;)if(!t[i](e,n,o))return!1;return!0}:t[0]}function ft(t,e,n,o,i){for(var r,s=[],a=0,u=t.length,l=null!=e;a<u;a++)(r=t[a])&&(n&&!n(r,o,i)||(s.push(r),l&&e.push(a)));return s}function gt(t,e,n,o,i,r){return o&&!o[y]&&(o=gt(o)),i&&!i[y]&&(i=gt(i,r)),et((function(r,s,u,l){var c,d,p,h,f=[],g=[],y=s.length,v=r||function(t,e,n){for(var o=0,i=e.length;o<i;o++)Q(t,e[o],n);return n}(e||"*",u.nodeType?[u]:u,[]),b=!t||!r&&e?v:ft(v,f,t,u,l);if(n?n(b,h=i||(r?t:y||o)?[]:s,u,l):h=b,o)for(c=ft(h,g),o(c,[],u,l),d=c.length;d--;)(p=c[d])&&(h[g[d]]=!(b[g[d]]=p));if(r){if(i||t){if(i){for(c=[],d=h.length;d--;)(p=h[d])&&c.push(b[d]=p);i(null,h=[],c,l)}for(d=h.length;d--;)(p=h[d])&&(c=i?a.call(r,p):f[d])>-1&&(r[c]=!(s[c]=p))}}else h=ft(h===s?h.splice(y,h.length):h),i?i(null,s,h,l):m.apply(s,h)}))}function mt(t){for(var e,n,i,s=t.length,u=o.relative[t[0].type],l=u||o.relative[" "],c=u?1:0,d=pt((function(t){return t===e}),l,!0),p=pt((function(t){return a.call(e,t)>-1}),l,!0),h=[function(t,n,o){var i=!u&&(o||n!=r)||((e=n).nodeType?d(t,n,o):p(t,n,o));return e=null,i}];c<s;c++)if(n=o.relative[t[c].type])h=[pt(ht(h),n)];else{if((n=o.filter[t[c].type].apply(null,t[c].matches))[y]){for(i=++c;i<s&&!o.relative[t[i].type];i++);return gt(c>1&&ht(h),c>1&&dt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(E,"$1"),n,c<i&&mt(t.slice(c,i)),i<s&&mt(t=t.slice(i)),i<s&&dt(t))}h.push(n)}return ht(h)}function yt(t,e){var n,i=[],s=[],a=D[t+" "];if(!a){for(e||(e=ct(t)),n=e.length;n--;)(a=mt(e[n]))[y]?i.push(a):s.push(a);a=D(t,function(t,e){var n=e.length>0,i=t.length>0,s=function(s,a,u,c,d){var h,f,g,y=0,b="0",x=s&&[],k=[],D=r,C=s||i&&o.find.TAG("*",d),j=v+=null==D?1:Math.random()||.1,$=C.length;for(d&&(r=a==l||a||d);b!==$&&null!=(h=C[b]);b++){if(i&&h){for(f=0,a||h.ownerDocument==l||(ut(h),u=!p);g=t[f++];)if(g(h,a||l,u)){m.call(c,h);break}d&&(v=j)}n&&((h=!g&&h)&&y--,s&&x.push(h))}if(y+=b,n&&b!==y){for(f=0;g=e[f++];)g(x,k,a,u);if(s){if(y>0)for(;b--;)x[b]||k[b]||(k[b]=T.call(c));k=ft(k)}m.apply(c,k),d&&!s&&k.length>0&&y+e.length>1&&w.uniqueSort(c)}return d&&(v=j,r=D),x};return n?et(s):s}(s,i)),a.selector=t}return a}function vt(t,e,n,i){var r,s,a,u,l,c="function"==typeof t&&t,d=!i&&ct(t=c.selector||t);if(n=n||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===e.nodeType&&p&&o.relative[s[1].type]){if(!(e=(o.find.ID(a.matches[0].replace(Z,K),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(s.shift().value.length)}for(r=z.needsContext.test(t)?0:s.length;r--&&(a=s[r],!o.relative[u=a.type]);)if((l=o.find[u])&&(i=l(a.matches[0].replace(Z,K),X.test(s[0].type)&&at(e.parentNode)||e))){if(s.splice(r,1),!(t=i.length&&dt(s)))return m.apply(n,i),n;break}}return(c||yt(t,d))(i,e,!p,n,!e||X.test(t)&&at(e.parentNode)||e),n}lt.prototype=o.filters=o.pseudos,o.setFilters=new lt,h.sortStable=y.split("").sort(A).join("")===y,ut(),h.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(l.createElement("fieldset"))})),w.find=Q,w.expr[":"]=w.expr.pseudos,w.unique=w.uniqueSort,Q.compile=yt,Q.select=vt,Q.setDocument=ut,Q.tokenize=ct,Q.escape=w.escapeSelector,Q.getText=w.text,Q.isXML=w.isXMLDoc,Q.selectors=w.expr,Q.support=w.support,Q.uniqueSort=w.uniqueSort}();var M=function(t,e,n){for(var o=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&w(t).is(n))break;o.push(t)}return o},H=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},N=w.expr.match.needsContext,q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,e,n){return f(e)?w.grep(t,(function(t,o){return!!e.call(t,o,t)!==n})):e.nodeType?w.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?w.grep(t,(function(t){return a.call(e,t)>-1!==n})):w.filter(e,t,n)}w.filter=function(t,e,n){var o=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===o.nodeType?w.find.matchesSelector(o,t)?[o]:[]:w.find.matches(t,w.grep(e,(function(t){return 1===t.nodeType})))},w.fn.extend({find:function(t){var e,n,o=this.length,i=this;if("string"!=typeof t)return this.pushStack(w(t).filter((function(){for(e=0;e<o;e++)if(w.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<o;e++)w.find(t,i[e],n);return o>1?w.uniqueSort(n):n},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&N.test(t)?w(t):t||[],!1).length}});var F,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(t,e,n){var o,i;if(!t)return this;if(n=n||F,"string"==typeof t){if(!(o="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!o[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(o[1]){if(e=e instanceof w?e[0]:e,w.merge(this,w.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:m,!0)),q.test(o[1])&&w.isPlainObject(e))for(o in e)f(this[o])?this[o](e[o]):this.attr(o,e[o]);return this}return(i=m.getElementById(o[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):f(t)?void 0!==n.ready?n.ready(t):t(w):w.makeArray(t,this)}).prototype=w.fn,F=w(m);var I=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function W(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}w.fn.extend({has:function(t){var e=w(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(w.contains(this,e[t]))return!0}))},closest:function(t,e){var n,o=0,i=this.length,r=[],s="string"!=typeof t&&w(t);if(!N.test(t))for(;o<i;o++)for(n=this[o];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?w.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?a.call(w(t),this[0]):a.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),w.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return M(t,"parentNode")},parentsUntil:function(t,e,n){return M(t,"parentNode",n)},next:function(t){return W(t,"nextSibling")},prev:function(t){return W(t,"previousSibling")},nextAll:function(t){return M(t,"nextSibling")},prevAll:function(t){return M(t,"previousSibling")},nextUntil:function(t,e,n){return M(t,"nextSibling",n)},prevUntil:function(t,e,n){return M(t,"previousSibling",n)},siblings:function(t){return H((t.parentNode||{}).firstChild,t)},children:function(t){return H(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(C(t,"template")&&(t=t.content||t),w.merge([],t.childNodes))}},(function(t,e){w.fn[t]=function(n,o){var i=w.map(this,e,n);return"Until"!==t.slice(-5)&&(o=n),o&&"string"==typeof o&&(i=w.filter(o,i)),this.length>1&&(R[t]||w.uniqueSort(i),I.test(t)&&i.reverse()),this.pushStack(i)}}));var z=/[^\x20\t\r\n\f]+/g;function U(t){return t}function Y(t){throw t}function V(t,e,n,o){var i;try{t&&f(i=t.promise)?i.call(t).done(e).fail(n):t&&f(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(o))}catch(t){n.apply(void 0,[t])}}w.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return w.each(t.match(z)||[],(function(t,n){e[n]=!0})),e}(t):w.extend({},t);var e,n,o,i,r=[],s=[],a=-1,u=function(){for(i=i||t.once,o=e=!0;s.length;a=-1)for(n=s.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=r.length,n=!1);t.memory||(n=!1),e=!1,i&&(r=n?[]:"")},l={add:function(){return r&&(n&&!e&&(a=r.length-1,s.push(n)),function e(n){w.each(n,(function(n,o){f(o)?t.unique&&l.has(o)||r.push(o):o&&o.length&&"string"!==b(o)&&e(o)}))}(arguments),n&&!e&&u()),this},remove:function(){return w.each(arguments,(function(t,e){for(var n;(n=w.inArray(e,r,n))>-1;)r.splice(n,1),n<=a&&a--})),this},has:function(t){return t?w.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return i=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return i=s=[],n||e||(r=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!o}};return l},w.extend({Deferred:function(e){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],o="pending",i={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return w.Deferred((function(e){w.each(n,(function(n,o){var i=f(t[o[4]])&&t[o[4]];r[o[1]]((function(){var t=i&&i.apply(this,arguments);t&&f(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[o[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(e,o,i){var r=0;function s(e,n,o,i){return function(){var a=this,u=arguments,l=function(){var t,l;if(!(e<r)){if((t=o.apply(a,u))===n.promise())throw new TypeError("Thenable self-resolution");l=t&&("object"==typeof t||"function"==typeof t)&&t.then,f(l)?i?l.call(t,s(r,n,U,i),s(r,n,Y,i)):(r++,l.call(t,s(r,n,U,i),s(r,n,Y,i),s(r,n,U,n.notifyWith))):(o!==U&&(a=void 0,u=[t]),(i||n.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(t){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(t,c.error),e+1>=r&&(o!==Y&&(a=void 0,u=[t]),n.rejectWith(a,u))}};e?c():(w.Deferred.getErrorHook?c.error=w.Deferred.getErrorHook():w.Deferred.getStackHook&&(c.error=w.Deferred.getStackHook()),t.setTimeout(c))}}return w.Deferred((function(t){n[0][3].add(s(0,t,f(i)?i:U,t.notifyWith)),n[1][3].add(s(0,t,f(e)?e:U)),n[2][3].add(s(0,t,f(o)?o:Y))})).promise()},promise:function(t){return null!=t?w.extend(t,i):i}},r={};return w.each(n,(function(t,e){var s=e[2],a=e[5];i[e[1]]=s.add,a&&s.add((function(){o=a}),n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),s.add(e[3].fire),r[e[0]]=function(){return r[e[0]+"With"](this===r?void 0:this,arguments),this},r[e[0]+"With"]=s.fireWith})),i.promise(r),e&&e.call(r,r),r},when:function(t){var e=arguments.length,n=e,o=Array(n),r=i.call(arguments),s=w.Deferred(),a=function(t){return function(n){o[t]=this,r[t]=arguments.length>1?i.call(arguments):n,--e||s.resolveWith(o,r)}};if(e<=1&&(V(t,s.done(a(n)).resolve,s.reject,!e),"pending"===s.state()||f(r[n]&&r[n].then)))return s.then();for(;n--;)V(r[n],a(n),s.reject);return s.promise()}});var X=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&X.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},w.readyException=function(e){t.setTimeout((function(){throw e}))};var Z=w.Deferred();function K(){m.removeEventListener("DOMContentLoaded",K),t.removeEventListener("load",K),w.ready()}w.fn.ready=function(t){return Z.then(t).catch((function(t){w.readyException(t)})),this},w.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==t&&--w.readyWait>0||Z.resolveWith(m,[w]))}}),w.ready.then=Z.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?t.setTimeout(w.ready):(m.addEventListener("DOMContentLoaded",K),t.addEventListener("load",K));var J=function(t,e,n,o,i,r,s){var a=0,u=t.length,l=null==n;if("object"===b(n))for(a in i=!0,n)J(t,e,a,n[a],!0,r,s);else if(void 0!==o&&(i=!0,f(o)||(s=!0),l&&(s?(e.call(t,o),e=null):(l=e,e=function(t,e,n){return l.call(w(t),n)})),e))for(;a<u;a++)e(t[a],n,s?o:o.call(t[a],a,e(t[a],n)));return i?t:l?e.call(t):u?e(t[0],n):r},G=/^-ms-/,Q=/-([a-z])/g;function tt(t,e){return e.toUpperCase()}function et(t){return t.replace(G,"ms-").replace(Q,tt)}var nt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=w.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},nt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var o,i=this.cache(t);if("string"==typeof e)i[et(e)]=n;else for(o in e)i[et(o)]=e[o];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][et(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,o=t[this.expando];if(void 0!==o){if(void 0!==e){n=(e=Array.isArray(e)?e.map(et):(e=et(e))in o?[e]:e.match(z)||[]).length;for(;n--;)delete o[e[n]]}(void 0===e||w.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!w.isEmptyObject(e)}};var it=new ot,rt=new ot,st=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,at=/[A-Z]/g;function ut(t,e,n){var o;if(void 0===n&&1===t.nodeType)if(o="data-"+e.replace(at,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(o))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:st.test(t)?JSON.parse(t):t)}(n)}catch(i){}rt.set(t,e,n)}else n=void 0;return n}w.extend({hasData:function(t){return rt.hasData(t)||it.hasData(t)},data:function(t,e,n){return rt.access(t,e,n)},removeData:function(t,e){rt.remove(t,e)},_data:function(t,e,n){return it.access(t,e,n)},_removeData:function(t,e){it.remove(t,e)}}),w.fn.extend({data:function(t,e){var n,o,i,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(i=rt.get(r),1===r.nodeType&&!it.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(o=s[n].name).indexOf("data-")&&(o=et(o.slice(5)),ut(r,o,i[o]));it.set(r,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){rt.set(this,t)})):J(this,(function(e){var n;if(r&&void 0===e)return void 0!==(n=rt.get(r,t))||void 0!==(n=ut(r,t))?n:void 0;this.each((function(){rt.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){rt.remove(this,t)}))}}),w.extend({queue:function(t,e,n){var o;if(t)return e=(e||"fx")+"queue",o=it.get(t,e),n&&(!o||Array.isArray(n)?o=it.access(t,e,w.makeArray(n)):o.push(n)),o||[]},dequeue:function(t,e){e=e||"fx";var n=w.queue(t,e),o=n.length,i=n.shift(),r=w._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===e&&n.unshift("inprogress"),delete r.stop,i.call(t,(function(){w.dequeue(t,e)}),r)),!o&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return it.get(t,n)||it.access(t,n,{empty:w.Callbacks("once memory").add((function(){it.remove(t,[e+"queue",n])}))})}}),w.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?w.queue(this[0],t):void 0===e?this:this.each((function(){var n=w.queue(this,t,e);w._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&w.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){w.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,o=1,i=w.Deferred(),r=this,s=this.length,a=function(){--o||i.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=it.get(r[s],t+"queueHooks"))&&n.empty&&(o++,n.empty.add(a));return a(),i.promise(e)}});var lt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ct=new RegExp("^(?:([+-])=|)("+lt+")([a-z%]*)$","i"),dt=["Top","Right","Bottom","Left"],pt=m.documentElement,ht=function(t){return w.contains(t.ownerDocument,t)},ft={composed:!0};pt.getRootNode&&(ht=function(t){return w.contains(t.ownerDocument,t)||t.getRootNode(ft)===t.ownerDocument});var gt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ht(t)&&"none"===w.css(t,"display")};function mt(t,e,n,o){var i,r,s=20,a=o?function(){return o.cur()}:function(){return w.css(t,e,"")},u=a(),l=n&&n[3]||(w.cssNumber[e]?"":"px"),c=t.nodeType&&(w.cssNumber[e]||"px"!==l&&+u)&&ct.exec(w.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)w.style(t,e,c+l),(1-r)*(1-(r=a()/u||.5))<=0&&(s=0),c/=r;c*=2,w.style(t,e,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],o&&(o.unit=l,o.start=c,o.end=i)),i}var yt={};function vt(t){var e,n=t.ownerDocument,o=t.nodeName,i=yt[o];return i||(e=n.body.appendChild(n.createElement(o)),i=w.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),yt[o]=i,i)}function bt(t,e){for(var n,o,i=[],r=0,s=t.length;r<s;r++)(o=t[r]).style&&(n=o.style.display,e?("none"===n&&(i[r]=it.get(o,"display")||null,i[r]||(o.style.display="")),""===o.style.display&>(o)&&(i[r]=vt(o))):"none"!==n&&(i[r]="none",it.set(o,"display",n)));for(r=0;r<s;r++)null!=i[r]&&(t[r].style.display=i[r]);return t}w.fn.extend({show:function(){return bt(this,!0)},hide:function(){return bt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){gt(this)?w(this).show():w(this).hide()}))}});var xt,kt,wt=/^(?:checkbox|radio)$/i,Dt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ct=/^$|^module$|\/(?:java|ecma)script/i;xt=m.createDocumentFragment().appendChild(m.createElement("div")),(kt=m.createElement("input")).setAttribute("type","radio"),kt.setAttribute("checked","checked"),kt.setAttribute("name","t"),xt.appendChild(kt),h.checkClone=xt.cloneNode(!0).cloneNode(!0).lastChild.checked,xt.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!xt.cloneNode(!0).lastChild.defaultValue,xt.innerHTML="<option></option>",h.option=!!xt.lastChild;var Tt={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 jt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&C(t,e)?w.merge([t],n):n}function $t(t,e){for(var n=0,o=t.length;n<o;n++)it.set(t[n],"globalEval",!e||it.get(e[n],"globalEval"))}Tt.tbody=Tt.tfoot=Tt.colgroup=Tt.caption=Tt.thead,Tt.th=Tt.td,h.option||(Tt.optgroup=Tt.option=[1,"<select multiple='multiple'>","</select>"]);var St=/<|&#?\w+;/;function Et(t,e,n,o,i){for(var r,s,a,u,l,c,d=e.createDocumentFragment(),p=[],h=0,f=t.length;h<f;h++)if((r=t[h])||0===r)if("object"===b(r))w.merge(p,r.nodeType?[r]:r);else if(St.test(r)){for(s=s||d.appendChild(e.createElement("div")),a=(Dt.exec(r)||["",""])[1].toLowerCase(),u=Tt[a]||Tt._default,s.innerHTML=u[1]+w.htmlPrefilter(r)+u[2],c=u[0];c--;)s=s.lastChild;w.merge(p,s.childNodes),(s=d.firstChild).textContent=""}else p.push(e.createTextNode(r));for(d.textContent="",h=0;r=p[h++];)if(o&&w.inArray(r,o)>-1)i&&i.push(r);else if(l=ht(r),s=jt(d.appendChild(r),"script"),l&&$t(s),n)for(c=0;r=s[c++];)Ct.test(r.type||"")&&n.push(r);return d}var Lt=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function _t(){return!1}function Bt(t,e,n,o,i,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(o=o||n,n=void 0),e)Bt(t,a,n,o,e[a],r);return t}if(null==o&&null==i?(i=n,o=n=void 0):null==i&&("string"==typeof n?(i=o,o=void 0):(i=o,o=n,n=void 0)),!1===i)i=_t;else if(!i)return t;return 1===r&&(s=i,i=function(t){return w().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=w.guid++)),t.each((function(){w.event.add(this,e,i,o,n)}))}function Mt(t,e,n){n?(it.set(t,e,!1),w.event.add(t,e,{namespace:!1,handler:function(t){var n,o=it.get(this,e);if(1&t.isTrigger&&this[e]){if(o)(w.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=i.call(arguments),it.set(this,e,o),this[e](),n=it.get(this,e),it.set(this,e,!1),o!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else o&&(it.set(this,e,w.event.trigger(o[0],o.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=At)}})):void 0===it.get(t,e)&&w.event.add(t,e,At)}w.event={global:{},add:function(t,e,n,o,i){var r,s,a,u,l,c,d,p,h,f,g,m=it.get(t);if(nt(t))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&w.find.matchesSelector(pt,i),n.guid||(n.guid=w.guid++),(u=m.events)||(u=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(z)||[""]).length;l--;)h=g=(a=Lt.exec(e[l])||[])[1],f=(a[2]||"").split(".").sort(),h&&(d=w.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=w.event.special[h]||{},c=w.extend({type:h,origType:g,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:f.join(".")},r),(p=u[h])||((p=u[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,o,f,s)||t.addEventListener&&t.addEventListener(h,s)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[h]=!0)},remove:function(t,e,n,o,i){var r,s,a,u,l,c,d,p,h,f,g,m=it.hasData(t)&&it.get(t);if(m&&(u=m.events)){for(l=(e=(e||"").match(z)||[""]).length;l--;)if(h=g=(a=Lt.exec(e[l])||[])[1],f=(a[2]||"").split(".").sort(),h){for(d=w.event.special[h]||{},p=u[h=(o?d.delegateType:d.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=p.length;r--;)c=p[r],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||o&&o!==c.selector&&("**"!==o||!c.selector)||(p.splice(r,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(t,c));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,m.handle)||w.removeEvent(t,h,m.handle),delete u[h])}else for(h in u)w.event.remove(t,h+e[l],n,o,!0);w.isEmptyObject(u)&&it.remove(t,"handle events")}},dispatch:function(t){var e,n,o,i,r,s,a=new Array(arguments.length),u=w.event.fix(t),l=(it.get(this,"events")||Object.create(null))[u.type]||[],c=w.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(s=w.event.handlers.call(this,u,l),e=0;(i=s[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(r=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==r.namespace&&!u.rnamespace.test(r.namespace)||(u.handleObj=r,u.data=r.data,void 0!==(o=((w.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,a))&&!1===(u.result=o)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,o,i,r,s,a=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(r=[],s={},n=0;n<u;n++)void 0===s[i=(o=e[n]).selector+" "]&&(s[i]=o.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),s[i]&&r.push(o);r.length&&a.push({elem:l,handlers:r})}return l=this,u<e.length&&a.push({elem:l,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(w.Event.prototype,t,{enumerable:!0,configurable:!0,get:f(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(t){return t[w.expando]?t:new w.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return wt.test(e.type)&&e.click&&C(e,"input")&&Mt(e,"click",!0),!1},trigger:function(t){var e=this||t;return wt.test(e.type)&&e.click&&C(e,"input")&&Mt(e,"click"),!0},_default:function(t){var e=t.target;return wt.test(e.type)&&e.click&&C(e,"input")&&it.get(e,"click")||C(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},w.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},w.Event=function(t,e){if(!(this instanceof w.Event))return new w.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?At:_t,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&w.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:_t,isPropagationStopped:_t,isImmediatePropagationStopped:_t,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=At,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=At,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=At,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},w.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},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(m.documentMode){var n=it.get(this,"handle"),o=w.event.fix(t);o.type="focusin"===t.type?"focus":"blur",o.isSimulated=!0,n(t),o.target===o.currentTarget&&n(o)}else w.event.simulate(e,t.target,w.event.fix(t))}w.event.special[t]={setup:function(){var o;if(Mt(this,t,!0),!m.documentMode)return!1;(o=it.get(this,e))||this.addEventListener(e,n),it.set(this,e,(o||0)+1)},trigger:function(){return Mt(this,t),!0},teardown:function(){var t;if(!m.documentMode)return!1;(t=it.get(this,e)-1)?it.set(this,e,t):(this.removeEventListener(e,n),it.remove(this,e))},_default:function(e){return it.get(e.target,t)},delegateType:e},w.event.special[e]={setup:function(){var o=this.ownerDocument||this.document||this,i=m.documentMode?this:o,r=it.get(i,e);r||(m.documentMode?this.addEventListener(e,n):o.addEventListener(t,n,!0)),it.set(i,e,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this.document||this,i=m.documentMode?this:o,r=it.get(i,e)-1;r?it.set(i,e,r):(m.documentMode?this.removeEventListener(e,n):o.removeEventListener(t,n,!0),it.remove(i,e))}}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){w.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,o=t.relatedTarget,i=t.handleObj;return o&&(o===this||w.contains(this,o))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),w.fn.extend({on:function(t,e,n,o){return Bt(this,t,e,n,o)},one:function(t,e,n,o){return Bt(this,t,e,n,o,1)},off:function(t,e,n){var o,i;if(t&&t.preventDefault&&t.handleObj)return o=t.handleObj,w(t.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=_t),this.each((function(){w.event.remove(this,t,n,e)}))}});var Ht=/<script|<style|<link/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,qt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ot(t,e){return C(t,"table")&&C(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Ft(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Pt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function It(t,e){var n,o,i,r,s,a;if(1===e.nodeType){if(it.hasData(t)&&(a=it.get(t).events))for(i in it.remove(e,"handle events"),a)for(n=0,o=a[i].length;n<o;n++)w.event.add(e,i,a[i][n]);rt.hasData(t)&&(r=rt.access(t),s=w.extend({},r),rt.set(e,s))}}function Rt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&wt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Wt(t,e,n,o){e=r(e);var i,s,a,u,l,c,d=0,p=t.length,g=p-1,m=e[0],y=f(m);if(y||p>1&&"string"==typeof m&&!h.checkClone&&Nt.test(m))return t.each((function(i){var r=t.eq(i);y&&(e[0]=m.call(this,i,r.html())),Wt(r,e,n,o)}));if(p&&(s=(i=Et(e,t[0].ownerDocument,!1,t,o)).firstChild,1===i.childNodes.length&&(i=s),s||o)){for(u=(a=w.map(jt(i,"script"),Ft)).length;d<p;d++)l=i,d!==g&&(l=w.clone(l,!0,!0),u&&w.merge(a,jt(l,"script"))),n.call(t[d],l,d);if(u)for(c=a[a.length-1].ownerDocument,w.map(a,Pt),d=0;d<u;d++)l=a[d],Ct.test(l.type||"")&&!it.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&!l.noModule&&w._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):v(l.textContent.replace(qt,""),l,c))}return t}function zt(t,e,n){for(var o,i=e?w.filter(e,t):t,r=0;null!=(o=i[r]);r++)n||1!==o.nodeType||w.cleanData(jt(o)),o.parentNode&&(n&&ht(o)&&$t(jt(o,"script")),o.parentNode.removeChild(o));return t}w.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var o,i,r,s,a=t.cloneNode(!0),u=ht(t);if(!(h.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||w.isXMLDoc(t)))for(s=jt(a),o=0,i=(r=jt(t)).length;o<i;o++)Rt(r[o],s[o]);if(e)if(n)for(r=r||jt(t),s=s||jt(a),o=0,i=r.length;o<i;o++)It(r[o],s[o]);else It(t,a);return(s=jt(a,"script")).length>0&&$t(s,!u&&jt(t,"script")),a},cleanData:function(t){for(var e,n,o,i=w.event.special,r=0;void 0!==(n=t[r]);r++)if(nt(n)){if(e=n[it.expando]){if(e.events)for(o in e.events)i[o]?w.event.remove(n,o):w.removeEvent(n,o,e.handle);n[it.expando]=void 0}n[rt.expando]&&(n[rt.expando]=void 0)}}}),w.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return J(this,(function(t){return void 0===t?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Wt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ot(this,t).appendChild(t)}))},prepend:function(){return Wt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ot(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(w.cleanData(jt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return w.clone(this,t,e)}))},html:function(t){return J(this,(function(t){var e=this[0]||{},n=0,o=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ht.test(t)&&!Tt[(Dt.exec(t)||["",""])[1].toLowerCase()]){t=w.htmlPrefilter(t);try{for(;n<o;n++)1===(e=this[n]||{}).nodeType&&(w.cleanData(jt(e,!1)),e.innerHTML=t);e=0}catch(i){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Wt(this,arguments,(function(e){var n=this.parentNode;w.inArray(this,t)<0&&(w.cleanData(jt(this)),n&&n.replaceChild(e,this))}),t)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){w.fn[t]=function(t){for(var n,o=[],i=w(t),r=i.length-1,a=0;a<=r;a++)n=a===r?this:this.clone(!0),w(i[a])[e](n),s.apply(o,n.get());return this.pushStack(o)}}));var Ut=new RegExp("^("+lt+")(?!px)[a-z%]+$","i"),Yt=/^--/,Vt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Xt=function(t,e,n){var o,i,r={};for(i in e)r[i]=t.style[i],t.style[i]=e[i];for(i in o=n.call(t),e)t.style[i]=r[i];return o},Zt=new RegExp(dt.join("|"),"i");function Kt(t,e,n){var o,i,r,s,a=Yt.test(e),u=t.style;return(n=n||Vt(t))&&(s=n.getPropertyValue(e)||n[e],a&&s&&(s=s.replace(E,"$1")||void 0),""!==s||ht(t)||(s=w.style(t,e)),!h.pixelBoxStyles()&&Ut.test(s)&&Zt.test(e)&&(o=u.width,i=u.minWidth,r=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=o,u.minWidth=i,u.maxWidth=r)),void 0!==s?s+"":s}function Jt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",pt.appendChild(l).appendChild(c);var e=t.getComputedStyle(c);o="1%"!==e.top,u=12===n(e.marginLeft),c.style.right="60%",s=36===n(e.right),i=36===n(e.width),c.style.position="absolute",r=12===n(c.offsetWidth/3),pt.removeChild(l),c=null}}function n(t){return Math.round(parseFloat(t))}var o,i,r,s,a,u,l=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),o},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),r},reliableTrDimensions:function(){var e,n,o,i;return null==a&&(e=m.createElement("table"),n=m.createElement("tr"),o=m.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",o.style.height="9px",o.style.display="block",pt.appendChild(e).appendChild(n).appendChild(o),i=t.getComputedStyle(n),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,pt.removeChild(e)),a}}))}();var Gt=["Webkit","Moz","ms"],Qt=m.createElement("div").style,te={};function ee(t){var e=w.cssProps[t]||te[t];return e||(t in Qt?t:te[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Gt.length;n--;)if((t=Gt[n]+e)in Qt)return t}(t)||t)}var ne=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},ie={letterSpacing:"0",fontWeight:"400"};function re(t,e,n){var o=ct.exec(e);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):e}function se(t,e,n,o,i,r){var s="width"===e?1:0,a=0,u=0,l=0;if(n===(o?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=w.css(t,n+dt[s],!0,i)),o?("content"===n&&(u-=w.css(t,"padding"+dt[s],!0,i)),"margin"!==n&&(u-=w.css(t,"border"+dt[s]+"Width",!0,i))):(u+=w.css(t,"padding"+dt[s],!0,i),"padding"!==n?u+=w.css(t,"border"+dt[s]+"Width",!0,i):a+=w.css(t,"border"+dt[s]+"Width",!0,i));return!o&&r>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-u-a-.5))||0),u+l}function ae(t,e,n){var o=Vt(t),i=(!h.boxSizingReliable()||n)&&"border-box"===w.css(t,"boxSizing",!1,o),r=i,s=Kt(t,e,o),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ut.test(s)){if(!n)return s;s="auto"}return(!h.boxSizingReliable()&&i||!h.reliableTrDimensions()&&C(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===w.css(t,"display",!1,o))&&t.getClientRects().length&&(i="border-box"===w.css(t,"boxSizing",!1,o),(r=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+se(t,e,n||(i?"border":"content"),r,o,s)+"px"}function ue(t,e,n,o,i){return new ue.prototype.init(t,e,n,o,i)}w.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Kt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,o){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,r,s,a=et(e),u=Yt.test(e),l=t.style;if(u||(e=ee(a)),s=w.cssHooks[e]||w.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(t,!1,o))?i:l[e];"string"===(r=typeof n)&&(i=ct.exec(n))&&i[1]&&(n=mt(t,e,i),r="number"),null!=n&&n==n&&("number"!==r||u||(n+=i&&i[3]||(w.cssNumber[a]?"":"px")),h.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,o))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,o){var i,r,s,a=et(e);return Yt.test(e)||(e=ee(a)),(s=w.cssHooks[e]||w.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Kt(t,e,o)),"normal"===i&&e in ie&&(i=ie[e]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),w.each(["height","width"],(function(t,e){w.cssHooks[e]={get:function(t,n,o){if(n)return!ne.test(w.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ae(t,e,o):Xt(t,oe,(function(){return ae(t,e,o)}))},set:function(t,n,o){var i,r=Vt(t),s=!h.scrollboxSize()&&"absolute"===r.position,a=(s||o)&&"border-box"===w.css(t,"boxSizing",!1,r),u=o?se(t,e,o,a,r):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-se(t,e,"border",!1,r)-.5)),u&&(i=ct.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=w.css(t,e)),re(0,n,u)}}})),w.cssHooks.marginLeft=Jt(h.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Kt(t,"marginLeft"))||t.getBoundingClientRect().left-Xt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(t,e){w.cssHooks[t+e]={expand:function(n){for(var o=0,i={},r="string"==typeof n?n.split(" "):[n];o<4;o++)i[t+dt[o]+e]=r[o]||r[o-2]||r[0];return i}},"margin"!==t&&(w.cssHooks[t+e].set=re)})),w.fn.extend({css:function(t,e){return J(this,(function(t,e,n){var o,i,r={},s=0;if(Array.isArray(e)){for(o=Vt(t),i=e.length;s<i;s++)r[e[s]]=w.css(t,e[s],!1,o);return r}return void 0!==n?w.style(t,e,n):w.css(t,e)}),t,e,arguments.length>1)}}),w.Tween=ue,ue.prototype={constructor:ue,init:function(t,e,n,o,i,r){this.elem=t,this.prop=n,this.easing=i||w.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=o,this.unit=r||(w.cssNumber[n]?"":"px")},cur:function(){var t=ue.propHooks[this.prop];return t&&t.get?t.get(this):ue.propHooks._default.get(this)},run:function(t){var e,n=ue.propHooks[this.prop];return this.options.duration?this.pos=e=w.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ue.propHooks._default.set(this),this}},ue.prototype.init.prototype=ue.prototype,ue.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=w.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){w.fx.step[t.prop]?w.fx.step[t.prop](t):1!==t.elem.nodeType||!w.cssHooks[t.prop]&&null==t.elem.style[ee(t.prop)]?t.elem[t.prop]=t.now:w.style(t.elem,t.prop,t.now+t.unit)}}},ue.propHooks.scrollTop=ue.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},w.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},w.fx=ue.prototype.init,w.fx.step={};var le,ce,de=/^(?:toggle|show|hide)$/,pe=/queueHooks$/;function he(){ce&&(!1===m.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(he):t.setTimeout(he,w.fx.interval),w.fx.tick())}function fe(){return t.setTimeout((function(){le=void 0})),le=Date.now()}function ge(t,e){var n,o=0,i={height:t};for(e=e?1:0;o<4;o+=2-e)i["margin"+(n=dt[o])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function me(t,e,n){for(var o,i=(ye.tweeners[e]||[]).concat(ye.tweeners["*"]),r=0,s=i.length;r<s;r++)if(o=i[r].call(n,e,t))return o}function ye(t,e,n){var o,i,r=0,s=ye.prefilters.length,a=w.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=le||fe(),n=Math.max(0,l.startTime+l.duration-e),o=1-(n/l.duration||0),r=0,s=l.tweens.length;r<s;r++)l.tweens[r].run(o);return a.notifyWith(t,[l,o,n]),o<1&&s?n:(s||a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:w.extend({},e),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:e,originalOptions:n,startTime:le||fe(),duration:n.duration,tweens:[],createTween:function(e,n){var o=w.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(o),o},stop:function(e){var n=0,o=e?l.tweens.length:0;if(i)return this;for(i=!0;n<o;n++)l.tweens[n].run(1);return e?(a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l,e])):a.rejectWith(t,[l,e]),this}}),c=l.props;for(!function(t,e){var n,o,i,r,s;for(n in t)if(i=e[o=et(n)],r=t[n],Array.isArray(r)&&(i=r[1],r=t[n]=r[0]),n!==o&&(t[o]=r,delete t[n]),(s=w.cssHooks[o])&&"expand"in s)for(n in r=s.expand(r),delete t[o],r)n in t||(t[n]=r[n],e[n]=i);else e[o]=i}(c,l.opts.specialEasing);r<s;r++)if(o=ye.prefilters[r].call(l,t,c,l.opts))return f(o.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=o.stop.bind(o)),o;return w.map(c,me,l),f(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(ye,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return mt(n.elem,t,ct.exec(e),n),n}]},tweener:function(t,e){f(t)?(e=t,t=["*"]):t=t.match(z);for(var n,o=0,i=t.length;o<i;o++)n=t[o],ye.tweeners[n]=ye.tweeners[n]||[],ye.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var o,i,r,s,a,u,l,c,d="width"in e||"height"in e,p=this,h={},f=t.style,g=t.nodeType&>(t),m=it.get(t,"fxshow");for(o in n.queue||(null==(s=w._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always((function(){p.always((function(){s.unqueued--,w.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[o],de.test(i)){if(delete e[o],r=r||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[o])continue;g=!0}h[o]=m&&m[o]||w.style(t,o)}if((u=!w.isEmptyObject(e))||!w.isEmptyObject(h))for(o in d&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=m&&m.display)&&(l=it.get(t,"display")),"none"===(c=w.css(t,"display"))&&(l?c=l:(bt([t],!0),l=t.style.display||l,c=w.css(t,"display"),bt([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(t,"float")&&(u||(p.done((function(){f.display=l})),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",p.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),u=!1,h)u||(m?"hidden"in m&&(g=m.hidden):m=it.access(t,"fxshow",{display:l}),r&&(m.hidden=!g),g&&bt([t],!0),p.done((function(){for(o in g||bt([t]),it.remove(t,"fxshow"),h)w.style(t,o,h[o])}))),u=me(g?m[o]:0,o,p),o in m||(m[o]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?ye.prefilters.unshift(t):ye.prefilters.push(t)}}),w.speed=function(t,e,n){var o=t&&"object"==typeof t?w.extend({},t):{complete:n||!n&&e||f(t)&&t,duration:t,easing:n&&e||e&&!f(e)&&e};return w.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in w.fx.speeds?o.duration=w.fx.speeds[o.duration]:o.duration=w.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){f(o.old)&&o.old.call(this),o.queue&&w.dequeue(this,o.queue)},o},w.fn.extend({fadeTo:function(t,e,n,o){return this.filter(gt).css("opacity",0).show().end().animate({opacity:e},t,n,o)},animate:function(t,e,n,o){var i=w.isEmptyObject(t),r=w.speed(e,n,o),s=function(){var e=ye(this,w.extend({},t),r);(i||it.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var o=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",r=w.timers,s=it.get(this);if(i)s[i]&&s[i].stop&&o(s[i]);else for(i in s)s[i]&&s[i].stop&&pe.test(i)&&o(s[i]);for(i=r.length;i--;)r[i].elem!==this||null!=t&&r[i].queue!==t||(r[i].anim.stop(n),e=!1,r.splice(i,1));!e&&n||w.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=it.get(this),o=n[t+"queue"],i=n[t+"queueHooks"],r=w.timers,s=o?o.length:0;for(n.finish=!0,w.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)o[e]&&o[e].finish&&o[e].finish.call(this);delete n.finish}))}}),w.each(["toggle","show","hide"],(function(t,e){var n=w.fn[e];w.fn[e]=function(t,o,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ge(e,!0),t,o,i)}})),w.each({slideDown:ge("show"),slideUp:ge("hide"),slideToggle:ge("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){w.fn[t]=function(t,n,o){return this.animate(e,t,n,o)}})),w.timers=[],w.fx.tick=function(){var t,e=0,n=w.timers;for(le=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||w.fx.stop(),le=void 0},w.fx.timer=function(t){w.timers.push(t),w.fx.start()},w.fx.interval=13,w.fx.start=function(){ce||(ce=!0,he())},w.fx.stop=function(){ce=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(e,n){return e=w.fx&&w.fx.speeds[e]||e,n=n||"fx",this.queue(n,(function(n,o){var i=t.setTimeout(n,e);o.stop=function(){t.clearTimeout(i)}}))},function(){var t=m.createElement("input"),e=m.createElement("select").appendChild(m.createElement("option"));t.type="checkbox",h.checkOn=""!==t.value,h.optSelected=e.selected,(t=m.createElement("input")).value="t",t.type="radio",h.radioValue="t"===t.value}();var ve,be=w.expr.attrHandle;w.fn.extend({attr:function(t,e){return J(this,w.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){w.removeAttr(this,t)}))}}),w.extend({attr:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?w.prop(t,e,n):(1===r&&w.isXMLDoc(t)||(i=w.attrHooks[e.toLowerCase()]||(w.expr.match.bool.test(e)?ve:void 0)),void 0!==n?null===n?void w.removeAttr(t,e):i&&"set"in i&&void 0!==(o=i.set(t,n,e))?o:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(o=i.get(t,e))?o:null==(o=w.find.attr(t,e))?void 0:o)},attrHooks:{type:{set:function(t,e){if(!h.radioValue&&"radio"===e&&C(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,o=0,i=e&&e.match(z);if(i&&1===t.nodeType)for(;n=i[o++];)t.removeAttribute(n)}}),ve={set:function(t,e,n){return!1===e?w.removeAttr(t,n):t.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=be[e]||w.find.attr;be[e]=function(t,e,o){var i,r,s=e.toLowerCase();return o||(r=be[s],be[s]=i,i=null!=n(t,e,o)?s:null,be[s]=r),i}}));var xe=/^(?:input|select|textarea|button)$/i,ke=/^(?:a|area)$/i;function we(t){return(t.match(z)||[]).join(" ")}function De(t){return t.getAttribute&&t.getAttribute("class")||""}function Ce(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(z)||[]}w.fn.extend({prop:function(t,e){return J(this,w.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[w.propFix[t]||t]}))}}),w.extend({prop:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&w.isXMLDoc(t)||(e=w.propFix[e]||e,i=w.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(t,n,e))?o:t[e]=n:i&&"get"in i&&null!==(o=i.get(t,e))?o:t[e]},propHooks:{tabIndex:{get:function(t){var e=w.find.attr(t,"tabindex");return e?parseInt(e,10):xe.test(t.nodeName)||ke.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(w.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(t){var e,n,o,i,r,s;return f(t)?this.each((function(e){w(this).addClass(t.call(this,e,De(this)))})):(e=Ce(t)).length?this.each((function(){if(o=De(this),n=1===this.nodeType&&" "+we(o)+" "){for(r=0;r<e.length;r++)i=e[r],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=we(n),o!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,o,i,r,s;return f(t)?this.each((function(e){w(this).removeClass(t.call(this,e,De(this)))})):arguments.length?(e=Ce(t)).length?this.each((function(){if(o=De(this),n=1===this.nodeType&&" "+we(o)+" "){for(r=0;r<e.length;r++)for(i=e[r];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=we(n),o!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,o,i,r,s=typeof t,a="string"===s||Array.isArray(t);return f(t)?this.each((function(n){w(this).toggleClass(t.call(this,n,De(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Ce(t),this.each((function(){if(a)for(r=w(this),i=0;i<n.length;i++)o=n[i],r.hasClass(o)?r.removeClass(o):r.addClass(o);else void 0!==t&&"boolean"!==s||((o=De(this))&&it.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",o||!1===t?"":it.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,o=0;for(e=" "+t+" ";n=this[o++];)if(1===n.nodeType&&(" "+we(De(n))+" ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g;w.fn.extend({val:function(t){var e,n,o,i=this[0];return arguments.length?(o=f(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=o?t.call(this,n,w(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,(function(t){return null==t?"":t+""}))),(e=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Te,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(t){var e=w.find.attr(t,"value");return null!=e?e:we(w.text(t))}},select:{get:function(t){var e,n,o,i=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?r+1:i.length;for(o=r<0?u:s?r:0;o<u;o++)if(((n=i[o]).selected||o===r)&&!n.disabled&&(!n.parentNode.disabled||!C(n.parentNode,"optgroup"))){if(e=w(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,o,i=t.options,r=w.makeArray(e),s=i.length;s--;)((o=i[s]).selected=w.inArray(w.valHooks.option.get(o),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=w.inArray(w(t).val(),e)>-1}},h.checkOn||(w.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var je=t.location,$e={guid:Date.now()},Se=/\?/;w.parseXML=function(e){var n,o;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(i){}return o=n&&n.getElementsByTagName("parsererror")[0],n&&!o||w.error("Invalid XML: "+(o?w.map(o.childNodes,(function(t){return t.textContent})).join("\n"):e)),n};var Ee=/^(?:focusinfocus|focusoutblur)$/,Le=function(t){t.stopPropagation()};w.extend(w.event,{trigger:function(e,n,o,i){var r,s,a,u,l,d,p,h,y=[o||m],v=c.call(e,"type")?e.type:e,b=c.call(e,"namespace")?e.namespace.split("."):[];if(s=h=a=o=o||m,3!==o.nodeType&&8!==o.nodeType&&!Ee.test(v+w.event.triggered)&&(v.indexOf(".")>-1&&(b=v.split("."),v=b.shift(),b.sort()),l=v.indexOf(":")<0&&"on"+v,(e=e[w.expando]?e:new w.Event(v,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),n=null==n?[e]:w.makeArray(n,[e]),p=w.event.special[v]||{},i||!p.trigger||!1!==p.trigger.apply(o,n))){if(!i&&!p.noBubble&&!g(o)){for(u=p.delegateType||v,Ee.test(u+v)||(s=s.parentNode);s;s=s.parentNode)y.push(s),a=s;a===(o.ownerDocument||m)&&y.push(a.defaultView||a.parentWindow||t)}for(r=0;(s=y[r++])&&!e.isPropagationStopped();)h=s,e.type=r>1?u:p.bindType||v,(d=(it.get(s,"events")||Object.create(null))[e.type]&&it.get(s,"handle"))&&d.apply(s,n),(d=l&&s[l])&&d.apply&&nt(s)&&(e.result=d.apply(s,n),!1===e.result&&e.preventDefault());return e.type=v,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!nt(o)||l&&f(o[v])&&!g(o)&&((a=o[l])&&(o[l]=null),w.event.triggered=v,e.isPropagationStopped()&&h.addEventListener(v,Le),o[v](),e.isPropagationStopped()&&h.removeEventListener(v,Le),w.event.triggered=void 0,a&&(o[l]=a)),e.result}},simulate:function(t,e,n){var o=w.extend(new w.Event,n,{type:t,isSimulated:!0});w.event.trigger(o,null,e)}}),w.fn.extend({trigger:function(t,e){return this.each((function(){w.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return w.event.trigger(t,e,n,!0)}});var Ae=/\[\]$/,_e=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,Me=/^(?:input|select|textarea|keygen)/i;function He(t,e,n,o){var i;if(Array.isArray(e))w.each(e,(function(e,i){n||Ae.test(t)?o(t,i):He(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,o)}));else if(n||"object"!==b(e))o(t,e);else for(i in e)He(t+"["+i+"]",e[i],n,o)}w.param=function(t,e){var n,o=[],i=function(t,e){var n=f(e)?e():e;o[o.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!w.isPlainObject(t))w.each(t,(function(){i(this.name,this.value)}));else for(n in t)He(n,t[n],e,i);return o.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=w.prop(this,"elements");return t?w.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!w(this).is(":disabled")&&Me.test(this.nodeName)&&!Be.test(t)&&(this.checked||!wt.test(t))})).map((function(t,e){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(t){return{name:e.name,value:t.replace(_e,"\r\n")}})):{name:e.name,value:n.replace(_e,"\r\n")}})).get()}});var Ne=/%20/g,qe=/#.*$/,Oe=/([?&])_=[^&]*/,Fe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:GET|HEAD)$/,Ie=/^\/\//,Re={},We={},ze="*/".concat("*"),Ue=m.createElement("a");function Ye(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var o,i=0,r=e.toLowerCase().match(z)||[];if(f(n))for(;o=r[i++];)"+"===o[0]?(o=o.slice(1)||"*",(t[o]=t[o]||[]).unshift(n)):(t[o]=t[o]||[]).push(n)}}function Ve(t,e,n,o){var i={},r=t===We;function s(a){var u;return i[a]=!0,w.each(t[a]||[],(function(t,a){var l=a(e,n,o);return"string"!=typeof l||r||i[l]?r?!(u=l):void 0:(e.dataTypes.unshift(l),s(l),!1)})),u}return s(e.dataTypes[0])||!i["*"]&&s("*")}function Xe(t,e){var n,o,i=w.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:o||(o={}))[n]=e[n]);return o&&w.extend(!0,t,o),t}Ue.href=je.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:je.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(je.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Xe(Xe(t,w.ajaxSettings),e):Xe(w.ajaxSettings,t)},ajaxPrefilter:Ye(Re),ajaxTransport:Ye(We),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var o,i,r,s,a,u,l,c,d,p,h=w.ajaxSetup({},n),f=h.context||h,g=h.context&&(f.nodeType||f.jquery)?w(f):w.event,y=w.Deferred(),v=w.Callbacks("once memory"),b=h.statusCode||{},x={},k={},D="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Fe.exec(r);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?r:null},setRequestHeader:function(t,e){return null==l&&(t=k[t.toLowerCase()]=k[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||D;return o&&o.abort(e),T(0,e),this}};if(y.promise(C),h.url=((e||h.url||je.href)+"").replace(Ie,je.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(z)||[""],null==h.crossDomain){u=m.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=Ue.protocol+"//"+Ue.host!=u.protocol+"//"+u.host}catch(j){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),Ve(Re,h,n,C),l)return C;for(d in(c=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Pe.test(h.type),i=h.url.replace(qe,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ne,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Se.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Oe,"$1"),p=(Se.test(i)?"&":"?")+"_="+$e.guid+++p),h.url=i+p),h.ifModified&&(w.lastModified[i]&&C.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&C.setRequestHeader("If-None-Match",w.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+ze+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(f,C,h)||l))return C.abort();if(D="abort",v.add(h.complete),C.done(h.success),C.fail(h.error),o=Ve(We,h,n,C)){if(C.readyState=1,c&&g.trigger("ajaxSend",[C,h]),l)return C;h.async&&h.timeout>0&&(a=t.setTimeout((function(){C.abort("timeout")}),h.timeout));try{l=!1,o.send(x,T)}catch(j){if(l)throw j;T(-1,j)}}else T(-1,"No Transport");function T(e,n,s,u){var d,p,m,x,k,D=n;l||(l=!0,a&&t.clearTimeout(a),o=void 0,r=u||"",C.readyState=e>0?4:0,d=e>=200&&e<300||304===e,s&&(x=function(t,e,n){for(var o,i,r,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(i in a)if(a[i]&&a[i].test(o)){u.unshift(i);break}if(u[0]in n)r=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){r=i;break}s||(s=i)}r=r||s}if(r)return r!==u[0]&&u.unshift(r),n[r]}(h,C,s)),!d&&w.inArray("script",h.dataTypes)>-1&&w.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),x=function(t,e,n,o){var i,r,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(r=c.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!u&&o&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=r,r=c.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(s=l[u+" "+r]||l["* "+r]))for(i in l)if((a=i.split(" "))[1]===r&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(r=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(j){return{state:"parsererror",error:s?j:"No conversion from "+u+" to "+r}}}return{state:"success",data:e}}(h,x,C,d),d?(h.ifModified&&((k=C.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=k),(k=C.getResponseHeader("etag"))&&(w.etag[i]=k)),204===e||"HEAD"===h.type?D="nocontent":304===e?D="notmodified":(D=x.state,p=x.data,d=!(m=x.error))):(m=D,!e&&D||(D="error",e<0&&(e=0))),C.status=e,C.statusText=(n||D)+"",d?y.resolveWith(f,[p,D,C]):y.rejectWith(f,[C,D,m]),C.statusCode(b),b=void 0,c&&g.trigger(d?"ajaxSuccess":"ajaxError",[C,h,d?p:m]),v.fireWith(f,[C,D]),c&&(g.trigger("ajaxComplete",[C,h]),--w.active||w.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return w.get(t,e,n,"json")},getScript:function(t,e){return w.get(t,void 0,e,"script")}}),w.each(["get","post"],(function(t,e){w[e]=function(t,n,o,i){return f(n)&&(i=i||o,o=n,n=void 0),w.ajax(w.extend({url:t,type:e,dataType:i,data:n,success:o},w.isPlainObject(t)&&t))}})),w.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),w._evalUrl=function(t,e,n){return w.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){w.globalEval(t,e,n)}})},w.fn.extend({wrapAll:function(t){var e;return this[0]&&(f(t)&&(t=t.call(this[0])),e=w(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return f(t)?this.each((function(e){w(this).wrapInner(t.call(this,e))})):this.each((function(){var e=w(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=f(t);return this.each((function(n){w(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(t){return!w.expr.pseudos.visible(t)},w.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Ze={0:200,1223:204},Ke=w.ajaxSettings.xhr();h.cors=!!Ke&&"withCredentials"in Ke,h.ajax=Ke=!!Ke,w.ajaxTransport((function(e){var n,o;if(h.cors||Ke&&!e.crossDomain)return{send:function(i,r){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);n=function(t){return function(){n&&(n=o=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Ze[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),o=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=o:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout((function(){n&&o()}))},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(u){if(n)throw u}},abort:function(){n&&n()}}})),w.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return w.globalEval(t),t}}}),w.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),w.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(o,i){e=w("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Je,Ge=[],Qe=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ge.pop()||w.expando+"_"+$e.guid++;return this[t]=!0,t}}),w.ajaxPrefilter("json jsonp",(function(e,n,o){var i,r,s,a=!1!==e.jsonp&&(Qe.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qe.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=f(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Qe,"$1"+i):!1!==e.jsonp&&(e.url+=(Se.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||w.error(i+" was not called"),s[0]},e.dataTypes[0]="json",r=t[i],t[i]=function(){s=arguments},o.always((function(){void 0===r?w(t).removeProp(i):t[i]=r,e[i]&&(e.jsonpCallback=n.jsonpCallback,Ge.push(i)),s&&f(r)&&r(s[0]),s=r=void 0})),"script"})),h.createHTMLDocument=((Je=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Je.childNodes.length),w.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(h.createHTMLDocument?((o=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(o)):e=m),r=!n&&[],(i=q.exec(t))?[e.createElement(i[1])]:(i=Et([t],e,r),r&&r.length&&w(r).remove(),w.merge([],i.childNodes)));var o,i,r},w.fn.load=function(t,e,n){var o,i,r,s=this,a=t.indexOf(" ");return a>-1&&(o=we(t.slice(a)),t=t.slice(0,a)),f(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&w.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){r=arguments,s.html(o?w("<div>").append(w.parseHTML(t)).find(o):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,r||[t.responseText,e,t])}))}),this},w.expr.pseudos.animated=function(t){return w.grep(w.timers,(function(e){return t===e.elem})).length},w.offset={setOffset:function(t,e,n){var o,i,r,s,a,u,l=w.css(t,"position"),c=w(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),r=w.css(t,"top"),u=w.css(t,"left"),("absolute"===l||"fixed"===l)&&(r+u).indexOf("auto")>-1?(s=(o=c.position()).top,i=o.left):(s=parseFloat(r)||0,i=parseFloat(u)||0),f(e)&&(e=e.call(t,n,w.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+i),"using"in e?e.using.call(t,d):c.css(d)}},w.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){w.offset.setOffset(this,t,e)}));var e,n,o=this[0];return o?o.getClientRects().length?(e=o.getBoundingClientRect(),n=o.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,o=this[0],i={top:0,left:0};if("fixed"===w.css(o,"position"))e=o.getBoundingClientRect();else{for(e=this.offset(),n=o.ownerDocument,t=o.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===w.css(t,"position");)t=t.parentNode;t&&t!==o&&1===t.nodeType&&((i=w(t).offset()).top+=w.css(t,"borderTopWidth",!0),i.left+=w.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-w.css(o,"marginTop",!0),left:e.left-i.left-w.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===w.css(t,"position");)t=t.offsetParent;return t||pt}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;w.fn[t]=function(o){return J(this,(function(t,o,i){var r;if(g(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===i)return r?r[e]:t[o];r?r.scrollTo(n?r.pageXOffset:i,n?i:r.pageYOffset):t[o]=i}),t,o,arguments.length)}})),w.each(["top","left"],(function(t,e){w.cssHooks[e]=Jt(h.pixelPosition,(function(t,n){if(n)return n=Kt(t,e),Ut.test(n)?w(t).position()[e]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(t,e){w.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,o){w.fn[o]=function(i,r){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===r?"margin":"border");return J(this,(function(e,n,i){var r;return g(e)?0===o.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?w.css(e,n,a):w.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){w.fn[e]=function(t){return this.on(e,t)}})),w.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,o){return this.on(e,t,n,o)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),w.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(t,e){w.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var tn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;w.proxy=function(t,e){var n,o,r;if("string"==typeof e&&(n=t[e],e=t,t=n),f(t))return o=i.call(arguments,2),r=function(){return t.apply(e||this,o.concat(i.call(arguments)))},r.guid=t.guid=t.guid||w.guid++,r},w.holdReady=function(t){t?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=C,w.isFunction=f,w.isWindow=g,w.camelCase=et,w.type=b,w.now=Date.now,w.isNumeric=function(t){var e=w.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},w.trim=function(t){return null==t?"":(t+"").replace(tn,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return w}));var en=t.jQuery,nn=t.$;return w.noConflict=function(e){return t.$===w&&(t.$=nn),e&&t.jQuery===w&&(t.jQuery=en),w},void 0===e&&(t.jQuery=t.$=w),w})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MOJFrontend=t.MOJFrontend||{})}(this,(function(t){"use strict";function e(t){this.container=$(t),this.container.data("moj-add-another-initialised")||(this.container.data("moj-add-another-initialised",!0),this.container.on("click",".moj-add-another__remove-button",$.proxy(this,"onRemoveButtonClick")),this.container.on("click",".moj-add-another__add-button",$.proxy(this,"onAddButtonClick")),this.container.find(".moj-add-another__add-button, moj-add-another__remove-button").prop("type","button"))}function n(t,e){if(window.NodeList.prototype.forEach)return t.forEach(e);for(let n=0;n<t.length;n++)e.call(window,t[n],n,t)}function o(t,e={}){const n=t.getAttribute("tabindex");function o(){e.onBlur&&e.onBlur.call(t),n||t.removeAttribute("tabindex")}n||t.setAttribute("tabindex","-1"),t.addEventListener("focus",(function(){t.addEventListener("blur",o,{once:!0})}),{once:!0}),e.onBeforeFocus&&e.onBeforeFocus.call(t),t.focus()}function i(t,e={}){if(!t)return this;const n=Object.freeze({properties:{dismissible:{type:"boolean"},dismissText:{type:"string"},disableAutoFocus:{type:"boolean"},focusOnDismissSelector:{type:"string"}}});this.config=this.mergeConfigs({dismissible:!1,dismissText:"Dismiss",disableAutoFocus:!1},e,this.parseDataset(n,t.dataset)),this.$module=t}function r(t,e={}){if(!t)return this;const n=Object.freeze({properties:{buttonText:{type:"string"},buttonClasses:{type:"string"},alignMenu:{type:"string"}}});this.config=this.mergeConfigs({buttonText:"Actions",alignMenu:"left",buttonClasses:""},e,this.parseDataset(n,t.dataset)),this.$module=t}function s(t,e={}){if(!t)return this;const n=Object.freeze({properties:{excludedDates:{type:"string"},excludedDays:{type:"string"},leadingZeros:{type:"string"},maxDate:{type:"string"},minDate:{type:"string"},weekStartDay:{type:"string"}}});this.config=this.mergeConfigs({leadingZeros:!1,weekStartDay:"monday"},e,this.parseDataset(n,t.dataset)),this.dayLabels=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],this.monthLabels=["January","February","March","April","May","June","July","August","September","October","November","December"],this.currentDate=new Date,this.currentDate.setHours(0,0,0,0),this.calendarDays=[],this.excludedDates=[],this.excludedDays=[],this.buttonClass="moj-datepicker__button",this.selectedDayButtonClass="moj-datepicker__button--selected",this.currentDayButtonClass="moj-datepicker__button--current",this.todayButtonClass="moj-datepicker__button--today",this.$module=t,this.$input=t.querySelector(".moj-js-datepicker-input")}function a(t,e,n,o,i){this.index=e,this.row=n,this.column=o,this.button=t,this.picker=i,this.date=new Date}function u(t){this.options=t,this.container=$(this.options.toggleButton.container),this.filterContainer=$(this.options.filter.container),this.createToggleButton(),this.setupResponsiveChecks(),this.filterContainer.attr("tabindex","-1"),this.options.startHidden&&this.hideMenu()}function l(t){void 0!==document.createElement("div").ondrop&&"function"==typeof FormData&&function(){const t=document.createElement("input");return t.type="file",void 0!==t.files}()&&(this.defaultParams={uploadFileEntryHook:$.noop,uploadFileExitHook:$.noop,uploadFileErrorHook:$.noop,fileDeleteHook:$.noop,uploadStatusText:"Uploading files, please wait",dropzoneHintText:"Drag and drop files here or",dropzoneButtonText:"Choose files"},this.params=$.extend({},this.defaultParams,t),this.container=$(this.params.container),this.container.addClass("moj-multi-file-upload--enhanced"),this.feedbackContainer=this.container.find(".moj-multi-file__uploaded-files"),this.setupFileInput(),this.setupDropzone(),this.setupLabel(),this.setupStatusBox(),this.container.on("click",".moj-multi-file-upload__delete",$.proxy(this,"onFileDeleteClick")))}function c(t){if(this.container=$(t.container),this.container.data("moj-multi-select-initialised"))return;this.container.data("moj-multi-select-initialised",!0);const e=t.id_prefix;let n="checkboxes-all";void 0!==e&&(n=`${e}checkboxes-all`),this.toggle=$(this.getToggleHtml(n)),this.toggleButton=this.toggle.find("input"),this.toggleButton.on("click",$.proxy(this,"onButtonClick")),this.container.append(this.toggle),this.checkboxes=$(t.checkboxes),this.checkboxes.on("click",$.proxy(this,"onCheckboxClick")),this.checked=t.checked||!1}function d(t){this.el=t;const e=$(this.el);e.data("moj-password-reveal-initialised")||(e.data("moj-password-reveal-initialised",!0),e.attr("spellcheck","false"),e.wrap('<div class="moj-password-reveal"></div>'),this.container=$(this.el).parent(),this.createButton())}function p(t){"contentEditable"in document.documentElement&&(this.options=t,this.options.toolbar=this.options.toolbar||{bold:!1,italic:!1,underline:!1,bullets:!0,numbers:!0},this.textarea=this.options.textarea,this.container=$(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",$.proxy(this,"onButtonClick")),this.container.find(".moj-rich-text-editor__content").on("input",$.proxy(this,"onEditorInput")),this.container.find("label").on("click",$.proxy(this,"onLabelClick")),this.toolbar.on("keydown",$.proxy(this,"onToolbarKeydown"))))}function h(t){if(this.options=t,this.container=$(this.options.search.container),this.toggleButtonContainer=$(this.options.toggleButton.container),this.container.data("moj-search-toggle-initialised"))return;this.container.data("moj-search-toggle-initialised",!0);this.toggleButton=$(`<button class="moj-search-toggle__button" type="button" aria-haspopup="true" aria-expanded="false">\n ${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>\n </button>`),this.toggleButton.on("click",$.proxy(this,"onToggleButtonClick")),this.toggleButtonContainer.append(this.toggleButton),$(document).on("click",this.onDocumentClick.bind(this)),$(document).on("focusin",this.onDocumentClick.bind(this))}function f(t){this.table=$(t.table),this.table.data("moj-search-toggle-initialised")||(this.table.data("moj-search-toggle-initialised",!0),this.setupOptions(t),this.body=this.table.find("tbody"),this.createHeadingButtons(),this.createStatusBox(),this.initialiseSortedColumn(),this.table.on("click","th button",$.proxy(this,"onSortButtonClick")))}e.prototype.onAddButtonClick=function(t){const e=this.getNewItem();this.updateAttributes(this.getItems().length,e),this.resetItem(e);const n=this.getItems().first();this.hasRemoveButton(n)||this.createRemoveButton(n),this.getItems().last().after(e),e.find("input, textarea, select").first().focus()},e.prototype.hasRemoveButton=function(t){return t.find(".moj-add-another__remove-button").length},e.prototype.getItems=function(){return this.container.find(".moj-add-another__item")},e.prototype.getNewItem=function(){const t=this.getItems().first().clone();return this.hasRemoveButton(t)||this.createRemoveButton(t),t},e.prototype.updateAttributes=function(t,e){e.find("[data-name]").each((function(n,o){const i=o.id;o.name=$(o).attr("data-name").replace(/%index%/,t),o.id=$(o).attr("data-id").replace(/%index%/,t);($(o).siblings("label")[0]||$(o).parents("label")[0]||e.find(`[for="${i}"]`)[0]).htmlFor=o.id}))},e.prototype.createRemoveButton=function(t){t.append('<button type="button" class="govuk-button govuk-button--secondary moj-add-another__remove-button">Remove</button>')},e.prototype.resetItem=function(t){t.find("[data-name], [data-id]").each((function(t,e){"checkbox"===e.type||"radio"===e.type?e.checked=!1:e.value=""}))},e.prototype.onRemoveButtonClick=function(t){$(t.currentTarget).parents(".moj-add-another__item").remove();const e=this.getItems();1===e.length&&e.find(".moj-add-another__remove-button").remove(),e.each($.proxy((function(t,e){this.updateAttributes(t,$(e))}),this)),this.focusHeading()},e.prototype.focusHeading=function(){this.container.find(".moj-add-another__heading").get(0).focus()},i.prototype.init=function(){"alert"!==this.$module.getAttribute("role")||this.config.disableAutoFocus||o(this.$module),this.$dismissButton=this.$module.querySelector(".moj-alert__dismiss"),this.config.dismissible&&this.$dismissButton&&(this.$dismissButton.innerHTML=this.config.dismissText,this.$dismissButton.removeAttribute("hidden"),this.$module.addEventListener("click",(t=>{this.$dismissButton.contains(t.target)&&this.dimiss()})))},i.prototype.dimiss=function(){let t;if(this.config.focusOnDismissSelector&&(t=document.querySelector(this.config.focusOnDismissSelector)),!t){const e=this.$module.nextElementSibling;e&&e.matches(".moj-alert")&&(t=e)}t||(t=function(t,e){if(!t)return;let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}(this.$module,".moj-alert, h1, h2, h3, h4, h5, h6")),t||(t=function(t,e){if(!t)return;let n=t;for(;n;){if(n.matches(e))return n;let t=n.previousElementSibling;for(;t;){if(t.matches(e))return t;t=t.previousElementSibling}n=n.parentElement}}(this.$module,"h1, h2, h3, h4, h5, h6, main, body")),t&&o(t),this.$module.remove()},i.prototype.normaliseString=function(t,e){const n=t?t.trim():"";let o,i;switch(e&&e.type&&(i=e.type),i||(["true","false"].includes(n)&&(i="boolean"),n.length>0&&isFinite(Number(n))&&(i="number")),i){case"boolean":o="true"===n;break;case"number":o=Number(n);break;default:o=t}return o},i.prototype.parseDataset=function(t,e){const n={};for(const[o,i]of Object.entries(t.properties))o in e&&e[o]&&(n[o]=this.normaliseString(e[o],i));return n},i.prototype.mergeConfigs=function(...t){const e={};for(const n of t)for(const t of Object.keys(n)){const o=e[t],i=n[t];e[t]="object"==typeof o&&"object"==typeof i?this.mergeConfigs(o,i):i}return e},r.prototype.init=function(){if(1===this.$module.children.length){const t=this.$module.children[0];t.classList.forEach((e=>{e.startsWith("govuk-button-")&&t.classList.remove(e),t.classList.remove("moj-button-menu__item")})),this.config.buttonClasses&&t.classList.add(...this.config.buttonClasses.split(" "))}this.$module.children.length>1&&this.initMenu()},r.prototype.initMenu=function(){this.$menu=this.createMenu(),this.$module.insertAdjacentHTML("afterbegin",this.toggleTemplate()),this.setupMenuItems(),this.$menuToggle=this.$module.querySelector(":scope > button"),this.items=this.$menu.querySelectorAll("a, button"),this.$menuToggle.addEventListener("click",(t=>{this.toggleMenu(t)})),this.$module.addEventListener("keydown",(t=>{this.handleKeyDown(t)})),document.addEventListener("click",(t=>{this.$module.contains(t.target)||this.closeMenu(!1)}))},r.prototype.createMenu=function(){const t=document.createElement("ul");for(t.setAttribute("role","list"),t.hidden=!0,t.classList.add("moj-button-menu__wrapper"),"right"===this.config.alignMenu&&t.classList.add("moj-button-menu__wrapper--right"),this.$module.appendChild(t);this.$module.firstChild!==t;)t.appendChild(this.$module.firstChild);return t},r.prototype.setupMenuItems=function(){Array.from(this.$menu.children).forEach((t=>{const e=document.createElement("li");this.$menu.insertBefore(e,t),e.appendChild(t),t.setAttribute("tabindex",-1),"BUTTON"===t.tagName&&t.setAttribute("type","button"),t.classList.forEach((e=>{e.startsWith("govuk-button")&&t.classList.remove(e)})),t.addEventListener("click",(t=>{setTimeout((()=>{this.closeMenu(!1)}),50)}))}))},r.prototype.toggleTemplate=function(){return`\n <button type="button" class="govuk-button moj-button-menu__toggle-button ${this.config.buttonClasses||""}" aria-haspopup="true" aria-expanded="false">\n <span>\n ${this.config.buttonText}\n <svg width="11" height="5" viewBox="0 0 11 5" xmlns="http://www.w3.org/2000/svg">\n <path d="M5.5 0L11 5L0 5L5.5 0Z" fill="currentColor"/>\n </svg>\n </span>\n </button>`},r.prototype.isOpen=function(){return"true"===this.$menuToggle.getAttribute("aria-expanded")},r.prototype.toggleMenu=function(t){t.preventDefault();const e=0===t.detail?0:-1;this.isOpen()?this.closeMenu():this.openMenu(e)},r.prototype.openMenu=function(t=0){this.$menu.hidden=!1,this.$menuToggle.setAttribute("aria-expanded","true"),-1!==t&&this.focusItem(t)},r.prototype.closeMenu=function(t=!0){this.$menu.hidden=!0,this.$menuToggle.setAttribute("aria-expanded","false"),t&&this.$menuToggle.focus()},r.prototype.focusItem=function(t){t>=this.items.length&&(t=0),t<0&&(t=this.items.length-1);const e=this.items.item(t);e&&e.focus()},r.prototype.currentFocusIndex=function(){const t=document.activeElement;return Array.from(this.items).indexOf(t)},r.prototype.handleKeyDown=function(t){if(t.target===this.$menuToggle)switch(t.key){case"ArrowDown":t.preventDefault(),this.openMenu();break;case"ArrowUp":t.preventDefault(),this.openMenu(this.items.length-1)}if(this.$menu.contains(t.target)&&this.isOpen())switch(t.key){case"ArrowDown":t.preventDefault(),-1!==this.currentFocusIndex()&&this.focusItem(this.currentFocusIndex()+1);break;case"ArrowUp":t.preventDefault(),-1!==this.currentFocusIndex()&&this.focusItem(this.currentFocusIndex()-1);break;case"Home":t.preventDefault(),this.focusItem(0);break;case"End":t.preventDefault(),this.focusItem(this.items.length-1)}"Escape"===t.key&&this.isOpen()&&this.closeMenu(),"Tab"===t.key&&this.isOpen()&&this.closeMenu(!1)},r.prototype.parseDataset=function(t,e){const n={};for(const[o,,]of Object.entries(t.properties))o in e&&e[o]&&(n[o]=e[o]);return n},r.prototype.mergeConfigs=function(...t){const e={};for(const n of t)for(const t of Object.keys(n)){const o=e[t],i=n[t];e[t]="object"==typeof o&&"object"==typeof i?this.mergeConfigs(o,i):i}return e},s.prototype.init=function(){this.$input&&(this.$module.dataset.initialized||(this.setOptions(),this.initControls(),this.$module.setAttribute("data-initialized","true")))},s.prototype.initControls=function(){this.id=`datepicker-${this.$input.id}`,this.$dialog=this.createDialog(),this.createCalendarHeaders();const t=document.createElement("div"),e=document.createElement("div");t.classList.add("moj-datepicker__wrapper"),e.classList.add("govuk-input__wrapper"),this.$input.parentNode.insertBefore(t,this.$input),t.appendChild(e),e.appendChild(this.$input),e.insertAdjacentHTML("beforeend",this.toggleTemplate()),t.insertAdjacentElement("beforeend",this.$dialog),this.$calendarButton=this.$module.querySelector(".moj-js-datepicker-toggle"),this.$dialogTitle=this.$dialog.querySelector(".moj-js-datepicker-month-year"),this.createCalendar(),this.$prevMonthButton=this.$dialog.querySelector(".moj-js-datepicker-prev-month"),this.$prevYearButton=this.$dialog.querySelector(".moj-js-datepicker-prev-year"),this.$nextMonthButton=this.$dialog.querySelector(".moj-js-datepicker-next-month"),this.$nextYearButton=this.$dialog.querySelector(".moj-js-datepicker-next-year"),this.$cancelButton=this.$dialog.querySelector(".moj-js-datepicker-cancel"),this.$okButton=this.$dialog.querySelector(".moj-js-datepicker-ok"),this.$prevMonthButton.addEventListener("click",(t=>this.focusPreviousMonth(t,!1))),this.$prevYearButton.addEventListener("click",(t=>this.focusPreviousYear(t,!1))),this.$nextMonthButton.addEventListener("click",(t=>this.focusNextMonth(t,!1))),this.$nextYearButton.addEventListener("click",(t=>this.focusNextYear(t,!1))),this.$cancelButton.addEventListener("click",(t=>{t.preventDefault(),this.closeDialog(t)})),this.$okButton.addEventListener("click",(()=>{this.selectDate(this.currentDate)}));const n=this.$dialog.querySelectorAll('button:not([disabled="true"])');this.$firstButtonInDialog=n[0],this.$lastButtonInDialog=n[n.length-1],this.$firstButtonInDialog.addEventListener("keydown",(t=>this.firstButtonKeydown(t))),this.$lastButtonInDialog.addEventListener("keydown",(t=>this.lastButtonKeydown(t))),this.$calendarButton.addEventListener("click",(t=>this.toggleDialog(t))),this.$dialog.addEventListener("keydown",(t=>{"Escape"===t.key&&(this.closeDialog(),t.preventDefault(),t.stopPropagation())})),document.body.addEventListener("mouseup",(t=>this.backgroundClick(t))),this.updateCalendar()},s.prototype.createDialog=function(){const t=`datepicker-title-${this.$input.id}`,e=document.createElement("div");return e.id=this.id,e.setAttribute("class","moj-datepicker__dialog"),e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-labelledby",t),e.innerHTML=this.dialogTemplate(t),e.hidden=!0,e},s.prototype.createCalendar=function(){const t=this.$dialog.querySelector("tbody");let e=0;for(let n=0;n<6;n++){const o=t.insertRow(n);for(let t=0;t<7;t++){const i=document.createElement("td"),r=document.createElement("button");i.appendChild(r),o.appendChild(i);const s=new a(r,e,n,t,this);s.init(),this.calendarDays.push(s),e++}}},s.prototype.toggleTemplate=function(){return`<button class="moj-datepicker__toggle moj-js-datepicker-toggle" type="button" aria-haspopup="dialog" aria-controls="${this.id}" aria-expanded="false">\n <span class="govuk-visually-hidden">Choose date</span>\n <svg width="32" height="24" focusable="false" class="moj-datepicker-icon" aria-hidden="true" role="img" viewBox="0 0 22 22">\n <path\n fill="currentColor"\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M16.1333 2.93333H5.86668V4.4C5.86668 5.21002 5.21003 5.86667 4.40002 5.86667C3.59 5.86667 2.93335 5.21002 2.93335 4.4V2.93333H2C0.895431 2.93333 0 3.82877 0 4.93334V19.2667C0 20.3712 0.89543 21.2667 2 21.2667H20C21.1046 21.2667 22 20.3712 22 19.2667V4.93333C22 3.82876 21.1046 2.93333 20 2.93333H19.0667V4.4C19.0667 5.21002 18.41 5.86667 17.6 5.86667C16.79 5.86667 16.1333 5.21002 16.1333 4.4V2.93333ZM20.5333 8.06667H1.46665V18.8C1.46665 19.3523 1.91436 19.8 2.46665 19.8H19.5333C20.0856 19.8 20.5333 19.3523 20.5333 18.8V8.06667Z"\n ></path>\n <rect x="3.66669" width="1.46667" height="5.13333" rx="0.733333" fill="currentColor"></rect>\n <rect x="16.8667" width="1.46667" height="5.13333" rx="0.733333" fill="currentColor"></rect>\n </svg>\n </button>`},s.prototype.dialogTemplate=function(t){return`<div class="moj-datepicker__dialog-header">\n <div class="moj-datepicker__dialog-navbuttons">\n <button class="moj-datepicker__button moj-js-datepicker-prev-year">\n <span class="govuk-visually-hidden">Previous year</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M23.1643 20L28.9572 14.2071L27.5429 12.7929L20.3358 20L27.5429 27.2071L28.9572 25.7929L23.1643 20Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M17.1643 20L22.9572 14.2071L21.5429 12.7929L14.3358 20L21.5429 27.2071L22.9572 25.7929L17.1643 20Z" fill="currentColor"/>\n </svg>\n </button>\n\n <button class="moj-datepicker__button moj-js-datepicker-prev-month">\n <span class="govuk-visually-hidden">Previous month</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.5729 20L25.7865 14.2071L24.5137 12.7929L18.0273 20L24.5137 27.2071L25.7865 25.7929L20.5729 20Z" fill="currentColor"/>\n </svg>\n </button>\n </div>\n\n <h2 id="${t}" class="moj-datepicker__dialog-title moj-js-datepicker-month-year" aria-live="polite">June 2020</h2>\n\n <div class="moj-datepicker__dialog-navbuttons">\n <button class="moj-datepicker__button moj-js-datepicker-next-month">\n <span class="govuk-visually-hidden">Next month</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M23.4271 20L18.2135 14.2071L19.4863 12.7929L25.9727 20L19.4863 27.2071L18.2135 25.7929L23.4271 20Z" fill="currentColor"/>\n </svg>\n </button>\n\n <button class="moj-datepicker__button moj-js-datepicker-next-year">\n <span class="govuk-visually-hidden">Next year</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.8357 20L15.0428 14.2071L16.4571 12.7929L23.6642 20L16.4571 27.2071L15.0428 25.7929L20.8357 20Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M26.8357 20L21.0428 14.2071L22.4571 12.7929L29.6642 20L22.4571 27.2071L21.0428 25.7929L26.8357 20Z" fill="currentColor"/>\n </svg>\n </button>\n </div>\n </div>\n\n <table class="moj-datepicker__calendar moj-js-datepicker-grid" role="grid" aria-labelledby="${t}">\n <thead>\n <tr></tr>\n </thead>\n\n <tbody></tbody>\n </table>\n\n <div class="govuk-button-group">\n <button type="button" class="govuk-button moj-js-datepicker-ok">Select</button>\n <button type="button" class="govuk-button govuk-button--secondary moj-js-datepicker-cancel">Close</button>\n </div>`},s.prototype.createCalendarHeaders=function(){this.dayLabels.forEach((t=>{const e=`<th scope="col"><span aria-hidden="true">${t.substring(0,3)}</span><span class="govuk-visually-hidden">${t}</span></th>`;this.$dialog.querySelector("thead > tr").insertAdjacentHTML("beforeend",e)}))},s.prototype.leadingZeros=function(t,e=2){let n=t.toString();for(;n.length<e;)n=`0${n}`;return n},s.prototype.setOptions=function(){this.setMinAndMaxDatesOnCalendar(),this.setExcludedDates(),this.setExcludedDays(),this.setLeadingZeros(),this.setWeekStartDay()},s.prototype.setMinAndMaxDatesOnCalendar=function(){this.config.minDate&&(this.minDate=this.formattedDateFromString(this.config.minDate,null),this.minDate&&this.currentDate<this.minDate&&(this.currentDate=this.minDate)),this.config.maxDate&&(this.maxDate=this.formattedDateFromString(this.config.maxDate,null),this.maxDate&&this.currentDate>this.maxDate&&(this.currentDate=this.maxDate))},s.prototype.setExcludedDates=function(){this.config.excludedDates&&(this.excludedDates=this.config.excludedDates.replace(/\s+/," ").split(" ").map((t=>t.includes("-")?this.parseDateRangeString(t):this.formattedDateFromString(t))).flat().filter((t=>t)))},s.prototype.parseDateRangeString=function(t){const e=[],[n,o]=t.split("-").map((t=>this.formattedDateFromString(t,null)));if(n&&o){const t=new Date(n.getTime());for(;t<=o;)e.push(new Date(t)),t.setDate(t.getDate()+1)}return e},s.prototype.setExcludedDays=function(){if(this.config.excludedDays){const t=this.dayLabels.map((t=>t.toLowerCase()));"monday"===this.config.weekStartDay&&t.unshift(t.pop()),this.excludedDays=this.config.excludedDays.replace(/\s+/," ").toLowerCase().split(" ").map((e=>t.indexOf(e))).filter((t=>-1!==t))}},s.prototype.setLeadingZeros=function(){if("boolean"!=typeof this.config.leadingZeros){if("true"===this.config.leadingZeros.toLowerCase())return void(this.config.leadingZeros=!0);"false"===this.config.leadingZeros.toLowerCase()&&(this.config.leadingZeros=!1)}},s.prototype.setWeekStartDay=function(){const t=this.config.weekStartDay;t&&"sunday"===t.toLowerCase()?(this.config.weekStartDay="sunday",this.dayLabels.unshift(this.dayLabels.pop())):this.config.weekStartDay="monday"},s.prototype.isExcludedDate=function(t){if(this.minDate&&this.minDate>t)return!0;if(this.maxDate&&this.maxDate<t)return!0;for(const e of this.excludedDates)if(t.toDateString()===e.toDateString())return!0;return!!this.excludedDays.includes(t.getDay())},s.prototype.formattedDateFromString=function(t,e=new Date){let n=null;const o=/(\d{1,2})([-/,. ])(\d{1,2})\2(\d{4})/;if(!o.test(t))return e;const i=t.match(o),r=i[1],s=i[3],a=i[4];return n=new Date(`${a}-${s}-${r}`),n instanceof Date&&!isNaN(n)?n:e},s.prototype.formattedDateFromDate=function(t){return this.config.leadingZeros?`${this.leadingZeros(t.getDate())}/${this.leadingZeros(t.getMonth()+1)}/${t.getFullYear()}`:`${t.getDate()}/${t.getMonth()+1}/${t.getFullYear()}`},s.prototype.formattedDateHuman=function(t){return`${this.dayLabels[(t.getDay()+6)%7]} ${t.getDate()} ${this.monthLabels[t.getMonth()]} ${t.getFullYear()}`},s.prototype.backgroundClick=function(t){!this.isOpen()||this.$dialog.contains(t.target)||this.$input.contains(t.target)||this.$calendarButton.contains(t.target)||(t.preventDefault(),this.closeDialog())},s.prototype.firstButtonKeydown=function(t){"Tab"===t.key&&t.shiftKey&&(this.$lastButtonInDialog.focus(),t.preventDefault())},s.prototype.lastButtonKeydown=function(t){"Tab"!==t.key||t.shiftKey||(this.$firstButtonInDialog.focus(),t.preventDefault())},s.prototype.updateCalendar=function(){this.$dialogTitle.innerHTML=`${this.monthLabels[this.currentDate.getMonth()]} ${this.currentDate.getFullYear()}`;const t=this.currentDate,e=new Date(t.getFullYear(),t.getMonth(),1);let n;n="monday"===this.config.weekStartDay?0===e.getDay()?6:e.getDay()-1:e.getDay(),e.setDate(e.getDate()-n);const o=new Date(e);for(let i=0;i<this.calendarDays.length;i++){const e=o.getMonth()!==t.getMonth(),n=this.isExcludedDate(o);this.calendarDays[i].update(o,e,n),o.setDate(o.getDate()+1)}},s.prototype.setCurrentDate=function(t=!0){const{currentDate:e}=this;if(this.calendarDays.forEach((n=>{n.button.classList.add("moj-datepicker__button"),n.button.classList.add("moj-datepicker__calendar-day"),n.button.setAttribute("tabindex",-1),n.button.classList.remove(this.selectedDayButtonClass);const o=n.date;o.setHours(0,0,0,0);const i=new Date;i.setHours(0,0,0,0),o.getTime()===e.getTime()&&t&&(n.button.setAttribute("tabindex",0),n.button.focus(),n.button.classList.add(this.selectedDayButtonClass)),this.inputDate&&o.getTime()===this.inputDate.getTime()?(n.button.classList.add(this.currentDayButtonClass),n.button.setAttribute("aria-current","date")):(n.button.classList.remove(this.currentDayButtonClass),n.button.removeAttribute("aria-current")),o.getTime()===i.getTime()?n.button.classList.add(this.todayButtonClass):n.button.classList.remove(this.todayButtonClass)})),!t){const t=this.calendarDays.filter((t=>"block"===window.getComputedStyle(t.button).display&&!t.button.disabled));t[0].button.setAttribute("tabindex",0),this.currentDate=t[0].date}},s.prototype.selectDate=function(t){if(this.isExcludedDate(t))return;this.$calendarButton.querySelector("span").innerText=`Choose date. Selected date is ${this.formattedDateHuman(t)}`,this.$input.value=this.formattedDateFromDate(t);const e=new Event("change",{bubbles:!0,cancelable:!0});this.$input.dispatchEvent(e),this.closeDialog()},s.prototype.isOpen=function(){return this.$dialog.classList.contains("moj-datepicker__dialog--open")},s.prototype.toggleDialog=function(t){t.preventDefault(),this.isOpen()?this.closeDialog():(this.setMinAndMaxDatesOnCalendar(),this.openDialog())},s.prototype.openDialog=function(){this.$dialog.hidden=!1,this.$dialog.classList.add("moj-datepicker__dialog--open"),this.$calendarButton.setAttribute("aria-expanded","true"),this.$input.offsetWidth>this.$dialog.offsetWidth&&(this.$dialog.style.right="0px"),this.$dialog.style.top=`${this.$input.offsetHeight+3}px`,this.inputDate=this.formattedDateFromString(this.$input.value),this.currentDate=this.inputDate,this.currentDate.setHours(0,0,0,0),this.updateCalendar(),this.setCurrentDate()},s.prototype.closeDialog=function(){this.$dialog.hidden=!0,this.$dialog.classList.remove("moj-datepicker__dialog--open"),this.$calendarButton.setAttribute("aria-expanded","false"),this.$calendarButton.focus()},s.prototype.goToDate=function(t,e){const n=this.currentDate;this.currentDate=t,n.getMonth()===this.currentDate.getMonth()&&n.getFullYear()===this.currentDate.getFullYear()||this.updateCalendar(),this.setCurrentDate(e)},s.prototype.focusNextDay=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()+1),this.goToDate(t)},s.prototype.focusPreviousDay=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()-1),this.goToDate(t)},s.prototype.focusNextWeek=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()+7),this.goToDate(t)},s.prototype.focusPreviousWeek=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()-7),this.goToDate(t)},s.prototype.focusFirstDayOfWeek=function(){const t=new Date(this.currentDate),e="sunday"===this.config.weekStartDay?0:1,n=t.getDay(),o=n>=e?n-e:6-n;t.setDate(t.getDate()-o),t.setHours(0,0,0,0),this.goToDate(t)},s.prototype.focusLastDayOfWeek=function(){const t=new Date(this.currentDate),e="sunday"===this.config.weekStartDay?6:0,n=t.getDay(),o=n<=e?e-n:7-n;t.setDate(t.getDate()+o),t.setHours(0,0,0,0),this.goToDate(t)},s.prototype.focusNextMonth=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setMonth(n.getMonth()+1,1),this.goToDate(n,e)},s.prototype.focusPreviousMonth=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setMonth(n.getMonth()-1,1),this.goToDate(n,e)},s.prototype.focusNextYear=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setFullYear(n.getFullYear()+1,n.getMonth(),1),this.goToDate(n,e)},s.prototype.focusPreviousYear=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setFullYear(n.getFullYear()-1,n.getMonth(),1),this.goToDate(n,e)},s.prototype.parseDataset=function(t,e){const n={};for(const[o,,]of Object.entries(t.properties))o in e&&(n[o]=e[o]);return n},s.prototype.mergeConfigs=function(...t){const e={};for(const n of t)for(const t of Object.keys(n)){const o=e[t],i=n[t];e[t]="object"==typeof o&&"object"==typeof i?this.mergeConfigs(o,i):i}return e},a.prototype.init=function(){this.button.addEventListener("keydown",this.keyPress.bind(this)),this.button.addEventListener("click",this.click.bind(this))},a.prototype.update=function(t,e,n){const o=t.getDate();let i=this.picker.formattedDateHuman(t);n?(this.button.setAttribute("aria-disabled",!0),i=`Excluded date, ${i}`):this.button.removeAttribute("aria-disabled"),this.button.style.display=e?"none":"block",this.button.setAttribute("data-testid",this.picker.formattedDateFromDate(t)),this.button.innerHTML=`<span class="govuk-visually-hidden">${i}</span><span aria-hidden="true">${o}</span>`,this.date=new Date(t)},a.prototype.click=function(t){this.picker.goToDate(this.date),this.picker.selectDate(this.date),t.stopPropagation(),t.preventDefault()},a.prototype.keyPress=function(t){let e=!0;switch(t.key){case"ArrowLeft":this.picker.focusPreviousDay();break;case"ArrowRight":this.picker.focusNextDay();break;case"ArrowUp":this.picker.focusPreviousWeek();break;case"ArrowDown":this.picker.focusNextWeek();break;case"Home":this.picker.focusFirstDayOfWeek();break;case"End":this.picker.focusLastDayOfWeek();break;case"PageUp":t.shiftKey?this.picker.focusPreviousYear(t):this.picker.focusPreviousMonth(t);break;case"PageDown":t.shiftKey?this.picker.focusNextYear(t):this.picker.focusNextMonth(t);break;default:e=!1}e&&(t.preventDefault(),t.stopPropagation())},u.prototype.setupResponsiveChecks=function(){this.mq=window.matchMedia(this.options.bigModeMediaQuery),this.mq.addListener($.proxy(this,"checkMode")),this.checkMode(this.mq)},u.prototype.createToggleButton=function(){this.menuButton=$(`<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",$.proxy(this,"onMenuButtonClick")),this.container.append(this.menuButton)},u.prototype.checkMode=function(t){t.matches?this.enableBigMode():this.enableSmallMode()},u.prototype.enableBigMode=function(){this.showMenu(),this.removeCloseButton()},u.prototype.enableSmallMode=function(){this.hideMenu(),this.addCloseButton()},u.prototype.addCloseButton=function(){this.options.closeButton&&(this.closeButton=$(`<button class="moj-filter__close" type="button">${this.options.closeButton.text}</button>`),this.closeButton.on("click",$.proxy(this,"onCloseClick")),$(this.options.closeButton.container).append(this.closeButton))},u.prototype.onCloseClick=function(){this.hideMenu(),this.menuButton.focus()},u.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},u.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false"),this.filterContainer.addClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.showText)},u.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true"),this.filterContainer.removeClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.hideText)},u.prototype.onMenuButtonClick=function(){this.toggle()},u.prototype.toggle=function(){"false"===this.menuButton.attr("aria-expanded")?(this.showMenu(),this.filterContainer.get(0).focus()):this.hideMenu()},l.prototype.setupDropzone=function(){this.fileInput.wrap('<div class="moj-multi-file-upload__dropzone" />'),this.dropzone=this.container.find(".moj-multi-file-upload__dropzone"),this.dropzone.on("dragover",$.proxy(this,"onDragOver")),this.dropzone.on("dragleave",$.proxy(this,"onDragLeave")),this.dropzone.on("drop",$.proxy(this,"onDrop"))},l.prototype.setupLabel=function(){this.label=$(`<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)},l.prototype.setupFileInput=function(){this.fileInput=this.container.find(".moj-multi-file-upload__input"),this.fileInput.on("change",$.proxy(this,"onFileChange")),this.fileInput.on("focus",$.proxy(this,"onFileFocus")),this.fileInput.on("blur",$.proxy(this,"onFileBlur"))},l.prototype.setupStatusBox=function(){this.status=$('<div aria-live="polite" role="status" class="govuk-visually-hidden" />'),this.dropzone.append(this.status)},l.prototype.onDragOver=function(t){t.preventDefault(),this.dropzone.addClass("moj-multi-file-upload--dragover")},l.prototype.onDragLeave=function(){this.dropzone.removeClass("moj-multi-file-upload--dragover")},l.prototype.onDrop=function(t){t.preventDefault(),this.dropzone.removeClass("moj-multi-file-upload--dragover"),this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(t.originalEvent.dataTransfer.files)},l.prototype.uploadFiles=function(t){for(let e=0;e<t.length;e++)this.uploadFile(t[e])},l.prototype.onFileChange=function(t){this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(t.currentTarget.files),this.fileInput.replaceWith($(t.currentTarget).val("").clone(!0)),this.setupFileInput(),this.fileInput.get(0).focus()},l.prototype.onFileFocus=function(t){this.label.addClass("moj-multi-file-upload--focused")},l.prototype.onFileBlur=function(t){this.label.removeClass("moj-multi-file-upload--focused")},l.prototype.getSuccessHtml=function(t){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>${t.messageHtml}</span>`},l.prototype.getErrorHtml=function(t){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>${t.message}</span>`},l.prototype.getFileRowHtml=function(t){return`\n <div class="govuk-summary-list__row moj-multi-file-upload__row">\n <div class="govuk-summary-list__value moj-multi-file-upload__message">\n <span class="moj-multi-file-upload__filename">${t.name}</span>\n <span class="moj-multi-file-upload__progress">0%</span>\n </div>\n <div class="govuk-summary-list__actions moj-multi-file-upload__actions"></div>\n </div>`},l.prototype.getDeleteButtonHtml=function(t){return`<button class="moj-multi-file-upload__delete govuk-button govuk-button--secondary govuk-!-margin-bottom-0" type="button" name="delete" value="${t.filename}">\n Delete <span class="govuk-visually-hidden">${t.originalname}</span>\n </button>`},l.prototype.uploadFile=function(t){this.params.uploadFileEntryHook(this,t);const e=$(this.getFileRowHtml(t)),n=new FormData;n.append("documents",t),this.feedbackContainer.find(".moj-multi-file-upload__list").append(e),$.ajax({url:this.params.uploadUrl,type:"post",data:n,processData:!1,contentType:!1,success:$.proxy((function(n){n.error?(e.find(".moj-multi-file-upload__message").html(this.getErrorHtml(n.error)),this.status.html(n.error.message)):(e.find(".moj-multi-file-upload__message").html(this.getSuccessHtml(n.success)),this.status.html(n.success.messageText)),e.find(".moj-multi-file-upload__actions").append(this.getDeleteButtonHtml(n.file)),this.params.uploadFileExitHook(this,t,n)}),this),error:$.proxy((function(e,n,o){this.params.uploadFileErrorHook(this,t,e,n,o)}),this),xhr:function(){const t=new XMLHttpRequest;return t.upload.addEventListener("progress",(function(t){if(t.lengthComputable){let n=t.loaded/t.total;n=parseInt(100*n,10),e.find(".moj-multi-file-upload__progress").text(` ${n}%`)}}),!1),t}})},l.prototype.onFileDeleteClick=function(t){t.preventDefault();const e=$(t.currentTarget),n={};n[e[0].name]=e[0].value,$.ajax({url:this.params.deleteUrl,type:"post",dataType:"json",data:n,success:$.proxy((function(t){t.error||(e.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,t)}),this)})},c.prototype.getToggleHtml=function(t){let e="";return e+='<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox">',e+=` <input type="checkbox" class="govuk-checkboxes__input" id="${t}">`,e+=` <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="${t}">`,e+=' <span class="govuk-visually-hidden">Select all</span>',e+=" </label>",e+="</div>",e},c.prototype.onButtonClick=function(t){this.checked?(this.uncheckAll(),this.toggleButton[0].checked=!1):(this.checkAll(),this.toggleButton[0].checked=!0)},c.prototype.checkAll=function(){this.checkboxes.each($.proxy((function(t,e){e.checked=!0}),this)),this.checked=!0},c.prototype.uncheckAll=function(){this.checkboxes.each($.proxy((function(t,e){e.checked=!1}),this)),this.checked=!1},c.prototype.onCheckboxClick=function(t){t.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)},d.prototype.createButton=function(){this.button=$('<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",$.proxy(this,"onButtonClick"))},d.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>'))},p.prototype.onToolbarKeydown=function(t){let e;switch(t.keyCode){case this.keys.right:case this.keys.down:{e=this.toolbar.find("button[tabindex=0]");const t=e.next("button");t[0]&&(t.focus(),e.attr("tabindex","-1"),t.attr("tabindex","0"));break}case this.keys.left:case this.keys.up:{e=this.toolbar.find("button[tabindex=0]");const t=e.prev("button");t[0]&&(t.focus(),e.attr("tabindex","-1"),t.attr("tabindex","0"));break}}},p.prototype.getToolbarHtml=function(){let t="";return t+='<div class="moj-rich-text-editor__toolbar" role="toolbar">',this.options.toolbar.bold&&(t+='<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&&(t+='<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&&(t+='<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&&(t+='<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&&(t+='<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>'),t+="</div>",t},p.prototype.getEnhancedHtml=function(t){return`${this.getToolbarHtml()}<div class="govuk-textarea moj-rich-text-editor__content" contenteditable="true" spellcheck="false"></div>`},p.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")},p.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())},p.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")},p.prototype.onButtonClick=function(t){document.execCommand($(t.currentTarget).data("command"),!1,null)},p.prototype.getContent=function(){return this.container.find(".moj-rich-text-editor__content").html()},p.prototype.onEditorInput=function(t){this.updateTextarea()},p.prototype.updateTextarea=function(){document.execCommand("defaultParagraphSeparator",!1,"p"),this.textarea.val(this.getContent())},p.prototype.onLabelClick=function(t){t.preventDefault(),this.container.find(".moj-rich-text-editor__content").focus()},h.prototype.showMenu=function(){this.toggleButton.attr("aria-expanded","true"),this.container.removeClass("moj-js-hidden"),this.container.find("input").first().get(0).focus()},h.prototype.hideMenu=function(){this.container.addClass("moj-js-hidden"),this.toggleButton.attr("aria-expanded","false")},h.prototype.onToggleButtonClick=function(){"false"===this.toggleButton.attr("aria-expanded")?this.showMenu():this.hideMenu()},h.prototype.onDocumentClick=function(t){$.contains(this.toggleButtonContainer[0],t.target)||$.contains(this.container[0],t.target)||this.hideMenu()},f.prototype.setupOptions=function(t){t=t||{},this.statusMessage=t.statusMessage||"Sort by %heading% (%direction%)",this.ascendingText=t.ascendingText||"ascending",this.descendingText=t.descendingText||"descending"},f.prototype.createHeadingButtons=function(){const t=this.table.find("thead th");let e;for(let n=0;n<t.length;n++)e=$(t[n]),e.attr("aria-sort")&&this.createHeadingButton(e,n)},f.prototype.createHeadingButton=function(t,e){const n=t.text(),o=$(`<button type="button" data-index="${e}">${n}</button>`);t.text(""),t.append(o)},f.prototype.createStatusBox=function(){this.status=$('<div aria-live="polite" role="status" aria-atomic="true" class="govuk-visually-hidden" />'),this.table.parent().append(this.status)},f.prototype.initialiseSortedColumn=function(){const t=this.getTableRowsArray();this.table.find("th").filter('[aria-sort="ascending"], [aria-sort="descending"]').first().each(((e,n)=>{const o=$(n).attr("aria-sort"),i=$(n).find("button").attr("data-index"),r=this.sort(t,i,o);this.addRows(r)}))},f.prototype.onSortButtonClick=function(t){const e=t.currentTarget.getAttribute("data-index"),n=$(t.currentTarget).parent().attr("aria-sort");let o;o="none"===n||"descending"===n?"ascending":"descending";const i=this.getTableRowsArray(),r=this.sort(i,e,o);this.addRows(r),this.removeButtonStates(),this.updateButtonState($(t.currentTarget),o)},f.prototype.updateButtonState=function(t,e){t.parent().attr("aria-sort",e);let n=this.statusMessage;n=n.replace(/%heading%/,t.text()),n=n.replace(/%direction%/,this[`${e}Text`]),this.status.text(n)},f.prototype.removeButtonStates=function(){this.table.find("thead th").attr("aria-sort","none")},f.prototype.addRows=function(t){for(let e=0;e<t.length;e++)this.body.append(t[e])},f.prototype.getTableRowsArray=function(){const t=[],e=this.body.find("tr");for(let n=0;n<e.length;n++)t.push(e[n]);return t},f.prototype.sort=function(t,e,n){return t.sort(function(t,o){const i=$(t).find("td,th").eq(e),r=$(o).find("td,th").eq(e),s="ascending"===n?this.getCellValue(i):this.getCellValue(r),a="ascending"===n?this.getCellValue(r):this.getCellValue(i);return"string"==typeof s||"string"==typeof a?s.toString().localeCompare(a.toString()):s-a}.bind(this))},f.prototype.getCellValue=function(t){const e=t.attr("data-sort-value")||t.html(),n=Number(e);return isNaN(n)?e:n};t.AddAnother=e,t.Alert=i,t.ButtonMenu=r,t.DatePicker=s,t.FilterToggleButton=u,t.MultiFileUpload=l,t.MultiSelect=c,t.PasswordReveal=d,t.RichTextEditor=p,t.SearchToggle=h,t.SortableTable=f,t.initAll=function(t){const o=void 0!==(t=void 0!==t?t:{}).scope?t.scope:document;n(o.querySelectorAll('[data-module="moj-add-another"]'),(function(t){new e(t)})),n(o.querySelectorAll('[data-module="moj-multi-select"]'),(function(t){new c({container:t.querySelector(t.getAttribute("data-multi-select-checkbox")),checkboxes:t.querySelectorAll("tbody .govuk-checkboxes__input"),id_prefix:t.getAttribute("data-multi-select-idprefix")})})),n(o.querySelectorAll('[data-module="moj-password-reveal"]'),(function(t){new d(t)})),n(o.querySelectorAll('[data-module="moj-rich-text-editor"]'),(function(t){const e={textarea:$(t)},n=t.getAttribute("data-moj-rich-text-editor-toolbar");if(n){const t=n.split(",");e.toolbar={};for(const n in t)e.toolbar[t[n]]=!0}new p(e)})),n(o.querySelectorAll('[data-module="moj-search-toggle"]'),(function(t){new h({toggleButton:{container:$(t.querySelector(".moj-search-toggle__toggle")),text:t.getAttribute("data-moj-search-toggle-text")},search:{container:$(t.querySelector(".moj-search"))}})})),n(o.querySelectorAll('[data-module="moj-sortable-table"]'),(function(t){new f({table:t})})),n(o.querySelectorAll('[data-module="moj-date-picker"]'),(function(t){new s(t,{}).init()})),n(o.querySelectorAll('[data-module="moj-button-menu"]'),(function(t){new r(t,{}).init()})),n(o.querySelectorAll('[data-module="moj-alert"]'),(function(t){new i(t,{}).init()}))},t.version="0.0.0-development"}));//# sourceMappingURL=all.jquery.min.js.map
|
|
1
|
+
!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,(function(t,e){"use strict";var n=[],o=Object.getPrototypeOf,i=n.slice,r=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},s=n.push,a=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,d=c.toString,p=d.call(Object),h={},f=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},g=function(t){return null!=t&&t===t.window},m=t.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function v(t,e,n){var o,i,r=(n=n||m).createElement("script");if(r.text=t,e)for(o in y)(i=e[o]||e.getAttribute&&e.getAttribute(o))&&r.setAttribute(o,i);n.head.appendChild(r).parentNode.removeChild(r)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?u[l.call(t)]||"object":typeof t}var x="3.7.1",k=/HTML$/i,w=function(t,e){return new w.fn.init(t,e)};function D(t){var e=!!t&&"length"in t&&t.length,n=b(t);return!f(t)&&!g(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function C(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return i.call(this)},get:function(t){return null==t?i.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=w.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return w.each(this,t)},map:function(t){return this.pushStack(w.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var t,e,n,o,i,r,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||f(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)o=t[e],"__proto__"!==e&&s!==o&&(l&&o&&(w.isPlainObject(o)||(i=Array.isArray(o)))?(n=s[e],r=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,s[e]=w.extend(l,r,o)):void 0!==o&&(s[e]=o));return s},w.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==l.call(t))&&(!(e=o(t))||"function"==typeof(n=c.call(e,"constructor")&&e.constructor)&&d.call(n)===p)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){v(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,o=0;if(D(t))for(n=t.length;o<n&&!1!==e.call(t[o],o,t[o]);o++);else for(o in t)if(!1===e.call(t[o],o,t[o]))break;return t},text:function(t){var e,n="",o=0,i=t.nodeType;if(!i)for(;e=t[o++];)n+=w.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(D(Object(t))?w.merge(n,"string"==typeof t?[t]:t):s.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:a.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!k.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,o=0,i=t.length;o<n;o++)t[i++]=e[o];return t.length=i,t},grep:function(t,e,n){for(var o=[],i=0,r=t.length,s=!n;i<r;i++)!e(t[i],i)!==s&&o.push(t[i]);return o},map:function(t,e,n){var o,i,s=0,a=[];if(D(t))for(o=t.length;s<o;s++)null!=(i=e(t[s],s,n))&&a.push(i);else for(s in t)null!=(i=e(t[s],s,n))&&a.push(i);return r(a)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){u["[object "+e+"]"]=e.toLowerCase()}));var T=n.pop,j=n.sort,$=n.splice,S="[\\x20\\t\\r\\n\\f]",L=new RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g");w.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var E=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function A(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}w.escapeSelector=function(t){return(t+"").replace(E,A)};var _=m,B=s;!function(){var e,o,r,s,u,l,d,p,f,g,m=B,y=w.expando,v=0,b=0,x=tt(),k=tt(),D=tt(),E=tt(),A=function(t,e){return t===e&&(u=!0),0},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="(?:\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",N="\\["+S+"*("+H+")(?:"+S+"*([*^$|!~]?=)"+S+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+H+"))|)"+S+"*\\]",q=":("+H+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",O=new RegExp(S+"+","g"),F=new RegExp("^"+S+"*,"+S+"*"),I=new RegExp("^"+S+"*([>+~]|"+S+")"+S+"*"),P=new RegExp(S+"|>"),R=new RegExp(q),W=new RegExp("^"+H+"$"),z={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),TAG:new RegExp("^("+H+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,X=new RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),K=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ut()},G=pt((function(t){return!0===t.disabled&&C(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(n=i.call(_.childNodes),_.childNodes),n[_.childNodes.length].nodeType}catch(bt){m={apply:function(t,e){B.apply(t,i.call(e))},call:function(t){B.apply(t,i.call(arguments,1))}}}function Q(t,e,n,o){var i,r,s,a,u,c,d,g=e&&e.ownerDocument,v=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==v&&9!==v&&11!==v)return n;if(!o&&(ut(e),e=e||l,p)){if(11!==v&&(u=V.exec(t)))if(i=u[1]){if(9===v){if(!(s=e.getElementById(i)))return n;if(s.id===i)return m.call(n,s),n}else if(g&&(s=g.getElementById(i))&&Q.contains(e,s)&&s.id===i)return m.call(n,s),n}else{if(u[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(E[t+" "]||f&&f.test(t))){if(d=t,g=e,1===v&&(P.test(t)||I.test(t))){for((g=Z.test(t)&&at(e.parentNode)||e)==e&&h.scope||((a=e.getAttribute("id"))?a=w.escapeSelector(a):e.setAttribute("id",a=y)),r=(c=ct(t)).length;r--;)c[r]=(a?"#"+a:":scope")+" "+dt(c[r]);d=c.join(",")}try{return m.apply(n,g.querySelectorAll(d)),n}catch(b){E(t,!0)}finally{a===y&&e.removeAttribute("id")}}}return vt(t.replace(L,"$1"),e,n,o)}function tt(){var t=[];return function e(n,i){return t.push(n+" ")>o.cacheLength&&delete e[t.shift()],e[n+" "]=i}}function et(t){return t[y]=!0,t}function nt(t){var e=l.createElement("fieldset");try{return!!t(e)}catch(bt){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ot(t){return function(e){return C(e,"input")&&e.type===t}}function it(t){return function(e){return(C(e,"input")||C(e,"button"))&&e.type===t}}function rt(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&&G(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function st(t){return et((function(e){return e=+e,et((function(n,o){for(var i,r=t([],n.length,e),s=r.length;s--;)n[i=r[s]]&&(n[i]=!(o[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var e,n=t?t.ownerDocument||t:_;return n!=l&&9===n.nodeType&&n.documentElement?(d=(l=n).documentElement,p=!w.isXMLDoc(l),g=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&_!=l&&(e=l.defaultView)&&e.top!==e&&e.addEventListener("unload",J),h.getById=nt((function(t){return d.appendChild(t).id=w.expando,!l.getElementsByName||!l.getElementsByName(w.expando).length})),h.disconnectedMatch=nt((function(t){return g.call(t,"*")})),h.scope=nt((function(){return l.querySelectorAll(":scope")})),h.cssHas=nt((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(bt){return!0}})),h.getById?(o.filter.ID=function(t){var e=t.replace(X,K);return function(t){return t.getAttribute("id")===e}},o.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n=e.getElementById(t);return n?[n]:[]}}):(o.filter.ID=function(t){var e=t.replace(X,K);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},o.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n,o,i,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(i=e.getElementsByName(t),o=0;r=i[o++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),o.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},o.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&p)return e.getElementsByClassName(t)},f=[],nt((function(t){var e;d.appendChild(t).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||f.push("\\["+S+"*(?:value|"+M+")"),t.querySelectorAll("[id~="+y+"-]").length||f.push("~="),t.querySelectorAll("a#"+y+"+*").length||f.push(".#.+[+~]"),t.querySelectorAll(":checked").length||f.push(":checked"),(e=l.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),(e=l.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||f.push("\\["+S+"*name"+S+"*="+S+"*(?:''|\"\")")})),h.cssHas||f.push(":has"),f=f.length&&new RegExp(f.join("|")),A=function(t,e){if(t===e)return u=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!h.sortDetached&&e.compareDocumentPosition(t)===n?t===l||t.ownerDocument==_&&Q.contains(_,t)?-1:e===l||e.ownerDocument==_&&Q.contains(_,e)?1:s?a.call(s,t)-a.call(s,e):0:4&n?-1:1)},l):l}for(e in Q.matches=function(t,e){return Q(t,null,null,e)},Q.matchesSelector=function(t,e){if(ut(t),p&&!E[e+" "]&&(!f||!f.test(e)))try{var n=g.call(t,e);if(n||h.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(bt){E(e,!0)}return Q(e,l,null,[t]).length>0},Q.contains=function(t,e){return(t.ownerDocument||t)!=l&&ut(t),w.contains(t,e)},Q.attr=function(t,e){(t.ownerDocument||t)!=l&&ut(t);var n=o.attrHandle[e.toLowerCase()],i=n&&c.call(o.attrHandle,e.toLowerCase())?n(t,e,!p):void 0;return void 0!==i?i:t.getAttribute(e)},Q.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},w.uniqueSort=function(t){var e,n=[],o=0,r=0;if(u=!h.sortStable,s=!h.sortStable&&i.call(t,0),j.call(t,A),u){for(;e=t[r++];)e===t[r]&&(o=n.push(r));for(;o--;)$.call(t,n[o],1)}return s=null,t},w.fn.uniqueSort=function(){return this.pushStack(w.uniqueSort(i.apply(this)))},o=w.expr={cacheLength:50,createPseudo:et,match:z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(X,K),t[3]=(t[3]||t[4]||t[5]||"").replace(X,K),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Q.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Q.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return z.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&R.test(n)&&(e=ct(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(X,K).toLowerCase();return"*"===t?function(){return!0}:function(t){return C(t,e)}},CLASS:function(t){var e=x[t+" "];return e||(e=new RegExp("(^|"+S+")"+t+"("+S+"|$)"))&&x(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(o){var i=Q.attr(o,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(O," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,o,i){var r="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===o&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,d,p,h,f=r!==s?"nextSibling":"previousSibling",g=e.parentNode,m=a&&e.nodeName.toLowerCase(),b=!u&&!a,x=!1;if(g){if(r){for(;f;){for(d=e;d=d[f];)if(a?C(d,m):1===d.nodeType)return!1;h=f="only"===t&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&b){for(x=(p=(l=(c=g[y]||(g[y]={}))[t]||[])[0]===v&&l[1])&&l[2],d=p&&g.childNodes[p];d=++p&&d&&d[f]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===e){c[t]=[v,p,x];break}}else if(b&&(x=p=(l=(c=e[y]||(e[y]={}))[t]||[])[0]===v&&l[1]),!1===x)for(;(d=++p&&d&&d[f]||(x=p=0)||h.pop())&&(!(a?C(d,m):1===d.nodeType)||!++x||(b&&((c=d[y]||(d[y]={}))[t]=[v,x]),d!==e)););return(x-=i)===o||x%o==0&&x/o>=0}}},PSEUDO:function(t,e){var n,i=o.pseudos[t]||o.setFilters[t.toLowerCase()]||Q.error("unsupported pseudo: "+t);return i[y]?i(e):i.length>1?(n=[t,t,"",e],o.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,n){for(var o,r=i(t,e),s=r.length;s--;)t[o=a.call(t,r[s])]=!(n[o]=r[s])})):function(t){return i(t,0,n)}):i}},pseudos:{not:et((function(t){var e=[],n=[],o=yt(t.replace(L,"$1"));return o[y]?et((function(t,e,n,i){for(var r,s=o(t,null,i,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))})):function(t,i,r){return e[0]=t,o(e,null,r,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Q(t,e).length>0}})),contains:et((function(t){return t=t.replace(X,K),function(e){return(e.textContent||w.text(e)).indexOf(t)>-1}})),lang:et((function(t){return W.test(t||"")||Q.error("unsupported lang: "+t),t=t.replace(X,K).toLowerCase(),function(e){var n;do{if(n=p?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===function(){try{return l.activeElement}catch(t){}}()&&l.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:rt(!1),disabled:rt(!0),checked:function(t){return C(t,"input")&&!!t.checked||C(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!o.pseudos.empty(t)},header:function(t){return Y.test(t.nodeName)},input:function(t){return U.test(t.nodeName)},button:function(t){return C(t,"input")&&"button"===t.type||C(t,"button")},text:function(t){var e;return C(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:st((function(){return[0]})),last:st((function(t,e){return[e-1]})),eq:st((function(t,e,n){return[n<0?n+e:n]})),even:st((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:st((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:st((function(t,e,n){var o;for(o=n<0?n+e:n>e?e:n;--o>=0;)t.push(o);return t})),gt:st((function(t,e,n){for(var o=n<0?n+e:n;++o<e;)t.push(o);return t}))}},o.pseudos.nth=o.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[e]=ot(e);for(e in{submit:!0,reset:!0})o.pseudos[e]=it(e);function lt(){}function ct(t,e){var n,i,r,s,a,u,l,c=k[t+" "];if(c)return e?0:c.slice(0);for(a=t,u=[],l=o.preFilter;a;){for(s in n&&!(i=F.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(r=[])),n=!1,(i=I.exec(a))&&(n=i.shift(),r.push({value:n,type:i[0].replace(L," ")}),a=a.slice(n.length)),o.filter)!(i=z[s].exec(a))||l[s]&&!(i=l[s](i))||(n=i.shift(),r.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return e?a.length:a?Q.error(t):k(t,u).slice(0)}function dt(t){for(var e=0,n=t.length,o="";e<n;e++)o+=t[e].value;return o}function pt(t,e,n){var o=e.dir,i=e.next,r=i||o,s=n&&"parentNode"===r,a=b++;return e.first?function(e,n,i){for(;e=e[o];)if(1===e.nodeType||s)return t(e,n,i);return!1}:function(e,n,u){var l,c,d=[v,a];if(u){for(;e=e[o];)if((1===e.nodeType||s)&&t(e,n,u))return!0}else for(;e=e[o];)if(1===e.nodeType||s)if(c=e[y]||(e[y]={}),i&&C(e,i))e=e[o]||e;else{if((l=c[r])&&l[0]===v&&l[1]===a)return d[2]=l[2];if(c[r]=d,d[2]=t(e,n,u))return!0}return!1}}function ht(t){return t.length>1?function(e,n,o){for(var i=t.length;i--;)if(!t[i](e,n,o))return!1;return!0}:t[0]}function ft(t,e,n,o,i){for(var r,s=[],a=0,u=t.length,l=null!=e;a<u;a++)(r=t[a])&&(n&&!n(r,o,i)||(s.push(r),l&&e.push(a)));return s}function gt(t,e,n,o,i,r){return o&&!o[y]&&(o=gt(o)),i&&!i[y]&&(i=gt(i,r)),et((function(r,s,u,l){var c,d,p,h,f=[],g=[],y=s.length,v=r||function(t,e,n){for(var o=0,i=e.length;o<i;o++)Q(t,e[o],n);return n}(e||"*",u.nodeType?[u]:u,[]),b=!t||!r&&e?v:ft(v,f,t,u,l);if(n?n(b,h=i||(r?t:y||o)?[]:s,u,l):h=b,o)for(c=ft(h,g),o(c,[],u,l),d=c.length;d--;)(p=c[d])&&(h[g[d]]=!(b[g[d]]=p));if(r){if(i||t){if(i){for(c=[],d=h.length;d--;)(p=h[d])&&c.push(b[d]=p);i(null,h=[],c,l)}for(d=h.length;d--;)(p=h[d])&&(c=i?a.call(r,p):f[d])>-1&&(r[c]=!(s[c]=p))}}else h=ft(h===s?h.splice(y,h.length):h),i?i(null,s,h,l):m.apply(s,h)}))}function mt(t){for(var e,n,i,s=t.length,u=o.relative[t[0].type],l=u||o.relative[" "],c=u?1:0,d=pt((function(t){return t===e}),l,!0),p=pt((function(t){return a.call(e,t)>-1}),l,!0),h=[function(t,n,o){var i=!u&&(o||n!=r)||((e=n).nodeType?d(t,n,o):p(t,n,o));return e=null,i}];c<s;c++)if(n=o.relative[t[c].type])h=[pt(ht(h),n)];else{if((n=o.filter[t[c].type].apply(null,t[c].matches))[y]){for(i=++c;i<s&&!o.relative[t[i].type];i++);return gt(c>1&&ht(h),c>1&&dt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(L,"$1"),n,c<i&&mt(t.slice(c,i)),i<s&&mt(t=t.slice(i)),i<s&&dt(t))}h.push(n)}return ht(h)}function yt(t,e){var n,i=[],s=[],a=D[t+" "];if(!a){for(e||(e=ct(t)),n=e.length;n--;)(a=mt(e[n]))[y]?i.push(a):s.push(a);a=D(t,function(t,e){var n=e.length>0,i=t.length>0,s=function(s,a,u,c,d){var h,f,g,y=0,b="0",x=s&&[],k=[],D=r,C=s||i&&o.find.TAG("*",d),j=v+=null==D?1:Math.random()||.1,$=C.length;for(d&&(r=a==l||a||d);b!==$&&null!=(h=C[b]);b++){if(i&&h){for(f=0,a||h.ownerDocument==l||(ut(h),u=!p);g=t[f++];)if(g(h,a||l,u)){m.call(c,h);break}d&&(v=j)}n&&((h=!g&&h)&&y--,s&&x.push(h))}if(y+=b,n&&b!==y){for(f=0;g=e[f++];)g(x,k,a,u);if(s){if(y>0)for(;b--;)x[b]||k[b]||(k[b]=T.call(c));k=ft(k)}m.apply(c,k),d&&!s&&k.length>0&&y+e.length>1&&w.uniqueSort(c)}return d&&(v=j,r=D),x};return n?et(s):s}(s,i)),a.selector=t}return a}function vt(t,e,n,i){var r,s,a,u,l,c="function"==typeof t&&t,d=!i&&ct(t=c.selector||t);if(n=n||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===e.nodeType&&p&&o.relative[s[1].type]){if(!(e=(o.find.ID(a.matches[0].replace(X,K),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(s.shift().value.length)}for(r=z.needsContext.test(t)?0:s.length;r--&&(a=s[r],!o.relative[u=a.type]);)if((l=o.find[u])&&(i=l(a.matches[0].replace(X,K),Z.test(s[0].type)&&at(e.parentNode)||e))){if(s.splice(r,1),!(t=i.length&&dt(s)))return m.apply(n,i),n;break}}return(c||yt(t,d))(i,e,!p,n,!e||Z.test(t)&&at(e.parentNode)||e),n}lt.prototype=o.filters=o.pseudos,o.setFilters=new lt,h.sortStable=y.split("").sort(A).join("")===y,ut(),h.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(l.createElement("fieldset"))})),w.find=Q,w.expr[":"]=w.expr.pseudos,w.unique=w.uniqueSort,Q.compile=yt,Q.select=vt,Q.setDocument=ut,Q.tokenize=ct,Q.escape=w.escapeSelector,Q.getText=w.text,Q.isXML=w.isXMLDoc,Q.selectors=w.expr,Q.support=w.support,Q.uniqueSort=w.uniqueSort}();var M=function(t,e,n){for(var o=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&w(t).is(n))break;o.push(t)}return o},H=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},N=w.expr.match.needsContext,q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,e,n){return f(e)?w.grep(t,(function(t,o){return!!e.call(t,o,t)!==n})):e.nodeType?w.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?w.grep(t,(function(t){return a.call(e,t)>-1!==n})):w.filter(e,t,n)}w.filter=function(t,e,n){var o=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===o.nodeType?w.find.matchesSelector(o,t)?[o]:[]:w.find.matches(t,w.grep(e,(function(t){return 1===t.nodeType})))},w.fn.extend({find:function(t){var e,n,o=this.length,i=this;if("string"!=typeof t)return this.pushStack(w(t).filter((function(){for(e=0;e<o;e++)if(w.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<o;e++)w.find(t,i[e],n);return o>1?w.uniqueSort(n):n},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&N.test(t)?w(t):t||[],!1).length}});var F,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(t,e,n){var o,i;if(!t)return this;if(n=n||F,"string"==typeof t){if(!(o="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.exec(t))||!o[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(o[1]){if(e=e instanceof w?e[0]:e,w.merge(this,w.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:m,!0)),q.test(o[1])&&w.isPlainObject(e))for(o in e)f(this[o])?this[o](e[o]):this.attr(o,e[o]);return this}return(i=m.getElementById(o[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):f(t)?void 0!==n.ready?n.ready(t):t(w):w.makeArray(t,this)}).prototype=w.fn,F=w(m);var P=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function W(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}w.fn.extend({has:function(t){var e=w(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(w.contains(this,e[t]))return!0}))},closest:function(t,e){var n,o=0,i=this.length,r=[],s="string"!=typeof t&&w(t);if(!N.test(t))for(;o<i;o++)for(n=this[o];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?w.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?a.call(w(t),this[0]):a.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),w.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return M(t,"parentNode")},parentsUntil:function(t,e,n){return M(t,"parentNode",n)},next:function(t){return W(t,"nextSibling")},prev:function(t){return W(t,"previousSibling")},nextAll:function(t){return M(t,"nextSibling")},prevAll:function(t){return M(t,"previousSibling")},nextUntil:function(t,e,n){return M(t,"nextSibling",n)},prevUntil:function(t,e,n){return M(t,"previousSibling",n)},siblings:function(t){return H((t.parentNode||{}).firstChild,t)},children:function(t){return H(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(C(t,"template")&&(t=t.content||t),w.merge([],t.childNodes))}},(function(t,e){w.fn[t]=function(n,o){var i=w.map(this,e,n);return"Until"!==t.slice(-5)&&(o=n),o&&"string"==typeof o&&(i=w.filter(o,i)),this.length>1&&(R[t]||w.uniqueSort(i),P.test(t)&&i.reverse()),this.pushStack(i)}}));var z=/[^\x20\t\r\n\f]+/g;function U(t){return t}function Y(t){throw t}function V(t,e,n,o){var i;try{t&&f(i=t.promise)?i.call(t).done(e).fail(n):t&&f(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(o))}catch(t){n.apply(void 0,[t])}}w.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return w.each(t.match(z)||[],(function(t,n){e[n]=!0})),e}(t):w.extend({},t);var e,n,o,i,r=[],s=[],a=-1,u=function(){for(i=i||t.once,o=e=!0;s.length;a=-1)for(n=s.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=r.length,n=!1);t.memory||(n=!1),e=!1,i&&(r=n?[]:"")},l={add:function(){return r&&(n&&!e&&(a=r.length-1,s.push(n)),function e(n){w.each(n,(function(n,o){f(o)?t.unique&&l.has(o)||r.push(o):o&&o.length&&"string"!==b(o)&&e(o)}))}(arguments),n&&!e&&u()),this},remove:function(){return w.each(arguments,(function(t,e){for(var n;(n=w.inArray(e,r,n))>-1;)r.splice(n,1),n<=a&&a--})),this},has:function(t){return t?w.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return i=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return i=s=[],n||e||(r=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!o}};return l},w.extend({Deferred:function(e){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],o="pending",i={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return w.Deferred((function(e){w.each(n,(function(n,o){var i=f(t[o[4]])&&t[o[4]];r[o[1]]((function(){var t=i&&i.apply(this,arguments);t&&f(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[o[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(e,o,i){var r=0;function s(e,n,o,i){return function(){var a=this,u=arguments,l=function(){var t,l;if(!(e<r)){if((t=o.apply(a,u))===n.promise())throw new TypeError("Thenable self-resolution");l=t&&("object"==typeof t||"function"==typeof t)&&t.then,f(l)?i?l.call(t,s(r,n,U,i),s(r,n,Y,i)):(r++,l.call(t,s(r,n,U,i),s(r,n,Y,i),s(r,n,U,n.notifyWith))):(o!==U&&(a=void 0,u=[t]),(i||n.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(t){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(t,c.error),e+1>=r&&(o!==Y&&(a=void 0,u=[t]),n.rejectWith(a,u))}};e?c():(w.Deferred.getErrorHook?c.error=w.Deferred.getErrorHook():w.Deferred.getStackHook&&(c.error=w.Deferred.getStackHook()),t.setTimeout(c))}}return w.Deferred((function(t){n[0][3].add(s(0,t,f(i)?i:U,t.notifyWith)),n[1][3].add(s(0,t,f(e)?e:U)),n[2][3].add(s(0,t,f(o)?o:Y))})).promise()},promise:function(t){return null!=t?w.extend(t,i):i}},r={};return w.each(n,(function(t,e){var s=e[2],a=e[5];i[e[1]]=s.add,a&&s.add((function(){o=a}),n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),s.add(e[3].fire),r[e[0]]=function(){return r[e[0]+"With"](this===r?void 0:this,arguments),this},r[e[0]+"With"]=s.fireWith})),i.promise(r),e&&e.call(r,r),r},when:function(t){var e=arguments.length,n=e,o=Array(n),r=i.call(arguments),s=w.Deferred(),a=function(t){return function(n){o[t]=this,r[t]=arguments.length>1?i.call(arguments):n,--e||s.resolveWith(o,r)}};if(e<=1&&(V(t,s.done(a(n)).resolve,s.reject,!e),"pending"===s.state()||f(r[n]&&r[n].then)))return s.then();for(;n--;)V(r[n],a(n),s.reject);return s.promise()}});var Z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&Z.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},w.readyException=function(e){t.setTimeout((function(){throw e}))};var X=w.Deferred();function K(){m.removeEventListener("DOMContentLoaded",K),t.removeEventListener("load",K),w.ready()}w.fn.ready=function(t){return X.then(t).catch((function(t){w.readyException(t)})),this},w.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==t&&--w.readyWait>0||X.resolveWith(m,[w]))}}),w.ready.then=X.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?t.setTimeout(w.ready):(m.addEventListener("DOMContentLoaded",K),t.addEventListener("load",K));var J=function(t,e,n,o,i,r,s){var a=0,u=t.length,l=null==n;if("object"===b(n))for(a in i=!0,n)J(t,e,a,n[a],!0,r,s);else if(void 0!==o&&(i=!0,f(o)||(s=!0),l&&(s?(e.call(t,o),e=null):(l=e,e=function(t,e,n){return l.call(w(t),n)})),e))for(;a<u;a++)e(t[a],n,s?o:o.call(t[a],a,e(t[a],n)));return i?t:l?e.call(t):u?e(t[0],n):r},G=/^-ms-/,Q=/-([a-z])/g;function tt(t,e){return e.toUpperCase()}function et(t){return t.replace(G,"ms-").replace(Q,tt)}var nt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=w.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},nt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var o,i=this.cache(t);if("string"==typeof e)i[et(e)]=n;else for(o in e)i[et(o)]=e[o];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][et(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,o=t[this.expando];if(void 0!==o){if(void 0!==e){n=(e=Array.isArray(e)?e.map(et):(e=et(e))in o?[e]:e.match(z)||[]).length;for(;n--;)delete o[e[n]]}(void 0===e||w.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!w.isEmptyObject(e)}};var it=new ot,rt=new ot,st=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,at=/[A-Z]/g;function ut(t,e,n){var o;if(void 0===n&&1===t.nodeType)if(o="data-"+e.replace(at,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(o))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:st.test(t)?JSON.parse(t):t)}(n)}catch(i){}rt.set(t,e,n)}else n=void 0;return n}w.extend({hasData:function(t){return rt.hasData(t)||it.hasData(t)},data:function(t,e,n){return rt.access(t,e,n)},removeData:function(t,e){rt.remove(t,e)},_data:function(t,e,n){return it.access(t,e,n)},_removeData:function(t,e){it.remove(t,e)}}),w.fn.extend({data:function(t,e){var n,o,i,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(i=rt.get(r),1===r.nodeType&&!it.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(o=s[n].name).indexOf("data-")&&(o=et(o.slice(5)),ut(r,o,i[o]));it.set(r,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){rt.set(this,t)})):J(this,(function(e){var n;if(r&&void 0===e)return void 0!==(n=rt.get(r,t))||void 0!==(n=ut(r,t))?n:void 0;this.each((function(){rt.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){rt.remove(this,t)}))}}),w.extend({queue:function(t,e,n){var o;if(t)return e=(e||"fx")+"queue",o=it.get(t,e),n&&(!o||Array.isArray(n)?o=it.access(t,e,w.makeArray(n)):o.push(n)),o||[]},dequeue:function(t,e){e=e||"fx";var n=w.queue(t,e),o=n.length,i=n.shift(),r=w._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===e&&n.unshift("inprogress"),delete r.stop,i.call(t,(function(){w.dequeue(t,e)}),r)),!o&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return it.get(t,n)||it.access(t,n,{empty:w.Callbacks("once memory").add((function(){it.remove(t,[e+"queue",n])}))})}}),w.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?w.queue(this[0],t):void 0===e?this:this.each((function(){var n=w.queue(this,t,e);w._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&w.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){w.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,o=1,i=w.Deferred(),r=this,s=this.length,a=function(){--o||i.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=it.get(r[s],t+"queueHooks"))&&n.empty&&(o++,n.empty.add(a));return a(),i.promise(e)}});var lt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ct=new RegExp("^(?:([+-])=|)("+lt+")([a-z%]*)$","i"),dt=["Top","Right","Bottom","Left"],pt=m.documentElement,ht=function(t){return w.contains(t.ownerDocument,t)},ft={composed:!0};pt.getRootNode&&(ht=function(t){return w.contains(t.ownerDocument,t)||t.getRootNode(ft)===t.ownerDocument});var gt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ht(t)&&"none"===w.css(t,"display")};function mt(t,e,n,o){var i,r,s=20,a=o?function(){return o.cur()}:function(){return w.css(t,e,"")},u=a(),l=n&&n[3]||(w.cssNumber[e]?"":"px"),c=t.nodeType&&(w.cssNumber[e]||"px"!==l&&+u)&&ct.exec(w.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)w.style(t,e,c+l),(1-r)*(1-(r=a()/u||.5))<=0&&(s=0),c/=r;c*=2,w.style(t,e,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],o&&(o.unit=l,o.start=c,o.end=i)),i}var yt={};function vt(t){var e,n=t.ownerDocument,o=t.nodeName,i=yt[o];return i||(e=n.body.appendChild(n.createElement(o)),i=w.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),yt[o]=i,i)}function bt(t,e){for(var n,o,i=[],r=0,s=t.length;r<s;r++)(o=t[r]).style&&(n=o.style.display,e?("none"===n&&(i[r]=it.get(o,"display")||null,i[r]||(o.style.display="")),""===o.style.display&>(o)&&(i[r]=vt(o))):"none"!==n&&(i[r]="none",it.set(o,"display",n)));for(r=0;r<s;r++)null!=i[r]&&(t[r].style.display=i[r]);return t}w.fn.extend({show:function(){return bt(this,!0)},hide:function(){return bt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){gt(this)?w(this).show():w(this).hide()}))}});var xt,kt,wt=/^(?:checkbox|radio)$/i,Dt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ct=/^$|^module$|\/(?:java|ecma)script/i;xt=m.createDocumentFragment().appendChild(m.createElement("div")),(kt=m.createElement("input")).setAttribute("type","radio"),kt.setAttribute("checked","checked"),kt.setAttribute("name","t"),xt.appendChild(kt),h.checkClone=xt.cloneNode(!0).cloneNode(!0).lastChild.checked,xt.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!xt.cloneNode(!0).lastChild.defaultValue,xt.innerHTML="<option></option>",h.option=!!xt.lastChild;var Tt={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 jt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&C(t,e)?w.merge([t],n):n}function $t(t,e){for(var n=0,o=t.length;n<o;n++)it.set(t[n],"globalEval",!e||it.get(e[n],"globalEval"))}Tt.tbody=Tt.tfoot=Tt.colgroup=Tt.caption=Tt.thead,Tt.th=Tt.td,h.option||(Tt.optgroup=Tt.option=[1,"<select multiple='multiple'>","</select>"]);var St=/<|&#?\w+;/;function Lt(t,e,n,o,i){for(var r,s,a,u,l,c,d=e.createDocumentFragment(),p=[],h=0,f=t.length;h<f;h++)if((r=t[h])||0===r)if("object"===b(r))w.merge(p,r.nodeType?[r]:r);else if(St.test(r)){for(s=s||d.appendChild(e.createElement("div")),a=(Dt.exec(r)||["",""])[1].toLowerCase(),u=Tt[a]||Tt._default,s.innerHTML=u[1]+w.htmlPrefilter(r)+u[2],c=u[0];c--;)s=s.lastChild;w.merge(p,s.childNodes),(s=d.firstChild).textContent=""}else p.push(e.createTextNode(r));for(d.textContent="",h=0;r=p[h++];)if(o&&w.inArray(r,o)>-1)i&&i.push(r);else if(l=ht(r),s=jt(d.appendChild(r),"script"),l&&$t(s),n)for(c=0;r=s[c++];)Ct.test(r.type||"")&&n.push(r);return d}var Et=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function _t(){return!1}function Bt(t,e,n,o,i,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(o=o||n,n=void 0),e)Bt(t,a,n,o,e[a],r);return t}if(null==o&&null==i?(i=n,o=n=void 0):null==i&&("string"==typeof n?(i=o,o=void 0):(i=o,o=n,n=void 0)),!1===i)i=_t;else if(!i)return t;return 1===r&&(s=i,i=function(t){return w().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=w.guid++)),t.each((function(){w.event.add(this,e,i,o,n)}))}function Mt(t,e,n){n?(it.set(t,e,!1),w.event.add(t,e,{namespace:!1,handler:function(t){var n,o=it.get(this,e);if(1&t.isTrigger&&this[e]){if(o)(w.event.special[e]||{}).delegateType&&t.stopPropagation();else if(o=i.call(arguments),it.set(this,e,o),this[e](),n=it.get(this,e),it.set(this,e,!1),o!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else o&&(it.set(this,e,w.event.trigger(o[0],o.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=At)}})):void 0===it.get(t,e)&&w.event.add(t,e,At)}w.event={global:{},add:function(t,e,n,o,i){var r,s,a,u,l,c,d,p,h,f,g,m=it.get(t);if(nt(t))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&w.find.matchesSelector(pt,i),n.guid||(n.guid=w.guid++),(u=m.events)||(u=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(z)||[""]).length;l--;)h=g=(a=Et.exec(e[l])||[])[1],f=(a[2]||"").split(".").sort(),h&&(d=w.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=w.event.special[h]||{},c=w.extend({type:h,origType:g,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:f.join(".")},r),(p=u[h])||((p=u[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,o,f,s)||t.addEventListener&&t.addEventListener(h,s)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[h]=!0)},remove:function(t,e,n,o,i){var r,s,a,u,l,c,d,p,h,f,g,m=it.hasData(t)&&it.get(t);if(m&&(u=m.events)){for(l=(e=(e||"").match(z)||[""]).length;l--;)if(h=g=(a=Et.exec(e[l])||[])[1],f=(a[2]||"").split(".").sort(),h){for(d=w.event.special[h]||{},p=u[h=(o?d.delegateType:d.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=p.length;r--;)c=p[r],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||o&&o!==c.selector&&("**"!==o||!c.selector)||(p.splice(r,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(t,c));s&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,m.handle)||w.removeEvent(t,h,m.handle),delete u[h])}else for(h in u)w.event.remove(t,h+e[l],n,o,!0);w.isEmptyObject(u)&&it.remove(t,"handle events")}},dispatch:function(t){var e,n,o,i,r,s,a=new Array(arguments.length),u=w.event.fix(t),l=(it.get(this,"events")||Object.create(null))[u.type]||[],c=w.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){for(s=w.event.handlers.call(this,u,l),e=0;(i=s[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(r=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==r.namespace&&!u.rnamespace.test(r.namespace)||(u.handleObj=r,u.data=r.data,void 0!==(o=((w.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,a))&&!1===(u.result=o)&&(u.preventDefault(),u.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,o,i,r,s,a=[],u=e.delegateCount,l=t.target;if(u&&l.nodeType&&!("click"===t.type&&t.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==t.type||!0!==l.disabled)){for(r=[],s={},n=0;n<u;n++)void 0===s[i=(o=e[n]).selector+" "]&&(s[i]=o.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),s[i]&&r.push(o);r.length&&a.push({elem:l,handlers:r})}return l=this,u<e.length&&a.push({elem:l,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(w.Event.prototype,t,{enumerable:!0,configurable:!0,get:f(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(t){return t[w.expando]?t:new w.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return wt.test(e.type)&&e.click&&C(e,"input")&&Mt(e,"click",!0),!1},trigger:function(t){var e=this||t;return wt.test(e.type)&&e.click&&C(e,"input")&&Mt(e,"click"),!0},_default:function(t){var e=t.target;return wt.test(e.type)&&e.click&&C(e,"input")&&it.get(e,"click")||C(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},w.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},w.Event=function(t,e){if(!(this instanceof w.Event))return new w.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?At:_t,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&w.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:_t,isPropagationStopped:_t,isImmediatePropagationStopped:_t,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=At,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=At,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=At,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},w.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},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(m.documentMode){var n=it.get(this,"handle"),o=w.event.fix(t);o.type="focusin"===t.type?"focus":"blur",o.isSimulated=!0,n(t),o.target===o.currentTarget&&n(o)}else w.event.simulate(e,t.target,w.event.fix(t))}w.event.special[t]={setup:function(){var o;if(Mt(this,t,!0),!m.documentMode)return!1;(o=it.get(this,e))||this.addEventListener(e,n),it.set(this,e,(o||0)+1)},trigger:function(){return Mt(this,t),!0},teardown:function(){var t;if(!m.documentMode)return!1;(t=it.get(this,e)-1)?it.set(this,e,t):(this.removeEventListener(e,n),it.remove(this,e))},_default:function(e){return it.get(e.target,t)},delegateType:e},w.event.special[e]={setup:function(){var o=this.ownerDocument||this.document||this,i=m.documentMode?this:o,r=it.get(i,e);r||(m.documentMode?this.addEventListener(e,n):o.addEventListener(t,n,!0)),it.set(i,e,(r||0)+1)},teardown:function(){var o=this.ownerDocument||this.document||this,i=m.documentMode?this:o,r=it.get(i,e)-1;r?it.set(i,e,r):(m.documentMode?this.removeEventListener(e,n):o.removeEventListener(t,n,!0),it.remove(i,e))}}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){w.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,o=t.relatedTarget,i=t.handleObj;return o&&(o===this||w.contains(this,o))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),w.fn.extend({on:function(t,e,n,o){return Bt(this,t,e,n,o)},one:function(t,e,n,o){return Bt(this,t,e,n,o,1)},off:function(t,e,n){var o,i;if(t&&t.preventDefault&&t.handleObj)return o=t.handleObj,w(t.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=_t),this.each((function(){w.event.remove(this,t,n,e)}))}});var Ht=/<script|<style|<link/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,qt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ot(t,e){return C(t,"table")&&C(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Ft(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function It(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Pt(t,e){var n,o,i,r,s,a;if(1===e.nodeType){if(it.hasData(t)&&(a=it.get(t).events))for(i in it.remove(e,"handle events"),a)for(n=0,o=a[i].length;n<o;n++)w.event.add(e,i,a[i][n]);rt.hasData(t)&&(r=rt.access(t),s=w.extend({},r),rt.set(e,s))}}function Rt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&wt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Wt(t,e,n,o){e=r(e);var i,s,a,u,l,c,d=0,p=t.length,g=p-1,m=e[0],y=f(m);if(y||p>1&&"string"==typeof m&&!h.checkClone&&Nt.test(m))return t.each((function(i){var r=t.eq(i);y&&(e[0]=m.call(this,i,r.html())),Wt(r,e,n,o)}));if(p&&(s=(i=Lt(e,t[0].ownerDocument,!1,t,o)).firstChild,1===i.childNodes.length&&(i=s),s||o)){for(u=(a=w.map(jt(i,"script"),Ft)).length;d<p;d++)l=i,d!==g&&(l=w.clone(l,!0,!0),u&&w.merge(a,jt(l,"script"))),n.call(t[d],l,d);if(u)for(c=a[a.length-1].ownerDocument,w.map(a,It),d=0;d<u;d++)l=a[d],Ct.test(l.type||"")&&!it.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&!l.noModule&&w._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):v(l.textContent.replace(qt,""),l,c))}return t}function zt(t,e,n){for(var o,i=e?w.filter(e,t):t,r=0;null!=(o=i[r]);r++)n||1!==o.nodeType||w.cleanData(jt(o)),o.parentNode&&(n&&ht(o)&&$t(jt(o,"script")),o.parentNode.removeChild(o));return t}w.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var o,i,r,s,a=t.cloneNode(!0),u=ht(t);if(!(h.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||w.isXMLDoc(t)))for(s=jt(a),o=0,i=(r=jt(t)).length;o<i;o++)Rt(r[o],s[o]);if(e)if(n)for(r=r||jt(t),s=s||jt(a),o=0,i=r.length;o<i;o++)Pt(r[o],s[o]);else Pt(t,a);return(s=jt(a,"script")).length>0&&$t(s,!u&&jt(t,"script")),a},cleanData:function(t){for(var e,n,o,i=w.event.special,r=0;void 0!==(n=t[r]);r++)if(nt(n)){if(e=n[it.expando]){if(e.events)for(o in e.events)i[o]?w.event.remove(n,o):w.removeEvent(n,o,e.handle);n[it.expando]=void 0}n[rt.expando]&&(n[rt.expando]=void 0)}}}),w.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return J(this,(function(t){return void 0===t?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Wt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ot(this,t).appendChild(t)}))},prepend:function(){return Wt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ot(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Wt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(w.cleanData(jt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return w.clone(this,t,e)}))},html:function(t){return J(this,(function(t){var e=this[0]||{},n=0,o=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ht.test(t)&&!Tt[(Dt.exec(t)||["",""])[1].toLowerCase()]){t=w.htmlPrefilter(t);try{for(;n<o;n++)1===(e=this[n]||{}).nodeType&&(w.cleanData(jt(e,!1)),e.innerHTML=t);e=0}catch(i){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Wt(this,arguments,(function(e){var n=this.parentNode;w.inArray(this,t)<0&&(w.cleanData(jt(this)),n&&n.replaceChild(e,this))}),t)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){w.fn[t]=function(t){for(var n,o=[],i=w(t),r=i.length-1,a=0;a<=r;a++)n=a===r?this:this.clone(!0),w(i[a])[e](n),s.apply(o,n.get());return this.pushStack(o)}}));var Ut=new RegExp("^("+lt+")(?!px)[a-z%]+$","i"),Yt=/^--/,Vt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Zt=function(t,e,n){var o,i,r={};for(i in e)r[i]=t.style[i],t.style[i]=e[i];for(i in o=n.call(t),e)t.style[i]=r[i];return o},Xt=new RegExp(dt.join("|"),"i");function Kt(t,e,n){var o,i,r,s,a=Yt.test(e),u=t.style;return(n=n||Vt(t))&&(s=n.getPropertyValue(e)||n[e],a&&s&&(s=s.replace(L,"$1")||void 0),""!==s||ht(t)||(s=w.style(t,e)),!h.pixelBoxStyles()&&Ut.test(s)&&Xt.test(e)&&(o=u.width,i=u.minWidth,r=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=o,u.minWidth=i,u.maxWidth=r)),void 0!==s?s+"":s}function Jt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",pt.appendChild(l).appendChild(c);var e=t.getComputedStyle(c);o="1%"!==e.top,u=12===n(e.marginLeft),c.style.right="60%",s=36===n(e.right),i=36===n(e.width),c.style.position="absolute",r=12===n(c.offsetWidth/3),pt.removeChild(l),c=null}}function n(t){return Math.round(parseFloat(t))}var o,i,r,s,a,u,l=m.createElement("div"),c=m.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),o},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),r},reliableTrDimensions:function(){var e,n,o,i;return null==a&&(e=m.createElement("table"),n=m.createElement("tr"),o=m.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="box-sizing:content-box;border:1px solid",n.style.height="1px",o.style.height="9px",o.style.display="block",pt.appendChild(e).appendChild(n).appendChild(o),i=t.getComputedStyle(n),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,pt.removeChild(e)),a}}))}();var Gt=["Webkit","Moz","ms"],Qt=m.createElement("div").style,te={};function ee(t){var e=w.cssProps[t]||te[t];return e||(t in Qt?t:te[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Gt.length;n--;)if((t=Gt[n]+e)in Qt)return t}(t)||t)}var ne=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},ie={letterSpacing:"0",fontWeight:"400"};function re(t,e,n){var o=ct.exec(e);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):e}function se(t,e,n,o,i,r){var s="width"===e?1:0,a=0,u=0,l=0;if(n===(o?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=w.css(t,n+dt[s],!0,i)),o?("content"===n&&(u-=w.css(t,"padding"+dt[s],!0,i)),"margin"!==n&&(u-=w.css(t,"border"+dt[s]+"Width",!0,i))):(u+=w.css(t,"padding"+dt[s],!0,i),"padding"!==n?u+=w.css(t,"border"+dt[s]+"Width",!0,i):a+=w.css(t,"border"+dt[s]+"Width",!0,i));return!o&&r>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-u-a-.5))||0),u+l}function ae(t,e,n){var o=Vt(t),i=(!h.boxSizingReliable()||n)&&"border-box"===w.css(t,"boxSizing",!1,o),r=i,s=Kt(t,e,o),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ut.test(s)){if(!n)return s;s="auto"}return(!h.boxSizingReliable()&&i||!h.reliableTrDimensions()&&C(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===w.css(t,"display",!1,o))&&t.getClientRects().length&&(i="border-box"===w.css(t,"boxSizing",!1,o),(r=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+se(t,e,n||(i?"border":"content"),r,o,s)+"px"}function ue(t,e,n,o,i){return new ue.prototype.init(t,e,n,o,i)}w.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Kt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,o){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,r,s,a=et(e),u=Yt.test(e),l=t.style;if(u||(e=ee(a)),s=w.cssHooks[e]||w.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(t,!1,o))?i:l[e];"string"===(r=typeof n)&&(i=ct.exec(n))&&i[1]&&(n=mt(t,e,i),r="number"),null!=n&&n==n&&("number"!==r||u||(n+=i&&i[3]||(w.cssNumber[a]?"":"px")),h.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,o))||(u?l.setProperty(e,n):l[e]=n))}},css:function(t,e,n,o){var i,r,s,a=et(e);return Yt.test(e)||(e=ee(a)),(s=w.cssHooks[e]||w.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Kt(t,e,o)),"normal"===i&&e in ie&&(i=ie[e]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),w.each(["height","width"],(function(t,e){w.cssHooks[e]={get:function(t,n,o){if(n)return!ne.test(w.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ae(t,e,o):Zt(t,oe,(function(){return ae(t,e,o)}))},set:function(t,n,o){var i,r=Vt(t),s=!h.scrollboxSize()&&"absolute"===r.position,a=(s||o)&&"border-box"===w.css(t,"boxSizing",!1,r),u=o?se(t,e,o,a,r):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-se(t,e,"border",!1,r)-.5)),u&&(i=ct.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=w.css(t,e)),re(0,n,u)}}})),w.cssHooks.marginLeft=Jt(h.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Kt(t,"marginLeft"))||t.getBoundingClientRect().left-Zt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(t,e){w.cssHooks[t+e]={expand:function(n){for(var o=0,i={},r="string"==typeof n?n.split(" "):[n];o<4;o++)i[t+dt[o]+e]=r[o]||r[o-2]||r[0];return i}},"margin"!==t&&(w.cssHooks[t+e].set=re)})),w.fn.extend({css:function(t,e){return J(this,(function(t,e,n){var o,i,r={},s=0;if(Array.isArray(e)){for(o=Vt(t),i=e.length;s<i;s++)r[e[s]]=w.css(t,e[s],!1,o);return r}return void 0!==n?w.style(t,e,n):w.css(t,e)}),t,e,arguments.length>1)}}),w.Tween=ue,ue.prototype={constructor:ue,init:function(t,e,n,o,i,r){this.elem=t,this.prop=n,this.easing=i||w.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=o,this.unit=r||(w.cssNumber[n]?"":"px")},cur:function(){var t=ue.propHooks[this.prop];return t&&t.get?t.get(this):ue.propHooks._default.get(this)},run:function(t){var e,n=ue.propHooks[this.prop];return this.options.duration?this.pos=e=w.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ue.propHooks._default.set(this),this}},ue.prototype.init.prototype=ue.prototype,ue.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=w.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){w.fx.step[t.prop]?w.fx.step[t.prop](t):1!==t.elem.nodeType||!w.cssHooks[t.prop]&&null==t.elem.style[ee(t.prop)]?t.elem[t.prop]=t.now:w.style(t.elem,t.prop,t.now+t.unit)}}},ue.propHooks.scrollTop=ue.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},w.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},w.fx=ue.prototype.init,w.fx.step={};var le,ce,de=/^(?:toggle|show|hide)$/,pe=/queueHooks$/;function he(){ce&&(!1===m.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(he):t.setTimeout(he,w.fx.interval),w.fx.tick())}function fe(){return t.setTimeout((function(){le=void 0})),le=Date.now()}function ge(t,e){var n,o=0,i={height:t};for(e=e?1:0;o<4;o+=2-e)i["margin"+(n=dt[o])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function me(t,e,n){for(var o,i=(ye.tweeners[e]||[]).concat(ye.tweeners["*"]),r=0,s=i.length;r<s;r++)if(o=i[r].call(n,e,t))return o}function ye(t,e,n){var o,i,r=0,s=ye.prefilters.length,a=w.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=le||fe(),n=Math.max(0,l.startTime+l.duration-e),o=1-(n/l.duration||0),r=0,s=l.tweens.length;r<s;r++)l.tweens[r].run(o);return a.notifyWith(t,[l,o,n]),o<1&&s?n:(s||a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:w.extend({},e),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:e,originalOptions:n,startTime:le||fe(),duration:n.duration,tweens:[],createTween:function(e,n){var o=w.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(o),o},stop:function(e){var n=0,o=e?l.tweens.length:0;if(i)return this;for(i=!0;n<o;n++)l.tweens[n].run(1);return e?(a.notifyWith(t,[l,1,0]),a.resolveWith(t,[l,e])):a.rejectWith(t,[l,e]),this}}),c=l.props;for(!function(t,e){var n,o,i,r,s;for(n in t)if(i=e[o=et(n)],r=t[n],Array.isArray(r)&&(i=r[1],r=t[n]=r[0]),n!==o&&(t[o]=r,delete t[n]),(s=w.cssHooks[o])&&"expand"in s)for(n in r=s.expand(r),delete t[o],r)n in t||(t[n]=r[n],e[n]=i);else e[o]=i}(c,l.opts.specialEasing);r<s;r++)if(o=ye.prefilters[r].call(l,t,c,l.opts))return f(o.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=o.stop.bind(o)),o;return w.map(c,me,l),f(l.opts.start)&&l.opts.start.call(t,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(ye,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return mt(n.elem,t,ct.exec(e),n),n}]},tweener:function(t,e){f(t)?(e=t,t=["*"]):t=t.match(z);for(var n,o=0,i=t.length;o<i;o++)n=t[o],ye.tweeners[n]=ye.tweeners[n]||[],ye.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var o,i,r,s,a,u,l,c,d="width"in e||"height"in e,p=this,h={},f=t.style,g=t.nodeType&>(t),m=it.get(t,"fxshow");for(o in n.queue||(null==(s=w._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always((function(){p.always((function(){s.unqueued--,w.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[o],de.test(i)){if(delete e[o],r=r||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!m||void 0===m[o])continue;g=!0}h[o]=m&&m[o]||w.style(t,o)}if((u=!w.isEmptyObject(e))||!w.isEmptyObject(h))for(o in d&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=m&&m.display)&&(l=it.get(t,"display")),"none"===(c=w.css(t,"display"))&&(l?c=l:(bt([t],!0),l=t.style.display||l,c=w.css(t,"display"),bt([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(t,"float")&&(u||(p.done((function(){f.display=l})),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",p.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),u=!1,h)u||(m?"hidden"in m&&(g=m.hidden):m=it.access(t,"fxshow",{display:l}),r&&(m.hidden=!g),g&&bt([t],!0),p.done((function(){for(o in g||bt([t]),it.remove(t,"fxshow"),h)w.style(t,o,h[o])}))),u=me(g?m[o]:0,o,p),o in m||(m[o]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?ye.prefilters.unshift(t):ye.prefilters.push(t)}}),w.speed=function(t,e,n){var o=t&&"object"==typeof t?w.extend({},t):{complete:n||!n&&e||f(t)&&t,duration:t,easing:n&&e||e&&!f(e)&&e};return w.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in w.fx.speeds?o.duration=w.fx.speeds[o.duration]:o.duration=w.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){f(o.old)&&o.old.call(this),o.queue&&w.dequeue(this,o.queue)},o},w.fn.extend({fadeTo:function(t,e,n,o){return this.filter(gt).css("opacity",0).show().end().animate({opacity:e},t,n,o)},animate:function(t,e,n,o){var i=w.isEmptyObject(t),r=w.speed(e,n,o),s=function(){var e=ye(this,w.extend({},t),r);(i||it.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var o=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",r=w.timers,s=it.get(this);if(i)s[i]&&s[i].stop&&o(s[i]);else for(i in s)s[i]&&s[i].stop&&pe.test(i)&&o(s[i]);for(i=r.length;i--;)r[i].elem!==this||null!=t&&r[i].queue!==t||(r[i].anim.stop(n),e=!1,r.splice(i,1));!e&&n||w.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=it.get(this),o=n[t+"queue"],i=n[t+"queueHooks"],r=w.timers,s=o?o.length:0;for(n.finish=!0,w.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)o[e]&&o[e].finish&&o[e].finish.call(this);delete n.finish}))}}),w.each(["toggle","show","hide"],(function(t,e){var n=w.fn[e];w.fn[e]=function(t,o,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ge(e,!0),t,o,i)}})),w.each({slideDown:ge("show"),slideUp:ge("hide"),slideToggle:ge("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){w.fn[t]=function(t,n,o){return this.animate(e,t,n,o)}})),w.timers=[],w.fx.tick=function(){var t,e=0,n=w.timers;for(le=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||w.fx.stop(),le=void 0},w.fx.timer=function(t){w.timers.push(t),w.fx.start()},w.fx.interval=13,w.fx.start=function(){ce||(ce=!0,he())},w.fx.stop=function(){ce=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(e,n){return e=w.fx&&w.fx.speeds[e]||e,n=n||"fx",this.queue(n,(function(n,o){var i=t.setTimeout(n,e);o.stop=function(){t.clearTimeout(i)}}))},function(){var t=m.createElement("input"),e=m.createElement("select").appendChild(m.createElement("option"));t.type="checkbox",h.checkOn=""!==t.value,h.optSelected=e.selected,(t=m.createElement("input")).value="t",t.type="radio",h.radioValue="t"===t.value}();var ve,be=w.expr.attrHandle;w.fn.extend({attr:function(t,e){return J(this,w.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){w.removeAttr(this,t)}))}}),w.extend({attr:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?w.prop(t,e,n):(1===r&&w.isXMLDoc(t)||(i=w.attrHooks[e.toLowerCase()]||(w.expr.match.bool.test(e)?ve:void 0)),void 0!==n?null===n?void w.removeAttr(t,e):i&&"set"in i&&void 0!==(o=i.set(t,n,e))?o:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(o=i.get(t,e))?o:null==(o=w.find.attr(t,e))?void 0:o)},attrHooks:{type:{set:function(t,e){if(!h.radioValue&&"radio"===e&&C(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,o=0,i=e&&e.match(z);if(i&&1===t.nodeType)for(;n=i[o++];)t.removeAttribute(n)}}),ve={set:function(t,e,n){return!1===e?w.removeAttr(t,n):t.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=be[e]||w.find.attr;be[e]=function(t,e,o){var i,r,s=e.toLowerCase();return o||(r=be[s],be[s]=i,i=null!=n(t,e,o)?s:null,be[s]=r),i}}));var xe=/^(?:input|select|textarea|button)$/i,ke=/^(?:a|area)$/i;function we(t){return(t.match(z)||[]).join(" ")}function De(t){return t.getAttribute&&t.getAttribute("class")||""}function Ce(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(z)||[]}w.fn.extend({prop:function(t,e){return J(this,w.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[w.propFix[t]||t]}))}}),w.extend({prop:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&w.isXMLDoc(t)||(e=w.propFix[e]||e,i=w.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(t,n,e))?o:t[e]=n:i&&"get"in i&&null!==(o=i.get(t,e))?o:t[e]},propHooks:{tabIndex:{get:function(t){var e=w.find.attr(t,"tabindex");return e?parseInt(e,10):xe.test(t.nodeName)||ke.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(w.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(t){var e,n,o,i,r,s;return f(t)?this.each((function(e){w(this).addClass(t.call(this,e,De(this)))})):(e=Ce(t)).length?this.each((function(){if(o=De(this),n=1===this.nodeType&&" "+we(o)+" "){for(r=0;r<e.length;r++)i=e[r],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=we(n),o!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,o,i,r,s;return f(t)?this.each((function(e){w(this).removeClass(t.call(this,e,De(this)))})):arguments.length?(e=Ce(t)).length?this.each((function(){if(o=De(this),n=1===this.nodeType&&" "+we(o)+" "){for(r=0;r<e.length;r++)for(i=e[r];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=we(n),o!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,o,i,r,s=typeof t,a="string"===s||Array.isArray(t);return f(t)?this.each((function(n){w(this).toggleClass(t.call(this,n,De(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Ce(t),this.each((function(){if(a)for(r=w(this),i=0;i<n.length;i++)o=n[i],r.hasClass(o)?r.removeClass(o):r.addClass(o);else void 0!==t&&"boolean"!==s||((o=De(this))&&it.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",o||!1===t?"":it.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,o=0;for(e=" "+t+" ";n=this[o++];)if(1===n.nodeType&&(" "+we(De(n))+" ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g;w.fn.extend({val:function(t){var e,n,o,i=this[0];return arguments.length?(o=f(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=o?t.call(this,n,w(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,(function(t){return null==t?"":t+""}))),(e=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Te,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(t){var e=w.find.attr(t,"value");return null!=e?e:we(w.text(t))}},select:{get:function(t){var e,n,o,i=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?r+1:i.length;for(o=r<0?u:s?r:0;o<u;o++)if(((n=i[o]).selected||o===r)&&!n.disabled&&(!n.parentNode.disabled||!C(n.parentNode,"optgroup"))){if(e=w(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,o,i=t.options,r=w.makeArray(e),s=i.length;s--;)((o=i[s]).selected=w.inArray(w.valHooks.option.get(o),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=w.inArray(w(t).val(),e)>-1}},h.checkOn||(w.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var je=t.location,$e={guid:Date.now()},Se=/\?/;w.parseXML=function(e){var n,o;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(i){}return o=n&&n.getElementsByTagName("parsererror")[0],n&&!o||w.error("Invalid XML: "+(o?w.map(o.childNodes,(function(t){return t.textContent})).join("\n"):e)),n};var Le=/^(?:focusinfocus|focusoutblur)$/,Ee=function(t){t.stopPropagation()};w.extend(w.event,{trigger:function(e,n,o,i){var r,s,a,u,l,d,p,h,y=[o||m],v=c.call(e,"type")?e.type:e,b=c.call(e,"namespace")?e.namespace.split("."):[];if(s=h=a=o=o||m,3!==o.nodeType&&8!==o.nodeType&&!Le.test(v+w.event.triggered)&&(v.indexOf(".")>-1&&(b=v.split("."),v=b.shift(),b.sort()),l=v.indexOf(":")<0&&"on"+v,(e=e[w.expando]?e:new w.Event(v,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=o),n=null==n?[e]:w.makeArray(n,[e]),p=w.event.special[v]||{},i||!p.trigger||!1!==p.trigger.apply(o,n))){if(!i&&!p.noBubble&&!g(o)){for(u=p.delegateType||v,Le.test(u+v)||(s=s.parentNode);s;s=s.parentNode)y.push(s),a=s;a===(o.ownerDocument||m)&&y.push(a.defaultView||a.parentWindow||t)}for(r=0;(s=y[r++])&&!e.isPropagationStopped();)h=s,e.type=r>1?u:p.bindType||v,(d=(it.get(s,"events")||Object.create(null))[e.type]&&it.get(s,"handle"))&&d.apply(s,n),(d=l&&s[l])&&d.apply&&nt(s)&&(e.result=d.apply(s,n),!1===e.result&&e.preventDefault());return e.type=v,i||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!nt(o)||l&&f(o[v])&&!g(o)&&((a=o[l])&&(o[l]=null),w.event.triggered=v,e.isPropagationStopped()&&h.addEventListener(v,Ee),o[v](),e.isPropagationStopped()&&h.removeEventListener(v,Ee),w.event.triggered=void 0,a&&(o[l]=a)),e.result}},simulate:function(t,e,n){var o=w.extend(new w.Event,n,{type:t,isSimulated:!0});w.event.trigger(o,null,e)}}),w.fn.extend({trigger:function(t,e){return this.each((function(){w.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return w.event.trigger(t,e,n,!0)}});var Ae=/\[\]$/,_e=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,Me=/^(?:input|select|textarea|keygen)/i;function He(t,e,n,o){var i;if(Array.isArray(e))w.each(e,(function(e,i){n||Ae.test(t)?o(t,i):He(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,o)}));else if(n||"object"!==b(e))o(t,e);else for(i in e)He(t+"["+i+"]",e[i],n,o)}w.param=function(t,e){var n,o=[],i=function(t,e){var n=f(e)?e():e;o[o.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!w.isPlainObject(t))w.each(t,(function(){i(this.name,this.value)}));else for(n in t)He(n,t[n],e,i);return o.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=w.prop(this,"elements");return t?w.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!w(this).is(":disabled")&&Me.test(this.nodeName)&&!Be.test(t)&&(this.checked||!wt.test(t))})).map((function(t,e){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(t){return{name:e.name,value:t.replace(_e,"\r\n")}})):{name:e.name,value:n.replace(_e,"\r\n")}})).get()}});var Ne=/%20/g,qe=/#.*$/,Oe=/([?&])_=[^&]*/,Fe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ie=/^(?:GET|HEAD)$/,Pe=/^\/\//,Re={},We={},ze="*/".concat("*"),Ue=m.createElement("a");function Ye(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var o,i=0,r=e.toLowerCase().match(z)||[];if(f(n))for(;o=r[i++];)"+"===o[0]?(o=o.slice(1)||"*",(t[o]=t[o]||[]).unshift(n)):(t[o]=t[o]||[]).push(n)}}function Ve(t,e,n,o){var i={},r=t===We;function s(a){var u;return i[a]=!0,w.each(t[a]||[],(function(t,a){var l=a(e,n,o);return"string"!=typeof l||r||i[l]?r?!(u=l):void 0:(e.dataTypes.unshift(l),s(l),!1)})),u}return s(e.dataTypes[0])||!i["*"]&&s("*")}function Ze(t,e){var n,o,i=w.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:o||(o={}))[n]=e[n]);return o&&w.extend(!0,t,o),t}Ue.href=je.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:je.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(je.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ze(Ze(t,w.ajaxSettings),e):Ze(w.ajaxSettings,t)},ajaxPrefilter:Ye(Re),ajaxTransport:Ye(We),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var o,i,r,s,a,u,l,c,d,p,h=w.ajaxSetup({},n),f=h.context||h,g=h.context&&(f.nodeType||f.jquery)?w(f):w.event,y=w.Deferred(),v=w.Callbacks("once memory"),b=h.statusCode||{},x={},k={},D="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Fe.exec(r);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?r:null},setRequestHeader:function(t,e){return null==l&&(t=k[t.toLowerCase()]=k[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||D;return o&&o.abort(e),T(0,e),this}};if(y.promise(C),h.url=((e||h.url||je.href)+"").replace(Pe,je.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(z)||[""],null==h.crossDomain){u=m.createElement("a");try{u.href=h.url,u.href=u.href,h.crossDomain=Ue.protocol+"//"+Ue.host!=u.protocol+"//"+u.host}catch(j){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),Ve(Re,h,n,C),l)return C;for(d in(c=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ie.test(h.type),i=h.url.replace(qe,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ne,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Se.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Oe,"$1"),p=(Se.test(i)?"&":"?")+"_="+$e.guid+++p),h.url=i+p),h.ifModified&&(w.lastModified[i]&&C.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&C.setRequestHeader("If-None-Match",w.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+ze+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(f,C,h)||l))return C.abort();if(D="abort",v.add(h.complete),C.done(h.success),C.fail(h.error),o=Ve(We,h,n,C)){if(C.readyState=1,c&&g.trigger("ajaxSend",[C,h]),l)return C;h.async&&h.timeout>0&&(a=t.setTimeout((function(){C.abort("timeout")}),h.timeout));try{l=!1,o.send(x,T)}catch(j){if(l)throw j;T(-1,j)}}else T(-1,"No Transport");function T(e,n,s,u){var d,p,m,x,k,D=n;l||(l=!0,a&&t.clearTimeout(a),o=void 0,r=u||"",C.readyState=e>0?4:0,d=e>=200&&e<300||304===e,s&&(x=function(t,e,n){for(var o,i,r,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(i in a)if(a[i]&&a[i].test(o)){u.unshift(i);break}if(u[0]in n)r=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){r=i;break}s||(s=i)}r=r||s}if(r)return r!==u[0]&&u.unshift(r),n[r]}(h,C,s)),!d&&w.inArray("script",h.dataTypes)>-1&&w.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),x=function(t,e,n,o){var i,r,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(r=c.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!u&&o&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=r,r=c.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(s=l[u+" "+r]||l["* "+r]))for(i in l)if((a=i.split(" "))[1]===r&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(r=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(j){return{state:"parsererror",error:s?j:"No conversion from "+u+" to "+r}}}return{state:"success",data:e}}(h,x,C,d),d?(h.ifModified&&((k=C.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=k),(k=C.getResponseHeader("etag"))&&(w.etag[i]=k)),204===e||"HEAD"===h.type?D="nocontent":304===e?D="notmodified":(D=x.state,p=x.data,d=!(m=x.error))):(m=D,!e&&D||(D="error",e<0&&(e=0))),C.status=e,C.statusText=(n||D)+"",d?y.resolveWith(f,[p,D,C]):y.rejectWith(f,[C,D,m]),C.statusCode(b),b=void 0,c&&g.trigger(d?"ajaxSuccess":"ajaxError",[C,h,d?p:m]),v.fireWith(f,[C,D]),c&&(g.trigger("ajaxComplete",[C,h]),--w.active||w.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return w.get(t,e,n,"json")},getScript:function(t,e){return w.get(t,void 0,e,"script")}}),w.each(["get","post"],(function(t,e){w[e]=function(t,n,o,i){return f(n)&&(i=i||o,o=n,n=void 0),w.ajax(w.extend({url:t,type:e,dataType:i,data:n,success:o},w.isPlainObject(t)&&t))}})),w.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),w._evalUrl=function(t,e,n){return w.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){w.globalEval(t,e,n)}})},w.fn.extend({wrapAll:function(t){var e;return this[0]&&(f(t)&&(t=t.call(this[0])),e=w(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return f(t)?this.each((function(e){w(this).wrapInner(t.call(this,e))})):this.each((function(){var e=w(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=f(t);return this.each((function(n){w(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(t){return!w.expr.pseudos.visible(t)},w.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Xe={0:200,1223:204},Ke=w.ajaxSettings.xhr();h.cors=!!Ke&&"withCredentials"in Ke,h.ajax=Ke=!!Ke,w.ajaxTransport((function(e){var n,o;if(h.cors||Ke&&!e.crossDomain)return{send:function(i,r){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);n=function(t){return function(){n&&(n=o=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Xe[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),o=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=o:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout((function(){n&&o()}))},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(u){if(n)throw u}},abort:function(){n&&n()}}})),w.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return w.globalEval(t),t}}}),w.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),w.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(o,i){e=w("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),m.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Je,Ge=[],Qe=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ge.pop()||w.expando+"_"+$e.guid++;return this[t]=!0,t}}),w.ajaxPrefilter("json jsonp",(function(e,n,o){var i,r,s,a=!1!==e.jsonp&&(Qe.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qe.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=f(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Qe,"$1"+i):!1!==e.jsonp&&(e.url+=(Se.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||w.error(i+" was not called"),s[0]},e.dataTypes[0]="json",r=t[i],t[i]=function(){s=arguments},o.always((function(){void 0===r?w(t).removeProp(i):t[i]=r,e[i]&&(e.jsonpCallback=n.jsonpCallback,Ge.push(i)),s&&f(r)&&r(s[0]),s=r=void 0})),"script"})),h.createHTMLDocument=((Je=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Je.childNodes.length),w.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(h.createHTMLDocument?((o=(e=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,e.head.appendChild(o)):e=m),r=!n&&[],(i=q.exec(t))?[e.createElement(i[1])]:(i=Lt([t],e,r),r&&r.length&&w(r).remove(),w.merge([],i.childNodes)));var o,i,r},w.fn.load=function(t,e,n){var o,i,r,s=this,a=t.indexOf(" ");return a>-1&&(o=we(t.slice(a)),t=t.slice(0,a)),f(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&w.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){r=arguments,s.html(o?w("<div>").append(w.parseHTML(t)).find(o):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,r||[t.responseText,e,t])}))}),this},w.expr.pseudos.animated=function(t){return w.grep(w.timers,(function(e){return t===e.elem})).length},w.offset={setOffset:function(t,e,n){var o,i,r,s,a,u,l=w.css(t,"position"),c=w(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),r=w.css(t,"top"),u=w.css(t,"left"),("absolute"===l||"fixed"===l)&&(r+u).indexOf("auto")>-1?(s=(o=c.position()).top,i=o.left):(s=parseFloat(r)||0,i=parseFloat(u)||0),f(e)&&(e=e.call(t,n,w.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+i),"using"in e?e.using.call(t,d):c.css(d)}},w.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){w.offset.setOffset(this,t,e)}));var e,n,o=this[0];return o?o.getClientRects().length?(e=o.getBoundingClientRect(),n=o.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,o=this[0],i={top:0,left:0};if("fixed"===w.css(o,"position"))e=o.getBoundingClientRect();else{for(e=this.offset(),n=o.ownerDocument,t=o.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===w.css(t,"position");)t=t.parentNode;t&&t!==o&&1===t.nodeType&&((i=w(t).offset()).top+=w.css(t,"borderTopWidth",!0),i.left+=w.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-w.css(o,"marginTop",!0),left:e.left-i.left-w.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===w.css(t,"position");)t=t.offsetParent;return t||pt}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;w.fn[t]=function(o){return J(this,(function(t,o,i){var r;if(g(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===i)return r?r[e]:t[o];r?r.scrollTo(n?r.pageXOffset:i,n?i:r.pageYOffset):t[o]=i}),t,o,arguments.length)}})),w.each(["top","left"],(function(t,e){w.cssHooks[e]=Jt(h.pixelPosition,(function(t,n){if(n)return n=Kt(t,e),Ut.test(n)?w(t).position()[e]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(t,e){w.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,o){w.fn[o]=function(i,r){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===r?"margin":"border");return J(this,(function(e,n,i){var r;return g(e)?0===o.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?w.css(e,n,a):w.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){w.fn[e]=function(t){return this.on(e,t)}})),w.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,o){return this.on(e,t,n,o)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),w.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(t,e){w.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var tn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;w.proxy=function(t,e){var n,o,r;if("string"==typeof e&&(n=t[e],e=t,t=n),f(t))return o=i.call(arguments,2),r=function(){return t.apply(e||this,o.concat(i.call(arguments)))},r.guid=t.guid=t.guid||w.guid++,r},w.holdReady=function(t){t?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=C,w.isFunction=f,w.isWindow=g,w.camelCase=et,w.type=b,w.now=Date.now,w.isNumeric=function(t){var e=w.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},w.trim=function(t){return null==t?"":(t+"").replace(tn,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return w}));var en=t.jQuery,nn=t.$;return w.noConflict=function(e){return t.$===w&&(t.$=nn),e&&t.jQuery===w&&(t.jQuery=en),w},void 0===e&&(t.jQuery=t.$=w),w})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MOJFrontend=t.MOJFrontend||{})}(this,(function(t){"use strict";function e(t){this.container=$(t),this.container.data("moj-add-another-initialised")||(this.container.data("moj-add-another-initialised",!0),this.container.on("click",".moj-add-another__remove-button",$.proxy(this,"onRemoveButtonClick")),this.container.on("click",".moj-add-another__add-button",$.proxy(this,"onAddButtonClick")),this.container.find(".moj-add-another__add-button, moj-add-another__remove-button").prop("type","button"))}function n(t,e){if(window.NodeList.prototype.forEach)return t.forEach(e);for(let n=0;n<t.length;n++)e.call(window,t[n],n,t)}function o(t,e={}){const n=t.getAttribute("tabindex");function o(){e.onBlur&&e.onBlur.call(t),n||t.removeAttribute("tabindex")}n||t.setAttribute("tabindex","-1"),t.addEventListener("focus",(function(){t.addEventListener("blur",o,{once:!0})}),{once:!0}),e.onBeforeFocus&&e.onBeforeFocus.call(t),t.focus()}function i(t,e={}){if(!t)return this;const n=Object.freeze({properties:{dismissible:{type:"boolean"},dismissText:{type:"string"},disableAutoFocus:{type:"boolean"},focusOnDismissSelector:{type:"string"}}});this.config=this.mergeConfigs({dismissible:!1,dismissText:"Dismiss",disableAutoFocus:!1},e,this.parseDataset(n,t.dataset)),this.$module=t}function r(t,e={}){if(!t)return this;const n=Object.freeze({properties:{buttonText:{type:"string"},buttonClasses:{type:"string"},alignMenu:{type:"string"}}});this.config=this.mergeConfigs({buttonText:"Actions",alignMenu:"left",buttonClasses:""},e,this.parseDataset(n,t.dataset)),this.$module=t}function s(t,e={}){if(!t)return this;const n=Object.freeze({properties:{excludedDates:{type:"string"},excludedDays:{type:"string"},leadingZeros:{type:"string"},maxDate:{type:"string"},minDate:{type:"string"},weekStartDay:{type:"string"}}});this.config=this.mergeConfigs({leadingZeros:!1,weekStartDay:"monday"},e,this.parseDataset(n,t.dataset)),this.dayLabels=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],this.monthLabels=["January","February","March","April","May","June","July","August","September","October","November","December"],this.currentDate=new Date,this.currentDate.setHours(0,0,0,0),this.calendarDays=[],this.excludedDates=[],this.excludedDays=[],this.buttonClass="moj-datepicker__button",this.selectedDayButtonClass="moj-datepicker__button--selected",this.currentDayButtonClass="moj-datepicker__button--current",this.todayButtonClass="moj-datepicker__button--today",this.$module=t,this.$input=t.querySelector(".moj-js-datepicker-input")}function a(t,e,n,o,i){this.index=e,this.row=n,this.column=o,this.button=t,this.picker=i,this.date=new Date}function u(t){this.options=t,this.container=$(this.options.toggleButton.container),this.filterContainer=$(this.options.filter.container),this.createToggleButton(),this.setupResponsiveChecks(),this.filterContainer.attr("tabindex","-1"),this.options.startHidden&&this.hideMenu()}function l(t){void 0!==document.createElement("div").ondrop&&"function"==typeof FormData&&function(){const t=document.createElement("input");return t.type="file",void 0!==t.files}()&&(this.defaultParams={uploadFileEntryHook:$.noop,uploadFileExitHook:$.noop,uploadFileErrorHook:$.noop,fileDeleteHook:$.noop,uploadStatusText:"Uploading files, please wait",dropzoneHintText:"Drag and drop files here or",dropzoneButtonText:"Choose files"},this.params=$.extend({},this.defaultParams,t),this.container=$(this.params.container),this.container.addClass("moj-multi-file-upload--enhanced"),this.feedbackContainer=this.container.find(".moj-multi-file__uploaded-files"),this.setupFileInput(),this.setupDropzone(),this.setupLabel(),this.setupStatusBox(),this.container.on("click",".moj-multi-file-upload__delete",$.proxy(this,"onFileDeleteClick")))}function c(t){if(this.container=$(t.container),this.container.data("moj-multi-select-initialised"))return;this.container.data("moj-multi-select-initialised",!0);const e=t.id_prefix;let n="checkboxes-all";void 0!==e&&(n=`${e}checkboxes-all`),this.toggle=$(this.getToggleHtml(n)),this.toggleButton=this.toggle.find("input"),this.toggleButton.on("click",$.proxy(this,"onButtonClick")),this.container.append(this.toggle),this.checkboxes=$(t.checkboxes),this.checkboxes.on("click",$.proxy(this,"onCheckboxClick")),this.checked=t.checked||!1}function d(t){this.el=t;const e=$(this.el);e.data("moj-password-reveal-initialised")||(e.data("moj-password-reveal-initialised",!0),e.attr("spellcheck","false"),e.wrap('<div class="moj-password-reveal"></div>'),this.container=$(this.el).parent(),this.createButton())}function p(t){"contentEditable"in document.documentElement&&(this.options=t,this.options.toolbar=this.options.toolbar||{bold:!1,italic:!1,underline:!1,bullets:!0,numbers:!0},this.textarea=this.options.textarea,this.container=$(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",$.proxy(this,"onButtonClick")),this.container.find(".moj-rich-text-editor__content").on("input",$.proxy(this,"onEditorInput")),this.container.find("label").on("click",$.proxy(this,"onLabelClick")),this.toolbar.on("keydown",$.proxy(this,"onToolbarKeydown"))))}function h(t){if(this.options=t,this.container=$(this.options.search.container),this.toggleButtonContainer=$(this.options.toggleButton.container),this.container.data("moj-search-toggle-initialised"))return;this.container.data("moj-search-toggle-initialised",!0);this.toggleButton=$(`<button class="moj-search-toggle__button" type="button" aria-haspopup="true" aria-expanded="false">\n ${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>\n </button>`),this.toggleButton.on("click",$.proxy(this,"onToggleButtonClick")),this.toggleButtonContainer.append(this.toggleButton),$(document).on("click",this.onDocumentClick.bind(this)),$(document).on("focusin",this.onDocumentClick.bind(this))}function f(t){this.table=$(t.table),this.table.data("moj-search-toggle-initialised")||(this.table.data("moj-search-toggle-initialised",!0),this.caption=this.table.find("caption"),this.upArrow='<svg width="22" height="22" focusable="false" aria-hidden="true" role="img" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.5625 15.5L11 6.63125L15.4375 15.5H6.5625Z" fill="currentColor"/>\n</svg>',this.downArrow='<svg width="22" height="22" focusable="false" aria-hidden="true" role="img" vviewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M15.4375 7L11 15.8687L6.5625 7L15.4375 7Z" fill="currentColor"/>\n</svg>',this.upDownArrow='<svg width="22" height="22" focusable="false" aria-hidden="true" role="img" vviewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.1875 9.5L10.9609 3.95703L13.7344 9.5H8.1875Z" fill="currentColor"/>\n<path d="M13.7344 12.0781L10.9609 17.6211L8.1875 12.0781H13.7344Z" fill="currentColor"/>\n</svg>',this.setupOptions(t),this.body=this.table.find("tbody"),this.createHeadingButtons(),this.updateCaption(),this.updateDirectionIndicators(),this.createStatusBox(),this.initialiseSortedColumn(),this.table.on("click","th button",$.proxy(this,"onSortButtonClick")))}e.prototype.onAddButtonClick=function(t){const e=this.getNewItem();this.updateAttributes(this.getItems().length,e),this.resetItem(e);const n=this.getItems().first();this.hasRemoveButton(n)||this.createRemoveButton(n),this.getItems().last().after(e),e.find("input, textarea, select").first().focus()},e.prototype.hasRemoveButton=function(t){return t.find(".moj-add-another__remove-button").length},e.prototype.getItems=function(){return this.container.find(".moj-add-another__item")},e.prototype.getNewItem=function(){const t=this.getItems().first().clone();return this.hasRemoveButton(t)||this.createRemoveButton(t),t},e.prototype.updateAttributes=function(t,e){e.find("[data-name]").each((function(n,o){const i=o.id;o.name=$(o).attr("data-name").replace(/%index%/,t),o.id=$(o).attr("data-id").replace(/%index%/,t);($(o).siblings("label")[0]||$(o).parents("label")[0]||e.find(`[for="${i}"]`)[0]).htmlFor=o.id}))},e.prototype.createRemoveButton=function(t){t.append('<button type="button" class="govuk-button govuk-button--secondary moj-add-another__remove-button">Remove</button>')},e.prototype.resetItem=function(t){t.find("[data-name], [data-id]").each((function(t,e){"checkbox"===e.type||"radio"===e.type?e.checked=!1:e.value=""}))},e.prototype.onRemoveButtonClick=function(t){$(t.currentTarget).parents(".moj-add-another__item").remove();const e=this.getItems();1===e.length&&e.find(".moj-add-another__remove-button").remove(),e.each($.proxy((function(t,e){this.updateAttributes(t,$(e))}),this)),this.focusHeading()},e.prototype.focusHeading=function(){this.container.find(".moj-add-another__heading").get(0).focus()},i.prototype.init=function(){"alert"!==this.$module.getAttribute("role")||this.config.disableAutoFocus||o(this.$module),this.$dismissButton=this.$module.querySelector(".moj-alert__dismiss"),this.config.dismissible&&this.$dismissButton&&(this.$dismissButton.innerHTML=this.config.dismissText,this.$dismissButton.removeAttribute("hidden"),this.$module.addEventListener("click",(t=>{this.$dismissButton.contains(t.target)&&this.dimiss()})))},i.prototype.dimiss=function(){let t;if(this.config.focusOnDismissSelector&&(t=document.querySelector(this.config.focusOnDismissSelector)),!t){const e=this.$module.nextElementSibling;e&&e.matches(".moj-alert")&&(t=e)}t||(t=function(t,e){if(!t)return;let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}(this.$module,".moj-alert, h1, h2, h3, h4, h5, h6")),t||(t=function(t,e){if(!t)return;let n=t;for(;n;){if(n.matches(e))return n;let t=n.previousElementSibling;for(;t;){if(t.matches(e))return t;t=t.previousElementSibling}n=n.parentElement}}(this.$module,"h1, h2, h3, h4, h5, h6, main, body")),t&&o(t),this.$module.remove()},i.prototype.normaliseString=function(t,e){const n=t?t.trim():"";let o,i;switch(e&&e.type&&(i=e.type),i||(["true","false"].includes(n)&&(i="boolean"),n.length>0&&isFinite(Number(n))&&(i="number")),i){case"boolean":o="true"===n;break;case"number":o=Number(n);break;default:o=t}return o},i.prototype.parseDataset=function(t,e){const n={};for(const[o,i]of Object.entries(t.properties))o in e&&e[o]&&(n[o]=this.normaliseString(e[o],i));return n},i.prototype.mergeConfigs=function(...t){const e={};for(const n of t)for(const t of Object.keys(n)){const o=e[t],i=n[t];e[t]="object"==typeof o&&"object"==typeof i?this.mergeConfigs(o,i):i}return e},r.prototype.init=function(){if(1===this.$module.children.length){const t=this.$module.children[0];t.classList.forEach((e=>{e.startsWith("govuk-button-")&&t.classList.remove(e),t.classList.remove("moj-button-menu__item")})),this.config.buttonClasses&&t.classList.add(...this.config.buttonClasses.split(" "))}this.$module.children.length>1&&this.initMenu()},r.prototype.initMenu=function(){this.$menu=this.createMenu(),this.$module.insertAdjacentHTML("afterbegin",this.toggleTemplate()),this.setupMenuItems(),this.$menuToggle=this.$module.querySelector(":scope > button"),this.items=this.$menu.querySelectorAll("a, button"),this.$menuToggle.addEventListener("click",(t=>{this.toggleMenu(t)})),this.$module.addEventListener("keydown",(t=>{this.handleKeyDown(t)})),document.addEventListener("click",(t=>{this.$module.contains(t.target)||this.closeMenu(!1)}))},r.prototype.createMenu=function(){const t=document.createElement("ul");for(t.setAttribute("role","list"),t.hidden=!0,t.classList.add("moj-button-menu__wrapper"),"right"===this.config.alignMenu&&t.classList.add("moj-button-menu__wrapper--right"),this.$module.appendChild(t);this.$module.firstChild!==t;)t.appendChild(this.$module.firstChild);return t},r.prototype.setupMenuItems=function(){Array.from(this.$menu.children).forEach((t=>{const e=document.createElement("li");this.$menu.insertBefore(e,t),e.appendChild(t),t.setAttribute("tabindex",-1),"BUTTON"===t.tagName&&t.setAttribute("type","button"),t.classList.forEach((e=>{e.startsWith("govuk-button")&&t.classList.remove(e)})),t.addEventListener("click",(t=>{setTimeout((()=>{this.closeMenu(!1)}),50)}))}))},r.prototype.toggleTemplate=function(){return`\n <button type="button" class="govuk-button moj-button-menu__toggle-button ${this.config.buttonClasses||""}" aria-haspopup="true" aria-expanded="false">\n <span>\n ${this.config.buttonText}\n <svg width="11" height="5" viewBox="0 0 11 5" xmlns="http://www.w3.org/2000/svg">\n <path d="M5.5 0L11 5L0 5L5.5 0Z" fill="currentColor"/>\n </svg>\n </span>\n </button>`},r.prototype.isOpen=function(){return"true"===this.$menuToggle.getAttribute("aria-expanded")},r.prototype.toggleMenu=function(t){t.preventDefault();const e=0===t.detail?0:-1;this.isOpen()?this.closeMenu():this.openMenu(e)},r.prototype.openMenu=function(t=0){this.$menu.hidden=!1,this.$menuToggle.setAttribute("aria-expanded","true"),-1!==t&&this.focusItem(t)},r.prototype.closeMenu=function(t=!0){this.$menu.hidden=!0,this.$menuToggle.setAttribute("aria-expanded","false"),t&&this.$menuToggle.focus()},r.prototype.focusItem=function(t){t>=this.items.length&&(t=0),t<0&&(t=this.items.length-1);const e=this.items.item(t);e&&e.focus()},r.prototype.currentFocusIndex=function(){const t=document.activeElement;return Array.from(this.items).indexOf(t)},r.prototype.handleKeyDown=function(t){if(t.target===this.$menuToggle)switch(t.key){case"ArrowDown":t.preventDefault(),this.openMenu();break;case"ArrowUp":t.preventDefault(),this.openMenu(this.items.length-1)}if(this.$menu.contains(t.target)&&this.isOpen())switch(t.key){case"ArrowDown":t.preventDefault(),-1!==this.currentFocusIndex()&&this.focusItem(this.currentFocusIndex()+1);break;case"ArrowUp":t.preventDefault(),-1!==this.currentFocusIndex()&&this.focusItem(this.currentFocusIndex()-1);break;case"Home":t.preventDefault(),this.focusItem(0);break;case"End":t.preventDefault(),this.focusItem(this.items.length-1)}"Escape"===t.key&&this.isOpen()&&this.closeMenu(),"Tab"===t.key&&this.isOpen()&&this.closeMenu(!1)},r.prototype.parseDataset=function(t,e){const n={};for(const[o,,]of Object.entries(t.properties))o in e&&e[o]&&(n[o]=e[o]);return n},r.prototype.mergeConfigs=function(...t){const e={};for(const n of t)for(const t of Object.keys(n)){const o=e[t],i=n[t];e[t]="object"==typeof o&&"object"==typeof i?this.mergeConfigs(o,i):i}return e},s.prototype.init=function(){this.$input&&(this.$module.dataset.initialized||(this.setOptions(),this.initControls(),this.$module.setAttribute("data-initialized","true")))},s.prototype.initControls=function(){this.id=`datepicker-${this.$input.id}`,this.$dialog=this.createDialog(),this.createCalendarHeaders();const t=document.createElement("div"),e=document.createElement("div");t.classList.add("moj-datepicker__wrapper"),e.classList.add("govuk-input__wrapper"),this.$input.parentNode.insertBefore(t,this.$input),t.appendChild(e),e.appendChild(this.$input),e.insertAdjacentHTML("beforeend",this.toggleTemplate()),t.insertAdjacentElement("beforeend",this.$dialog),this.$calendarButton=this.$module.querySelector(".moj-js-datepicker-toggle"),this.$dialogTitle=this.$dialog.querySelector(".moj-js-datepicker-month-year"),this.createCalendar(),this.$prevMonthButton=this.$dialog.querySelector(".moj-js-datepicker-prev-month"),this.$prevYearButton=this.$dialog.querySelector(".moj-js-datepicker-prev-year"),this.$nextMonthButton=this.$dialog.querySelector(".moj-js-datepicker-next-month"),this.$nextYearButton=this.$dialog.querySelector(".moj-js-datepicker-next-year"),this.$cancelButton=this.$dialog.querySelector(".moj-js-datepicker-cancel"),this.$okButton=this.$dialog.querySelector(".moj-js-datepicker-ok"),this.$prevMonthButton.addEventListener("click",(t=>this.focusPreviousMonth(t,!1))),this.$prevYearButton.addEventListener("click",(t=>this.focusPreviousYear(t,!1))),this.$nextMonthButton.addEventListener("click",(t=>this.focusNextMonth(t,!1))),this.$nextYearButton.addEventListener("click",(t=>this.focusNextYear(t,!1))),this.$cancelButton.addEventListener("click",(t=>{t.preventDefault(),this.closeDialog(t)})),this.$okButton.addEventListener("click",(()=>{this.selectDate(this.currentDate)}));const n=this.$dialog.querySelectorAll('button:not([disabled="true"])');this.$firstButtonInDialog=n[0],this.$lastButtonInDialog=n[n.length-1],this.$firstButtonInDialog.addEventListener("keydown",(t=>this.firstButtonKeydown(t))),this.$lastButtonInDialog.addEventListener("keydown",(t=>this.lastButtonKeydown(t))),this.$calendarButton.addEventListener("click",(t=>this.toggleDialog(t))),this.$dialog.addEventListener("keydown",(t=>{"Escape"===t.key&&(this.closeDialog(),t.preventDefault(),t.stopPropagation())})),document.body.addEventListener("mouseup",(t=>this.backgroundClick(t))),this.updateCalendar()},s.prototype.createDialog=function(){const t=`datepicker-title-${this.$input.id}`,e=document.createElement("div");return e.id=this.id,e.setAttribute("class","moj-datepicker__dialog"),e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("aria-labelledby",t),e.innerHTML=this.dialogTemplate(t),e.hidden=!0,e},s.prototype.createCalendar=function(){const t=this.$dialog.querySelector("tbody");let e=0;for(let n=0;n<6;n++){const o=t.insertRow(n);for(let t=0;t<7;t++){const i=document.createElement("td"),r=document.createElement("button");i.appendChild(r),o.appendChild(i);const s=new a(r,e,n,t,this);s.init(),this.calendarDays.push(s),e++}}},s.prototype.toggleTemplate=function(){return`<button class="moj-datepicker__toggle moj-js-datepicker-toggle" type="button" aria-haspopup="dialog" aria-controls="${this.id}" aria-expanded="false">\n <span class="govuk-visually-hidden">Choose date</span>\n <svg width="32" height="24" focusable="false" class="moj-datepicker-icon" aria-hidden="true" role="img" viewBox="0 0 22 22">\n <path\n fill="currentColor"\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M16.1333 2.93333H5.86668V4.4C5.86668 5.21002 5.21003 5.86667 4.40002 5.86667C3.59 5.86667 2.93335 5.21002 2.93335 4.4V2.93333H2C0.895431 2.93333 0 3.82877 0 4.93334V19.2667C0 20.3712 0.89543 21.2667 2 21.2667H20C21.1046 21.2667 22 20.3712 22 19.2667V4.93333C22 3.82876 21.1046 2.93333 20 2.93333H19.0667V4.4C19.0667 5.21002 18.41 5.86667 17.6 5.86667C16.79 5.86667 16.1333 5.21002 16.1333 4.4V2.93333ZM20.5333 8.06667H1.46665V18.8C1.46665 19.3523 1.91436 19.8 2.46665 19.8H19.5333C20.0856 19.8 20.5333 19.3523 20.5333 18.8V8.06667Z"\n ></path>\n <rect x="3.66669" width="1.46667" height="5.13333" rx="0.733333" fill="currentColor"></rect>\n <rect x="16.8667" width="1.46667" height="5.13333" rx="0.733333" fill="currentColor"></rect>\n </svg>\n </button>`},s.prototype.dialogTemplate=function(t){return`<div class="moj-datepicker__dialog-header">\n <div class="moj-datepicker__dialog-navbuttons">\n <button class="moj-datepicker__button moj-js-datepicker-prev-year">\n <span class="govuk-visually-hidden">Previous year</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M23.1643 20L28.9572 14.2071L27.5429 12.7929L20.3358 20L27.5429 27.2071L28.9572 25.7929L23.1643 20Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M17.1643 20L22.9572 14.2071L21.5429 12.7929L14.3358 20L21.5429 27.2071L22.9572 25.7929L17.1643 20Z" fill="currentColor"/>\n </svg>\n </button>\n\n <button class="moj-datepicker__button moj-js-datepicker-prev-month">\n <span class="govuk-visually-hidden">Previous month</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.5729 20L25.7865 14.2071L24.5137 12.7929L18.0273 20L24.5137 27.2071L25.7865 25.7929L20.5729 20Z" fill="currentColor"/>\n </svg>\n </button>\n </div>\n\n <h2 id="${t}" class="moj-datepicker__dialog-title moj-js-datepicker-month-year" aria-live="polite">June 2020</h2>\n\n <div class="moj-datepicker__dialog-navbuttons">\n <button class="moj-datepicker__button moj-js-datepicker-next-month">\n <span class="govuk-visually-hidden">Next month</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M23.4271 20L18.2135 14.2071L19.4863 12.7929L25.9727 20L19.4863 27.2071L18.2135 25.7929L23.4271 20Z" fill="currentColor"/>\n </svg>\n </button>\n\n <button class="moj-datepicker__button moj-js-datepicker-next-year">\n <span class="govuk-visually-hidden">Next year</span>\n <svg width="44" height="40" viewBox="0 0 44 40" fill="none" fill="none" focusable="false" aria-hidden="true" role="img">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.8357 20L15.0428 14.2071L16.4571 12.7929L23.6642 20L16.4571 27.2071L15.0428 25.7929L20.8357 20Z" fill="currentColor"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M26.8357 20L21.0428 14.2071L22.4571 12.7929L29.6642 20L22.4571 27.2071L21.0428 25.7929L26.8357 20Z" fill="currentColor"/>\n </svg>\n </button>\n </div>\n </div>\n\n <table class="moj-datepicker__calendar moj-js-datepicker-grid" role="grid" aria-labelledby="${t}">\n <thead>\n <tr></tr>\n </thead>\n\n <tbody></tbody>\n </table>\n\n <div class="govuk-button-group">\n <button type="button" class="govuk-button moj-js-datepicker-ok">Select</button>\n <button type="button" class="govuk-button govuk-button--secondary moj-js-datepicker-cancel">Close</button>\n </div>`},s.prototype.createCalendarHeaders=function(){this.dayLabels.forEach((t=>{const e=`<th scope="col"><span aria-hidden="true">${t.substring(0,3)}</span><span class="govuk-visually-hidden">${t}</span></th>`;this.$dialog.querySelector("thead > tr").insertAdjacentHTML("beforeend",e)}))},s.prototype.leadingZeros=function(t,e=2){let n=t.toString();for(;n.length<e;)n=`0${n}`;return n},s.prototype.setOptions=function(){this.setMinAndMaxDatesOnCalendar(),this.setExcludedDates(),this.setExcludedDays(),this.setLeadingZeros(),this.setWeekStartDay()},s.prototype.setMinAndMaxDatesOnCalendar=function(){this.config.minDate&&(this.minDate=this.formattedDateFromString(this.config.minDate,null),this.minDate&&this.currentDate<this.minDate&&(this.currentDate=this.minDate)),this.config.maxDate&&(this.maxDate=this.formattedDateFromString(this.config.maxDate,null),this.maxDate&&this.currentDate>this.maxDate&&(this.currentDate=this.maxDate))},s.prototype.setExcludedDates=function(){this.config.excludedDates&&(this.excludedDates=this.config.excludedDates.replace(/\s+/," ").split(" ").map((t=>t.includes("-")?this.parseDateRangeString(t):this.formattedDateFromString(t))).flat().filter((t=>t)))},s.prototype.parseDateRangeString=function(t){const e=[],[n,o]=t.split("-").map((t=>this.formattedDateFromString(t,null)));if(n&&o){const t=new Date(n.getTime());for(;t<=o;)e.push(new Date(t)),t.setDate(t.getDate()+1)}return e},s.prototype.setExcludedDays=function(){if(this.config.excludedDays){const t=this.dayLabels.map((t=>t.toLowerCase()));"monday"===this.config.weekStartDay&&t.unshift(t.pop()),this.excludedDays=this.config.excludedDays.replace(/\s+/," ").toLowerCase().split(" ").map((e=>t.indexOf(e))).filter((t=>-1!==t))}},s.prototype.setLeadingZeros=function(){if("boolean"!=typeof this.config.leadingZeros){if("true"===this.config.leadingZeros.toLowerCase())return void(this.config.leadingZeros=!0);"false"===this.config.leadingZeros.toLowerCase()&&(this.config.leadingZeros=!1)}},s.prototype.setWeekStartDay=function(){const t=this.config.weekStartDay;t&&"sunday"===t.toLowerCase()?(this.config.weekStartDay="sunday",this.dayLabels.unshift(this.dayLabels.pop())):this.config.weekStartDay="monday"},s.prototype.isExcludedDate=function(t){if(this.minDate&&this.minDate>t)return!0;if(this.maxDate&&this.maxDate<t)return!0;for(const e of this.excludedDates)if(t.toDateString()===e.toDateString())return!0;return!!this.excludedDays.includes(t.getDay())},s.prototype.formattedDateFromString=function(t,e=new Date){let n=null;const o=/(\d{1,2})([-/,. ])(\d{1,2})\2(\d{4})/;if(!o.test(t))return e;const i=t.match(o),r=i[1],s=i[3],a=i[4];return n=new Date(`${a}-${s}-${r}`),n instanceof Date&&!isNaN(n)?n:e},s.prototype.formattedDateFromDate=function(t){return this.config.leadingZeros?`${this.leadingZeros(t.getDate())}/${this.leadingZeros(t.getMonth()+1)}/${t.getFullYear()}`:`${t.getDate()}/${t.getMonth()+1}/${t.getFullYear()}`},s.prototype.formattedDateHuman=function(t){return`${this.dayLabels[(t.getDay()+6)%7]} ${t.getDate()} ${this.monthLabels[t.getMonth()]} ${t.getFullYear()}`},s.prototype.backgroundClick=function(t){!this.isOpen()||this.$dialog.contains(t.target)||this.$input.contains(t.target)||this.$calendarButton.contains(t.target)||(t.preventDefault(),this.closeDialog())},s.prototype.firstButtonKeydown=function(t){"Tab"===t.key&&t.shiftKey&&(this.$lastButtonInDialog.focus(),t.preventDefault())},s.prototype.lastButtonKeydown=function(t){"Tab"!==t.key||t.shiftKey||(this.$firstButtonInDialog.focus(),t.preventDefault())},s.prototype.updateCalendar=function(){this.$dialogTitle.innerHTML=`${this.monthLabels[this.currentDate.getMonth()]} ${this.currentDate.getFullYear()}`;const t=this.currentDate,e=new Date(t.getFullYear(),t.getMonth(),1);let n;n="monday"===this.config.weekStartDay?0===e.getDay()?6:e.getDay()-1:e.getDay(),e.setDate(e.getDate()-n);const o=new Date(e);for(let i=0;i<this.calendarDays.length;i++){const e=o.getMonth()!==t.getMonth(),n=this.isExcludedDate(o);this.calendarDays[i].update(o,e,n),o.setDate(o.getDate()+1)}},s.prototype.setCurrentDate=function(t=!0){const{currentDate:e}=this;if(this.calendarDays.forEach((n=>{n.button.classList.add("moj-datepicker__button"),n.button.classList.add("moj-datepicker__calendar-day"),n.button.setAttribute("tabindex",-1),n.button.classList.remove(this.selectedDayButtonClass);const o=n.date;o.setHours(0,0,0,0);const i=new Date;i.setHours(0,0,0,0),o.getTime()===e.getTime()&&t&&(n.button.setAttribute("tabindex",0),n.button.focus(),n.button.classList.add(this.selectedDayButtonClass)),this.inputDate&&o.getTime()===this.inputDate.getTime()?(n.button.classList.add(this.currentDayButtonClass),n.button.setAttribute("aria-current","date")):(n.button.classList.remove(this.currentDayButtonClass),n.button.removeAttribute("aria-current")),o.getTime()===i.getTime()?n.button.classList.add(this.todayButtonClass):n.button.classList.remove(this.todayButtonClass)})),!t){const t=this.calendarDays.filter((t=>"block"===window.getComputedStyle(t.button).display&&!t.button.disabled));t[0].button.setAttribute("tabindex",0),this.currentDate=t[0].date}},s.prototype.selectDate=function(t){if(this.isExcludedDate(t))return;this.$calendarButton.querySelector("span").innerText=`Choose date. Selected date is ${this.formattedDateHuman(t)}`,this.$input.value=this.formattedDateFromDate(t);const e=new Event("change",{bubbles:!0,cancelable:!0});this.$input.dispatchEvent(e),this.closeDialog()},s.prototype.isOpen=function(){return this.$dialog.classList.contains("moj-datepicker__dialog--open")},s.prototype.toggleDialog=function(t){t.preventDefault(),this.isOpen()?this.closeDialog():(this.setMinAndMaxDatesOnCalendar(),this.openDialog())},s.prototype.openDialog=function(){this.$dialog.hidden=!1,this.$dialog.classList.add("moj-datepicker__dialog--open"),this.$calendarButton.setAttribute("aria-expanded","true"),this.$input.offsetWidth>this.$dialog.offsetWidth&&(this.$dialog.style.right="0px"),this.$dialog.style.top=`${this.$input.offsetHeight+3}px`,this.inputDate=this.formattedDateFromString(this.$input.value),this.currentDate=this.inputDate,this.currentDate.setHours(0,0,0,0),this.updateCalendar(),this.setCurrentDate()},s.prototype.closeDialog=function(){this.$dialog.hidden=!0,this.$dialog.classList.remove("moj-datepicker__dialog--open"),this.$calendarButton.setAttribute("aria-expanded","false"),this.$calendarButton.focus()},s.prototype.goToDate=function(t,e){const n=this.currentDate;this.currentDate=t,n.getMonth()===this.currentDate.getMonth()&&n.getFullYear()===this.currentDate.getFullYear()||this.updateCalendar(),this.setCurrentDate(e)},s.prototype.focusNextDay=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()+1),this.goToDate(t)},s.prototype.focusPreviousDay=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()-1),this.goToDate(t)},s.prototype.focusNextWeek=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()+7),this.goToDate(t)},s.prototype.focusPreviousWeek=function(){const t=new Date(this.currentDate);t.setDate(t.getDate()-7),this.goToDate(t)},s.prototype.focusFirstDayOfWeek=function(){const t=new Date(this.currentDate),e="sunday"===this.config.weekStartDay?0:1,n=t.getDay(),o=n>=e?n-e:6-n;t.setDate(t.getDate()-o),t.setHours(0,0,0,0),this.goToDate(t)},s.prototype.focusLastDayOfWeek=function(){const t=new Date(this.currentDate),e="sunday"===this.config.weekStartDay?6:0,n=t.getDay(),o=n<=e?e-n:7-n;t.setDate(t.getDate()+o),t.setHours(0,0,0,0),this.goToDate(t)},s.prototype.focusNextMonth=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setMonth(n.getMonth()+1,1),this.goToDate(n,e)},s.prototype.focusPreviousMonth=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setMonth(n.getMonth()-1,1),this.goToDate(n,e)},s.prototype.focusNextYear=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setFullYear(n.getFullYear()+1,n.getMonth(),1),this.goToDate(n,e)},s.prototype.focusPreviousYear=function(t,e=!0){t.preventDefault();const n=new Date(this.currentDate);n.setFullYear(n.getFullYear()-1,n.getMonth(),1),this.goToDate(n,e)},s.prototype.parseDataset=function(t,e){const n={};for(const[o,,]of Object.entries(t.properties))o in e&&(n[o]=e[o]);return n},s.prototype.mergeConfigs=function(...t){const e={};for(const n of t)for(const t of Object.keys(n)){const o=e[t],i=n[t];e[t]="object"==typeof o&&"object"==typeof i?this.mergeConfigs(o,i):i}return e},a.prototype.init=function(){this.button.addEventListener("keydown",this.keyPress.bind(this)),this.button.addEventListener("click",this.click.bind(this))},a.prototype.update=function(t,e,n){const o=t.getDate();let i=this.picker.formattedDateHuman(t);n?(this.button.setAttribute("aria-disabled",!0),i=`Excluded date, ${i}`):this.button.removeAttribute("aria-disabled"),this.button.style.display=e?"none":"block",this.button.setAttribute("data-testid",this.picker.formattedDateFromDate(t)),this.button.innerHTML=`<span class="govuk-visually-hidden">${i}</span><span aria-hidden="true">${o}</span>`,this.date=new Date(t)},a.prototype.click=function(t){this.picker.goToDate(this.date),this.picker.selectDate(this.date),t.stopPropagation(),t.preventDefault()},a.prototype.keyPress=function(t){let e=!0;switch(t.key){case"ArrowLeft":this.picker.focusPreviousDay();break;case"ArrowRight":this.picker.focusNextDay();break;case"ArrowUp":this.picker.focusPreviousWeek();break;case"ArrowDown":this.picker.focusNextWeek();break;case"Home":this.picker.focusFirstDayOfWeek();break;case"End":this.picker.focusLastDayOfWeek();break;case"PageUp":t.shiftKey?this.picker.focusPreviousYear(t):this.picker.focusPreviousMonth(t);break;case"PageDown":t.shiftKey?this.picker.focusNextYear(t):this.picker.focusNextMonth(t);break;default:e=!1}e&&(t.preventDefault(),t.stopPropagation())},u.prototype.setupResponsiveChecks=function(){this.mq=window.matchMedia(this.options.bigModeMediaQuery),this.mq.addListener($.proxy(this,"checkMode")),this.checkMode(this.mq)},u.prototype.createToggleButton=function(){this.menuButton=$(`<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",$.proxy(this,"onMenuButtonClick")),this.container.append(this.menuButton)},u.prototype.checkMode=function(t){t.matches?this.enableBigMode():this.enableSmallMode()},u.prototype.enableBigMode=function(){this.showMenu(),this.removeCloseButton()},u.prototype.enableSmallMode=function(){this.hideMenu(),this.addCloseButton()},u.prototype.addCloseButton=function(){this.options.closeButton&&(this.closeButton=$(`<button class="moj-filter__close" type="button">${this.options.closeButton.text}</button>`),this.closeButton.on("click",$.proxy(this,"onCloseClick")),$(this.options.closeButton.container).append(this.closeButton))},u.prototype.onCloseClick=function(){this.hideMenu(),this.menuButton.focus()},u.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},u.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false"),this.filterContainer.addClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.showText)},u.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true"),this.filterContainer.removeClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.hideText)},u.prototype.onMenuButtonClick=function(){this.toggle()},u.prototype.toggle=function(){"false"===this.menuButton.attr("aria-expanded")?(this.showMenu(),this.filterContainer.get(0).focus()):this.hideMenu()},l.prototype.setupDropzone=function(){this.fileInput.wrap('<div class="moj-multi-file-upload__dropzone" />'),this.dropzone=this.container.find(".moj-multi-file-upload__dropzone"),this.dropzone.on("dragover",$.proxy(this,"onDragOver")),this.dropzone.on("dragleave",$.proxy(this,"onDragLeave")),this.dropzone.on("drop",$.proxy(this,"onDrop"))},l.prototype.setupLabel=function(){this.label=$(`<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)},l.prototype.setupFileInput=function(){this.fileInput=this.container.find(".moj-multi-file-upload__input"),this.fileInput.on("change",$.proxy(this,"onFileChange")),this.fileInput.on("focus",$.proxy(this,"onFileFocus")),this.fileInput.on("blur",$.proxy(this,"onFileBlur"))},l.prototype.setupStatusBox=function(){this.status=$('<div aria-live="polite" role="status" class="govuk-visually-hidden" />'),this.dropzone.append(this.status)},l.prototype.onDragOver=function(t){t.preventDefault(),this.dropzone.addClass("moj-multi-file-upload--dragover")},l.prototype.onDragLeave=function(){this.dropzone.removeClass("moj-multi-file-upload--dragover")},l.prototype.onDrop=function(t){t.preventDefault(),this.dropzone.removeClass("moj-multi-file-upload--dragover"),this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(t.originalEvent.dataTransfer.files)},l.prototype.uploadFiles=function(t){for(let e=0;e<t.length;e++)this.uploadFile(t[e])},l.prototype.onFileChange=function(t){this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(t.currentTarget.files),this.fileInput.replaceWith($(t.currentTarget).val("").clone(!0)),this.setupFileInput(),this.fileInput.get(0).focus()},l.prototype.onFileFocus=function(t){this.label.addClass("moj-multi-file-upload--focused")},l.prototype.onFileBlur=function(t){this.label.removeClass("moj-multi-file-upload--focused")},l.prototype.getSuccessHtml=function(t){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>${t.messageHtml}</span>`},l.prototype.getErrorHtml=function(t){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>${t.message}</span>`},l.prototype.getFileRowHtml=function(t){return`\n <div class="govuk-summary-list__row moj-multi-file-upload__row">\n <div class="govuk-summary-list__value moj-multi-file-upload__message">\n <span class="moj-multi-file-upload__filename">${t.name}</span>\n <span class="moj-multi-file-upload__progress">0%</span>\n </div>\n <div class="govuk-summary-list__actions moj-multi-file-upload__actions"></div>\n </div>`},l.prototype.getDeleteButtonHtml=function(t){return`<button class="moj-multi-file-upload__delete govuk-button govuk-button--secondary govuk-!-margin-bottom-0" type="button" name="delete" value="${t.filename}">\n Delete <span class="govuk-visually-hidden">${t.originalname}</span>\n </button>`},l.prototype.uploadFile=function(t){this.params.uploadFileEntryHook(this,t);const e=$(this.getFileRowHtml(t)),n=new FormData;n.append("documents",t),this.feedbackContainer.find(".moj-multi-file-upload__list").append(e),$.ajax({url:this.params.uploadUrl,type:"post",data:n,processData:!1,contentType:!1,success:$.proxy((function(n){n.error?(e.find(".moj-multi-file-upload__message").html(this.getErrorHtml(n.error)),this.status.html(n.error.message)):(e.find(".moj-multi-file-upload__message").html(this.getSuccessHtml(n.success)),this.status.html(n.success.messageText)),e.find(".moj-multi-file-upload__actions").append(this.getDeleteButtonHtml(n.file)),this.params.uploadFileExitHook(this,t,n)}),this),error:$.proxy((function(e,n,o){this.params.uploadFileErrorHook(this,t,e,n,o)}),this),xhr:function(){const t=new XMLHttpRequest;return t.upload.addEventListener("progress",(function(t){if(t.lengthComputable){let n=t.loaded/t.total;n=parseInt(100*n,10),e.find(".moj-multi-file-upload__progress").text(` ${n}%`)}}),!1),t}})},l.prototype.onFileDeleteClick=function(t){t.preventDefault();const e=$(t.currentTarget),n={};n[e[0].name]=e[0].value,$.ajax({url:this.params.deleteUrl,type:"post",dataType:"json",data:n,success:$.proxy((function(t){t.error||(e.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,t)}),this)})},c.prototype.getToggleHtml=function(t){let e="";return e+='<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox">',e+=` <input type="checkbox" class="govuk-checkboxes__input" id="${t}">`,e+=` <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="${t}">`,e+=' <span class="govuk-visually-hidden">Select all</span>',e+=" </label>",e+="</div>",e},c.prototype.onButtonClick=function(t){this.checked?(this.uncheckAll(),this.toggleButton[0].checked=!1):(this.checkAll(),this.toggleButton[0].checked=!0)},c.prototype.checkAll=function(){this.checkboxes.each($.proxy((function(t,e){e.checked=!0}),this)),this.checked=!0},c.prototype.uncheckAll=function(){this.checkboxes.each($.proxy((function(t,e){e.checked=!1}),this)),this.checked=!1},c.prototype.onCheckboxClick=function(t){t.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)},d.prototype.createButton=function(){this.button=$('<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",$.proxy(this,"onButtonClick"))},d.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>'))},p.prototype.onToolbarKeydown=function(t){let e;switch(t.keyCode){case this.keys.right:case this.keys.down:{e=this.toolbar.find("button[tabindex=0]");const t=e.next("button");t[0]&&(t.focus(),e.attr("tabindex","-1"),t.attr("tabindex","0"));break}case this.keys.left:case this.keys.up:{e=this.toolbar.find("button[tabindex=0]");const t=e.prev("button");t[0]&&(t.focus(),e.attr("tabindex","-1"),t.attr("tabindex","0"));break}}},p.prototype.getToolbarHtml=function(){let t="";return t+='<div class="moj-rich-text-editor__toolbar" role="toolbar">',this.options.toolbar.bold&&(t+='<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&&(t+='<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&&(t+='<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&&(t+='<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&&(t+='<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>'),t+="</div>",t},p.prototype.getEnhancedHtml=function(t){return`${this.getToolbarHtml()}<div class="govuk-textarea moj-rich-text-editor__content" contenteditable="true" spellcheck="false"></div>`},p.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")},p.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())},p.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")},p.prototype.onButtonClick=function(t){document.execCommand($(t.currentTarget).data("command"),!1,null)},p.prototype.getContent=function(){return this.container.find(".moj-rich-text-editor__content").html()},p.prototype.onEditorInput=function(t){this.updateTextarea()},p.prototype.updateTextarea=function(){document.execCommand("defaultParagraphSeparator",!1,"p"),this.textarea.val(this.getContent())},p.prototype.onLabelClick=function(t){t.preventDefault(),this.container.find(".moj-rich-text-editor__content").focus()},h.prototype.showMenu=function(){this.toggleButton.attr("aria-expanded","true"),this.container.removeClass("moj-js-hidden"),this.container.find("input").first().get(0).focus()},h.prototype.hideMenu=function(){this.container.addClass("moj-js-hidden"),this.toggleButton.attr("aria-expanded","false")},h.prototype.onToggleButtonClick=function(){"false"===this.toggleButton.attr("aria-expanded")?this.showMenu():this.hideMenu()},h.prototype.onDocumentClick=function(t){$.contains(this.toggleButtonContainer[0],t.target)||$.contains(this.container[0],t.target)||this.hideMenu()},f.prototype.setupOptions=function(t){t=t||{},this.statusMessage=t.statusMessage||"Sort by %heading% (%direction%)",this.ascendingText=t.ascendingText||"ascending",this.descendingText=t.descendingText||"descending"},f.prototype.createHeadingButtons=function(){const t=this.table.find("thead th");let e;for(let n=0;n<t.length;n++)e=$(t[n]),e.attr("aria-sort")&&this.createHeadingButton(e,n)},f.prototype.createHeadingButton=function(t,e){const n=t.text(),o=$(`<button type="button" data-index="${e}">${n}</button>`);t.text(""),t.append(o)},f.prototype.createStatusBox=function(){this.status=$('<div aria-live="polite" role="status" aria-atomic="true" class="govuk-visually-hidden" />'),this.table.parent().append(this.status)},f.prototype.initialiseSortedColumn=function(){const t=this.getTableRowsArray();this.table.find("th").filter('[aria-sort="ascending"], [aria-sort="descending"]').first().each(((e,n)=>{const o=$(n).attr("aria-sort"),i=$(n).find("button").attr("data-index"),r=this.sort(t,i,o);this.addRows(r)}))},f.prototype.onSortButtonClick=function(t){const e=t.target.closest("button"),n=e.getAttribute("data-index"),o=$(e).parent().attr("aria-sort");let i;i="none"===o||"descending"===o?"ascending":"descending";const r=this.getTableRowsArray(),s=this.sort(r,n,i);this.addRows(s),this.removeButtonStates(),this.updateButtonState($(t.currentTarget),i),this.updateDirectionIndicators()},f.prototype.updateCaption=function(){const t=this.caption.get(0);if(!t)return;let e=t.querySelector(".govuk-visually-hidden");e||(e=document.createElement("span"),e.classList.add("govuk-visually-hidden"),e.textContent=" (column headers with buttons are sortable).",t.appendChild(e))},f.prototype.updateButtonState=function(t,e){t.parent().attr("aria-sort",e);let n=this.statusMessage;n=n.replace(/%heading%/,t.text()),n=n.replace(/%direction%/,this[`${e}Text`]),this.status.text(n)},f.prototype.updateDirectionIndicators=function(){const t=this;this.table.find("th").each((function(){const e=$(this),n=e.find("button"),o=e.attr("aria-sort");switch(n.find("svg").remove(),o){case"ascending":n.append(t.upArrow);break;case"descending":n.append(t.downArrow);break;case"none":n.append(t.upDownArrow)}}))},f.prototype.removeButtonStates=function(){this.table.find("thead th").attr("aria-sort","none")},f.prototype.addRows=function(t){for(let e=0;e<t.length;e++)this.body.append(t[e])},f.prototype.getTableRowsArray=function(){const t=[],e=this.body.find("tr");for(let n=0;n<e.length;n++)t.push(e[n]);return t},f.prototype.sort=function(t,e,n){return t.sort(function(t,o){const i=$(t).find("td,th").eq(e),r=$(o).find("td,th").eq(e),s="ascending"===n?this.getCellValue(i):this.getCellValue(r),a="ascending"===n?this.getCellValue(r):this.getCellValue(i);return"string"==typeof s||"string"==typeof a?s.toString().localeCompare(a.toString()):s-a}.bind(this))},f.prototype.getCellValue=function(t){const e=t.attr("data-sort-value")||t.html(),n=Number(e);return isNaN(n)?e:n};t.AddAnother=e,t.Alert=i,t.ButtonMenu=r,t.DatePicker=s,t.FilterToggleButton=u,t.MultiFileUpload=l,t.MultiSelect=c,t.PasswordReveal=d,t.RichTextEditor=p,t.SearchToggle=h,t.SortableTable=f,t.initAll=function(t){const o=void 0!==(t=void 0!==t?t:{}).scope?t.scope:document;n(o.querySelectorAll('[data-module="moj-add-another"]'),(function(t){new e(t)})),n(o.querySelectorAll('[data-module="moj-multi-select"]'),(function(t){new c({container:t.querySelector(t.getAttribute("data-multi-select-checkbox")),checkboxes:t.querySelectorAll("tbody .govuk-checkboxes__input"),id_prefix:t.getAttribute("data-multi-select-idprefix")})})),n(o.querySelectorAll('[data-module="moj-password-reveal"]'),(function(t){new d(t)})),n(o.querySelectorAll('[data-module="moj-rich-text-editor"]'),(function(t){const e={textarea:$(t)},n=t.getAttribute("data-moj-rich-text-editor-toolbar");if(n){const t=n.split(",");e.toolbar={};for(const n in t)e.toolbar[t[n]]=!0}new p(e)})),n(o.querySelectorAll('[data-module="moj-search-toggle"]'),(function(t){new h({toggleButton:{container:$(t.querySelector(".moj-search-toggle__toggle")),text:t.getAttribute("data-moj-search-toggle-text")},search:{container:$(t.querySelector(".moj-search"))}})})),n(o.querySelectorAll('[data-module="moj-sortable-table"]'),(function(t){new f({table:t})})),n(o.querySelectorAll('[data-module="moj-date-picker"]'),(function(t){new s(t,{}).init()})),n(o.querySelectorAll('[data-module="moj-button-menu"]'),(function(t){new r(t,{}).init()})),n(o.querySelectorAll('[data-module="moj-alert"]'),(function(t){new i(t,{}).init()}))},t.version="0.0.0-development"}));//# sourceMappingURL=all.jquery.min.js.map
|