@ministryofjustice/frontend 3.1.0 → 3.2.0

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.
@@ -1,4 +1,4 @@
1
- ((t,e)=>{"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.MOJFrontend=e()})(this,function(){t="undefined"!=typeof window?window:this,e=function(k,$){function v(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item}function N(t){return null!=t&&t===t.window}var e=[],q=Object.getPrototypeOf,s=e.slice,O=e.flat?function(t){return e.flat.call(t)}:function(t){return e.concat.apply([],t)},R=e.push,b=e.indexOf,I={},P=I.toString,W=I.hasOwnProperty,U=W.toString,V=U.call(Object),g={},w=k.document,z={type:!0,src:!0,nonce:!0,noModule:!0};function Y(t,e,n){var o,i,r=(n=n||w).createElement("script");if(r.text=t,e)for(o in z)(i=e[o]||e.getAttribute&&e.getAttribute(o))&&r.setAttribute(o,i);n.head.appendChild(r).parentNode.removeChild(r)}function X(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?I[P.call(t)]||"object":typeof t}var t="3.7.1",Z=/HTML$/i,D=function(t,e){return new D.fn.init(t,e)};function K(t){var e=!!t&&"length"in t&&t.length,n=X(t);return!v(t)&&!N(t)&&("array"===n||0===e||"number"==typeof e&&0<e&&e-1 in t)}function x(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}D.fn=D.prototype={jquery:t,constructor:D,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){t=D.merge(this.constructor(),t);return t.prevObject=this,t},each:function(t){return D.each(this,t)},map:function(n){return this.pushStack(D.map(this,function(t,e){return n.call(t,e,t)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(D.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(D.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,t=+t+(t<0?e:0);return this.pushStack(0<=t&&t<e?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:R,sort:e.sort,splice:e.splice},D.extend=D.fn.extend=function(){var t,e,n,o,i,r=arguments[0]||{},a=1,s=arguments.length,l=!1;for("boolean"==typeof r&&(l=r,r=arguments[a]||{},a++),"object"==typeof r||v(r)||(r={}),a===s&&(r=this,a--);a<s;a++)if(null!=(t=arguments[a]))for(e in t)n=t[e],"__proto__"!==e&&r!==n&&(l&&n&&(D.isPlainObject(n)||(o=Array.isArray(n)))?(i=r[e],i=o&&!Array.isArray(i)?[]:o||D.isPlainObject(i)?i:{},o=!1,r[e]=D.extend(l,i,n)):void 0!==n&&(r[e]=n));return r},D.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){return!(!t||"[object Object]"!==P.call(t)||(t=q(t))&&("function"!=typeof(t=W.call(t,"constructor")&&t.constructor)||U.call(t)!==V))},isEmptyObject:function(t){for(var e in t)return!1;return!0},globalEval:function(t,e,n){Y(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,o=0;if(K(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+=D.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){e=e||[];return null!=t&&(K(Object(t))?D.merge(e,"string"==typeof t?[t]:t):R.call(e,t)),e},inArray:function(t,e,n){return null==e?-1:b.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,t=t&&(t.ownerDocument||t).documentElement;return!Z.test(e||t&&t.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,a=!n;i<r;i++)!e(t[i],i)!=a&&o.push(t[i]);return o},map:function(t,e,n){var o,i,r=0,a=[];if(K(t))for(o=t.length;r<o;r++)null!=(i=e(t[r],r,n))&&a.push(i);else for(r in t)null!=(i=e(t[r],r,n))&&a.push(i);return O(a)},guid:1,support:g}),"function"==typeof Symbol&&(D.fn[Symbol.iterator]=e[Symbol.iterator]),D.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){I["[object "+e+"]"]=e.toLowerCase()});var J=e.pop,G=e.sort,Q=e.splice,n="[\\x20\\t\\r\\n\\f]",tt=new RegExp("^"+n+"+|((?:^|[^\\\\])(?:\\\\.)*)"+n+"+$","g"),et=(D.contains=function(t,e){e=e&&e.parentNode;return t===e||!(!e||1!==e.nodeType||!(t.contains?t.contains(e):t.compareDocumentPosition&&16&t.compareDocumentPosition(e)))},/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g);function nt(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}D.escapeSelector=function(t){return(t+"").replace(et,nt)};var ot,T,it,rt,at,C,o,j,p,st,i=w,lt=R,S=lt,E=D.expando,A=0,ut=0,ct=At(),dt=At(),pt=At(),ht=At(),ft=function(t,e){return t===e&&(at=!0),0},gt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+n+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",r="\\["+n+"*("+t+")(?:"+n+"*([*^$|!~]?=)"+n+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+n+"*\\]",a=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+r+")*)|.*)\\)|)",mt=new RegExp(n+"+","g"),yt=new RegExp("^"+n+"*,"+n+"*"),vt=new RegExp("^"+n+"*([>+~]|"+n+")"+n+"*"),bt=new RegExp(n+"|>"),xt=new RegExp(a),kt=new RegExp("^"+t+"$"),wt={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+r),PSEUDO:new RegExp("^"+a),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+n+"*(even|odd|(([+-]|)(\\d*)n|)"+n+"*(?:([+-]|)"+n+"*(\\d+)|))"+n+"*\\)|)","i"),bool:new RegExp("^(?:"+gt+")$","i"),needsContext:new RegExp("^"+n+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+n+"*((?:-\\d)?\\d*)"+n+"*\\)|)(?=[^-]|$)","i")},Dt=/^(?:input|select|textarea|button)$/i,Tt=/^h\d$/i,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,jt=/[+~]/,d=new RegExp("\\\\[\\da-fA-F]{1,6}"+n+"?|\\\\([^\\r\\n\\f])","g"),h=function(t,e){t="0x"+t.slice(1)-65536;return e||(t<0?String.fromCharCode(65536+t):String.fromCharCode(t>>10|55296,1023&t|56320))},St=function(){Ft()},Et=qt(function(t){return!0===t.disabled&&x(t,"fieldset")},{dir:"parentNode",next:"legend"});try{S.apply(e=s.call(i.childNodes),i.childNodes),e[i.childNodes.length].nodeType}catch(t){S={apply:function(t,e){lt.apply(t,s.call(e))},call:function(t){lt.apply(t,s.call(arguments,1))}}}function L(e,t,n,o){var i,r,a,s,l,u,c=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!o&&(Ft(t),t=t||C,j)){if(11!==d&&(s=Ct.exec(e)))if(i=s[1]){if(9===d){if(!(u=t.getElementById(i)))return n;if(u.id===i)return S.call(n,u),n}else if(c&&(u=c.getElementById(i))&&L.contains(t,u)&&u.id===i)return S.call(n,u),n}else{if(s[2])return S.apply(n,t.getElementsByTagName(e)),n;if((i=s[3])&&t.getElementsByClassName)return S.apply(n,t.getElementsByClassName(i)),n}if(!(ht[e+" "]||p&&p.test(e))){if(u=e,c=t,1===d&&(bt.test(e)||vt.test(e))){for((c=jt.test(e)&&Bt(t.parentNode)||t)==t&&g.scope||((a=t.getAttribute("id"))?a=D.escapeSelector(a):t.setAttribute("id",a=E)),r=(l=$t(e)).length;r--;)l[r]=(a?"#"+a:":scope")+" "+Nt(l[r]);u=l.join(",")}try{return S.apply(n,c.querySelectorAll(u)),n}catch(t){ht(e,!0)}finally{a===E&&t.removeAttribute("id")}}}return Ut(e.replace(tt,"$1"),t,n,o)}function At(){var n=[];function o(t,e){return n.push(t+" ")>T.cacheLength&&delete o[n.shift()],o[t+" "]=e}return o}function l(t){return t[E]=!0,t}function Lt(t){var e=C.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e)}}function _t(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Et(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function Mt(a){return l(function(r){return r=+r,l(function(t,e){for(var n,o=a([],t.length,r),i=o.length;i--;)t[n=o[i]]&&(t[n]=!(e[n]=t[n]))})})}function Bt(t){return t&&void 0!==t.getElementsByTagName&&t}function Ft(t){var t=t?t.ownerDocument||t:i;return t!=C&&9===t.nodeType&&t.documentElement&&(o=(C=t).documentElement,j=!D.isXMLDoc(C),st=o.matches||o.webkitMatchesSelector||o.msMatchesSelector,o.msMatchesSelector&&i!=C&&(t=C.defaultView)&&t.top!==t&&t.addEventListener("unload",St),g.getById=Lt(function(t){return o.appendChild(t).id=D.expando,!C.getElementsByName||!C.getElementsByName(D.expando).length}),g.disconnectedMatch=Lt(function(t){return st.call(t,"*")}),g.scope=Lt(function(){return C.querySelectorAll(":scope")}),g.cssHas=Lt(function(){try{C.querySelector(":has(*,:jqfake)")}catch(t){return 1}}),g.getById?(T.filter.ID=function(t){var e=t.replace(d,h);return function(t){return t.getAttribute("id")===e}},T.find.ID=function(t,e){if(void 0!==e.getElementById&&j)return(e=e.getElementById(t))?[e]:[]}):(T.filter.ID=function(t){var e=t.replace(d,h);return function(t){t=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return t&&t.value===e}},T.find.ID=function(t,e){if(void 0!==e.getElementById&&j){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[]}}),T.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},T.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&j)return e.getElementsByClassName(t)},p=[],Lt(function(t){var e;o.appendChild(t).innerHTML="<a id='"+E+"' href='' disabled='disabled'></a><select id='"+E+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+n+"*(?:value|"+gt+")"),t.querySelectorAll("[id~="+E+"-]").length||p.push("~="),t.querySelectorAll("a#"+E+"+*").length||p.push(".#.+[+~]"),t.querySelectorAll(":checked").length||p.push(":checked"),(e=C.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),o.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(e=C.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||p.push("\\["+n+"*name"+n+"*="+n+"*(?:''|\"\")")}),g.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),ft=function(t,e){var n;return t===e?(at=!0,0):(n=!t.compareDocumentPosition-!e.compareDocumentPosition)||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===C||t.ownerDocument==i&&L.contains(i,t)?-1:e===C||e.ownerDocument==i&&L.contains(i,e)?1:rt?b.call(rt,t)-b.call(rt,e):0:4&n?-1:1)}),C}for(ot in L.matches=function(t,e){return L(t,null,null,e)},L.matchesSelector=function(t,e){if(Ft(t),j&&!ht[e+" "]&&(!p||!p.test(e)))try{var n=st.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){ht(e,!0)}return 0<L(e,C,null,[t]).length},L.contains=function(t,e){return(t.ownerDocument||t)!=C&&Ft(t),D.contains(t,e)},L.attr=function(t,e){(t.ownerDocument||t)!=C&&Ft(t);var n=T.attrHandle[e.toLowerCase()],n=n&&W.call(T.attrHandle,e.toLowerCase())?n(t,e,!j):void 0;return void 0!==n?n:t.getAttribute(e)},L.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},D.uniqueSort=function(t){var e,n=[],o=0,i=0;if(at=!g.sortStable,rt=!g.sortStable&&s.call(t,0),G.call(t,ft),at){for(;e=t[i++];)e===t[i]&&(o=n.push(i));for(;o--;)Q.call(t,n[o],1)}return rt=null,t},D.fn.uniqueSort=function(){return this.pushStack(D.uniqueSort(s.apply(this)))},(T=D.expr={cacheLength:50,createPseudo:l,match:wt,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(d,h),t[3]=(t[3]||t[4]||t[5]||"").replace(d,h),"~="===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]||L.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]&&L.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return wt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&xt.test(n)&&(e=(e=$t(n,!0))&&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(d,h).toLowerCase();return"*"===t?function(){return!0}:function(t){return x(t,e)}},CLASS:function(t){var e=ct[t+" "];return e||(e=new RegExp("(^|"+n+")"+t+"("+n+"|$)"))&&ct(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(e,n,o){return function(t){t=L.attr(t,e);return null==t?"!="===n:!n||(t+="","="===n?t===o:"!="===n?t!==o:"^="===n?o&&0===t.indexOf(o):"*="===n?o&&-1<t.indexOf(o):"$="===n?o&&t.slice(-o.length)===o:"~="===n?-1<(" "+t.replace(mt," ")+" ").indexOf(o):"|="===n&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(h,t,e,f,g){var m="nth"!==h.slice(0,3),y="last"!==h.slice(-4),v="of-type"===t;return 1===f&&0===g?function(t){return!!t.parentNode}:function(t,e,n){var o,i,r,a,s,l=m!=y?"nextSibling":"previousSibling",u=t.parentNode,c=v&&t.nodeName.toLowerCase(),d=!n&&!v,p=!1;if(u){if(m){for(;l;){for(r=t;r=r[l];)if(v?x(r,c):1===r.nodeType)return!1;s=l="only"===h&&!s&&"nextSibling"}return!0}if(s=[y?u.firstChild:u.lastChild],y&&d){for(p=(a=(o=(i=u[E]||(u[E]={}))[h]||[])[0]===A&&o[1])&&o[2],r=a&&u.childNodes[a];r=++a&&r&&r[l]||(p=a=0,s.pop());)if(1===r.nodeType&&++p&&r===t){i[h]=[A,a,p];break}}else if(!1===(p=d?a=(o=(i=t[E]||(t[E]={}))[h]||[])[0]===A&&o[1]:p))for(;(r=++a&&r&&r[l]||(p=a=0,s.pop()))&&((v?!x(r,c):1!==r.nodeType)||!++p||(d&&((i=r[E]||(r[E]={}))[h]=[A,p]),r!==t)););return(p-=g)===f||p%f==0&&0<=p/f}}},PSEUDO:function(t,r){var e,a=T.pseudos[t]||T.setFilters[t.toLowerCase()]||L.error("unsupported pseudo: "+t);return a[E]?a(r):1<a.length?(e=[t,t,"",r],T.setFilters.hasOwnProperty(t.toLowerCase())?l(function(t,e){for(var n,o=a(t,r),i=o.length;i--;)t[n=b.call(t,o[i])]=!(e[n]=o[i])}):function(t){return a(t,0,e)}):a}},pseudos:{not:l(function(t){var o=[],i=[],s=Wt(t.replace(tt,"$1"));return s[E]?l(function(t,e,n,o){for(var i,r=s(t,null,o,[]),a=t.length;a--;)(i=r[a])&&(t[a]=!(e[a]=i))}):function(t,e,n){return o[0]=t,s(o,null,n,i),o[0]=null,!i.pop()}}),has:l(function(e){return function(t){return 0<L(e,t).length}}),contains:l(function(e){return e=e.replace(d,h),function(t){return-1<(t.textContent||D.text(t)).indexOf(e)}}),lang:l(function(n){return kt.test(n||"")||L.error("unsupported lang: "+n),n=n.replace(d,h).toLowerCase(),function(t){var e;do{if(e=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===n||0===e.indexOf(n+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var e=k.location&&k.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===o},focus:function(t){return t===(()=>{try{return C.activeElement}catch(t){}})()&&C.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:_t(!1),disabled:_t(!0),checked:function(t){return x(t,"input")&&!!t.checked||x(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!T.pseudos.empty(t)},header:function(t){return Tt.test(t.nodeName)},input:function(t){return Dt.test(t.nodeName)},button:function(t){return x(t,"input")&&"button"===t.type||x(t,"button")},text:function(t){return x(t,"input")&&"text"===t.type&&(null==(t=t.getAttribute("type"))||"text"===t.toLowerCase())},first:Mt(function(){return[0]}),last:Mt(function(t,e){return[e-1]}),eq:Mt(function(t,e,n){return[n<0?n+e:n]}),even:Mt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:Mt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:Mt(function(t,e,n){for(var o=n<0?n+e:e<n?e:n;0<=--o;)t.push(o);return t}),gt:Mt(function(t,e,n){for(var o=n<0?n+e:n;++o<e;)t.push(o);return t})}}).pseudos.nth=T.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[ot]=(e=>function(t){return x(t,"input")&&t.type===e})(ot);for(ot in{submit:!0,reset:!0})T.pseudos[ot]=(e=>function(t){return(x(t,"input")||x(t,"button"))&&t.type===e})(ot);function Ht(){}function $t(t,e){var n,o,i,r,a,s,l,u=dt[t+" "];if(u)return e?0:u.slice(0);for(a=t,s=[],l=T.preFilter;a;){for(r in n&&!(o=yt.exec(a))||(o&&(a=a.slice(o[0].length)||a),s.push(i=[])),n=!1,(o=vt.exec(a))&&(n=o.shift(),i.push({value:n,type:o[0].replace(tt," ")}),a=a.slice(n.length)),T.filter)!(o=wt[r].exec(a))||l[r]&&!(o=l[r](o))||(n=o.shift(),i.push({value:n,type:r,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?L.error(t):dt(t,s).slice(0)}function Nt(t){for(var e=0,n=t.length,o="";e<n;e++)o+=t[e].value;return o}function qt(a,t,e){var s=t.dir,l=t.next,u=l||s,c=e&&"parentNode"===u,d=ut++;return t.first?function(t,e,n){for(;t=t[s];)if(1===t.nodeType||c)return a(t,e,n);return!1}:function(t,e,n){var o,i,r=[A,d];if(n){for(;t=t[s];)if((1===t.nodeType||c)&&a(t,e,n))return!0}else for(;t=t[s];)if(1===t.nodeType||c)if(i=t[E]||(t[E]={}),l&&x(t,l))t=t[s]||t;else{if((o=i[u])&&o[0]===A&&o[1]===d)return r[2]=o[2];if((i[u]=r)[2]=a(t,e,n))return!0}return!1}}function Ot(i){return 1<i.length?function(t,e,n){for(var o=i.length;o--;)if(!i[o](t,e,n))return!1;return!0}:i[0]}function Rt(t,e,n,o,i){for(var r,a=[],s=0,l=t.length,u=null!=e;s<l;s++)!(r=t[s])||n&&!n(r,o,i)||(a.push(r),u&&e.push(s));return a}function It(h,f,g,m,y,t){return m&&!m[E]&&(m=It(m)),y&&!y[E]&&(y=It(y,t)),l(function(t,e,n,o){var i,r,a,s,l=[],u=[],c=e.length,d=t||((t,e,n)=>{for(var o=0,i=e.length;o<i;o++)L(t,e[o],n);return n})(f||"*",n.nodeType?[n]:n,[]),p=!h||!t&&f?d:Rt(d,l,h,n,o);if(g?g(p,s=y||(t?h:c||m)?[]:e,n,o):s=p,m)for(i=Rt(s,u),m(i,[],n,o),r=i.length;r--;)(a=i[r])&&(s[u[r]]=!(p[u[r]]=a));if(t){if(y||h){if(y){for(i=[],r=s.length;r--;)(a=s[r])&&i.push(p[r]=a);y(null,s=[],i,o)}for(r=s.length;r--;)(a=s[r])&&-1<(i=y?b.call(t,a):l[r])&&(t[i]=!(e[i]=a))}}else s=Rt(s===e?s.splice(c,s.length):s),y?y(null,e,s,o):S.apply(e,s)})}function Pt(m,y){function t(t,e,n,o,i){var r,a,s,l=0,u="0",c=t&&[],d=[],p=it,h=t||b&&T.find.TAG("*",i),f=A+=null==p?1:Math.random()||.1,g=h.length;for(i&&(it=e==C||e||i);u!==g&&null!=(r=h[u]);u++){if(b&&r){for(a=0,e||r.ownerDocument==C||(Ft(r),n=!j);s=m[a++];)if(s(r,e||C,n)){S.call(o,r);break}i&&(A=f)}v&&((r=!s&&r)&&l--,t)&&c.push(r)}if(l+=u,v&&u!==l){for(a=0;s=y[a++];)s(c,d,e,n);if(t){if(0<l)for(;u--;)c[u]||d[u]||(d[u]=J.call(o));d=Rt(d)}S.apply(o,d),i&&!t&&0<d.length&&1<l+y.length&&D.uniqueSort(o)}return i&&(A=f,it=p),c}var v=0<y.length,b=0<m.length;return v?l(t):t}function Wt(t,e){var n,o=[],i=[],r=pt[t+" "];if(!r){for(n=(e=e||$t(t)).length;n--;)((r=function t(e){for(var o,n,i,r=e.length,a=T.relative[e[0].type],s=a||T.relative[" "],l=a?1:0,u=qt(function(t){return t===o},s,!0),c=qt(function(t){return-1<b.call(o,t)},s,!0),d=[function(t,e,n){return t=!a&&(n||e!=it)||((o=e).nodeType?u:c)(t,e,n),o=null,t}];l<r;l++)if(n=T.relative[e[l].type])d=[qt(Ot(d),n)];else{if((n=T.filter[e[l].type].apply(null,e[l].matches))[E]){for(i=++l;i<r&&!T.relative[e[i].type];i++);return It(1<l&&Ot(d),1<l&&Nt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(tt,"$1"),n,l<i&&t(e.slice(l,i)),i<r&&t(e=e.slice(i)),i<r&&Nt(e))}d.push(n)}return Ot(d)}(e[n]))[E]?o:i).push(r);(r=pt(t,Pt(i,o))).selector=t}return r}function Ut(t,e,n,o){var i,r,a,s,l,u="function"==typeof t&&t,c=!o&&$t(t=u.selector||t);if(n=n||[],1===c.length){if(2<(r=c[0]=c[0].slice(0)).length&&"ID"===(a=r[0]).type&&9===e.nodeType&&j&&T.relative[r[1].type]){if(!(e=(T.find.ID(a.matches[0].replace(d,h),e)||[])[0]))return n;u&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(i=wt.needsContext.test(t)?0:r.length;i--&&(a=r[i],!T.relative[s=a.type]);)if((l=T.find[s])&&(o=l(a.matches[0].replace(d,h),jt.test(r[0].type)&&Bt(e.parentNode)||e))){if(r.splice(i,1),t=o.length&&Nt(r))break;return S.apply(n,o),n}}return(u||Wt(t,c))(o,e,!j,n,!e||jt.test(t)&&Bt(e.parentNode)||e),n}Ht.prototype=T.filters=T.pseudos,T.setFilters=new Ht,g.sortStable=E.split("").sort(ft).join("")===E,Ft(),g.sortDetached=Lt(function(t){return 1&t.compareDocumentPosition(C.createElement("fieldset"))}),D.find=L,D.expr[":"]=D.expr.pseudos,D.unique=D.uniqueSort,L.compile=Wt,L.select=Ut,L.setDocument=Ft,L.tokenize=$t,L.escape=D.escapeSelector,L.getText=D.text,L.isXML=D.isXMLDoc,L.selectors=D.expr,L.support=D.support,L.uniqueSort=D.uniqueSort;function Vt(t,e,n){for(var o=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&D(t).is(n))break;o.push(t)}return o}function zt(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}var Yt=D.expr.match.needsContext,Xt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Zt(t,n,o){return v(n)?D.grep(t,function(t,e){return!!n.call(t,e,t)!==o}):n.nodeType?D.grep(t,function(t){return t===n!==o}):"string"!=typeof n?D.grep(t,function(t){return-1<b.call(n,t)!==o}):D.filter(n,t,o)}D.filter=function(t,e,n){var o=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===o.nodeType?D.find.matchesSelector(o,t)?[o]:[]:D.find.matches(t,D.grep(e,function(t){return 1===t.nodeType}))},D.fn.extend({find:function(t){var e,n,o=this.length,i=this;if("string"!=typeof t)return this.pushStack(D(t).filter(function(){for(e=0;e<o;e++)if(D.contains(i[e],this))return!0}));for(n=this.pushStack([]),e=0;e<o;e++)D.find(t,i[e],n);return 1<o?D.uniqueSort(n):n},filter:function(t){return this.pushStack(Zt(this,t||[],!1))},not:function(t){return this.pushStack(Zt(this,t||[],!0))},is:function(t){return!!Zt(this,"string"==typeof t&&Yt.test(t)?D(t):t||[],!1).length}});var Kt,Jt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Gt=((D.fn.init=function(t,e,n){if(t){if(n=n||Kt,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(D):D.makeArray(t,this);if(!(o="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:Jt.exec(t))||!o[1]&&e)return(!e||e.jquery?e||n:this.constructor(e)).find(t);if(o[1]){if(e=e instanceof D?e[0]:e,D.merge(this,D.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:w,!0)),Xt.test(o[1])&&D.isPlainObject(e))for(var o in e)v(this[o])?this[o](e[o]):this.attr(o,e[o])}else(n=w.getElementById(o[2]))&&(this[0]=n,this.length=1)}return this}).prototype=D.fn,Kt=D(w),/^(?:parents|prev(?:Until|All))/),Qt={children:!0,contents:!0,next:!0,prev:!0};function te(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}D.fn.extend({has:function(t){var e=D(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(D.contains(this,e[t]))return!0})},closest:function(t,e){var n,o=0,i=this.length,r=[],a="string"!=typeof t&&D(t);if(!Yt.test(t))for(;o<i;o++)for(n=this[o];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&D.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(1<r.length?D.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?b.call(D(t),this[0]):b.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(D.uniqueSort(D.merge(this.get(),D(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),D.each({parent:function(t){t=t.parentNode;return t&&11!==t.nodeType?t:null},parents:function(t){return Vt(t,"parentNode")},parentsUntil:function(t,e,n){return Vt(t,"parentNode",n)},next:function(t){return te(t,"nextSibling")},prev:function(t){return te(t,"previousSibling")},nextAll:function(t){return Vt(t,"nextSibling")},prevAll:function(t){return Vt(t,"previousSibling")},nextUntil:function(t,e,n){return Vt(t,"nextSibling",n)},prevUntil:function(t,e,n){return Vt(t,"previousSibling",n)},siblings:function(t){return zt((t.parentNode||{}).firstChild,t)},children:function(t){return zt(t.firstChild)},contents:function(t){return null!=t.contentDocument&&q(t.contentDocument)?t.contentDocument:(x(t,"template")&&(t=t.content||t),D.merge([],t.childNodes))}},function(o,i){D.fn[o]=function(t,e){var n=D.map(this,i,t);return(e="Until"!==o.slice(-5)?t:e)&&"string"==typeof e&&(n=D.filter(e,n)),1<this.length&&(Qt[o]||D.uniqueSort(n),Gt.test(o))&&n.reverse(),this.pushStack(n)}});var _=/[^\x20\t\r\n\f]+/g;function ee(t){return t}function ne(t){throw t}function oe(t,e,n,o){var i;try{t&&v(i=t.promise)?i.call(t).done(e).fail(n):t&&v(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(o))}catch(t){n.apply(void 0,[t])}}D.Callbacks=function(o){var t,n;o="string"==typeof o?(t=o,n={},D.each(t.match(_)||[],function(t,e){n[e]=!0}),n):D.extend({},o);function i(){for(s=s||o.once,a=r=!0;u.length;c=-1)for(e=u.shift();++c<l.length;)!1===l[c].apply(e[0],e[1])&&o.stopOnFalse&&(c=l.length,e=!1);o.memory||(e=!1),r=!1,s&&(l=e?[]:"")}var r,e,a,s,l=[],u=[],c=-1,d={add:function(){return l&&(e&&!r&&(c=l.length-1,u.push(e)),function n(t){D.each(t,function(t,e){v(e)?o.unique&&d.has(e)||l.push(e):e&&e.length&&"string"!==X(e)&&n(e)})}(arguments),e)&&!r&&i(),this},remove:function(){return D.each(arguments,function(t,e){for(var n;-1<(n=D.inArray(e,l,n));)l.splice(n,1),n<=c&&c--}),this},has:function(t){return t?-1<D.inArray(t,l):0<l.length},empty:function(){return l=l&&[],this},disable:function(){return s=u=[],l=e="",this},disabled:function(){return!l},lock:function(){return s=u=[],e||r||(l=e=""),this},locked:function(){return!!s},fireWith:function(t,e){return s||(e=[t,(e=e||[]).slice?e.slice():e],u.push(e),r)||i(),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!a}};return d},D.extend({Deferred:function(t){var r=[["notify","progress",D.Callbacks("memory"),D.Callbacks("memory"),2],["resolve","done",D.Callbacks("once memory"),D.Callbacks("once memory"),0,"resolved"],["reject","fail",D.Callbacks("once memory"),D.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return a.then(null,t)},pipe:function(){var i=arguments;return D.Deferred(function(o){D.each(r,function(t,e){var n=v(i[e[4]])&&i[e[4]];s[e[1]](function(){var t=n&&n.apply(this,arguments);t&&v(t.promise)?t.promise().progress(o.notify).done(o.resolve).fail(o.reject):o[e[0]+"With"](this,n?[t]:arguments)})}),i=null}).promise()},then:function(e,n,o){var l=0;function u(i,r,a,s){return function(){function t(){var t,e;if(!(i<l)){if((t=a.apply(n,o))===r.promise())throw new TypeError("Thenable self-resolution");e=t&&("object"==typeof t||"function"==typeof t)&&t.then,v(e)?s?e.call(t,u(l,r,ee,s),u(l,r,ne,s)):(l++,e.call(t,u(l,r,ee,s),u(l,r,ne,s),u(l,r,ee,r.notifyWith))):(a!==ee&&(n=void 0,o=[t]),(s||r.resolveWith)(n,o))}}var n=this,o=arguments,e=s?t:function(){try{t()}catch(t){D.Deferred.exceptionHook&&D.Deferred.exceptionHook(t,e.error),l<=i+1&&(a!==ne&&(n=void 0,o=[t]),r.rejectWith(n,o))}};i?e():(D.Deferred.getErrorHook?e.error=D.Deferred.getErrorHook():D.Deferred.getStackHook&&(e.error=D.Deferred.getStackHook()),k.setTimeout(e))}}return D.Deferred(function(t){r[0][3].add(u(0,t,v(o)?o:ee,t.notifyWith)),r[1][3].add(u(0,t,v(e)?e:ee)),r[2][3].add(u(0,t,v(n)?n:ne))}).promise()},promise:function(t){return null!=t?D.extend(t,a):a}},s={};return D.each(r,function(t,e){var n=e[2],o=e[5];a[e[1]]=n.add,o&&n.add(function(){i=o},r[3-t][2].disable,r[3-t][3].disable,r[0][2].lock,r[0][3].lock),n.add(e[3].fire),s[e[0]]=function(){return s[e[0]+"With"](this===s?void 0:this,arguments),this},s[e[0]+"With"]=n.fireWith}),a.promise(s),t&&t.call(s,s),s},when:function(t){function e(e){return function(t){i[e]=this,r[e]=1<arguments.length?s.call(arguments):t,--n||a.resolveWith(i,r)}}var n=arguments.length,o=n,i=Array(o),r=s.call(arguments),a=D.Deferred();if(n<=1&&(oe(t,a.done(e(o)).resolve,a.reject,!n),"pending"===a.state()||v(r[o]&&r[o].then)))return a.then();for(;o--;)oe(r[o],e(o),a.reject);return a.promise()}});var ie=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,re=(D.Deferred.exceptionHook=function(t,e){k.console&&k.console.warn&&t&&ie.test(t.name)&&k.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},D.readyException=function(t){k.setTimeout(function(){throw t})},D.Deferred());function ae(){w.removeEventListener("DOMContentLoaded",ae),k.removeEventListener("load",ae),D.ready()}D.fn.ready=function(t){return re.then(t).catch(function(t){D.readyException(t)}),this},D.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--D.readyWait:D.isReady)||(D.isReady=!0)!==t&&0<--D.readyWait||re.resolveWith(w,[D])}}),D.ready.then=re.then,"complete"===w.readyState||"loading"!==w.readyState&&!w.documentElement.doScroll?k.setTimeout(D.ready):(w.addEventListener("DOMContentLoaded",ae),k.addEventListener("load",ae));function c(t,e,n,o,i,r,a){var s=0,l=t.length,u=null==n;if("object"===X(n))for(s in i=!0,n)c(t,e,s,n[s],!0,r,a);else if(void 0!==o&&(i=!0,v(o)||(a=!0),e=u?a?(e.call(t,o),null):(u=e,function(t,e,n){return u.call(D(t),n)}):e))for(;s<l;s++)e(t[s],n,a?o:o.call(t[s],s,e(t[s],n)));return i?t:u?e.call(t):l?e(t[0],n):r}var se=/^-ms-/,le=/-([a-z])/g;function ue(t,e){return e.toUpperCase()}function M(t){return t.replace(se,"ms-").replace(le,ue)}function ce(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function de(){this.expando=D.expando+de.uid++}de.uid=1,de.prototype={cache:function(t){var e=t[this.expando];return e||(e={},ce(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[M(e)]=n;else for(o in e)i[M(o)]=e[o];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][M(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(M):(e=M(e))in o?[e]:e.match(_)||[]).length;for(;n--;)delete o[e[n]]}void 0!==e&&!D.isEmptyObject(o)||(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){t=t[this.expando];return void 0!==t&&!D.isEmptyObject(t)}};var y=new de,u=new de,pe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,he=/[A-Z]/g;function fe(t,e,n){var o,i;if(void 0===n&&1===t.nodeType)if(o="data-"+e.replace(he,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(o))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:pe.test(i)?JSON.parse(i):i)}catch(t){}u.set(t,e,n)}else n=void 0;return n}D.extend({hasData:function(t){return u.hasData(t)||y.hasData(t)},data:function(t,e,n){return u.access(t,e,n)},removeData:function(t,e){u.remove(t,e)},_data:function(t,e,n){return y.access(t,e,n)},_removeData:function(t,e){y.remove(t,e)}}),D.fn.extend({data:function(n,t){var e,o,i,r=this[0],a=r&&r.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){u.set(this,n)}):c(this,function(t){var e;if(r&&void 0===t)return void 0!==(e=u.get(r,n))||void 0!==(e=fe(r,n))?e:void 0;this.each(function(){u.set(this,n,t)})},null,t,1<arguments.length,null,!0);if(this.length&&(i=u.get(r),1===r.nodeType)&&!y.get(r,"hasDataAttrs")){for(e=a.length;e--;)a[e]&&0===(o=a[e].name).indexOf("data-")&&(o=M(o.slice(5)),fe(r,o,i[o]));y.set(r,"hasDataAttrs",!0)}return i},removeData:function(t){return this.each(function(){u.remove(this,t)})}}),D.extend({queue:function(t,e,n){var o;if(t)return o=y.get(t,e=(e||"fx")+"queue"),n&&(!o||Array.isArray(n)?o=y.access(t,e,D.makeArray(n)):o.push(n)),o||[]},dequeue:function(t,e){e=e||"fx";var n=D.queue(t,e),o=n.length,i=n.shift(),r=D._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===e&&n.unshift("inprogress"),delete r.stop,i.call(t,function(){D.dequeue(t,e)},r)),!o&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return y.get(t,n)||y.access(t,n,{empty:D.Callbacks("once memory").add(function(){y.remove(t,[e+"queue",n])})})}}),D.fn.extend({queue:function(e,n){var t=2;return"string"!=typeof e&&(n=e,e="fx",t--),arguments.length<t?D.queue(this[0],e):void 0===n?this:this.each(function(){var t=D.queue(this,e,n);D._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&D.dequeue(this,e)})},dequeue:function(t){return this.each(function(){D.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){function n(){--i||r.resolveWith(a,[a])}var o,i=1,r=D.Deferred(),a=this,s=this.length;for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(o=y.get(a[s],t+"queueHooks"))&&o.empty&&(i++,o.empty.add(n));return n(),r.promise(e)}});function ge(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&be(t)&&"none"===D.css(t,"display")}var t=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,me=new RegExp("^(?:([+-])=|)("+t+")([a-z%]*)$","i"),ye=["Top","Right","Bottom","Left"],ve=w.documentElement,be=function(t){return D.contains(t.ownerDocument,t)},xe={composed:!0};ve.getRootNode&&(be=function(t){return D.contains(t.ownerDocument,t)||t.getRootNode(xe)===t.ownerDocument});function ke(t,e,n,o){var i,r,a=20,s=o?function(){return o.cur()}:function(){return D.css(t,e,"")},l=s(),u=n&&n[3]||(D.cssNumber[e]?"":"px"),c=t.nodeType&&(D.cssNumber[e]||"px"!==u&&+l)&&me.exec(D.css(t,e));if(c&&c[3]!==u){for(u=u||c[3],c=+(l/=2)||1;a--;)D.style(t,e,c+u),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),c/=r;D.style(t,e,(c*=2)+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],o)&&(o.unit=u,o.start=c,o.end=i),i}var we={};function De(t,e){for(var n,o,i,r,a,s=[],l=0,u=t.length;l<u;l++)(o=t[l]).style&&(n=o.style.display,e?("none"===n&&(s[l]=y.get(o,"display")||null,s[l]||(o.style.display="")),""===o.style.display&&ge(o)&&(s[l]=(a=r=void 0,r=(i=o).ownerDocument,(a=we[i=i.nodeName])||(r=r.body.appendChild(r.createElement(i)),a=D.css(r,"display"),r.parentNode.removeChild(r),we[i]=a="none"===a?"block":a),a))):"none"!==n&&(s[l]="none",y.set(o,"display",n)));for(l=0;l<u;l++)null!=s[l]&&(t[l].style.display=s[l]);return t}D.fn.extend({show:function(){return De(this,!0)},hide:function(){return De(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){ge(this)?D(this).show():D(this).hide()})}});var Te=/^(?:checkbox|radio)$/i,Ce=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,je=/^$|^module$|\/(?:java|ecma)script/i,f=(r=w.createDocumentFragment().appendChild(w.createElement("div")),(a=w.createElement("input")).setAttribute("type","radio"),a.setAttribute("checked","checked"),a.setAttribute("name","t"),r.appendChild(a),g.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,r.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!r.cloneNode(!0).lastChild.defaultValue,r.innerHTML="<option></option>",g.option=!!r.lastChild,{thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]});function m(t,e){var n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&x(t,e)?D.merge([t],n):n}function Se(t,e){for(var n=0,o=t.length;n<o;n++)y.set(t[n],"globalEval",!e||y.get(e[n],"globalEval"))}f.tbody=f.tfoot=f.colgroup=f.caption=f.thead,f.th=f.td,g.option||(f.optgroup=f.option=[1,"<select multiple='multiple'>","</select>"]);var Ee=/<|&#?\w+;/;function Ae(t,e,n,o,i){for(var r,a,s,l,u,c=e.createDocumentFragment(),d=[],p=0,h=t.length;p<h;p++)if((r=t[p])||0===r)if("object"===X(r))D.merge(d,r.nodeType?[r]:r);else if(Ee.test(r)){for(a=a||c.appendChild(e.createElement("div")),s=(Ce.exec(r)||["",""])[1].toLowerCase(),s=f[s]||f._default,a.innerHTML=s[1]+D.htmlPrefilter(r)+s[2],u=s[0];u--;)a=a.lastChild;D.merge(d,a.childNodes),(a=c.firstChild).textContent=""}else d.push(e.createTextNode(r));for(c.textContent="",p=0;r=d[p++];)if(o&&-1<D.inArray(r,o))i&&i.push(r);else if(l=be(r),a=m(c.appendChild(r),"script"),l&&Se(a),n)for(u=0;r=a[u++];)je.test(r.type||"")&&n.push(r);return c}var Le=/^([^.]*)(?:\.(.+)|)/;function _e(){return!0}function Me(){return!1}function Be(t,e,n,o,i,r){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(o=o||n,n=void 0),e)Be(t,s,n,o,e[s],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=Me;else if(!i)return t;return 1===r&&(a=i,(i=function(t){return D().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=D.guid++)),t.each(function(){D.event.add(this,e,i,o,n)})}function Fe(t,o,e){e?(y.set(t,o,!1),D.event.add(t,o,{namespace:!1,handler:function(t){var e,n=y.get(this,o);if(1&t.isTrigger&&this[o]){if(n)(D.event.special[o]||{}).delegateType&&t.stopPropagation();else if(n=s.call(arguments),y.set(this,o,n),this[o](),e=y.get(this,o),y.set(this,o,!1),n!==e)return t.stopImmediatePropagation(),t.preventDefault(),e}else n&&(y.set(this,o,D.event.trigger(n[0],n.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=_e)}})):void 0===y.get(t,o)&&D.event.add(t,o,_e)}D.event={global:{},add:function(e,t,n,o,i){var r,a,s,l,u,c,d,p,h,f=y.get(e);if(ce(e))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&D.find.matchesSelector(ve,i),n.guid||(n.guid=D.guid++),s=(s=f.events)||(f.events=Object.create(null)),a=(a=f.handle)||(f.handle=function(t){return void 0!==D&&D.event.triggered!==t.type?D.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(_)||[""]).length;l--;)d=h=(p=Le.exec(t[l])||[])[1],p=(p[2]||"").split(".").sort(),d&&(u=D.event.special[d]||{},d=(i?u.delegateType:u.bindType)||d,u=D.event.special[d]||{},h=D.extend({type:d,origType:h,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&D.expr.match.needsContext.test(i),namespace:p.join(".")},r),(c=s[d])||((c=s[d]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,o,p,a))||e.addEventListener&&e.addEventListener(d,a),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=n.guid)),i?c.splice(c.delegateCount++,0,h):c.push(h),D.event.global[d]=!0)},remove:function(t,e,n,o,i){var r,a,s,l,u,c,d,p,h,f,g,m=y.hasData(t)&&y.get(t);if(m&&(l=m.events)){for(u=(e=(e||"").match(_)||[""]).length;u--;)if(h=g=(s=Le.exec(e[u])||[])[1],f=(s[2]||"").split(".").sort(),h){for(d=D.event.special[h]||{},p=l[h=(o?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=p.length;r--;)c=p[r],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.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));a&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,m.handle)||D.removeEvent(t,h,m.handle),delete l[h])}else for(h in l)D.event.remove(t,h+e[u],n,o,!0);D.isEmptyObject(l)&&y.remove(t,"handle events")}},dispatch:function(t){var e,n,o,i,r,a=new Array(arguments.length),s=D.event.fix(t),t=(y.get(this,"events")||Object.create(null))[s.type]||[],l=D.event.special[s.type]||{};for(a[0]=s,e=1;e<arguments.length;e++)a[e]=arguments[e];if(s.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,s)){for(r=D.event.handlers.call(this,s,t),e=0;(o=r[e++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==i.namespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,void 0!==(i=((D.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a))&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,s),s.result}},handlers:function(t,e){var n,o,i,r,a,s=[],l=e.delegateCount,u=t.target;if(l&&u.nodeType&&!("click"===t.type&&1<=t.button))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(r=[],a={},n=0;n<l;n++)void 0===a[i=(o=e[n]).selector+" "]&&(a[i]=o.needsContext?-1<D(i,this).index(u):D.find(i,this,null,[u]).length),a[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return u=this,l<e.length&&s.push({elem:u,handlers:e.slice(l)}),s},addProp:function(e,t){Object.defineProperty(D.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(t){return t[D.expando]?t:new D.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){t=this||t;return Te.test(t.type)&&t.click&&x(t,"input")&&Fe(t,"click",!0),!1},trigger:function(t){t=this||t;return Te.test(t.type)&&t.click&&x(t,"input")&&Fe(t,"click"),!0},_default:function(t){t=t.target;return Te.test(t.type)&&t.click&&x(t,"input")&&y.get(t,"click")||x(t,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},D.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},D.Event=function(t,e){if(!(this instanceof D.Event))return new D.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?_e:Me,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&&D.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[D.expando]=!0},D.Event.prototype={constructor:D.Event,isDefaultPrevented:Me,isPropagationStopped:Me,isImmediatePropagationStopped:Me,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=_e,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=_e,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=_e,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},D.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},D.event.addProp),D.each({focus:"focusin",blur:"focusout"},function(o,i){function r(t){var e,n;w.documentMode?(e=y.get(this,"handle"),(n=D.event.fix(t)).type="focusin"===t.type?"focus":"blur",n.isSimulated=!0,e(t),n.target===n.currentTarget&&e(n)):D.event.simulate(i,t.target,D.event.fix(t))}D.event.special[o]={setup:function(){var t;if(Fe(this,o,!0),!w.documentMode)return!1;(t=y.get(this,i))||this.addEventListener(i,r),y.set(this,i,(t||0)+1)},trigger:function(){return Fe(this,o),!0},teardown:function(){var t;if(!w.documentMode)return!1;(t=y.get(this,i)-1)?y.set(this,i,t):(this.removeEventListener(i,r),y.remove(this,i))},_default:function(t){return y.get(t.target,o)},delegateType:i},D.event.special[i]={setup:function(){var t=this.ownerDocument||this.document||this,e=w.documentMode?this:t,n=y.get(e,i);n||(w.documentMode?this.addEventListener(i,r):t.addEventListener(o,r,!0)),y.set(e,i,(n||0)+1)},teardown:function(){var t=this.ownerDocument||this.document||this,e=w.documentMode?this:t,n=y.get(e,i)-1;n?y.set(e,i,n):(w.documentMode?this.removeEventListener(i,r):t.removeEventListener(o,r,!0),y.remove(e,i))}}}),D.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,i){D.event.special[t]={delegateType:i,bindType:i,handle:function(t){var e,n=t.relatedTarget,o=t.handleObj;return n&&(n===this||D.contains(this,n))||(t.type=o.origType,e=o.handler.apply(this,arguments),t.type=i),e}}}),D.fn.extend({on:function(t,e,n,o){return Be(this,t,e,n,o)},one:function(t,e,n,o){return Be(this,t,e,n,o,1)},off:function(t,e,n){var o,i;if(t&&t.preventDefault&&t.handleObj)o=t.handleObj,D(t.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler);else{if("object"!=typeof t)return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Me),this.each(function(){D.event.remove(this,t,n,e)});for(i in t)this.off(i,e,t[i])}return this}});var He=/<script|<style|<link/i,$e=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function qe(t,e){return x(t,"table")&&x(11!==e.nodeType?e:e.firstChild,"tr")&&D(t).children("tbody")[0]||t}function Oe(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Re(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ie(t,e){var n,o,i,r;if(1===e.nodeType){if(y.hasData(t)&&(r=y.get(t).events))for(i in y.remove(e,"handle events"),r)for(n=0,o=r[i].length;n<o;n++)D.event.add(e,i,r[i][n]);u.hasData(t)&&(t=u.access(t),t=D.extend({},t),u.set(e,t))}}function Pe(n,o,i,r){o=O(o);var t,e,a,s,l,u,c=0,d=n.length,p=d-1,h=o[0],f=v(h);if(f||1<d&&"string"==typeof h&&!g.checkClone&&$e.test(h))return n.each(function(t){var e=n.eq(t);f&&(o[0]=h.call(this,t,e.html())),Pe(e,o,i,r)});if(d&&(e=(t=Ae(o,n[0].ownerDocument,!1,n,r)).firstChild,1===t.childNodes.length&&(t=e),e||r)){for(s=(a=D.map(m(t,"script"),Oe)).length;c<d;c++)l=t,c!==p&&(l=D.clone(l,!0,!0),s)&&D.merge(a,m(l,"script")),i.call(n[c],l,c);if(s)for(u=a[a.length-1].ownerDocument,D.map(a,Re),c=0;c<s;c++)l=a[c],je.test(l.type||"")&&!y.access(l,"globalEval")&&D.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?D._evalUrl&&!l.noModule&&D._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},u):Y(l.textContent.replace(Ne,""),l,u))}return n}function We(t,e,n){for(var o,i=e?D.filter(e,t):t,r=0;null!=(o=i[r]);r++)n||1!==o.nodeType||D.cleanData(m(o)),o.parentNode&&(n&&be(o)&&Se(m(o,"script")),o.parentNode.removeChild(o));return t}D.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var o,i,r,a,s,l,u,c=t.cloneNode(!0),d=be(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||D.isXMLDoc(t)))for(a=m(c),o=0,i=(r=m(t)).length;o<i;o++)s=r[o],l=a[o],u=void 0,"input"===(u=l.nodeName.toLowerCase())&&Te.test(s.type)?l.checked=s.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=s.defaultValue);if(e)if(n)for(r=r||m(t),a=a||m(c),o=0,i=r.length;o<i;o++)Ie(r[o],a[o]);else Ie(t,c);return 0<(a=m(c,"script")).length&&Se(a,!d&&m(t,"script")),c},cleanData:function(t){for(var e,n,o,i=D.event.special,r=0;void 0!==(n=t[r]);r++)if(ce(n)){if(e=n[y.expando]){if(e.events)for(o in e.events)i[o]?D.event.remove(n,o):D.removeEvent(n,o,e.handle);n[y.expando]=void 0}n[u.expando]&&(n[u.expando]=void 0)}}}),D.fn.extend({detach:function(t){return We(this,t,!0)},remove:function(t){return We(this,t)},text:function(t){return c(this,function(t){return void 0===t?D.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 Pe(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,t).appendChild(t)})},prepend:function(){return Pe(this,arguments,function(t){var e;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(e=qe(this,t)).insertBefore(t,e.firstChild)})},before:function(){return Pe(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Pe(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&&(D.cleanData(m(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return D.clone(this,t,e)})},html:function(t){return c(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&&!He.test(t)&&!f[(Ce.exec(t)||["",""])[1].toLowerCase()]){t=D.htmlPrefilter(t);try{for(;n<o;n++)1===(e=this[n]||{}).nodeType&&(D.cleanData(m(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(t){var e=this.parentNode;D.inArray(this,n)<0&&(D.cleanData(m(this)),e)&&e.replaceChild(t,this)},n)}}),D.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,a){D.fn[t]=function(t){for(var e,n=[],o=D(t),i=o.length-1,r=0;r<=i;r++)e=r===i?this:this.clone(!0),D(o[r])[a](e),R.apply(n,e.get());return this.pushStack(n)}});function Ue(t){var e=t.ownerDocument.defaultView;return(e=e&&e.opener?e:k).getComputedStyle(t)}function Ve(t,e,n){var o,i={};for(o in e)i[o]=t.style[o],t.style[o]=e[o];for(o in n=n.call(t),e)t.style[o]=i[o];return n}var ze,Ye,Xe,Ze,Ke,Je,Ge,B,Qe=new RegExp("^("+t+")(?!px)[a-z%]+$","i"),tn=/^--/,en=new RegExp(ye.join("|"),"i");function nn(){var t;B&&(Ge.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",B.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ve.appendChild(Ge).appendChild(B),t=k.getComputedStyle(B),ze="1%"!==t.top,Je=12===on(t.marginLeft),B.style.right="60%",Ze=36===on(t.right),Ye=36===on(t.width),B.style.position="absolute",Xe=12===on(B.offsetWidth/3),ve.removeChild(Ge),B=null)}function on(t){return Math.round(parseFloat(t))}function rn(t,e,n){var o,i=tn.test(e),r=t.style;return(n=n||Ue(t))&&(o=n.getPropertyValue(e)||n[e],""!==(o=i?o&&(o.replace(tt,"$1")||void 0):o)||be(t)||(o=D.style(t,e)),!g.pixelBoxStyles())&&Qe.test(o)&&en.test(e)&&(i=r.width,t=r.minWidth,e=r.maxWidth,r.minWidth=r.maxWidth=r.width=o,o=n.width,r.width=i,r.minWidth=t,r.maxWidth=e),void 0!==o?o+"":o}function an(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}Ge=w.createElement("div"),(B=w.createElement("div")).style&&(B.style.backgroundClip="content-box",B.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===B.style.backgroundClip,D.extend(g,{boxSizingReliable:function(){return nn(),Ye},pixelBoxStyles:function(){return nn(),Ze},pixelPosition:function(){return nn(),ze},reliableMarginLeft:function(){return nn(),Je},scrollboxSize:function(){return nn(),Xe},reliableTrDimensions:function(){var t,e,n;return null==Ke&&(t=w.createElement("table"),e=w.createElement("tr"),n=w.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",ve.appendChild(t).appendChild(e).appendChild(n),n=k.getComputedStyle(e),Ke=parseInt(n.height,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10)===e.offsetHeight,ve.removeChild(t)),Ke}}));var sn=["Webkit","Moz","ms"],ln=w.createElement("div").style,un={};function cn(t){var e=D.cssProps[t]||un[t];return e||(t in ln?t:un[t]=(t=>{for(var e=t[0].toUpperCase()+t.slice(1),n=sn.length;n--;)if((t=sn[n]+e)in ln)return t})(t)||t)}var dn=/^(none|table(?!-c[ea]).+)/,pn={position:"absolute",visibility:"hidden",display:"block"},hn={letterSpacing:"0",fontWeight:"400"};function fn(t,e,n){var o=me.exec(e);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):e}function gn(t,e,n,o,i,r){var a="width"===e?1:0,s=0,l=0,u=0;if(n===(o?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=D.css(t,n+ye[a],!0,i)),o?("content"===n&&(l-=D.css(t,"padding"+ye[a],!0,i)),"margin"!==n&&(l-=D.css(t,"border"+ye[a]+"Width",!0,i))):(l+=D.css(t,"padding"+ye[a],!0,i),"padding"!==n?l+=D.css(t,"border"+ye[a]+"Width",!0,i):s+=D.css(t,"border"+ye[a]+"Width",!0,i));return!o&&0<=r&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-s-.5))||0),l+u}function mn(t,e,n){var o=Ue(t),i=(!g.boxSizingReliable()||n)&&"border-box"===D.css(t,"boxSizing",!1,o),r=i,a=rn(t,e,o),s="offset"+e[0].toUpperCase()+e.slice(1);if(Qe.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&x(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===D.css(t,"display",!1,o))&&t.getClientRects().length&&(i="border-box"===D.css(t,"boxSizing",!1,o),r=s in t)&&(a=t[s]),(a=parseFloat(a)||0)+gn(t,e,n||(i?"border":"content"),r,o,a)+"px"}function F(t,e,n,o,i){return new F.prototype.init(t,e,n,o,i)}D.extend({cssHooks:{opacity:{get:function(t,e){if(e)return""===(e=rn(t,"opacity"))?"1":e}}},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,a,s=M(e),l=tn.test(e),u=t.style;if(l||(e=cn(s)),a=D.cssHooks[e]||D.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,o))?i:u[e];"string"===(r=typeof n)&&(i=me.exec(n))&&i[1]&&(n=ke(t,e,i),r="number"),null==n||n!=n||("number"!==r||l||(n+=i&&i[3]||(D.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,o)))||(l?u.setProperty(e,n):u[e]=n)}},css:function(t,e,n,o){var i,r=M(e);return tn.test(e)||(e=cn(r)),"normal"===(i=void 0===(i=(r=D.cssHooks[e]||D.cssHooks[r])&&"get"in r?r.get(t,!0,n):i)?rn(t,e,o):i)&&e in hn&&(i=hn[e]),(""===n||n)&&(r=parseFloat(i),!0===n||isFinite(r))?r||0:i}}),D.each(["height","width"],function(t,a){D.cssHooks[a]={get:function(t,e,n){if(e)return!dn.test(D.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?mn(t,a,n):Ve(t,pn,function(){return mn(t,a,n)})},set:function(t,e,n){var o=Ue(t),i=!g.scrollboxSize()&&"absolute"===o.position,r=(i||n)&&"border-box"===D.css(t,"boxSizing",!1,o),n=n?gn(t,a,n,r,o):0;return r&&i&&(n-=Math.ceil(t["offset"+a[0].toUpperCase()+a.slice(1)]-parseFloat(o[a])-gn(t,a,"border",!1,o)-.5)),n&&(r=me.exec(e))&&"px"!==(r[3]||"px")&&(t.style[a]=e,e=D.css(t,a)),fn(0,e,n)}}}),D.cssHooks.marginLeft=an(g.reliableMarginLeft,function(t,e){if(e)return(parseFloat(rn(t,"marginLeft"))||t.getBoundingClientRect().left-Ve(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),D.each({margin:"",padding:"",border:"Width"},function(i,r){D.cssHooks[i+r]={expand:function(t){for(var e=0,n={},o="string"==typeof t?t.split(" "):[t];e<4;e++)n[i+ye[e]+r]=o[e]||o[e-2]||o[0];return n}},"margin"!==i&&(D.cssHooks[i+r].set=fn)}),D.fn.extend({css:function(t,e){return c(this,function(t,e,n){var o,i,r={},a=0;if(Array.isArray(e)){for(o=Ue(t),i=e.length;a<i;a++)r[e[a]]=D.css(t,e[a],!1,o);return r}return void 0!==n?D.style(t,e,n):D.css(t,e)},t,e,1<arguments.length)}}),((D.Tween=F).prototype={constructor:F,init:function(t,e,n,o,i,r){this.elem=t,this.prop=n,this.easing=i||D.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=o,this.unit=r||(D.cssNumber[n]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return(t&&t.get?t:F.propHooks._default).get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.options.duration?this.pos=e=D.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:F.propHooks._default).set(this),this}}).init.prototype=F.prototype,(F.propHooks={_default:{get:function(t){return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(t=D.css(t.elem,t.prop,""))&&"auto"!==t?t:0},set:function(t){D.fx.step[t.prop]?D.fx.step[t.prop](t):1!==t.elem.nodeType||!D.cssHooks[t.prop]&&null==t.elem.style[cn(t.prop)]?t.elem[t.prop]=t.now:D.style(t.elem,t.prop,t.now+t.unit)}}}).scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},D.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},D.fx=F.prototype.init,D.fx.step={};var yn,vn,bn=/^(?:toggle|show|hide)$/,xn=/queueHooks$/;function kn(){vn&&(!1===w.hidden&&k.requestAnimationFrame?k.requestAnimationFrame(kn):k.setTimeout(kn,D.fx.interval),D.fx.tick())}function wn(){return k.setTimeout(function(){yn=void 0}),yn=Date.now()}function Dn(t,e){var n,o=0,i={height:t};for(e=e?1:0;o<4;o+=2-e)i["margin"+(n=ye[o])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function Tn(t,e,n){for(var o,i=(H.tweeners[e]||[]).concat(H.tweeners["*"]),r=0,a=i.length;r<a;r++)if(o=i[r].call(n,e,t))return o}function H(i,t,e){var n,r,o,a,s,l,u,c=0,d=H.prefilters.length,p=D.Deferred().always(function(){delete h.elem}),h=function(){if(!r){for(var t=yn||wn(),t=Math.max(0,f.startTime+f.duration-t),e=1-(t/f.duration||0),n=0,o=f.tweens.length;n<o;n++)f.tweens[n].run(e);if(p.notifyWith(i,[f,e,t]),e<1&&o)return t;o||p.notifyWith(i,[f,1,0]),p.resolveWith(i,[f])}return!1},f=p.promise({elem:i,props:D.extend({},t),opts:D.extend(!0,{specialEasing:{},easing:D.easing._default},e),originalProperties:t,originalOptions:e,startTime:yn||wn(),duration:e.duration,tweens:[],createTween:function(t,e){e=D.Tween(i,f.opts,t,e,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(e),e},stop:function(t){var e=0,n=t?f.tweens.length:0;if(!r){for(r=!0;e<n;e++)f.tweens[e].run(1);t?(p.notifyWith(i,[f,1,0]),p.resolveWith(i,[f,t])):p.rejectWith(i,[f,t])}return this}}),g=f.props,m=g,y=f.opts.specialEasing;for(o in m)if(s=y[a=M(o)],l=m[o],Array.isArray(l)&&(s=l[1],l=m[o]=l[0]),o!==a&&(m[a]=l,delete m[o]),(u=D.cssHooks[a])&&"expand"in u)for(o in l=u.expand(l),delete m[a],l)o in m||(m[o]=l[o],y[o]=s);else y[a]=s;for(;c<d;c++)if(n=H.prefilters[c].call(f,i,g,f.opts))return v(n.stop)&&(D._queueHooks(f.elem,f.opts.queue).stop=n.stop.bind(n)),n;return D.map(g,Tn,f),v(f.opts.start)&&f.opts.start.call(i,f),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always),D.fx.timer(D.extend(h,{elem:i,anim:f,queue:f.opts.queue})),f}D.Animation=D.extend(H,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ke(n.elem,t,me.exec(e),n),n}]},tweener:function(t,e){for(var n,o=0,i=(t=v(t)?(e=t,["*"]):t.match(_)).length;o<i;o++)n=t[o],H.tweeners[n]=H.tweeners[n]||[],H.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var o,i,r,a,s,l,u,c="width"in e||"height"in e,d=this,p={},h=t.style,f=t.nodeType&&ge(t),g=y.get(t,"fxshow");for(o in n.queue||(null==(a=D._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,D.queue(t,"fx").length||a.empty.fire()})})),e)if(i=e[o],bn.test(i)){if(delete e[o],r=r||"toggle"===i,i===(f?"hide":"show")){if("show"!==i||!g||void 0===g[o])continue;f=!0}p[o]=g&&g[o]||D.style(t,o)}if((l=!D.isEmptyObject(e))||!D.isEmptyObject(p))for(o in c&&1===t.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(u=g&&g.display)&&(u=y.get(t,"display")),"none"===(c=D.css(t,"display"))&&(u?c=u:(De([t],!0),u=t.style.display||u,c=D.css(t,"display"),De([t]))),"inline"===c||"inline-block"===c&&null!=u)&&"none"===D.css(t,"float")&&(l||(d.done(function(){h.display=u}),null==u&&(c=h.display,u="none"===c?"":c)),h.display="inline-block"),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1,p)l||(g?"hidden"in g&&(f=g.hidden):g=y.access(t,"fxshow",{display:u}),r&&(g.hidden=!f),f&&De([t],!0),d.done(function(){for(o in f||De([t]),y.remove(t,"fxshow"),p)D.style(t,o,p[o])})),l=Tn(f?g[o]:0,o,d),o in g||(g[o]=l.start,f&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?H.prefilters.unshift(t):H.prefilters.push(t)}}),D.speed=function(t,e,n){var o=t&&"object"==typeof t?D.extend({},t):{complete:n||!n&&e||v(t)&&t,duration:t,easing:n&&e||e&&!v(e)&&e};return D.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in D.fx.speeds?o.duration=D.fx.speeds[o.duration]:o.duration=D.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){v(o.old)&&o.old.call(this),o.queue&&D.dequeue(this,o.queue)},o},D.fn.extend({fadeTo:function(t,e,n,o){return this.filter(ge).css("opacity",0).show().end().animate({opacity:e},t,n,o)},animate:function(e,t,n,o){function i(){var t=H(this,D.extend({},e),a);(r||y.get(this,"finish"))&&t.stop(!0)}var r=D.isEmptyObject(e),a=D.speed(t,n,o);return i.finish=i,r||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(i,t,r){function a(t){var e=t.stop;delete t.stop,e(r)}return"string"!=typeof i&&(r=t,t=i,i=void 0),t&&this.queue(i||"fx",[]),this.each(function(){var t=!0,e=null!=i&&i+"queueHooks",n=D.timers,o=y.get(this);if(e)o[e]&&o[e].stop&&a(o[e]);else for(e in o)o[e]&&o[e].stop&&xn.test(e)&&a(o[e]);for(e=n.length;e--;)n[e].elem!==this||null!=i&&n[e].queue!==i||(n[e].anim.stop(r),t=!1,n.splice(e,1));!t&&r||D.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var t,e=y.get(this),n=e[a+"queue"],o=e[a+"queueHooks"],i=D.timers,r=n?n.length:0;for(e.finish=!0,D.queue(this,a,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===a&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<r;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete e.finish})}}),D.each(["toggle","show","hide"],function(t,o){var i=D.fn[o];D.fn[o]=function(t,e,n){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(Dn(o,!0),t,e,n)}}),D.each({slideDown:Dn("show"),slideUp:Dn("hide"),slideToggle:Dn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,o){D.fn[t]=function(t,e,n){return this.animate(o,t,e,n)}}),D.timers=[],D.fx.tick=function(){var t,e=0,n=D.timers;for(yn=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||D.fx.stop(),yn=void 0},D.fx.timer=function(t){D.timers.push(t),D.fx.start()},D.fx.interval=13,D.fx.start=function(){vn||(vn=!0,kn())},D.fx.stop=function(){vn=null},D.fx.speeds={slow:600,fast:200,_default:400},D.fn.delay=function(o,t){return o=D.fx&&D.fx.speeds[o]||o,this.queue(t=t||"fx",function(t,e){var n=k.setTimeout(t,o);e.stop=function(){k.clearTimeout(n)}})},a=w.createElement("input"),r=w.createElement("select").appendChild(w.createElement("option")),a.type="checkbox",g.checkOn=""!==a.value,g.optSelected=r.selected,(a=w.createElement("input")).value="t",a.type="radio",g.radioValue="t"===a.value;var Cn,jn=D.expr.attrHandle,Sn=(D.fn.extend({attr:function(t,e){return c(this,D.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){D.removeAttr(this,t)})}}),D.extend({attr:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?D.prop(t,e,n):(1===r&&D.isXMLDoc(t)||(i=D.attrHooks[e.toLowerCase()]||(D.expr.match.bool.test(e)?Cn:void 0)),void 0!==n?null===n?void D.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)))&&null==(o=D.find.attr(t,e))?void 0:o)},attrHooks:{type:{set:function(t,e){var n;if(!g.radioValue&&"radio"===e&&x(t,"input"))return n=t.value,t.setAttribute("type",e),n&&(t.value=n),e}}},removeAttr:function(t,e){var n,o=0,i=e&&e.match(_);if(i&&1===t.nodeType)for(;n=i[o++];)t.removeAttribute(n)}}),Cn={set:function(t,e,n){return!1===e?D.removeAttr(t,n):t.setAttribute(n,n),n}},D.each(D.expr.match.bool.source.match(/\w+/g),function(t,e){var a=jn[e]||D.find.attr;jn[e]=function(t,e,n){var o,i,r=e.toLowerCase();return n||(i=jn[r],jn[r]=o,o=null!=a(t,e,n)?r:null,jn[r]=i),o}}),/^(?:input|select|textarea|button)$/i),En=/^(?:a|area)$/i;function An(t){return(t.match(_)||[]).join(" ")}function Ln(t){return t.getAttribute&&t.getAttribute("class")||""}function _n(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(_)||[]}D.fn.extend({prop:function(t,e){return c(this,D.prop,t,e,1<arguments.length)},removeProp:function(t){return this.each(function(){delete this[D.propFix[t]||t]})}}),D.extend({prop:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&D.isXMLDoc(t)||(e=D.propFix[e]||e,i=D.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=D.find.attr(t,"tabindex");return e?parseInt(e,10):Sn.test(t.nodeName)||En.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(D.propHooks.selected={get:function(t){t=t.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(t){t=t.parentNode;t&&(t.selectedIndex,t.parentNode)&&t.parentNode.selectedIndex}}),D.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){D.propFix[this.toLowerCase()]=this}),D.fn.extend({addClass:function(e){var t,n,o,i,r,a;return v(e)?this.each(function(t){D(this).addClass(e.call(this,t,Ln(this)))}):(t=_n(e)).length?this.each(function(){if(o=Ln(this),n=1===this.nodeType&&" "+An(o)+" "){for(r=0;r<t.length;r++)i=t[r],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=An(n),o!==a&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,o,i,r,a;return v(e)?this.each(function(t){D(this).removeClass(e.call(this,t,Ln(this)))}):arguments.length?(t=_n(e)).length?this.each(function(){if(o=Ln(this),n=1===this.nodeType&&" "+An(o)+" "){for(r=0;r<t.length;r++)for(i=t[r];-1<n.indexOf(" "+i+" ");)n=n.replace(" "+i+" "," ");a=An(n),o!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,n){var t,o,i,r,a=typeof e,s="string"==a||Array.isArray(e);return v(e)?this.each(function(t){D(this).toggleClass(e.call(this,t,Ln(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(e):this.removeClass(e):(t=_n(e),this.each(function(){if(s)for(r=D(this),i=0;i<t.length;i++)o=t[i],r.hasClass(o)?r.removeClass(o):r.addClass(o);else void 0!==e&&"boolean"!=a||((o=Ln(this))&&y.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",!o&&!1!==e&&y.get(this,"__className__")||""))}))},hasClass:function(t){for(var e,n=0,o=" "+t+" ";e=this[n++];)if(1===e.nodeType&&-1<(" "+An(Ln(e))+" ").indexOf(o))return!0;return!1}});function Mn(t){t.stopPropagation()}var Bn=/\r/g,Fn=(D.fn.extend({val:function(e){var n,t,o,i=this[0];return arguments.length?(o=v(e),this.each(function(t){1!==this.nodeType||(null==(t=o?e.call(this,t,D(this).val()):e)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=D.map(t,function(t){return null==t?"":t+""})),(n=D.valHooks[this.type]||D.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,t,"value"))||(this.value=t)})):i?(n=D.valHooks[i.type]||D.valHooks[i.nodeName.toLowerCase()])&&"get"in n&&void 0!==(t=n.get(i,"value"))?t:"string"==typeof(t=i.value)?t.replace(Bn,""):null==t?"":t:void 0}}),D.extend({valHooks:{option:{get:function(t){var e=D.find.attr(t,"value");return null!=e?e:An(D.text(t))}},select:{get:function(t){for(var e,n=t.options,o=t.selectedIndex,i="select-one"===t.type,r=i?null:[],a=i?o+1:n.length,s=o<0?a:i?o:0;s<a;s++)if(((e=n[s]).selected||s===o)&&!e.disabled&&(!e.parentNode.disabled||!x(e.parentNode,"optgroup"))){if(e=D(e).val(),i)return e;r.push(e)}return r},set:function(t,e){for(var n,o,i=t.options,r=D.makeArray(e),a=i.length;a--;)((o=i[a]).selected=-1<D.inArray(D.valHooks.option.get(o),r))&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),D.each(["radio","checkbox"],function(){D.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=-1<D.inArray(D(t).val(),e)}},g.checkOn||(D.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),k.location),Hn={guid:Date.now()},$n=/\?/,Nn=(D.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new k.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||D.error("Invalid XML: "+(n?D.map(n.childNodes,function(t){return t.textContent}).join("\n"):t)),e},/^(?:focusinfocus|focusoutblur)$/),qn=(D.extend(D.event,{trigger:function(t,e,n,o){var i,r,a,s,l,u,c,d=[n||w],p=W.call(t,"type")?t.type:t,h=W.call(t,"namespace")?t.namespace.split("."):[],f=c=r=n=n||w;if(3!==n.nodeType&&8!==n.nodeType&&!Nn.test(p+D.event.triggered)&&(-1<p.indexOf(".")&&(p=(h=p.split(".")).shift(),h.sort()),s=p.indexOf(":")<0&&"on"+p,(t=t[D.expando]?t:new D.Event(p,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:D.makeArray(e,[t]),u=D.event.special[p]||{},o||!u.trigger||!1!==u.trigger.apply(n,e))){if(!o&&!u.noBubble&&!N(n)){for(a=u.delegateType||p,Nn.test(a+p)||(f=f.parentNode);f;f=f.parentNode)d.push(f),r=f;r===(n.ownerDocument||w)&&d.push(r.defaultView||r.parentWindow||k)}for(i=0;(f=d[i++])&&!t.isPropagationStopped();)c=f,t.type=1<i?a:u.bindType||p,(l=(y.get(f,"events")||Object.create(null))[t.type]&&y.get(f,"handle"))&&l.apply(f,e),(l=s&&f[s])&&l.apply&&ce(f)&&(t.result=l.apply(f,e),!1===t.result)&&t.preventDefault();return t.type=p,o||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(d.pop(),e)||!ce(n)||s&&v(n[p])&&!N(n)&&((r=n[s])&&(n[s]=null),D.event.triggered=p,t.isPropagationStopped()&&c.addEventListener(p,Mn),n[p](),t.isPropagationStopped()&&c.removeEventListener(p,Mn),D.event.triggered=void 0,r)&&(n[s]=r),t.result}},simulate:function(t,e,n){n=D.extend(new D.Event,n,{type:t,isSimulated:!0});D.event.trigger(n,null,e)}}),D.fn.extend({trigger:function(t,e){return this.each(function(){D.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return D.event.trigger(t,e,n,!0)}}),/\[\]$/),On=/\r?\n/g,Rn=/^(?:submit|button|image|reset|file)$/i,In=/^(?:input|select|textarea|keygen)/i;D.param=function(t,e){function n(t,e){e=v(e)?e():e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==e?"":e)}var o,i=[];if(null==t)return"";if(Array.isArray(t)||t.jquery&&!D.isPlainObject(t))D.each(t,function(){n(this.name,this.value)});else for(o in t)!function n(o,t,i,r){if(Array.isArray(t))D.each(t,function(t,e){i||qn.test(o)?r(o,e):n(o+"["+("object"==typeof e&&null!=e?t:"")+"]",e,i,r)});else if(i||"object"!==X(t))r(o,t);else for(var e in t)n(o+"["+e+"]",t[e],i,r)}(o,t[o],e,n);return i.join("&")},D.fn.extend({serialize:function(){return D.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=D.prop(this,"elements");return t?D.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!D(this).is(":disabled")&&In.test(this.nodeName)&&!Rn.test(t)&&(this.checked||!Te.test(t))}).map(function(t,e){var n=D(this).val();return null==n?null:Array.isArray(n)?D.map(n,function(t){return{name:e.name,value:t.replace(On,"\r\n")}}):{name:e.name,value:n.replace(On,"\r\n")}}).get()}});var Pn=/%20/g,Wn=/#.*$/,Un=/([?&])_=[^&]*/,Vn=/^(.*?):[ \t]*([^\r\n]*)$/gm,zn=/^(?:GET|HEAD)$/,Yn=/^\/\//,Xn={},Zn={},Kn="*/".concat("*"),Jn=w.createElement("a");function Gn(r){return function(t,e){"string"!=typeof t&&(e=t,t="*");var n,o=0,i=t.toLowerCase().match(_)||[];if(v(e))for(;n=i[o++];)"+"===n[0]?(n=n.slice(1)||"*",(r[n]=r[n]||[]).unshift(e)):(r[n]=r[n]||[]).push(e)}}function Qn(e,o,i,r){var a={},s=e===Zn;function l(t){var n;return a[t]=!0,D.each(e[t]||[],function(t,e){e=e(o,i,r);return"string"!=typeof e||s||a[e]?s?!(n=e):void 0:(o.dataTypes.unshift(e),l(e),!1)}),n}return l(o.dataTypes[0])||!a["*"]&&l("*")}function to(t,e){var n,o,i=D.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:o=o||{})[n]=e[n]);return o&&D.extend(!0,t,o),t}Jn.href=Fn.href,D.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fn.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Fn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kn,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":D.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?to(to(t,D.ajaxSettings),e):to(D.ajaxSettings,t)},ajaxPrefilter:Gn(Xn),ajaxTransport:Gn(Zn),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var l,u,c,n,d,p,h,o,f=D.ajaxSetup({},e=e||{}),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?D(g):D.event,y=D.Deferred(),v=D.Callbacks("once memory"),b=f.statusCode||{},i={},r={},a="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(p){if(!n)for(n={};e=Vn.exec(c);)n[e[1].toLowerCase()+" "]=(n[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=n[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return p?c:null},setRequestHeader:function(t,e){return null==p&&(t=r[t.toLowerCase()]=r[t.toLowerCase()]||t,i[t]=e),this},overrideMimeType:function(t){return null==p&&(f.mimeType=t),this},statusCode:function(t){if(t)if(p)x.always(t[x.status]);else for(var e in t)b[e]=[b[e],t[e]];return this},abort:function(t){t=t||a;return l&&l.abort(t),s(0,t),this}};if(y.promise(x),f.url=((t||f.url||Fn.href)+"").replace(Yn,Fn.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(_)||[""],null==f.crossDomain){t=w.createElement("a");try{t.href=f.url,t.href=t.href,f.crossDomain=Jn.protocol+"//"+Jn.host!=t.protocol+"//"+t.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=D.param(f.data,f.traditional)),Qn(Xn,f,e,x),!p){for(o in(h=D.event&&f.global)&&0==D.active++&&D.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!zn.test(f.type),u=f.url.replace(Wn,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pn,"+")):(t=f.url.slice(u.length),f.data&&(f.processData||"string"==typeof f.data)&&(u+=($n.test(u)?"&":"?")+f.data,delete f.data),!1===f.cache&&(u=u.replace(Un,"$1"),t=($n.test(u)?"&":"?")+"_="+Hn.guid+++t),f.url=u+t),f.ifModified&&(D.lastModified[u]&&x.setRequestHeader("If-Modified-Since",D.lastModified[u]),D.etag[u])&&x.setRequestHeader("If-None-Match",D.etag[u]),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Kn+"; q=0.01":""):f.accepts["*"]),f.headers)x.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(!1===f.beforeSend.call(g,x,f)||p))return x.abort();if(a="abort",v.add(f.complete),x.done(f.success),x.fail(f.error),l=Qn(Zn,f,e,x)){if(x.readyState=1,h&&m.trigger("ajaxSend",[x,f]),p)return x;f.async&&0<f.timeout&&(d=k.setTimeout(function(){x.abort("timeout")},f.timeout));try{p=!1,l.send(i,s)}catch(t){if(p)throw t;s(-1,t)}}else s(-1,"No Transport")}return x;function s(t,e,n,o){var i,r,a,s=e;p||(p=!0,d&&k.clearTimeout(d),l=void 0,c=o||"",x.readyState=0<t?4:0,o=200<=t&&t<300||304===t,n&&(a=((t,e,n)=>{for(var o,i,r,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(i in s)if(s[i]&&s[i].test(o)){l.unshift(i);break}if(l[0]in n)r=l[0];else{for(i in n){if(!l[0]||t.converters[i+" "+l[0]]){r=i;break}a=a||i}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]})(f,x,n)),!o&&-1<D.inArray("script",f.dataTypes)&&D.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),a=((t,e,n,o)=>{var i,r,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(r=c.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&o&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=u[l+" "+r]||u["* "+r]))for(i in u)if((s=i.split(" "))[1]===r&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(r=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}})(f,a,x,o),o?(f.ifModified&&((n=x.getResponseHeader("Last-Modified"))&&(D.lastModified[u]=n),n=x.getResponseHeader("etag"))&&(D.etag[u]=n),204===t||"HEAD"===f.type?s="nocontent":304===t?s="notmodified":(s=a.state,i=a.data,o=!(r=a.error))):(r=s,!t&&s||(s="error",t<0&&(t=0))),x.status=t,x.statusText=(e||s)+"",o?y.resolveWith(g,[i,s,x]):y.rejectWith(g,[x,s,r]),x.statusCode(b),b=void 0,h&&m.trigger(o?"ajaxSuccess":"ajaxError",[x,f,o?i:r]),v.fireWith(g,[x,s]),h&&(m.trigger("ajaxComplete",[x,f]),--D.active||D.event.trigger("ajaxStop")))}},getJSON:function(t,e,n){return D.get(t,e,n,"json")},getScript:function(t,e){return D.get(t,void 0,e,"script")}}),D.each(["get","post"],function(t,i){D[i]=function(t,e,n,o){return v(e)&&(o=o||n,n=e,e=void 0),D.ajax(D.extend({url:t,type:i,dataType:o,data:e,success:n},D.isPlainObject(t)&&t))}}),D.ajaxPrefilter(function(t){for(var e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),D._evalUrl=function(t,e,n){return D.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){D.globalEval(t,e,n)}})},D.fn.extend({wrapAll:function(t){return this[0]&&(v(t)&&(t=t.call(this[0])),t=D(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(t){D(this).wrapInner(n.call(this,t))}):this.each(function(){var t=D(this),e=t.contents();e.length?e.wrapAll(n):t.append(n)})},wrap:function(e){var n=v(e);return this.each(function(t){D(this).wrapAll(n?e.call(this,t):e)})},unwrap:function(t){return this.parent(t).not("body").each(function(){D(this).replaceWith(this.childNodes)}),this}}),D.expr.pseudos.hidden=function(t){return!D.expr.pseudos.visible(t)},D.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},D.ajaxSettings.xhr=function(){try{return new k.XMLHttpRequest}catch(t){}};var eo={0:200,1223:204},no=D.ajaxSettings.xhr(),oo=(g.cors=!!no&&"withCredentials"in no,g.ajax=no=!!no,D.ajaxTransport(function(i){var r,a;if(g.cors||no&&!i.crossDomain)return{send:function(t,e){var n,o=i.xhr();if(o.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)o[n]=i.xhrFields[n];for(n in i.mimeType&&o.overrideMimeType&&o.overrideMimeType(i.mimeType),i.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t)o.setRequestHeader(n,t[n]);r=function(t){return function(){r&&(r=a=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===t?o.abort():"error"===t?"number"!=typeof o.status?e(0,"error"):e(o.status,o.statusText):e(eo[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=r(),a=o.onerror=o.ontimeout=r("error"),void 0!==o.onabort?o.onabort=a:o.onreadystatechange=function(){4===o.readyState&&k.setTimeout(function(){r&&a()})},r=r("abort");try{o.send(i.hasContent&&i.data||null)}catch(t){if(r)throw t}},abort:function(){r&&r()}}}),D.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),D.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 D.globalEval(t),t}}}),D.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),D.ajaxTransport("script",function(n){var o,i;if(n.crossDomain||n.scriptAttrs)return{send:function(t,e){o=D("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(t){o.remove(),i=null,t&&e("error"===t.type?404:200,t.type)}),w.head.appendChild(o[0])},abort:function(){i&&i()}}}),[]),io=/(=)\?(?=&|$)|\?\?/,ro=(D.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=oo.pop()||D.expando+"_"+Hn.guid++;return this[t]=!0,t}}),D.ajaxPrefilter("json jsonp",function(t,e,n){var o,i,r,a=!1!==t.jsonp&&(io.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&io.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=v(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(io,"$1"+o):!1!==t.jsonp&&(t.url+=($n.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return r||D.error(o+" was not called"),r[0]},t.dataTypes[0]="json",i=k[o],k[o]=function(){r=arguments},n.always(function(){void 0===i?D(k).removeProp(o):k[o]=i,t[o]&&(t.jsonpCallback=e.jsonpCallback,oo.push(o)),r&&v(i)&&i(r[0]),r=i=void 0}),"script"}),g.createHTMLDocument=((t=w.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===t.childNodes.length),D.parseHTML=function(t,e,n){var o;return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((o=(e=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,e.head.appendChild(o)):e=w),o=!n&&[],(n=Xt.exec(t))?[e.createElement(n[1])]:(n=Ae([t],e,o),o&&o.length&&D(o).remove(),D.merge([],n.childNodes)))},D.fn.load=function(t,e,n){var o,i,r,a=this,s=t.indexOf(" ");return-1<s&&(o=An(t.slice(s)),t=t.slice(0,s)),v(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),0<a.length&&D.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done(function(t){r=arguments,a.html(o?D("<div>").append(D.parseHTML(t)).find(o):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,r||[t.responseText,e,t])})}),this},D.expr.pseudos.animated=function(e){return D.grep(D.timers,function(t){return e===t.elem}).length},D.offset={setOffset:function(t,e,n){var o,i,r,a,s=D.css(t,"position"),l=D(t),u={};"static"===s&&(t.style.position="relative"),r=l.offset(),o=D.css(t,"top"),a=D.css(t,"left"),s=("absolute"===s||"fixed"===s)&&-1<(o+a).indexOf("auto")?(i=(s=l.position()).top,s.left):(i=parseFloat(o)||0,parseFloat(a)||0),null!=(e=v(e)?e.call(t,n,D.extend({},r)):e).top&&(u.top=e.top-r.top+i),null!=e.left&&(u.left=e.left-r.left+s),"using"in e?e.using.call(t,u):l.css(u)}},D.fn.extend({offset:function(e){var t,n;return arguments.length?void 0===e?this:this.each(function(t){D.offset.setOffset(this,e,t)}):(n=this[0])?n.getClientRects().length?(t=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.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"===D.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"===D.css(t,"position");)t=t.parentNode;t&&t!==o&&1===t.nodeType&&((i=D(t).offset()).top+=D.css(t,"borderTopWidth",!0),i.left+=D.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-D.css(o,"marginTop",!0),left:e.left-i.left-D.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===D.css(t,"position");)t=t.offsetParent;return t||ve})}}),D.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,i){var r="pageYOffset"===i;D.fn[e]=function(t){return c(this,function(t,e,n){var o;if(N(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===n)return o?o[i]:t[e];o?o.scrollTo(r?o.pageXOffset:n,r?n:o.pageYOffset):t[e]=n},e,t,arguments.length)}}),D.each(["top","left"],function(t,n){D.cssHooks[n]=an(g.pixelPosition,function(t,e){if(e)return e=rn(t,n),Qe.test(e)?D(t).position()[n]+"px":e})}),D.each({Height:"height",Width:"width"},function(a,s){D.each({padding:"inner"+a,content:s,"":"outer"+a},function(o,r){D.fn[r]=function(t,e){var n=arguments.length&&(o||"boolean"!=typeof t),i=o||(!0===t||!0===e?"margin":"border");return c(this,function(t,e,n){var o;return N(t)?0===r.indexOf("outer")?t["inner"+a]:t.document.documentElement["client"+a]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+a],o["scroll"+a],t.body["offset"+a],o["offset"+a],o["client"+a])):void 0===n?D.css(t,e,i):D.style(t,e,n,i)},s,n?t:void 0,n)}})}),D.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){D.fn[e]=function(t){return this.on(e,t)}}),D.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)}}),D.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,n){D.fn[n]=function(t,e){return 0<arguments.length?this.on(n,null,t,e):this.trigger(n)}}),/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g),ao=(D.proxy=function(t,e){var n,o;if("string"==typeof e&&(o=t[e],e=t,t=o),v(t))return n=s.call(arguments,2),(o=function(){return t.apply(e||this,n.concat(s.call(arguments)))}).guid=t.guid=t.guid||D.guid++,o},D.holdReady=function(t){t?D.readyWait++:D.ready(!0)},D.isArray=Array.isArray,D.parseJSON=JSON.parse,D.nodeName=x,D.isFunction=v,D.isWindow=N,D.camelCase=M,D.type=X,D.now=Date.now,D.isNumeric=function(t){var e=D.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},D.trim=function(t){return null==t?"":(t+"").replace(ro,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return D}),k.jQuery),so=k.$;return D.noConflict=function(t){return k.$===D&&(k.$=so),t&&k.jQuery===D&&(k.jQuery=ao),D},void 0===$&&(k.jQuery=k.$=D),D},"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(t.document)return e(t);throw new Error("jQuery requires a window with a document")}:e(t);var t,e,s=jQuery.noConflict(!0),l={};function n(t,e={}){if(!t)return this;var 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}return l.removeAttributeValue=function(t,e,n){var o;t.getAttribute(e)&&(t.getAttribute(e)==n?t.removeAttribute(e):(n=new RegExp("(^|\\s)"+n+"(\\s|$)"),(o=t.getAttribute(e).match(n))&&3==o.length&&t.setAttribute(e,t.getAttribute(e).replace(n,o[1]&&o[2]?" ":""))))},l.addAttributeValue=function(t,e,n){t.getAttribute(e)?new RegExp("(^|\\s)"+n+"(\\s|$)").test(t.getAttribute(e))||t.setAttribute(e,t.getAttribute(e)+" "+n):t.setAttribute(e,n)},l.dragAndDropSupported=function(){return void 0!==document.createElement("div").ondrop},l.formDataSupported=function(){return"function"==typeof FormData},l.fileApiSupported=function(){var t=document.createElement("input");return t.type="file",void 0!==t.files},l.nodeListForEach=function(t,e){if(window.NodeList.prototype.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e.call(window,t[n],n,t)},l.initAll=function(t){var t=void 0!==(t=void 0!==t?t:{}).scope?t.scope:document,e=t.querySelectorAll('[data-module="moj-add-another"]'),e=(l.nodeListForEach(e,function(t){new l.AddAnother(t)}),t.querySelectorAll('[data-module="moj-multi-select"]')),e=(l.nodeListForEach(e,function(t){new l.MultiSelect({container:t.querySelector(t.getAttribute("data-multi-select-checkbox")),checkboxes:t.querySelectorAll("tbody .govuk-checkboxes__input")})}),t.querySelectorAll('[data-module="moj-password-reveal"]')),e=(l.nodeListForEach(e,function(t){new l.PasswordReveal(t)}),t.querySelectorAll('[data-module="moj-rich-text-editor"]')),e=(l.nodeListForEach(e,function(t){var e={textarea:s(t)},t=t.getAttribute("data-moj-rich-text-editor-toolbar");if(t){var n,o=t.split(",");for(n in e.toolbar={},o)e.toolbar[o[n]]=!0}new l.RichTextEditor(e)}),t.querySelectorAll('[data-module="moj-search-toggle"]')),e=(l.nodeListForEach(e,function(t){new l.SearchToggle({toggleButton:{container:s(t.querySelector(".moj-search-toggle__toggle")),text:t.getAttribute("data-moj-search-toggle-text")},search:{container:s(t.querySelector(".moj-search"))}})}),t.querySelectorAll('[data-module="moj-sortable-table"]')),e=(l.nodeListForEach(e,function(t){new l.SortableTable({table:t})}),t.querySelectorAll('[data-module="moj-sortable-table"]')),e=(l.nodeListForEach(e,function(t){new l.SortableTable({table:t})}),document.querySelectorAll('[data-module="moj-date-picker"]')),e=(l.nodeListForEach(e,function(t){new l.DatePicker(t,{}).init()}),t.querySelectorAll('[data-module="moj-button-menu"]'));l.nodeListForEach(e,function(t){new l.ButtonMenu(t,{}).init()})},l.AddAnother=function(t){this.container=s(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",s.proxy(this,"onRemoveButtonClick")),this.container.on("click",".moj-add-another__add-button",s.proxy(this,"onAddButtonClick")),this.container.find(".moj-add-another__add-button, moj-add-another__remove-button").prop("type","button"))},l.AddAnother.prototype.onAddButtonClick=function(t){var e=this.getNewItem(),n=(this.updateAttributes(this.getItems().length,e),this.resetItem(e),this.getItems().first());this.hasRemoveButton(n)||this.createRemoveButton(n),this.getItems().last().after(e),e.find("input, textarea, select").first().focus()},l.AddAnother.prototype.hasRemoveButton=function(t){return t.find(".moj-add-another__remove-button").length},l.AddAnother.prototype.getItems=function(){return this.container.find(".moj-add-another__item")},l.AddAnother.prototype.getNewItem=function(){var t=this.getItems().first().clone();return this.hasRemoveButton(t)||this.createRemoveButton(t),t},l.AddAnother.prototype.updateAttributes=function(o,i){i.find("[data-name]").each(function(t,e){var n=e.id;e.name=s(e).attr("data-name").replace(/%index%/,o),e.id=s(e).attr("data-id").replace(/%index%/,o),(s(e).siblings("label")[0]||s(e).parents("label")[0]||i.find('[for="'+n+'"]')[0]).htmlFor=e.id})},l.AddAnother.prototype.createRemoveButton=function(t){t.append('<button type="button" class="govuk-button govuk-button--secondary moj-add-another__remove-button">Remove</button>')},l.AddAnother.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=""})},l.AddAnother.prototype.onRemoveButtonClick=function(t){s(t.currentTarget).parents(".moj-add-another__item").remove();t=this.getItems();1===t.length&&t.find(".moj-add-another__remove-button").remove(),t.each(s.proxy(function(t,e){this.updateAttributes(t,s(e))},this)),this.focusHeading()},l.AddAnother.prototype.focusHeading=function(){this.container.find(".moj-add-another__heading").focus()},l.ButtonMenu=function(t,e={}){if(!t)return this;var 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},l.ButtonMenu.prototype.init=function(){if(1==this.$module.children.length){let e=this.$module.children[0];e.classList.forEach(t=>{t.startsWith("govuk-button-")&&e.classList.remove(t),e.classList.remove("moj-button-menu__item")}),this.config.buttonClasses&&e.classList.add(...this.config.buttonClasses.split(" "))}1<this.$module.children.length&&this.initMenu()},l.ButtonMenu.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)})},l.ButtonMenu.prototype.createMenu=function(){var 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},l.ButtonMenu.prototype.setupMenuItems=function(){Array.from(this.$menu.children).forEach(e=>{var t=document.createElement("li");this.$menu.insertBefore(t,e),t.appendChild(e),e.setAttribute("tabindex",-1),"BUTTON"==e.tagName&&e.setAttribute("type","button"),e.classList.forEach(t=>{t.startsWith("govuk-button")&&e.classList.remove(t)}),e.addEventListener("click",t=>{setTimeout(()=>{this.closeMenu(!1)},50)})})},l.ButtonMenu.prototype.toggleTemplate=function(){return`
1
+ ((t,e)=>{"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.MOJFrontend=e()})(this,function(){t="undefined"!=typeof window?window:this,e=function(k,$){function v(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item}function N(t){return null!=t&&t===t.window}var e=[],q=Object.getPrototypeOf,s=e.slice,O=e.flat?function(t){return e.flat.call(t)}:function(t){return e.concat.apply([],t)},R=e.push,b=e.indexOf,I={},P=I.toString,W=I.hasOwnProperty,U=W.toString,V=U.call(Object),g={},w=k.document,z={type:!0,src:!0,nonce:!0,noModule:!0};function Y(t,e,n){var o,i,r=(n=n||w).createElement("script");if(r.text=t,e)for(o in z)(i=e[o]||e.getAttribute&&e.getAttribute(o))&&r.setAttribute(o,i);n.head.appendChild(r).parentNode.removeChild(r)}function X(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?I[P.call(t)]||"object":typeof t}var t="3.7.1",Z=/HTML$/i,D=function(t,e){return new D.fn.init(t,e)};function K(t){var e=!!t&&"length"in t&&t.length,n=X(t);return!v(t)&&!N(t)&&("array"===n||0===e||"number"==typeof e&&0<e&&e-1 in t)}function x(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}D.fn=D.prototype={jquery:t,constructor:D,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){t=D.merge(this.constructor(),t);return t.prevObject=this,t},each:function(t){return D.each(this,t)},map:function(n){return this.pushStack(D.map(this,function(t,e){return n.call(t,e,t)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(D.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(D.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,t=+t+(t<0?e:0);return this.pushStack(0<=t&&t<e?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:R,sort:e.sort,splice:e.splice},D.extend=D.fn.extend=function(){var t,e,n,o,i,r=arguments[0]||{},a=1,s=arguments.length,l=!1;for("boolean"==typeof r&&(l=r,r=arguments[a]||{},a++),"object"==typeof r||v(r)||(r={}),a===s&&(r=this,a--);a<s;a++)if(null!=(t=arguments[a]))for(e in t)n=t[e],"__proto__"!==e&&r!==n&&(l&&n&&(D.isPlainObject(n)||(o=Array.isArray(n)))?(i=r[e],i=o&&!Array.isArray(i)?[]:o||D.isPlainObject(i)?i:{},o=!1,r[e]=D.extend(l,i,n)):void 0!==n&&(r[e]=n));return r},D.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){return!(!t||"[object Object]"!==P.call(t)||(t=q(t))&&("function"!=typeof(t=W.call(t,"constructor")&&t.constructor)||U.call(t)!==V))},isEmptyObject:function(t){for(var e in t)return!1;return!0},globalEval:function(t,e,n){Y(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,o=0;if(K(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+=D.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){e=e||[];return null!=t&&(K(Object(t))?D.merge(e,"string"==typeof t?[t]:t):R.call(e,t)),e},inArray:function(t,e,n){return null==e?-1:b.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,t=t&&(t.ownerDocument||t).documentElement;return!Z.test(e||t&&t.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,a=!n;i<r;i++)!e(t[i],i)!=a&&o.push(t[i]);return o},map:function(t,e,n){var o,i,r=0,a=[];if(K(t))for(o=t.length;r<o;r++)null!=(i=e(t[r],r,n))&&a.push(i);else for(r in t)null!=(i=e(t[r],r,n))&&a.push(i);return O(a)},guid:1,support:g}),"function"==typeof Symbol&&(D.fn[Symbol.iterator]=e[Symbol.iterator]),D.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){I["[object "+e+"]"]=e.toLowerCase()});var J=e.pop,G=e.sort,Q=e.splice,n="[\\x20\\t\\r\\n\\f]",tt=new RegExp("^"+n+"+|((?:^|[^\\\\])(?:\\\\.)*)"+n+"+$","g"),et=(D.contains=function(t,e){e=e&&e.parentNode;return t===e||!(!e||1!==e.nodeType||!(t.contains?t.contains(e):t.compareDocumentPosition&&16&t.compareDocumentPosition(e)))},/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g);function nt(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}D.escapeSelector=function(t){return(t+"").replace(et,nt)};var ot,T,it,rt,at,C,o,j,p,st,i=w,lt=R,S=lt,E=D.expando,A=0,ut=0,ct=At(),dt=At(),pt=At(),ht=At(),ft=function(t,e){return t===e&&(at=!0),0},gt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+n+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",r="\\["+n+"*("+t+")(?:"+n+"*([*^$|!~]?=)"+n+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+n+"*\\]",a=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+r+")*)|.*)\\)|)",mt=new RegExp(n+"+","g"),yt=new RegExp("^"+n+"*,"+n+"*"),vt=new RegExp("^"+n+"*([>+~]|"+n+")"+n+"*"),bt=new RegExp(n+"|>"),xt=new RegExp(a),kt=new RegExp("^"+t+"$"),wt={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+r),PSEUDO:new RegExp("^"+a),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+n+"*(even|odd|(([+-]|)(\\d*)n|)"+n+"*(?:([+-]|)"+n+"*(\\d+)|))"+n+"*\\)|)","i"),bool:new RegExp("^(?:"+gt+")$","i"),needsContext:new RegExp("^"+n+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+n+"*((?:-\\d)?\\d*)"+n+"*\\)|)(?=[^-]|$)","i")},Dt=/^(?:input|select|textarea|button)$/i,Tt=/^h\d$/i,Ct=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,jt=/[+~]/,d=new RegExp("\\\\[\\da-fA-F]{1,6}"+n+"?|\\\\([^\\r\\n\\f])","g"),h=function(t,e){t="0x"+t.slice(1)-65536;return e||(t<0?String.fromCharCode(65536+t):String.fromCharCode(t>>10|55296,1023&t|56320))},St=function(){Ft()},Et=qt(function(t){return!0===t.disabled&&x(t,"fieldset")},{dir:"parentNode",next:"legend"});try{S.apply(e=s.call(i.childNodes),i.childNodes),e[i.childNodes.length].nodeType}catch(t){S={apply:function(t,e){lt.apply(t,s.call(e))},call:function(t){lt.apply(t,s.call(arguments,1))}}}function L(e,t,n,o){var i,r,a,s,l,u,c=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!o&&(Ft(t),t=t||C,j)){if(11!==d&&(s=Ct.exec(e)))if(i=s[1]){if(9===d){if(!(u=t.getElementById(i)))return n;if(u.id===i)return S.call(n,u),n}else if(c&&(u=c.getElementById(i))&&L.contains(t,u)&&u.id===i)return S.call(n,u),n}else{if(s[2])return S.apply(n,t.getElementsByTagName(e)),n;if((i=s[3])&&t.getElementsByClassName)return S.apply(n,t.getElementsByClassName(i)),n}if(!(ht[e+" "]||p&&p.test(e))){if(u=e,c=t,1===d&&(bt.test(e)||vt.test(e))){for((c=jt.test(e)&&Bt(t.parentNode)||t)==t&&g.scope||((a=t.getAttribute("id"))?a=D.escapeSelector(a):t.setAttribute("id",a=E)),r=(l=$t(e)).length;r--;)l[r]=(a?"#"+a:":scope")+" "+Nt(l[r]);u=l.join(",")}try{return S.apply(n,c.querySelectorAll(u)),n}catch(t){ht(e,!0)}finally{a===E&&t.removeAttribute("id")}}}return Ut(e.replace(tt,"$1"),t,n,o)}function At(){var n=[];function o(t,e){return n.push(t+" ")>T.cacheLength&&delete o[n.shift()],o[t+" "]=e}return o}function l(t){return t[E]=!0,t}function Lt(t){var e=C.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e)}}function _t(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Et(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function Mt(a){return l(function(r){return r=+r,l(function(t,e){for(var n,o=a([],t.length,r),i=o.length;i--;)t[n=o[i]]&&(t[n]=!(e[n]=t[n]))})})}function Bt(t){return t&&void 0!==t.getElementsByTagName&&t}function Ft(t){var t=t?t.ownerDocument||t:i;return t!=C&&9===t.nodeType&&t.documentElement&&(o=(C=t).documentElement,j=!D.isXMLDoc(C),st=o.matches||o.webkitMatchesSelector||o.msMatchesSelector,o.msMatchesSelector&&i!=C&&(t=C.defaultView)&&t.top!==t&&t.addEventListener("unload",St),g.getById=Lt(function(t){return o.appendChild(t).id=D.expando,!C.getElementsByName||!C.getElementsByName(D.expando).length}),g.disconnectedMatch=Lt(function(t){return st.call(t,"*")}),g.scope=Lt(function(){return C.querySelectorAll(":scope")}),g.cssHas=Lt(function(){try{C.querySelector(":has(*,:jqfake)")}catch(t){return 1}}),g.getById?(T.filter.ID=function(t){var e=t.replace(d,h);return function(t){return t.getAttribute("id")===e}},T.find.ID=function(t,e){if(void 0!==e.getElementById&&j)return(e=e.getElementById(t))?[e]:[]}):(T.filter.ID=function(t){var e=t.replace(d,h);return function(t){t=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return t&&t.value===e}},T.find.ID=function(t,e){if(void 0!==e.getElementById&&j){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[]}}),T.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},T.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&j)return e.getElementsByClassName(t)},p=[],Lt(function(t){var e;o.appendChild(t).innerHTML="<a id='"+E+"' href='' disabled='disabled'></a><select id='"+E+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+n+"*(?:value|"+gt+")"),t.querySelectorAll("[id~="+E+"-]").length||p.push("~="),t.querySelectorAll("a#"+E+"+*").length||p.push(".#.+[+~]"),t.querySelectorAll(":checked").length||p.push(":checked"),(e=C.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),o.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(e=C.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||p.push("\\["+n+"*name"+n+"*="+n+"*(?:''|\"\")")}),g.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),ft=function(t,e){var n;return t===e?(at=!0,0):(n=!t.compareDocumentPosition-!e.compareDocumentPosition)||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===C||t.ownerDocument==i&&L.contains(i,t)?-1:e===C||e.ownerDocument==i&&L.contains(i,e)?1:rt?b.call(rt,t)-b.call(rt,e):0:4&n?-1:1)}),C}for(ot in L.matches=function(t,e){return L(t,null,null,e)},L.matchesSelector=function(t,e){if(Ft(t),j&&!ht[e+" "]&&(!p||!p.test(e)))try{var n=st.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){ht(e,!0)}return 0<L(e,C,null,[t]).length},L.contains=function(t,e){return(t.ownerDocument||t)!=C&&Ft(t),D.contains(t,e)},L.attr=function(t,e){(t.ownerDocument||t)!=C&&Ft(t);var n=T.attrHandle[e.toLowerCase()],n=n&&W.call(T.attrHandle,e.toLowerCase())?n(t,e,!j):void 0;return void 0!==n?n:t.getAttribute(e)},L.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},D.uniqueSort=function(t){var e,n=[],o=0,i=0;if(at=!g.sortStable,rt=!g.sortStable&&s.call(t,0),G.call(t,ft),at){for(;e=t[i++];)e===t[i]&&(o=n.push(i));for(;o--;)Q.call(t,n[o],1)}return rt=null,t},D.fn.uniqueSort=function(){return this.pushStack(D.uniqueSort(s.apply(this)))},(T=D.expr={cacheLength:50,createPseudo:l,match:wt,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(d,h),t[3]=(t[3]||t[4]||t[5]||"").replace(d,h),"~="===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]||L.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]&&L.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return wt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&xt.test(n)&&(e=(e=$t(n,!0))&&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(d,h).toLowerCase();return"*"===t?function(){return!0}:function(t){return x(t,e)}},CLASS:function(t){var e=ct[t+" "];return e||(e=new RegExp("(^|"+n+")"+t+"("+n+"|$)"))&&ct(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(e,n,o){return function(t){t=L.attr(t,e);return null==t?"!="===n:!n||(t+="","="===n?t===o:"!="===n?t!==o:"^="===n?o&&0===t.indexOf(o):"*="===n?o&&-1<t.indexOf(o):"$="===n?o&&t.slice(-o.length)===o:"~="===n?-1<(" "+t.replace(mt," ")+" ").indexOf(o):"|="===n&&(t===o||t.slice(0,o.length+1)===o+"-"))}},CHILD:function(h,t,e,f,g){var m="nth"!==h.slice(0,3),y="last"!==h.slice(-4),v="of-type"===t;return 1===f&&0===g?function(t){return!!t.parentNode}:function(t,e,n){var o,i,r,a,s,l=m!=y?"nextSibling":"previousSibling",u=t.parentNode,c=v&&t.nodeName.toLowerCase(),d=!n&&!v,p=!1;if(u){if(m){for(;l;){for(r=t;r=r[l];)if(v?x(r,c):1===r.nodeType)return!1;s=l="only"===h&&!s&&"nextSibling"}return!0}if(s=[y?u.firstChild:u.lastChild],y&&d){for(p=(a=(o=(i=u[E]||(u[E]={}))[h]||[])[0]===A&&o[1])&&o[2],r=a&&u.childNodes[a];r=++a&&r&&r[l]||(p=a=0,s.pop());)if(1===r.nodeType&&++p&&r===t){i[h]=[A,a,p];break}}else if(!1===(p=d?a=(o=(i=t[E]||(t[E]={}))[h]||[])[0]===A&&o[1]:p))for(;(r=++a&&r&&r[l]||(p=a=0,s.pop()))&&((v?!x(r,c):1!==r.nodeType)||!++p||(d&&((i=r[E]||(r[E]={}))[h]=[A,p]),r!==t)););return(p-=g)===f||p%f==0&&0<=p/f}}},PSEUDO:function(t,r){var e,a=T.pseudos[t]||T.setFilters[t.toLowerCase()]||L.error("unsupported pseudo: "+t);return a[E]?a(r):1<a.length?(e=[t,t,"",r],T.setFilters.hasOwnProperty(t.toLowerCase())?l(function(t,e){for(var n,o=a(t,r),i=o.length;i--;)t[n=b.call(t,o[i])]=!(e[n]=o[i])}):function(t){return a(t,0,e)}):a}},pseudos:{not:l(function(t){var o=[],i=[],s=Wt(t.replace(tt,"$1"));return s[E]?l(function(t,e,n,o){for(var i,r=s(t,null,o,[]),a=t.length;a--;)(i=r[a])&&(t[a]=!(e[a]=i))}):function(t,e,n){return o[0]=t,s(o,null,n,i),o[0]=null,!i.pop()}}),has:l(function(e){return function(t){return 0<L(e,t).length}}),contains:l(function(e){return e=e.replace(d,h),function(t){return-1<(t.textContent||D.text(t)).indexOf(e)}}),lang:l(function(n){return kt.test(n||"")||L.error("unsupported lang: "+n),n=n.replace(d,h).toLowerCase(),function(t){var e;do{if(e=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(e=e.toLowerCase())===n||0===e.indexOf(n+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var e=k.location&&k.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===o},focus:function(t){return t===(()=>{try{return C.activeElement}catch(t){}})()&&C.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:_t(!1),disabled:_t(!0),checked:function(t){return x(t,"input")&&!!t.checked||x(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!T.pseudos.empty(t)},header:function(t){return Tt.test(t.nodeName)},input:function(t){return Dt.test(t.nodeName)},button:function(t){return x(t,"input")&&"button"===t.type||x(t,"button")},text:function(t){return x(t,"input")&&"text"===t.type&&(null==(t=t.getAttribute("type"))||"text"===t.toLowerCase())},first:Mt(function(){return[0]}),last:Mt(function(t,e){return[e-1]}),eq:Mt(function(t,e,n){return[n<0?n+e:n]}),even:Mt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:Mt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:Mt(function(t,e,n){for(var o=n<0?n+e:e<n?e:n;0<=--o;)t.push(o);return t}),gt:Mt(function(t,e,n){for(var o=n<0?n+e:n;++o<e;)t.push(o);return t})}}).pseudos.nth=T.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[ot]=(e=>function(t){return x(t,"input")&&t.type===e})(ot);for(ot in{submit:!0,reset:!0})T.pseudos[ot]=(e=>function(t){return(x(t,"input")||x(t,"button"))&&t.type===e})(ot);function Ht(){}function $t(t,e){var n,o,i,r,a,s,l,u=dt[t+" "];if(u)return e?0:u.slice(0);for(a=t,s=[],l=T.preFilter;a;){for(r in n&&!(o=yt.exec(a))||(o&&(a=a.slice(o[0].length)||a),s.push(i=[])),n=!1,(o=vt.exec(a))&&(n=o.shift(),i.push({value:n,type:o[0].replace(tt," ")}),a=a.slice(n.length)),T.filter)!(o=wt[r].exec(a))||l[r]&&!(o=l[r](o))||(n=o.shift(),i.push({value:n,type:r,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?L.error(t):dt(t,s).slice(0)}function Nt(t){for(var e=0,n=t.length,o="";e<n;e++)o+=t[e].value;return o}function qt(a,t,e){var s=t.dir,l=t.next,u=l||s,c=e&&"parentNode"===u,d=ut++;return t.first?function(t,e,n){for(;t=t[s];)if(1===t.nodeType||c)return a(t,e,n);return!1}:function(t,e,n){var o,i,r=[A,d];if(n){for(;t=t[s];)if((1===t.nodeType||c)&&a(t,e,n))return!0}else for(;t=t[s];)if(1===t.nodeType||c)if(i=t[E]||(t[E]={}),l&&x(t,l))t=t[s]||t;else{if((o=i[u])&&o[0]===A&&o[1]===d)return r[2]=o[2];if((i[u]=r)[2]=a(t,e,n))return!0}return!1}}function Ot(i){return 1<i.length?function(t,e,n){for(var o=i.length;o--;)if(!i[o](t,e,n))return!1;return!0}:i[0]}function Rt(t,e,n,o,i){for(var r,a=[],s=0,l=t.length,u=null!=e;s<l;s++)!(r=t[s])||n&&!n(r,o,i)||(a.push(r),u&&e.push(s));return a}function It(h,f,g,m,y,t){return m&&!m[E]&&(m=It(m)),y&&!y[E]&&(y=It(y,t)),l(function(t,e,n,o){var i,r,a,s,l=[],u=[],c=e.length,d=t||((t,e,n)=>{for(var o=0,i=e.length;o<i;o++)L(t,e[o],n);return n})(f||"*",n.nodeType?[n]:n,[]),p=!h||!t&&f?d:Rt(d,l,h,n,o);if(g?g(p,s=y||(t?h:c||m)?[]:e,n,o):s=p,m)for(i=Rt(s,u),m(i,[],n,o),r=i.length;r--;)(a=i[r])&&(s[u[r]]=!(p[u[r]]=a));if(t){if(y||h){if(y){for(i=[],r=s.length;r--;)(a=s[r])&&i.push(p[r]=a);y(null,s=[],i,o)}for(r=s.length;r--;)(a=s[r])&&-1<(i=y?b.call(t,a):l[r])&&(t[i]=!(e[i]=a))}}else s=Rt(s===e?s.splice(c,s.length):s),y?y(null,e,s,o):S.apply(e,s)})}function Pt(m,y){function t(t,e,n,o,i){var r,a,s,l=0,u="0",c=t&&[],d=[],p=it,h=t||b&&T.find.TAG("*",i),f=A+=null==p?1:Math.random()||.1,g=h.length;for(i&&(it=e==C||e||i);u!==g&&null!=(r=h[u]);u++){if(b&&r){for(a=0,e||r.ownerDocument==C||(Ft(r),n=!j);s=m[a++];)if(s(r,e||C,n)){S.call(o,r);break}i&&(A=f)}v&&((r=!s&&r)&&l--,t)&&c.push(r)}if(l+=u,v&&u!==l){for(a=0;s=y[a++];)s(c,d,e,n);if(t){if(0<l)for(;u--;)c[u]||d[u]||(d[u]=J.call(o));d=Rt(d)}S.apply(o,d),i&&!t&&0<d.length&&1<l+y.length&&D.uniqueSort(o)}return i&&(A=f,it=p),c}var v=0<y.length,b=0<m.length;return v?l(t):t}function Wt(t,e){var n,o=[],i=[],r=pt[t+" "];if(!r){for(n=(e=e||$t(t)).length;n--;)((r=function t(e){for(var o,n,i,r=e.length,a=T.relative[e[0].type],s=a||T.relative[" "],l=a?1:0,u=qt(function(t){return t===o},s,!0),c=qt(function(t){return-1<b.call(o,t)},s,!0),d=[function(t,e,n){return t=!a&&(n||e!=it)||((o=e).nodeType?u:c)(t,e,n),o=null,t}];l<r;l++)if(n=T.relative[e[l].type])d=[qt(Ot(d),n)];else{if((n=T.filter[e[l].type].apply(null,e[l].matches))[E]){for(i=++l;i<r&&!T.relative[e[i].type];i++);return It(1<l&&Ot(d),1<l&&Nt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(tt,"$1"),n,l<i&&t(e.slice(l,i)),i<r&&t(e=e.slice(i)),i<r&&Nt(e))}d.push(n)}return Ot(d)}(e[n]))[E]?o:i).push(r);(r=pt(t,Pt(i,o))).selector=t}return r}function Ut(t,e,n,o){var i,r,a,s,l,u="function"==typeof t&&t,c=!o&&$t(t=u.selector||t);if(n=n||[],1===c.length){if(2<(r=c[0]=c[0].slice(0)).length&&"ID"===(a=r[0]).type&&9===e.nodeType&&j&&T.relative[r[1].type]){if(!(e=(T.find.ID(a.matches[0].replace(d,h),e)||[])[0]))return n;u&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(i=wt.needsContext.test(t)?0:r.length;i--&&(a=r[i],!T.relative[s=a.type]);)if((l=T.find[s])&&(o=l(a.matches[0].replace(d,h),jt.test(r[0].type)&&Bt(e.parentNode)||e))){if(r.splice(i,1),t=o.length&&Nt(r))break;return S.apply(n,o),n}}return(u||Wt(t,c))(o,e,!j,n,!e||jt.test(t)&&Bt(e.parentNode)||e),n}Ht.prototype=T.filters=T.pseudos,T.setFilters=new Ht,g.sortStable=E.split("").sort(ft).join("")===E,Ft(),g.sortDetached=Lt(function(t){return 1&t.compareDocumentPosition(C.createElement("fieldset"))}),D.find=L,D.expr[":"]=D.expr.pseudos,D.unique=D.uniqueSort,L.compile=Wt,L.select=Ut,L.setDocument=Ft,L.tokenize=$t,L.escape=D.escapeSelector,L.getText=D.text,L.isXML=D.isXMLDoc,L.selectors=D.expr,L.support=D.support,L.uniqueSort=D.uniqueSort;function Vt(t,e,n){for(var o=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&D(t).is(n))break;o.push(t)}return o}function zt(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}var Yt=D.expr.match.needsContext,Xt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Zt(t,n,o){return v(n)?D.grep(t,function(t,e){return!!n.call(t,e,t)!==o}):n.nodeType?D.grep(t,function(t){return t===n!==o}):"string"!=typeof n?D.grep(t,function(t){return-1<b.call(n,t)!==o}):D.filter(n,t,o)}D.filter=function(t,e,n){var o=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===o.nodeType?D.find.matchesSelector(o,t)?[o]:[]:D.find.matches(t,D.grep(e,function(t){return 1===t.nodeType}))},D.fn.extend({find:function(t){var e,n,o=this.length,i=this;if("string"!=typeof t)return this.pushStack(D(t).filter(function(){for(e=0;e<o;e++)if(D.contains(i[e],this))return!0}));for(n=this.pushStack([]),e=0;e<o;e++)D.find(t,i[e],n);return 1<o?D.uniqueSort(n):n},filter:function(t){return this.pushStack(Zt(this,t||[],!1))},not:function(t){return this.pushStack(Zt(this,t||[],!0))},is:function(t){return!!Zt(this,"string"==typeof t&&Yt.test(t)?D(t):t||[],!1).length}});var Kt,Jt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Gt=((D.fn.init=function(t,e,n){if(t){if(n=n||Kt,"string"!=typeof t)return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(D):D.makeArray(t,this);if(!(o="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:Jt.exec(t))||!o[1]&&e)return(!e||e.jquery?e||n:this.constructor(e)).find(t);if(o[1]){if(e=e instanceof D?e[0]:e,D.merge(this,D.parseHTML(o[1],e&&e.nodeType?e.ownerDocument||e:w,!0)),Xt.test(o[1])&&D.isPlainObject(e))for(var o in e)v(this[o])?this[o](e[o]):this.attr(o,e[o])}else(n=w.getElementById(o[2]))&&(this[0]=n,this.length=1)}return this}).prototype=D.fn,Kt=D(w),/^(?:parents|prev(?:Until|All))/),Qt={children:!0,contents:!0,next:!0,prev:!0};function te(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}D.fn.extend({has:function(t){var e=D(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(D.contains(this,e[t]))return!0})},closest:function(t,e){var n,o=0,i=this.length,r=[],a="string"!=typeof t&&D(t);if(!Yt.test(t))for(;o<i;o++)for(n=this[o];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&D.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(1<r.length?D.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?b.call(D(t),this[0]):b.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(D.uniqueSort(D.merge(this.get(),D(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),D.each({parent:function(t){t=t.parentNode;return t&&11!==t.nodeType?t:null},parents:function(t){return Vt(t,"parentNode")},parentsUntil:function(t,e,n){return Vt(t,"parentNode",n)},next:function(t){return te(t,"nextSibling")},prev:function(t){return te(t,"previousSibling")},nextAll:function(t){return Vt(t,"nextSibling")},prevAll:function(t){return Vt(t,"previousSibling")},nextUntil:function(t,e,n){return Vt(t,"nextSibling",n)},prevUntil:function(t,e,n){return Vt(t,"previousSibling",n)},siblings:function(t){return zt((t.parentNode||{}).firstChild,t)},children:function(t){return zt(t.firstChild)},contents:function(t){return null!=t.contentDocument&&q(t.contentDocument)?t.contentDocument:(x(t,"template")&&(t=t.content||t),D.merge([],t.childNodes))}},function(o,i){D.fn[o]=function(t,e){var n=D.map(this,i,t);return(e="Until"!==o.slice(-5)?t:e)&&"string"==typeof e&&(n=D.filter(e,n)),1<this.length&&(Qt[o]||D.uniqueSort(n),Gt.test(o))&&n.reverse(),this.pushStack(n)}});var _=/[^\x20\t\r\n\f]+/g;function ee(t){return t}function ne(t){throw t}function oe(t,e,n,o){var i;try{t&&v(i=t.promise)?i.call(t).done(e).fail(n):t&&v(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(o))}catch(t){n.apply(void 0,[t])}}D.Callbacks=function(o){var t,n;o="string"==typeof o?(t=o,n={},D.each(t.match(_)||[],function(t,e){n[e]=!0}),n):D.extend({},o);function i(){for(s=s||o.once,a=r=!0;u.length;c=-1)for(e=u.shift();++c<l.length;)!1===l[c].apply(e[0],e[1])&&o.stopOnFalse&&(c=l.length,e=!1);o.memory||(e=!1),r=!1,s&&(l=e?[]:"")}var r,e,a,s,l=[],u=[],c=-1,d={add:function(){return l&&(e&&!r&&(c=l.length-1,u.push(e)),function n(t){D.each(t,function(t,e){v(e)?o.unique&&d.has(e)||l.push(e):e&&e.length&&"string"!==X(e)&&n(e)})}(arguments),e)&&!r&&i(),this},remove:function(){return D.each(arguments,function(t,e){for(var n;-1<(n=D.inArray(e,l,n));)l.splice(n,1),n<=c&&c--}),this},has:function(t){return t?-1<D.inArray(t,l):0<l.length},empty:function(){return l=l&&[],this},disable:function(){return s=u=[],l=e="",this},disabled:function(){return!l},lock:function(){return s=u=[],e||r||(l=e=""),this},locked:function(){return!!s},fireWith:function(t,e){return s||(e=[t,(e=e||[]).slice?e.slice():e],u.push(e),r)||i(),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!a}};return d},D.extend({Deferred:function(t){var r=[["notify","progress",D.Callbacks("memory"),D.Callbacks("memory"),2],["resolve","done",D.Callbacks("once memory"),D.Callbacks("once memory"),0,"resolved"],["reject","fail",D.Callbacks("once memory"),D.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return a.then(null,t)},pipe:function(){var i=arguments;return D.Deferred(function(o){D.each(r,function(t,e){var n=v(i[e[4]])&&i[e[4]];s[e[1]](function(){var t=n&&n.apply(this,arguments);t&&v(t.promise)?t.promise().progress(o.notify).done(o.resolve).fail(o.reject):o[e[0]+"With"](this,n?[t]:arguments)})}),i=null}).promise()},then:function(e,n,o){var l=0;function u(i,r,a,s){return function(){function t(){var t,e;if(!(i<l)){if((t=a.apply(n,o))===r.promise())throw new TypeError("Thenable self-resolution");e=t&&("object"==typeof t||"function"==typeof t)&&t.then,v(e)?s?e.call(t,u(l,r,ee,s),u(l,r,ne,s)):(l++,e.call(t,u(l,r,ee,s),u(l,r,ne,s),u(l,r,ee,r.notifyWith))):(a!==ee&&(n=void 0,o=[t]),(s||r.resolveWith)(n,o))}}var n=this,o=arguments,e=s?t:function(){try{t()}catch(t){D.Deferred.exceptionHook&&D.Deferred.exceptionHook(t,e.error),l<=i+1&&(a!==ne&&(n=void 0,o=[t]),r.rejectWith(n,o))}};i?e():(D.Deferred.getErrorHook?e.error=D.Deferred.getErrorHook():D.Deferred.getStackHook&&(e.error=D.Deferred.getStackHook()),k.setTimeout(e))}}return D.Deferred(function(t){r[0][3].add(u(0,t,v(o)?o:ee,t.notifyWith)),r[1][3].add(u(0,t,v(e)?e:ee)),r[2][3].add(u(0,t,v(n)?n:ne))}).promise()},promise:function(t){return null!=t?D.extend(t,a):a}},s={};return D.each(r,function(t,e){var n=e[2],o=e[5];a[e[1]]=n.add,o&&n.add(function(){i=o},r[3-t][2].disable,r[3-t][3].disable,r[0][2].lock,r[0][3].lock),n.add(e[3].fire),s[e[0]]=function(){return s[e[0]+"With"](this===s?void 0:this,arguments),this},s[e[0]+"With"]=n.fireWith}),a.promise(s),t&&t.call(s,s),s},when:function(t){function e(e){return function(t){i[e]=this,r[e]=1<arguments.length?s.call(arguments):t,--n||a.resolveWith(i,r)}}var n=arguments.length,o=n,i=Array(o),r=s.call(arguments),a=D.Deferred();if(n<=1&&(oe(t,a.done(e(o)).resolve,a.reject,!n),"pending"===a.state()||v(r[o]&&r[o].then)))return a.then();for(;o--;)oe(r[o],e(o),a.reject);return a.promise()}});var ie=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,re=(D.Deferred.exceptionHook=function(t,e){k.console&&k.console.warn&&t&&ie.test(t.name)&&k.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},D.readyException=function(t){k.setTimeout(function(){throw t})},D.Deferred());function ae(){w.removeEventListener("DOMContentLoaded",ae),k.removeEventListener("load",ae),D.ready()}D.fn.ready=function(t){return re.then(t).catch(function(t){D.readyException(t)}),this},D.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--D.readyWait:D.isReady)||(D.isReady=!0)!==t&&0<--D.readyWait||re.resolveWith(w,[D])}}),D.ready.then=re.then,"complete"===w.readyState||"loading"!==w.readyState&&!w.documentElement.doScroll?k.setTimeout(D.ready):(w.addEventListener("DOMContentLoaded",ae),k.addEventListener("load",ae));function c(t,e,n,o,i,r,a){var s=0,l=t.length,u=null==n;if("object"===X(n))for(s in i=!0,n)c(t,e,s,n[s],!0,r,a);else if(void 0!==o&&(i=!0,v(o)||(a=!0),e=u?a?(e.call(t,o),null):(u=e,function(t,e,n){return u.call(D(t),n)}):e))for(;s<l;s++)e(t[s],n,a?o:o.call(t[s],s,e(t[s],n)));return i?t:u?e.call(t):l?e(t[0],n):r}var se=/^-ms-/,le=/-([a-z])/g;function ue(t,e){return e.toUpperCase()}function M(t){return t.replace(se,"ms-").replace(le,ue)}function ce(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function de(){this.expando=D.expando+de.uid++}de.uid=1,de.prototype={cache:function(t){var e=t[this.expando];return e||(e={},ce(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[M(e)]=n;else for(o in e)i[M(o)]=e[o];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][M(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(M):(e=M(e))in o?[e]:e.match(_)||[]).length;for(;n--;)delete o[e[n]]}void 0!==e&&!D.isEmptyObject(o)||(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){t=t[this.expando];return void 0!==t&&!D.isEmptyObject(t)}};var y=new de,u=new de,pe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,he=/[A-Z]/g;function fe(t,e,n){var o,i;if(void 0===n&&1===t.nodeType)if(o="data-"+e.replace(he,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(o))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:pe.test(i)?JSON.parse(i):i)}catch(t){}u.set(t,e,n)}else n=void 0;return n}D.extend({hasData:function(t){return u.hasData(t)||y.hasData(t)},data:function(t,e,n){return u.access(t,e,n)},removeData:function(t,e){u.remove(t,e)},_data:function(t,e,n){return y.access(t,e,n)},_removeData:function(t,e){y.remove(t,e)}}),D.fn.extend({data:function(n,t){var e,o,i,r=this[0],a=r&&r.attributes;if(void 0!==n)return"object"==typeof n?this.each(function(){u.set(this,n)}):c(this,function(t){var e;if(r&&void 0===t)return void 0!==(e=u.get(r,n))||void 0!==(e=fe(r,n))?e:void 0;this.each(function(){u.set(this,n,t)})},null,t,1<arguments.length,null,!0);if(this.length&&(i=u.get(r),1===r.nodeType)&&!y.get(r,"hasDataAttrs")){for(e=a.length;e--;)a[e]&&0===(o=a[e].name).indexOf("data-")&&(o=M(o.slice(5)),fe(r,o,i[o]));y.set(r,"hasDataAttrs",!0)}return i},removeData:function(t){return this.each(function(){u.remove(this,t)})}}),D.extend({queue:function(t,e,n){var o;if(t)return o=y.get(t,e=(e||"fx")+"queue"),n&&(!o||Array.isArray(n)?o=y.access(t,e,D.makeArray(n)):o.push(n)),o||[]},dequeue:function(t,e){e=e||"fx";var n=D.queue(t,e),o=n.length,i=n.shift(),r=D._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),o--),i&&("fx"===e&&n.unshift("inprogress"),delete r.stop,i.call(t,function(){D.dequeue(t,e)},r)),!o&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return y.get(t,n)||y.access(t,n,{empty:D.Callbacks("once memory").add(function(){y.remove(t,[e+"queue",n])})})}}),D.fn.extend({queue:function(e,n){var t=2;return"string"!=typeof e&&(n=e,e="fx",t--),arguments.length<t?D.queue(this[0],e):void 0===n?this:this.each(function(){var t=D.queue(this,e,n);D._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&D.dequeue(this,e)})},dequeue:function(t){return this.each(function(){D.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){function n(){--i||r.resolveWith(a,[a])}var o,i=1,r=D.Deferred(),a=this,s=this.length;for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(o=y.get(a[s],t+"queueHooks"))&&o.empty&&(i++,o.empty.add(n));return n(),r.promise(e)}});function ge(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&be(t)&&"none"===D.css(t,"display")}var t=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,me=new RegExp("^(?:([+-])=|)("+t+")([a-z%]*)$","i"),ye=["Top","Right","Bottom","Left"],ve=w.documentElement,be=function(t){return D.contains(t.ownerDocument,t)},xe={composed:!0};ve.getRootNode&&(be=function(t){return D.contains(t.ownerDocument,t)||t.getRootNode(xe)===t.ownerDocument});function ke(t,e,n,o){var i,r,a=20,s=o?function(){return o.cur()}:function(){return D.css(t,e,"")},l=s(),u=n&&n[3]||(D.cssNumber[e]?"":"px"),c=t.nodeType&&(D.cssNumber[e]||"px"!==u&&+l)&&me.exec(D.css(t,e));if(c&&c[3]!==u){for(u=u||c[3],c=+(l/=2)||1;a--;)D.style(t,e,c+u),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),c/=r;D.style(t,e,(c*=2)+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],o)&&(o.unit=u,o.start=c,o.end=i),i}var we={};function De(t,e){for(var n,o,i,r,a,s=[],l=0,u=t.length;l<u;l++)(o=t[l]).style&&(n=o.style.display,e?("none"===n&&(s[l]=y.get(o,"display")||null,s[l]||(o.style.display="")),""===o.style.display&&ge(o)&&(s[l]=(a=r=void 0,r=(i=o).ownerDocument,(a=we[i=i.nodeName])||(r=r.body.appendChild(r.createElement(i)),a=D.css(r,"display"),r.parentNode.removeChild(r),we[i]=a="none"===a?"block":a),a))):"none"!==n&&(s[l]="none",y.set(o,"display",n)));for(l=0;l<u;l++)null!=s[l]&&(t[l].style.display=s[l]);return t}D.fn.extend({show:function(){return De(this,!0)},hide:function(){return De(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){ge(this)?D(this).show():D(this).hide()})}});var Te=/^(?:checkbox|radio)$/i,Ce=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,je=/^$|^module$|\/(?:java|ecma)script/i,f=(r=w.createDocumentFragment().appendChild(w.createElement("div")),(a=w.createElement("input")).setAttribute("type","radio"),a.setAttribute("checked","checked"),a.setAttribute("name","t"),r.appendChild(a),g.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,r.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!r.cloneNode(!0).lastChild.defaultValue,r.innerHTML="<option></option>",g.option=!!r.lastChild,{thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]});function m(t,e){var n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&x(t,e)?D.merge([t],n):n}function Se(t,e){for(var n=0,o=t.length;n<o;n++)y.set(t[n],"globalEval",!e||y.get(e[n],"globalEval"))}f.tbody=f.tfoot=f.colgroup=f.caption=f.thead,f.th=f.td,g.option||(f.optgroup=f.option=[1,"<select multiple='multiple'>","</select>"]);var Ee=/<|&#?\w+;/;function Ae(t,e,n,o,i){for(var r,a,s,l,u,c=e.createDocumentFragment(),d=[],p=0,h=t.length;p<h;p++)if((r=t[p])||0===r)if("object"===X(r))D.merge(d,r.nodeType?[r]:r);else if(Ee.test(r)){for(a=a||c.appendChild(e.createElement("div")),s=(Ce.exec(r)||["",""])[1].toLowerCase(),s=f[s]||f._default,a.innerHTML=s[1]+D.htmlPrefilter(r)+s[2],u=s[0];u--;)a=a.lastChild;D.merge(d,a.childNodes),(a=c.firstChild).textContent=""}else d.push(e.createTextNode(r));for(c.textContent="",p=0;r=d[p++];)if(o&&-1<D.inArray(r,o))i&&i.push(r);else if(l=be(r),a=m(c.appendChild(r),"script"),l&&Se(a),n)for(u=0;r=a[u++];)je.test(r.type||"")&&n.push(r);return c}var Le=/^([^.]*)(?:\.(.+)|)/;function _e(){return!0}function Me(){return!1}function Be(t,e,n,o,i,r){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(o=o||n,n=void 0),e)Be(t,s,n,o,e[s],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=Me;else if(!i)return t;return 1===r&&(a=i,(i=function(t){return D().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=D.guid++)),t.each(function(){D.event.add(this,e,i,o,n)})}function Fe(t,o,e){e?(y.set(t,o,!1),D.event.add(t,o,{namespace:!1,handler:function(t){var e,n=y.get(this,o);if(1&t.isTrigger&&this[o]){if(n)(D.event.special[o]||{}).delegateType&&t.stopPropagation();else if(n=s.call(arguments),y.set(this,o,n),this[o](),e=y.get(this,o),y.set(this,o,!1),n!==e)return t.stopImmediatePropagation(),t.preventDefault(),e}else n&&(y.set(this,o,D.event.trigger(n[0],n.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=_e)}})):void 0===y.get(t,o)&&D.event.add(t,o,_e)}D.event={global:{},add:function(e,t,n,o,i){var r,a,s,l,u,c,d,p,h,f=y.get(e);if(ce(e))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&D.find.matchesSelector(ve,i),n.guid||(n.guid=D.guid++),s=(s=f.events)||(f.events=Object.create(null)),a=(a=f.handle)||(f.handle=function(t){return void 0!==D&&D.event.triggered!==t.type?D.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(_)||[""]).length;l--;)d=h=(p=Le.exec(t[l])||[])[1],p=(p[2]||"").split(".").sort(),d&&(u=D.event.special[d]||{},d=(i?u.delegateType:u.bindType)||d,u=D.event.special[d]||{},h=D.extend({type:d,origType:h,data:o,handler:n,guid:n.guid,selector:i,needsContext:i&&D.expr.match.needsContext.test(i),namespace:p.join(".")},r),(c=s[d])||((c=s[d]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,o,p,a))||e.addEventListener&&e.addEventListener(d,a),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=n.guid)),i?c.splice(c.delegateCount++,0,h):c.push(h),D.event.global[d]=!0)},remove:function(t,e,n,o,i){var r,a,s,l,u,c,d,p,h,f,g,m=y.hasData(t)&&y.get(t);if(m&&(l=m.events)){for(u=(e=(e||"").match(_)||[""]).length;u--;)if(h=g=(s=Le.exec(e[u])||[])[1],f=(s[2]||"").split(".").sort(),h){for(d=D.event.special[h]||{},p=l[h=(o?d.delegateType:d.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=p.length;r--;)c=p[r],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.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));a&&!p.length&&(d.teardown&&!1!==d.teardown.call(t,f,m.handle)||D.removeEvent(t,h,m.handle),delete l[h])}else for(h in l)D.event.remove(t,h+e[u],n,o,!0);D.isEmptyObject(l)&&y.remove(t,"handle events")}},dispatch:function(t){var e,n,o,i,r,a=new Array(arguments.length),s=D.event.fix(t),t=(y.get(this,"events")||Object.create(null))[s.type]||[],l=D.event.special[s.type]||{};for(a[0]=s,e=1;e<arguments.length;e++)a[e]=arguments[e];if(s.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,s)){for(r=D.event.handlers.call(this,s,t),e=0;(o=r[e++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==i.namespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,void 0!==(i=((D.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a))&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,s),s.result}},handlers:function(t,e){var n,o,i,r,a,s=[],l=e.delegateCount,u=t.target;if(l&&u.nodeType&&!("click"===t.type&&1<=t.button))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(r=[],a={},n=0;n<l;n++)void 0===a[i=(o=e[n]).selector+" "]&&(a[i]=o.needsContext?-1<D(i,this).index(u):D.find(i,this,null,[u]).length),a[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return u=this,l<e.length&&s.push({elem:u,handlers:e.slice(l)}),s},addProp:function(e,t){Object.defineProperty(D.Event.prototype,e,{enumerable:!0,configurable:!0,get:v(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(t){return t[D.expando]?t:new D.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){t=this||t;return Te.test(t.type)&&t.click&&x(t,"input")&&Fe(t,"click",!0),!1},trigger:function(t){t=this||t;return Te.test(t.type)&&t.click&&x(t,"input")&&Fe(t,"click"),!0},_default:function(t){t=t.target;return Te.test(t.type)&&t.click&&x(t,"input")&&y.get(t,"click")||x(t,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},D.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},D.Event=function(t,e){if(!(this instanceof D.Event))return new D.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?_e:Me,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&&D.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[D.expando]=!0},D.Event.prototype={constructor:D.Event,isDefaultPrevented:Me,isPropagationStopped:Me,isImmediatePropagationStopped:Me,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=_e,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=_e,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=_e,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},D.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},D.event.addProp),D.each({focus:"focusin",blur:"focusout"},function(o,i){function r(t){var e,n;w.documentMode?(e=y.get(this,"handle"),(n=D.event.fix(t)).type="focusin"===t.type?"focus":"blur",n.isSimulated=!0,e(t),n.target===n.currentTarget&&e(n)):D.event.simulate(i,t.target,D.event.fix(t))}D.event.special[o]={setup:function(){var t;if(Fe(this,o,!0),!w.documentMode)return!1;(t=y.get(this,i))||this.addEventListener(i,r),y.set(this,i,(t||0)+1)},trigger:function(){return Fe(this,o),!0},teardown:function(){var t;if(!w.documentMode)return!1;(t=y.get(this,i)-1)?y.set(this,i,t):(this.removeEventListener(i,r),y.remove(this,i))},_default:function(t){return y.get(t.target,o)},delegateType:i},D.event.special[i]={setup:function(){var t=this.ownerDocument||this.document||this,e=w.documentMode?this:t,n=y.get(e,i);n||(w.documentMode?this.addEventListener(i,r):t.addEventListener(o,r,!0)),y.set(e,i,(n||0)+1)},teardown:function(){var t=this.ownerDocument||this.document||this,e=w.documentMode?this:t,n=y.get(e,i)-1;n?y.set(e,i,n):(w.documentMode?this.removeEventListener(i,r):t.removeEventListener(o,r,!0),y.remove(e,i))}}}),D.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,i){D.event.special[t]={delegateType:i,bindType:i,handle:function(t){var e,n=t.relatedTarget,o=t.handleObj;return n&&(n===this||D.contains(this,n))||(t.type=o.origType,e=o.handler.apply(this,arguments),t.type=i),e}}}),D.fn.extend({on:function(t,e,n,o){return Be(this,t,e,n,o)},one:function(t,e,n,o){return Be(this,t,e,n,o,1)},off:function(t,e,n){var o,i;if(t&&t.preventDefault&&t.handleObj)o=t.handleObj,D(t.delegateTarget).off(o.namespace?o.origType+"."+o.namespace:o.origType,o.selector,o.handler);else{if("object"!=typeof t)return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Me),this.each(function(){D.event.remove(this,t,n,e)});for(i in t)this.off(i,e,t[i])}return this}});var He=/<script|<style|<link/i,$e=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function qe(t,e){return x(t,"table")&&x(11!==e.nodeType?e:e.firstChild,"tr")&&D(t).children("tbody")[0]||t}function Oe(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Re(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ie(t,e){var n,o,i,r;if(1===e.nodeType){if(y.hasData(t)&&(r=y.get(t).events))for(i in y.remove(e,"handle events"),r)for(n=0,o=r[i].length;n<o;n++)D.event.add(e,i,r[i][n]);u.hasData(t)&&(t=u.access(t),t=D.extend({},t),u.set(e,t))}}function Pe(n,o,i,r){o=O(o);var t,e,a,s,l,u,c=0,d=n.length,p=d-1,h=o[0],f=v(h);if(f||1<d&&"string"==typeof h&&!g.checkClone&&$e.test(h))return n.each(function(t){var e=n.eq(t);f&&(o[0]=h.call(this,t,e.html())),Pe(e,o,i,r)});if(d&&(e=(t=Ae(o,n[0].ownerDocument,!1,n,r)).firstChild,1===t.childNodes.length&&(t=e),e||r)){for(s=(a=D.map(m(t,"script"),Oe)).length;c<d;c++)l=t,c!==p&&(l=D.clone(l,!0,!0),s)&&D.merge(a,m(l,"script")),i.call(n[c],l,c);if(s)for(u=a[a.length-1].ownerDocument,D.map(a,Re),c=0;c<s;c++)l=a[c],je.test(l.type||"")&&!y.access(l,"globalEval")&&D.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?D._evalUrl&&!l.noModule&&D._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},u):Y(l.textContent.replace(Ne,""),l,u))}return n}function We(t,e,n){for(var o,i=e?D.filter(e,t):t,r=0;null!=(o=i[r]);r++)n||1!==o.nodeType||D.cleanData(m(o)),o.parentNode&&(n&&be(o)&&Se(m(o,"script")),o.parentNode.removeChild(o));return t}D.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var o,i,r,a,s,l,u,c=t.cloneNode(!0),d=be(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||D.isXMLDoc(t)))for(a=m(c),o=0,i=(r=m(t)).length;o<i;o++)s=r[o],l=a[o],u=void 0,"input"===(u=l.nodeName.toLowerCase())&&Te.test(s.type)?l.checked=s.checked:"input"!==u&&"textarea"!==u||(l.defaultValue=s.defaultValue);if(e)if(n)for(r=r||m(t),a=a||m(c),o=0,i=r.length;o<i;o++)Ie(r[o],a[o]);else Ie(t,c);return 0<(a=m(c,"script")).length&&Se(a,!d&&m(t,"script")),c},cleanData:function(t){for(var e,n,o,i=D.event.special,r=0;void 0!==(n=t[r]);r++)if(ce(n)){if(e=n[y.expando]){if(e.events)for(o in e.events)i[o]?D.event.remove(n,o):D.removeEvent(n,o,e.handle);n[y.expando]=void 0}n[u.expando]&&(n[u.expando]=void 0)}}}),D.fn.extend({detach:function(t){return We(this,t,!0)},remove:function(t){return We(this,t)},text:function(t){return c(this,function(t){return void 0===t?D.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 Pe(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,t).appendChild(t)})},prepend:function(){return Pe(this,arguments,function(t){var e;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(e=qe(this,t)).insertBefore(t,e.firstChild)})},before:function(){return Pe(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Pe(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&&(D.cleanData(m(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return D.clone(this,t,e)})},html:function(t){return c(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&&!He.test(t)&&!f[(Ce.exec(t)||["",""])[1].toLowerCase()]){t=D.htmlPrefilter(t);try{for(;n<o;n++)1===(e=this[n]||{}).nodeType&&(D.cleanData(m(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(t){var e=this.parentNode;D.inArray(this,n)<0&&(D.cleanData(m(this)),e)&&e.replaceChild(t,this)},n)}}),D.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,a){D.fn[t]=function(t){for(var e,n=[],o=D(t),i=o.length-1,r=0;r<=i;r++)e=r===i?this:this.clone(!0),D(o[r])[a](e),R.apply(n,e.get());return this.pushStack(n)}});function Ue(t){var e=t.ownerDocument.defaultView;return(e=e&&e.opener?e:k).getComputedStyle(t)}function Ve(t,e,n){var o,i={};for(o in e)i[o]=t.style[o],t.style[o]=e[o];for(o in n=n.call(t),e)t.style[o]=i[o];return n}var ze,Ye,Xe,Ze,Ke,Je,Ge,B,Qe=new RegExp("^("+t+")(?!px)[a-z%]+$","i"),tn=/^--/,en=new RegExp(ye.join("|"),"i");function nn(){var t;B&&(Ge.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",B.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ve.appendChild(Ge).appendChild(B),t=k.getComputedStyle(B),ze="1%"!==t.top,Je=12===on(t.marginLeft),B.style.right="60%",Ze=36===on(t.right),Ye=36===on(t.width),B.style.position="absolute",Xe=12===on(B.offsetWidth/3),ve.removeChild(Ge),B=null)}function on(t){return Math.round(parseFloat(t))}function rn(t,e,n){var o,i=tn.test(e),r=t.style;return(n=n||Ue(t))&&(o=n.getPropertyValue(e)||n[e],""!==(o=i?o&&(o.replace(tt,"$1")||void 0):o)||be(t)||(o=D.style(t,e)),!g.pixelBoxStyles())&&Qe.test(o)&&en.test(e)&&(i=r.width,t=r.minWidth,e=r.maxWidth,r.minWidth=r.maxWidth=r.width=o,o=n.width,r.width=i,r.minWidth=t,r.maxWidth=e),void 0!==o?o+"":o}function an(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}Ge=w.createElement("div"),(B=w.createElement("div")).style&&(B.style.backgroundClip="content-box",B.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===B.style.backgroundClip,D.extend(g,{boxSizingReliable:function(){return nn(),Ye},pixelBoxStyles:function(){return nn(),Ze},pixelPosition:function(){return nn(),ze},reliableMarginLeft:function(){return nn(),Je},scrollboxSize:function(){return nn(),Xe},reliableTrDimensions:function(){var t,e,n;return null==Ke&&(t=w.createElement("table"),e=w.createElement("tr"),n=w.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",ve.appendChild(t).appendChild(e).appendChild(n),n=k.getComputedStyle(e),Ke=parseInt(n.height,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10)===e.offsetHeight,ve.removeChild(t)),Ke}}));var sn=["Webkit","Moz","ms"],ln=w.createElement("div").style,un={};function cn(t){var e=D.cssProps[t]||un[t];return e||(t in ln?t:un[t]=(t=>{for(var e=t[0].toUpperCase()+t.slice(1),n=sn.length;n--;)if((t=sn[n]+e)in ln)return t})(t)||t)}var dn=/^(none|table(?!-c[ea]).+)/,pn={position:"absolute",visibility:"hidden",display:"block"},hn={letterSpacing:"0",fontWeight:"400"};function fn(t,e,n){var o=me.exec(e);return o?Math.max(0,o[2]-(n||0))+(o[3]||"px"):e}function gn(t,e,n,o,i,r){var a="width"===e?1:0,s=0,l=0,u=0;if(n===(o?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=D.css(t,n+ye[a],!0,i)),o?("content"===n&&(l-=D.css(t,"padding"+ye[a],!0,i)),"margin"!==n&&(l-=D.css(t,"border"+ye[a]+"Width",!0,i))):(l+=D.css(t,"padding"+ye[a],!0,i),"padding"!==n?l+=D.css(t,"border"+ye[a]+"Width",!0,i):s+=D.css(t,"border"+ye[a]+"Width",!0,i));return!o&&0<=r&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-s-.5))||0),l+u}function mn(t,e,n){var o=Ue(t),i=(!g.boxSizingReliable()||n)&&"border-box"===D.css(t,"boxSizing",!1,o),r=i,a=rn(t,e,o),s="offset"+e[0].toUpperCase()+e.slice(1);if(Qe.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&x(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===D.css(t,"display",!1,o))&&t.getClientRects().length&&(i="border-box"===D.css(t,"boxSizing",!1,o),r=s in t)&&(a=t[s]),(a=parseFloat(a)||0)+gn(t,e,n||(i?"border":"content"),r,o,a)+"px"}function F(t,e,n,o,i){return new F.prototype.init(t,e,n,o,i)}D.extend({cssHooks:{opacity:{get:function(t,e){if(e)return""===(e=rn(t,"opacity"))?"1":e}}},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,a,s=M(e),l=tn.test(e),u=t.style;if(l||(e=cn(s)),a=D.cssHooks[e]||D.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,o))?i:u[e];"string"===(r=typeof n)&&(i=me.exec(n))&&i[1]&&(n=ke(t,e,i),r="number"),null==n||n!=n||("number"!==r||l||(n+=i&&i[3]||(D.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,o)))||(l?u.setProperty(e,n):u[e]=n)}},css:function(t,e,n,o){var i,r=M(e);return tn.test(e)||(e=cn(r)),"normal"===(i=void 0===(i=(r=D.cssHooks[e]||D.cssHooks[r])&&"get"in r?r.get(t,!0,n):i)?rn(t,e,o):i)&&e in hn&&(i=hn[e]),(""===n||n)&&(r=parseFloat(i),!0===n||isFinite(r))?r||0:i}}),D.each(["height","width"],function(t,a){D.cssHooks[a]={get:function(t,e,n){if(e)return!dn.test(D.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?mn(t,a,n):Ve(t,pn,function(){return mn(t,a,n)})},set:function(t,e,n){var o=Ue(t),i=!g.scrollboxSize()&&"absolute"===o.position,r=(i||n)&&"border-box"===D.css(t,"boxSizing",!1,o),n=n?gn(t,a,n,r,o):0;return r&&i&&(n-=Math.ceil(t["offset"+a[0].toUpperCase()+a.slice(1)]-parseFloat(o[a])-gn(t,a,"border",!1,o)-.5)),n&&(r=me.exec(e))&&"px"!==(r[3]||"px")&&(t.style[a]=e,e=D.css(t,a)),fn(0,e,n)}}}),D.cssHooks.marginLeft=an(g.reliableMarginLeft,function(t,e){if(e)return(parseFloat(rn(t,"marginLeft"))||t.getBoundingClientRect().left-Ve(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),D.each({margin:"",padding:"",border:"Width"},function(i,r){D.cssHooks[i+r]={expand:function(t){for(var e=0,n={},o="string"==typeof t?t.split(" "):[t];e<4;e++)n[i+ye[e]+r]=o[e]||o[e-2]||o[0];return n}},"margin"!==i&&(D.cssHooks[i+r].set=fn)}),D.fn.extend({css:function(t,e){return c(this,function(t,e,n){var o,i,r={},a=0;if(Array.isArray(e)){for(o=Ue(t),i=e.length;a<i;a++)r[e[a]]=D.css(t,e[a],!1,o);return r}return void 0!==n?D.style(t,e,n):D.css(t,e)},t,e,1<arguments.length)}}),((D.Tween=F).prototype={constructor:F,init:function(t,e,n,o,i,r){this.elem=t,this.prop=n,this.easing=i||D.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=o,this.unit=r||(D.cssNumber[n]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return(t&&t.get?t:F.propHooks._default).get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.options.duration?this.pos=e=D.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:F.propHooks._default).set(this),this}}).init.prototype=F.prototype,(F.propHooks={_default:{get:function(t){return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(t=D.css(t.elem,t.prop,""))&&"auto"!==t?t:0},set:function(t){D.fx.step[t.prop]?D.fx.step[t.prop](t):1!==t.elem.nodeType||!D.cssHooks[t.prop]&&null==t.elem.style[cn(t.prop)]?t.elem[t.prop]=t.now:D.style(t.elem,t.prop,t.now+t.unit)}}}).scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},D.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},D.fx=F.prototype.init,D.fx.step={};var yn,vn,bn=/^(?:toggle|show|hide)$/,xn=/queueHooks$/;function kn(){vn&&(!1===w.hidden&&k.requestAnimationFrame?k.requestAnimationFrame(kn):k.setTimeout(kn,D.fx.interval),D.fx.tick())}function wn(){return k.setTimeout(function(){yn=void 0}),yn=Date.now()}function Dn(t,e){var n,o=0,i={height:t};for(e=e?1:0;o<4;o+=2-e)i["margin"+(n=ye[o])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function Tn(t,e,n){for(var o,i=(H.tweeners[e]||[]).concat(H.tweeners["*"]),r=0,a=i.length;r<a;r++)if(o=i[r].call(n,e,t))return o}function H(i,t,e){var n,r,o,a,s,l,u,c=0,d=H.prefilters.length,p=D.Deferred().always(function(){delete h.elem}),h=function(){if(!r){for(var t=yn||wn(),t=Math.max(0,f.startTime+f.duration-t),e=1-(t/f.duration||0),n=0,o=f.tweens.length;n<o;n++)f.tweens[n].run(e);if(p.notifyWith(i,[f,e,t]),e<1&&o)return t;o||p.notifyWith(i,[f,1,0]),p.resolveWith(i,[f])}return!1},f=p.promise({elem:i,props:D.extend({},t),opts:D.extend(!0,{specialEasing:{},easing:D.easing._default},e),originalProperties:t,originalOptions:e,startTime:yn||wn(),duration:e.duration,tweens:[],createTween:function(t,e){e=D.Tween(i,f.opts,t,e,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(e),e},stop:function(t){var e=0,n=t?f.tweens.length:0;if(!r){for(r=!0;e<n;e++)f.tweens[e].run(1);t?(p.notifyWith(i,[f,1,0]),p.resolveWith(i,[f,t])):p.rejectWith(i,[f,t])}return this}}),g=f.props,m=g,y=f.opts.specialEasing;for(o in m)if(s=y[a=M(o)],l=m[o],Array.isArray(l)&&(s=l[1],l=m[o]=l[0]),o!==a&&(m[a]=l,delete m[o]),(u=D.cssHooks[a])&&"expand"in u)for(o in l=u.expand(l),delete m[a],l)o in m||(m[o]=l[o],y[o]=s);else y[a]=s;for(;c<d;c++)if(n=H.prefilters[c].call(f,i,g,f.opts))return v(n.stop)&&(D._queueHooks(f.elem,f.opts.queue).stop=n.stop.bind(n)),n;return D.map(g,Tn,f),v(f.opts.start)&&f.opts.start.call(i,f),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always),D.fx.timer(D.extend(h,{elem:i,anim:f,queue:f.opts.queue})),f}D.Animation=D.extend(H,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ke(n.elem,t,me.exec(e),n),n}]},tweener:function(t,e){for(var n,o=0,i=(t=v(t)?(e=t,["*"]):t.match(_)).length;o<i;o++)n=t[o],H.tweeners[n]=H.tweeners[n]||[],H.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var o,i,r,a,s,l,u,c="width"in e||"height"in e,d=this,p={},h=t.style,f=t.nodeType&&ge(t),g=y.get(t,"fxshow");for(o in n.queue||(null==(a=D._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,d.always(function(){d.always(function(){a.unqueued--,D.queue(t,"fx").length||a.empty.fire()})})),e)if(i=e[o],bn.test(i)){if(delete e[o],r=r||"toggle"===i,i===(f?"hide":"show")){if("show"!==i||!g||void 0===g[o])continue;f=!0}p[o]=g&&g[o]||D.style(t,o)}if((l=!D.isEmptyObject(e))||!D.isEmptyObject(p))for(o in c&&1===t.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(u=g&&g.display)&&(u=y.get(t,"display")),"none"===(c=D.css(t,"display"))&&(u?c=u:(De([t],!0),u=t.style.display||u,c=D.css(t,"display"),De([t]))),"inline"===c||"inline-block"===c&&null!=u)&&"none"===D.css(t,"float")&&(l||(d.done(function(){h.display=u}),null==u&&(c=h.display,u="none"===c?"":c)),h.display="inline-block"),n.overflow&&(h.overflow="hidden",d.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),l=!1,p)l||(g?"hidden"in g&&(f=g.hidden):g=y.access(t,"fxshow",{display:u}),r&&(g.hidden=!f),f&&De([t],!0),d.done(function(){for(o in f||De([t]),y.remove(t,"fxshow"),p)D.style(t,o,p[o])})),l=Tn(f?g[o]:0,o,d),o in g||(g[o]=l.start,f&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?H.prefilters.unshift(t):H.prefilters.push(t)}}),D.speed=function(t,e,n){var o=t&&"object"==typeof t?D.extend({},t):{complete:n||!n&&e||v(t)&&t,duration:t,easing:n&&e||e&&!v(e)&&e};return D.fx.off?o.duration=0:"number"!=typeof o.duration&&(o.duration in D.fx.speeds?o.duration=D.fx.speeds[o.duration]:o.duration=D.fx.speeds._default),null!=o.queue&&!0!==o.queue||(o.queue="fx"),o.old=o.complete,o.complete=function(){v(o.old)&&o.old.call(this),o.queue&&D.dequeue(this,o.queue)},o},D.fn.extend({fadeTo:function(t,e,n,o){return this.filter(ge).css("opacity",0).show().end().animate({opacity:e},t,n,o)},animate:function(e,t,n,o){function i(){var t=H(this,D.extend({},e),a);(r||y.get(this,"finish"))&&t.stop(!0)}var r=D.isEmptyObject(e),a=D.speed(t,n,o);return i.finish=i,r||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(i,t,r){function a(t){var e=t.stop;delete t.stop,e(r)}return"string"!=typeof i&&(r=t,t=i,i=void 0),t&&this.queue(i||"fx",[]),this.each(function(){var t=!0,e=null!=i&&i+"queueHooks",n=D.timers,o=y.get(this);if(e)o[e]&&o[e].stop&&a(o[e]);else for(e in o)o[e]&&o[e].stop&&xn.test(e)&&a(o[e]);for(e=n.length;e--;)n[e].elem!==this||null!=i&&n[e].queue!==i||(n[e].anim.stop(r),t=!1,n.splice(e,1));!t&&r||D.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var t,e=y.get(this),n=e[a+"queue"],o=e[a+"queueHooks"],i=D.timers,r=n?n.length:0;for(e.finish=!0,D.queue(this,a,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===a&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<r;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete e.finish})}}),D.each(["toggle","show","hide"],function(t,o){var i=D.fn[o];D.fn[o]=function(t,e,n){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(Dn(o,!0),t,e,n)}}),D.each({slideDown:Dn("show"),slideUp:Dn("hide"),slideToggle:Dn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,o){D.fn[t]=function(t,e,n){return this.animate(o,t,e,n)}}),D.timers=[],D.fx.tick=function(){var t,e=0,n=D.timers;for(yn=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||D.fx.stop(),yn=void 0},D.fx.timer=function(t){D.timers.push(t),D.fx.start()},D.fx.interval=13,D.fx.start=function(){vn||(vn=!0,kn())},D.fx.stop=function(){vn=null},D.fx.speeds={slow:600,fast:200,_default:400},D.fn.delay=function(o,t){return o=D.fx&&D.fx.speeds[o]||o,this.queue(t=t||"fx",function(t,e){var n=k.setTimeout(t,o);e.stop=function(){k.clearTimeout(n)}})},a=w.createElement("input"),r=w.createElement("select").appendChild(w.createElement("option")),a.type="checkbox",g.checkOn=""!==a.value,g.optSelected=r.selected,(a=w.createElement("input")).value="t",a.type="radio",g.radioValue="t"===a.value;var Cn,jn=D.expr.attrHandle,Sn=(D.fn.extend({attr:function(t,e){return c(this,D.attr,t,e,1<arguments.length)},removeAttr:function(t){return this.each(function(){D.removeAttr(this,t)})}}),D.extend({attr:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?D.prop(t,e,n):(1===r&&D.isXMLDoc(t)||(i=D.attrHooks[e.toLowerCase()]||(D.expr.match.bool.test(e)?Cn:void 0)),void 0!==n?null===n?void D.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)))&&null==(o=D.find.attr(t,e))?void 0:o)},attrHooks:{type:{set:function(t,e){var n;if(!g.radioValue&&"radio"===e&&x(t,"input"))return n=t.value,t.setAttribute("type",e),n&&(t.value=n),e}}},removeAttr:function(t,e){var n,o=0,i=e&&e.match(_);if(i&&1===t.nodeType)for(;n=i[o++];)t.removeAttribute(n)}}),Cn={set:function(t,e,n){return!1===e?D.removeAttr(t,n):t.setAttribute(n,n),n}},D.each(D.expr.match.bool.source.match(/\w+/g),function(t,e){var a=jn[e]||D.find.attr;jn[e]=function(t,e,n){var o,i,r=e.toLowerCase();return n||(i=jn[r],jn[r]=o,o=null!=a(t,e,n)?r:null,jn[r]=i),o}}),/^(?:input|select|textarea|button)$/i),En=/^(?:a|area)$/i;function An(t){return(t.match(_)||[]).join(" ")}function Ln(t){return t.getAttribute&&t.getAttribute("class")||""}function _n(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(_)||[]}D.fn.extend({prop:function(t,e){return c(this,D.prop,t,e,1<arguments.length)},removeProp:function(t){return this.each(function(){delete this[D.propFix[t]||t]})}}),D.extend({prop:function(t,e,n){var o,i,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&D.isXMLDoc(t)||(e=D.propFix[e]||e,i=D.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=D.find.attr(t,"tabindex");return e?parseInt(e,10):Sn.test(t.nodeName)||En.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(D.propHooks.selected={get:function(t){t=t.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(t){t=t.parentNode;t&&(t.selectedIndex,t.parentNode)&&t.parentNode.selectedIndex}}),D.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){D.propFix[this.toLowerCase()]=this}),D.fn.extend({addClass:function(e){var t,n,o,i,r,a;return v(e)?this.each(function(t){D(this).addClass(e.call(this,t,Ln(this)))}):(t=_n(e)).length?this.each(function(){if(o=Ln(this),n=1===this.nodeType&&" "+An(o)+" "){for(r=0;r<t.length;r++)i=t[r],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=An(n),o!==a&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,o,i,r,a;return v(e)?this.each(function(t){D(this).removeClass(e.call(this,t,Ln(this)))}):arguments.length?(t=_n(e)).length?this.each(function(){if(o=Ln(this),n=1===this.nodeType&&" "+An(o)+" "){for(r=0;r<t.length;r++)for(i=t[r];-1<n.indexOf(" "+i+" ");)n=n.replace(" "+i+" "," ");a=An(n),o!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,n){var t,o,i,r,a=typeof e,s="string"==a||Array.isArray(e);return v(e)?this.each(function(t){D(this).toggleClass(e.call(this,t,Ln(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(e):this.removeClass(e):(t=_n(e),this.each(function(){if(s)for(r=D(this),i=0;i<t.length;i++)o=t[i],r.hasClass(o)?r.removeClass(o):r.addClass(o);else void 0!==e&&"boolean"!=a||((o=Ln(this))&&y.set(this,"__className__",o),this.setAttribute&&this.setAttribute("class",!o&&!1!==e&&y.get(this,"__className__")||""))}))},hasClass:function(t){for(var e,n=0,o=" "+t+" ";e=this[n++];)if(1===e.nodeType&&-1<(" "+An(Ln(e))+" ").indexOf(o))return!0;return!1}});function Mn(t){t.stopPropagation()}var Bn=/\r/g,Fn=(D.fn.extend({val:function(e){var n,t,o,i=this[0];return arguments.length?(o=v(e),this.each(function(t){1!==this.nodeType||(null==(t=o?e.call(this,t,D(this).val()):e)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=D.map(t,function(t){return null==t?"":t+""})),(n=D.valHooks[this.type]||D.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,t,"value"))||(this.value=t)})):i?(n=D.valHooks[i.type]||D.valHooks[i.nodeName.toLowerCase()])&&"get"in n&&void 0!==(t=n.get(i,"value"))?t:"string"==typeof(t=i.value)?t.replace(Bn,""):null==t?"":t:void 0}}),D.extend({valHooks:{option:{get:function(t){var e=D.find.attr(t,"value");return null!=e?e:An(D.text(t))}},select:{get:function(t){for(var e,n=t.options,o=t.selectedIndex,i="select-one"===t.type,r=i?null:[],a=i?o+1:n.length,s=o<0?a:i?o:0;s<a;s++)if(((e=n[s]).selected||s===o)&&!e.disabled&&(!e.parentNode.disabled||!x(e.parentNode,"optgroup"))){if(e=D(e).val(),i)return e;r.push(e)}return r},set:function(t,e){for(var n,o,i=t.options,r=D.makeArray(e),a=i.length;a--;)((o=i[a]).selected=-1<D.inArray(D.valHooks.option.get(o),r))&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),D.each(["radio","checkbox"],function(){D.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=-1<D.inArray(D(t).val(),e)}},g.checkOn||(D.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),k.location),Hn={guid:Date.now()},$n=/\?/,Nn=(D.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new k.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||D.error("Invalid XML: "+(n?D.map(n.childNodes,function(t){return t.textContent}).join("\n"):t)),e},/^(?:focusinfocus|focusoutblur)$/),qn=(D.extend(D.event,{trigger:function(t,e,n,o){var i,r,a,s,l,u,c,d=[n||w],p=W.call(t,"type")?t.type:t,h=W.call(t,"namespace")?t.namespace.split("."):[],f=c=r=n=n||w;if(3!==n.nodeType&&8!==n.nodeType&&!Nn.test(p+D.event.triggered)&&(-1<p.indexOf(".")&&(p=(h=p.split(".")).shift(),h.sort()),s=p.indexOf(":")<0&&"on"+p,(t=t[D.expando]?t:new D.Event(p,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:D.makeArray(e,[t]),u=D.event.special[p]||{},o||!u.trigger||!1!==u.trigger.apply(n,e))){if(!o&&!u.noBubble&&!N(n)){for(a=u.delegateType||p,Nn.test(a+p)||(f=f.parentNode);f;f=f.parentNode)d.push(f),r=f;r===(n.ownerDocument||w)&&d.push(r.defaultView||r.parentWindow||k)}for(i=0;(f=d[i++])&&!t.isPropagationStopped();)c=f,t.type=1<i?a:u.bindType||p,(l=(y.get(f,"events")||Object.create(null))[t.type]&&y.get(f,"handle"))&&l.apply(f,e),(l=s&&f[s])&&l.apply&&ce(f)&&(t.result=l.apply(f,e),!1===t.result)&&t.preventDefault();return t.type=p,o||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(d.pop(),e)||!ce(n)||s&&v(n[p])&&!N(n)&&((r=n[s])&&(n[s]=null),D.event.triggered=p,t.isPropagationStopped()&&c.addEventListener(p,Mn),n[p](),t.isPropagationStopped()&&c.removeEventListener(p,Mn),D.event.triggered=void 0,r)&&(n[s]=r),t.result}},simulate:function(t,e,n){n=D.extend(new D.Event,n,{type:t,isSimulated:!0});D.event.trigger(n,null,e)}}),D.fn.extend({trigger:function(t,e){return this.each(function(){D.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return D.event.trigger(t,e,n,!0)}}),/\[\]$/),On=/\r?\n/g,Rn=/^(?:submit|button|image|reset|file)$/i,In=/^(?:input|select|textarea|keygen)/i;D.param=function(t,e){function n(t,e){e=v(e)?e():e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==e?"":e)}var o,i=[];if(null==t)return"";if(Array.isArray(t)||t.jquery&&!D.isPlainObject(t))D.each(t,function(){n(this.name,this.value)});else for(o in t)!function n(o,t,i,r){if(Array.isArray(t))D.each(t,function(t,e){i||qn.test(o)?r(o,e):n(o+"["+("object"==typeof e&&null!=e?t:"")+"]",e,i,r)});else if(i||"object"!==X(t))r(o,t);else for(var e in t)n(o+"["+e+"]",t[e],i,r)}(o,t[o],e,n);return i.join("&")},D.fn.extend({serialize:function(){return D.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=D.prop(this,"elements");return t?D.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!D(this).is(":disabled")&&In.test(this.nodeName)&&!Rn.test(t)&&(this.checked||!Te.test(t))}).map(function(t,e){var n=D(this).val();return null==n?null:Array.isArray(n)?D.map(n,function(t){return{name:e.name,value:t.replace(On,"\r\n")}}):{name:e.name,value:n.replace(On,"\r\n")}}).get()}});var Pn=/%20/g,Wn=/#.*$/,Un=/([?&])_=[^&]*/,Vn=/^(.*?):[ \t]*([^\r\n]*)$/gm,zn=/^(?:GET|HEAD)$/,Yn=/^\/\//,Xn={},Zn={},Kn="*/".concat("*"),Jn=w.createElement("a");function Gn(r){return function(t,e){"string"!=typeof t&&(e=t,t="*");var n,o=0,i=t.toLowerCase().match(_)||[];if(v(e))for(;n=i[o++];)"+"===n[0]?(n=n.slice(1)||"*",(r[n]=r[n]||[]).unshift(e)):(r[n]=r[n]||[]).push(e)}}function Qn(e,o,i,r){var a={},s=e===Zn;function l(t){var n;return a[t]=!0,D.each(e[t]||[],function(t,e){e=e(o,i,r);return"string"!=typeof e||s||a[e]?s?!(n=e):void 0:(o.dataTypes.unshift(e),l(e),!1)}),n}return l(o.dataTypes[0])||!a["*"]&&l("*")}function to(t,e){var n,o,i=D.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:o=o||{})[n]=e[n]);return o&&D.extend(!0,t,o),t}Jn.href=Fn.href,D.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fn.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Fn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kn,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":D.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?to(to(t,D.ajaxSettings),e):to(D.ajaxSettings,t)},ajaxPrefilter:Gn(Xn),ajaxTransport:Gn(Zn),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var l,u,c,n,d,p,h,o,f=D.ajaxSetup({},e=e||{}),g=f.context||f,m=f.context&&(g.nodeType||g.jquery)?D(g):D.event,y=D.Deferred(),v=D.Callbacks("once memory"),b=f.statusCode||{},i={},r={},a="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(p){if(!n)for(n={};e=Vn.exec(c);)n[e[1].toLowerCase()+" "]=(n[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=n[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return p?c:null},setRequestHeader:function(t,e){return null==p&&(t=r[t.toLowerCase()]=r[t.toLowerCase()]||t,i[t]=e),this},overrideMimeType:function(t){return null==p&&(f.mimeType=t),this},statusCode:function(t){if(t)if(p)x.always(t[x.status]);else for(var e in t)b[e]=[b[e],t[e]];return this},abort:function(t){t=t||a;return l&&l.abort(t),s(0,t),this}};if(y.promise(x),f.url=((t||f.url||Fn.href)+"").replace(Yn,Fn.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(_)||[""],null==f.crossDomain){t=w.createElement("a");try{t.href=f.url,t.href=t.href,f.crossDomain=Jn.protocol+"//"+Jn.host!=t.protocol+"//"+t.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=D.param(f.data,f.traditional)),Qn(Xn,f,e,x),!p){for(o in(h=D.event&&f.global)&&0==D.active++&&D.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!zn.test(f.type),u=f.url.replace(Wn,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pn,"+")):(t=f.url.slice(u.length),f.data&&(f.processData||"string"==typeof f.data)&&(u+=($n.test(u)?"&":"?")+f.data,delete f.data),!1===f.cache&&(u=u.replace(Un,"$1"),t=($n.test(u)?"&":"?")+"_="+Hn.guid+++t),f.url=u+t),f.ifModified&&(D.lastModified[u]&&x.setRequestHeader("If-Modified-Since",D.lastModified[u]),D.etag[u])&&x.setRequestHeader("If-None-Match",D.etag[u]),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Kn+"; q=0.01":""):f.accepts["*"]),f.headers)x.setRequestHeader(o,f.headers[o]);if(f.beforeSend&&(!1===f.beforeSend.call(g,x,f)||p))return x.abort();if(a="abort",v.add(f.complete),x.done(f.success),x.fail(f.error),l=Qn(Zn,f,e,x)){if(x.readyState=1,h&&m.trigger("ajaxSend",[x,f]),p)return x;f.async&&0<f.timeout&&(d=k.setTimeout(function(){x.abort("timeout")},f.timeout));try{p=!1,l.send(i,s)}catch(t){if(p)throw t;s(-1,t)}}else s(-1,"No Transport")}return x;function s(t,e,n,o){var i,r,a,s=e;p||(p=!0,d&&k.clearTimeout(d),l=void 0,c=o||"",x.readyState=0<t?4:0,o=200<=t&&t<300||304===t,n&&(a=((t,e,n)=>{for(var o,i,r,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===o&&(o=t.mimeType||e.getResponseHeader("Content-Type"));if(o)for(i in s)if(s[i]&&s[i].test(o)){l.unshift(i);break}if(l[0]in n)r=l[0];else{for(i in n){if(!l[0]||t.converters[i+" "+l[0]]){r=i;break}a=a||i}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]})(f,x,n)),!o&&-1<D.inArray("script",f.dataTypes)&&D.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),a=((t,e,n,o)=>{var i,r,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(r=c.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&o&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=u[l+" "+r]||u["* "+r]))for(i in u)if((s=i.split(" "))[1]===r&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(r=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}})(f,a,x,o),o?(f.ifModified&&((n=x.getResponseHeader("Last-Modified"))&&(D.lastModified[u]=n),n=x.getResponseHeader("etag"))&&(D.etag[u]=n),204===t||"HEAD"===f.type?s="nocontent":304===t?s="notmodified":(s=a.state,i=a.data,o=!(r=a.error))):(r=s,!t&&s||(s="error",t<0&&(t=0))),x.status=t,x.statusText=(e||s)+"",o?y.resolveWith(g,[i,s,x]):y.rejectWith(g,[x,s,r]),x.statusCode(b),b=void 0,h&&m.trigger(o?"ajaxSuccess":"ajaxError",[x,f,o?i:r]),v.fireWith(g,[x,s]),h&&(m.trigger("ajaxComplete",[x,f]),--D.active||D.event.trigger("ajaxStop")))}},getJSON:function(t,e,n){return D.get(t,e,n,"json")},getScript:function(t,e){return D.get(t,void 0,e,"script")}}),D.each(["get","post"],function(t,i){D[i]=function(t,e,n,o){return v(e)&&(o=o||n,n=e,e=void 0),D.ajax(D.extend({url:t,type:i,dataType:o,data:e,success:n},D.isPlainObject(t)&&t))}}),D.ajaxPrefilter(function(t){for(var e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),D._evalUrl=function(t,e,n){return D.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){D.globalEval(t,e,n)}})},D.fn.extend({wrapAll:function(t){return this[0]&&(v(t)&&(t=t.call(this[0])),t=D(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(t){D(this).wrapInner(n.call(this,t))}):this.each(function(){var t=D(this),e=t.contents();e.length?e.wrapAll(n):t.append(n)})},wrap:function(e){var n=v(e);return this.each(function(t){D(this).wrapAll(n?e.call(this,t):e)})},unwrap:function(t){return this.parent(t).not("body").each(function(){D(this).replaceWith(this.childNodes)}),this}}),D.expr.pseudos.hidden=function(t){return!D.expr.pseudos.visible(t)},D.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},D.ajaxSettings.xhr=function(){try{return new k.XMLHttpRequest}catch(t){}};var eo={0:200,1223:204},no=D.ajaxSettings.xhr(),oo=(g.cors=!!no&&"withCredentials"in no,g.ajax=no=!!no,D.ajaxTransport(function(i){var r,a;if(g.cors||no&&!i.crossDomain)return{send:function(t,e){var n,o=i.xhr();if(o.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)o[n]=i.xhrFields[n];for(n in i.mimeType&&o.overrideMimeType&&o.overrideMimeType(i.mimeType),i.crossDomain||t["X-Requested-With"]||(t["X-Requested-With"]="XMLHttpRequest"),t)o.setRequestHeader(n,t[n]);r=function(t){return function(){r&&(r=a=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===t?o.abort():"error"===t?"number"!=typeof o.status?e(0,"error"):e(o.status,o.statusText):e(eo[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=r(),a=o.onerror=o.ontimeout=r("error"),void 0!==o.onabort?o.onabort=a:o.onreadystatechange=function(){4===o.readyState&&k.setTimeout(function(){r&&a()})},r=r("abort");try{o.send(i.hasContent&&i.data||null)}catch(t){if(r)throw t}},abort:function(){r&&r()}}}),D.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),D.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 D.globalEval(t),t}}}),D.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),D.ajaxTransport("script",function(n){var o,i;if(n.crossDomain||n.scriptAttrs)return{send:function(t,e){o=D("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(t){o.remove(),i=null,t&&e("error"===t.type?404:200,t.type)}),w.head.appendChild(o[0])},abort:function(){i&&i()}}}),[]),io=/(=)\?(?=&|$)|\?\?/,ro=(D.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=oo.pop()||D.expando+"_"+Hn.guid++;return this[t]=!0,t}}),D.ajaxPrefilter("json jsonp",function(t,e,n){var o,i,r,a=!1!==t.jsonp&&(io.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&io.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=v(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(io,"$1"+o):!1!==t.jsonp&&(t.url+=($n.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return r||D.error(o+" was not called"),r[0]},t.dataTypes[0]="json",i=k[o],k[o]=function(){r=arguments},n.always(function(){void 0===i?D(k).removeProp(o):k[o]=i,t[o]&&(t.jsonpCallback=e.jsonpCallback,oo.push(o)),r&&v(i)&&i(r[0]),r=i=void 0}),"script"}),g.createHTMLDocument=((t=w.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===t.childNodes.length),D.parseHTML=function(t,e,n){var o;return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((o=(e=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,e.head.appendChild(o)):e=w),o=!n&&[],(n=Xt.exec(t))?[e.createElement(n[1])]:(n=Ae([t],e,o),o&&o.length&&D(o).remove(),D.merge([],n.childNodes)))},D.fn.load=function(t,e,n){var o,i,r,a=this,s=t.indexOf(" ");return-1<s&&(o=An(t.slice(s)),t=t.slice(0,s)),v(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),0<a.length&&D.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done(function(t){r=arguments,a.html(o?D("<div>").append(D.parseHTML(t)).find(o):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,r||[t.responseText,e,t])})}),this},D.expr.pseudos.animated=function(e){return D.grep(D.timers,function(t){return e===t.elem}).length},D.offset={setOffset:function(t,e,n){var o,i,r,a,s=D.css(t,"position"),l=D(t),u={};"static"===s&&(t.style.position="relative"),r=l.offset(),o=D.css(t,"top"),a=D.css(t,"left"),s=("absolute"===s||"fixed"===s)&&-1<(o+a).indexOf("auto")?(i=(s=l.position()).top,s.left):(i=parseFloat(o)||0,parseFloat(a)||0),null!=(e=v(e)?e.call(t,n,D.extend({},r)):e).top&&(u.top=e.top-r.top+i),null!=e.left&&(u.left=e.left-r.left+s),"using"in e?e.using.call(t,u):l.css(u)}},D.fn.extend({offset:function(e){var t,n;return arguments.length?void 0===e?this:this.each(function(t){D.offset.setOffset(this,e,t)}):(n=this[0])?n.getClientRects().length?(t=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.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"===D.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"===D.css(t,"position");)t=t.parentNode;t&&t!==o&&1===t.nodeType&&((i=D(t).offset()).top+=D.css(t,"borderTopWidth",!0),i.left+=D.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-D.css(o,"marginTop",!0),left:e.left-i.left-D.css(o,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===D.css(t,"position");)t=t.offsetParent;return t||ve})}}),D.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,i){var r="pageYOffset"===i;D.fn[e]=function(t){return c(this,function(t,e,n){var o;if(N(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===n)return o?o[i]:t[e];o?o.scrollTo(r?o.pageXOffset:n,r?n:o.pageYOffset):t[e]=n},e,t,arguments.length)}}),D.each(["top","left"],function(t,n){D.cssHooks[n]=an(g.pixelPosition,function(t,e){if(e)return e=rn(t,n),Qe.test(e)?D(t).position()[n]+"px":e})}),D.each({Height:"height",Width:"width"},function(a,s){D.each({padding:"inner"+a,content:s,"":"outer"+a},function(o,r){D.fn[r]=function(t,e){var n=arguments.length&&(o||"boolean"!=typeof t),i=o||(!0===t||!0===e?"margin":"border");return c(this,function(t,e,n){var o;return N(t)?0===r.indexOf("outer")?t["inner"+a]:t.document.documentElement["client"+a]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+a],o["scroll"+a],t.body["offset"+a],o["offset"+a],o["client"+a])):void 0===n?D.css(t,e,i):D.style(t,e,n,i)},s,n?t:void 0,n)}})}),D.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){D.fn[e]=function(t){return this.on(e,t)}}),D.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)}}),D.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,n){D.fn[n]=function(t,e){return 0<arguments.length?this.on(n,null,t,e):this.trigger(n)}}),/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g),ao=(D.proxy=function(t,e){var n,o;if("string"==typeof e&&(o=t[e],e=t,t=o),v(t))return n=s.call(arguments,2),(o=function(){return t.apply(e||this,n.concat(s.call(arguments)))}).guid=t.guid=t.guid||D.guid++,o},D.holdReady=function(t){t?D.readyWait++:D.ready(!0)},D.isArray=Array.isArray,D.parseJSON=JSON.parse,D.nodeName=x,D.isFunction=v,D.isWindow=N,D.camelCase=M,D.type=X,D.now=Date.now,D.isNumeric=function(t){var e=D.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},D.trim=function(t){return null==t?"":(t+"").replace(ro,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return D}),k.jQuery),so=k.$;return D.noConflict=function(t){return k.$===D&&(k.$=so),t&&k.jQuery===D&&(k.jQuery=ao),D},void 0===$&&(k.jQuery=k.$=D),D},"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(t.document)return e(t);throw new Error("jQuery requires a window with a document")}:e(t);var t,e,s=jQuery.noConflict(!0),l={};function n(t,e={}){if(!t)return this;var 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}return l.removeAttributeValue=function(t,e,n){var o;t.getAttribute(e)&&(t.getAttribute(e)==n?t.removeAttribute(e):(n=new RegExp("(^|\\s)"+n+"(\\s|$)"),(o=t.getAttribute(e).match(n))&&3==o.length&&t.setAttribute(e,t.getAttribute(e).replace(n,o[1]&&o[2]?" ":""))))},l.addAttributeValue=function(t,e,n){t.getAttribute(e)?new RegExp("(^|\\s)"+n+"(\\s|$)").test(t.getAttribute(e))||t.setAttribute(e,t.getAttribute(e)+" "+n):t.setAttribute(e,n)},l.dragAndDropSupported=function(){return void 0!==document.createElement("div").ondrop},l.formDataSupported=function(){return"function"==typeof FormData},l.fileApiSupported=function(){var t=document.createElement("input");return t.type="file",void 0!==t.files},l.nodeListForEach=function(t,e){if(window.NodeList.prototype.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e.call(window,t[n],n,t)},l.initAll=function(t){var t=void 0!==(t=void 0!==t?t:{}).scope?t.scope:document,e=t.querySelectorAll('[data-module="moj-add-another"]'),e=(l.nodeListForEach(e,function(t){new l.AddAnother(t)}),t.querySelectorAll('[data-module="moj-multi-select"]')),e=(l.nodeListForEach(e,function(t){new l.MultiSelect({container:t.querySelector(t.getAttribute("data-multi-select-checkbox")),checkboxes:t.querySelectorAll("tbody .govuk-checkboxes__input"),id_prefix:t.getAttribute("data-multi-select-idprefix")})}),t.querySelectorAll('[data-module="moj-password-reveal"]')),e=(l.nodeListForEach(e,function(t){new l.PasswordReveal(t)}),t.querySelectorAll('[data-module="moj-rich-text-editor"]')),e=(l.nodeListForEach(e,function(t){var e={textarea:s(t)},t=t.getAttribute("data-moj-rich-text-editor-toolbar");if(t){var n,o=t.split(",");for(n in e.toolbar={},o)e.toolbar[o[n]]=!0}new l.RichTextEditor(e)}),t.querySelectorAll('[data-module="moj-search-toggle"]')),e=(l.nodeListForEach(e,function(t){new l.SearchToggle({toggleButton:{container:s(t.querySelector(".moj-search-toggle__toggle")),text:t.getAttribute("data-moj-search-toggle-text")},search:{container:s(t.querySelector(".moj-search"))}})}),t.querySelectorAll('[data-module="moj-sortable-table"]')),e=(l.nodeListForEach(e,function(t){new l.SortableTable({table:t})}),t.querySelectorAll('[data-module="moj-sortable-table"]')),e=(l.nodeListForEach(e,function(t){new l.SortableTable({table:t})}),document.querySelectorAll('[data-module="moj-date-picker"]')),e=(l.nodeListForEach(e,function(t){new l.DatePicker(t,{}).init()}),t.querySelectorAll('[data-module="moj-button-menu"]'));l.nodeListForEach(e,function(t){new l.ButtonMenu(t,{}).init()})},l.AddAnother=function(t){this.container=s(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",s.proxy(this,"onRemoveButtonClick")),this.container.on("click",".moj-add-another__add-button",s.proxy(this,"onAddButtonClick")),this.container.find(".moj-add-another__add-button, moj-add-another__remove-button").prop("type","button"))},l.AddAnother.prototype.onAddButtonClick=function(t){var e=this.getNewItem(),n=(this.updateAttributes(this.getItems().length,e),this.resetItem(e),this.getItems().first());this.hasRemoveButton(n)||this.createRemoveButton(n),this.getItems().last().after(e),e.find("input, textarea, select").first().focus()},l.AddAnother.prototype.hasRemoveButton=function(t){return t.find(".moj-add-another__remove-button").length},l.AddAnother.prototype.getItems=function(){return this.container.find(".moj-add-another__item")},l.AddAnother.prototype.getNewItem=function(){var t=this.getItems().first().clone();return this.hasRemoveButton(t)||this.createRemoveButton(t),t},l.AddAnother.prototype.updateAttributes=function(o,i){i.find("[data-name]").each(function(t,e){var n=e.id;e.name=s(e).attr("data-name").replace(/%index%/,o),e.id=s(e).attr("data-id").replace(/%index%/,o),(s(e).siblings("label")[0]||s(e).parents("label")[0]||i.find('[for="'+n+'"]')[0]).htmlFor=e.id})},l.AddAnother.prototype.createRemoveButton=function(t){t.append('<button type="button" class="govuk-button govuk-button--secondary moj-add-another__remove-button">Remove</button>')},l.AddAnother.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=""})},l.AddAnother.prototype.onRemoveButtonClick=function(t){s(t.currentTarget).parents(".moj-add-another__item").remove();t=this.getItems();1===t.length&&t.find(".moj-add-another__remove-button").remove(),t.each(s.proxy(function(t,e){this.updateAttributes(t,s(e))},this)),this.focusHeading()},l.AddAnother.prototype.focusHeading=function(){this.container.find(".moj-add-another__heading").focus()},l.ButtonMenu=function(t,e={}){if(!t)return this;var 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},l.ButtonMenu.prototype.init=function(){if(1==this.$module.children.length){let e=this.$module.children[0];e.classList.forEach(t=>{t.startsWith("govuk-button-")&&e.classList.remove(t),e.classList.remove("moj-button-menu__item")}),this.config.buttonClasses&&e.classList.add(...this.config.buttonClasses.split(" "))}1<this.$module.children.length&&this.initMenu()},l.ButtonMenu.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)})},l.ButtonMenu.prototype.createMenu=function(){var 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},l.ButtonMenu.prototype.setupMenuItems=function(){Array.from(this.$menu.children).forEach(e=>{var t=document.createElement("li");this.$menu.insertBefore(t,e),t.appendChild(e),e.setAttribute("tabindex",-1),"BUTTON"==e.tagName&&e.setAttribute("type","button"),e.classList.forEach(t=>{t.startsWith("govuk-button")&&e.classList.remove(t)}),e.addEventListener("click",t=>{setTimeout(()=>{this.closeMenu(!1)},50)})})},l.ButtonMenu.prototype.toggleTemplate=function(){return`
2
2
  <button type="button" class="govuk-button moj-button-menu__toggle-button ${this.config.buttonClasses||""}" aria-haspopup="true" aria-expanded="false">
3
3
  <span>
4
4
  ${this.config.buttonText}
@@ -67,4 +67,4 @@
67
67
  <div class="govuk-button-group">
68
68
  <button type="button" class="govuk-button moj-js-datepicker-ok">Select</button>
69
69
  <button type="button" class="govuk-button govuk-button--secondary moj-js-datepicker-cancel">Close</button>
70
- </div>`},n.prototype.createCalendarHeaders=function(){this.dayLabels.forEach(t=>{t=`<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",t)})},n.prototype.leadingZeros=function(t,e=2){let n=t.toString();for(;n.length<e;)n="0"+n;return n},n.prototype.setOptions=function(){this.setMinAndMaxDatesOnCalendar(),this.setExcludedDates(),this.setExcludedDays(),this.setLeadingZeros(),this.setWeekStartDay()},n.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)},n.prototype.setExcludedDates=function(){this.config.excludedDates&&(this.excludedDates=this.config.excludedDates.replace(/\s+/," ").split(" ").map(t=>{if(!t.includes("-"))return this.formattedDateFromString(t,null);var[t,e]=t.split("-").map(t=>this.formattedDateFromString(t,null));if(t&&e){for(var n=new Date(t.getTime()),o=[];n<=e;)o.push(new Date(n)),n.setDate(n.getDate()+1);return o}}).flat().filter(t=>t))},n.prototype.setExcludedDays=function(){if(this.config.excludedDays){let e=this.dayLabels.map(t=>t.toLowerCase());"monday"===this.config.weekStartDay&&e.unshift(e.pop()),this.excludedDays=this.config.excludedDays.replace(/\s+/," ").toLowerCase().split(" ").map(t=>e.indexOf(t)).filter(t=>-1!==t)}},n.prototype.setLeadingZeros=function(){"boolean"!=typeof this.config.leadingZeros&&("true"===this.config.leadingZeros.toLowerCase()?this.config.leadingZeros=!0:"false"===this.config.leadingZeros.toLowerCase()&&(this.config.leadingZeros=!1))},n.prototype.setWeekStartDay=function(){"sunday"===this.config.weekStartDay?.toLowerCase()?(this.config.weekStartDay="sunday",this.dayLabels.unshift(this.dayLabels.pop())):this.config.weekStartDay="monday"},n.prototype.isExcludedDate=function(t){if(this.minDate&&this.minDate>t)return!0;if(this.maxDate&&this.maxDate<t)return!0;for(var e of this.excludedDates)if(t.toDateString()===e.toDateString())return!0;return!!this.excludedDays.includes(t.getDay())},n.prototype.formattedDateFromString=function(t,e=new Date){var n=/(\d{1,2})([-/,. ])(\d{1,2})\2(\d{4})/;return n.test(t)&&(n=(t=t.match(n))[1],(t=new Date(t[4]+`-${t[3]}-`+n))instanceof Date)&&!isNaN(t)?t:e},n.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()},n.prototype.formattedDateHuman=function(t){return`${this.dayLabels[(t.getDay()+6)%7]} ${t.getDate()} ${this.monthLabels[t.getMonth()]} `+t.getFullYear()},n.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())},n.prototype.firstButtonKeydown=function(t){"Tab"===t.key&&t.shiftKey&&(this.$lastButtonInDialog.focus(),t.preventDefault())},n.prototype.lastButtonKeydown=function(t){"Tab"!==t.key||t.shiftKey||(this.$firstButtonInDialog.focus(),t.preventDefault())},n.prototype.updateCalendar=function(){this.$dialogTitle.innerHTML=this.monthLabels[this.currentDate.getMonth()]+" "+this.currentDate.getFullYear();var e=this.currentDate,t=new Date(e.getFullYear(),e.getMonth(),1);let n;n="monday"===this.config.weekStartDay?0===t.getDay()?6:t.getDay()-1:t.getDay(),t.setDate(t.getDate()-n);var o=new Date(t);for(let t=0;t<this.calendarDays.length;t++){var i=o.getMonth()!==e.getMonth(),r=this.isExcludedDate(o);this.calendarDays[t].update(o,i,r),o.setDate(o.getDate()+1)}},n.prototype.setCurrentDate=function(o=!0){let i=this.currentDate;var t;this.calendarDays.forEach(t=>{t.button.classList.add("moj-datepicker__button"),t.button.classList.add("moj-datepicker__calendar-day"),t.button.setAttribute("tabindex",-1),t.button.classList.remove(this.selectedDayButtonClass);var e=t.date,n=(e.setHours(0,0,0,0),new Date);n.setHours(0,0,0,0),e.getTime()===i.getTime()&&o&&(t.button.setAttribute("tabindex",0),t.button.focus(),t.button.classList.add(this.selectedDayButtonClass)),this.inputDate&&e.getTime()===this.inputDate.getTime()?(t.button.classList.add(this.currentDayButtonClass),t.button.setAttribute("aria-current","date")):(t.button.classList.remove(this.currentDayButtonClass),t.button.removeAttribute("aria-current")),e.getTime()===n.getTime()?t.button.classList.add(this.todayButtonClass):t.button.classList.remove(this.todayButtonClass)}),o||((t=this.calendarDays.filter(t=>"block"===window.getComputedStyle(t.button).display&&!t.button.disabled))[0].button.setAttribute("tabindex",0),this.currentDate=t[0].date)},n.prototype.selectDate=function(t){this.isExcludedDate(t)||(this.$calendarButton.querySelector("span").innerText="Choose date. Selected date is "+this.formattedDateHuman(t),this.$input.value=this.formattedDateFromDate(t),t=new Event("change",{bubbles:!0,cancelable:!0}),this.$input.dispatchEvent(t),this.closeDialog())},n.prototype.isOpen=function(){return this.$dialog.classList.contains("moj-datepicker__dialog--open")},n.prototype.toggleDialog=function(t){t.preventDefault(),this.isOpen()?this.closeDialog():(this.setMinAndMaxDatesOnCalendar(),this.openDialog())},n.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()},n.prototype.closeDialog=function(){this.$dialog.hidden=!0,this.$dialog.classList.remove("moj-datepicker__dialog--open"),this.$calendarButton.setAttribute("aria-expanded","false"),this.$calendarButton.focus()},n.prototype.goToDate=function(t,e){var n=this.currentDate;this.currentDate=t,n.getMonth()===this.currentDate.getMonth()&&n.getFullYear()===this.currentDate.getFullYear()||this.updateCalendar(),this.setCurrentDate(e)},n.prototype.focusNextDay=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()+1),this.goToDate(t)},n.prototype.focusPreviousDay=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()-1),this.goToDate(t)},n.prototype.focusNextWeek=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()+7),this.goToDate(t)},n.prototype.focusPreviousWeek=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()-7),this.goToDate(t)},n.prototype.focusFirstDayOfWeek=function(){var t=new Date(this.currentDate),e="sunday"==this.config.weekStartDay?0:1,n=t.getDay(),e=e<=n?n-e:6-n;t.setDate(t.getDate()-e),t.setHours(0,0,0,0),this.goToDate(t)},n.prototype.focusLastDayOfWeek=function(){var t=new Date(this.currentDate),e="sunday"==this.config.weekStartDay?6:0,n=t.getDay(),e=n<=e?e-n:7-n;t.setDate(t.getDate()+e),t.setHours(0,0,0,0),this.goToDate(t)},n.prototype.focusNextMonth=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setMonth(t.getMonth()+1,1),this.goToDate(t,e)},n.prototype.focusPreviousMonth=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setMonth(t.getMonth()-1,1),this.goToDate(t,e)},n.prototype.focusNextYear=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setFullYear(t.getFullYear()+1,t.getMonth(),1),this.goToDate(t,e)},n.prototype.focusPreviousYear=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setFullYear(t.getFullYear()-1,t.getMonth(),1),this.goToDate(t,e)},n.prototype.parseDataset=function(t,e){var n,o,i={};for([n,o]of Object.entries(t.properties))n in e&&(i[n]=e[n]);return i},n.prototype.mergeConfigs=function(...t){var e,n={};for(e of t)for(var o of Object.keys(e)){var i=n[o],r=e[o];n[o]="object"==typeof i&&"object"==typeof r?this.mergeConfigs(i,r):r}return n},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){var 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())},l.DatePicker=n,l.FilterToggleButton=function(t){this.options=t,this.container=s(this.options.toggleButton.container),this.filterContainer=s(this.options.filter.container),this.createToggleButton(),this.setupResponsiveChecks(),this.filterContainer.attr("tabindex","-1"),this.options.startHidden&&this.hideMenu()},l.FilterToggleButton.prototype.setupResponsiveChecks=function(){this.mq=window.matchMedia(this.options.bigModeMediaQuery),this.mq.addListener(s.proxy(this,"checkMode")),this.checkMode(this.mq)},l.FilterToggleButton.prototype.createToggleButton=function(){this.menuButton=s('<button class="govuk-button '+this.options.toggleButton.classes+'" type="button" aria-haspopup="true" aria-expanded="false">'+this.options.toggleButton.showText+"</button>"),this.menuButton.on("click",s.proxy(this,"onMenuButtonClick")),this.container.append(this.menuButton)},l.FilterToggleButton.prototype.checkMode=function(t){t.matches?this.enableBigMode():this.enableSmallMode()},l.FilterToggleButton.prototype.enableBigMode=function(){this.showMenu(),this.removeCloseButton()},l.FilterToggleButton.prototype.enableSmallMode=function(){this.hideMenu(),this.addCloseButton()},l.FilterToggleButton.prototype.addCloseButton=function(){this.options.closeButton&&(this.closeButton=s('<button class="moj-filter__close" type="button">'+this.options.closeButton.text+"</button>"),this.closeButton.on("click",s.proxy(this,"onCloseClick")),s(this.options.closeButton.container).append(this.closeButton))},l.FilterToggleButton.prototype.onCloseClick=function(){this.hideMenu(),this.menuButton.focus()},l.FilterToggleButton.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},l.FilterToggleButton.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false"),this.filterContainer.addClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.showText)},l.FilterToggleButton.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true"),this.filterContainer.removeClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.hideText)},l.FilterToggleButton.prototype.onMenuButtonClick=function(){this.toggle()},l.FilterToggleButton.prototype.toggle=function(){"false"==this.menuButton.attr("aria-expanded")?(this.showMenu(),this.filterContainer.focus()):this.hideMenu()},l.FormValidator=function(t,e){this.form=t,this.errors=[],this.validators=[],s(this.form).on("submit",s.proxy(this,"onSubmit")),this.summary=e&&e.summary?s(e.summary):s(".govuk-error-summary"),this.originalTitle=document.title},l.FormValidator.entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},l.FormValidator.prototype.escapeHtml=function(t){return String(t).replace(/[&<>"'`=\/]/g,function(t){return l.FormValidator.entityMap[t]})},l.FormValidator.prototype.resetTitle=function(){document.title=this.originalTitle},l.FormValidator.prototype.updateTitle=function(){document.title=this.errors.length+" errors - "+document.title},l.FormValidator.prototype.showSummary=function(){this.summary.html(this.getSummaryHtml()),this.summary.removeClass("moj-hidden"),this.summary.attr("aria-labelledby","errorSummary-heading"),this.summary.focus()},l.FormValidator.prototype.getSummaryHtml=function(){o='<h2 id="error-summary-title" class="govuk-error-summary__title">There is a problem</h2><div class="govuk-error-summary__body"><ul class="govuk-list govuk-error-summary__list">';for(var t=0,e=this.errors.length;t<e;t++)var n=this.errors[t],o=(o=(o=(o+="<li>")+('<a href="#'+this.escapeHtml(n.fieldName)+'">'))+this.escapeHtml(n.message))+"</a>"+"</li>";return o=o+"</ul>"+"</div>"},l.FormValidator.prototype.hideSummary=function(){this.summary.addClass("moj-hidden"),this.summary.removeAttr("aria-labelledby")},l.FormValidator.prototype.onSubmit=function(t){this.removeInlineErrors(),this.hideSummary(),this.resetTitle(),this.validate()||(t.preventDefault(),this.updateTitle(),this.showSummary(),this.showInlineErrors())},l.FormValidator.prototype.showInlineErrors=function(){for(var t=0,e=this.errors.length;t<e;t++)this.showInlineError(this.errors[t])},l.FormValidator.prototype.showInlineError=function(t){var e=t.fieldName+"-error",n='<span class="govuk-error-message" id="'+e+'">'+this.escapeHtml(t.message)+"</span>",t=s("#"+t.fieldName),o=t.parents(".govuk-form-group"),i=o.find("label"),r=o.find("legend"),a=o.find("fieldset");o.addClass("govuk-form-group--error"),r.length?(r.after(n),o.attr("aria-invalid","true"),l.addAttributeValue(a[0],"aria-describedby",e)):(i.after(n),t.attr("aria-invalid","true"),l.addAttributeValue(t[0],"aria-describedby",e))},l.FormValidator.prototype.removeInlineErrors=function(){for(var t=0;t<this.errors.length;t++)this.removeInlineError(this.errors[t])},l.FormValidator.prototype.removeInlineError=function(t){var e=s("#"+t.fieldName).parents(".govuk-form-group"),t=(e.find(".govuk-error-message").remove(),e.removeClass("govuk-form-group--error"),e.find("[aria-invalid]").attr("aria-invalid","false"),t.fieldName+"-error");l.removeAttributeValue(e.find("[aria-describedby]")[0],"aria-describedby",t)},l.FormValidator.prototype.addValidator=function(t,e){this.validators.push({fieldName:t,rules:e,field:this.form.elements[t]})},l.FormValidator.prototype.validate=function(){this.errors=[];for(var t,e,n=null,o=0;o<this.validators.length;o++)for(n=this.validators[o],e=0;e<n.rules.length;e++){if("boolean"==typeof(t=n.rules[e].method(n.field,n.rules[e].params))&&!t){this.errors.push({fieldName:n.fieldName,message:n.rules[e].message});break}if("string"==typeof t){this.errors.push({fieldName:t,message:n.rules[e].message});break}}return 0===this.errors.length},l.dragAndDropSupported()&&l.formDataSupported()&&l.fileApiSupported()&&(l.MultiFileUpload=function(t){this.defaultParams={uploadFileEntryHook:s.noop,uploadFileExitHook:s.noop,uploadFileErrorHook:s.noop,fileDeleteHook:s.noop,uploadStatusText:"Uploading files, please wait",dropzoneHintText:"Drag and drop files here or",dropzoneButtonText:"Choose files"},this.params=s.extend({},this.defaultParams,t),this.container=s(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",s.proxy(this,"onFileDeleteClick"))},l.MultiFileUpload.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",s.proxy(this,"onDragOver")),this.dropzone.on("dragleave",s.proxy(this,"onDragLeave")),this.dropzone.on("drop",s.proxy(this,"onDrop"))},l.MultiFileUpload.prototype.setupLabel=function(){this.label=s('<label for="'+this.fileInput[0].id+'" class="govuk-button govuk-button--secondary">'+this.params.dropzoneButtonText+"</label>"),this.dropzone.append('<p class="govuk-body">'+this.params.dropzoneHintText+"</p>"),this.dropzone.append(this.label)},l.MultiFileUpload.prototype.setupFileInput=function(){this.fileInput=this.container.find(".moj-multi-file-upload__input"),this.fileInput.on("change",s.proxy(this,"onFileChange")),this.fileInput.on("focus",s.proxy(this,"onFileFocus")),this.fileInput.on("blur",s.proxy(this,"onFileBlur"))},l.MultiFileUpload.prototype.setupStatusBox=function(){this.status=s('<div aria-live="polite" role="status" class="govuk-visually-hidden" />'),this.dropzone.append(this.status)},l.MultiFileUpload.prototype.onDragOver=function(t){t.preventDefault(),this.dropzone.addClass("moj-multi-file-upload--dragover")},l.MultiFileUpload.prototype.onDragLeave=function(){this.dropzone.removeClass("moj-multi-file-upload--dragover")},l.MultiFileUpload.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.MultiFileUpload.prototype.uploadFiles=function(t){for(var e=0;e<t.length;e++)this.uploadFile(t[e])},l.MultiFileUpload.prototype.onFileChange=function(t){this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(t.currentTarget.files),this.fileInput.replaceWith(s(t.currentTarget).val("").clone(!0)),this.setupFileInput(),this.fileInput.focus()},l.MultiFileUpload.prototype.onFileFocus=function(t){this.label.addClass("moj-multi-file-upload--focused")},l.MultiFileUpload.prototype.onFileBlur=function(t){this.label.removeClass("moj-multi-file-upload--focused")},l.MultiFileUpload.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.MultiFileUpload.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.MultiFileUpload.prototype.getFileRowHtml=function(t){var e="";return(e+='<div class="govuk-summary-list__row moj-multi-file-upload__row">')+' <div class="govuk-summary-list__value moj-multi-file-upload__message">'+('<span class="moj-multi-file-upload__filename">'+t.name+"</span>")+'<span class="moj-multi-file-upload__progress">0%</span>'+" </div>"+' <div class="govuk-summary-list__actions moj-multi-file-upload__actions"></div>'+"</div>"},l.MultiFileUpload.prototype.getDeleteButtonHtml=function(t){var e='<button class="moj-multi-file-upload__delete govuk-button govuk-button--secondary govuk-!-margin-bottom-0" type="button" name="delete" value="'+t.filename+'">';return e+('Delete <span class="govuk-visually-hidden">'+t.originalname+"</span>")+"</button>"},l.MultiFileUpload.prototype.uploadFile=function(o){this.params.uploadFileEntryHook(this,o);var t=new FormData,e=(t.append("documents",o),s(this.getFileRowHtml(o)));this.feedbackContainer.find(".moj-multi-file-upload__list").append(e),s.ajax({url:this.params.uploadUrl,type:"post",data:t,processData:!1,contentType:!1,success:s.proxy(function(t){t.error?(e.find(".moj-multi-file-upload__message").html(this.getErrorHtml(t.error)),this.status.html(t.error.message)):(e.find(".moj-multi-file-upload__message").html(this.getSuccessHtml(t.success)),this.status.html(t.success.messageText)),e.find(".moj-multi-file-upload__actions").append(this.getDeleteButtonHtml(t.file)),this.params.uploadFileExitHook(this,o,t)},this),error:s.proxy(function(t,e,n){this.params.uploadFileErrorHook(this,o,t,e,n)},this),xhr:function(){var t=new XMLHttpRequest;return t.upload.addEventListener("progress",function(t){t.lengthComputable&&(t=t.loaded/t.total,t=parseInt(100*t,10),e.find(".moj-multi-file-upload__progress").text(" "+t+"%"))},!1),t}})},l.MultiFileUpload.prototype.onFileDeleteClick=function(t){t.preventDefault();var e=s(t.currentTarget),t={};t[e[0].name]=e[0].value,s.ajax({url:this.params.deleteUrl,type:"post",dataType:"json",data:t,success:s.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)})}),l.MultiSelect=function(t){this.container=s(t.container),this.container.data("moj-multi-select-initialised")||(this.container.data("moj-multi-select-initialised",!0),this.toggle=s(this.getToggleHtml()),this.toggleButton=this.toggle.find("input"),this.toggleButton.on("click",s.proxy(this,"onButtonClick")),this.container.append(this.toggle),this.checkboxes=s(t.checkboxes),this.checkboxes.on("click",s.proxy(this,"onCheckboxClick")),this.checked=t.checked||!1)},l.MultiSelect.prototype.getToggleHtml=function(){return'<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox"> <input type="checkbox" class="govuk-checkboxes__input" id="checkboxes-all"> <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="checkboxes-all"> <span class="govuk-visually-hidden">Select all</span> </label></div>'},l.MultiSelect.prototype.onButtonClick=function(t){this.checked?(this.uncheckAll(),this.toggleButton[0].checked=!1):(this.checkAll(),this.toggleButton[0].checked=!0)},l.MultiSelect.prototype.checkAll=function(){this.checkboxes.each(s.proxy(function(t,e){e.checked=!0},this)),this.checked=!0},l.MultiSelect.prototype.uncheckAll=function(){this.checkboxes.each(s.proxy(function(t,e){e.checked=!1},this)),this.checked=!1},l.MultiSelect.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)},l.PasswordReveal=function(t){this.el=t;t=s(this.el);t.data("moj-password-reveal-initialised")||(t.data("moj-password-reveal-initialised",!0),t.attr("spellcheck","false"),t.wrap('<div class="moj-password-reveal"></div>'),this.container=s(this.el).parent(),this.createButton())},l.PasswordReveal.prototype.createButton=function(){this.button=s('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>'),this.container.append(this.button),this.button.on("click",s.proxy(this,"onButtonClick"))},l.PasswordReveal.prototype.onButtonClick=function(){"password"===this.el.type?(this.el.type="text",this.button.html('Hide <span class="govuk-visually-hidden">password</span>')):(this.el.type="password",this.button.html('Show <span class="govuk-visually-hidden">password</span>'))},"contentEditable"in document.documentElement&&(l.RichTextEditor=function(t){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=s(this.textarea).parent(),this.container.data("moj-rich-text-editor-initialised")||(this.container.data("moj-rich-text-editor-initialised",!0),this.createToolbar(),this.hideDefault(),this.configureToolbar(),this.keys={left:37,right:39,up:38,down:40},this.container.on("click",".moj-rich-text-editor__toolbar-button",s.proxy(this,"onButtonClick")),this.container.find(".moj-rich-text-editor__content").on("input",s.proxy(this,"onEditorInput")),this.container.find("label").on("click",s.proxy(this,"onLabelClick")),this.toolbar.on("keydown",s.proxy(this,"onToolbarKeydown")))},l.RichTextEditor.prototype.onToolbarKeydown=function(t){switch(t.keyCode){case this.keys.right:case this.keys.down:var e,n=(e=this.toolbar.find("button[tabindex=0]")).next("button");n[0]&&(n.focus(),e.attr("tabindex","-1"),n.attr("tabindex","0"));break;case this.keys.left:case this.keys.up:n=(e=this.toolbar.find("button[tabindex=0]")).prev("button");n[0]&&(n.focus(),e.attr("tabindex","-1"),n.attr("tabindex","0"))}},l.RichTextEditor.prototype.getToolbarHtml=function(){var 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>"},l.RichTextEditor.prototype.getEnhancedHtml=function(t){return this.getToolbarHtml()+'<div class="govuk-textarea moj-rich-text-editor__content" contenteditable="true" spellcheck="false"></div>'},l.RichTextEditor.prototype.hideDefault=function(){this.textarea=this.container.find("textarea"),this.textarea.addClass("govuk-visually-hidden"),this.textarea.attr("aria-hidden",!0),this.textarea.attr("tabindex","-1")},l.RichTextEditor.prototype.createToolbar=function(){this.toolbar=document.createElement("div"),this.toolbar.className="moj-rich-text-editor",this.toolbar.innerHTML=this.getEnhancedHtml(),this.container.append(this.toolbar),this.toolbar=this.container.find(".moj-rich-text-editor__toolbar"),this.container.find(".moj-rich-text-editor__content").html(this.textarea.val())},l.RichTextEditor.prototype.configureToolbar=function(){this.buttons=this.container.find(".moj-rich-text-editor__toolbar-button"),this.buttons.prop("tabindex","-1"),this.buttons.first().prop("tabindex","0")},l.RichTextEditor.prototype.onButtonClick=function(t){document.execCommand(s(t.currentTarget).data("command"),!1,null)},l.RichTextEditor.prototype.getContent=function(){return this.container.find(".moj-rich-text-editor__content").html()},l.RichTextEditor.prototype.onEditorInput=function(t){this.updateTextarea()},l.RichTextEditor.prototype.updateTextarea=function(){document.execCommand("defaultParagraphSeparator",!1,"p"),this.textarea.val(this.getContent())},l.RichTextEditor.prototype.onLabelClick=function(t){t.preventDefault(),this.container.find(".moj-rich-text-editor__content").focus()}),l.SearchToggle=function(t){this.options=t,this.container=s(this.options.search.container),this.toggleButtonContainer=s(this.options.toggleButton.container),this.container.data("moj-search-toggle-initialised")||(this.container.data("moj-search-toggle-initialised",!0),this.toggleButton=s('<button class="moj-search-toggle__button" type="button" aria-haspopup="true" aria-expanded="false">'+this.options.toggleButton.text+'<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="moj-search-toggle__button__icon"><path d="M7.433,12.5790048 C6.06762625,12.5808611 4.75763941,12.0392925 3.79217348,11.0738265 C2.82670755,10.1083606 2.28513891,8.79837375 2.28699522,7.433 C2.28513891,6.06762625 2.82670755,4.75763941 3.79217348,3.79217348 C4.75763941,2.82670755 6.06762625,2.28513891 7.433,2.28699522 C8.79837375,2.28513891 10.1083606,2.82670755 11.0738265,3.79217348 C12.0392925,4.75763941 12.5808611,6.06762625 12.5790048,7.433 C12.5808611,8.79837375 12.0392925,10.1083606 11.0738265,11.0738265 C10.1083606,12.0392925 8.79837375,12.5808611 7.433,12.5790048 L7.433,12.5790048 Z M14.293,12.579 L13.391,12.579 L13.071,12.269 C14.2300759,10.9245158 14.8671539,9.20813198 14.866,7.433 C14.866,3.32786745 11.5381325,-1.65045755e-15 7.433,-1.65045755e-15 C3.32786745,-1.65045755e-15 -1.65045755e-15,3.32786745 -1.65045755e-15,7.433 C-1.65045755e-15,11.5381325 3.32786745,14.866 7.433,14.866 C9.208604,14.8671159 10.9253982,14.2296624 12.27,13.07 L12.579,13.39 L12.579,14.294 L18.296,20 L20,18.296 L14.294,12.579 L14.293,12.579 Z"></path></svg></button>'),this.toggleButton.on("click",s.proxy(this,"onToggleButtonClick")),this.toggleButtonContainer.append(this.toggleButton),s(document).on("click",this.onDocumentClick.bind(this)),s(document).on("focusin",this.onDocumentClick.bind(this)))},l.SearchToggle.prototype.showMenu=function(){this.toggleButton.attr("aria-expanded","true"),this.container.removeClass("moj-js-hidden"),this.container.find("input").first().focus()},l.SearchToggle.prototype.hideMenu=function(){this.container.addClass("moj-js-hidden"),this.toggleButton.attr("aria-expanded","false")},l.SearchToggle.prototype.onToggleButtonClick=function(){"false"==this.toggleButton.attr("aria-expanded")?this.showMenu():this.hideMenu()},l.SearchToggle.prototype.onDocumentClick=function(t){s.contains(this.toggleButtonContainer[0],t.target)||s.contains(this.container[0],t.target)||this.hideMenu()},l.SortableTable=function(t){this.table=s(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",s.proxy(this,"onSortButtonClick")))},l.SortableTable.prototype.setupOptions=function(t){this.statusMessage=(t=t||{}).statusMessage||"Sort by %heading% (%direction%)",this.ascendingText=t.ascendingText||"ascending",this.descendingText=t.descendingText||"descending"},l.SortableTable.prototype.createHeadingButtons=function(){for(var t,e=this.table.find("thead th"),n=0;n<e.length;n++)(t=s(e[n])).attr("aria-sort")&&this.createHeadingButton(t,n)},l.SortableTable.prototype.createHeadingButton=function(t,e){var n=t.text(),e=s('<button type="button" data-index="'+e+'">'+n+"</button>");t.text(""),t.append(e)},l.SortableTable.prototype.createStatusBox=function(){this.status=s('<div aria-live="polite" role="status" aria-atomic="true" class="govuk-visually-hidden" />'),this.table.parent().append(this.status)},l.SortableTable.prototype.initialiseSortedColumn=function(){var o=this.getTableRowsArray();this.table.find("th").filter('[aria-sort="ascending"], [aria-sort="descending"]').first().each((t,e)=>{var n=s(e).attr("aria-sort"),e=s(e).find("button").attr("data-index"),e=this.sort(o,e,n);this.addRows(e)})},l.SortableTable.prototype.onSortButtonClick=function(t){var e=t.currentTarget.getAttribute("data-index"),n=s(t.currentTarget).parent().attr("aria-sort"),n="none"===n||"descending"===n?"ascending":"descending",o=this.getTableRowsArray(),o=this.sort(o,e,n);this.addRows(o),this.removeButtonStates(),this.updateButtonState(s(t.currentTarget),n)},l.SortableTable.prototype.updateButtonState=function(t,e){t.parent().attr("aria-sort",e);var n=this.statusMessage;n=(n=n.replace(/%heading%/,t.text())).replace(/%direction%/,this[e+"Text"]),this.status.text(n)},l.SortableTable.prototype.removeButtonStates=function(){this.table.find("thead th").attr("aria-sort","none")},l.SortableTable.prototype.addRows=function(t){for(var e=0;e<t.length;e++)this.body.append(t[e])},l.SortableTable.prototype.getTableRowsArray=function(){for(var t=[],e=this.body.find("tr"),n=0;n<e.length;n++)t.push(e[n]);return t},l.SortableTable.prototype.sort=function(t,o,i){return t.sort(function(t,e){var t=s(t).find("td,th").eq(o),e=s(e).find("td,th").eq(o),n="ascending"===i?this.getCellValue(t):this.getCellValue(e),e="ascending"===i?this.getCellValue(e):this.getCellValue(t);return"string"==typeof n||"string"==typeof e?n.toString().localeCompare(e.toString()):n-e}.bind(this))},l.SortableTable.prototype.getCellValue=function(t){var t=t.attr("data-sort-value")||t.html(),e=parseFloat(t);return isNaN(e)?t:e},l});
70
+ </div>`},n.prototype.createCalendarHeaders=function(){this.dayLabels.forEach(t=>{t=`<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",t)})},n.prototype.leadingZeros=function(t,e=2){let n=t.toString();for(;n.length<e;)n="0"+n;return n},n.prototype.setOptions=function(){this.setMinAndMaxDatesOnCalendar(),this.setExcludedDates(),this.setExcludedDays(),this.setLeadingZeros(),this.setWeekStartDay()},n.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)},n.prototype.setExcludedDates=function(){this.config.excludedDates&&(this.excludedDates=this.config.excludedDates.replace(/\s+/," ").split(" ").map(t=>{if(!t.includes("-"))return this.formattedDateFromString(t,null);var[t,e]=t.split("-").map(t=>this.formattedDateFromString(t,null));if(t&&e){for(var n=new Date(t.getTime()),o=[];n<=e;)o.push(new Date(n)),n.setDate(n.getDate()+1);return o}}).flat().filter(t=>t))},n.prototype.setExcludedDays=function(){if(this.config.excludedDays){let e=this.dayLabels.map(t=>t.toLowerCase());"monday"===this.config.weekStartDay&&e.unshift(e.pop()),this.excludedDays=this.config.excludedDays.replace(/\s+/," ").toLowerCase().split(" ").map(t=>e.indexOf(t)).filter(t=>-1!==t)}},n.prototype.setLeadingZeros=function(){"boolean"!=typeof this.config.leadingZeros&&("true"===this.config.leadingZeros.toLowerCase()?this.config.leadingZeros=!0:"false"===this.config.leadingZeros.toLowerCase()&&(this.config.leadingZeros=!1))},n.prototype.setWeekStartDay=function(){"sunday"===this.config.weekStartDay?.toLowerCase()?(this.config.weekStartDay="sunday",this.dayLabels.unshift(this.dayLabels.pop())):this.config.weekStartDay="monday"},n.prototype.isExcludedDate=function(t){if(this.minDate&&this.minDate>t)return!0;if(this.maxDate&&this.maxDate<t)return!0;for(var e of this.excludedDates)if(t.toDateString()===e.toDateString())return!0;return!!this.excludedDays.includes(t.getDay())},n.prototype.formattedDateFromString=function(t,e=new Date){var n=/(\d{1,2})([-/,. ])(\d{1,2})\2(\d{4})/;return n.test(t)&&(n=(t=t.match(n))[1],(t=new Date(t[4]+`-${t[3]}-`+n))instanceof Date)&&!isNaN(t)?t:e},n.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()},n.prototype.formattedDateHuman=function(t){return`${this.dayLabels[(t.getDay()+6)%7]} ${t.getDate()} ${this.monthLabels[t.getMonth()]} `+t.getFullYear()},n.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())},n.prototype.firstButtonKeydown=function(t){"Tab"===t.key&&t.shiftKey&&(this.$lastButtonInDialog.focus(),t.preventDefault())},n.prototype.lastButtonKeydown=function(t){"Tab"!==t.key||t.shiftKey||(this.$firstButtonInDialog.focus(),t.preventDefault())},n.prototype.updateCalendar=function(){this.$dialogTitle.innerHTML=this.monthLabels[this.currentDate.getMonth()]+" "+this.currentDate.getFullYear();var e=this.currentDate,t=new Date(e.getFullYear(),e.getMonth(),1);let n;n="monday"===this.config.weekStartDay?0===t.getDay()?6:t.getDay()-1:t.getDay(),t.setDate(t.getDate()-n);var o=new Date(t);for(let t=0;t<this.calendarDays.length;t++){var i=o.getMonth()!==e.getMonth(),r=this.isExcludedDate(o);this.calendarDays[t].update(o,i,r),o.setDate(o.getDate()+1)}},n.prototype.setCurrentDate=function(o=!0){let i=this.currentDate;var t;this.calendarDays.forEach(t=>{t.button.classList.add("moj-datepicker__button"),t.button.classList.add("moj-datepicker__calendar-day"),t.button.setAttribute("tabindex",-1),t.button.classList.remove(this.selectedDayButtonClass);var e=t.date,n=(e.setHours(0,0,0,0),new Date);n.setHours(0,0,0,0),e.getTime()===i.getTime()&&o&&(t.button.setAttribute("tabindex",0),t.button.focus(),t.button.classList.add(this.selectedDayButtonClass)),this.inputDate&&e.getTime()===this.inputDate.getTime()?(t.button.classList.add(this.currentDayButtonClass),t.button.setAttribute("aria-current","date")):(t.button.classList.remove(this.currentDayButtonClass),t.button.removeAttribute("aria-current")),e.getTime()===n.getTime()?t.button.classList.add(this.todayButtonClass):t.button.classList.remove(this.todayButtonClass)}),o||((t=this.calendarDays.filter(t=>"block"===window.getComputedStyle(t.button).display&&!t.button.disabled))[0].button.setAttribute("tabindex",0),this.currentDate=t[0].date)},n.prototype.selectDate=function(t){this.isExcludedDate(t)||(this.$calendarButton.querySelector("span").innerText="Choose date. Selected date is "+this.formattedDateHuman(t),this.$input.value=this.formattedDateFromDate(t),t=new Event("change",{bubbles:!0,cancelable:!0}),this.$input.dispatchEvent(t),this.closeDialog())},n.prototype.isOpen=function(){return this.$dialog.classList.contains("moj-datepicker__dialog--open")},n.prototype.toggleDialog=function(t){t.preventDefault(),this.isOpen()?this.closeDialog():(this.setMinAndMaxDatesOnCalendar(),this.openDialog())},n.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()},n.prototype.closeDialog=function(){this.$dialog.hidden=!0,this.$dialog.classList.remove("moj-datepicker__dialog--open"),this.$calendarButton.setAttribute("aria-expanded","false"),this.$calendarButton.focus()},n.prototype.goToDate=function(t,e){var n=this.currentDate;this.currentDate=t,n.getMonth()===this.currentDate.getMonth()&&n.getFullYear()===this.currentDate.getFullYear()||this.updateCalendar(),this.setCurrentDate(e)},n.prototype.focusNextDay=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()+1),this.goToDate(t)},n.prototype.focusPreviousDay=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()-1),this.goToDate(t)},n.prototype.focusNextWeek=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()+7),this.goToDate(t)},n.prototype.focusPreviousWeek=function(){var t=new Date(this.currentDate);t.setDate(t.getDate()-7),this.goToDate(t)},n.prototype.focusFirstDayOfWeek=function(){var t=new Date(this.currentDate),e="sunday"==this.config.weekStartDay?0:1,n=t.getDay(),e=e<=n?n-e:6-n;t.setDate(t.getDate()-e),t.setHours(0,0,0,0),this.goToDate(t)},n.prototype.focusLastDayOfWeek=function(){var t=new Date(this.currentDate),e="sunday"==this.config.weekStartDay?6:0,n=t.getDay(),e=n<=e?e-n:7-n;t.setDate(t.getDate()+e),t.setHours(0,0,0,0),this.goToDate(t)},n.prototype.focusNextMonth=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setMonth(t.getMonth()+1,1),this.goToDate(t,e)},n.prototype.focusPreviousMonth=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setMonth(t.getMonth()-1,1),this.goToDate(t,e)},n.prototype.focusNextYear=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setFullYear(t.getFullYear()+1,t.getMonth(),1),this.goToDate(t,e)},n.prototype.focusPreviousYear=function(t,e=!0){t.preventDefault();t=new Date(this.currentDate);t.setFullYear(t.getFullYear()-1,t.getMonth(),1),this.goToDate(t,e)},n.prototype.parseDataset=function(t,e){var n,o,i={};for([n,o]of Object.entries(t.properties))n in e&&(i[n]=e[n]);return i},n.prototype.mergeConfigs=function(...t){var e,n={};for(e of t)for(var o of Object.keys(e)){var i=n[o],r=e[o];n[o]="object"==typeof i&&"object"==typeof r?this.mergeConfigs(i,r):r}return n},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){var 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())},l.DatePicker=n,l.FilterToggleButton=function(t){this.options=t,this.container=s(this.options.toggleButton.container),this.filterContainer=s(this.options.filter.container),this.createToggleButton(),this.setupResponsiveChecks(),this.filterContainer.attr("tabindex","-1"),this.options.startHidden&&this.hideMenu()},l.FilterToggleButton.prototype.setupResponsiveChecks=function(){this.mq=window.matchMedia(this.options.bigModeMediaQuery),this.mq.addListener(s.proxy(this,"checkMode")),this.checkMode(this.mq)},l.FilterToggleButton.prototype.createToggleButton=function(){this.menuButton=s('<button class="govuk-button '+this.options.toggleButton.classes+'" type="button" aria-haspopup="true" aria-expanded="false">'+this.options.toggleButton.showText+"</button>"),this.menuButton.on("click",s.proxy(this,"onMenuButtonClick")),this.container.append(this.menuButton)},l.FilterToggleButton.prototype.checkMode=function(t){t.matches?this.enableBigMode():this.enableSmallMode()},l.FilterToggleButton.prototype.enableBigMode=function(){this.showMenu(),this.removeCloseButton()},l.FilterToggleButton.prototype.enableSmallMode=function(){this.hideMenu(),this.addCloseButton()},l.FilterToggleButton.prototype.addCloseButton=function(){this.options.closeButton&&(this.closeButton=s('<button class="moj-filter__close" type="button">'+this.options.closeButton.text+"</button>"),this.closeButton.on("click",s.proxy(this,"onCloseClick")),s(this.options.closeButton.container).append(this.closeButton))},l.FilterToggleButton.prototype.onCloseClick=function(){this.hideMenu(),this.menuButton.focus()},l.FilterToggleButton.prototype.removeCloseButton=function(){this.closeButton&&(this.closeButton.remove(),this.closeButton=null)},l.FilterToggleButton.prototype.hideMenu=function(){this.menuButton.attr("aria-expanded","false"),this.filterContainer.addClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.showText)},l.FilterToggleButton.prototype.showMenu=function(){this.menuButton.attr("aria-expanded","true"),this.filterContainer.removeClass("moj-js-hidden"),this.menuButton.text(this.options.toggleButton.hideText)},l.FilterToggleButton.prototype.onMenuButtonClick=function(){this.toggle()},l.FilterToggleButton.prototype.toggle=function(){"false"==this.menuButton.attr("aria-expanded")?(this.showMenu(),this.filterContainer.focus()):this.hideMenu()},l.FormValidator=function(t,e){this.form=t,this.errors=[],this.validators=[],s(this.form).on("submit",s.proxy(this,"onSubmit")),this.summary=e&&e.summary?s(e.summary):s(".govuk-error-summary"),this.originalTitle=document.title},l.FormValidator.entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},l.FormValidator.prototype.escapeHtml=function(t){return String(t).replace(/[&<>"'`=\/]/g,function(t){return l.FormValidator.entityMap[t]})},l.FormValidator.prototype.resetTitle=function(){document.title=this.originalTitle},l.FormValidator.prototype.updateTitle=function(){document.title=this.errors.length+" errors - "+document.title},l.FormValidator.prototype.showSummary=function(){this.summary.html(this.getSummaryHtml()),this.summary.removeClass("moj-hidden"),this.summary.attr("aria-labelledby","errorSummary-heading"),this.summary.focus()},l.FormValidator.prototype.getSummaryHtml=function(){o='<h2 id="error-summary-title" class="govuk-error-summary__title">There is a problem</h2><div class="govuk-error-summary__body"><ul class="govuk-list govuk-error-summary__list">';for(var t=0,e=this.errors.length;t<e;t++)var n=this.errors[t],o=(o=(o=(o+="<li>")+('<a href="#'+this.escapeHtml(n.fieldName)+'">'))+this.escapeHtml(n.message))+"</a>"+"</li>";return o=o+"</ul>"+"</div>"},l.FormValidator.prototype.hideSummary=function(){this.summary.addClass("moj-hidden"),this.summary.removeAttr("aria-labelledby")},l.FormValidator.prototype.onSubmit=function(t){this.removeInlineErrors(),this.hideSummary(),this.resetTitle(),this.validate()||(t.preventDefault(),this.updateTitle(),this.showSummary(),this.showInlineErrors())},l.FormValidator.prototype.showInlineErrors=function(){for(var t=0,e=this.errors.length;t<e;t++)this.showInlineError(this.errors[t])},l.FormValidator.prototype.showInlineError=function(t){var e=t.fieldName+"-error",n='<span class="govuk-error-message" id="'+e+'">'+this.escapeHtml(t.message)+"</span>",t=s("#"+t.fieldName),o=t.parents(".govuk-form-group"),i=o.find("label"),r=o.find("legend"),a=o.find("fieldset");o.addClass("govuk-form-group--error"),r.length?(r.after(n),o.attr("aria-invalid","true"),l.addAttributeValue(a[0],"aria-describedby",e)):(i.after(n),t.attr("aria-invalid","true"),l.addAttributeValue(t[0],"aria-describedby",e))},l.FormValidator.prototype.removeInlineErrors=function(){for(var t=0;t<this.errors.length;t++)this.removeInlineError(this.errors[t])},l.FormValidator.prototype.removeInlineError=function(t){var e=s("#"+t.fieldName).parents(".govuk-form-group"),t=(e.find(".govuk-error-message").remove(),e.removeClass("govuk-form-group--error"),e.find("[aria-invalid]").attr("aria-invalid","false"),t.fieldName+"-error");l.removeAttributeValue(e.find("[aria-describedby]")[0],"aria-describedby",t)},l.FormValidator.prototype.addValidator=function(t,e){this.validators.push({fieldName:t,rules:e,field:this.form.elements[t]})},l.FormValidator.prototype.validate=function(){this.errors=[];for(var t,e,n=null,o=0;o<this.validators.length;o++)for(n=this.validators[o],e=0;e<n.rules.length;e++){if("boolean"==typeof(t=n.rules[e].method(n.field,n.rules[e].params))&&!t){this.errors.push({fieldName:n.fieldName,message:n.rules[e].message});break}if("string"==typeof t){this.errors.push({fieldName:t,message:n.rules[e].message});break}}return 0===this.errors.length},l.dragAndDropSupported()&&l.formDataSupported()&&l.fileApiSupported()&&(l.MultiFileUpload=function(t){this.defaultParams={uploadFileEntryHook:s.noop,uploadFileExitHook:s.noop,uploadFileErrorHook:s.noop,fileDeleteHook:s.noop,uploadStatusText:"Uploading files, please wait",dropzoneHintText:"Drag and drop files here or",dropzoneButtonText:"Choose files"},this.params=s.extend({},this.defaultParams,t),this.container=s(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",s.proxy(this,"onFileDeleteClick"))},l.MultiFileUpload.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",s.proxy(this,"onDragOver")),this.dropzone.on("dragleave",s.proxy(this,"onDragLeave")),this.dropzone.on("drop",s.proxy(this,"onDrop"))},l.MultiFileUpload.prototype.setupLabel=function(){this.label=s('<label for="'+this.fileInput[0].id+'" class="govuk-button govuk-button--secondary">'+this.params.dropzoneButtonText+"</label>"),this.dropzone.append('<p class="govuk-body">'+this.params.dropzoneHintText+"</p>"),this.dropzone.append(this.label)},l.MultiFileUpload.prototype.setupFileInput=function(){this.fileInput=this.container.find(".moj-multi-file-upload__input"),this.fileInput.on("change",s.proxy(this,"onFileChange")),this.fileInput.on("focus",s.proxy(this,"onFileFocus")),this.fileInput.on("blur",s.proxy(this,"onFileBlur"))},l.MultiFileUpload.prototype.setupStatusBox=function(){this.status=s('<div aria-live="polite" role="status" class="govuk-visually-hidden" />'),this.dropzone.append(this.status)},l.MultiFileUpload.prototype.onDragOver=function(t){t.preventDefault(),this.dropzone.addClass("moj-multi-file-upload--dragover")},l.MultiFileUpload.prototype.onDragLeave=function(){this.dropzone.removeClass("moj-multi-file-upload--dragover")},l.MultiFileUpload.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.MultiFileUpload.prototype.uploadFiles=function(t){for(var e=0;e<t.length;e++)this.uploadFile(t[e])},l.MultiFileUpload.prototype.onFileChange=function(t){this.feedbackContainer.removeClass("moj-hidden"),this.status.html(this.params.uploadStatusText),this.uploadFiles(t.currentTarget.files),this.fileInput.replaceWith(s(t.currentTarget).val("").clone(!0)),this.setupFileInput(),this.fileInput.focus()},l.MultiFileUpload.prototype.onFileFocus=function(t){this.label.addClass("moj-multi-file-upload--focused")},l.MultiFileUpload.prototype.onFileBlur=function(t){this.label.removeClass("moj-multi-file-upload--focused")},l.MultiFileUpload.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.MultiFileUpload.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.MultiFileUpload.prototype.getFileRowHtml=function(t){var e="";return(e+='<div class="govuk-summary-list__row moj-multi-file-upload__row">')+' <div class="govuk-summary-list__value moj-multi-file-upload__message">'+('<span class="moj-multi-file-upload__filename">'+t.name+"</span>")+'<span class="moj-multi-file-upload__progress">0%</span>'+" </div>"+' <div class="govuk-summary-list__actions moj-multi-file-upload__actions"></div>'+"</div>"},l.MultiFileUpload.prototype.getDeleteButtonHtml=function(t){var e='<button class="moj-multi-file-upload__delete govuk-button govuk-button--secondary govuk-!-margin-bottom-0" type="button" name="delete" value="'+t.filename+'">';return e+('Delete <span class="govuk-visually-hidden">'+t.originalname+"</span>")+"</button>"},l.MultiFileUpload.prototype.uploadFile=function(o){this.params.uploadFileEntryHook(this,o);var t=new FormData,e=(t.append("documents",o),s(this.getFileRowHtml(o)));this.feedbackContainer.find(".moj-multi-file-upload__list").append(e),s.ajax({url:this.params.uploadUrl,type:"post",data:t,processData:!1,contentType:!1,success:s.proxy(function(t){t.error?(e.find(".moj-multi-file-upload__message").html(this.getErrorHtml(t.error)),this.status.html(t.error.message)):(e.find(".moj-multi-file-upload__message").html(this.getSuccessHtml(t.success)),this.status.html(t.success.messageText)),e.find(".moj-multi-file-upload__actions").append(this.getDeleteButtonHtml(t.file)),this.params.uploadFileExitHook(this,o,t)},this),error:s.proxy(function(t,e,n){this.params.uploadFileErrorHook(this,o,t,e,n)},this),xhr:function(){var t=new XMLHttpRequest;return t.upload.addEventListener("progress",function(t){t.lengthComputable&&(t=t.loaded/t.total,t=parseInt(100*t,10),e.find(".moj-multi-file-upload__progress").text(" "+t+"%"))},!1),t}})},l.MultiFileUpload.prototype.onFileDeleteClick=function(t){t.preventDefault();var e=s(t.currentTarget),t={};t[e[0].name]=e[0].value,s.ajax({url:this.params.deleteUrl,type:"post",dataType:"json",data:t,success:s.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)})}),l.MultiSelect=function(e){if(this.container=s(e.container),!this.container.data("moj-multi-select-initialised")){this.container.data("moj-multi-select-initialised",!0);var n=e.id_prefix;let t=void 0!==n?n+"checkboxes-all":"checkboxes-all";this.toggle=s(this.getToggleHtml(t)),this.toggleButton=this.toggle.find("input"),this.toggleButton.on("click",s.proxy(this,"onButtonClick")),this.container.append(this.toggle),this.checkboxes=s(e.checkboxes),this.checkboxes.on("click",s.proxy(this,"onCheckboxClick")),this.checked=e.checked||!1}},l.MultiSelect.prototype.getToggleHtml=function(t){var e="";return e+'<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox">'+` <input type="checkbox" class="govuk-checkboxes__input" id="${t}">`+` <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="${t}">`+' <span class="govuk-visually-hidden">Select all</span>'+" </label>"+"</div>"},l.MultiSelect.prototype.onButtonClick=function(t){this.checked?(this.uncheckAll(),this.toggleButton[0].checked=!1):(this.checkAll(),this.toggleButton[0].checked=!0)},l.MultiSelect.prototype.checkAll=function(){this.checkboxes.each(s.proxy(function(t,e){e.checked=!0},this)),this.checked=!0},l.MultiSelect.prototype.uncheckAll=function(){this.checkboxes.each(s.proxy(function(t,e){e.checked=!1},this)),this.checked=!1},l.MultiSelect.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)},l.PasswordReveal=function(t){this.el=t;t=s(this.el);t.data("moj-password-reveal-initialised")||(t.data("moj-password-reveal-initialised",!0),t.attr("spellcheck","false"),t.wrap('<div class="moj-password-reveal"></div>'),this.container=s(this.el).parent(),this.createButton())},l.PasswordReveal.prototype.createButton=function(){this.button=s('<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>'),this.container.append(this.button),this.button.on("click",s.proxy(this,"onButtonClick"))},l.PasswordReveal.prototype.onButtonClick=function(){"password"===this.el.type?(this.el.type="text",this.button.html('Hide <span class="govuk-visually-hidden">password</span>')):(this.el.type="password",this.button.html('Show <span class="govuk-visually-hidden">password</span>'))},"contentEditable"in document.documentElement&&(l.RichTextEditor=function(t){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=s(this.textarea).parent(),this.container.data("moj-rich-text-editor-initialised")||(this.container.data("moj-rich-text-editor-initialised",!0),this.createToolbar(),this.hideDefault(),this.configureToolbar(),this.keys={left:37,right:39,up:38,down:40},this.container.on("click",".moj-rich-text-editor__toolbar-button",s.proxy(this,"onButtonClick")),this.container.find(".moj-rich-text-editor__content").on("input",s.proxy(this,"onEditorInput")),this.container.find("label").on("click",s.proxy(this,"onLabelClick")),this.toolbar.on("keydown",s.proxy(this,"onToolbarKeydown")))},l.RichTextEditor.prototype.onToolbarKeydown=function(t){switch(t.keyCode){case this.keys.right:case this.keys.down:var e,n=(e=this.toolbar.find("button[tabindex=0]")).next("button");n[0]&&(n.focus(),e.attr("tabindex","-1"),n.attr("tabindex","0"));break;case this.keys.left:case this.keys.up:n=(e=this.toolbar.find("button[tabindex=0]")).prev("button");n[0]&&(n.focus(),e.attr("tabindex","-1"),n.attr("tabindex","0"))}},l.RichTextEditor.prototype.getToolbarHtml=function(){var 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>"},l.RichTextEditor.prototype.getEnhancedHtml=function(t){return this.getToolbarHtml()+'<div class="govuk-textarea moj-rich-text-editor__content" contenteditable="true" spellcheck="false"></div>'},l.RichTextEditor.prototype.hideDefault=function(){this.textarea=this.container.find("textarea"),this.textarea.addClass("govuk-visually-hidden"),this.textarea.attr("aria-hidden",!0),this.textarea.attr("tabindex","-1")},l.RichTextEditor.prototype.createToolbar=function(){this.toolbar=document.createElement("div"),this.toolbar.className="moj-rich-text-editor",this.toolbar.innerHTML=this.getEnhancedHtml(),this.container.append(this.toolbar),this.toolbar=this.container.find(".moj-rich-text-editor__toolbar"),this.container.find(".moj-rich-text-editor__content").html(this.textarea.val())},l.RichTextEditor.prototype.configureToolbar=function(){this.buttons=this.container.find(".moj-rich-text-editor__toolbar-button"),this.buttons.prop("tabindex","-1"),this.buttons.first().prop("tabindex","0")},l.RichTextEditor.prototype.onButtonClick=function(t){document.execCommand(s(t.currentTarget).data("command"),!1,null)},l.RichTextEditor.prototype.getContent=function(){return this.container.find(".moj-rich-text-editor__content").html()},l.RichTextEditor.prototype.onEditorInput=function(t){this.updateTextarea()},l.RichTextEditor.prototype.updateTextarea=function(){document.execCommand("defaultParagraphSeparator",!1,"p"),this.textarea.val(this.getContent())},l.RichTextEditor.prototype.onLabelClick=function(t){t.preventDefault(),this.container.find(".moj-rich-text-editor__content").focus()}),l.SearchToggle=function(t){this.options=t,this.container=s(this.options.search.container),this.toggleButtonContainer=s(this.options.toggleButton.container),this.container.data("moj-search-toggle-initialised")||(this.container.data("moj-search-toggle-initialised",!0),this.toggleButton=s('<button class="moj-search-toggle__button" type="button" aria-haspopup="true" aria-expanded="false">'+this.options.toggleButton.text+'<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="moj-search-toggle__button__icon"><path d="M7.433,12.5790048 C6.06762625,12.5808611 4.75763941,12.0392925 3.79217348,11.0738265 C2.82670755,10.1083606 2.28513891,8.79837375 2.28699522,7.433 C2.28513891,6.06762625 2.82670755,4.75763941 3.79217348,3.79217348 C4.75763941,2.82670755 6.06762625,2.28513891 7.433,2.28699522 C8.79837375,2.28513891 10.1083606,2.82670755 11.0738265,3.79217348 C12.0392925,4.75763941 12.5808611,6.06762625 12.5790048,7.433 C12.5808611,8.79837375 12.0392925,10.1083606 11.0738265,11.0738265 C10.1083606,12.0392925 8.79837375,12.5808611 7.433,12.5790048 L7.433,12.5790048 Z M14.293,12.579 L13.391,12.579 L13.071,12.269 C14.2300759,10.9245158 14.8671539,9.20813198 14.866,7.433 C14.866,3.32786745 11.5381325,-1.65045755e-15 7.433,-1.65045755e-15 C3.32786745,-1.65045755e-15 -1.65045755e-15,3.32786745 -1.65045755e-15,7.433 C-1.65045755e-15,11.5381325 3.32786745,14.866 7.433,14.866 C9.208604,14.8671159 10.9253982,14.2296624 12.27,13.07 L12.579,13.39 L12.579,14.294 L18.296,20 L20,18.296 L14.294,12.579 L14.293,12.579 Z"></path></svg></button>'),this.toggleButton.on("click",s.proxy(this,"onToggleButtonClick")),this.toggleButtonContainer.append(this.toggleButton),s(document).on("click",this.onDocumentClick.bind(this)),s(document).on("focusin",this.onDocumentClick.bind(this)))},l.SearchToggle.prototype.showMenu=function(){this.toggleButton.attr("aria-expanded","true"),this.container.removeClass("moj-js-hidden"),this.container.find("input").first().focus()},l.SearchToggle.prototype.hideMenu=function(){this.container.addClass("moj-js-hidden"),this.toggleButton.attr("aria-expanded","false")},l.SearchToggle.prototype.onToggleButtonClick=function(){"false"==this.toggleButton.attr("aria-expanded")?this.showMenu():this.hideMenu()},l.SearchToggle.prototype.onDocumentClick=function(t){s.contains(this.toggleButtonContainer[0],t.target)||s.contains(this.container[0],t.target)||this.hideMenu()},l.SortableTable=function(t){this.table=s(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",s.proxy(this,"onSortButtonClick")))},l.SortableTable.prototype.setupOptions=function(t){this.statusMessage=(t=t||{}).statusMessage||"Sort by %heading% (%direction%)",this.ascendingText=t.ascendingText||"ascending",this.descendingText=t.descendingText||"descending"},l.SortableTable.prototype.createHeadingButtons=function(){for(var t,e=this.table.find("thead th"),n=0;n<e.length;n++)(t=s(e[n])).attr("aria-sort")&&this.createHeadingButton(t,n)},l.SortableTable.prototype.createHeadingButton=function(t,e){var n=t.text(),e=s('<button type="button" data-index="'+e+'">'+n+"</button>");t.text(""),t.append(e)},l.SortableTable.prototype.createStatusBox=function(){this.status=s('<div aria-live="polite" role="status" aria-atomic="true" class="govuk-visually-hidden" />'),this.table.parent().append(this.status)},l.SortableTable.prototype.initialiseSortedColumn=function(){var o=this.getTableRowsArray();this.table.find("th").filter('[aria-sort="ascending"], [aria-sort="descending"]').first().each((t,e)=>{var n=s(e).attr("aria-sort"),e=s(e).find("button").attr("data-index"),e=this.sort(o,e,n);this.addRows(e)})},l.SortableTable.prototype.onSortButtonClick=function(t){var e=t.currentTarget.getAttribute("data-index"),n=s(t.currentTarget).parent().attr("aria-sort"),n="none"===n||"descending"===n?"ascending":"descending",o=this.getTableRowsArray(),o=this.sort(o,e,n);this.addRows(o),this.removeButtonStates(),this.updateButtonState(s(t.currentTarget),n)},l.SortableTable.prototype.updateButtonState=function(t,e){t.parent().attr("aria-sort",e);var n=this.statusMessage;n=(n=n.replace(/%heading%/,t.text())).replace(/%direction%/,this[e+"Text"]),this.status.text(n)},l.SortableTable.prototype.removeButtonStates=function(){this.table.find("thead th").attr("aria-sort","none")},l.SortableTable.prototype.addRows=function(t){for(var e=0;e<t.length;e++)this.body.append(t[e])},l.SortableTable.prototype.getTableRowsArray=function(){for(var t=[],e=this.body.find("tr"),n=0;n<e.length;n++)t.push(e[n]);return t},l.SortableTable.prototype.sort=function(t,o,i){return t.sort(function(t,e){var t=s(t).find("td,th").eq(o),e=s(e).find("td,th").eq(o),n="ascending"===i?this.getCellValue(t):this.getCellValue(e),e="ascending"===i?this.getCellValue(e):this.getCellValue(t);return"string"==typeof n||"string"==typeof e?n.toString().localeCompare(e.toString()):n-e}.bind(this))},l.SortableTable.prototype.getCellValue=function(t){var t=t.attr("data-sort-value")||t.html(),e=parseFloat(t);return isNaN(e)?t:e},l});
package/moj/all.js CHANGED
@@ -77,7 +77,8 @@ MOJFrontend.initAll = function (options) {
77
77
  MOJFrontend.nodeListForEach($multiSelects, function ($multiSelect) {
78
78
  new MOJFrontend.MultiSelect({
79
79
  container: $multiSelect.querySelector($multiSelect.getAttribute('data-multi-select-checkbox')),
80
- checkboxes: $multiSelect.querySelectorAll('tbody .govuk-checkboxes__input')
80
+ checkboxes: $multiSelect.querySelectorAll('tbody .govuk-checkboxes__input'),
81
+ id_prefix: $multiSelect.getAttribute('data-multi-select-idprefix'),
81
82
  });
82
83
  });
83
84
 
@@ -1938,6 +1939,77 @@ if(MOJFrontend.dragAndDropSupported() && MOJFrontend.formDataSupported() && MOJF
1938
1939
  };
1939
1940
  }
1940
1941
 
1942
+ MOJFrontend.MultiSelect = function(options) {
1943
+ this.container = $(options.container);
1944
+
1945
+ if (this.container.data('moj-multi-select-initialised')) {
1946
+ return
1947
+ }
1948
+
1949
+ this.container.data('moj-multi-select-initialised', true);
1950
+
1951
+ const idPrefix = options.id_prefix;
1952
+ let allId = 'checkboxes-all';
1953
+ if (typeof idPrefix !== 'undefined') {
1954
+ allId = idPrefix + 'checkboxes-all';
1955
+ }
1956
+
1957
+ this.toggle = $(this.getToggleHtml(allId));
1958
+ this.toggleButton = this.toggle.find('input');
1959
+ this.toggleButton.on('click', $.proxy(this, 'onButtonClick'));
1960
+ this.container.append(this.toggle);
1961
+ this.checkboxes = $(options.checkboxes);
1962
+ this.checkboxes.on('click', $.proxy(this, 'onCheckboxClick'));
1963
+ this.checked = options.checked || false;
1964
+ };
1965
+
1966
+ MOJFrontend.MultiSelect.prototype.getToggleHtml = function (allId) {
1967
+ let html = '';
1968
+ html += '<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox">';
1969
+ html += ` <input type="checkbox" class="govuk-checkboxes__input" id="${allId}">`;
1970
+ html += ` <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="${allId}">`;
1971
+ html += ' <span class="govuk-visually-hidden">Select all</span>';
1972
+ html += ' </label>';
1973
+ html += '</div>';
1974
+ return html;
1975
+ };
1976
+
1977
+ MOJFrontend.MultiSelect.prototype.onButtonClick = function(e) {
1978
+ if(this.checked) {
1979
+ this.uncheckAll();
1980
+ this.toggleButton[0].checked = false;
1981
+ } else {
1982
+ this.checkAll();
1983
+ this.toggleButton[0].checked = true;
1984
+ }
1985
+ };
1986
+
1987
+ MOJFrontend.MultiSelect.prototype.checkAll = function() {
1988
+ this.checkboxes.each($.proxy(function(index, el) {
1989
+ el.checked = true;
1990
+ }, this));
1991
+ this.checked = true;
1992
+ };
1993
+
1994
+ MOJFrontend.MultiSelect.prototype.uncheckAll = function() {
1995
+ this.checkboxes.each($.proxy(function(index, el) {
1996
+ el.checked = false;
1997
+ }, this));
1998
+ this.checked = false;
1999
+ };
2000
+
2001
+ MOJFrontend.MultiSelect.prototype.onCheckboxClick = function(e) {
2002
+ if(!e.target.checked) {
2003
+ this.toggleButton[0].checked = false;
2004
+ this.checked = false;
2005
+ } else {
2006
+ if(this.checkboxes.filter(':checked').length === this.checkboxes.length) {
2007
+ this.toggleButton[0].checked = true;
2008
+ this.checked = true;
2009
+ }
2010
+ }
2011
+ };
2012
+
1941
2013
  MOJFrontend.PasswordReveal = function(element) {
1942
2014
  this.el = element;
1943
2015
  var $el = $(this.el)
@@ -2111,71 +2183,6 @@ if('contentEditable' in document.documentElement) {
2111
2183
 
2112
2184
  }
2113
2185
 
2114
- MOJFrontend.MultiSelect = function(options) {
2115
- this.container = $(options.container);
2116
-
2117
- if (this.container.data('moj-multi-select-initialised')) {
2118
- return
2119
- }
2120
-
2121
- this.container.data('moj-multi-select-initialised', true);
2122
-
2123
- this.toggle = $(this.getToggleHtml());
2124
- this.toggleButton = this.toggle.find('input');
2125
- this.toggleButton.on('click', $.proxy(this, 'onButtonClick'));
2126
- this.container.append(this.toggle);
2127
- this.checkboxes = $(options.checkboxes);
2128
- this.checkboxes.on('click', $.proxy(this, 'onCheckboxClick'));
2129
- this.checked = options.checked || false;
2130
- };
2131
-
2132
- MOJFrontend.MultiSelect.prototype.getToggleHtml = function() {
2133
- var html = '';
2134
- html += '<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox">';
2135
- html += ' <input type="checkbox" class="govuk-checkboxes__input" id="checkboxes-all">';
2136
- html += ' <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="checkboxes-all">';
2137
- html += ' <span class="govuk-visually-hidden">Select all</span>';
2138
- html += ' </label>';
2139
- html += '</div>';
2140
- return html;
2141
- };
2142
-
2143
- MOJFrontend.MultiSelect.prototype.onButtonClick = function(e) {
2144
- if(this.checked) {
2145
- this.uncheckAll();
2146
- this.toggleButton[0].checked = false;
2147
- } else {
2148
- this.checkAll();
2149
- this.toggleButton[0].checked = true;
2150
- }
2151
- };
2152
-
2153
- MOJFrontend.MultiSelect.prototype.checkAll = function() {
2154
- this.checkboxes.each($.proxy(function(index, el) {
2155
- el.checked = true;
2156
- }, this));
2157
- this.checked = true;
2158
- };
2159
-
2160
- MOJFrontend.MultiSelect.prototype.uncheckAll = function() {
2161
- this.checkboxes.each($.proxy(function(index, el) {
2162
- el.checked = false;
2163
- }, this));
2164
- this.checked = false;
2165
- };
2166
-
2167
- MOJFrontend.MultiSelect.prototype.onCheckboxClick = function(e) {
2168
- if(!e.target.checked) {
2169
- this.toggleButton[0].checked = false;
2170
- this.checked = false;
2171
- } else {
2172
- if(this.checkboxes.filter(':checked').length === this.checkboxes.length) {
2173
- this.toggleButton[0].checked = true;
2174
- this.checked = true;
2175
- }
2176
- }
2177
- };
2178
-
2179
2186
  MOJFrontend.SearchToggle = function (options) {
2180
2187
  this.options = options;
2181
2188
  this.container = $(this.options.search.container);
@@ -9,6 +9,7 @@
9
9
  @import "filter/filter";
10
10
  @import "header/header";
11
11
  @import "identity-bar/identity-bar";
12
+ @import "interruption-card/interruption-card";
12
13
  @import "messages/messages";
13
14
  @import "multi-file-upload/multi-file-upload";
14
15
  @import "multi-select/multi-select";
@@ -199,18 +199,13 @@ describe("Date picker with defaults", () => {
199
199
  });
200
200
 
201
201
  test("can navigate back in time", async () => {
202
- const today = new Date();
203
- const currentMonthName = today.toLocaleString("default", { month: "long" });
204
- const currentYear = today.getFullYear();
205
- const currentMonth = today.getMonth();
206
- const previousMonthName = new Date(
207
- today.setMonth(currentMonth - 1),
208
- ).toLocaleString("default", { month: "long" });
209
- const previousYear = currentYear - 1;
202
+ const today = dayjs();
203
+ const previousMonth = dayjs().subtract(1, 'month')
204
+ const previousYear = previousMonth.subtract(1, 'year')
210
205
 
211
- const currentTitle = `${currentMonthName} ${currentYear}`;
212
- const previousMonthTitle = `${previousMonthName} ${currentYear}`;
213
- const previousYearTitle = `${previousMonthName} ${previousYear}`;
206
+ const currentTitle = `${today.format('MMMM YYYY')}`;
207
+ const previousMonthTitle = `${previousMonth.format('MMMM YYYY')}`;
208
+ const previousYearTitle = `${previousYear.format('MMMM YYYY')}`;
214
209
 
215
210
  await user.click(calendarButton);
216
211
  let prevMonthButton = getByText(dialog, "Previous month");
@@ -224,18 +219,13 @@ describe("Date picker with defaults", () => {
224
219
  });
225
220
 
226
221
  test("can navigate forward in time", async () => {
227
- const today = new Date();
228
- const currentMonthName = today.toLocaleString("default", { month: "long" });
229
- const currentYear = today.getFullYear();
230
- const currentMonth = today.getMonth();
231
- const nextMonthName = new Date(
232
- today.setMonth(currentMonth + 1),
233
- ).toLocaleString("default", { month: "long" });
234
- const nextYear = currentYear + 1;
235
-
236
- const currentTitle = `${currentMonthName} ${currentYear}`;
237
- const nextMonthTitle = `${nextMonthName} ${currentYear}`;
238
- const nextYearTitle = `${nextMonthName} ${nextYear}`;
222
+ const today = dayjs();
223
+ const nextMonth = dayjs().add(1, 'month')
224
+ const nextYear = nextMonth.add(1, 'year')
225
+
226
+ const currentTitle = `${today.format('MMMM YYYY')}`;
227
+ const nextMonthTitle = `${nextMonth.format('MMMM YYYY')}`;
228
+ const nextYearTitle = `${nextYear.format('MMMM YYYY')}`;
239
229
 
240
230
  await user.click(calendarButton);
241
231
  let nextMonthButton = getByText(dialog, "Next month");
@@ -42,7 +42,7 @@
42
42
  <path fill="#ffffff" fill-rule="evenodd" d="M15.0611 32.3472L15.2903 33.5459L15.025 33.5944L14.7885 32.4032C14.626 32.4331 14.534 32.4331 14.3119 32.5339L14.3047 32.265L15.4528 32.1119L15.5322 32.3378C15.4275 32.2986 15.0611 32.3472 15.0611 32.3472ZM14.2235 33.7512L13.4275 33.9398C13.4419 33.8166 13.1748 32.6627 13.1062 32.5582L13.9455 32.3584L13.8787 32.6496C13.7632 32.616 13.626 32.6179 13.4708 32.6515L13.5683 33.0697L14.0322 32.9596L14.108 33.1631C14.0159 33.1482 13.7361 33.2228 13.6098 33.2471L13.7109 33.684C13.9383 33.6299 14.1278 33.5496 14.2758 33.4432L14.2795 33.445L14.2235 33.7512ZM11.913 34.1788C11.3318 34.1937 11.2469 33.3349 11.1115 32.911L11.3931 32.8569C11.5285 33.2247 11.4906 34.0873 12.0881 33.9734C12.5213 33.7736 12.1711 33.0623 12.126 32.7206L12.404 32.6795C12.5087 33.249 12.7578 34.2367 11.913 34.1788ZM11.0953 34.3095L10.2975 34.4906C10.3137 34.3674 10.0574 33.2116 9.99059 33.1052L10.83 32.9129L10.7614 33.2042C10.6458 33.1706 10.5086 33.1706 10.3534 33.2023L10.4473 33.6205L10.9112 33.516L10.987 33.7195C10.8931 33.7046 10.6133 33.7755 10.487 33.7998L10.5845 34.2367C10.8119 34.1844 11.0014 34.106 11.1513 34.0014L11.1549 34.0033L11.0953 34.3095ZM9.6007 34.6437C9.62055 34.2348 9.48878 33.5944 9.31008 33.2284L9.69997 33.1426C9.68012 33.5515 9.81189 34.1937 9.99059 34.5578L9.6007 34.6437ZM9.20719 34.3954C9.04293 34.8024 8.54653 34.8958 8.16024 34.9667C8.17829 34.8398 7.94183 33.6616 7.86963 33.5552C8.53931 33.2583 9.49781 33.5459 9.20719 34.3954ZM15.6188 31.7833C12.5737 31.787 9.54113 33.1332 6.49416 33.1332C6.12953 33.1332 5.76491 33.1127 5.39847 33.0697C6.34253 33.8409 6.27574 35.3868 7.6476 35.3868C7.70717 35.3868 7.77035 35.3831 7.83533 35.3775C9.69997 35.1721 11.5538 34.6269 13.3896 34.3263C13.7054 34.2759 15.2253 33.8913 16.1152 33.8913C16.4365 33.8913 16.6748 33.9417 16.7452 34.0761C16.8427 34.2572 16.238 34.7837 16.2325 34.8043C16.2325 34.8099 16.2344 34.8136 16.2416 34.8136C16.3011 34.8136 16.6351 34.6138 16.886 34.4421C17.8788 33.7046 15.7975 31.7833 15.6188 31.7833ZM29.7255 33.1127C29.6623 33.3741 29.5612 33.8689 29.5288 34.1396C30.1262 34.2703 30.3122 33.234 29.7255 33.1127ZM32.0685 33.5328C31.6118 33.4152 31.462 34.3991 31.8429 34.5578C32.3086 34.6717 32.4494 33.6934 32.0685 33.5328ZM30.8735 33.3479L30.7345 33.8707C31.1226 33.9454 31.2905 33.4133 30.8735 33.3479ZM27.211 32.5992C26.7345 32.4648 26.5504 33.4842 26.9511 33.656C27.4367 33.7904 27.6136 32.7766 27.211 32.5992Z"/>
43
43
  <path fill="#ffffff" fill-rule="evenodd" d="M33.5541 33.895C33.5541 33.895 33.3772 34.9312 33.388 35.019L33.0866 34.963C33.0811 34.9705 33.2725 34.0537 33.3194 33.8558C33.2129 33.8315 33.0866 33.8427 32.9674 33.8894L32.9656 33.8857L33.0866 33.6261L33.9043 33.7774L33.962 34.0649C33.8916 33.9958 33.6714 33.9174 33.5541 33.895ZM32.8393 33.9529C32.8086 34.1919 32.7003 34.6792 32.7436 34.907L32.4403 34.8622C32.5739 34.5074 32.6642 33.9118 32.6425 33.5328L32.9458 33.5795C32.897 33.684 32.8609 33.8091 32.8393 33.9529ZM32.0324 34.7445C31.258 34.8939 31.258 33.5403 31.8808 33.3517C32.657 33.1836 32.6606 34.5578 32.0324 34.7445ZM31.3645 33.6766C31.3266 33.8297 31.2165 33.9342 31.0378 33.9921C31.1154 34.2572 31.1624 34.345 31.2941 34.6325L31.2923 34.64L31.0883 34.6064C31.045 34.5821 30.7887 34.2087 30.7111 34.007C30.666 34.1732 30.6208 34.3842 30.6389 34.5354L30.2923 34.4794C30.3555 34.3749 30.628 33.2733 30.6172 33.1575C30.9187 33.1967 31.4584 33.2527 31.3645 33.6766ZM29.8645 34.2964C29.6822 34.3636 29.4223 34.289 29.2327 34.2516L29.4872 32.9036C30.332 32.8457 30.684 33.9772 29.8645 34.2964ZM28.6641 34.1825C28.5703 34.162 28.0594 33.0884 28.0594 33.0884C28.0594 33.0884 27.9367 33.923 27.9042 33.9809L27.6731 33.9473L27.9367 32.6384L28.193 32.6739C28.1948 32.7075 28.5991 33.5925 28.5991 33.5925C28.5991 33.5925 28.7345 32.8756 28.7472 32.8121L28.9421 32.8681L28.6641 34.1825ZM27.6009 33.3367C27.3248 34.3039 26.2471 33.7755 26.5684 32.9129C26.841 31.9756 27.9204 32.4723 27.6009 33.3367ZM26.4746 32.2949C26.4294 32.3378 26.267 33.516 26.2778 33.6317L25.9709 33.5701C26.0269 33.4674 26.0991 32.6459 26.0991 32.6459L25.572 33.4917L25.2634 32.5376C25.2634 32.5376 25.1388 33.2228 25.1334 33.4432L24.8319 33.4002C24.9294 33.2397 25.1171 32.0279 25.1171 32.0279L25.4294 32.0876C25.4366 32.1511 25.6731 32.9745 25.6731 32.9745C25.6731 32.9745 26.0865 32.2557 26.1099 32.2183L26.4764 32.2893L26.4746 32.2949ZM34.0252 33.1276C33.6443 33.1276 33.2833 33.1202 33.1046 33.1052C31.0974 32.9036 29.11 32.3098 27.1081 31.9812C26.5305 31.886 26.0576 31.7982 25.6478 31.7982C24.7976 31.7982 24.2182 32.1791 23.5341 33.6896C23.2417 34.2628 24.22 34.8099 24.4348 34.8342C23.6316 34.1247 23.9114 33.9137 24.5449 33.9137C25.4222 33.9137 26.9746 34.3151 27.2778 34.3543C29.1136 34.6568 30.9692 35.2001 32.8339 35.4074C32.8988 35.413 32.962 35.4167 33.0216 35.4167C34.3934 35.4167 34.3267 33.8689 35.2707 33.0996C35.1028 33.1146 34.5469 33.1276 34.0252 33.1276Z"/>
44
44
 
45
- <image src="/assets/images/moj-logotype-crest-2024.png" xlink:href="" class="moj-header__logotype-crest-fallback-image" width="40" height="40"></image>
45
+ <image src="{{ 'assets/images/moj-logotype-crest-2024.png' | rev | url }}" xlink:href="" class="moj-header__logotype-crest-fallback-image" width="40" height="40"></image>
46
46
 
47
47
  </svg>
48
48
 
@@ -0,0 +1,35 @@
1
+ .moj-interruption-card {
2
+ background-color: govuk-colour("blue");
3
+ margin-bottom: govuk-spacing(3);
4
+ @include govuk-responsive-padding(7, $adjustment: $govuk-border-width*-1);
5
+ border: $govuk-border-width solid transparent;
6
+ }
7
+
8
+ .moj-interruption-card__content {
9
+ max-width: 960px;
10
+ }
11
+
12
+ .moj-interruption-card__heading,
13
+ .moj-interruption-card__body {
14
+ color: govuk-colour("white");
15
+ }
16
+
17
+ .moj-interruption-card__body:last-child {
18
+ margin-bottom: 0;
19
+ }
20
+
21
+ .moj-interruption-card__actions:last-child {
22
+ margin-bottom: 0;
23
+
24
+ .govuk-button:last-child,
25
+ .govuk-link:last-child {
26
+ margin-bottom: 0;
27
+ }
28
+
29
+ @include govuk-media-query($from: tablet) {
30
+ .govuk-button,
31
+ .govuk-link {
32
+ margin-bottom: 0;
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,3 @@
1
+ {% macro interruptionCard(params) %}
2
+ {%- include "./template.njk" %}
3
+ {% endmacro %}
@@ -0,0 +1,35 @@
1
+ {% from "govuk/components/button/macro.njk" import govukButton %}
2
+ <div class="moj-interruption-card" data-test="{{ params.id }}">
3
+ <div class="moj-interruption-card__content">
4
+ <h1 class="govuk-heading-l moj-interruption-card__heading">{{- params.heading -}}</h1>
5
+ <div class="govuk-body-l moj-interruption-card__body">{{ caller() }}</div>
6
+ <div class="govuk-button-group moj-interruption-card__actions">
7
+ {% if params.primaryAction.style == "link" %}
8
+ <a class="govuk-link govuk-link--inverse"
9
+ href="{{ params.primaryAction.href }}">{{- params.primaryAction.text -}}</a>
10
+ {% else %}
11
+ {{ govukButton({
12
+ text: params.primaryAction.text,
13
+ classes: "govuk-button--inverse",
14
+ href: params.primaryAction.href,
15
+ preventDoubleClick: true,
16
+ attributes: params.primaryAction.attributes
17
+ }) }}
18
+ {% endif %}
19
+ {% if params.secondaryAction %}
20
+ {% if params.secondaryAction.style == "button" %}
21
+ {{ govukButton({
22
+ text: params.secondaryAction.text,
23
+ classes: "govuk-button--inverse",
24
+ href: params.secondaryAction.href,
25
+ preventDoubleClick: true,
26
+ attributes: params.secondaryAction.attributes
27
+ }) }}
28
+ {% else %}
29
+ <a class="govuk-link govuk-link--inverse"
30
+ href="{{ params.secondaryAction.href }}">{{- params.secondaryAction.text -}}</a>
31
+ {% endif %}
32
+ {% endif %}
33
+ </div>
34
+ </div>
35
+ </div>
@@ -1,3 +1,3 @@
1
1
  # Table multi-select
2
2
 
3
- - [Guidance](https://design-patterns.service.justice.gov.uk/components/table-multi-select)
3
+ - [Guidance](https://design-patterns.service.justice.gov.uk/components/multi-select/)
@@ -7,7 +7,13 @@ MOJFrontend.MultiSelect = function(options) {
7
7
 
8
8
  this.container.data('moj-multi-select-initialised', true);
9
9
 
10
- this.toggle = $(this.getToggleHtml());
10
+ const idPrefix = options.id_prefix;
11
+ let allId = 'checkboxes-all';
12
+ if (typeof idPrefix !== 'undefined') {
13
+ allId = idPrefix + 'checkboxes-all';
14
+ }
15
+
16
+ this.toggle = $(this.getToggleHtml(allId));
11
17
  this.toggleButton = this.toggle.find('input');
12
18
  this.toggleButton.on('click', $.proxy(this, 'onButtonClick'));
13
19
  this.container.append(this.toggle);
@@ -16,11 +22,11 @@ MOJFrontend.MultiSelect = function(options) {
16
22
  this.checked = options.checked || false;
17
23
  };
18
24
 
19
- MOJFrontend.MultiSelect.prototype.getToggleHtml = function() {
20
- var html = '';
25
+ MOJFrontend.MultiSelect.prototype.getToggleHtml = function (allId) {
26
+ let html = '';
21
27
  html += '<div class="govuk-checkboxes__item govuk-checkboxes--small moj-multi-select__checkbox">';
22
- html += ' <input type="checkbox" class="govuk-checkboxes__input" id="checkboxes-all">';
23
- html += ' <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="checkboxes-all">';
28
+ html += ` <input type="checkbox" class="govuk-checkboxes__input" id="${allId}">`;
29
+ html += ` <label class="govuk-label govuk-checkboxes__label moj-multi-select__toggle-label" for="${allId}">`;
24
30
  html += ' <span class="govuk-visually-hidden">Select all</span>';
25
31
  html += ' </label>';
26
32
  html += '</div>';
@@ -12,9 +12,9 @@
12
12
  <li class="moj-pagination__item moj-pagination__item--dots">…</li>
13
13
  {% else %}
14
14
  {%- if item.selected %}
15
- <li class="moj-pagination__item moj-pagination__item--active" aria-label="Page {{ item.text }} of {{ params.results.count }}" aria-current="page">{{ item.text }}</li>
15
+ <li class="moj-pagination__item moj-pagination__item--active" aria-label="Page {{ item.text }} of {{ params.items | length }}" aria-current="page">{{ item.text }}</li>
16
16
  {% else %}
17
- <li class="moj-pagination__item"><a class="moj-pagination__link" href="{{ item.href }}" aria-label="Page {{ item.text }} of {{ params.results.count }}">{{ item.text }}</a></li>
17
+ <li class="moj-pagination__item"><a class="moj-pagination__link" href="{{ item.href }}" aria-label="Page {{ item.text }} of {{ params.items | length }}">{{ item.text }}</a></li>
18
18
  {% endif -%}
19
19
  {% endif -%}
20
20
  {% endfor -%}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ministryofjustice/frontend",
3
3
  "description": "The MOJ Frontend contains the code you need to start building user interfaces for UK Ministry of Justice government services.",
4
- "version": "3.1.0",
4
+ "version": "3.2.0",
5
5
  "main": "moj/all.js",
6
6
  "sass": "moj/all.scss",
7
7
  "engines": {