PageSourceSearch

https://cedar.carmel.ac.uk/Static/Compiled/cedar.auth.min.js

js carmel.ac.uk collected 2026-10-04 13:34:19 UTC 714,501 bytes, 19,675 lines download raw bytes

vendor: 14,212 bytes, lines 1-2
1/*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e);}("undefined"!=typeof window?window:undefined,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return "function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o);}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return !m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return (t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return !(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return !1;return !0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n);},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:v}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase();});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,y,s,c,v,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return -1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T();},ae=be(function(e){return !0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType;}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t));}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1;}};}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else {if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",");}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0);}finally{s===S&&e.removeAttribute("id");}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return !!e(t)}catch(e){return !1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null;}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t;}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return -1;return e?1:-1}function de(t){return function(e){return "input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return ("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return "form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]));})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return !Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return [o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return [o]}return []}}),b.find.TAG=d.getElementsByTagName?function(e,t){return "undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]");}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:");})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F);}),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return !0;return !1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0);}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return (e.ownerDocument||e)!=C&&T(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return (e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1);}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e);}
vendor: 15,453 bytes, line 2
2else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return "*"===e?function(){return !0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace($," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,y){var v="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===y?function(e){return !!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=v!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(v){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return !1;u=l="only"===h&&!u&&"nextSibling";}return !0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return (d-=y)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i]);}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i));}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return -1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return (t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return !1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return "input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return !1;return !0},parent:function(e){return !b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return "input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return "input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye(function(){return [0]}),last:ye(function(e,t){return [t-1]}),eq:ye(function(e,t,n){return [n<0?n+t:n]}),even:ye(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ye(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ye(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ye(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in {submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return !1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return !0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else {if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return !0}return !1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return !1;return !0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,y,v,e){return y&&!y[S]&&(y=Ce(y)),v&&!v[S]&&(v=Ce(v,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?v||(e?d:l||y)?[]:t:f;if(g&&g(f,p,n,r),y){i=Te(p,u),y(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a));}if(e){if(v||d){if(v){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);v(null,p=[],i,r);}o=p.length;while(o--)(a=p[o])&&-1<(i=v?P(e,a):s[o])&&(e[i]=!(t[i]=a));}}else p=Te(p===t?p.splice(l,p.length):p),v?v(null,t,p,r):H.apply(t,p);})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return -1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else {if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t);}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,y,v,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(y=o,m=0<(v=i).length,x=0<y.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=y[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h);}m&&((o=!s&&o)&&u--,e&&c.push(o));}if(u+=l,m&&l!==u){a=0;while(s=v[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f);}H.apply(r,f),i&&!e&&0<f.length&&1<u+v.length&&se.uniqueSort(r);}return i&&(k=h,w=p),c},m?le(r):r))).selector=e;}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length);}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ve(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return (l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return !0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e);}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return !!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return -1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return !0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return !!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return !t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return (i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return !0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return "Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)};});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r));}catch(e){n.apply(void 0,[e]);}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0;}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1);}r.memory||(t=!1),i=!1,a&&(s=t?[]:"");},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t);});}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--;}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return !s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return !!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return !!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
2nding",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments);});}),i=null;}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r));}},t=s?e:function(){try{e();}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r));}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t));}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M));}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r;},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith;}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i);}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t);},S.readyException=function(e){C.setTimeout(function(){throw e});};var F=S.Deferred();function $(){E.removeEventListener("DOMContentLoaded",$),C.removeEventListener("load",$),S.ready();}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e);}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S]);}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",$),C.addEventListener("load",$));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++;}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]];}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando]);}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i);}catch(e){}Q.set(e,t,n);}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t);},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t);}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0);}return i}return "object"==typeof n?this.each(function(){Q.set(this,n);}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e);});},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e);})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t);},o)),!r&&o&&o.empty.fire();},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n]);})})}}),S.fn.extend({queue:function(t,n){var e=2;return "string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t);})},dequeue:function(e){return this.each(function(){S.dequeue(this,e);})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o]);};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return "none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[];}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return "boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide();})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone
vendor: 14,264 bytes, line 2
2=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",v.option=!!ce.lastChild;var ge={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 ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"));}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,v.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent="";}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o);}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return !0}function Te(){return !1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in "string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n);})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation());}})):void 0===Y.get(e,i)&&S.event.add(e,i,we);}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(e){return "undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0);}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.hasData(e)&&Y.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||S.removeEvent(e,d,y.handle),delete u[d]);}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events");}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o});}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e});}});},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result);}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n);},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0;},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault();},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation();},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation();}},S.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},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(t,e){S.event.special[t]={setup:function(){return Se(this,t,Ce),!1},trigger:function(){return Se(this,t),!0},_default:function(e){return Y.get(e.target,t)},delegateType:e};}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}};}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return !1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t);})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return "true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a));}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!v.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o);});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ye(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ye(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l));}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ye(r)),r.parentNode&&(n&&ie(r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ye(c),r=0,i=(o=ye(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ye(e),a=a||ye(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ye(c,"script")).length&&ve(a,!f&&ye(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0;}n[Q.expando]&&(n[Q.expando]=void 0);}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return B(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e);})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e);})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild);}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this);})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling);})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ye(t,!1)),t.innerHTML=e);t=0;}catch(e){}}t&&this.empty().append(e);},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ye(this)),t&&t.replaceChild(e,this));},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)};});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=/^--/,Me=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ie=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},We=new RegExp(ne.join("|"),"i"),Fe="[\\x20\\t\\r\\n\\f]",$e=new RegExp("^"+Fe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Fe+"+$","g");function Be(e,t,n){var r,i,o,a,s=Re.test(t),u=e.style;return (n=n||Me(e))&&(a=n.getPropertyValue(t)||n[t],s&&(a=a.replace($e,"$1")),""!==a||ie(e)||(a=S.style(e,t)),!v.pixelBoxStyles()&&Pe.test(a)&&We.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return {get:function(){if(!e())return (this.get=t).apply(this,arguments);delete this.get;}}}!function(){function e(){if(l){u.style.cssText="position:absolute;
2left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null;}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(v,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}));}();var ze=["Webkit","Moz","ms"],Ue=E.createElement("div").style,Xe={};function Ve(e){var t=S.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=ze.length;while(n--)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return !r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Me(e),i=(!v.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto";}return (!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"o
2pacity");return ""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Re.test(t),l=e.style;if(u||(t=Ve(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n));}},css:function(e,t,n,r){var i,o,a,s=X(t);return Re.test(t)||(t=Ve(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return !Ge.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):Ie(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Me(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}};}),S.cssHooks.marginLeft=_e(v.reliableMarginLeft,function(e,t){if(t)return (parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je);}),S.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px");},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit);}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now);}},S.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick());}function ut(){return C.setTimeout(function(){tt=void 0;}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem;}),u=function(){if(a)return !1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.o
vendor: 4,788 bytes, line 2
2pts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i;}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t);},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s();}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire();});})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0;}d[r]=y&&y[r]||S.style(e,r);}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l;}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2];})),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=Y.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r]);})),u=ct(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0));}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e);}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue);},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0);};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o);};return "string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i);})},finish:function(a){return !1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish;})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)};}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)};}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0;}
vendor: 16,097 bytes, line 2
2,S.fx.timer=function(e){S.timers.push(e),S.fx.start();},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st());},S.fx.stop=function(){nt=null;},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n);};})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",v.checkOn=""!==rt.value,v.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",v.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return B(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e);})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return "undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n);}}),pt={set:function(e,t,n){return !1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r};});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return (e.match(P)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return B(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e];})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),v.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex);}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this;}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){S(this).addClass(t.call(this,e,vt(this)));}):(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=yt(n),r!==a&&this.setAttribute("class",a);}}):this},removeClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){S(this).removeClass(t.call(this,e,vt(this)));}):arguments.length?(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ");}a=yt(n),r!==a&&this.setAttribute("class",a);}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return m(t)?this.each(function(e){S(this).toggleClass(t.call(this,e,vt(this),n),n);}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=mt(t),this.each(function(){if(s)for(o=S(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=vt(this))&&Y.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Y.get(this,"__className__")||""));}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+yt(vt(n))+" ").indexOf(t))return !0;return !1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t));})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:yt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t);}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},v.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value});}),v.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation();};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=y.call(e,"type")?e.type:e,h=y.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C);}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t);}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this);})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),v.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e));};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1);},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r));}};});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml");}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function jt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):jt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i);});else if(r||"object"!==w(e))i(n,e);else for(t in e)jt(n+"["+t+"]",e[t],r,i);}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n);};if(null==e)return "";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value);});else for(n in e)jt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return {name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Dt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t);}}function $t(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return "string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Bt(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,S.ajaxSettings),t):Bt(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,y=S.ajaxSetup({},t),v=y.context||y,m=y.context&&(v.nodeType||v.jquery)?S(v):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=y.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2]);}t=n[e.toLowerCase()+" "];}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(y.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),y.url=((e||y.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),y.type=t.method||t.type||y.method||y.type,y.dataTypes=(y.dataType||"*").toLowerCase().match(P)||[""],null==y.crossDomain){r=E.createElement("a");try{r.href=y.url,r.href=r.href,y.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host;}catch(e){y.crossDomain=!0;}}if(y.data&&y.processData&&"string"!=typeof y.data&&(y.data=S.param(y.data,y.traditional)),$t(Rt,y,t,T),h)return T;for(i in (g=S.event&&y.global)&&0==S.active++&&S.event.trigger("ajaxStart"),y.type=y.type.toUpperCase(),y.hasContent=!Ot.test(y.type),f=y.url.replace(qt,""),y.hasContent?y.data&&y.processData&&0===(y.contentType||"").indexOf("application/x-www-form-urlencoded")&&(y.data=y.data.replace(Dt,"+")):(o=y.url.slice(f.length),y.data&&(y.processData||"string"==typeof y.data)&&(f+=(Et.test(f)?"&":"?")+y.data,delete y.data),!1===y.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),y.url=f+o),y.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(y.data&&y.hasContent&&!1!==y.contentType||t.contentType)&&T.setRequestHeader("Content-Type",y.contentType),T.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+("*"!==y.dataTypes[0]?", "+It+"; q=0.01":""):y.accepts["*"]),y.headers)T.setRequestHeader(i,y.headers[i]);if(y.beforeSend&&(!1===y.beforeSend.call(v,T,y)||h))return T.abort();if(u="abort",b.add(y.complete),T.done(y.success),T.fail(y.error),c=$t(Mt,y,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,y]),h)return T;y.async&&0<y.timeout&&(d=C.setTimeout(function(){T.abort("timeout");},y.timeout));try{h=!1,c.send(a,l);}catch(e){if(h)throw e;l(-1,e);}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else {for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i);}o=o||a;}if(o)return o!==u[0]&&u.unshift(o),n[o]}(y,T,n)),!i&&-1<S.inArray("script",y.dataTypes)&&S.inArray("json",y.dataTypes)<0&&(y.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t);}catch(e){return {state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return {state:"success",data:t}}(y,s,T,i),i?(y.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===y.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(v,[o,l,T]):x.rejectWith(v,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,y,i?o:a]),b.fireWith(v,[T,l]),g&&(m.trigger("ajaxComplete",[T,y]),--S.active||S.event.trigger("ajaxStop")));}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))};}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"");}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}}
vendor: 4,873 bytes, line 2
2,dataFilter:function(e){S.globalEval(e,t,n);}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e));}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n);})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t);})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes);}),this}}),S.expr.pseudos.hidden=function(e){return !S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return !!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();v.cors=!!zt&&"withCredentials"in zt,v.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(v.cors||zt&&!i.crossDomain)return {send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()));}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a();});},o=o("abort");try{r.send(i.hasContent&&i.data||null);}catch(e){if(o)throw e}},abort:function(){o&&o();}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1);}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET");}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return {send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type);}),E.head.appendChild(r[0]);},abort:function(){i&&i();}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments;},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0;}),"script"}),v.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return "string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o;},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return -1<s&&(r=yt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e);}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e]);});}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"to
2p"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f);}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e);});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else {t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0));}return {top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n;},t,e,arguments.length)};}),S.each(["top","left"],function(e,n){S.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?S(e).position()[n]+"px":t});}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)};});}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)};}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)};});var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0);},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return ("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
3
4/*! jQuery Migrate v3.4.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
5"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window);}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],a=1;a<=3;a++){if(+o[a]<+n[a])return 1;if(+n[a]<+o[a])return -1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.4.1";var t=Object.create(null);s.migrateDisablePatches=function(){for(var e=0;e<arguments.length;e++)t[arguments[e]]=!0;},s.migrateEnablePatches=function(){for(var e=0;e<arguments.length;e++)delete t[arguments[e]];},s.migrateIsPatchEnabled=function(e){return !t[e]}
5,n.console&&n.console.log&&(s&&e("3.0.0")&&!e("5.0.0")||n.console.log("JQMIGRATE: jQuery 3.x-4.x REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var o={};function u(e,t){var r=n.console;!s.migrateIsPatchEnabled(e)||s.migrateDeduplicateWarnings&&o[t]||(o[t]=!0,s.migrateWarnings.push(t+" ["+e+"]"),r&&r.warn&&!s.migrateMute&&(r.warn("JQMIGRATE: "+t),s.migrateTrace&&r.trace&&r.trace()));}function r(e,t,r,n,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n,o),r},set:function(e){u(n,o),r=e;}});}function a(e,t,r,n,o){var a=e[t];e[t]=function(){return o&&u(n,o),(s.migrateIsPatchEnabled(n)?r:a||s.noop).apply(this,arguments)};}function c(e,t,r,n,o){if(!o)throw new Error("No warning message provided");return a(e,t,r,n,o),0}function i(e,t,r,n){return a(e,t,r,n),0}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){o={},s.migrateWarnings.length=0;},"BackCompat"===n.document.compatMode&&u("quirks","jQuery is not compatible with Quirks Mode");var d,l,p,f={},m=s.fn.init,y=s.find,h=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,v=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;for(d in i(s.fn,"init",function(e){var t=Array.prototype.slice.call(arguments);return s.migrateIsPatchEnabled("selector-empty-id")&&"string"==typeof e&&"#"===e&&(u("selector-empty-id","jQuery( '#' ) is not a valid selector"),t[0]=[]),m.apply(this,t)},"selector-empty-id"),s.fn.init.prototype=s.fn,i(s,"find",function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&h.test(t))try{n.document.querySelector(t);}catch(e){t=t.replace(g,function(e,t,r,n){return "["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("selector-hash","Attribute selector with '#' must be quoted: "+r[0]),r[0]=t;}catch(e){u("selector-hash","Attribute selector with '#' was not fixed: "+r[0]);}}return y.apply(this,r)},"selector-hash"),y)Object.prototype.hasOwnProperty.call(y,d)&&(s.find[d]=y[d]);c(s.fn,"size",function(){return this.length},"size","jQuery.fn.size() is deprecated and removed; use the .length property"),c(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"parseJSON","jQuery.parseJSON is deprecated; use JSON.parse"),c(s,"holdReady",s.holdReady,"holdReady","jQuery.holdReady is deprecated"),c(s,"unique",s.uniqueSort,"unique","jQuery.unique is deprecated; use jQuery.uniqueSort"),r(s.expr,"filters",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),r(s.expr,":",s.expr.pseudos,"expr-pre-pseudos","jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&c(s,"trim",function(e){return null==e?"":(e+"").replace(v,"$1")},"trim","jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(c(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"nodeName","jQuery.nodeName is deprecated"),c(s,"isArray",Array.isArray,"isArray","jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(c(s,"isNumeric",function(e){var t=typeof e;return ("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"isNumeric","jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase();}),c(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[Object.prototype.toString.call(e)]||"object":typeof e},"type","jQuery.type is deprecated"),c(s,"isFunction",function(e){return "function"==typeof e},"isFunction","jQuery.isFunction() is deprecated"),c(s,"isWindow",function(e){return null!=e&&e===e.window},"isWindow","jQuery.isWindow() is deprecated")),s.ajax&&(l=s.ajax,p=/(=)\?(?=&|$)|\?\?/,i(s,"ajax",function(){var e=l.apply(this,arguments);return e.promise&&(c(e,"success",e.done,"jqXHR-methods","jQXHR.success is deprecated and removed"),c(e,"error",e.fail,"jqXHR-methods","jQXHR.error is deprecated and removed"),c(e,"complete",e.always,"jqXHR-methods","jQXHR.complete is deprecated and removed")),e},"jqXHR-methods"),e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(p.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&p.test(e.data))&&u("jsonp-promotion","JSON-to-JSONP auto-promotion is deprecated");}));var j=s.fn.removeAttr,b=s.fn.toggleClass,w=/\S+/g;function x(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}i(s.fn,"removeAttr",function(e){var r=this,n=!1;return s.each(e.match(w),function(e,t){s.expr.match.bool.test(t)&&r.each(function(){if(!1!==s(this).prop(t))return !(n=!0)}),n&&(u("removeAttr-bool","jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1));}),j.apply(this,arguments)},"removeAttr-bool"),i(s.fn,"toggleClass",function(t){return void 0!==t&&"boolean"!=typeof t?b.apply(this,arguments):(u("toggleClass-bool","jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"");}))},"toggleClass-bool");var Q,A,R=!1,C=/^[a-z]/,N=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return R=!0,e=r.apply(this,arguments),R=!1,e});}),i(s,"swap",function(e,t,r,n){var o,a,i={};for(a in R||u("swap","jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},"swap"),e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("cssProps","jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),e("4.0.0")?(A={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},"undefined"!=typeof Proxy?s.cssNumber=new Proxy(A,{get:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.get.apply(this,arguments)},set:function(){return u("css-number","jQuery.cssNumber is deprecated"),Reflect.set.apply(this,arguments)}}):s.cssNumber=A):A=s.cssNumber,Q=s.fn.css,i(s.fn,"css",function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t);}),this):("number"==typeof t&&(r=x(e),n=r,C.test(n)&&N.test(n[0].toUpperCase()+n.slice(1))||A[r]||u("css-number",'Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))},"css-number");var S,P,k,H,E=s.data;i(s,"data",function(e,t,r){var n,o,a;if(t&&"object"==typeof t&&2===arguments.length){for(a in n=s.hasData(e)&&E.call(this,e),o={},t)a!==x(a)?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+a),n[a]=t[a]):o[a]=t[a];return E.call(this,e,o),t}return t&&"string"==typeof t&&t!==x(t)&&(n=s.hasData(e)&&E.call(this,e))&&t in n?(u("data-camelCase","jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):E.apply(this,arguments)},"data-camelCase"),s.fx&&(k=s.Tween.prototype.run,H=function(e){return e},i(s.Tween.prototype,"run",function(){1<s.easing[this.easing].length&&(u("easing-one-arg","'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=H),k.apply(this,arguments);},"easing-one-arg"),S=s.fx.interval,P="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u("fx-interval",P),s.migrateIsPatchEnabled("fx-interval")&&void 0===S?13:S},set:function(e){u("fx-interval",P),S=e;}}));var M=s.fn.load,q=s.event.add,O=s.event.fix;s.event.props=[],s.event.fixHooks={}
5,r(s.event.props,"concat",s.event.props.concat,"event-old-patch","jQuery.event.props.concat() is deprecated and removed"),i(s.event,"fix",function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("event-old-patch","jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop());}if(n&&!n._migrated_&&(n._migrated_=!0,u("event-old-patch","jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=O.call(this,e),n&&n.filter?n.filter(t,e):t},"event-old-patch"),i(s.event,"add",function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("load-after-event","jQuery(window).on('load'...) called after load event occurred"),q.apply(this,arguments)},"load-after-event"),s.each(["load","unload","error"],function(e,t){i(s.fn,t,function(){var e=Array.prototype.slice.call(arguments,0);return "load"===t&&"string"==typeof e[0]?M.apply(this,e):(u("shorthand-removed-v3","jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))},"shorthand-removed-v3");}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){c(s.fn,r,function(e,t){return 0<arguments.length?this.on(r,null,e,t):this.trigger(r)},"shorthand-deprecated-v3","jQuery.fn."+r+"() event shorthand is deprecated");}),s(function(){s(n.document).triggerHandler("ready");}),s.event.special.ready={setup:function(){this===n.document&&u("ready-event","'ready' event is deprecated");}},c(s.fn,"bind",function(e,t,r){return this.on(e,null,t,r)},"pre-on-methods","jQuery.fn.bind() is deprecated"),c(s.fn,"unbind",function(e,t){return this.off(e,null,t)},"pre-on-methods","jQuery.fn.unbind() is deprecated"),c(s.fn,"delegate",function(e,t,r,n){return this.on(t,e,r,n)},"pre-on-methods","jQuery.fn.delegate() is deprecated"),c(s.fn,"undelegate",function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},"pre-on-methods","jQuery.fn.undelegate() is deprecated"),c(s.fn,"hover",function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)},"pre-on-methods","jQuery.fn.hover() is deprecated");function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}var F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.migrateEnablePatches("self-closed-tags");},i(s,"htmlPrefilter",function(e){var t,r;return (r=(t=e).replace(F,"<$1></$2>"))!==t&&T(t)!==T(r)&&u("self-closed-tags","HTML tags must be properly nested and closed: "+t),e.replace(F,"<$1></$2>")},"self-closed-tags"),s.migrateDisablePatches("self-closed-tags");var D,W,_,I=s.fn.offset;return i(s.fn,"offset",function(){var e=this[0];return !e||e.nodeType&&e.getBoundingClientRect?I.apply(this,arguments):(u("offset-valid-elem","jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},"offset-valid-elem"),s.ajax&&(D=s.param,i(s,"param",function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("param-ajax-traditional","jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)},"param-ajax-traditional")),c(s.fn,"andSelf",s.fn.addBack,"andSelf","jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),s.Deferred&&(W=s.Deferred,_=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],i(s,"Deferred",function(e){var a=W(),i=a.promise();function t(){var o=arguments;return s.Deferred(function(n){s.each(_,function(e,t){var r="function"==typeof o[e]&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments);});}),o=null;}).promise()}return c(a,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),c(i,"pipe",t,"deferred-pipe","deferred.pipe() is deprecated"),e&&e.call(a,a),a},"deferred-pipe"),s.Deferred.exceptionHook=W.exceptionHook),s});
6
7/*! jQuery UI - v1.13.2 - 2022-07-14
8* http://jqueryui.com
vendor: 4,876 bytes, lines 9-148
9* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
10* Copyright jQuery Foundation and other contributors; Licensed MIT */
11
12( function( factory ) {
13	"use strict";
14	
15	if ( typeof define === "function" && define.amd ) {
16
17		// AMD. Register as an anonymous module.
18		define( [ "jquery" ], factory );
19	} else {
20
21		// Browser globals
22		factory( jQuery );
23	}
24} )( function( $ ) {
25"use strict";
26
27$.ui = $.ui || {};
28
29var version = $.ui.version = "1.13.2";
30
31
32/*!
33 * jQuery UI Widget 1.13.2
34 * http://jqueryui.com
35 *
36 * Copyright jQuery Foundation and other contributors
37 * Released under the MIT license.
38 * http://jquery.org/license
39 */
40
41//>>label: Widget
42//>>group: Core
43//>>description: Provides a factory for creating stateful widgets with a common API.
44//>>docs: http://api.jqueryui.com/jQuery.widget/
45//>>demos: http://jqueryui.com/widget/
46
47
48var widgetUuid = 0;
49var widgetHasOwnProperty = Array.prototype.hasOwnProperty;
50var widgetSlice = Array.prototype.slice;
51
52$.cleanData = ( function( orig ) {
53	return function( elems ) {
54		var events, elem, i;
55		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
56
57			// Only trigger remove when necessary to save time
58			events = $._data( elem, "events" );
59			if ( events && events.remove ) {
60				$( elem ).triggerHandler( "remove" );
61			}
62		}
63		orig( elems );
64	};
65} )( $.cleanData );
66
67$.widget = function( name, base, prototype ) {
68	var existingConstructor, constructor, basePrototype;
69
70	// ProxiedPrototype allows the provided prototype to remain unmodified
71	// so that it can be used as a mixin for multiple widgets (#8876)
72	var proxiedPrototype = {};
73
74	var namespace = name.split( "." )[ 0 ];
75	name = name.split( "." )[ 1 ];
76	var fullName = namespace + "-" + name;
77
78	if ( !prototype ) {
79		prototype = base;
80		base = $.Widget;
81	}
82
83	if ( Array.isArray( prototype ) ) {
84		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
85	}
86
87	// Create selector for plugin
88	$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
89		return !!$.data( elem, fullName );
90	};
91
92	$[ namespace ] = $[ namespace ] || {};
93	existingConstructor = $[ namespace ][ name ];
94	constructor = $[ namespace ][ name ] = function( options, element ) {
95
96		// Allow instantiation without "new" keyword
97		if ( !this || !this._createWidget ) {
98			return new constructor( options, element );
99		}
100
101		// Allow instantiation without initializing for simple inheritance
102		// must use "new" keyword (the code above always passes args)
103		if ( arguments.length ) {
104			this._createWidget( options, element );
105		}
106	};
107
108	// Extend with the existing constructor to carry over any static properties
109	$.extend( constructor, existingConstructor, {
110		version: prototype.version,
111
112		// Copy the object used to create the prototype in case we need to
113		// redefine the widget later
114		_proto: $.extend( {}, prototype ),
115
116		// Track widgets that inherit from this widget in case this widget is
117		// redefined after a widget inherits from it
118		_childConstructors: []
119	} );
120
121	basePrototype = new base();
122
123	// We need to make the options hash a property directly on the new instance
124	// otherwise we'll modify the options hash on the prototype that we're
125	// inheriting from
126	basePrototype.options = $.widget.extend( {}, basePrototype.options );
127	$.each( prototype, function( prop, value ) {
128		if ( typeof value !== "function" ) {
129			proxiedPrototype[ prop ] = value;
130			return;
131		}
132		proxiedPrototype[ prop ] = ( function() {
133			function _super() {
134				return base.prototype[ prop ].apply( this, arguments );
135			}
136
137			function _superApply( args ) {
138				return base.prototype[ prop ].apply( this, args );
139			}
140
141			return function() {
142				var __super = this._super;
143				var __superApply = this._superApply;
144				var returnValue;
145
146				this._super = _super;
147				this._superApply = _superApply;
148
vendor: 32,706 bytes, lines 149-1273
149				returnValue = value.apply( this, arguments );
150
151				this._super = __super;
152				this._superApply = __superApply;
153
154				return returnValue;
155			};
156		} )();
157	} );
158	constructor.prototype = $.widget.extend( basePrototype, {
159
160		// TODO: remove support for widgetEventPrefix
161		// always use the name + a colon as the prefix, e.g., draggable:start
162		// don't prefix for widgets that aren't DOM-based
163		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
164	}, proxiedPrototype, {
165		constructor: constructor,
166		namespace: namespace,
167		widgetName: name,
168		widgetFullName: fullName
169	} );
170
171	// If this widget is being redefined then we need to find all widgets that
172	// are inheriting from it and redefine all of them so that they inherit from
173	// the new version of this widget. We're essentially trying to replace one
174	// level in the prototype chain.
175	if ( existingConstructor ) {
176		$.each( existingConstructor._childConstructors, function( i, child ) {
177			var childPrototype = child.prototype;
178
179			// Redefine the child widget using the same prototype that was
180			// originally used, but inherit from the new version of the base
181			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
182				child._proto );
183		} );
184
185		// Remove the list of existing child constructors from the old constructor
186		// so the old child constructors can be garbage collected
187		delete existingConstructor._childConstructors;
188	} else {
189		base._childConstructors.push( constructor );
190	}
191
192	$.widget.bridge( name, constructor );
193
194	return constructor;
195};
196
197$.widget.extend = function( target ) {
198	var input = widgetSlice.call( arguments, 1 );
199	var inputIndex = 0;
200	var inputLength = input.length;
201	var key;
202	var value;
203
204	for ( ; inputIndex < inputLength; inputIndex++ ) {
205		for ( key in input[ inputIndex ] ) {
206			value = input[ inputIndex ][ key ];
207			if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {
208
209				// Clone objects
210				if ( $.isPlainObject( value ) ) {
211					target[ key ] = $.isPlainObject( target[ key ] ) ?
212						$.widget.extend( {}, target[ key ], value ) :
213
214						// Don't extend strings, arrays, etc. with objects
215						$.widget.extend( {}, value );
216
217				// Copy everything else by reference
218				} else {
219					target[ key ] = value;
220				}
221			}
222		}
223	}
224	return target;
225};
226
227$.widget.bridge = function( name, object ) {
228	var fullName = object.prototype.widgetFullName || name;
229	$.fn[ name ] = function( options ) {
230		var isMethodCall = typeof options === "string";
231		var args = widgetSlice.call( arguments, 1 );
232		var returnValue = this;
233
234		if ( isMethodCall ) {
235
236			// If this is an empty collection, we need to have the instance method
237			// return undefined instead of the jQuery instance
238			if ( !this.length && options === "instance" ) {
239				returnValue = undefined;
240			} else {
241				this.each( function() {
242					var methodValue;
243					var instance = $.data( this, fullName );
244
245					if ( options === "instance" ) {
246						returnValue = instance;
247						return false;
248					}
249
250					if ( !instance ) {
251						return $.error( "cannot call methods on " + name +
252							" prior to initialization; " +
253							"attempted to call method '" + options + "'" );
254					}
255
256					if ( typeof instance[ options ] !== "function" ||
257						options.charAt( 0 ) === "_" ) {
258						return $.error( "no such method '" + options + "' for " + name +
259							" widget instance" );
260					}
261
262					methodValue = instance[ options ].apply( instance, args );
263
264					if ( methodValue !== instance && methodValue !== undefined ) {
265						returnValue = methodValue && methodValue.jquery ?
266							returnValue.pushStack( methodValue.get() ) :
267							methodValue;
268						return false;
269					}
270				} );
271			}
272		} else {
273
274			// Allow multiple hashes to be passed on init
275			if ( args.length ) {
276				options = $.widget.extend.apply( null, [ options ].concat( args ) );
277			}
278
279			this.each( function() {
280				var instance = $.data( this, fullName );
281				if ( instance ) {
282					instance.option( options || {} );
283					if ( instance._init ) {
284						instance._init();
285					}
286				} else {
287					$.data( this, fullName, new object( options, this ) );
288				}
289			} );
290		}
291
292		return returnValue;
293	};
294};
295
296$.Widget = function( /* options, element */ ) {};
297$.Widget._childConstructors = [];
298
299$.Widget.prototype = {
300	widgetName: "widget",
301	widgetEventPrefix: "",
302	defaultElement: "<div>",
303
304	options: {
305		classes: {},
306		disabled: false,
307
308		// Callbacks
309		create: null
310	},
311
312	_createWidget: function( options, element ) {
313		element = $( element || this.defaultElement || this )[ 0 ];
314		this.element = $( element );
315		this.uuid = widgetUuid++;
316		this.eventNamespace = "." + this.widgetName + this.uuid;
317
318		this.bindings = $();
319		this.hoverable = $();
320		this.focusable = $();
321		this.classesElementLookup = {};
322
323		if ( element !== this ) {
324			$.data( element, this.widgetFullName, this );
325			this._on( true, this.element, {
326				remove: function( event ) {
327					if ( event.target === element ) {
328						this.destroy();
329					}
330				}
331			} );
332			this.document = $( element.style ?
333
334				// Element within the document
335				element.ownerDocument :
336
337				// Element is window or document
338				element.document || element );
339			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
340		}
341
342		this.options = $.widget.extend( {},
343			this.options,
344			this._getCreateOptions(),
345			options );
346
347		this._create();
348
349		if ( this.options.disabled ) {
350			this._setOptionDisabled( this.options.disabled );
351		}
352
353		this._trigger( "create", null, this._getCreateEventData() );
354		this._init();
355	},
356
357	_getCreateOptions: function() {
358		return {};
359	},
360
361	_getCreateEventData: $.noop,
362
363	_create: $.noop,
364
365	_init: $.noop,
366
367	destroy: function() {
368		var that = this;
369
370		this._destroy();
371		$.each( this.classesElementLookup, function( key, value ) {
372			that._removeClass( value, key );
373		} );
374
375		// We can probably remove the unbind calls in 2.0
376		// all event bindings should go through this._on()
377		this.element
378			.off( this.eventNamespace )
379			.removeData( this.widgetFullName );
380		this.widget()
381			.off( this.eventNamespace )
382			.removeAttr( "aria-disabled" );
383
384		// Clean up events and states
385		this.bindings.off( this.eventNamespace );
386	},
387
388	_destroy: $.noop,
389
390	widget: function() {
391		return this.element;
392	},
393
394	option: function( key, value ) {
395		var options = key;
396		var parts;
397		var curOption;
398		var i;
399
400		if ( arguments.length === 0 ) {
401
402			// Don't return a reference to the internal hash
403			return $.widget.extend( {}, this.options );
404		}
405
406		if ( typeof key === "string" ) {
407
408			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
409			options = {};
410			parts = key.split( "." );
411			key = parts.shift();
412			if ( parts.length ) {
413				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
414				for ( i = 0; i < parts.length - 1; i++ ) {
415					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
416					curOption = curOption[ parts[ i ] ];
417				}
418				key = parts.pop();
419				if ( arguments.length === 1 ) {
420					return curOption[ key ] === undefined ? null : curOption[ key ];
421				}
422				curOption[ key ] = value;
423			} else {
424				if ( arguments.length === 1 ) {
425					return this.options[ key ] === undefined ? null : this.options[ key ];
426				}
427				options[ key ] = value;
428			}
429		}
430
431		this._setOptions( options );
432
433		return this;
434	},
435
436	_setOptions: function( options ) {
437		var key;
438
439		for ( key in options ) {
440			this._setOption( key, options[ key ] );
441		}
442
443		return this;
444	},
445
446	_setOption: function( key, value ) {
447		if ( key === "classes" ) {
448			this._setOptionClasses( value );
449		}
450
451		this.options[ key ] = value;
452
453		if ( key === "disabled" ) {
454			this._setOptionDisabled( value );
455		}
456
457		return this;
458	},
459
460	_setOptionClasses: function( value ) {
461		var classKey, elements, currentElements;
462
463		for ( classKey in value ) {
464			currentElements = this.classesElementLookup[ classKey ];
465			if ( value[ classKey ] === this.options.classes[ classKey ] ||
466					!currentElements ||
467					!currentElements.length ) {
468				continue;
469			}
470
471			// We are doing this to create a new jQuery object because the _removeClass() call
472			// on the next line is going to destroy the reference to the current elements being
473			// tracked. We need to save a copy of this collection so that we can add the new classes
474			// below.
475			elements = $( currentElements.get() );
476			this._removeClass( currentElements, classKey );
477
478			// We don't use _addClass() here, because that uses this.options.classes
479			// for generating the string of classes. We want to use the value passed in from
480			// _setOption(), this is the new value of the classes option which was passed to
481			// _setOption(). We pass this value directly to _classes().
482			elements.addClass( this._classes( {
483				element: elements,
484				keys: classKey,
485				classes: value,
486				add: true
487			} ) );
488		}
489	},
490
491	_setOptionDisabled: function( value ) {
492		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
493
494		// If the widget is becoming disabled, then nothing is interactive
495		if ( value ) {
496			this._removeClass( this.hoverable, null, "ui-state-hover" );
497			this._removeClass( this.focusable, null, "ui-state-focus" );
498		}
499	},
500
501	enable: function() {
502		return this._setOptions( { disabled: false } );
503	},
504
505	disable: function() {
506		return this._setOptions( { disabled: true } );
507	},
508
509	_classes: function( options ) {
510		var full = [];
511		var that = this;
512
513		options = $.extend( {
514			element: this.element,
515			classes: this.options.classes || {}
516		}, options );
517
518		function bindRemoveEvent() {
519			var nodesToBind = [];
520
521			options.element.each( function( _, element ) {
522				var isTracked = $.map( that.classesElementLookup, function( elements ) {
523					return elements;
524				} )
525					.some( function( elements ) {
526						return elements.is( element );
527					} );
528
529				if ( !isTracked ) {
530					nodesToBind.push( element );
531				}
532			} );
533
534			that._on( $( nodesToBind ), {
535				remove: "_untrackClassesElement"
536			} );
537		}
538
539		function processClassString( classes, checkOption ) {
540			var current, i;
541			for ( i = 0; i < classes.length; i++ ) {
542				current = that.classesElementLookup[ classes[ i ] ] || $();
543				if ( options.add ) {
544					bindRemoveEvent();
545					current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
546				} else {
547					current = $( current.not( options.element ).get() );
548				}
549				that.classesElementLookup[ classes[ i ] ] = current;
550				full.push( classes[ i ] );
551				if ( checkOption && options.classes[ classes[ i ] ] ) {
552					full.push( options.classes[ classes[ i ] ] );
553				}
554			}
555		}
556
557		if ( options.keys ) {
558			processClassString( options.keys.match( /\S+/g ) || [], true );
559		}
560		if ( options.extra ) {
561			processClassString( options.extra.match( /\S+/g ) || [] );
562		}
563
564		return full.join( " " );
565	},
566
567	_untrackClassesElement: function( event ) {
568		var that = this;
569		$.each( that.classesElementLookup, function( key, value ) {
570			if ( $.inArray( event.target, value ) !== -1 ) {
571				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
572			}
573		} );
574
575		this._off( $( event.target ) );
576	},
577
578	_removeClass: function( element, keys, extra ) {
579		return this._toggleClass( element, keys, extra, false );
580	},
581
582	_addClass: function( element, keys, extra ) {
583		return this._toggleClass( element, keys, extra, true );
584	},
585
586	_toggleClass: function( element, keys, extra, add ) {
587		add = ( typeof add === "boolean" ) ? add : extra;
588		var shift = ( typeof element === "string" || element === null ),
589			options = {
590				extra: shift ? keys : extra,
591				keys: shift ? element : keys,
592				element: shift ? this.element : element,
593				add: add
594			};
595		options.element.toggleClass( this._classes( options ), add );
596		return this;
597	},
598
599	_on: function( suppressDisabledCheck, element, handlers ) {
600		var delegateElement;
601		var instance = this;
602
603		// No suppressDisabledCheck flag, shuffle arguments
604		if ( typeof suppressDisabledCheck !== "boolean" ) {
605			handlers = element;
606			element = suppressDisabledCheck;
607			suppressDisabledCheck = false;
608		}
609
610		// No element argument, shuffle and use this.element
611		if ( !handlers ) {
612			handlers = element;
613			element = this.element;
614			delegateElement = this.widget();
615		} else {
616			element = delegateElement = $( element );
617			this.bindings = this.bindings.add( element );
618		}
619
620		$.each( handlers, function( event, handler ) {
621			function handlerProxy() {
622
623				// Allow widgets to customize the disabled handling
624				// - disabled as an array instead of boolean
625				// - disabled class as method for disabling individual parts
626				if ( !suppressDisabledCheck &&
627						( instance.options.disabled === true ||
628						$( this ).hasClass( "ui-state-disabled" ) ) ) {
629					return;
630				}
631				return ( typeof handler === "string" ? instance[ handler ] : handler )
632					.apply( instance, arguments );
633			}
634
635			// Copy the guid so direct unbinding works
636			if ( typeof handler !== "string" ) {
637				handlerProxy.guid = handler.guid =
638					handler.guid || handlerProxy.guid || $.guid++;
639			}
640
641			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
642			var eventName = match[ 1 ] + instance.eventNamespace;
643			var selector = match[ 2 ];
644
645			if ( selector ) {
646				delegateElement.on( eventName, selector, handlerProxy );
647			} else {
648				element.on( eventName, handlerProxy );
649			}
650		} );
651	},
652
653	_off: function( element, eventName ) {
654		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
655			this.eventNamespace;
656		element.off( eventName );
657
658		// Clear the stack to avoid memory leaks (#10056)
659		this.bindings = $( this.bindings.not( element ).get() );
660		this.focusable = $( this.focusable.not( element ).get() );
661		this.hoverable = $( this.hoverable.not( element ).get() );
662	},
663
664	_delay: function( handler, delay ) {
665		function handlerProxy() {
666			return ( typeof handler === "string" ? instance[ handler ] : handler )
667				.apply( instance, arguments );
668		}
669		var instance = this;
670		return setTimeout( handlerProxy, delay || 0 );
671	},
672
673	_hoverable: function( element ) {
674		this.hoverable = this.hoverable.add( element );
675		this._on( element, {
676			mouseenter: function( event ) {
677				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
678			},
679			mouseleave: function( event ) {
680				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
681			}
682		} );
683	},
684
685	_focusable: function( element ) {
686		this.focusable = this.focusable.add( element );
687		this._on( element, {
688			focusin: function( event ) {
689				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
690			},
691			focusout: function( event ) {
692				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
693			}
694		} );
695	},
696
697	_trigger: function( type, event, data ) {
698		var prop, orig;
699		var callback = this.options[ type ];
700
701		data = data || {};
702		event = $.Event( event );
703		event.type = ( type === this.widgetEventPrefix ?
704			type :
705			this.widgetEventPrefix + type ).toLowerCase();
706
707		// The original event may come from any element
708		// so we need to reset the target on the new event
709		event.target = this.element[ 0 ];
710
711		// Copy original event properties over to the new event
712		orig = event.originalEvent;
713		if ( orig ) {
714			for ( prop in orig ) {
715				if ( !( prop in event ) ) {
716					event[ prop ] = orig[ prop ];
717				}
718			}
719		}
720
721		this.element.trigger( event, data );
722		return !( typeof callback === "function" &&
723			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
724			event.isDefaultPrevented() );
725	}
726};
727
728$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
729	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
730		if ( typeof options === "string" ) {
731			options = { effect: options };
732		}
733
734		var hasOptions;
735		var effectName = !options ?
736			method :
737			options === true || typeof options === "number" ?
738				defaultEffect :
739				options.effect || defaultEffect;
740
741		options = options || {};
742		if ( typeof options === "number" ) {
743			options = { duration: options };
744		} else if ( options === true ) {
745			options = {};
746		}
747
748		hasOptions = !$.isEmptyObject( options );
749		options.complete = callback;
750
751		if ( options.delay ) {
752			element.delay( options.delay );
753		}
754
755		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
756			element[ method ]( options );
757		} else if ( effectName !== method && element[ effectName ] ) {
758			element[ effectName ]( options.duration, options.easing, callback );
759		} else {
760			element.queue( function( next ) {
761				$( this )[ method ]();
762				if ( callback ) {
763					callback.call( element[ 0 ] );
764				}
765				next();
766			} );
767		}
768	};
769} );
770
771var widget = $.widget;
772
773
774/*!
775 * jQuery UI Position 1.13.2
776 * http://jqueryui.com
777 *
778 * Copyright jQuery Foundation and other contributors
779 * Released under the MIT license.
780 * http://jquery.org/license
781 *
782 * http://api.jqueryui.com/position/
783 */
784
785//>>label: Position
786//>>group: Core
787//>>description: Positions elements relative to other elements.
788//>>docs: http://api.jqueryui.com/position/
789//>>demos: http://jqueryui.com/position/
790
791
792( function() {
793var cachedScrollbarWidth,
794	max = Math.max,
795	abs = Math.abs,
796	rhorizontal = /left|center|right/,
797	rvertical = /top|center|bottom/,
798	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
799	rposition = /^\w+/,
800	rpercent = /%$/,
801	_position = $.fn.position;
802
803function getOffsets( offsets, width, height ) {
804	return [
805		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
806		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
807	];
808}
809
810function parseCss( element, property ) {
811	return parseInt( $.css( element, property ), 10 ) || 0;
812}
813
814function isWindow( obj ) {
815	return obj != null && obj === obj.window;
816}
817
818function getDimensions( elem ) {
819	var raw = elem[ 0 ];
820	if ( raw.nodeType === 9 ) {
821		return {
822			width: elem.width(),
823			height: elem.height(),
824			offset: { top: 0, left: 0 }
825		};
826	}
827	if ( isWindow( raw ) ) {
828		return {
829			width: elem.width(),
830			height: elem.height(),
831			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
832		};
833	}
834	if ( raw.preventDefault ) {
835		return {
836			width: 0,
837			height: 0,
838			offset: { top: raw.pageY, left: raw.pageX }
839		};
840	}
841	return {
842		width: elem.outerWidth(),
843		height: elem.outerHeight(),
844		offset: elem.offset()
845	};
846}
847
848$.position = {
849	scrollbarWidth: function() {
850		if ( cachedScrollbarWidth !== undefined ) {
851			return cachedScrollbarWidth;
852		}
853		var w1, w2,
854			div = $( "<div style=" +
855				"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" +
856				"<div style='height:300px;width:auto;'></div></div>" ),
857			innerDiv = div.children()[ 0 ];
858
859		$( "body" ).append( div );
860		w1 = innerDiv.offsetWidth;
861		div.css( "overflow", "scroll" );
862
863		w2 = innerDiv.offsetWidth;
864
865		if ( w1 === w2 ) {
866			w2 = div[ 0 ].clientWidth;
867		}
868
869		div.remove();
870
871		return ( cachedScrollbarWidth = w1 - w2 );
872	},
873	getScrollInfo: function( within ) {
874		var overflowX = within.isWindow || within.isDocument ? "" :
875				within.element.css( "overflow-x" ),
876			overflowY = within.isWindow || within.isDocument ? "" :
877				within.element.css( "overflow-y" ),
878			hasOverflowX = overflowX === "scroll" ||
879				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
880			hasOverflowY = overflowY === "scroll" ||
881				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
882		return {
883			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
884			height: hasOverflowX ? $.position.scrollbarWidth() : 0
885		};
886	},
887	getWithinInfo: function( element ) {
888		var withinElement = $( element || window ),
889			isElemWindow = isWindow( withinElement[ 0 ] ),
890			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
891			hasOffset = !isElemWindow && !isDocument;
892		return {
893			element: withinElement,
894			isWindow: isElemWindow,
895			isDocument: isDocument,
896			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
897			scrollLeft: withinElement.scrollLeft(),
898			scrollTop: withinElement.scrollTop(),
899			width: withinElement.outerWidth(),
900			height: withinElement.outerHeight()
901		};
902	}
903};
904
905$.fn.position = function( options ) {
906	if ( !options || !options.of ) {
907		return _position.apply( this, arguments );
908	}
909
910	// Make a copy, we don't want to modify arguments
911	options = $.extend( {}, options );
912
913	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
914
915		// Make sure string options are treated as CSS selectors
916		target = typeof options.of === "string" ?
917			$( document ).find( options.of ) :
918			$( options.of ),
919
920		within = $.position.getWithinInfo( options.within ),
921		scrollInfo = $.position.getScrollInfo( within ),
922		collision = ( options.collision || "flip" ).split( " " ),
923		offsets = {};
924
925	dimensions = getDimensions( target );
926	if ( target[ 0 ].preventDefault ) {
927
928		// Force left top to allow flipping
929		options.at = "left top";
930	}
931	targetWidth = dimensions.width;
932	targetHeight = dimensions.height;
933	targetOffset = dimensions.offset;
934
935	// Clone to reuse original targetOffset later
936	basePosition = $.extend( {}, targetOffset );
937
938	// Force my and at to have valid horizontal and vertical positions
939	// if a value is missing or invalid, it will be converted to center
940	$.each( [ "my", "at" ], function() {
941		var pos = ( options[ this ] || "" ).split( " " ),
942			horizontalOffset,
943			verticalOffset;
944
945		if ( pos.length === 1 ) {
946			pos = rhorizontal.test( pos[ 0 ] ) ?
947				pos.concat( [ "center" ] ) :
948				rvertical.test( pos[ 0 ] ) ?
949					[ "center" ].concat( pos ) :
950					[ "center", "center" ];
951		}
952		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
953		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
954
955		// Calculate offsets
956		horizontalOffset = roffset.exec( pos[ 0 ] );
957		verticalOffset = roffset.exec( pos[ 1 ] );
958		offsets[ this ] = [
959			horizontalOffset ? horizontalOffset[ 0 ] : 0,
960			verticalOffset ? verticalOffset[ 0 ] : 0
961		];
962
963		// Reduce to just the positions without the offsets
964		options[ this ] = [
965			rposition.exec( pos[ 0 ] )[ 0 ],
966			rposition.exec( pos[ 1 ] )[ 0 ]
967		];
968	} );
969
970	// Normalize collision option
971	if ( collision.length === 1 ) {
972		collision[ 1 ] = collision[ 0 ];
973	}
974
975	if ( options.at[ 0 ] === "right" ) {
976		basePosition.left += targetWidth;
977	} else if ( options.at[ 0 ] === "center" ) {
978		basePosition.left += targetWidth / 2;
979	}
980
981	if ( options.at[ 1 ] === "bottom" ) {
982		basePosition.top += targetHeight;
983	} else if ( options.at[ 1 ] === "center" ) {
984		basePosition.top += targetHeight / 2;
985	}
986
987	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
988	basePosition.left += atOffset[ 0 ];
989	basePosition.top += atOffset[ 1 ];
990
991	return this.each( function() {
992		var collisionPosition, using,
993			elem = $( this ),
994			elemWidth = elem.outerWidth(),
995			elemHeight = elem.outerHeight(),
996			marginLeft = parseCss( this, "marginLeft" ),
997			marginTop = parseCss( this, "marginTop" ),
998			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
999				scrollInfo.width,
1000			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
1001				scrollInfo.height,
1002			position = $.extend( {}, basePosition ),
1003			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
1004
1005		if ( options.my[ 0 ] === "right" ) {
1006			position.left -= elemWidth;
1007		} else if ( options.my[ 0 ] === "center" ) {
1008			position.left -= elemWidth / 2;
1009		}
1010
1011		if ( options.my[ 1 ] === "bottom" ) {
1012			position.top -= elemHeight;
1013		} else if ( options.my[ 1 ] === "center" ) {
1014			position.top -= elemHeight / 2;
1015		}
1016
1017		position.left += myOffset[ 0 ];
1018		position.top += myOffset[ 1 ];
1019
1020		collisionPosition = {
1021			marginLeft: marginLeft,
1022			marginTop: marginTop
1023		};
1024
1025		$.each( [ "left", "top" ], function( i, dir ) {
1026			if ( $.ui.position[ collision[ i ] ] ) {
1027				$.ui.position[ collision[ i ] ][ dir ]( position, {
1028					targetWidth: targetWidth,
1029					targetHeight: targetHeight,
1030					elemWidth: elemWidth,
1031					elemHeight: elemHeight,
1032					collisionPosition: collisionPosition,
1033					collisionWidth: collisionWidth,
1034					collisionHeight: collisionHeight,
1035					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
1036					my: options.my,
1037					at: options.at,
1038					within: within,
1039					elem: elem
1040				} );
1041			}
1042		} );
1043
1044		if ( options.using ) {
1045
1046			// Adds feedback as second argument to using callback, if present
1047			using = function( props ) {
1048				var left = targetOffset.left - position.left,
1049					right = left + targetWidth - elemWidth,
1050					top = targetOffset.top - position.top,
1051					bottom = top + targetHeight - elemHeight,
1052					feedback = {
1053						target: {
1054							element: target,
1055							left: targetOffset.left,
1056							top: targetOffset.top,
1057							width: targetWidth,
1058							height: targetHeight
1059						},
1060						element: {
1061							element: elem,
1062							left: position.left,
1063							top: position.top,
1064							width: elemWidth,
1065							height: elemHeight
1066						},
1067						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1068						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1069					};
1070				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1071					feedback.horizontal = "center";
1072				}
1073				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1074					feedback.vertical = "middle";
1075				}
1076				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1077					feedback.important = "horizontal";
1078				} else {
1079					feedback.important = "vertical";
1080				}
1081				options.using.call( this, props, feedback );
1082			};
1083		}
1084
1085		elem.offset( $.extend( position, { using: using } ) );
1086	} );
1087};
1088
1089$.ui.position = {
1090	fit: {
1091		left: function( position, data ) {
1092			var within = data.within,
1093				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1094				outerWidth = within.width,
1095				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1096				overLeft = withinOffset - collisionPosLeft,
1097				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1098				newOverRight;
1099
1100			// Element is wider than within
1101			if ( data.collisionWidth > outerWidth ) {
1102
1103				// Element is initially over the left side of within
1104				if ( overLeft > 0 && overRight <= 0 ) {
1105					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
1106						withinOffset;
1107					position.left += overLeft - newOverRight;
1108
1109				// Element is initially over right side of within
1110				} else if ( overRight > 0 && overLeft <= 0 ) {
1111					position.left = withinOffset;
1112
1113				// Element is initially over both left and right sides of within
1114				} else {
1115					if ( overLeft > overRight ) {
1116						position.left = withinOffset + outerWidth - data.collisionWidth;
1117					} else {
1118						position.left = withinOffset;
1119					}
1120				}
1121
1122			// Too far left -> align with left edge
1123			} else if ( overLeft > 0 ) {
1124				position.left += overLeft;
1125
1126			// Too far right -> align with right edge
1127			} else if ( overRight > 0 ) {
1128				position.left -= overRight;
1129
1130			// Adjust based on position and margin
1131			} else {
1132				position.left = max( position.left - collisionPosLeft, position.left );
1133			}
1134		},
1135		top: function( position, data ) {
1136			var within = data.within,
1137				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1138				outerHeight = data.within.height,
1139				collisionPosTop = position.top - data.collisionPosition.marginTop,
1140				overTop = withinOffset - collisionPosTop,
1141				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1142				newOverBottom;
1143
1144			// Element is taller than within
1145			if ( data.collisionHeight > outerHeight ) {
1146
1147				// Element is initially over the top of within
1148				if ( overTop > 0 && overBottom <= 0 ) {
1149					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
1150						withinOffset;
1151					position.top += overTop - newOverBottom;
1152
1153				// Element is initially over bottom of within
1154				} else if ( overBottom > 0 && overTop <= 0 ) {
1155					position.top = withinOffset;
1156
1157				// Element is initially over both top and bottom of within
1158				} else {
1159					if ( overTop > overBottom ) {
1160						position.top = withinOffset + outerHeight - data.collisionHeight;
1161					} else {
1162						position.top = withinOffset;
1163					}
1164				}
1165
1166			// Too far up -> align with top
1167			} else if ( overTop > 0 ) {
1168				position.top += overTop;
1169
1170			// Too far down -> align with bottom edge
1171			} else if ( overBottom > 0 ) {
1172				position.top -= overBottom;
1173
1174			// Adjust based on position and margin
1175			} else {
1176				position.top = max( position.top - collisionPosTop, position.top );
1177			}
1178		}
1179	},
1180	flip: {
1181		left: function( position, data ) {
1182			var within = data.within,
1183				withinOffset = within.offset.left + within.scrollLeft,
1184				outerWidth = within.width,
1185				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1186				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1187				overLeft = collisionPosLeft - offsetLeft,
1188				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1189				myOffset = data.my[ 0 ] === "left" ?
1190					-data.elemWidth :
1191					data.my[ 0 ] === "right" ?
1192						data.elemWidth :
1193						0,
1194				atOffset = data.at[ 0 ] === "left" ?
1195					data.targetWidth :
1196					data.at[ 0 ] === "right" ?
1197						-data.targetWidth :
1198						0,
1199				offset = -2 * data.offset[ 0 ],
1200				newOverRight,
1201				newOverLeft;
1202
1203			if ( overLeft < 0 ) {
1204				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
1205					outerWidth - withinOffset;
1206				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1207					position.left += myOffset + atOffset + offset;
1208				}
1209			} else if ( overRight > 0 ) {
1210				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
1211					atOffset + offset - offsetLeft;
1212				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1213					position.left += myOffset + atOffset + offset;
1214				}
1215			}
1216		},
1217		top: function( position, data ) {
1218			var within = data.within,
1219				withinOffset = within.offset.top + within.scrollTop,
1220				outerHeight = within.height,
1221				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1222				collisionPosTop = position.top - data.collisionPosition.marginTop,
1223				overTop = collisionPosTop - offsetTop,
1224				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1225				top = data.my[ 1 ] === "top",
1226				myOffset = top ?
1227					-data.elemHeight :
1228					data.my[ 1 ] === "bottom" ?
1229						data.elemHeight :
1230						0,
1231				atOffset = data.at[ 1 ] === "top" ?
1232					data.targetHeight :
1233					data.at[ 1 ] === "bottom" ?
1234						-data.targetHeight :
1235						0,
1236				offset = -2 * data.offset[ 1 ],
1237				newOverTop,
1238				newOverBottom;
1239			if ( overTop < 0 ) {
1240				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
1241					outerHeight - withinOffset;
1242				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
1243					position.top += myOffset + atOffset + offset;
1244				}
1245			} else if ( overBottom > 0 ) {
1246				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
1247					offset - offsetTop;
1248				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
1249					position.top += myOffset + atOffset + offset;
1250				}
1251			}
1252		}
1253	},
1254	flipfit: {
1255		left: function() {
1256			$.ui.position.flip.left.apply( this, arguments );
1257			$.ui.position.fit.left.apply( this, arguments );
1258		},
1259		top: function() {
1260			$.ui.position.flip.top.apply( this, arguments );
1261			$.ui.position.fit.top.apply( this, arguments );
1262		}
1263	}
1264};
1265
1266} )();
1267
1268var position = $.ui.position;
1269
1270
1271/*!
1272 * jQuery UI :data 1.13.2
1273 * http://jqueryui.com
vendor: 29,600 bytes, lines 1274-2427
1274 *
1275 * Copyright jQuery Foundation and other contributors
1276 * Released under the MIT license.
1277 * http://jquery.org/license
1278 */
1279
1280//>>label: :data Selector
1281//>>group: Core
1282//>>description: Selects elements which have data stored under the specified key.
1283//>>docs: http://api.jqueryui.com/data-selector/
1284
1285
1286var data = $.extend( $.expr.pseudos, {
1287	data: $.expr.createPseudo ?
1288		$.expr.createPseudo( function( dataName ) {
1289			return function( elem ) {
1290				return !!$.data( elem, dataName );
1291			};
1292		} ) :
1293
1294		// Support: jQuery <1.8
1295		function( elem, i, match ) {
1296			return !!$.data( elem, match[ 3 ] );
1297		}
1298} );
1299
1300/*!
1301 * jQuery UI Disable Selection 1.13.2
1302 * http://jqueryui.com
1303 *
1304 * Copyright jQuery Foundation and other contributors
1305 * Released under the MIT license.
1306 * http://jquery.org/license
1307 */
1308
1309//>>label: disableSelection
1310//>>group: Core
1311//>>description: Disable selection of text content within the set of matched elements.
1312//>>docs: http://api.jqueryui.com/disableSelection/
1313
1314// This file is deprecated
1315
1316var disableSelection = $.fn.extend( {
1317	disableSelection: ( function() {
1318		var eventType = "onselectstart" in document.createElement( "div" ) ?
1319			"selectstart" :
1320			"mousedown";
1321
1322		return function() {
1323			return this.on( eventType + ".ui-disableSelection", function( event ) {
1324				event.preventDefault();
1325			} );
1326		};
1327	} )(),
1328
1329	enableSelection: function() {
1330		return this.off( ".ui-disableSelection" );
1331	}
1332} );
1333
1334
1335
1336// Create a local jQuery because jQuery Color relies on it and the
1337// global may not exist with AMD and a custom build (#10199).
1338// This module is a noop if used as a regular AMD module.
1339// eslint-disable-next-line no-unused-vars
1340var jQuery = $;
1341
1342
1343/*!
1344 * jQuery Color Animations v2.2.0
1345 * https://github.com/jquery/jquery-color
1346 *
1347 * Copyright OpenJS Foundation and other contributors
1348 * Released under the MIT license.
1349 * http://jquery.org/license
1350 *
1351 * Date: Sun May 10 09:02:36 2020 +0200
1352 */
1353
1354
1355
1356	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
1357		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
1358
1359	class2type = {},
1360	toString = class2type.toString,
1361
1362	// plusequals test for += 100 -= 100
1363	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
1364
1365	// a set of RE's that can match strings and generate color tuples.
1366	stringParsers = [ {
1367			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
1368			parse: function( execResult ) {
1369				return [
1370					execResult[ 1 ],
1371					execResult[ 2 ],
1372					execResult[ 3 ],
1373					execResult[ 4 ]
1374				];
1375			}
1376		}, {
1377			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
1378			parse: function( execResult ) {
1379				return [
1380					execResult[ 1 ] * 2.55,
1381					execResult[ 2 ] * 2.55,
1382					execResult[ 3 ] * 2.55,
1383					execResult[ 4 ]
1384				];
1385			}
1386		}, {
1387
1388			// this regex ignores A-F because it's compared against an already lowercased string
1389			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
1390			parse: function( execResult ) {
1391				return [
1392					parseInt( execResult[ 1 ], 16 ),
1393					parseInt( execResult[ 2 ], 16 ),
1394					parseInt( execResult[ 3 ], 16 ),
1395					execResult[ 4 ] ?
1396						( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
1397						1
1398				];
1399			}
1400		}, {
1401
1402			// this regex ignores A-F because it's compared against an already lowercased string
1403			re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
1404			parse: function( execResult ) {
1405				return [
1406					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
1407					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
1408					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
1409					execResult[ 4 ] ?
1410						( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
1411							.toFixed( 2 ) :
1412						1
1413				];
1414			}
1415		}, {
1416			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
1417			space: "hsla",
1418			parse: function( execResult ) {
1419				return [
1420					execResult[ 1 ],
1421					execResult[ 2 ] / 100,
1422					execResult[ 3 ] / 100,
1423					execResult[ 4 ]
1424				];
1425			}
1426		} ],
1427
1428	// jQuery.Color( )
1429	color = jQuery.Color = function( color, green, blue, alpha ) {
1430		return new jQuery.Color.fn.parse( color, green, blue, alpha );
1431	},
1432	spaces = {
1433		rgba: {
1434			props: {
1435				red: {
1436					idx: 0,
1437					type: "byte"
1438				},
1439				green: {
1440					idx: 1,
1441					type: "byte"
1442				},
1443				blue: {
1444					idx: 2,
1445					type: "byte"
1446				}
1447			}
1448		},
1449
1450		hsla: {
1451			props: {
1452				hue: {
1453					idx: 0,
1454					type: "degrees"
1455				},
1456				saturation: {
1457					idx: 1,
1458					type: "percent"
1459				},
1460				lightness: {
1461					idx: 2,
1462					type: "percent"
1463				}
1464			}
1465		}
1466	},
1467	propTypes = {
1468		"byte": {
1469			floor: true,
1470			max: 255
1471		},
1472		"percent": {
1473			max: 1
1474		},
1475		"degrees": {
1476			mod: 360,
1477			floor: true
1478		}
1479	},
1480	support = color.support = {},
1481
1482	// element for support tests
1483	supportElem = jQuery( "<p>" )[ 0 ],
1484
1485	// colors = jQuery.Color.names
1486	colors,
1487
1488	// local aliases of functions called often
1489	each = jQuery.each;
1490
1491// determine rgba support immediately
1492supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
1493support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
1494
1495// define cache name and alpha properties
1496// for rgba and hsla spaces
1497each( spaces, function( spaceName, space ) {
1498	space.cache = "_" + spaceName;
1499	space.props.alpha = {
1500		idx: 3,
1501		type: "percent",
1502		def: 1
1503	};
1504} );
1505
1506// Populate the class2type map
1507jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
1508	function( _i, name ) {
1509		class2type[ "[object " + name + "]" ] = name.toLowerCase();
1510	} );
1511
1512function getType( obj ) {
1513	if ( obj == null ) {
1514		return obj + "";
1515	}
1516
1517	return typeof obj === "object" ?
1518		class2type[ toString.call( obj ) ] || "object" :
1519		typeof obj;
1520}
1521
1522function clamp( value, prop, allowEmpty ) {
1523	var type = propTypes[ prop.type ] || {};
1524
1525	if ( value == null ) {
1526		return ( allowEmpty || !prop.def ) ? null : prop.def;
1527	}
1528
1529	// ~~ is an short way of doing floor for positive numbers
1530	value = type.floor ? ~~value : parseFloat( value );
1531
1532	// IE will pass in empty strings as value for alpha,
1533	// which will hit this case
1534	if ( isNaN( value ) ) {
1535		return prop.def;
1536	}
1537
1538	if ( type.mod ) {
1539
1540		// we add mod before modding to make sure that negatives values
1541		// get converted properly: -10 -> 350
1542		return ( value + type.mod ) % type.mod;
1543	}
1544
1545	// for now all property types without mod have min and max
1546	return Math.min( type.max, Math.max( 0, value ) );
1547}
1548
1549function stringParse( string ) {
1550	var inst = color(),
1551		rgba = inst._rgba = [];
1552
1553	string = string.toLowerCase();
1554
1555	each( stringParsers, function( _i, parser ) {
1556		var parsed,
1557			match = parser.re.exec( string ),
1558			values = match && parser.parse( match ),
1559			spaceName = parser.space || "rgba";
1560
1561		if ( values ) {
1562			parsed = inst[ spaceName ]( values );
1563
1564			// if this was an rgba parse the assignment might happen twice
1565			// oh well....
1566			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
1567			rgba = inst._rgba = parsed._rgba;
1568
1569			// exit each( stringParsers ) here because we matched
1570			return false;
1571		}
1572	} );
1573
1574	// Found a stringParser that handled it
1575	if ( rgba.length ) {
1576
1577		// if this came from a parsed string, force "transparent" when alpha is 0
1578		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
1579		if ( rgba.join() === "0,0,0,0" ) {
1580			jQuery.extend( rgba, colors.transparent );
1581		}
1582		return inst;
1583	}
1584
1585	// named colors
1586	return colors[ string ];
1587}
1588
1589color.fn = jQuery.extend( color.prototype, {
1590	parse: function( red, green, blue, alpha ) {
1591		if ( red === undefined ) {
1592			this._rgba = [ null, null, null, null ];
1593			return this;
1594		}
1595		if ( red.jquery || red.nodeType ) {
1596			red = jQuery( red ).css( green );
1597			green = undefined;
1598		}
1599
1600		var inst = this,
1601			type = getType( red ),
1602			rgba = this._rgba = [];
1603
1604		// more than 1 argument specified - assume ( red, green, blue, alpha )
1605		if ( green !== undefined ) {
1606			red = [ red, green, blue, alpha ];
1607			type = "array";
1608		}
1609
1610		if ( type === "string" ) {
1611			return this.parse( stringParse( red ) || colors._default );
1612		}
1613
1614		if ( type === "array" ) {
1615			each( spaces.rgba.props, function( _key, prop ) {
1616				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
1617			} );
1618			return this;
1619		}
1620
1621		if ( type === "object" ) {
1622			if ( red instanceof color ) {
1623				each( spaces, function( _spaceName, space ) {
1624					if ( red[ space.cache ] ) {
1625						inst[ space.cache ] = red[ space.cache ].slice();
1626					}
1627				} );
1628			} else {
1629				each( spaces, function( _spaceName, space ) {
1630					var cache = space.cache;
1631					each( space.props, function( key, prop ) {
1632
1633						// if the cache doesn't exist, and we know how to convert
1634						if ( !inst[ cache ] && space.to ) {
1635
1636							// if the value was null, we don't need to copy it
1637							// if the key was alpha, we don't need to copy it either
1638							if ( key === "alpha" || red[ key ] == null ) {
1639								return;
1640							}
1641							inst[ cache ] = space.to( inst._rgba );
1642						}
1643
1644						// this is the only case where we allow nulls for ALL properties.
1645						// call clamp with alwaysAllowEmpty
1646						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
1647					} );
1648
1649					// everything defined but alpha?
1650					if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
1651
1652						// use the default of 1
1653						if ( inst[ cache ][ 3 ] == null ) {
1654							inst[ cache ][ 3 ] = 1;
1655						}
1656
1657						if ( space.from ) {
1658							inst._rgba = space.from( inst[ cache ] );
1659						}
1660					}
1661				} );
1662			}
1663			return this;
1664		}
1665	},
1666	is: function( compare ) {
1667		var is = color( compare ),
1668			same = true,
1669			inst = this;
1670
1671		each( spaces, function( _, space ) {
1672			var localCache,
1673				isCache = is[ space.cache ];
1674			if ( isCache ) {
1675				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
1676				each( space.props, function( _, prop ) {
1677					if ( isCache[ prop.idx ] != null ) {
1678						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
1679						return same;
1680					}
1681				} );
1682			}
1683			return same;
1684		} );
1685		return same;
1686	},
1687	_space: function() {
1688		var used = [],
1689			inst = this;
1690		each( spaces, function( spaceName, space ) {
1691			if ( inst[ space.cache ] ) {
1692				used.push( spaceName );
1693			}
1694		} );
1695		return used.pop();
1696	},
1697	transition: function( other, distance ) {
1698		var end = color( other ),
1699			spaceName = end._space(),
1700			space = spaces[ spaceName ],
1701			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
1702			start = startColor[ space.cache ] || space.to( startColor._rgba ),
1703			result = start.slice();
1704
1705		end = end[ space.cache ];
1706		each( space.props, function( _key, prop ) {
1707			var index = prop.idx,
1708				startValue = start[ index ],
1709				endValue = end[ index ],
1710				type = propTypes[ prop.type ] || {};
1711
1712			// if null, don't override start value
1713			if ( endValue === null ) {
1714				return;
1715			}
1716
1717			// if null - use end
1718			if ( startValue === null ) {
1719				result[ index ] = endValue;
1720			} else {
1721				if ( type.mod ) {
1722					if ( endValue - startValue > type.mod / 2 ) {
1723						startValue += type.mod;
1724					} else if ( startValue - endValue > type.mod / 2 ) {
1725						startValue -= type.mod;
1726					}
1727				}
1728				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
1729			}
1730		} );
1731		return this[ spaceName ]( result );
1732	},
1733	blend: function( opaque ) {
1734
1735		// if we are already opaque - return ourself
1736		if ( this._rgba[ 3 ] === 1 ) {
1737			return this;
1738		}
1739
1740		var rgb = this._rgba.slice(),
1741			a = rgb.pop(),
1742			blend = color( opaque )._rgba;
1743
1744		return color( jQuery.map( rgb, function( v, i ) {
1745			return ( 1 - a ) * blend[ i ] + a * v;
1746		} ) );
1747	},
1748	toRgbaString: function() {
1749		var prefix = "rgba(",
1750			rgba = jQuery.map( this._rgba, function( v, i ) {
1751				if ( v != null ) {
1752					return v;
1753				}
1754				return i > 2 ? 1 : 0;
1755			} );
1756
1757		if ( rgba[ 3 ] === 1 ) {
1758			rgba.pop();
1759			prefix = "rgb(";
1760		}
1761
1762		return prefix + rgba.join() + ")";
1763	},
1764	toHslaString: function() {
1765		var prefix = "hsla(",
1766			hsla = jQuery.map( this.hsla(), function( v, i ) {
1767				if ( v == null ) {
1768					v = i > 2 ? 1 : 0;
1769				}
1770
1771				// catch 1 and 2
1772				if ( i && i < 3 ) {
1773					v = Math.round( v * 100 ) + "%";
1774				}
1775				return v;
1776			} );
1777
1778		if ( hsla[ 3 ] === 1 ) {
1779			hsla.pop();
1780			prefix = "hsl(";
1781		}
1782		return prefix + hsla.join() + ")";
1783	},
1784	toHexString: function( includeAlpha ) {
1785		var rgba = this._rgba.slice(),
1786			alpha = rgba.pop();
1787
1788		if ( includeAlpha ) {
1789			rgba.push( ~~( alpha * 255 ) );
1790		}
1791
1792		return "#" + jQuery.map( rgba, function( v ) {
1793
1794			// default to 0 when nulls exist
1795			v = ( v || 0 ).toString( 16 );
1796			return v.length === 1 ? "0" + v : v;
1797		} ).join( "" );
1798	},
1799	toString: function() {
1800		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
1801	}
1802} );
1803color.fn.parse.prototype = color.fn;
1804
1805// hsla conversions adapted from:
1806// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
1807
1808function hue2rgb( p, q, h ) {
1809	h = ( h + 1 ) % 1;
1810	if ( h * 6 < 1 ) {
1811		return p + ( q - p ) * h * 6;
1812	}
1813	if ( h * 2 < 1 ) {
1814		return q;
1815	}
1816	if ( h * 3 < 2 ) {
1817		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
1818	}
1819	return p;
1820}
1821
1822spaces.hsla.to = function( rgba ) {
1823	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
1824		return [ null, null, null, rgba[ 3 ] ];
1825	}
1826	var r = rgba[ 0 ] / 255,
1827		g = rgba[ 1 ] / 255,
1828		b = rgba[ 2 ] / 255,
1829		a = rgba[ 3 ],
1830		max = Math.max( r, g, b ),
1831		min = Math.min( r, g, b ),
1832		diff = max - min,
1833		add = max + min,
1834		l = add * 0.5,
1835		h, s;
1836
1837	if ( min === max ) {
1838		h = 0;
1839	} else if ( r === max ) {
1840		h = ( 60 * ( g - b ) / diff ) + 360;
1841	} else if ( g === max ) {
1842		h = ( 60 * ( b - r ) / diff ) + 120;
1843	} else {
1844		h = ( 60 * ( r - g ) / diff ) + 240;
1845	}
1846
1847	// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
1848	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
1849	if ( diff === 0 ) {
1850		s = 0;
1851	} else if ( l <= 0.5 ) {
1852		s = diff / add;
1853	} else {
1854		s = diff / ( 2 - add );
1855	}
1856	return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
1857};
1858
1859spaces.hsla.from = function( hsla ) {
1860	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
1861		return [ null, null, null, hsla[ 3 ] ];
1862	}
1863	var h = hsla[ 0 ] / 360,
1864		s = hsla[ 1 ],
1865		l = hsla[ 2 ],
1866		a = hsla[ 3 ],
1867		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
1868		p = 2 * l - q;
1869
1870	return [
1871		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
1872		Math.round( hue2rgb( p, q, h ) * 255 ),
1873		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
1874		a
1875	];
1876};
1877
1878
1879each( spaces, function( spaceName, space ) {
1880	var props = space.props,
1881		cache = space.cache,
1882		to = space.to,
1883		from = space.from;
1884
1885	// makes rgba() and hsla()
1886	color.fn[ spaceName ] = function( value ) {
1887
1888		// generate a cache for this space if it doesn't exist
1889		if ( to && !this[ cache ] ) {
1890			this[ cache ] = to( this._rgba );
1891		}
1892		if ( value === undefined ) {
1893			return this[ cache ].slice();
1894		}
1895
1896		var ret,
1897			type = getType( value ),
1898			arr = ( type === "array" || type === "object" ) ? value : arguments,
1899			local = this[ cache ].slice();
1900
1901		each( props, function( key, prop ) {
1902			var val = arr[ type === "object" ? key : prop.idx ];
1903			if ( val == null ) {
1904				val = local[ prop.idx ];
1905			}
1906			local[ prop.idx ] = clamp( val, prop );
1907		} );
1908
1909		if ( from ) {
1910			ret = color( from( local ) );
1911			ret[ cache ] = local;
1912			return ret;
1913		} else {
1914			return color( local );
1915		}
1916	};
1917
1918	// makes red() green() blue() alpha() hue() saturation() lightness()
1919	each( props, function( key, prop ) {
1920
1921		// alpha is included in more than one space
1922		if ( color.fn[ key ] ) {
1923			return;
1924		}
1925		color.fn[ key ] = function( value ) {
1926			var local, cur, match, fn,
1927				vtype = getType( value );
1928
1929			if ( key === "alpha" ) {
1930				fn = this._hsla ? "hsla" : "rgba";
1931			} else {
1932				fn = spaceName;
1933			}
1934			local = this[ fn ]();
1935			cur = local[ prop.idx ];
1936
1937			if ( vtype === "undefined" ) {
1938				return cur;
1939			}
1940
1941			if ( vtype === "function" ) {
1942				value = value.call( this, cur );
1943				vtype = getType( value );
1944			}
1945			if ( value == null && prop.empty ) {
1946				return this;
1947			}
1948			if ( vtype === "string" ) {
1949				match = rplusequals.exec( value );
1950				if ( match ) {
1951					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
1952				}
1953			}
1954			local[ prop.idx ] = value;
1955			return this[ fn ]( local );
1956		};
1957	} );
1958} );
1959
1960// add cssHook and .fx.step function for each named hook.
1961// accept a space separated string of properties
1962color.hook = function( hook ) {
1963	var hooks = hook.split( " " );
1964	each( hooks, function( _i, hook ) {
1965		jQuery.cssHooks[ hook ] = {
1966			set: function( elem, value ) {
1967				var parsed, curElem,
1968					backgroundColor = "";
1969
1970				if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
1971					value = color( parsed || value );
1972					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
1973						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
1974						while (
1975							( backgroundColor === "" || backgroundColor === "transparent" ) &&
1976							curElem && curElem.style
1977						) {
1978							try {
1979								backgroundColor = jQuery.css( curElem, "backgroundColor" );
1980								curElem = curElem.parentNode;
1981							} catch ( e ) {
1982							}
1983						}
1984
1985						value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
1986							backgroundColor :
1987							"_default" );
1988					}
1989
1990					value = value.toRgbaString();
1991				}
1992				try {
1993					elem.style[ hook ] = value;
1994				} catch ( e ) {
1995
1996					// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
1997				}
1998			}
1999		};
2000		jQuery.fx.step[ hook ] = function( fx ) {
2001			if ( !fx.colorInit ) {
2002				fx.start = color( fx.elem, hook );
2003				fx.end = color( fx.end );
2004				fx.colorInit = true;
2005			}
2006			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
2007		};
2008	} );
2009
2010};
2011
2012color.hook( stepHooks );
2013
2014jQuery.cssHooks.borderColor = {
2015	expand: function( value ) {
2016		var expanded = {};
2017
2018		each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
2019			expanded[ "border" + part + "Color" ] = value;
2020		} );
2021		return expanded;
2022	}
2023};
2024
2025// Basic color names only.
2026// Usage of any of the other color names requires adding yourself or including
2027// jquery.color.svg-names.js.
2028colors = jQuery.Color.names = {
2029
2030	// 4.1. Basic color keywords
2031	aqua: "#00ffff",
2032	black: "#000000",
2033	blue: "#0000ff",
2034	fuchsia: "#ff00ff",
2035	gray: "#808080",
2036	green: "#008000",
2037	lime: "#00ff00",
2038	maroon: "#800000",
2039	navy: "#000080",
2040	olive: "#808000",
2041	purple: "#800080",
2042	red: "#ff0000",
2043	silver: "#c0c0c0",
2044	teal: "#008080",
2045	white: "#ffffff",
2046	yellow: "#ffff00",
2047
2048	// 4.2.3. "transparent" color keyword
2049	transparent: [ null, null, null, 0 ],
2050
2051	_default: "#ffffff"
2052};
2053
2054
2055/*!
2056 * jQuery UI Effects 1.13.2
2057 * http://jqueryui.com
2058 *
2059 * Copyright jQuery Foundation and other contributors
2060 * Released under the MIT license.
2061 * http://jquery.org/license
2062 */
2063
2064//>>label: Effects Core
2065//>>group: Effects
2066/* eslint-disable max-len */
2067//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
2068/* eslint-enable max-len */
2069//>>docs: http://api.jqueryui.com/category/effects-core/
2070//>>demos: http://jqueryui.com/effect/
2071
2072
2073var dataSpace = "ui-effects-",
2074	dataSpaceStyle = "ui-effects-style",
2075	dataSpaceAnimated = "ui-effects-animated";
2076
2077$.effects = {
2078	effect: {}
2079};
2080
2081/******************************************************************************/
2082/****************************** CLASS ANIMATIONS ******************************/
2083/******************************************************************************/
2084( function() {
2085
2086var classAnimationActions = [ "add", "remove", "toggle" ],
2087	shorthandStyles = {
2088		border: 1,
2089		borderBottom: 1,
2090		borderColor: 1,
2091		borderLeft: 1,
2092		borderRight: 1,
2093		borderTop: 1,
2094		borderWidth: 1,
2095		margin: 1,
2096		padding: 1
2097	};
2098
2099$.each(
2100	[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
2101	function( _, prop ) {
2102		$.fx.step[ prop ] = function( fx ) {
2103			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
2104				jQuery.style( fx.elem, prop, fx.end );
2105				fx.setAttr = true;
2106			}
2107		};
2108	}
2109);
2110
2111function camelCase( string ) {
2112	return string.replace( /-([\da-z])/gi, function( all, letter ) {
2113		return letter.toUpperCase();
2114	} );
2115}
2116
2117function getElementStyles( elem ) {
2118	var key, len,
2119		style = elem.ownerDocument.defaultView ?
2120			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
2121			elem.currentStyle,
2122		styles = {};
2123
2124	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
2125		len = style.length;
2126		while ( len-- ) {
2127			key = style[ len ];
2128			if ( typeof style[ key ] === "string" ) {
2129				styles[ camelCase( key ) ] = style[ key ];
2130			}
2131		}
2132
2133	// Support: Opera, IE <9
2134	} else {
2135		for ( key in style ) {
2136			if ( typeof style[ key ] === "string" ) {
2137				styles[ key ] = style[ key ];
2138			}
2139		}
2140	}
2141
2142	return styles;
2143}
2144
2145function styleDifference( oldStyle, newStyle ) {
2146	var diff = {},
2147		name, value;
2148
2149	for ( name in newStyle ) {
2150		value = newStyle[ name ];
2151		if ( oldStyle[ name ] !== value ) {
2152			if ( !shorthandStyles[ name ] ) {
2153				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
2154					diff[ name ] = value;
2155				}
2156			}
2157		}
2158	}
2159
2160	return diff;
2161}
2162
2163// Support: jQuery <1.8
2164if ( !$.fn.addBack ) {
2165	$.fn.addBack = function( selector ) {
2166		return this.add( selector == null ?
2167			this.prevObject : this.prevObject.filter( selector )
2168		);
2169	};
2170}
2171
2172$.effects.animateClass = function( value, duration, easing, callback ) {
2173	var o = $.speed( duration, easing, callback );
2174
2175	return this.queue( function() {
2176		var animated = $( this ),
2177			baseClass = animated.attr( "class" ) || "",
2178			applyClassChange,
2179			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
2180
2181		// Map the animated objects to store the original styles.
2182		allAnimations = allAnimations.map( function() {
2183			var el = $( this );
2184			return {
2185				el: el,
2186				start: getElementStyles( this )
2187			};
2188		} );
2189
2190		// Apply class change
2191		applyClassChange = function() {
2192			$.each( classAnimationActions, function( i, action ) {
2193				if ( value[ action ] ) {
2194					animated[ action + "Class" ]( value[ action ] );
2195				}
2196			} );
2197		};
2198		applyClassChange();
2199
2200		// Map all animated objects again - calculate new styles and diff
2201		allAnimations = allAnimations.map( function() {
2202			this.end = getElementStyles( this.el[ 0 ] );
2203			this.diff = styleDifference( this.start, this.end );
2204			return this;
2205		} );
2206
2207		// Apply original class
2208		animated.attr( "class", baseClass );
2209
2210		// Map all animated objects again - this time collecting a promise
2211		allAnimations = allAnimations.map( function() {
2212			var styleInfo = this,
2213				dfd = $.Deferred(),
2214				opts = $.extend( {}, o, {
2215					queue: false,
2216					complete: function() {
2217						dfd.resolve( styleInfo );
2218					}
2219				} );
2220
2221			this.el.animate( this.diff, opts );
2222			return dfd.promise();
2223		} );
2224
2225		// Once all animations have completed:
2226		$.when.apply( $, allAnimations.get() ).done( function() {
2227
2228			// Set the final class
2229			applyClassChange();
2230
2231			// For each animated element,
2232			// clear all css properties that were animated
2233			$.each( arguments, function() {
2234				var el = this.el;
2235				$.each( this.diff, function( key ) {
2236					el.css( key, "" );
2237				} );
2238			} );
2239
2240			// This is guarnteed to be there if you use jQuery.speed()
2241			// it also handles dequeuing the next anim...
2242			o.complete.call( animated[ 0 ] );
2243		} );
2244	} );
2245};
2246
2247$.fn.extend( {
2248	addClass: ( function( orig ) {
2249		return function( classNames, speed, easing, callback ) {
2250			return speed ?
2251				$.effects.animateClass.call( this,
2252					{ add: classNames }, speed, easing, callback ) :
2253				orig.apply( this, arguments );
2254		};
2255	} )( $.fn.addClass ),
2256
2257	removeClass: ( function( orig ) {
2258		return function( classNames, speed, easing, callback ) {
2259			return arguments.length > 1 ?
2260				$.effects.animateClass.call( this,
2261					{ remove: classNames }, speed, easing, callback ) :
2262				orig.apply( this, arguments );
2263		};
2264	} )( $.fn.removeClass ),
2265
2266	toggleClass: ( function( orig ) {
2267		return function( classNames, force, speed, easing, callback ) {
2268			if ( typeof force === "boolean" || force === undefined ) {
2269				if ( !speed ) {
2270
2271					// Without speed parameter
2272					return orig.apply( this, arguments );
2273				} else {
2274					return $.effects.animateClass.call( this,
2275						( force ? { add: classNames } : { remove: classNames } ),
2276						speed, easing, callback );
2277				}
2278			} else {
2279
2280				// Without force parameter
2281				return $.effects.animateClass.call( this,
2282					{ toggle: classNames }, force, speed, easing );
2283			}
2284		};
2285	} )( $.fn.toggleClass ),
2286
2287	switchClass: function( remove, add, speed, easing, callback ) {
2288		return $.effects.animateClass.call( this, {
2289			add: add,
2290			remove: remove
2291		}, speed, easing, callback );
2292	}
2293} );
2294
2295} )();
2296
2297/******************************************************************************/
2298/*********************************** EFFECTS **********************************/
2299/******************************************************************************/
2300
2301( function() {
2302
2303if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
2304	$.expr.pseudos.animated = ( function( orig ) {
2305		return function( elem ) {
2306			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
2307		};
2308	} )( $.expr.pseudos.animated );
2309}
2310
2311if ( $.uiBackCompat !== false ) {
2312	$.extend( $.effects, {
2313
2314		// Saves a set of properties in a data storage
2315		save: function( element, set ) {
2316			var i = 0, length = set.length;
2317			for ( ; i < length; i++ ) {
2318				if ( set[ i ] !== null ) {
2319					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
2320				}
2321			}
2322		},
2323
2324		// Restores a set of previously saved properties from a data storage
2325		restore: function( element, set ) {
2326			var val, i = 0, length = set.length;
2327			for ( ; i < length; i++ ) {
2328				if ( set[ i ] !== null ) {
2329					val = element.data( dataSpace + set[ i ] );
2330					element.css( set[ i ], val );
2331				}
2332			}
2333		},
2334
2335		setMode: function( el, mode ) {
2336			if ( mode === "toggle" ) {
2337				mode = el.is( ":hidden" ) ? "show" : "hide";
2338			}
2339			return mode;
2340		},
2341
2342		// Wraps the element around a wrapper that copies position properties
2343		createWrapper: function( element ) {
2344
2345			// If the element is already wrapped, return it
2346			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
2347				return element.parent();
2348			}
2349
2350			// Wrap the element
2351			var props = {
2352					width: element.outerWidth( true ),
2353					height: element.outerHeight( true ),
2354					"float": element.css( "float" )
2355				},
2356				wrapper = $( "<div></div>" )
2357					.addClass( "ui-effects-wrapper" )
2358					.css( {
2359						fontSize: "100%",
2360						background: "transparent",
2361						border: "none",
2362						margin: 0,
2363						padding: 0
2364					} ),
2365
2366				// Store the size in case width/height are defined in % - Fixes #5245
2367				size = {
2368					width: element.width(),
2369					height: element.height()
2370				},
2371				active = document.activeElement;
2372
2373			// Support: Firefox
2374			// Firefox incorrectly exposes anonymous content
2375			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
2376			try {
2377				// eslint-disable-next-line no-unused-expressions
2378				active.id;
2379			} catch ( e ) {
2380				active = document.body;
2381			}
2382
2383			element.wrap( wrapper );
2384
2385			// Fixes #7595 - Elements lose focus when wrapped.
2386			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
2387				$( active ).trigger( "focus" );
2388			}
2389
2390			// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
2391			// lose the reference to the wrapped element
2392			wrapper = element.parent();
2393
2394			// Transfer positioning properties to the wrapper
2395			if ( element.css( "position" ) === "static" ) {
2396				wrapper.css( { position: "relative" } );
2397				element.css( { position: "relative" } );
2398			} else {
2399				$.extend( props, {
2400					position: element.css( "position" ),
2401					zIndex: element.css( "z-index" )
2402				} );
2403				$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
2404					props[ pos ] = element.css( pos );
2405					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
2406						props[ pos ] = "auto";
2407					}
2408				} );
2409				element.css( {
2410					position: "relative",
2411					top: 0,
2412					left: 0,
2413					right: "auto",
2414					bottom: "auto"
2415				} );
2416			}
2417			element.css( size );
2418
2419			return wrapper.css( props ).show();
2420		},
2421
2422		removeWrapper: function( element ) {
2423			var active = document.activeElement;
2424
2425			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
2426				element.parent().replaceWith( element );
2427
vendor: 6,832 bytes, lines 2428-2708
2428				// Fixes #7595 - Elements lose focus when wrapped.
2429				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
2430					$( active ).trigger( "focus" );
2431				}
2432			}
2433
2434			return element;
2435		}
2436	} );
2437}
2438
2439$.extend( $.effects, {
2440	version: "1.13.2",
2441
2442	define: function( name, mode, effect ) {
2443		if ( !effect ) {
2444			effect = mode;
2445			mode = "effect";
2446		}
2447
2448		$.effects.effect[ name ] = effect;
2449		$.effects.effect[ name ].mode = mode;
2450
2451		return effect;
2452	},
2453
2454	scaledDimensions: function( element, percent, direction ) {
2455		if ( percent === 0 ) {
2456			return {
2457				height: 0,
2458				width: 0,
2459				outerHeight: 0,
2460				outerWidth: 0
2461			};
2462		}
2463
2464		var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
2465			y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
2466
2467		return {
2468			height: element.height() * y,
2469			width: element.width() * x,
2470			outerHeight: element.outerHeight() * y,
2471			outerWidth: element.outerWidth() * x
2472		};
2473
2474	},
2475
2476	clipToBox: function( animation ) {
2477		return {
2478			width: animation.clip.right - animation.clip.left,
2479			height: animation.clip.bottom - animation.clip.top,
2480			left: animation.clip.left,
2481			top: animation.clip.top
2482		};
2483	},
2484
2485	// Injects recently queued functions to be first in line (after "inprogress")
2486	unshift: function( element, queueLength, count ) {
2487		var queue = element.queue();
2488
2489		if ( queueLength > 1 ) {
2490			queue.splice.apply( queue,
2491				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
2492		}
2493		element.dequeue();
2494	},
2495
2496	saveStyle: function( element ) {
2497		element.data( dataSpaceStyle, element[ 0 ].style.cssText );
2498	},
2499
2500	restoreStyle: function( element ) {
2501		element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
2502		element.removeData( dataSpaceStyle );
2503	},
2504
2505	mode: function( element, mode ) {
2506		var hidden = element.is( ":hidden" );
2507
2508		if ( mode === "toggle" ) {
2509			mode = hidden ? "show" : "hide";
2510		}
2511		if ( hidden ? mode === "hide" : mode === "show" ) {
2512			mode = "none";
2513		}
2514		return mode;
2515	},
2516
2517	// Translates a [top,left] array into a baseline value
2518	getBaseline: function( origin, original ) {
2519		var y, x;
2520
2521		switch ( origin[ 0 ] ) {
2522		case "top":
2523			y = 0;
2524			break;
2525		case "middle":
2526			y = 0.5;
2527			break;
2528		case "bottom":
2529			y = 1;
2530			break;
2531		default:
2532			y = origin[ 0 ] / original.height;
2533		}
2534
2535		switch ( origin[ 1 ] ) {
2536		case "left":
2537			x = 0;
2538			break;
2539		case "center":
2540			x = 0.5;
2541			break;
2542		case "right":
2543			x = 1;
2544			break;
2545		default:
2546			x = origin[ 1 ] / original.width;
2547		}
2548
2549		return {
2550			x: x,
2551			y: y
2552		};
2553	},
2554
2555	// Creates a placeholder element so that the original element can be made absolute
2556	createPlaceholder: function( element ) {
2557		var placeholder,
2558			cssPosition = element.css( "position" ),
2559			position = element.position();
2560
2561		// Lock in margins first to account for form elements, which
2562		// will change margin if you explicitly set height
2563		// see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
2564		// Support: Safari
2565		element.css( {
2566			marginTop: element.css( "marginTop" ),
2567			marginBottom: element.css( "marginBottom" ),
2568			marginLeft: element.css( "marginLeft" ),
2569			marginRight: element.css( "marginRight" )
2570		} )
2571		.outerWidth( element.outerWidth() )
2572		.outerHeight( element.outerHeight() );
2573
2574		if ( /^(static|relative)/.test( cssPosition ) ) {
2575			cssPosition = "absolute";
2576
2577			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
2578
2579				// Convert inline to inline block to account for inline elements
2580				// that turn to inline block based on content (like img)
2581				display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
2582					"inline-block" :
2583					"block",
2584				visibility: "hidden",
2585
2586				// Margins need to be set to account for margin collapse
2587				marginTop: element.css( "marginTop" ),
2588				marginBottom: element.css( "marginBottom" ),
2589				marginLeft: element.css( "marginLeft" ),
2590				marginRight: element.css( "marginRight" ),
2591				"float": element.css( "float" )
2592			} )
2593			.outerWidth( element.outerWidth() )
2594			.outerHeight( element.outerHeight() )
2595			.addClass( "ui-effects-placeholder" );
2596
2597			element.data( dataSpace + "placeholder", placeholder );
2598		}
2599
2600		element.css( {
2601			position: cssPosition,
2602			left: position.left,
2603			top: position.top
2604		} );
2605
2606		return placeholder;
2607	},
2608
2609	removePlaceholder: function( element ) {
2610		var dataKey = dataSpace + "placeholder",
2611				placeholder = element.data( dataKey );
2612
2613		if ( placeholder ) {
2614			placeholder.remove();
2615			element.removeData( dataKey );
2616		}
2617	},
2618
2619	// Removes a placeholder if it exists and restores
2620	// properties that were modified during placeholder creation
2621	cleanUp: function( element ) {
2622		$.effects.restoreStyle( element );
2623		$.effects.removePlaceholder( element );
2624	},
2625
2626	setTransition: function( element, list, factor, value ) {
2627		value = value || {};
2628		$.each( list, function( i, x ) {
2629			var unit = element.cssUnit( x );
2630			if ( unit[ 0 ] > 0 ) {
2631				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
2632			}
2633		} );
2634		return value;
2635	}
2636} );
2637
2638// Return an effect options object for the given parameters:
2639function _normalizeArguments( effect, options, speed, callback ) {
2640
2641	// Allow passing all options as the first parameter
2642	if ( $.isPlainObject( effect ) ) {
2643		options = effect;
2644		effect = effect.effect;
2645	}
2646
2647	// Convert to an object
2648	effect = { effect: effect };
2649
2650	// Catch (effect, null, ...)
2651	if ( options == null ) {
2652		options = {};
2653	}
2654
2655	// Catch (effect, callback)
2656	if ( typeof options === "function" ) {
2657		callback = options;
2658		speed = null;
2659		options = {};
2660	}
2661
2662	// Catch (effect, speed, ?)
2663	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
2664		callback = speed;
2665		speed = options;
2666		options = {};
2667	}
2668
2669	// Catch (effect, options, callback)
2670	if ( typeof speed === "function" ) {
2671		callback = speed;
2672		speed = null;
2673	}
2674
2675	// Add options to effect
2676	if ( options ) {
2677		$.extend( effect, options );
2678	}
2679
2680	speed = speed || options.duration;
2681	effect.duration = $.fx.off ? 0 :
2682		typeof speed === "number" ? speed :
2683		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
2684		$.fx.speeds._default;
2685
2686	effect.complete = callback || options.complete;
2687
2688	return effect;
2689}
2690
2691function standardAnimationOption( option ) {
2692
2693	// Valid standard speeds (nothing, number, named speed)
2694	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
2695		return true;
2696	}
2697
2698	// Invalid strings - treat as "normal" speed
2699	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
2700		return true;
2701	}
2702
2703	// Complete callback
2704	if ( typeof option === "function" ) {
2705		return true;
2706	}
2707
2708	// Options hash (but not naming an effect)
vendor: 4,998 bytes, lines 2709-2892
2709	if ( typeof option === "object" && !option.effect ) {
2710		return true;
2711	}
2712
2713	// Didn't match any standard API
2714	return false;
2715}
2716
2717$.fn.extend( {
2718	effect: function( /* effect, options, speed, callback */ ) {
2719		var args = _normalizeArguments.apply( this, arguments ),
2720			effectMethod = $.effects.effect[ args.effect ],
2721			defaultMode = effectMethod.mode,
2722			queue = args.queue,
2723			queueName = queue || "fx",
2724			complete = args.complete,
2725			mode = args.mode,
2726			modes = [],
2727			prefilter = function( next ) {
2728				var el = $( this ),
2729					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
2730
2731				// Sentinel for duck-punching the :animated pseudo-selector
2732				el.data( dataSpaceAnimated, true );
2733
2734				// Save effect mode for later use,
2735				// we can't just call $.effects.mode again later,
2736				// as the .show() below destroys the initial state
2737				modes.push( normalizedMode );
2738
2739				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
2740				if ( defaultMode && ( normalizedMode === "show" ||
2741						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
2742					el.show();
2743				}
2744
2745				if ( !defaultMode || normalizedMode !== "none" ) {
2746					$.effects.saveStyle( el );
2747				}
2748
2749				if ( typeof next === "function" ) {
2750					next();
2751				}
2752			};
2753
2754		if ( $.fx.off || !effectMethod ) {
2755
2756			// Delegate to the original method (e.g., .show()) if possible
2757			if ( mode ) {
2758				return this[ mode ]( args.duration, complete );
2759			} else {
2760				return this.each( function() {
2761					if ( complete ) {
2762						complete.call( this );
2763					}
2764				} );
2765			}
2766		}
2767
2768		function run( next ) {
2769			var elem = $( this );
2770
2771			function cleanup() {
2772				elem.removeData( dataSpaceAnimated );
2773
2774				$.effects.cleanUp( elem );
2775
2776				if ( args.mode === "hide" ) {
2777					elem.hide();
2778				}
2779
2780				done();
2781			}
2782
2783			function done() {
2784				if ( typeof complete === "function" ) {
2785					complete.call( elem[ 0 ] );
2786				}
2787
2788				if ( typeof next === "function" ) {
2789					next();
2790				}
2791			}
2792
2793			// Override mode option on a per element basis,
2794			// as toggle can be either show or hide depending on element state
2795			args.mode = modes.shift();
2796
2797			if ( $.uiBackCompat !== false && !defaultMode ) {
2798				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
2799
2800					// Call the core method to track "olddisplay" properly
2801					elem[ mode ]();
2802					done();
2803				} else {
2804					effectMethod.call( elem[ 0 ], args, done );
2805				}
2806			} else {
2807				if ( args.mode === "none" ) {
2808
2809					// Call the core method to track "olddisplay" properly
2810					elem[ mode ]();
2811					done();
2812				} else {
2813					effectMethod.call( elem[ 0 ], args, cleanup );
2814				}
2815			}
2816		}
2817
2818		// Run prefilter on all elements first to ensure that
2819		// any showing or hiding happens before placeholder creation,
2820		// which ensures that any layout changes are correctly captured.
2821		return queue === false ?
2822			this.each( prefilter ).each( run ) :
2823			this.queue( queueName, prefilter ).queue( queueName, run );
2824	},
2825
2826	show: ( function( orig ) {
2827		return function( option ) {
2828			if ( standardAnimationOption( option ) ) {
2829				return orig.apply( this, arguments );
2830			} else {
2831				var args = _normalizeArguments.apply( this, arguments );
2832				args.mode = "show";
2833				return this.effect.call( this, args );
2834			}
2835		};
2836	} )( $.fn.show ),
2837
2838	hide: ( function( orig ) {
2839		return function( option ) {
2840			if ( standardAnimationOption( option ) ) {
2841				return orig.apply( this, arguments );
2842			} else {
2843				var args = _normalizeArguments.apply( this, arguments );
2844				args.mode = "hide";
2845				return this.effect.call( this, args );
2846			}
2847		};
2848	} )( $.fn.hide ),
2849
2850	toggle: ( function( orig ) {
2851		return function( option ) {
2852			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
2853				return orig.apply( this, arguments );
2854			} else {
2855				var args = _normalizeArguments.apply( this, arguments );
2856				args.mode = "toggle";
2857				return this.effect.call( this, args );
2858			}
2859		};
2860	} )( $.fn.toggle ),
2861
2862	cssUnit: function( key ) {
2863		var style = this.css( key ),
2864			val = [];
2865
2866		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
2867			if ( style.indexOf( unit ) > 0 ) {
2868				val = [ parseFloat( style ), unit ];
2869			}
2870		} );
2871		return val;
2872	},
2873
2874	cssClip: function( clipObj ) {
2875		if ( clipObj ) {
2876			return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
2877				clipObj.bottom + "px " + clipObj.left + "px)" );
2878		}
2879		return parseClip( this.css( "clip" ), this );
2880	},
2881
2882	transfer: function( options, done ) {
2883		var element = $( this ),
2884			target = $( options.to ),
2885			targetFixed = target.css( "position" ) === "fixed",
2886			body = $( "body" ),
2887			fixTop = targetFixed ? body.scrollTop() : 0,
2888			fixLeft = targetFixed ? body.scrollLeft() : 0,
2889			endPosition = target.offset(),
2890			animation = {
2891				top: endPosition.top - fixTop,
2892				left: endPosition.left - fixLeft,
vendor: 26,433 bytes, lines 2893-3859
2893				height: target.innerHeight(),
2894				width: target.innerWidth()
2895			},
2896			startPosition = element.offset(),
2897			transfer = $( "<div class='ui-effects-transfer'></div>" );
2898
2899		transfer
2900			.appendTo( "body" )
2901			.addClass( options.className )
2902			.css( {
2903				top: startPosition.top - fixTop,
2904				left: startPosition.left - fixLeft,
2905				height: element.innerHeight(),
2906				width: element.innerWidth(),
2907				position: targetFixed ? "fixed" : "absolute"
2908			} )
2909			.animate( animation, options.duration, options.easing, function() {
2910				transfer.remove();
2911				if ( typeof done === "function" ) {
2912					done();
2913				}
2914			} );
2915	}
2916} );
2917
2918function parseClip( str, element ) {
2919		var outerWidth = element.outerWidth(),
2920			outerHeight = element.outerHeight(),
2921			clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
2922			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
2923
2924		return {
2925			top: parseFloat( values[ 1 ] ) || 0,
2926			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
2927			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
2928			left: parseFloat( values[ 4 ] ) || 0
2929		};
2930}
2931
2932$.fx.step.clip = function( fx ) {
2933	if ( !fx.clipInit ) {
2934		fx.start = $( fx.elem ).cssClip();
2935		if ( typeof fx.end === "string" ) {
2936			fx.end = parseClip( fx.end, fx.elem );
2937		}
2938		fx.clipInit = true;
2939	}
2940
2941	$( fx.elem ).cssClip( {
2942		top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
2943		right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
2944		bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
2945		left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
2946	} );
2947};
2948
2949} )();
2950
2951/******************************************************************************/
2952/*********************************** EASING ***********************************/
2953/******************************************************************************/
2954
2955( function() {
2956
2957// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
2958
2959var baseEasings = {};
2960
2961$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
2962	baseEasings[ name ] = function( p ) {
2963		return Math.pow( p, i + 2 );
2964	};
2965} );
2966
2967$.extend( baseEasings, {
2968	Sine: function( p ) {
2969		return 1 - Math.cos( p * Math.PI / 2 );
2970	},
2971	Circ: function( p ) {
2972		return 1 - Math.sqrt( 1 - p * p );
2973	},
2974	Elastic: function( p ) {
2975		return p === 0 || p === 1 ? p :
2976			-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
2977	},
2978	Back: function( p ) {
2979		return p * p * ( 3 * p - 2 );
2980	},
2981	Bounce: function( p ) {
2982		var pow2,
2983			bounce = 4;
2984
2985		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
2986		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
2987	}
2988} );
2989
2990$.each( baseEasings, function( name, easeIn ) {
2991	$.easing[ "easeIn" + name ] = easeIn;
2992	$.easing[ "easeOut" + name ] = function( p ) {
2993		return 1 - easeIn( 1 - p );
2994	};
2995	$.easing[ "easeInOut" + name ] = function( p ) {
2996		return p < 0.5 ?
2997			easeIn( p * 2 ) / 2 :
2998			1 - easeIn( p * -2 + 2 ) / 2;
2999	};
3000} );
3001
3002} )();
3003
3004var effect = $.effects;
3005
3006
3007/*!
3008 * jQuery UI Effects Blind 1.13.2
3009 * http://jqueryui.com
3010 *
3011 * Copyright jQuery Foundation and other contributors
3012 * Released under the MIT license.
3013 * http://jquery.org/license
3014 */
3015
3016//>>label: Blind Effect
3017//>>group: Effects
3018//>>description: Blinds the element.
3019//>>docs: http://api.jqueryui.com/blind-effect/
3020//>>demos: http://jqueryui.com/effect/
3021
3022
3023var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) {
3024	var map = {
3025			up: [ "bottom", "top" ],
3026			vertical: [ "bottom", "top" ],
3027			down: [ "top", "bottom" ],
3028			left: [ "right", "left" ],
3029			horizontal: [ "right", "left" ],
3030			right: [ "left", "right" ]
3031		},
3032		element = $( this ),
3033		direction = options.direction || "up",
3034		start = element.cssClip(),
3035		animate = { clip: $.extend( {}, start ) },
3036		placeholder = $.effects.createPlaceholder( element );
3037
3038	animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];
3039
3040	if ( options.mode === "show" ) {
3041		element.cssClip( animate.clip );
3042		if ( placeholder ) {
3043			placeholder.css( $.effects.clipToBox( animate ) );
3044		}
3045
3046		animate.clip = start;
3047	}
3048
3049	if ( placeholder ) {
3050		placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
3051	}
3052
3053	element.animate( animate, {
3054		queue: false,
3055		duration: options.duration,
3056		easing: options.easing,
3057		complete: done
3058	} );
3059} );
3060
3061
3062/*!
3063 * jQuery UI Effects Bounce 1.13.2
3064 * http://jqueryui.com
3065 *
3066 * Copyright jQuery Foundation and other contributors
3067 * Released under the MIT license.
3068 * http://jquery.org/license
3069 */
3070
3071//>>label: Bounce Effect
3072//>>group: Effects
3073//>>description: Bounces an element horizontally or vertically n times.
3074//>>docs: http://api.jqueryui.com/bounce-effect/
3075//>>demos: http://jqueryui.com/effect/
3076
3077
3078var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) {
3079	var upAnim, downAnim, refValue,
3080		element = $( this ),
3081
3082		// Defaults:
3083		mode = options.mode,
3084		hide = mode === "hide",
3085		show = mode === "show",
3086		direction = options.direction || "up",
3087		distance = options.distance,
3088		times = options.times || 5,
3089
3090		// Number of internal animations
3091		anims = times * 2 + ( show || hide ? 1 : 0 ),
3092		speed = options.duration / anims,
3093		easing = options.easing,
3094
3095		// Utility:
3096		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3097		motion = ( direction === "up" || direction === "left" ),
3098		i = 0,
3099
3100		queuelen = element.queue().length;
3101
3102	$.effects.createPlaceholder( element );
3103
3104	refValue = element.css( ref );
3105
3106	// Default distance for the BIGGEST bounce is the outer Distance / 3
3107	if ( !distance ) {
3108		distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
3109	}
3110
3111	if ( show ) {
3112		downAnim = { opacity: 1 };
3113		downAnim[ ref ] = refValue;
3114
3115		// If we are showing, force opacity 0 and set the initial position
3116		// then do the "first" animation
3117		element
3118			.css( "opacity", 0 )
3119			.css( ref, motion ? -distance * 2 : distance * 2 )
3120			.animate( downAnim, speed, easing );
3121	}
3122
3123	// Start at the smallest distance if we are hiding
3124	if ( hide ) {
3125		distance = distance / Math.pow( 2, times - 1 );
3126	}
3127
3128	downAnim = {};
3129	downAnim[ ref ] = refValue;
3130
3131	// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
3132	for ( ; i < times; i++ ) {
3133		upAnim = {};
3134		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
3135
3136		element
3137			.animate( upAnim, speed, easing )
3138			.animate( downAnim, speed, easing );
3139
3140		distance = hide ? distance * 2 : distance / 2;
3141	}
3142
3143	// Last Bounce when Hiding
3144	if ( hide ) {
3145		upAnim = { opacity: 0 };
3146		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
3147
3148		element.animate( upAnim, speed, easing );
3149	}
3150
3151	element.queue( done );
3152
3153	$.effects.unshift( element, queuelen, anims + 1 );
3154} );
3155
3156
3157/*!
3158 * jQuery UI Effects Clip 1.13.2
3159 * http://jqueryui.com
3160 *
3161 * Copyright jQuery Foundation and other contributors
3162 * Released under the MIT license.
3163 * http://jquery.org/license
3164 */
3165
3166//>>label: Clip Effect
3167//>>group: Effects
3168//>>description: Clips the element on and off like an old TV.
3169//>>docs: http://api.jqueryui.com/clip-effect/
3170//>>demos: http://jqueryui.com/effect/
3171
3172
3173var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) {
3174	var start,
3175		animate = {},
3176		element = $( this ),
3177		direction = options.direction || "vertical",
3178		both = direction === "both",
3179		horizontal = both || direction === "horizontal",
3180		vertical = both || direction === "vertical";
3181
3182	start = element.cssClip();
3183	animate.clip = {
3184		top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
3185		right: horizontal ? ( start.right - start.left ) / 2 : start.right,
3186		bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
3187		left: horizontal ? ( start.right - start.left ) / 2 : start.left
3188	};
3189
3190	$.effects.createPlaceholder( element );
3191
3192	if ( options.mode === "show" ) {
3193		element.cssClip( animate.clip );
3194		animate.clip = start;
3195	}
3196
3197	element.animate( animate, {
3198		queue: false,
3199		duration: options.duration,
3200		easing: options.easing,
3201		complete: done
3202	} );
3203
3204} );
3205
3206
3207/*!
3208 * jQuery UI Effects Drop 1.13.2
3209 * http://jqueryui.com
3210 *
3211 * Copyright jQuery Foundation and other contributors
3212 * Released under the MIT license.
3213 * http://jquery.org/license
3214 */
3215
3216//>>label: Drop Effect
3217//>>group: Effects
3218//>>description: Moves an element in one direction and hides it at the same time.
3219//>>docs: http://api.jqueryui.com/drop-effect/
3220//>>demos: http://jqueryui.com/effect/
3221
3222
3223var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) {
3224
3225	var distance,
3226		element = $( this ),
3227		mode = options.mode,
3228		show = mode === "show",
3229		direction = options.direction || "left",
3230		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3231		motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
3232		oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
3233		animation = {
3234			opacity: 0
3235		};
3236
3237	$.effects.createPlaceholder( element );
3238
3239	distance = options.distance ||
3240		element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
3241
3242	animation[ ref ] = motion + distance;
3243
3244	if ( show ) {
3245		element.css( animation );
3246
3247		animation[ ref ] = oppositeMotion + distance;
3248		animation.opacity = 1;
3249	}
3250
3251	// Animate
3252	element.animate( animation, {
3253		queue: false,
3254		duration: options.duration,
3255		easing: options.easing,
3256		complete: done
3257	} );
3258} );
3259
3260
3261/*!
3262 * jQuery UI Effects Explode 1.13.2
3263 * http://jqueryui.com
3264 *
3265 * Copyright jQuery Foundation and other contributors
3266 * Released under the MIT license.
3267 * http://jquery.org/license
3268 */
3269
3270//>>label: Explode Effect
3271//>>group: Effects
3272/* eslint-disable max-len */
3273//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
3274/* eslint-enable max-len */
3275//>>docs: http://api.jqueryui.com/explode-effect/
3276//>>demos: http://jqueryui.com/effect/
3277
3278
3279var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) {
3280
3281	var i, j, left, top, mx, my,
3282		rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
3283		cells = rows,
3284		element = $( this ),
3285		mode = options.mode,
3286		show = mode === "show",
3287
3288		// Show and then visibility:hidden the element before calculating offset
3289		offset = element.show().css( "visibility", "hidden" ).offset(),
3290
3291		// Width and height of a piece
3292		width = Math.ceil( element.outerWidth() / cells ),
3293		height = Math.ceil( element.outerHeight() / rows ),
3294		pieces = [];
3295
3296	// Children animate complete:
3297	function childComplete() {
3298		pieces.push( this );
3299		if ( pieces.length === rows * cells ) {
3300			animComplete();
3301		}
3302	}
3303
3304	// Clone the element for each row and cell.
3305	for ( i = 0; i < rows; i++ ) { // ===>
3306		top = offset.top + i * height;
3307		my = i - ( rows - 1 ) / 2;
3308
3309		for ( j = 0; j < cells; j++ ) { // |||
3310			left = offset.left + j * width;
3311			mx = j - ( cells - 1 ) / 2;
3312
3313			// Create a clone of the now hidden main element that will be absolute positioned
3314			// within a wrapper div off the -left and -top equal to size of our pieces
3315			element
3316				.clone()
3317				.appendTo( "body" )
3318				.wrap( "<div></div>" )
3319				.css( {
3320					position: "absolute",
3321					visibility: "visible",
3322					left: -j * width,
3323					top: -i * height
3324				} )
3325
3326				// Select the wrapper - make it overflow: hidden and absolute positioned based on
3327				// where the original was located +left and +top equal to the size of pieces
3328				.parent()
3329					.addClass( "ui-effects-explode" )
3330					.css( {
3331						position: "absolute",
3332						overflow: "hidden",
3333						width: width,
3334						height: height,
3335						left: left + ( show ? mx * width : 0 ),
3336						top: top + ( show ? my * height : 0 ),
3337						opacity: show ? 0 : 1
3338					} )
3339					.animate( {
3340						left: left + ( show ? 0 : mx * width ),
3341						top: top + ( show ? 0 : my * height ),
3342						opacity: show ? 1 : 0
3343					}, options.duration || 500, options.easing, childComplete );
3344		}
3345	}
3346
3347	function animComplete() {
3348		element.css( {
3349			visibility: "visible"
3350		} );
3351		$( pieces ).remove();
3352		done();
3353	}
3354} );
3355
3356
3357/*!
3358 * jQuery UI Effects Fade 1.13.2
3359 * http://jqueryui.com
3360 *
3361 * Copyright jQuery Foundation and other contributors
3362 * Released under the MIT license.
3363 * http://jquery.org/license
3364 */
3365
3366//>>label: Fade Effect
3367//>>group: Effects
3368//>>description: Fades the element.
3369//>>docs: http://api.jqueryui.com/fade-effect/
3370//>>demos: http://jqueryui.com/effect/
3371
3372
3373var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) {
3374	var show = options.mode === "show";
3375
3376	$( this )
3377		.css( "opacity", show ? 0 : 1 )
3378		.animate( {
3379			opacity: show ? 1 : 0
3380		}, {
3381			queue: false,
3382			duration: options.duration,
3383			easing: options.easing,
3384			complete: done
3385		} );
3386} );
3387
3388
3389/*!
3390 * jQuery UI Effects Fold 1.13.2
3391 * http://jqueryui.com
3392 *
3393 * Copyright jQuery Foundation and other contributors
3394 * Released under the MIT license.
3395 * http://jquery.org/license
3396 */
3397
3398//>>label: Fold Effect
3399//>>group: Effects
3400//>>description: Folds an element first horizontally and then vertically.
3401//>>docs: http://api.jqueryui.com/fold-effect/
3402//>>demos: http://jqueryui.com/effect/
3403
3404
3405var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) {
3406
3407	// Create element
3408	var element = $( this ),
3409		mode = options.mode,
3410		show = mode === "show",
3411		hide = mode === "hide",
3412		size = options.size || 15,
3413		percent = /([0-9]+)%/.exec( size ),
3414		horizFirst = !!options.horizFirst,
3415		ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
3416		duration = options.duration / 2,
3417
3418		placeholder = $.effects.createPlaceholder( element ),
3419
3420		start = element.cssClip(),
3421		animation1 = { clip: $.extend( {}, start ) },
3422		animation2 = { clip: $.extend( {}, start ) },
3423
3424		distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],
3425
3426		queuelen = element.queue().length;
3427
3428	if ( percent ) {
3429		size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
3430	}
3431	animation1.clip[ ref[ 0 ] ] = size;
3432	animation2.clip[ ref[ 0 ] ] = size;
3433	animation2.clip[ ref[ 1 ] ] = 0;
3434
3435	if ( show ) {
3436		element.cssClip( animation2.clip );
3437		if ( placeholder ) {
3438			placeholder.css( $.effects.clipToBox( animation2 ) );
3439		}
3440
3441		animation2.clip = start;
3442	}
3443
3444	// Animate
3445	element
3446		.queue( function( next ) {
3447			if ( placeholder ) {
3448				placeholder
3449					.animate( $.effects.clipToBox( animation1 ), duration, options.easing )
3450					.animate( $.effects.clipToBox( animation2 ), duration, options.easing );
3451			}
3452
3453			next();
3454		} )
3455		.animate( animation1, duration, options.easing )
3456		.animate( animation2, duration, options.easing )
3457		.queue( done );
3458
3459	$.effects.unshift( element, queuelen, 4 );
3460} );
3461
3462
3463/*!
3464 * jQuery UI Effects Highlight 1.13.2
3465 * http://jqueryui.com
3466 *
3467 * Copyright jQuery Foundation and other contributors
3468 * Released under the MIT license.
3469 * http://jquery.org/license
3470 */
3471
3472//>>label: Highlight Effect
3473//>>group: Effects
3474//>>description: Highlights the background of an element in a defined color for a custom duration.
3475//>>docs: http://api.jqueryui.com/highlight-effect/
3476//>>demos: http://jqueryui.com/effect/
3477
3478
3479var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) {
3480	var element = $( this ),
3481		animation = {
3482			backgroundColor: element.css( "backgroundColor" )
3483		};
3484
3485	if ( options.mode === "hide" ) {
3486		animation.opacity = 0;
3487	}
3488
3489	$.effects.saveStyle( element );
3490
3491	element
3492		.css( {
3493			backgroundImage: "none",
3494			backgroundColor: options.color || "#ffff99"
3495		} )
3496		.animate( animation, {
3497			queue: false,
3498			duration: options.duration,
3499			easing: options.easing,
3500			complete: done
3501		} );
3502} );
3503
3504
3505/*!
3506 * jQuery UI Effects Size 1.13.2
3507 * http://jqueryui.com
3508 *
3509 * Copyright jQuery Foundation and other contributors
3510 * Released under the MIT license.
3511 * http://jquery.org/license
3512 */
3513
3514//>>label: Size Effect
3515//>>group: Effects
3516//>>description: Resize an element to a specified width and height.
3517//>>docs: http://api.jqueryui.com/size-effect/
3518//>>demos: http://jqueryui.com/effect/
3519
3520
3521var effectsEffectSize = $.effects.define( "size", function( options, done ) {
3522
3523	// Create element
3524	var baseline, factor, temp,
3525		element = $( this ),
3526
3527		// Copy for children
3528		cProps = [ "fontSize" ],
3529		vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
3530		hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
3531
3532		// Set options
3533		mode = options.mode,
3534		restore = mode !== "effect",
3535		scale = options.scale || "both",
3536		origin = options.origin || [ "middle", "center" ],
3537		position = element.css( "position" ),
3538		pos = element.position(),
3539		original = $.effects.scaledDimensions( element ),
3540		from = options.from || original,
3541		to = options.to || $.effects.scaledDimensions( element, 0 );
3542
3543	$.effects.createPlaceholder( element );
3544
3545	if ( mode === "show" ) {
3546		temp = from;
3547		from = to;
3548		to = temp;
3549	}
3550
3551	// Set scaling factor
3552	factor = {
3553		from: {
3554			y: from.height / original.height,
3555			x: from.width / original.width
3556		},
3557		to: {
3558			y: to.height / original.height,
3559			x: to.width / original.width
3560		}
3561	};
3562
3563	// Scale the css box
3564	if ( scale === "box" || scale === "both" ) {
3565
3566		// Vertical props scaling
3567		if ( factor.from.y !== factor.to.y ) {
3568			from = $.effects.setTransition( element, vProps, factor.from.y, from );
3569			to = $.effects.setTransition( element, vProps, factor.to.y, to );
3570		}
3571
3572		// Horizontal props scaling
3573		if ( factor.from.x !== factor.to.x ) {
3574			from = $.effects.setTransition( element, hProps, factor.from.x, from );
3575			to = $.effects.setTransition( element, hProps, factor.to.x, to );
3576		}
3577	}
3578
3579	// Scale the content
3580	if ( scale === "content" || scale === "both" ) {
3581
3582		// Vertical props scaling
3583		if ( factor.from.y !== factor.to.y ) {
3584			from = $.effects.setTransition( element, cProps, factor.from.y, from );
3585			to = $.effects.setTransition( element, cProps, factor.to.y, to );
3586		}
3587	}
3588
3589	// Adjust the position properties based on the provided origin points
3590	if ( origin ) {
3591		baseline = $.effects.getBaseline( origin, original );
3592		from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
3593		from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
3594		to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
3595		to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
3596	}
3597	delete from.outerHeight;
3598	delete from.outerWidth;
3599	element.css( from );
3600
3601	// Animate the children if desired
3602	if ( scale === "content" || scale === "both" ) {
3603
3604		vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
3605		hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
3606
3607		// Only animate children with width attributes specified
3608		// TODO: is this right? should we include anything with css width specified as well
3609		element.find( "*[width]" ).each( function() {
3610			var child = $( this ),
3611				childOriginal = $.effects.scaledDimensions( child ),
3612				childFrom = {
3613					height: childOriginal.height * factor.from.y,
3614					width: childOriginal.width * factor.from.x,
3615					outerHeight: childOriginal.outerHeight * factor.from.y,
3616					outerWidth: childOriginal.outerWidth * factor.from.x
3617				},
3618				childTo = {
3619					height: childOriginal.height * factor.to.y,
3620					width: childOriginal.width * factor.to.x,
3621					outerHeight: childOriginal.height * factor.to.y,
3622					outerWidth: childOriginal.width * factor.to.x
3623				};
3624
3625			// Vertical props scaling
3626			if ( factor.from.y !== factor.to.y ) {
3627				childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
3628				childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
3629			}
3630
3631			// Horizontal props scaling
3632			if ( factor.from.x !== factor.to.x ) {
3633				childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
3634				childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
3635			}
3636
3637			if ( restore ) {
3638				$.effects.saveStyle( child );
3639			}
3640
3641			// Animate children
3642			child.css( childFrom );
3643			child.animate( childTo, options.duration, options.easing, function() {
3644
3645				// Restore children
3646				if ( restore ) {
3647					$.effects.restoreStyle( child );
3648				}
3649			} );
3650		} );
3651	}
3652
3653	// Animate
3654	element.animate( to, {
3655		queue: false,
3656		duration: options.duration,
3657		easing: options.easing,
3658		complete: function() {
3659
3660			var offset = element.offset();
3661
3662			if ( to.opacity === 0 ) {
3663				element.css( "opacity", from.opacity );
3664			}
3665
3666			if ( !restore ) {
3667				element
3668					.css( "position", position === "static" ? "relative" : position )
3669					.offset( offset );
3670
3671				// Need to save style here so that automatic style restoration
3672				// doesn't restore to the original styles from before the animation.
3673				$.effects.saveStyle( element );
3674			}
3675
3676			done();
3677		}
3678	} );
3679
3680} );
3681
3682
3683/*!
3684 * jQuery UI Effects Scale 1.13.2
3685 * http://jqueryui.com
3686 *
3687 * Copyright jQuery Foundation and other contributors
3688 * Released under the MIT license.
3689 * http://jquery.org/license
3690 */
3691
3692//>>label: Scale Effect
3693//>>group: Effects
3694//>>description: Grows or shrinks an element and its content.
3695//>>docs: http://api.jqueryui.com/scale-effect/
3696//>>demos: http://jqueryui.com/effect/
3697
3698
3699var effectsEffectScale = $.effects.define( "scale", function( options, done ) {
3700
3701	// Create element
3702	var el = $( this ),
3703		mode = options.mode,
3704		percent = parseInt( options.percent, 10 ) ||
3705			( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),
3706
3707		newOptions = $.extend( true, {
3708			from: $.effects.scaledDimensions( el ),
3709			to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
3710			origin: options.origin || [ "middle", "center" ]
3711		}, options );
3712
3713	// Fade option to support puff
3714	if ( options.fade ) {
3715		newOptions.from.opacity = 1;
3716		newOptions.to.opacity = 0;
3717	}
3718
3719	$.effects.effect.size.call( this, newOptions, done );
3720} );
3721
3722
3723/*!
3724 * jQuery UI Effects Puff 1.13.2
3725 * http://jqueryui.com
3726 *
3727 * Copyright jQuery Foundation and other contributors
3728 * Released under the MIT license.
3729 * http://jquery.org/license
3730 */
3731
3732//>>label: Puff Effect
3733//>>group: Effects
3734//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
3735//>>docs: http://api.jqueryui.com/puff-effect/
3736//>>demos: http://jqueryui.com/effect/
3737
3738
3739var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) {
3740	var newOptions = $.extend( true, {}, options, {
3741		fade: true,
3742		percent: parseInt( options.percent, 10 ) || 150
3743	} );
3744
3745	$.effects.effect.scale.call( this, newOptions, done );
3746} );
3747
3748
3749/*!
3750 * jQuery UI Effects Pulsate 1.13.2
3751 * http://jqueryui.com
3752 *
3753 * Copyright jQuery Foundation and other contributors
3754 * Released under the MIT license.
3755 * http://jquery.org/license
3756 */
3757
3758//>>label: Pulsate Effect
3759//>>group: Effects
3760//>>description: Pulsates an element n times by changing the opacity to zero and back.
3761//>>docs: http://api.jqueryui.com/pulsate-effect/
3762//>>demos: http://jqueryui.com/effect/
3763
3764
3765var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) {
3766	var element = $( this ),
3767		mode = options.mode,
3768		show = mode === "show",
3769		hide = mode === "hide",
3770		showhide = show || hide,
3771
3772		// Showing or hiding leaves off the "last" animation
3773		anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
3774		duration = options.duration / anims,
3775		animateTo = 0,
3776		i = 1,
3777		queuelen = element.queue().length;
3778
3779	if ( show || !element.is( ":visible" ) ) {
3780		element.css( "opacity", 0 ).show();
3781		animateTo = 1;
3782	}
3783
3784	// Anims - 1 opacity "toggles"
3785	for ( ; i < anims; i++ ) {
3786		element.animate( { opacity: animateTo }, duration, options.easing );
3787		animateTo = 1 - animateTo;
3788	}
3789
3790	element.animate( { opacity: animateTo }, duration, options.easing );
3791
3792	element.queue( done );
3793
3794	$.effects.unshift( element, queuelen, anims + 1 );
3795} );
3796
3797
3798/*!
3799 * jQuery UI Effects Shake 1.13.2
3800 * http://jqueryui.com
3801 *
3802 * Copyright jQuery Foundation and other contributors
3803 * Released under the MIT license.
3804 * http://jquery.org/license
3805 */
3806
3807//>>label: Shake Effect
3808//>>group: Effects
3809//>>description: Shakes an element horizontally or vertically n times.
3810//>>docs: http://api.jqueryui.com/shake-effect/
3811//>>demos: http://jqueryui.com/effect/
3812
3813
3814var effectsEffectShake = $.effects.define( "shake", function( options, done ) {
3815
3816	var i = 1,
3817		element = $( this ),
3818		direction = options.direction || "left",
3819		distance = options.distance || 20,
3820		times = options.times || 3,
3821		anims = times * 2 + 1,
3822		speed = Math.round( options.duration / anims ),
3823		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3824		positiveMotion = ( direction === "up" || direction === "left" ),
3825		animation = {},
3826		animation1 = {},
3827		animation2 = {},
3828
3829		queuelen = element.queue().length;
3830
3831	$.effects.createPlaceholder( element );
3832
3833	// Animation
3834	animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
3835	animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
3836	animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
3837
3838	// Animate
3839	element.animate( animation, speed, options.easing );
3840
3841	// Shakes
3842	for ( ; i < times; i++ ) {
3843		element
3844			.animate( animation1, speed, options.easing )
3845			.animate( animation2, speed, options.easing );
3846	}
3847
3848	element
3849		.animate( animation1, speed, options.easing )
3850		.animate( animation, speed / 2, options.easing )
3851		.queue( done );
3852
3853	$.effects.unshift( element, queuelen, anims + 1 );
3854} );
3855
3856
3857/*!
3858 * jQuery UI Effects Slide 1.13.2
3859 * http://jqueryui.com
vendor: 19,531 bytes, lines 3860-4607
3860 *
3861 * Copyright jQuery Foundation and other contributors
3862 * Released under the MIT license.
3863 * http://jquery.org/license
3864 */
3865
3866//>>label: Slide Effect
3867//>>group: Effects
3868//>>description: Slides an element in and out of the viewport.
3869//>>docs: http://api.jqueryui.com/slide-effect/
3870//>>demos: http://jqueryui.com/effect/
3871
3872
3873var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) {
3874	var startClip, startRef,
3875		element = $( this ),
3876		map = {
3877			up: [ "bottom", "top" ],
3878			down: [ "top", "bottom" ],
3879			left: [ "right", "left" ],
3880			right: [ "left", "right" ]
3881		},
3882		mode = options.mode,
3883		direction = options.direction || "left",
3884		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3885		positiveMotion = ( direction === "up" || direction === "left" ),
3886		distance = options.distance ||
3887			element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
3888		animation = {};
3889
3890	$.effects.createPlaceholder( element );
3891
3892	startClip = element.cssClip();
3893	startRef = element.position()[ ref ];
3894
3895	// Define hide animation
3896	animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
3897	animation.clip = element.cssClip();
3898	animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];
3899
3900	// Reverse the animation if we're showing
3901	if ( mode === "show" ) {
3902		element.cssClip( animation.clip );
3903		element.css( ref, animation[ ref ] );
3904		animation.clip = startClip;
3905		animation[ ref ] = startRef;
3906	}
3907
3908	// Actually animate
3909	element.animate( animation, {
3910		queue: false,
3911		duration: options.duration,
3912		easing: options.easing,
3913		complete: done
3914	} );
3915} );
3916
3917
3918/*!
3919 * jQuery UI Effects Transfer 1.13.2
3920 * http://jqueryui.com
3921 *
3922 * Copyright jQuery Foundation and other contributors
3923 * Released under the MIT license.
3924 * http://jquery.org/license
3925 */
3926
3927//>>label: Transfer Effect
3928//>>group: Effects
3929//>>description: Displays a transfer effect from one element to another.
3930//>>docs: http://api.jqueryui.com/transfer-effect/
3931//>>demos: http://jqueryui.com/effect/
3932
3933
3934var effect;
3935if ( $.uiBackCompat !== false ) {
3936	effect = $.effects.define( "transfer", function( options, done ) {
3937		$( this ).transfer( options, done );
3938	} );
3939}
3940var effectsEffectTransfer = effect;
3941
3942
3943/*!
3944 * jQuery UI Focusable 1.13.2
3945 * http://jqueryui.com
3946 *
3947 * Copyright jQuery Foundation and other contributors
3948 * Released under the MIT license.
3949 * http://jquery.org/license
3950 */
3951
3952//>>label: :focusable Selector
3953//>>group: Core
3954//>>description: Selects elements which can be focused.
3955//>>docs: http://api.jqueryui.com/focusable-selector/
3956
3957
3958// Selectors
3959$.ui.focusable = function( element, hasTabindex ) {
3960	var map, mapName, img, focusableIfVisible, fieldset,
3961		nodeName = element.nodeName.toLowerCase();
3962
3963	if ( "area" === nodeName ) {
3964		map = element.parentNode;
3965		mapName = map.name;
3966		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
3967			return false;
3968		}
3969		img = $( "img[usemap='#" + mapName + "']" );
3970		return img.length > 0 && img.is( ":visible" );
3971	}
3972
3973	if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
3974		focusableIfVisible = !element.disabled;
3975
3976		if ( focusableIfVisible ) {
3977
3978			// Form controls within a disabled fieldset are disabled.
3979			// However, controls within the fieldset's legend do not get disabled.
3980			// Since controls generally aren't placed inside legends, we skip
3981			// this portion of the check.
3982			fieldset = $( element ).closest( "fieldset" )[ 0 ];
3983			if ( fieldset ) {
3984				focusableIfVisible = !fieldset.disabled;
3985			}
3986		}
3987	} else if ( "a" === nodeName ) {
3988		focusableIfVisible = element.href || hasTabindex;
3989	} else {
3990		focusableIfVisible = hasTabindex;
3991	}
3992
3993	return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) );
3994};
3995
3996// Support: IE 8 only
3997// IE 8 doesn't resolve inherit to visible/hidden for computed values
3998function visible( element ) {
3999	var visibility = element.css( "visibility" );
4000	while ( visibility === "inherit" ) {
4001		element = element.parent();
4002		visibility = element.css( "visibility" );
4003	}
4004	return visibility === "visible";
4005}
4006
4007$.extend( $.expr.pseudos, {
4008	focusable: function( element ) {
4009		return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
4010	}
4011} );
4012
4013var focusable = $.ui.focusable;
4014
4015
4016
4017// Support: IE8 Only
4018// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
4019// with a string, so we need to find the proper form.
4020var form = $.fn._form = function() {
4021	return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
4022};
4023
4024
4025/*!
4026 * jQuery UI Form Reset Mixin 1.13.2
4027 * http://jqueryui.com
4028 *
4029 * Copyright jQuery Foundation and other contributors
4030 * Released under the MIT license.
4031 * http://jquery.org/license
4032 */
4033
4034//>>label: Form Reset Mixin
4035//>>group: Core
4036//>>description: Refresh input widgets when their form is reset
4037//>>docs: http://api.jqueryui.com/form-reset-mixin/
4038
4039
4040var formResetMixin = $.ui.formResetMixin = {
4041	_formResetHandler: function() {
4042		var form = $( this );
4043
4044		// Wait for the form reset to actually happen before refreshing
4045		setTimeout( function() {
4046			var instances = form.data( "ui-form-reset-instances" );
4047			$.each( instances, function() {
4048				this.refresh();
4049			} );
4050		} );
4051	},
4052
4053	_bindFormResetHandler: function() {
4054		this.form = this.element._form();
4055		if ( !this.form.length ) {
4056			return;
4057		}
4058
4059		var instances = this.form.data( "ui-form-reset-instances" ) || [];
4060		if ( !instances.length ) {
4061
4062			// We don't use _on() here because we use a single event handler per form
4063			this.form.on( "reset.ui-form-reset", this._formResetHandler );
4064		}
4065		instances.push( this );
4066		this.form.data( "ui-form-reset-instances", instances );
4067	},
4068
4069	_unbindFormResetHandler: function() {
4070		if ( !this.form.length ) {
4071			return;
4072		}
4073
4074		var instances = this.form.data( "ui-form-reset-instances" );
4075		instances.splice( $.inArray( this, instances ), 1 );
4076		if ( instances.length ) {
4077			this.form.data( "ui-form-reset-instances", instances );
4078		} else {
4079			this.form
4080				.removeData( "ui-form-reset-instances" )
4081				.off( "reset.ui-form-reset" );
4082		}
4083	}
4084};
4085
4086
4087/*!
4088 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.2
4089 * http://jqueryui.com
4090 *
4091 * Copyright jQuery Foundation and other contributors
4092 * Released under the MIT license.
4093 * http://jquery.org/license
4094 *
4095 */
4096
4097//>>label: jQuery 1.8+ Support
4098//>>group: Core
4099//>>description: Support version 1.8.x and newer of jQuery core
4100
4101
4102// Support: jQuery 1.9.x or older
4103// $.expr[ ":" ] is deprecated.
4104if ( !$.expr.pseudos ) {
4105	$.expr.pseudos = $.expr[ ":" ];
4106}
4107
4108// Support: jQuery 1.11.x or older
4109// $.unique has been renamed to $.uniqueSort
4110if ( !$.uniqueSort ) {
4111	$.uniqueSort = $.unique;
4112}
4113
4114// Support: jQuery 2.2.x or older.
4115// This method has been defined in jQuery 3.0.0.
4116// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
4117if ( !$.escapeSelector ) {
4118
4119	// CSS string/identifier serialization
4120	// https://drafts.csswg.org/cssom/#common-serializing-idioms
4121	var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
4122
4123	var fcssescape = function( ch, asCodePoint ) {
4124		if ( asCodePoint ) {
4125
4126			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
4127			if ( ch === "\0" ) {
4128				return "\uFFFD";
4129			}
4130
4131			// Control characters and (dependent upon position) numbers get escaped as code points
4132			return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
4133		}
4134
4135		// Other potentially-special ASCII characters get backslash-escaped
4136		return "\\" + ch;
4137	};
4138
4139	$.escapeSelector = function( sel ) {
4140		return ( sel + "" ).replace( rcssescape, fcssescape );
4141	};
4142}
4143
4144// Support: jQuery 3.4.x or older
4145// These methods have been defined in jQuery 3.5.0.
4146if ( !$.fn.even || !$.fn.odd ) {
4147	$.fn.extend( {
4148		even: function() {
4149			return this.filter( function( i ) {
4150				return i % 2 === 0;
4151			} );
4152		},
4153		odd: function() {
4154			return this.filter( function( i ) {
4155				return i % 2 === 1;
4156			} );
4157		}
4158	} );
4159}
4160
4161;
4162/*!
4163 * jQuery UI Keycode 1.13.2
4164 * http://jqueryui.com
4165 *
4166 * Copyright jQuery Foundation and other contributors
4167 * Released under the MIT license.
4168 * http://jquery.org/license
4169 */
4170
4171//>>label: Keycode
4172//>>group: Core
4173//>>description: Provide keycodes as keynames
4174//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
4175
4176
4177var keycode = $.ui.keyCode = {
4178	BACKSPACE: 8,
4179	COMMA: 188,
4180	DELETE: 46,
4181	DOWN: 40,
4182	END: 35,
4183	ENTER: 13,
4184	ESCAPE: 27,
4185	HOME: 36,
4186	LEFT: 37,
4187	PAGE_DOWN: 34,
4188	PAGE_UP: 33,
4189	PERIOD: 190,
4190	RIGHT: 39,
4191	SPACE: 32,
4192	TAB: 9,
4193	UP: 38
4194};
4195
4196
4197/*!
4198 * jQuery UI Labels 1.13.2
4199 * http://jqueryui.com
4200 *
4201 * Copyright jQuery Foundation and other contributors
4202 * Released under the MIT license.
4203 * http://jquery.org/license
4204 */
4205
4206//>>label: labels
4207//>>group: Core
4208//>>description: Find all the labels associated with a given input
4209//>>docs: http://api.jqueryui.com/labels/
4210
4211
4212var labels = $.fn.labels = function() {
4213	var ancestor, selector, id, labels, ancestors;
4214
4215	if ( !this.length ) {
4216		return this.pushStack( [] );
4217	}
4218
4219	// Check control.labels first
4220	if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
4221		return this.pushStack( this[ 0 ].labels );
4222	}
4223
4224	// Support: IE <= 11, FF <= 37, Android <= 2.3 only
4225	// Above browsers do not support control.labels. Everything below is to support them
4226	// as well as document fragments. control.labels does not work on document fragments
4227	labels = this.eq( 0 ).parents( "label" );
4228
4229	// Look for the label based on the id
4230	id = this.attr( "id" );
4231	if ( id ) {
4232
4233		// We don't search against the document in case the element
4234		// is disconnected from the DOM
4235		ancestor = this.eq( 0 ).parents().last();
4236
4237		// Get a full set of top level ancestors
4238		ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
4239
4240		// Create a selector for the label based on the id
4241		selector = "label[for='" + $.escapeSelector( id ) + "']";
4242
4243		labels = labels.add( ancestors.find( selector ).addBack( selector ) );
4244
4245	}
4246
4247	// Return whatever we have found for labels
4248	return this.pushStack( labels );
4249};
4250
4251
4252/*!
4253 * jQuery UI Scroll Parent 1.13.2
4254 * http://jqueryui.com
4255 *
4256 * Copyright jQuery Foundation and other contributors
4257 * Released under the MIT license.
4258 * http://jquery.org/license
4259 */
4260
4261//>>label: scrollParent
4262//>>group: Core
4263//>>description: Get the closest ancestor element that is scrollable.
4264//>>docs: http://api.jqueryui.com/scrollParent/
4265
4266
4267var scrollParent = $.fn.scrollParent = function( includeHidden ) {
4268	var position = this.css( "position" ),
4269		excludeStaticParent = position === "absolute",
4270		overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
4271		scrollParent = this.parents().filter( function() {
4272			var parent = $( this );
4273			if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
4274				return false;
4275			}
4276			return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
4277				parent.css( "overflow-x" ) );
4278		} ).eq( 0 );
4279
4280	return position === "fixed" || !scrollParent.length ?
4281		$( this[ 0 ].ownerDocument || document ) :
4282		scrollParent;
4283};
4284
4285
4286/*!
4287 * jQuery UI Tabbable 1.13.2
4288 * http://jqueryui.com
4289 *
4290 * Copyright jQuery Foundation and other contributors
4291 * Released under the MIT license.
4292 * http://jquery.org/license
4293 */
4294
4295//>>label: :tabbable Selector
4296//>>group: Core
4297//>>description: Selects elements which can be tabbed to.
4298//>>docs: http://api.jqueryui.com/tabbable-selector/
4299
4300
4301var tabbable = $.extend( $.expr.pseudos, {
4302	tabbable: function( element ) {
4303		var tabIndex = $.attr( element, "tabindex" ),
4304			hasTabindex = tabIndex != null;
4305		return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
4306	}
4307} );
4308
4309
4310/*!
4311 * jQuery UI Unique ID 1.13.2
4312 * http://jqueryui.com
4313 *
4314 * Copyright jQuery Foundation and other contributors
4315 * Released under the MIT license.
4316 * http://jquery.org/license
4317 */
4318
4319//>>label: uniqueId
4320//>>group: Core
4321//>>description: Functions to generate and remove uniqueId's
4322//>>docs: http://api.jqueryui.com/uniqueId/
4323
4324
4325var uniqueId = $.fn.extend( {
4326	uniqueId: ( function() {
4327		var uuid = 0;
4328
4329		return function() {
4330			return this.each( function() {
4331				if ( !this.id ) {
4332					this.id = "ui-id-" + ( ++uuid );
4333				}
4334			} );
4335		};
4336	} )(),
4337
4338	removeUniqueId: function() {
4339		return this.each( function() {
4340			if ( /^ui-id-\d+$/.test( this.id ) ) {
4341				$( this ).removeAttr( "id" );
4342			}
4343		} );
4344	}
4345} );
4346
4347
4348/*!
4349 * jQuery UI Accordion 1.13.2
4350 * http://jqueryui.com
4351 *
4352 * Copyright jQuery Foundation and other contributors
4353 * Released under the MIT license.
4354 * http://jquery.org/license
4355 */
4356
4357//>>label: Accordion
4358//>>group: Widgets
4359/* eslint-disable max-len */
4360//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
4361/* eslint-enable max-len */
4362//>>docs: http://api.jqueryui.com/accordion/
4363//>>demos: http://jqueryui.com/accordion/
4364//>>css.structure: ../../themes/base/core.css
4365//>>css.structure: ../../themes/base/accordion.css
4366//>>css.theme: ../../themes/base/theme.css
4367
4368
4369var widgetsAccordion = $.widget( "ui.accordion", {
4370	version: "1.13.2",
4371	options: {
4372		active: 0,
4373		animate: {},
4374		classes: {
4375			"ui-accordion-header": "ui-corner-top",
4376			"ui-accordion-header-collapsed": "ui-corner-all",
4377			"ui-accordion-content": "ui-corner-bottom"
4378		},
4379		collapsible: false,
4380		event: "click",
4381		header: function( elem ) {
4382			return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() );
4383		},
4384		heightStyle: "auto",
4385		icons: {
4386			activeHeader: "ui-icon-triangle-1-s",
4387			header: "ui-icon-triangle-1-e"
4388		},
4389
4390		// Callbacks
4391		activate: null,
4392		beforeActivate: null
4393	},
4394
4395	hideProps: {
4396		borderTopWidth: "hide",
4397		borderBottomWidth: "hide",
4398		paddingTop: "hide",
4399		paddingBottom: "hide",
4400		height: "hide"
4401	},
4402
4403	showProps: {
4404		borderTopWidth: "show",
4405		borderBottomWidth: "show",
4406		paddingTop: "show",
4407		paddingBottom: "show",
4408		height: "show"
4409	},
4410
4411	_create: function() {
4412		var options = this.options;
4413
4414		this.prevShow = this.prevHide = $();
4415		this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
4416		this.element.attr( "role", "tablist" );
4417
4418		// Don't allow collapsible: false and active: false / null
4419		if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
4420			options.active = 0;
4421		}
4422
4423		this._processPanels();
4424
4425		// handle negative values
4426		if ( options.active < 0 ) {
4427			options.active += this.headers.length;
4428		}
4429		this._refresh();
4430	},
4431
4432	_getCreateEventData: function() {
4433		return {
4434			header: this.active,
4435			panel: !this.active.length ? $() : this.active.next()
4436		};
4437	},
4438
4439	_createIcons: function() {
4440		var icon, children,
4441			icons = this.options.icons;
4442
4443		if ( icons ) {
4444			icon = $( "<span>" );
4445			this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
4446			icon.prependTo( this.headers );
4447			children = this.active.children( ".ui-accordion-header-icon" );
4448			this._removeClass( children, icons.header )
4449				._addClass( children, null, icons.activeHeader )
4450				._addClass( this.headers, "ui-accordion-icons" );
4451		}
4452	},
4453
4454	_destroyIcons: function() {
4455		this._removeClass( this.headers, "ui-accordion-icons" );
4456		this.headers.children( ".ui-accordion-header-icon" ).remove();
4457	},
4458
4459	_destroy: function() {
4460		var contents;
4461
4462		// Clean up main element
4463		this.element.removeAttr( "role" );
4464
4465		// Clean up headers
4466		this.headers
4467			.removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
4468			.removeUniqueId();
4469
4470		this._destroyIcons();
4471
4472		// Clean up content panels
4473		contents = this.headers.next()
4474			.css( "display", "" )
4475			.removeAttr( "role aria-hidden aria-labelledby" )
4476			.removeUniqueId();
4477
4478		if ( this.options.heightStyle !== "content" ) {
4479			contents.css( "height", "" );
4480		}
4481	},
4482
4483	_setOption: function( key, value ) {
4484		if ( key === "active" ) {
4485
4486			// _activate() will handle invalid values and update this.options
4487			this._activate( value );
4488			return;
4489		}
4490
4491		if ( key === "event" ) {
4492			if ( this.options.event ) {
4493				this._off( this.headers, this.options.event );
4494			}
4495			this._setupEvents( value );
4496		}
4497
4498		this._super( key, value );
4499
4500		// Setting collapsible: false while collapsed; open first panel
4501		if ( key === "collapsible" && !value && this.options.active === false ) {
4502			this._activate( 0 );
4503		}
4504
4505		if ( key === "icons" ) {
4506			this._destroyIcons();
4507			if ( value ) {
4508				this._createIcons();
4509			}
4510		}
4511	},
4512
4513	_setOptionDisabled: function( value ) {
4514		this._super( value );
4515
4516		this.element.attr( "aria-disabled", value );
4517
4518		// Support: IE8 Only
4519		// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
4520		// so we need to add the disabled class to the headers and panels
4521		this._toggleClass( null, "ui-state-disabled", !!value );
4522		this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
4523			!!value );
4524	},
4525
4526	_keydown: function( event ) {
4527		if ( event.altKey || event.ctrlKey ) {
4528			return;
4529		}
4530
4531		var keyCode = $.ui.keyCode,
4532			length = this.headers.length,
4533			currentIndex = this.headers.index( event.target ),
4534			toFocus = false;
4535
4536		switch ( event.keyCode ) {
4537		case keyCode.RIGHT:
4538		case keyCode.DOWN:
4539			toFocus = this.headers[ ( currentIndex + 1 ) % length ];
4540			break;
4541		case keyCode.LEFT:
4542		case keyCode.UP:
4543			toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
4544			break;
4545		case keyCode.SPACE:
4546		case keyCode.ENTER:
4547			this._eventHandler( event );
4548			break;
4549		case keyCode.HOME:
4550			toFocus = this.headers[ 0 ];
4551			break;
4552		case keyCode.END:
4553			toFocus = this.headers[ length - 1 ];
4554			break;
4555		}
4556
4557		if ( toFocus ) {
4558			$( event.target ).attr( "tabIndex", -1 );
4559			$( toFocus ).attr( "tabIndex", 0 );
4560			$( toFocus ).trigger( "focus" );
4561			event.preventDefault();
4562		}
4563	},
4564
4565	_panelKeyDown: function( event ) {
4566		if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
4567			$( event.currentTarget ).prev().trigger( "focus" );
4568		}
4569	},
4570
4571	refresh: function() {
4572		var options = this.options;
4573		this._processPanels();
4574
4575		// Was collapsed or no panel
4576		if ( ( options.active === false && options.collapsible === true ) ||
4577				!this.headers.length ) {
4578			options.active = false;
4579			this.active = $();
4580
4581		// active false only when collapsible is true
4582		} else if ( options.active === false ) {
4583			this._activate( 0 );
4584
4585		// was active, but active panel is gone
4586		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
4587
4588			// all remaining panel are disabled
4589			if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
4590				options.active = false;
4591				this.active = $();
4592
4593			// activate previous panel
4594			} else {
4595				this._activate( Math.max( 0, options.active - 1 ) );
4596			}
4597
4598		// was active, active panel still exists
4599		} else {
4600
4601			// make sure active index is correct
4602			options.active = this.headers.index( this.active );
4603		}
4604
4605		this._destroyIcons();
4606
4607		this._refresh();
vendor: 6,928 bytes, lines 4608-4849
4608	},
4609
4610	_processPanels: function() {
4611		var prevHeaders = this.headers,
4612			prevPanels = this.panels;
4613
4614		if ( typeof this.options.header === "function" ) {
4615			this.headers = this.options.header( this.element );
4616		} else {
4617			this.headers = this.element.find( this.options.header );
4618		}
4619		this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
4620			"ui-state-default" );
4621
4622		this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
4623		this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );
4624
4625		// Avoid memory leaks (#10056)
4626		if ( prevPanels ) {
4627			this._off( prevHeaders.not( this.headers ) );
4628			this._off( prevPanels.not( this.panels ) );
4629		}
4630	},
4631
4632	_refresh: function() {
4633		var maxHeight,
4634			options = this.options,
4635			heightStyle = options.heightStyle,
4636			parent = this.element.parent();
4637
4638		this.active = this._findActive( options.active );
4639		this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
4640			._removeClass( this.active, "ui-accordion-header-collapsed" );
4641		this._addClass( this.active.next(), "ui-accordion-content-active" );
4642		this.active.next().show();
4643
4644		this.headers
4645			.attr( "role", "tab" )
4646			.each( function() {
4647				var header = $( this ),
4648					headerId = header.uniqueId().attr( "id" ),
4649					panel = header.next(),
4650					panelId = panel.uniqueId().attr( "id" );
4651				header.attr( "aria-controls", panelId );
4652				panel.attr( "aria-labelledby", headerId );
4653			} )
4654			.next()
4655				.attr( "role", "tabpanel" );
4656
4657		this.headers
4658			.not( this.active )
4659				.attr( {
4660					"aria-selected": "false",
4661					"aria-expanded": "false",
4662					tabIndex: -1
4663				} )
4664				.next()
4665					.attr( {
4666						"aria-hidden": "true"
4667					} )
4668					.hide();
4669
4670		// Make sure at least one header is in the tab order
4671		if ( !this.active.length ) {
4672			this.headers.eq( 0 ).attr( "tabIndex", 0 );
4673		} else {
4674			this.active.attr( {
4675				"aria-selected": "true",
4676				"aria-expanded": "true",
4677				tabIndex: 0
4678			} )
4679				.next()
4680					.attr( {
4681						"aria-hidden": "false"
4682					} );
4683		}
4684
4685		this._createIcons();
4686
4687		this._setupEvents( options.event );
4688
4689		if ( heightStyle === "fill" ) {
4690			maxHeight = parent.height();
4691			this.element.siblings( ":visible" ).each( function() {
4692				var elem = $( this ),
4693					position = elem.css( "position" );
4694
4695				if ( position === "absolute" || position === "fixed" ) {
4696					return;
4697				}
4698				maxHeight -= elem.outerHeight( true );
4699			} );
4700
4701			this.headers.each( function() {
4702				maxHeight -= $( this ).outerHeight( true );
4703			} );
4704
4705			this.headers.next()
4706				.each( function() {
4707					$( this ).height( Math.max( 0, maxHeight -
4708						$( this ).innerHeight() + $( this ).height() ) );
4709				} )
4710				.css( "overflow", "auto" );
4711		} else if ( heightStyle === "auto" ) {
4712			maxHeight = 0;
4713			this.headers.next()
4714				.each( function() {
4715					var isVisible = $( this ).is( ":visible" );
4716					if ( !isVisible ) {
4717						$( this ).show();
4718					}
4719					maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
4720					if ( !isVisible ) {
4721						$( this ).hide();
4722					}
4723				} )
4724				.height( maxHeight );
4725		}
4726	},
4727
4728	_activate: function( index ) {
4729		var active = this._findActive( index )[ 0 ];
4730
4731		// Trying to activate the already active panel
4732		if ( active === this.active[ 0 ] ) {
4733			return;
4734		}
4735
4736		// Trying to collapse, simulate a click on the currently active header
4737		active = active || this.active[ 0 ];
4738
4739		this._eventHandler( {
4740			target: active,
4741			currentTarget: active,
4742			preventDefault: $.noop
4743		} );
4744	},
4745
4746	_findActive: function( selector ) {
4747		return typeof selector === "number" ? this.headers.eq( selector ) : $();
4748	},
4749
4750	_setupEvents: function( event ) {
4751		var events = {
4752			keydown: "_keydown"
4753		};
4754		if ( event ) {
4755			$.each( event.split( " " ), function( index, eventName ) {
4756				events[ eventName ] = "_eventHandler";
4757			} );
4758		}
4759
4760		this._off( this.headers.add( this.headers.next() ) );
4761		this._on( this.headers, events );
4762		this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
4763		this._hoverable( this.headers );
4764		this._focusable( this.headers );
4765	},
4766
4767	_eventHandler: function( event ) {
4768		var activeChildren, clickedChildren,
4769			options = this.options,
4770			active = this.active,
4771			clicked = $( event.currentTarget ),
4772			clickedIsActive = clicked[ 0 ] === active[ 0 ],
4773			collapsing = clickedIsActive && options.collapsible,
4774			toShow = collapsing ? $() : clicked.next(),
4775			toHide = active.next(),
4776			eventData = {
4777				oldHeader: active,
4778				oldPanel: toHide,
4779				newHeader: collapsing ? $() : clicked,
4780				newPanel: toShow
4781			};
4782
4783		event.preventDefault();
4784
4785		if (
4786
4787				// click on active header, but not collapsible
4788				( clickedIsActive && !options.collapsible ) ||
4789
4790				// allow canceling activation
4791				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
4792			return;
4793		}
4794
4795		options.active = collapsing ? false : this.headers.index( clicked );
4796
4797		// When the call to ._toggle() comes after the class changes
4798		// it causes a very odd bug in IE 8 (see #6720)
4799		this.active = clickedIsActive ? $() : clicked;
4800		this._toggle( eventData );
4801
4802		// Switch classes
4803		// corner classes on the previously active header stay after the animation
4804		this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
4805		if ( options.icons ) {
4806			activeChildren = active.children( ".ui-accordion-header-icon" );
4807			this._removeClass( activeChildren, null, options.icons.activeHeader )
4808				._addClass( activeChildren, null, options.icons.header );
4809		}
4810
4811		if ( !clickedIsActive ) {
4812			this._removeClass( clicked, "ui-accordion-header-collapsed" )
4813				._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
4814			if ( options.icons ) {
4815				clickedChildren = clicked.children( ".ui-accordion-header-icon" );
4816				this._removeClass( clickedChildren, null, options.icons.header )
4817					._addClass( clickedChildren, null, options.icons.activeHeader );
4818			}
4819
4820			this._addClass( clicked.next(), "ui-accordion-content-active" );
4821		}
4822	},
4823
4824	_toggle: function( data ) {
4825		var toShow = data.newPanel,
4826			toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
4827
4828		// Handle activating a panel during the animation for another activation
4829		this.prevShow.add( this.prevHide ).stop( true, true );
4830		this.prevShow = toShow;
4831		this.prevHide = toHide;
4832
4833		if ( this.options.animate ) {
4834			this._animate( toShow, toHide, data );
4835		} else {
4836			toHide.hide();
4837			toShow.show();
4838			this._toggleComplete( data );
4839		}
4840
4841		toHide.attr( {
4842			"aria-hidden": "true"
4843		} );
4844		toHide.prev().attr( {
4845			"aria-selected": "false",
4846			"aria-expanded": "false"
4847		} );
4848
4849		// if we're switching panels, remove the old header from the tab order
vendor: 6,870 bytes, lines 4850-5101
4850		// if we're opening from collapsed state, remove the previous header from the tab order
4851		// if we're collapsing, then keep the collapsing header in the tab order
4852		if ( toShow.length && toHide.length ) {
4853			toHide.prev().attr( {
4854				"tabIndex": -1,
4855				"aria-expanded": "false"
4856			} );
4857		} else if ( toShow.length ) {
4858			this.headers.filter( function() {
4859				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
4860			} )
4861				.attr( "tabIndex", -1 );
4862		}
4863
4864		toShow
4865			.attr( "aria-hidden", "false" )
4866			.prev()
4867				.attr( {
4868					"aria-selected": "true",
4869					"aria-expanded": "true",
4870					tabIndex: 0
4871				} );
4872	},
4873
4874	_animate: function( toShow, toHide, data ) {
4875		var total, easing, duration,
4876			that = this,
4877			adjust = 0,
4878			boxSizing = toShow.css( "box-sizing" ),
4879			down = toShow.length &&
4880				( !toHide.length || ( toShow.index() < toHide.index() ) ),
4881			animate = this.options.animate || {},
4882			options = down && animate.down || animate,
4883			complete = function() {
4884				that._toggleComplete( data );
4885			};
4886
4887		if ( typeof options === "number" ) {
4888			duration = options;
4889		}
4890		if ( typeof options === "string" ) {
4891			easing = options;
4892		}
4893
4894		// fall back from options to animation in case of partial down settings
4895		easing = easing || options.easing || animate.easing;
4896		duration = duration || options.duration || animate.duration;
4897
4898		if ( !toHide.length ) {
4899			return toShow.animate( this.showProps, duration, easing, complete );
4900		}
4901		if ( !toShow.length ) {
4902			return toHide.animate( this.hideProps, duration, easing, complete );
4903		}
4904
4905		total = toShow.show().outerHeight();
4906		toHide.animate( this.hideProps, {
4907			duration: duration,
4908			easing: easing,
4909			step: function( now, fx ) {
4910				fx.now = Math.round( now );
4911			}
4912		} );
4913		toShow
4914			.hide()
4915			.animate( this.showProps, {
4916				duration: duration,
4917				easing: easing,
4918				complete: complete,
4919				step: function( now, fx ) {
4920					fx.now = Math.round( now );
4921					if ( fx.prop !== "height" ) {
4922						if ( boxSizing === "content-box" ) {
4923							adjust += fx.now;
4924						}
4925					} else if ( that.options.heightStyle !== "content" ) {
4926						fx.now = Math.round( total - toHide.outerHeight() - adjust );
4927						adjust = 0;
4928					}
4929				}
4930			} );
4931	},
4932
4933	_toggleComplete: function( data ) {
4934		var toHide = data.oldPanel,
4935			prev = toHide.prev();
4936
4937		this._removeClass( toHide, "ui-accordion-content-active" );
4938		this._removeClass( prev, "ui-accordion-header-active" )
4939			._addClass( prev, "ui-accordion-header-collapsed" );
4940
4941		// Work around for rendering bug in IE (#5421)
4942		if ( toHide.length ) {
4943			toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
4944		}
4945		this._trigger( "activate", null, data );
4946	}
4947} );
4948
4949
4950
4951var safeActiveElement = $.ui.safeActiveElement = function( document ) {
4952	var activeElement;
4953
4954	// Support: IE 9 only
4955	// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
4956	try {
4957		activeElement = document.activeElement;
4958	} catch ( error ) {
4959		activeElement = document.body;
4960	}
4961
4962	// Support: IE 9 - 11 only
4963	// IE may return null instead of an element
4964	// Interestingly, this only seems to occur when NOT in an iframe
4965	if ( !activeElement ) {
4966		activeElement = document.body;
4967	}
4968
4969	// Support: IE 11 only
4970	// IE11 returns a seemingly empty object in some cases when accessing
4971	// document.activeElement from an <iframe>
4972	if ( !activeElement.nodeName ) {
4973		activeElement = document.body;
4974	}
4975
4976	return activeElement;
4977};
4978
4979
4980/*!
4981 * jQuery UI Menu 1.13.2
4982 * http://jqueryui.com
4983 *
4984 * Copyright jQuery Foundation and other contributors
4985 * Released under the MIT license.
4986 * http://jquery.org/license
4987 */
4988
4989//>>label: Menu
4990//>>group: Widgets
4991//>>description: Creates nestable menus.
4992//>>docs: http://api.jqueryui.com/menu/
4993//>>demos: http://jqueryui.com/menu/
4994//>>css.structure: ../../themes/base/core.css
4995//>>css.structure: ../../themes/base/menu.css
4996//>>css.theme: ../../themes/base/theme.css
4997
4998
4999var widgetsMenu = $.widget( "ui.menu", {
5000	version: "1.13.2",
5001	defaultElement: "<ul>",
5002	delay: 300,
5003	options: {
5004		icons: {
5005			submenu: "ui-icon-caret-1-e"
5006		},
5007		items: "> *",
5008		menus: "ul",
5009		position: {
5010			my: "left top",
5011			at: "right top"
5012		},
5013		role: "menu",
5014
5015		// Callbacks
5016		blur: null,
5017		focus: null,
5018		select: null
5019	},
5020
5021	_create: function() {
5022		this.activeMenu = this.element;
5023
5024		// Flag used to prevent firing of the click handler
5025		// as the event bubbles up through nested menus
5026		this.mouseHandled = false;
5027		this.lastMousePosition = { x: null, y: null };
5028		this.element
5029			.uniqueId()
5030			.attr( {
5031				role: this.options.role,
5032				tabIndex: 0
5033			} );
5034
5035		this._addClass( "ui-menu", "ui-widget ui-widget-content" );
5036		this._on( {
5037
5038			// Prevent focus from sticking to links inside menu after clicking
5039			// them (focus should always stay on UL during navigation).
5040			"mousedown .ui-menu-item": function( event ) {
5041				event.preventDefault();
5042
5043				this._activateItem( event );
5044			},
5045			"click .ui-menu-item": function( event ) {
5046				var target = $( event.target );
5047				var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
5048				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
5049					this.select( event );
5050
5051					// Only set the mouseHandled flag if the event will bubble, see #9469.
5052					if ( !event.isPropagationStopped() ) {
5053						this.mouseHandled = true;
5054					}
5055
5056					// Open submenu on click
5057					if ( target.has( ".ui-menu" ).length ) {
5058						this.expand( event );
5059					} else if ( !this.element.is( ":focus" ) &&
5060							active.closest( ".ui-menu" ).length ) {
5061
5062						// Redirect focus to the menu
5063						this.element.trigger( "focus", [ true ] );
5064
5065						// If the active item is on the top level, let it stay active.
5066						// Otherwise, blur the active item since it is no longer visible.
5067						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
5068							clearTimeout( this.timer );
5069						}
5070					}
5071				}
5072			},
5073			"mouseenter .ui-menu-item": "_activateItem",
5074			"mousemove .ui-menu-item": "_activateItem",
5075			mouseleave: "collapseAll",
5076			"mouseleave .ui-menu": "collapseAll",
5077			focus: function( event, keepActiveItem ) {
5078
5079				// If there's already an active item, keep it active
5080				// If not, activate the first item
5081				var item = this.active || this._menuItems().first();
5082
5083				if ( !keepActiveItem ) {
5084					this.focus( event, item );
5085				}
5086			},
5087			blur: function( event ) {
5088				this._delay( function() {
5089					var notContained = !$.contains(
5090						this.element[ 0 ],
5091						$.ui.safeActiveElement( this.document[ 0 ] )
5092					);
5093					if ( notContained ) {
5094						this.collapseAll( event );
5095					}
5096				} );
5097			},
5098			keydown: "_keydown"
5099		} );
5100
5101		this.refresh();
vendor: 13,612 bytes, lines 5102-5590
5102
5103		// Clicks outside of a menu collapse any open menus
5104		this._on( this.document, {
5105			click: function( event ) {
5106				if ( this._closeOnDocumentClick( event ) ) {
5107					this.collapseAll( event, true );
5108				}
5109
5110				// Reset the mouseHandled flag
5111				this.mouseHandled = false;
5112			}
5113		} );
5114	},
5115
5116	_activateItem: function( event ) {
5117
5118		// Ignore mouse events while typeahead is active, see #10458.
5119		// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
5120		// is over an item in the menu
5121		if ( this.previousFilter ) {
5122			return;
5123		}
5124
5125		// If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
5126		if ( event.clientX === this.lastMousePosition.x &&
5127				event.clientY === this.lastMousePosition.y ) {
5128			return;
5129		}
5130
5131		this.lastMousePosition = {
5132			x: event.clientX,
5133			y: event.clientY
5134		};
5135
5136		var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
5137			target = $( event.currentTarget );
5138
5139		// Ignore bubbled events on parent items, see #11641
5140		if ( actualTarget[ 0 ] !== target[ 0 ] ) {
5141			return;
5142		}
5143
5144		// If the item is already active, there's nothing to do
5145		if ( target.is( ".ui-state-active" ) ) {
5146			return;
5147		}
5148
5149		// Remove ui-state-active class from siblings of the newly focused menu item
5150		// to avoid a jump caused by adjacent elements both having a class with a border
5151		this._removeClass( target.siblings().children( ".ui-state-active" ),
5152			null, "ui-state-active" );
5153		this.focus( event, target );
5154	},
5155
5156	_destroy: function() {
5157		var items = this.element.find( ".ui-menu-item" )
5158				.removeAttr( "role aria-disabled" ),
5159			submenus = items.children( ".ui-menu-item-wrapper" )
5160				.removeUniqueId()
5161				.removeAttr( "tabIndex role aria-haspopup" );
5162
5163		// Destroy (sub)menus
5164		this.element
5165			.removeAttr( "aria-activedescendant" )
5166			.find( ".ui-menu" ).addBack()
5167				.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
5168					"tabIndex" )
5169				.removeUniqueId()
5170				.show();
5171
5172		submenus.children().each( function() {
5173			var elem = $( this );
5174			if ( elem.data( "ui-menu-submenu-caret" ) ) {
5175				elem.remove();
5176			}
5177		} );
5178	},
5179
5180	_keydown: function( event ) {
5181		var match, prev, character, skip,
5182			preventDefault = true;
5183
5184		switch ( event.keyCode ) {
5185		case $.ui.keyCode.PAGE_UP:
5186			this.previousPage( event );
5187			break;
5188		case $.ui.keyCode.PAGE_DOWN:
5189			this.nextPage( event );
5190			break;
5191		case $.ui.keyCode.HOME:
5192			this._move( "first", "first", event );
5193			break;
5194		case $.ui.keyCode.END:
5195			this._move( "last", "last", event );
5196			break;
5197		case $.ui.keyCode.UP:
5198			this.previous( event );
5199			break;
5200		case $.ui.keyCode.DOWN:
5201			this.next( event );
5202			break;
5203		case $.ui.keyCode.LEFT:
5204			this.collapse( event );
5205			break;
5206		case $.ui.keyCode.RIGHT:
5207			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
5208				this.expand( event );
5209			}
5210			break;
5211		case $.ui.keyCode.ENTER:
5212		case $.ui.keyCode.SPACE:
5213			this._activate( event );
5214			break;
5215		case $.ui.keyCode.ESCAPE:
5216			this.collapse( event );
5217			break;
5218		default:
5219			preventDefault = false;
5220			prev = this.previousFilter || "";
5221			skip = false;
5222
5223			// Support number pad values
5224			character = event.keyCode >= 96 && event.keyCode <= 105 ?
5225				( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
5226
5227			clearTimeout( this.filterTimer );
5228
5229			if ( character === prev ) {
5230				skip = true;
5231			} else {
5232				character = prev + character;
5233			}
5234
5235			match = this._filterMenuItems( character );
5236			match = skip && match.index( this.active.next() ) !== -1 ?
5237				this.active.nextAll( ".ui-menu-item" ) :
5238				match;
5239
5240			// If no matches on the current filter, reset to the last character pressed
5241			// to move down the menu to the first item that starts with that character
5242			if ( !match.length ) {
5243				character = String.fromCharCode( event.keyCode );
5244				match = this._filterMenuItems( character );
5245			}
5246
5247			if ( match.length ) {
5248				this.focus( event, match );
5249				this.previousFilter = character;
5250				this.filterTimer = this._delay( function() {
5251					delete this.previousFilter;
5252				}, 1000 );
5253			} else {
5254				delete this.previousFilter;
5255			}
5256		}
5257
5258		if ( preventDefault ) {
5259			event.preventDefault();
5260		}
5261	},
5262
5263	_activate: function( event ) {
5264		if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
5265			if ( this.active.children( "[aria-haspopup='true']" ).length ) {
5266				this.expand( event );
5267			} else {
5268				this.select( event );
5269			}
5270		}
5271	},
5272
5273	refresh: function() {
5274		var menus, items, newSubmenus, newItems, newWrappers,
5275			that = this,
5276			icon = this.options.icons.submenu,
5277			submenus = this.element.find( this.options.menus );
5278
5279		this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
5280
5281		// Initialize nested menus
5282		newSubmenus = submenus.filter( ":not(.ui-menu)" )
5283			.hide()
5284			.attr( {
5285				role: this.options.role,
5286				"aria-hidden": "true",
5287				"aria-expanded": "false"
5288			} )
5289			.each( function() {
5290				var menu = $( this ),
5291					item = menu.prev(),
5292					submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
5293
5294				that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
5295				item
5296					.attr( "aria-haspopup", "true" )
5297					.prepend( submenuCaret );
5298				menu.attr( "aria-labelledby", item.attr( "id" ) );
5299			} );
5300
5301		this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
5302
5303		menus = submenus.add( this.element );
5304		items = menus.find( this.options.items );
5305
5306		// Initialize menu-items containing spaces and/or dashes only as dividers
5307		items.not( ".ui-menu-item" ).each( function() {
5308			var item = $( this );
5309			if ( that._isDivider( item ) ) {
5310				that._addClass( item, "ui-menu-divider", "ui-widget-content" );
5311			}
5312		} );
5313
5314		// Don't refresh list items that are already adapted
5315		newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
5316		newWrappers = newItems.children()
5317			.not( ".ui-menu" )
5318				.uniqueId()
5319				.attr( {
5320					tabIndex: -1,
5321					role: this._itemRole()
5322				} );
5323		this._addClass( newItems, "ui-menu-item" )
5324			._addClass( newWrappers, "ui-menu-item-wrapper" );
5325
5326		// Add aria-disabled attribute to any disabled menu item
5327		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
5328
5329		// If the active item has been removed, blur the menu
5330		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
5331			this.blur();
5332		}
5333	},
5334
5335	_itemRole: function() {
5336		return {
5337			menu: "menuitem",
5338			listbox: "option"
5339		}[ this.options.role ];
5340	},
5341
5342	_setOption: function( key, value ) {
5343		if ( key === "icons" ) {
5344			var icons = this.element.find( ".ui-menu-icon" );
5345			this._removeClass( icons, null, this.options.icons.submenu )
5346				._addClass( icons, null, value.submenu );
5347		}
5348		this._super( key, value );
5349	},
5350
5351	_setOptionDisabled: function( value ) {
5352		this._super( value );
5353
5354		this.element.attr( "aria-disabled", String( value ) );
5355		this._toggleClass( null, "ui-state-disabled", !!value );
5356	},
5357
5358	focus: function( event, item ) {
5359		var nested, focused, activeParent;
5360		this.blur( event, event && event.type === "focus" );
5361
5362		this._scrollIntoView( item );
5363
5364		this.active = item.first();
5365
5366		focused = this.active.children( ".ui-menu-item-wrapper" );
5367		this._addClass( focused, null, "ui-state-active" );
5368
5369		// Only update aria-activedescendant if there's a role
5370		// otherwise we assume focus is managed elsewhere
5371		if ( this.options.role ) {
5372			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
5373		}
5374
5375		// Highlight active parent menu item, if any
5376		activeParent = this.active
5377			.parent()
5378				.closest( ".ui-menu-item" )
5379					.children( ".ui-menu-item-wrapper" );
5380		this._addClass( activeParent, null, "ui-state-active" );
5381
5382		if ( event && event.type === "keydown" ) {
5383			this._close();
5384		} else {
5385			this.timer = this._delay( function() {
5386				this._close();
5387			}, this.delay );
5388		}
5389
5390		nested = item.children( ".ui-menu" );
5391		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
5392			this._startOpening( nested );
5393		}
5394		this.activeMenu = item.parent();
5395
5396		this._trigger( "focus", event, { item: item } );
5397	},
5398
5399	_scrollIntoView: function( item ) {
5400		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
5401		if ( this._hasScroll() ) {
5402			borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
5403			paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
5404			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
5405			scroll = this.activeMenu.scrollTop();
5406			elementHeight = this.activeMenu.height();
5407			itemHeight = item.outerHeight();
5408
5409			if ( offset < 0 ) {
5410				this.activeMenu.scrollTop( scroll + offset );
5411			} else if ( offset + itemHeight > elementHeight ) {
5412				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
5413			}
5414		}
5415	},
5416
5417	blur: function( event, fromFocus ) {
5418		if ( !fromFocus ) {
5419			clearTimeout( this.timer );
5420		}
5421
5422		if ( !this.active ) {
5423			return;
5424		}
5425
5426		this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
5427			null, "ui-state-active" );
5428
5429		this._trigger( "blur", event, { item: this.active } );
5430		this.active = null;
5431	},
5432
5433	_startOpening: function( submenu ) {
5434		clearTimeout( this.timer );
5435
5436		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
5437		// shift in the submenu position when mousing over the caret icon
5438		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
5439			return;
5440		}
5441
5442		this.timer = this._delay( function() {
5443			this._close();
5444			this._open( submenu );
5445		}, this.delay );
5446	},
5447
5448	_open: function( submenu ) {
5449		var position = $.extend( {
5450			of: this.active
5451		}, this.options.position );
5452
5453		clearTimeout( this.timer );
5454		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
5455			.hide()
5456			.attr( "aria-hidden", "true" );
5457
5458		submenu
5459			.show()
5460			.removeAttr( "aria-hidden" )
5461			.attr( "aria-expanded", "true" )
5462			.position( position );
5463	},
5464
5465	collapseAll: function( event, all ) {
5466		clearTimeout( this.timer );
5467		this.timer = this._delay( function() {
5468
5469			// If we were passed an event, look for the submenu that contains the event
5470			var currentMenu = all ? this.element :
5471				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
5472
5473			// If we found no valid submenu ancestor, use the main menu to close all
5474			// sub menus anyway
5475			if ( !currentMenu.length ) {
5476				currentMenu = this.element;
5477			}
5478
5479			this._close( currentMenu );
5480
5481			this.blur( event );
5482
5483			// Work around active item staying active after menu is blurred
5484			this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
5485
5486			this.activeMenu = currentMenu;
5487		}, all ? 0 : this.delay );
5488	},
5489
5490	// With no arguments, closes the currently active menu - if nothing is active
5491	// it closes all menus.  If passed an argument, it will search for menus BELOW
5492	_close: function( startMenu ) {
5493		if ( !startMenu ) {
5494			startMenu = this.active ? this.active.parent() : this.element;
5495		}
5496
5497		startMenu.find( ".ui-menu" )
5498			.hide()
5499			.attr( "aria-hidden", "true" )
5500			.attr( "aria-expanded", "false" );
5501	},
5502
5503	_closeOnDocumentClick: function( event ) {
5504		return !$( event.target ).closest( ".ui-menu" ).length;
5505	},
5506
5507	_isDivider: function( item ) {
5508
5509		// Match hyphen, em dash, en dash
5510		return !/[^\-\u2014\u2013\s]/.test( item.text() );
5511	},
5512
5513	collapse: function( event ) {
5514		var newItem = this.active &&
5515			this.active.parent().closest( ".ui-menu-item", this.element );
5516		if ( newItem && newItem.length ) {
5517			this._close();
5518			this.focus( event, newItem );
5519		}
5520	},
5521
5522	expand: function( event ) {
5523		var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first();
5524
5525		if ( newItem && newItem.length ) {
5526			this._open( newItem.parent() );
5527
5528			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
5529			this._delay( function() {
5530				this.focus( event, newItem );
5531			} );
5532		}
5533	},
5534
5535	next: function( event ) {
5536		this._move( "next", "first", event );
5537	},
5538
5539	previous: function( event ) {
5540		this._move( "prev", "last", event );
5541	},
5542
5543	isFirstItem: function() {
5544		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
5545	},
5546
5547	isLastItem: function() {
5548		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
5549	},
5550
5551	_menuItems: function( menu ) {
5552		return ( menu || this.element )
5553			.find( this.options.items )
5554			.filter( ".ui-menu-item" );
5555	},
5556
5557	_move: function( direction, filter, event ) {
5558		var next;
5559		if ( this.active ) {
5560			if ( direction === "first" || direction === "last" ) {
5561				next = this.active
5562					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
5563					.last();
5564			} else {
5565				next = this.active
5566					[ direction + "All" ]( ".ui-menu-item" )
5567					.first();
5568			}
5569		}
5570		if ( !next || !next.length || !this.active ) {
5571			next = this._menuItems( this.activeMenu )[ filter ]();
5572		}
5573
5574		this.focus( event, next );
5575	},
5576
5577	nextPage: function( event ) {
5578		var item, base, height;
5579
5580		if ( !this.active ) {
5581			this.next( event );
5582			return;
5583		}
5584		if ( this.isLastItem() ) {
5585			return;
5586		}
5587		if ( this._hasScroll() ) {
5588			base = this.active.offset().top;
5589			height = this.element.innerHeight();
5590
vendor: 20,225 bytes, lines 5591-6329
5591			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
5592			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
5593				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
5594			}
5595
5596			this.active.nextAll( ".ui-menu-item" ).each( function() {
5597				item = $( this );
5598				return item.offset().top - base - height < 0;
5599			} );
5600
5601			this.focus( event, item );
5602		} else {
5603			this.focus( event, this._menuItems( this.activeMenu )
5604				[ !this.active ? "first" : "last" ]() );
5605		}
5606	},
5607
5608	previousPage: function( event ) {
5609		var item, base, height;
5610		if ( !this.active ) {
5611			this.next( event );
5612			return;
5613		}
5614		if ( this.isFirstItem() ) {
5615			return;
5616		}
5617		if ( this._hasScroll() ) {
5618			base = this.active.offset().top;
5619			height = this.element.innerHeight();
5620
5621			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
5622			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
5623				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
5624			}
5625
5626			this.active.prevAll( ".ui-menu-item" ).each( function() {
5627				item = $( this );
5628				return item.offset().top - base + height > 0;
5629			} );
5630
5631			this.focus( event, item );
5632		} else {
5633			this.focus( event, this._menuItems( this.activeMenu ).first() );
5634		}
5635	},
5636
5637	_hasScroll: function() {
5638		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
5639	},
5640
5641	select: function( event ) {
5642
5643		// TODO: It should never be possible to not have an active item at this
5644		// point, but the tests don't trigger mouseenter before click.
5645		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
5646		var ui = { item: this.active };
5647		if ( !this.active.has( ".ui-menu" ).length ) {
5648			this.collapseAll( event, true );
5649		}
5650		this._trigger( "select", event, ui );
5651	},
5652
5653	_filterMenuItems: function( character ) {
5654		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
5655			regex = new RegExp( "^" + escapedCharacter, "i" );
5656
5657		return this.activeMenu
5658			.find( this.options.items )
5659
5660				// Only match on items, not dividers or other content (#10571)
5661				.filter( ".ui-menu-item" )
5662					.filter( function() {
5663						return regex.test(
5664							String.prototype.trim.call(
5665								$( this ).children( ".ui-menu-item-wrapper" ).text() ) );
5666					} );
5667	}
5668} );
5669
5670
5671/*!
5672 * jQuery UI Autocomplete 1.13.2
5673 * http://jqueryui.com
5674 *
5675 * Copyright jQuery Foundation and other contributors
5676 * Released under the MIT license.
5677 * http://jquery.org/license
5678 */
5679
5680//>>label: Autocomplete
5681//>>group: Widgets
5682//>>description: Lists suggested words as the user is typing.
5683//>>docs: http://api.jqueryui.com/autocomplete/
5684//>>demos: http://jqueryui.com/autocomplete/
5685//>>css.structure: ../../themes/base/core.css
5686//>>css.structure: ../../themes/base/autocomplete.css
5687//>>css.theme: ../../themes/base/theme.css
5688
5689
5690$.widget( "ui.autocomplete", {
5691	version: "1.13.2",
5692	defaultElement: "<input>",
5693	options: {
5694		appendTo: null,
5695		autoFocus: false,
5696		delay: 300,
5697		minLength: 1,
5698		position: {
5699			my: "left top",
5700			at: "left bottom",
5701			collision: "none"
5702		},
5703		source: null,
5704
5705		// Callbacks
5706		change: null,
5707		close: null,
5708		focus: null,
5709		open: null,
5710		response: null,
5711		search: null,
5712		select: null
5713	},
5714
5715	requestIndex: 0,
5716	pending: 0,
5717	liveRegionTimer: null,
5718
5719	_create: function() {
5720
5721		// Some browsers only repeat keydown events, not keypress events,
5722		// so we use the suppressKeyPress flag to determine if we've already
5723		// handled the keydown event. #7269
5724		// Unfortunately the code for & in keypress is the same as the up arrow,
5725		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
5726		// events when we know the keydown event was used to modify the
5727		// search term. #7799
5728		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
5729			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
5730			isTextarea = nodeName === "textarea",
5731			isInput = nodeName === "input";
5732
5733		// Textareas are always multi-line
5734		// Inputs are always single-line, even if inside a contentEditable element
5735		// IE also treats inputs as contentEditable
5736		// All other element types are determined by whether or not they're contentEditable
5737		this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
5738
5739		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
5740		this.isNewMenu = true;
5741
5742		this._addClass( "ui-autocomplete-input" );
5743		this.element.attr( "autocomplete", "off" );
5744
5745		this._on( this.element, {
5746			keydown: function( event ) {
5747				if ( this.element.prop( "readOnly" ) ) {
5748					suppressKeyPress = true;
5749					suppressInput = true;
5750					suppressKeyPressRepeat = true;
5751					return;
5752				}
5753
5754				suppressKeyPress = false;
5755				suppressInput = false;
5756				suppressKeyPressRepeat = false;
5757				var keyCode = $.ui.keyCode;
5758				switch ( event.keyCode ) {
5759				case keyCode.PAGE_UP:
5760					suppressKeyPress = true;
5761					this._move( "previousPage", event );
5762					break;
5763				case keyCode.PAGE_DOWN:
5764					suppressKeyPress = true;
5765					this._move( "nextPage", event );
5766					break;
5767				case keyCode.UP:
5768					suppressKeyPress = true;
5769					this._keyEvent( "previous", event );
5770					break;
5771				case keyCode.DOWN:
5772					suppressKeyPress = true;
5773					this._keyEvent( "next", event );
5774					break;
5775				case keyCode.ENTER:
5776
5777					// when menu is open and has focus
5778					if ( this.menu.active ) {
5779
5780						// #6055 - Opera still allows the keypress to occur
5781						// which causes forms to submit
5782						suppressKeyPress = true;
5783						event.preventDefault();
5784						this.menu.select( event );
5785					}
5786					break;
5787				case keyCode.TAB:
5788					if ( this.menu.active ) {
5789						this.menu.select( event );
5790					}
5791					break;
5792				case keyCode.ESCAPE:
5793					if ( this.menu.element.is( ":visible" ) ) {
5794						if ( !this.isMultiLine ) {
5795							this._value( this.term );
5796						}
5797						this.close( event );
5798
5799						// Different browsers have different default behavior for escape
5800						// Single press can mean undo or clear
5801						// Double press in IE means clear the whole form
5802						event.preventDefault();
5803					}
5804					break;
5805				default:
5806					suppressKeyPressRepeat = true;
5807
5808					// search timeout should be triggered before the input value is changed
5809					this._searchTimeout( event );
5810					break;
5811				}
5812			},
5813			keypress: function( event ) {
5814				if ( suppressKeyPress ) {
5815					suppressKeyPress = false;
5816					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
5817						event.preventDefault();
5818					}
5819					return;
5820				}
5821				if ( suppressKeyPressRepeat ) {
5822					return;
5823				}
5824
5825				// Replicate some key handlers to allow them to repeat in Firefox and Opera
5826				var keyCode = $.ui.keyCode;
5827				switch ( event.keyCode ) {
5828				case keyCode.PAGE_UP:
5829					this._move( "previousPage", event );
5830					break;
5831				case keyCode.PAGE_DOWN:
5832					this._move( "nextPage", event );
5833					break;
5834				case keyCode.UP:
5835					this._keyEvent( "previous", event );
5836					break;
5837				case keyCode.DOWN:
5838					this._keyEvent( "next", event );
5839					break;
5840				}
5841			},
5842			input: function( event ) {
5843				if ( suppressInput ) {
5844					suppressInput = false;
5845					event.preventDefault();
5846					return;
5847				}
5848				this._searchTimeout( event );
5849			},
5850			focus: function() {
5851				this.selectedItem = null;
5852				this.previous = this._value();
5853			},
5854			blur: function( event ) {
5855				clearTimeout( this.searching );
5856				this.close( event );
5857				this._change( event );
5858			}
5859		} );
5860
5861		this._initSource();
5862		this.menu = $( "<ul>" )
5863			.appendTo( this._appendTo() )
5864			.menu( {
5865
5866				// disable ARIA support, the live region takes care of that
5867				role: null
5868			} )
5869			.hide()
5870
5871			// Support: IE 11 only, Edge <= 14
5872			// For other browsers, we preventDefault() on the mousedown event
5873			// to keep the dropdown from taking focus from the input. This doesn't
5874			// work for IE/Edge, causing problems with selection and scrolling (#9638)
5875			// Happily, IE and Edge support an "unselectable" attribute that
5876			// prevents an element from receiving focus, exactly what we want here.
5877			.attr( {
5878				"unselectable": "on"
5879			} )
5880			.menu( "instance" );
5881
5882		this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
5883		this._on( this.menu.element, {
5884			mousedown: function( event ) {
5885
5886				// Prevent moving focus out of the text field
5887				event.preventDefault();
5888			},
5889			menufocus: function( event, ui ) {
5890				var label, item;
5891
5892				// support: Firefox
5893				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
5894				if ( this.isNewMenu ) {
5895					this.isNewMenu = false;
5896					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
5897						this.menu.blur();
5898
5899						this.document.one( "mousemove", function() {
5900							$( event.target ).trigger( event.originalEvent );
5901						} );
5902
5903						return;
5904					}
5905				}
5906
5907				item = ui.item.data( "ui-autocomplete-item" );
5908				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
5909
5910					// use value to match what will end up in the input, if it was a key event
5911					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
5912						this._value( item.value );
5913					}
5914				}
5915
5916				// Announce the value in the liveRegion
5917				label = ui.item.attr( "aria-label" ) || item.value;
5918				if ( label && String.prototype.trim.call( label ).length ) {
5919					clearTimeout( this.liveRegionTimer );
5920					this.liveRegionTimer = this._delay( function() {
5921						this.liveRegion.html( $( "<div>" ).text( label ) );
5922					}, 100 );
5923				}
5924			},
5925			menuselect: function( event, ui ) {
5926				var item = ui.item.data( "ui-autocomplete-item" ),
5927					previous = this.previous;
5928
5929				// Only trigger when focus was lost (click on menu)
5930				if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
5931					this.element.trigger( "focus" );
5932					this.previous = previous;
5933
5934					// #6109 - IE triggers two focus events and the second
5935					// is asynchronous, so we need to reset the previous
5936					// term synchronously and asynchronously :-(
5937					this._delay( function() {
5938						this.previous = previous;
5939						this.selectedItem = item;
5940					} );
5941				}
5942
5943				if ( false !== this._trigger( "select", event, { item: item } ) ) {
5944					this._value( item.value );
5945				}
5946
5947				// reset the term after the select event
5948				// this allows custom select handling to work properly
5949				this.term = this._value();
5950
5951				this.close( event );
5952				this.selectedItem = item;
5953			}
5954		} );
5955
5956		this.liveRegion = $( "<div>", {
5957			role: "status",
5958			"aria-live": "assertive",
5959			"aria-relevant": "additions"
5960		} )
5961			.appendTo( this.document[ 0 ].body );
5962
5963		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
5964
5965		// Turning off autocomplete prevents the browser from remembering the
5966		// value when navigating through history, so we re-enable autocomplete
5967		// if the page is unloaded before the widget is destroyed. #7790
5968		this._on( this.window, {
5969			beforeunload: function() {
5970				this.element.removeAttr( "autocomplete" );
5971			}
5972		} );
5973	},
5974
5975	_destroy: function() {
5976		clearTimeout( this.searching );
5977		this.element.removeAttr( "autocomplete" );
5978		this.menu.element.remove();
5979		this.liveRegion.remove();
5980	},
5981
5982	_setOption: function( key, value ) {
5983		this._super( key, value );
5984		if ( key === "source" ) {
5985			this._initSource();
5986		}
5987		if ( key === "appendTo" ) {
5988			this.menu.element.appendTo( this._appendTo() );
5989		}
5990		if ( key === "disabled" && value && this.xhr ) {
5991			this.xhr.abort();
5992		}
5993	},
5994
5995	_isEventTargetInWidget: function( event ) {
5996		var menuElement = this.menu.element[ 0 ];
5997
5998		return event.target === this.element[ 0 ] ||
5999			event.target === menuElement ||
6000			$.contains( menuElement, event.target );
6001	},
6002
6003	_closeOnClickOutside: function( event ) {
6004		if ( !this._isEventTargetInWidget( event ) ) {
6005			this.close();
6006		}
6007	},
6008
6009	_appendTo: function() {
6010		var element = this.options.appendTo;
6011
6012		if ( element ) {
6013			element = element.jquery || element.nodeType ?
6014				$( element ) :
6015				this.document.find( element ).eq( 0 );
6016		}
6017
6018		if ( !element || !element[ 0 ] ) {
6019			element = this.element.closest( ".ui-front, dialog" );
6020		}
6021
6022		if ( !element.length ) {
6023			element = this.document[ 0 ].body;
6024		}
6025
6026		return element;
6027	},
6028
6029	_initSource: function() {
6030		var array, url,
6031			that = this;
6032		if ( Array.isArray( this.options.source ) ) {
6033			array = this.options.source;
6034			this.source = function( request, response ) {
6035				response( $.ui.autocomplete.filter( array, request.term ) );
6036			};
6037		} else if ( typeof this.options.source === "string" ) {
6038			url = this.options.source;
6039			this.source = function( request, response ) {
6040				if ( that.xhr ) {
6041					that.xhr.abort();
6042				}
6043				that.xhr = $.ajax( {
6044					url: url,
6045					data: request,
6046					dataType: "json",
6047					success: function( data ) {
6048						response( data );
6049					},
6050					error: function() {
6051						response( [] );
6052					}
6053				} );
6054			};
6055		} else {
6056			this.source = this.options.source;
6057		}
6058	},
6059
6060	_searchTimeout: function( event ) {
6061		clearTimeout( this.searching );
6062		this.searching = this._delay( function() {
6063
6064			// Search if the value has changed, or if the user retypes the same value (see #7434)
6065			var equalValues = this.term === this._value(),
6066				menuVisible = this.menu.element.is( ":visible" ),
6067				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
6068
6069			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
6070				this.selectedItem = null;
6071				this.search( null, event );
6072			}
6073		}, this.options.delay );
6074	},
6075
6076	search: function( value, event ) {
6077		value = value != null ? value : this._value();
6078
6079		// Always save the actual value, not the one passed as an argument
6080		this.term = this._value();
6081
6082		if ( value.length < this.options.minLength ) {
6083			return this.close( event );
6084		}
6085
6086		if ( this._trigger( "search", event ) === false ) {
6087			return;
6088		}
6089
6090		return this._search( value );
6091	},
6092
6093	_search: function( value ) {
6094		this.pending++;
6095		this._addClass( "ui-autocomplete-loading" );
6096		this.cancelSearch = false;
6097
6098		this.source( { term: value }, this._response() );
6099	},
6100
6101	_response: function() {
6102		var index = ++this.requestIndex;
6103
6104		return function( content ) {
6105			if ( index === this.requestIndex ) {
6106				this.__response( content );
6107			}
6108
6109			this.pending--;
6110			if ( !this.pending ) {
6111				this._removeClass( "ui-autocomplete-loading" );
6112			}
6113		}.bind( this );
6114	},
6115
6116	__response: function( content ) {
6117		if ( content ) {
6118			content = this._normalize( content );
6119		}
6120		this._trigger( "response", null, { content: content } );
6121		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
6122			this._suggest( content );
6123			this._trigger( "open" );
6124		} else {
6125
6126			// use ._close() instead of .close() so we don't cancel future searches
6127			this._close();
6128		}
6129	},
6130
6131	close: function( event ) {
6132		this.cancelSearch = true;
6133		this._close( event );
6134	},
6135
6136	_close: function( event ) {
6137
6138		// Remove the handler that closes the menu on outside clicks
6139		this._off( this.document, "mousedown" );
6140
6141		if ( this.menu.element.is( ":visible" ) ) {
6142			this.menu.element.hide();
6143			this.menu.blur();
6144			this.isNewMenu = true;
6145			this._trigger( "close", event );
6146		}
6147	},
6148
6149	_change: function( event ) {
6150		if ( this.previous !== this._value() ) {
6151			this._trigger( "change", event, { item: this.selectedItem } );
6152		}
6153	},
6154
6155	_normalize: function( items ) {
6156
6157		// assume all items have the right format when the first item is complete
6158		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
6159			return items;
6160		}
6161		return $.map( items, function( item ) {
6162			if ( typeof item === "string" ) {
6163				return {
6164					label: item,
6165					value: item
6166				};
6167			}
6168			return $.extend( {}, item, {
6169				label: item.label || item.value,
6170				value: item.value || item.label
6171			} );
6172		} );
6173	},
6174
6175	_suggest: function( items ) {
6176		var ul = this.menu.element.empty();
6177		this._renderMenu( ul, items );
6178		this.isNewMenu = true;
6179		this.menu.refresh();
6180
6181		// Size and position menu
6182		ul.show();
6183		this._resizeMenu();
6184		ul.position( $.extend( {
6185			of: this.element
6186		}, this.options.position ) );
6187
6188		if ( this.options.autoFocus ) {
6189			this.menu.next();
6190		}
6191
6192		// Listen for interactions outside of the widget (#6642)
6193		this._on( this.document, {
6194			mousedown: "_closeOnClickOutside"
6195		} );
6196	},
6197
6198	_resizeMenu: function() {
6199		var ul = this.menu.element;
6200		ul.outerWidth( Math.max(
6201
6202			// Firefox wraps long text (possibly a rounding bug)
6203			// so we add 1px to avoid the wrapping (#7513)
6204			ul.width( "" ).outerWidth() + 1,
6205			this.element.outerWidth()
6206		) );
6207	},
6208
6209	_renderMenu: function( ul, items ) {
6210		var that = this;
6211		$.each( items, function( index, item ) {
6212			that._renderItemData( ul, item );
6213		} );
6214	},
6215
6216	_renderItemData: function( ul, item ) {
6217		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
6218	},
6219
6220	_renderItem: function( ul, item ) {
6221		return $( "<li>" )
6222			.append( $( "<div>" ).text( item.label ) )
6223			.appendTo( ul );
6224	},
6225
6226	_move: function( direction, event ) {
6227		if ( !this.menu.element.is( ":visible" ) ) {
6228			this.search( null, event );
6229			return;
6230		}
6231		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
6232				this.menu.isLastItem() && /^next/.test( direction ) ) {
6233
6234			if ( !this.isMultiLine ) {
6235				this._value( this.term );
6236			}
6237
6238			this.menu.blur();
6239			return;
6240		}
6241		this.menu[ direction ]( event );
6242	},
6243
6244	widget: function() {
6245		return this.menu.element;
6246	},
6247
6248	_value: function() {
6249		return this.valueMethod.apply( this.element, arguments );
6250	},
6251
6252	_keyEvent: function( keyEvent, event ) {
6253		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
6254			this._move( keyEvent, event );
6255
6256			// Prevents moving cursor to beginning/end of the text field in some browsers
6257			event.preventDefault();
6258		}
6259	},
6260
6261	// Support: Chrome <=50
6262	// We should be able to just use this.element.prop( "isContentEditable" )
6263	// but hidden elements always report false in Chrome.
6264	// https://code.google.com/p/chromium/issues/detail?id=313082
6265	_isContentEditable: function( element ) {
6266		if ( !element.length ) {
6267			return false;
6268		}
6269
6270		var editable = element.prop( "contentEditable" );
6271
6272		if ( editable === "inherit" ) {
6273			return this._isContentEditable( element.parent() );
6274		}
6275
6276		return editable === "true";
6277	}
6278} );
6279
6280$.extend( $.ui.autocomplete, {
6281	escapeRegex: function( value ) {
6282		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
6283	},
6284	filter: function( array, term ) {
6285		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
6286		return $.grep( array, function( value ) {
6287			return matcher.test( value.label || value.value || value );
6288		} );
6289	}
6290} );
6291
6292// Live region extension, adding a `messages` option
6293// NOTE: This is an experimental API. We are still investigating
6294// a full solution for string manipulation and internationalization.
6295$.widget( "ui.autocomplete", $.ui.autocomplete, {
6296	options: {
6297		messages: {
6298			noResults: "No search results.",
6299			results: function( amount ) {
6300				return amount + ( amount > 1 ? " results are" : " result is" ) +
6301					" available, use up and down arrow keys to navigate.";
6302			}
6303		}
6304	},
6305
6306	__response: function( content ) {
6307		var message;
6308		this._superApply( arguments );
6309		if ( this.options.disabled || this.cancelSearch ) {
6310			return;
6311		}
6312		if ( content && content.length ) {
6313			message = this.options.messages.results( content.length );
6314		} else {
6315			message = this.options.messages.noResults;
6316		}
6317		clearTimeout( this.liveRegionTimer );
6318		this.liveRegionTimer = this._delay( function() {
6319			this.liveRegion.html( $( "<div>" ).text( message ) );
6320		}, 100 );
6321	}
6322} );
6323
6324var widgetsAutocomplete = $.ui.autocomplete;
6325
6326
6327/*!
6328 * jQuery UI Controlgroup 1.13.2
6329 * http://jqueryui.com
vendor: 7,245 bytes, lines 6330-6567
6330 *
6331 * Copyright jQuery Foundation and other contributors
6332 * Released under the MIT license.
6333 * http://jquery.org/license
6334 */
6335
6336//>>label: Controlgroup
6337//>>group: Widgets
6338//>>description: Visually groups form control widgets
6339//>>docs: http://api.jqueryui.com/controlgroup/
6340//>>demos: http://jqueryui.com/controlgroup/
6341//>>css.structure: ../../themes/base/core.css
6342//>>css.structure: ../../themes/base/controlgroup.css
6343//>>css.theme: ../../themes/base/theme.css
6344
6345
6346var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
6347
6348var widgetsControlgroup = $.widget( "ui.controlgroup", {
6349	version: "1.13.2",
6350	defaultElement: "<div>",
6351	options: {
6352		direction: "horizontal",
6353		disabled: null,
6354		onlyVisible: true,
6355		items: {
6356			"button": "input[type=button], input[type=submit], input[type=reset], button, a",
6357			"controlgroupLabel": ".ui-controlgroup-label",
6358			"checkboxradio": "input[type='checkbox'], input[type='radio']",
6359			"selectmenu": "select",
6360			"spinner": ".ui-spinner-input"
6361		}
6362	},
6363
6364	_create: function() {
6365		this._enhance();
6366	},
6367
6368	// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
6369	_enhance: function() {
6370		this.element.attr( "role", "toolbar" );
6371		this.refresh();
6372	},
6373
6374	_destroy: function() {
6375		this._callChildMethod( "destroy" );
6376		this.childWidgets.removeData( "ui-controlgroup-data" );
6377		this.element.removeAttr( "role" );
6378		if ( this.options.items.controlgroupLabel ) {
6379			this.element
6380				.find( this.options.items.controlgroupLabel )
6381				.find( ".ui-controlgroup-label-contents" )
6382				.contents().unwrap();
6383		}
6384	},
6385
6386	_initWidgets: function() {
6387		var that = this,
6388			childWidgets = [];
6389
6390		// First we iterate over each of the items options
6391		$.each( this.options.items, function( widget, selector ) {
6392			var labels;
6393			var options = {};
6394
6395			// Make sure the widget has a selector set
6396			if ( !selector ) {
6397				return;
6398			}
6399
6400			if ( widget === "controlgroupLabel" ) {
6401				labels = that.element.find( selector );
6402				labels.each( function() {
6403					var element = $( this );
6404
6405					if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
6406						return;
6407					}
6408					element.contents()
6409						.wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
6410				} );
6411				that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
6412				childWidgets = childWidgets.concat( labels.get() );
6413				return;
6414			}
6415
6416			// Make sure the widget actually exists
6417			if ( !$.fn[ widget ] ) {
6418				return;
6419			}
6420
6421			// We assume everything is in the middle to start because we can't determine
6422			// first / last elements until all enhancments are done.
6423			if ( that[ "_" + widget + "Options" ] ) {
6424				options = that[ "_" + widget + "Options" ]( "middle" );
6425			} else {
6426				options = { classes: {} };
6427			}
6428
6429			// Find instances of this widget inside controlgroup and init them
6430			that.element
6431				.find( selector )
6432				.each( function() {
6433					var element = $( this );
6434					var instance = element[ widget ]( "instance" );
6435
6436					// We need to clone the default options for this type of widget to avoid
6437					// polluting the variable options which has a wider scope than a single widget.
6438					var instanceOptions = $.widget.extend( {}, options );
6439
6440					// If the button is the child of a spinner ignore it
6441					// TODO: Find a more generic solution
6442					if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
6443						return;
6444					}
6445
6446					// Create the widget if it doesn't exist
6447					if ( !instance ) {
6448						instance = element[ widget ]()[ widget ]( "instance" );
6449					}
6450					if ( instance ) {
6451						instanceOptions.classes =
6452							that._resolveClassesValues( instanceOptions.classes, instance );
6453					}
6454					element[ widget ]( instanceOptions );
6455
6456					// Store an instance of the controlgroup to be able to reference
6457					// from the outermost element for changing options and refresh
6458					var widgetElement = element[ widget ]( "widget" );
6459					$.data( widgetElement[ 0 ], "ui-controlgroup-data",
6460						instance ? instance : element[ widget ]( "instance" ) );
6461
6462					childWidgets.push( widgetElement[ 0 ] );
6463				} );
6464		} );
6465
6466		this.childWidgets = $( $.uniqueSort( childWidgets ) );
6467		this._addClass( this.childWidgets, "ui-controlgroup-item" );
6468	},
6469
6470	_callChildMethod: function( method ) {
6471		this.childWidgets.each( function() {
6472			var element = $( this ),
6473				data = element.data( "ui-controlgroup-data" );
6474			if ( data && data[ method ] ) {
6475				data[ method ]();
6476			}
6477		} );
6478	},
6479
6480	_updateCornerClass: function( element, position ) {
6481		var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
6482		var add = this._buildSimpleOptions( position, "label" ).classes.label;
6483
6484		this._removeClass( element, null, remove );
6485		this._addClass( element, null, add );
6486	},
6487
6488	_buildSimpleOptions: function( position, key ) {
6489		var direction = this.options.direction === "vertical";
6490		var result = {
6491			classes: {}
6492		};
6493		result.classes[ key ] = {
6494			"middle": "",
6495			"first": "ui-corner-" + ( direction ? "top" : "left" ),
6496			"last": "ui-corner-" + ( direction ? "bottom" : "right" ),
6497			"only": "ui-corner-all"
6498		}[ position ];
6499
6500		return result;
6501	},
6502
6503	_spinnerOptions: function( position ) {
6504		var options = this._buildSimpleOptions( position, "ui-spinner" );
6505
6506		options.classes[ "ui-spinner-up" ] = "";
6507		options.classes[ "ui-spinner-down" ] = "";
6508
6509		return options;
6510	},
6511
6512	_buttonOptions: function( position ) {
6513		return this._buildSimpleOptions( position, "ui-button" );
6514	},
6515
6516	_checkboxradioOptions: function( position ) {
6517		return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
6518	},
6519
6520	_selectmenuOptions: function( position ) {
6521		var direction = this.options.direction === "vertical";
6522		return {
6523			width: direction ? "auto" : false,
6524			classes: {
6525				middle: {
6526					"ui-selectmenu-button-open": "",
6527					"ui-selectmenu-button-closed": ""
6528				},
6529				first: {
6530					"ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
6531					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
6532				},
6533				last: {
6534					"ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
6535					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
6536				},
6537				only: {
6538					"ui-selectmenu-button-open": "ui-corner-top",
6539					"ui-selectmenu-button-closed": "ui-corner-all"
6540				}
6541
6542			}[ position ]
6543		};
6544	},
6545
6546	_resolveClassesValues: function( classes, instance ) {
6547		var result = {};
6548		$.each( classes, function( key ) {
6549			var current = instance.options.classes[ key ] || "";
6550			current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
6551			result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
6552		} );
6553		return result;
6554	},
6555
6556	_setOption: function( key, value ) {
6557		if ( key === "direction" ) {
6558			this._removeClass( "ui-controlgroup-" + this.options.direction );
6559		}
6560
6561		this._super( key, value );
6562		if ( key === "disabled" ) {
6563			this._callChildMethod( value ? "disable" : "enable" );
6564			return;
6565		}
6566
6567		this.refresh();
vendor: 6,618 bytes, lines 6568-6796
6568	},
6569
6570	refresh: function() {
6571		var children,
6572			that = this;
6573
6574		this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );
6575
6576		if ( this.options.direction === "horizontal" ) {
6577			this._addClass( null, "ui-helper-clearfix" );
6578		}
6579		this._initWidgets();
6580
6581		children = this.childWidgets;
6582
6583		// We filter here because we need to track all childWidgets not just the visible ones
6584		if ( this.options.onlyVisible ) {
6585			children = children.filter( ":visible" );
6586		}
6587
6588		if ( children.length ) {
6589
6590			// We do this last because we need to make sure all enhancment is done
6591			// before determining first and last
6592			$.each( [ "first", "last" ], function( index, value ) {
6593				var instance = children[ value ]().data( "ui-controlgroup-data" );
6594
6595				if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
6596					var options = that[ "_" + instance.widgetName + "Options" ](
6597						children.length === 1 ? "only" : value
6598					);
6599					options.classes = that._resolveClassesValues( options.classes, instance );
6600					instance.element[ instance.widgetName ]( options );
6601				} else {
6602					that._updateCornerClass( children[ value ](), value );
6603				}
6604			} );
6605
6606			// Finally call the refresh method on each of the child widgets.
6607			this._callChildMethod( "refresh" );
6608		}
6609	}
6610} );
6611
6612/*!
6613 * jQuery UI Checkboxradio 1.13.2
6614 * http://jqueryui.com
6615 *
6616 * Copyright jQuery Foundation and other contributors
6617 * Released under the MIT license.
6618 * http://jquery.org/license
6619 */
6620
6621//>>label: Checkboxradio
6622//>>group: Widgets
6623//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
6624//>>docs: http://api.jqueryui.com/checkboxradio/
6625//>>demos: http://jqueryui.com/checkboxradio/
6626//>>css.structure: ../../themes/base/core.css
6627//>>css.structure: ../../themes/base/button.css
6628//>>css.structure: ../../themes/base/checkboxradio.css
6629//>>css.theme: ../../themes/base/theme.css
6630
6631
6632$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
6633	version: "1.13.2",
6634	options: {
6635		disabled: null,
6636		label: null,
6637		icon: true,
6638		classes: {
6639			"ui-checkboxradio-label": "ui-corner-all",
6640			"ui-checkboxradio-icon": "ui-corner-all"
6641		}
6642	},
6643
6644	_getCreateOptions: function() {
6645		var disabled, labels, labelContents;
6646		var options = this._super() || {};
6647
6648		// We read the type here, because it makes more sense to throw a element type error first,
6649		// rather then the error for lack of a label. Often if its the wrong type, it
6650		// won't have a label (e.g. calling on a div, btn, etc)
6651		this._readType();
6652
6653		labels = this.element.labels();
6654
6655		// If there are multiple labels, use the last one
6656		this.label = $( labels[ labels.length - 1 ] );
6657		if ( !this.label.length ) {
6658			$.error( "No label found for checkboxradio widget" );
6659		}
6660
6661		this.originalLabel = "";
6662
6663		// We need to get the label text but this may also need to make sure it does not contain the
6664		// input itself.
6665		// The label contents could be text, html, or a mix. We wrap all elements
6666		// and read the wrapper's `innerHTML` to get a string representation of
6667		// the label, without the input as part of it.
6668		labelContents = this.label.contents().not( this.element[ 0 ] );
6669
6670		if ( labelContents.length ) {
6671			this.originalLabel += labelContents
6672				.clone()
6673				.wrapAll( "<div></div>" )
6674				.parent()
6675				.html();
6676		}
6677
6678		// Set the label option if we found label text
6679		if ( this.originalLabel ) {
6680			options.label = this.originalLabel;
6681		}
6682
6683		disabled = this.element[ 0 ].disabled;
6684		if ( disabled != null ) {
6685			options.disabled = disabled;
6686		}
6687		return options;
6688	},
6689
6690	_create: function() {
6691		var checked = this.element[ 0 ].checked;
6692
6693		this._bindFormResetHandler();
6694
6695		if ( this.options.disabled == null ) {
6696			this.options.disabled = this.element[ 0 ].disabled;
6697		}
6698
6699		this._setOption( "disabled", this.options.disabled );
6700		this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
6701		this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
6702
6703		if ( this.type === "radio" ) {
6704			this._addClass( this.label, "ui-checkboxradio-radio-label" );
6705		}
6706
6707		if ( this.options.label && this.options.label !== this.originalLabel ) {
6708			this._updateLabel();
6709		} else if ( this.originalLabel ) {
6710			this.options.label = this.originalLabel;
6711		}
6712
6713		this._enhance();
6714
6715		if ( checked ) {
6716			this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
6717		}
6718
6719		this._on( {
6720			change: "_toggleClasses",
6721			focus: function() {
6722				this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
6723			},
6724			blur: function() {
6725				this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
6726			}
6727		} );
6728	},
6729
6730	_readType: function() {
6731		var nodeName = this.element[ 0 ].nodeName.toLowerCase();
6732		this.type = this.element[ 0 ].type;
6733		if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
6734			$.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
6735				" and element.type=" + this.type );
6736		}
6737	},
6738
6739	// Support jQuery Mobile enhanced option
6740	_enhance: function() {
6741		this._updateIcon( this.element[ 0 ].checked );
6742	},
6743
6744	widget: function() {
6745		return this.label;
6746	},
6747
6748	_getRadioGroup: function() {
6749		var group;
6750		var name = this.element[ 0 ].name;
6751		var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
6752
6753		if ( !name ) {
6754			return $( [] );
6755		}
6756
6757		if ( this.form.length ) {
6758			group = $( this.form[ 0 ].elements ).filter( nameSelector );
6759		} else {
6760
6761			// Not inside a form, check all inputs that also are not inside a form
6762			group = $( nameSelector ).filter( function() {
6763				return $( this )._form().length === 0;
6764			} );
6765		}
6766
6767		return group.not( this.element );
6768	},
6769
6770	_toggleClasses: function() {
6771		var checked = this.element[ 0 ].checked;
6772		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
6773
6774		if ( this.options.icon && this.type === "checkbox" ) {
6775			this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
6776				._toggleClass( this.icon, null, "ui-icon-blank", !checked );
6777		}
6778
6779		if ( this.type === "radio" ) {
6780			this._getRadioGroup()
6781				.each( function() {
6782					var instance = $( this ).checkboxradio( "instance" );
6783
6784					if ( instance ) {
6785						instance._removeClass( instance.label,
6786							"ui-checkboxradio-checked", "ui-state-active" );
6787					}
6788				} );
6789		}
6790	},
6791
6792	_destroy: function() {
6793		this._unbindFormResetHandler();
6794
6795		if ( this.icon ) {
6796			this.icon.remove();
vendor: 4,657 bytes, lines 6797-6969
6797			this.iconSpace.remove();
6798		}
6799	},
6800
6801	_setOption: function( key, value ) {
6802
6803		// We don't allow the value to be set to nothing
6804		if ( key === "label" && !value ) {
6805			return;
6806		}
6807
6808		this._super( key, value );
6809
6810		if ( key === "disabled" ) {
6811			this._toggleClass( this.label, null, "ui-state-disabled", value );
6812			this.element[ 0 ].disabled = value;
6813
6814			// Don't refresh when setting disabled
6815			return;
6816		}
6817		this.refresh();
6818	},
6819
6820	_updateIcon: function( checked ) {
6821		var toAdd = "ui-icon ui-icon-background ";
6822
6823		if ( this.options.icon ) {
6824			if ( !this.icon ) {
6825				this.icon = $( "<span>" );
6826				this.iconSpace = $( "<span> </span>" );
6827				this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
6828			}
6829
6830			if ( this.type === "checkbox" ) {
6831				toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
6832				this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
6833			} else {
6834				toAdd += "ui-icon-blank";
6835			}
6836			this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
6837			if ( !checked ) {
6838				this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
6839			}
6840			this.icon.prependTo( this.label ).after( this.iconSpace );
6841		} else if ( this.icon !== undefined ) {
6842			this.icon.remove();
6843			this.iconSpace.remove();
6844			delete this.icon;
6845		}
6846	},
6847
6848	_updateLabel: function() {
6849
6850		// Remove the contents of the label ( minus the icon, icon space, and input )
6851		var contents = this.label.contents().not( this.element[ 0 ] );
6852		if ( this.icon ) {
6853			contents = contents.not( this.icon[ 0 ] );
6854		}
6855		if ( this.iconSpace ) {
6856			contents = contents.not( this.iconSpace[ 0 ] );
6857		}
6858		contents.remove();
6859
6860		this.label.append( this.options.label );
6861	},
6862
6863	refresh: function() {
6864		var checked = this.element[ 0 ].checked,
6865			isDisabled = this.element[ 0 ].disabled;
6866
6867		this._updateIcon( checked );
6868		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
6869		if ( this.options.label !== null ) {
6870			this._updateLabel();
6871		}
6872
6873		if ( isDisabled !== this.options.disabled ) {
6874			this._setOptions( { "disabled": isDisabled } );
6875		}
6876	}
6877
6878} ] );
6879
6880var widgetsCheckboxradio = $.ui.checkboxradio;
6881
6882
6883/*!
6884 * jQuery UI Button 1.13.2
6885 * http://jqueryui.com
6886 *
6887 * Copyright jQuery Foundation and other contributors
6888 * Released under the MIT license.
6889 * http://jquery.org/license
6890 */
6891
6892//>>label: Button
6893//>>group: Widgets
6894//>>description: Enhances a form with themeable buttons.
6895//>>docs: http://api.jqueryui.com/button/
6896//>>demos: http://jqueryui.com/button/
6897//>>css.structure: ../../themes/base/core.css
6898//>>css.structure: ../../themes/base/button.css
6899//>>css.theme: ../../themes/base/theme.css
6900
6901
6902$.widget( "ui.button", {
6903	version: "1.13.2",
6904	defaultElement: "<button>",
6905	options: {
6906		classes: {
6907			"ui-button": "ui-corner-all"
6908		},
6909		disabled: null,
6910		icon: null,
6911		iconPosition: "beginning",
6912		label: null,
6913		showLabel: true
6914	},
6915
6916	_getCreateOptions: function() {
6917		var disabled,
6918
6919			// This is to support cases like in jQuery Mobile where the base widget does have
6920			// an implementation of _getCreateOptions
6921			options = this._super() || {};
6922
6923		this.isInput = this.element.is( "input" );
6924
6925		disabled = this.element[ 0 ].disabled;
6926		if ( disabled != null ) {
6927			options.disabled = disabled;
6928		}
6929
6930		this.originalLabel = this.isInput ? this.element.val() : this.element.html();
6931		if ( this.originalLabel ) {
6932			options.label = this.originalLabel;
6933		}
6934
6935		return options;
6936	},
6937
6938	_create: function() {
6939		if ( !this.option.showLabel & !this.options.icon ) {
6940			this.options.showLabel = true;
6941		}
6942
6943		// We have to check the option again here even though we did in _getCreateOptions,
6944		// because null may have been passed on init which would override what was set in
6945		// _getCreateOptions
6946		if ( this.options.disabled == null ) {
6947			this.options.disabled = this.element[ 0 ].disabled || false;
6948		}
6949
6950		this.hasTitle = !!this.element.attr( "title" );
6951
6952		// Check to see if the label needs to be set or if its already correct
6953		if ( this.options.label && this.options.label !== this.originalLabel ) {
6954			if ( this.isInput ) {
6955				this.element.val( this.options.label );
6956			} else {
6957				this.element.html( this.options.label );
6958			}
6959		}
6960		this._addClass( "ui-button", "ui-widget" );
6961		this._setOption( "disabled", this.options.disabled );
6962		this._enhance();
6963
6964		if ( this.element.is( "a" ) ) {
6965			this._on( {
6966				"keyup": function( event ) {
6967					if ( event.keyCode === $.ui.keyCode.SPACE ) {
6968						event.preventDefault();
6969
vendor: 8,360 bytes, lines 6970-7270
6970						// Support: PhantomJS <= 1.9, IE 8 Only
6971						// If a native click is available use it so we actually cause navigation
6972						// otherwise just trigger a click event
6973						if ( this.element[ 0 ].click ) {
6974							this.element[ 0 ].click();
6975						} else {
6976							this.element.trigger( "click" );
6977						}
6978					}
6979				}
6980			} );
6981		}
6982	},
6983
6984	_enhance: function() {
6985		if ( !this.element.is( "button" ) ) {
6986			this.element.attr( "role", "button" );
6987		}
6988
6989		if ( this.options.icon ) {
6990			this._updateIcon( "icon", this.options.icon );
6991			this._updateTooltip();
6992		}
6993	},
6994
6995	_updateTooltip: function() {
6996		this.title = this.element.attr( "title" );
6997
6998		if ( !this.options.showLabel && !this.title ) {
6999			this.element.attr( "title", this.options.label );
7000		}
7001	},
7002
7003	_updateIcon: function( option, value ) {
7004		var icon = option !== "iconPosition",
7005			position = icon ? this.options.iconPosition : value,
7006			displayBlock = position === "top" || position === "bottom";
7007
7008		// Create icon
7009		if ( !this.icon ) {
7010			this.icon = $( "<span>" );
7011
7012			this._addClass( this.icon, "ui-button-icon", "ui-icon" );
7013
7014			if ( !this.options.showLabel ) {
7015				this._addClass( "ui-button-icon-only" );
7016			}
7017		} else if ( icon ) {
7018
7019			// If we are updating the icon remove the old icon class
7020			this._removeClass( this.icon, null, this.options.icon );
7021		}
7022
7023		// If we are updating the icon add the new icon class
7024		if ( icon ) {
7025			this._addClass( this.icon, null, value );
7026		}
7027
7028		this._attachIcon( position );
7029
7030		// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove
7031		// the iconSpace if there is one.
7032		if ( displayBlock ) {
7033			this._addClass( this.icon, null, "ui-widget-icon-block" );
7034			if ( this.iconSpace ) {
7035				this.iconSpace.remove();
7036			}
7037		} else {
7038
7039			// Position is beginning or end so remove the ui-widget-icon-block class and add the
7040			// space if it does not exist
7041			if ( !this.iconSpace ) {
7042				this.iconSpace = $( "<span> </span>" );
7043				this._addClass( this.iconSpace, "ui-button-icon-space" );
7044			}
7045			this._removeClass( this.icon, null, "ui-wiget-icon-block" );
7046			this._attachIconSpace( position );
7047		}
7048	},
7049
7050	_destroy: function() {
7051		this.element.removeAttr( "role" );
7052
7053		if ( this.icon ) {
7054			this.icon.remove();
7055		}
7056		if ( this.iconSpace ) {
7057			this.iconSpace.remove();
7058		}
7059		if ( !this.hasTitle ) {
7060			this.element.removeAttr( "title" );
7061		}
7062	},
7063
7064	_attachIconSpace: function( iconPosition ) {
7065		this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace );
7066	},
7067
7068	_attachIcon: function( iconPosition ) {
7069		this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon );
7070	},
7071
7072	_setOptions: function( options ) {
7073		var newShowLabel = options.showLabel === undefined ?
7074				this.options.showLabel :
7075				options.showLabel,
7076			newIcon = options.icon === undefined ? this.options.icon : options.icon;
7077
7078		if ( !newShowLabel && !newIcon ) {
7079			options.showLabel = true;
7080		}
7081		this._super( options );
7082	},
7083
7084	_setOption: function( key, value ) {
7085		if ( key === "icon" ) {
7086			if ( value ) {
7087				this._updateIcon( key, value );
7088			} else if ( this.icon ) {
7089				this.icon.remove();
7090				if ( this.iconSpace ) {
7091					this.iconSpace.remove();
7092				}
7093			}
7094		}
7095
7096		if ( key === "iconPosition" ) {
7097			this._updateIcon( key, value );
7098		}
7099
7100		// Make sure we can't end up with a button that has neither text nor icon
7101		if ( key === "showLabel" ) {
7102				this._toggleClass( "ui-button-icon-only", null, !value );
7103				this._updateTooltip();
7104		}
7105
7106		if ( key === "label" ) {
7107			if ( this.isInput ) {
7108				this.element.val( value );
7109			} else {
7110
7111				// If there is an icon, append it, else nothing then append the value
7112				// this avoids removal of the icon when setting label text
7113				this.element.html( value );
7114				if ( this.icon ) {
7115					this._attachIcon( this.options.iconPosition );
7116					this._attachIconSpace( this.options.iconPosition );
7117				}
7118			}
7119		}
7120
7121		this._super( key, value );
7122
7123		if ( key === "disabled" ) {
7124			this._toggleClass( null, "ui-state-disabled", value );
7125			this.element[ 0 ].disabled = value;
7126			if ( value ) {
7127				this.element.trigger( "blur" );
7128			}
7129		}
7130	},
7131
7132	refresh: function() {
7133
7134		// Make sure to only check disabled if its an element that supports this otherwise
7135		// check for the disabled class to determine state
7136		var isDisabled = this.element.is( "input, button" ) ?
7137			this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" );
7138
7139		if ( isDisabled !== this.options.disabled ) {
7140			this._setOptions( { disabled: isDisabled } );
7141		}
7142
7143		this._updateTooltip();
7144	}
7145} );
7146
7147// DEPRECATED
7148if ( $.uiBackCompat !== false ) {
7149
7150	// Text and Icons options
7151	$.widget( "ui.button", $.ui.button, {
7152		options: {
7153			text: true,
7154			icons: {
7155				primary: null,
7156				secondary: null
7157			}
7158		},
7159
7160		_create: function() {
7161			if ( this.options.showLabel && !this.options.text ) {
7162				this.options.showLabel = this.options.text;
7163			}
7164			if ( !this.options.showLabel && this.options.text ) {
7165				this.options.text = this.options.showLabel;
7166			}
7167			if ( !this.options.icon && ( this.options.icons.primary ||
7168					this.options.icons.secondary ) ) {
7169				if ( this.options.icons.primary ) {
7170					this.options.icon = this.options.icons.primary;
7171				} else {
7172					this.options.icon = this.options.icons.secondary;
7173					this.options.iconPosition = "end";
7174				}
7175			} else if ( this.options.icon ) {
7176				this.options.icons.primary = this.options.icon;
7177			}
7178			this._super();
7179		},
7180
7181		_setOption: function( key, value ) {
7182			if ( key === "text" ) {
7183				this._super( "showLabel", value );
7184				return;
7185			}
7186			if ( key === "showLabel" ) {
7187				this.options.text = value;
7188			}
7189			if ( key === "icon" ) {
7190				this.options.icons.primary = value;
7191			}
7192			if ( key === "icons" ) {
7193				if ( value.primary ) {
7194					this._super( "icon", value.primary );
7195					this._super( "iconPosition", "beginning" );
7196				} else if ( value.secondary ) {
7197					this._super( "icon", value.secondary );
7198					this._super( "iconPosition", "end" );
7199				}
7200			}
7201			this._superApply( arguments );
7202		}
7203	} );
7204
7205	$.fn.button = ( function( orig ) {
7206		return function( options ) {
7207			var isMethodCall = typeof options === "string";
7208			var args = Array.prototype.slice.call( arguments, 1 );
7209			var returnValue = this;
7210
7211			if ( isMethodCall ) {
7212
7213				// If this is an empty collection, we need to have the instance method
7214				// return undefined instead of the jQuery instance
7215				if ( !this.length && options === "instance" ) {
7216					returnValue = undefined;
7217				} else {
7218					this.each( function() {
7219						var methodValue;
7220						var type = $( this ).attr( "type" );
7221						var name = type !== "checkbox" && type !== "radio" ?
7222							"button" :
7223							"checkboxradio";
7224						var instance = $.data( this, "ui-" + name );
7225
7226						if ( options === "instance" ) {
7227							returnValue = instance;
7228							return false;
7229						}
7230
7231						if ( !instance ) {
7232							return $.error( "cannot call methods on button" +
7233								" prior to initialization; " +
7234								"attempted to call method '" + options + "'" );
7235						}
7236
7237						if ( typeof instance[ options ] !== "function" ||
7238							options.charAt( 0 ) === "_" ) {
7239							return $.error( "no such method '" + options + "' for button" +
7240								" widget instance" );
7241						}
7242
7243						methodValue = instance[ options ].apply( instance, args );
7244
7245						if ( methodValue !== instance && methodValue !== undefined ) {
7246							returnValue = methodValue && methodValue.jquery ?
7247								returnValue.pushStack( methodValue.get() ) :
7248								methodValue;
7249							return false;
7250						}
7251					} );
7252				}
7253			} else {
7254
7255				// Allow multiple hashes to be passed on init
7256				if ( args.length ) {
7257					options = $.widget.extend.apply( null, [ options ].concat( args ) );
7258				}
7259
7260				this.each( function() {
7261					var type = $( this ).attr( "type" );
7262					var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio";
7263					var instance = $.data( this, "ui-" + name );
7264
7265					if ( instance ) {
7266						instance.option( options || {} );
7267						if ( instance._init ) {
7268							instance._init();
7269						}
7270					} else {
vendor: 19,025 bytes, lines 7271-7715
7271						if ( name === "button" ) {
7272							orig.call( $( this ), options );
7273							return;
7274						}
7275
7276						$( this ).checkboxradio( $.extend( { icon: false }, options ) );
7277					}
7278				} );
7279			}
7280
7281			return returnValue;
7282		};
7283	} )( $.fn.button );
7284
7285	$.fn.buttonset = function() {
7286		if ( !$.ui.controlgroup ) {
7287			$.error( "Controlgroup widget missing" );
7288		}
7289		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) {
7290			return this.controlgroup.apply( this,
7291				[ arguments[ 0 ], "items.button", arguments[ 2 ] ] );
7292		}
7293		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) {
7294			return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] );
7295		}
7296		if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) {
7297			arguments[ 0 ].items = {
7298				button: arguments[ 0 ].items
7299			};
7300		}
7301		return this.controlgroup.apply( this, arguments );
7302	};
7303}
7304
7305var widgetsButton = $.ui.button;
7306
7307
7308/* eslint-disable max-len, camelcase */
7309/*!
7310 * jQuery UI Datepicker 1.13.2
7311 * http://jqueryui.com
7312 *
7313 * Copyright jQuery Foundation and other contributors
7314 * Released under the MIT license.
7315 * http://jquery.org/license
7316 */
7317
7318//>>label: Datepicker
7319//>>group: Widgets
7320//>>description: Displays a calendar from an input or inline for selecting dates.
7321//>>docs: http://api.jqueryui.com/datepicker/
7322//>>demos: http://jqueryui.com/datepicker/
7323//>>css.structure: ../../themes/base/core.css
7324//>>css.structure: ../../themes/base/datepicker.css
7325//>>css.theme: ../../themes/base/theme.css
7326
7327
7328$.extend( $.ui, { datepicker: { version: "1.13.2" } } );
7329
7330var datepicker_instActive;
7331
7332function datepicker_getZindex( elem ) {
7333	var position, value;
7334	while ( elem.length && elem[ 0 ] !== document ) {
7335
7336		// Ignore z-index if position is set to a value where z-index is ignored by the browser
7337		// This makes behavior of this function consistent across browsers
7338		// WebKit always returns auto if the element is positioned
7339		position = elem.css( "position" );
7340		if ( position === "absolute" || position === "relative" || position === "fixed" ) {
7341
7342			// IE returns 0 when zIndex is not specified
7343			// other browsers return a string
7344			// we ignore the case of nested elements with an explicit value of 0
7345			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
7346			value = parseInt( elem.css( "zIndex" ), 10 );
7347			if ( !isNaN( value ) && value !== 0 ) {
7348				return value;
7349			}
7350		}
7351		elem = elem.parent();
7352	}
7353
7354	return 0;
7355}
7356
7357/* Date picker manager.
7358   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
7359   Settings for (groups of) date pickers are maintained in an instance object,
7360   allowing multiple different settings on the same page. */
7361
7362function Datepicker() {
7363	this._curInst = null; // The current instance in use
7364	this._keyEvent = false; // If the last event was a key event
7365	this._disabledInputs = []; // List of date picker inputs that have been disabled
7366	this._datepickerShowing = false; // True if the popup picker is showing , false if not
7367	this._inDialog = false; // True if showing within a "dialog", false if not
7368	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
7369	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
7370	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
7371	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
7372	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
7373	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
7374	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
7375	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
7376	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
7377	this.regional = []; // Available regional settings, indexed by language code
7378	this.regional[ "" ] = { // Default regional settings
7379		closeText: "Done", // Display text for close link
7380		prevText: "Prev", // Display text for previous month link
7381		nextText: "Next", // Display text for next month link
7382		currentText: "Today", // Display text for current month link
7383		monthNames: [ "January", "February", "March", "April", "May", "June",
7384			"July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
7385		monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
7386		dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
7387		dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
7388		dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
7389		weekHeader: "Wk", // Column header for week of the year
7390		dateFormat: "mm/dd/yy", // See format options on parseDate
7391		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
7392		isRTL: false, // True if right-to-left language, false if left-to-right
7393		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
7394		yearSuffix: "", // Additional text to append to the year in the month headers,
7395		selectMonthLabel: "Select month", // Invisible label for month selector
7396		selectYearLabel: "Select year" // Invisible label for year selector
7397	};
7398	this._defaults = { // Global defaults for all the date picker instances
7399		showOn: "focus", // "focus" for popup on focus,
7400			// "button" for trigger button, or "both" for either
7401		showAnim: "fadeIn", // Name of jQuery animation for popup
7402		showOptions: {}, // Options for enhanced animations
7403		defaultDate: null, // Used when field is blank: actual date,
7404			// +/-number for offset from today, null for today
7405		appendText: "", // Display text following the input box, e.g. showing the format
7406		buttonText: "...", // Text for trigger button
7407		buttonImage: "", // URL for trigger button image
7408		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
7409		hideIfNoPrevNext: false, // True to hide next/previous month links
7410			// if not applicable, false to just disable them
7411		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
7412		gotoCurrent: false, // True if today link goes back to current selection instead
7413		changeMonth: false, // True if month can be selected directly, false if only prev/next
7414		changeYear: false, // True if year can be selected directly, false if only prev/next
7415		yearRange: "c-10:c+10", // Range of years to display in drop-down,
7416			// either relative to today's year (-nn:+nn), relative to currently displayed year
7417			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
7418		showOtherMonths: false, // True to show dates in other months, false to leave blank
7419		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
7420		showWeek: false, // True to show week of the year, false to not show it
7421		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
7422			// takes a Date and returns the number of the week for it
7423		shortYearCutoff: "+10", // Short year values < this are in the current century,
7424			// > this are in the previous century,
7425			// string value starting with "+" for current year + value
7426		minDate: null, // The earliest selectable date, or null for no limit
7427		maxDate: null, // The latest selectable date, or null for no limit
7428		duration: "fast", // Duration of display/closure
7429		beforeShowDay: null, // Function that takes a date and returns an array with
7430			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
7431			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
7432		beforeShow: null, // Function that takes an input field and
7433			// returns a set of custom settings for the date picker
7434		onSelect: null, // Define a callback function when a date is selected
7435		onChangeMonthYear: null, // Define a callback function when the month or year is changed
7436		onClose: null, // Define a callback function when the datepicker is closed
7437		onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
7438		numberOfMonths: 1, // Number of months to show at a time
7439		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
7440		stepMonths: 1, // Number of months to step back/forward
7441		stepBigMonths: 12, // Number of months to step back/forward for the big links
7442		altField: "", // Selector for an alternate field to store selected dates into
7443		altFormat: "", // The date format to use for the alternate field
7444		constrainInput: true, // The input is constrained by the current date format
7445		showButtonPanel: false, // True to show button panel, false to not show it
7446		autoSize: false, // True to size the input for the date format, false to leave as is
7447		disabled: false // The initial disabled state
7448	};
7449	$.extend( this._defaults, this.regional[ "" ] );
7450	this.regional.en = $.extend( true, {}, this.regional[ "" ] );
7451	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
7452	this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
7453}
7454
7455$.extend( Datepicker.prototype, {
7456
7457	/* Class name added to elements to indicate already configured with a date picker. */
7458	markerClassName: "hasDatepicker",
7459
7460	//Keep track of the maximum number of rows displayed (see #7043)
7461	maxRows: 4,
7462
7463	// TODO rename to "widget" when switching to widget factory
7464	_widgetDatepicker: function() {
7465		return this.dpDiv;
7466	},
7467
7468	/* Override the default settings for all instances of the date picker.
7469	 * @param  settings  object - the new settings to use as defaults (anonymous object)
7470	 * @return the manager object
7471	 */
7472	setDefaults: function( settings ) {
7473		datepicker_extendRemove( this._defaults, settings || {} );
7474		return this;
7475	},
7476
7477	/* Attach the date picker to a jQuery selection.
7478	 * @param  target	element - the target input field or division or span
7479	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
7480	 */
7481	_attachDatepicker: function( target, settings ) {
7482		var nodeName, inline, inst;
7483		nodeName = target.nodeName.toLowerCase();
7484		inline = ( nodeName === "div" || nodeName === "span" );
7485		if ( !target.id ) {
7486			this.uuid += 1;
7487			target.id = "dp" + this.uuid;
7488		}
7489		inst = this._newInst( $( target ), inline );
7490		inst.settings = $.extend( {}, settings || {} );
7491		if ( nodeName === "input" ) {
7492			this._connectDatepicker( target, inst );
7493		} else if ( inline ) {
7494			this._inlineDatepicker( target, inst );
7495		}
7496	},
7497
7498	/* Create a new instance object. */
7499	_newInst: function( target, inline ) {
7500		var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
7501		return { id: id, input: target, // associated target
7502			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
7503			drawMonth: 0, drawYear: 0, // month being drawn
7504			inline: inline, // is datepicker inline or not
7505			dpDiv: ( !inline ? this.dpDiv : // presentation div
7506			datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
7507	},
7508
7509	/* Attach the date picker to an input field. */
7510	_connectDatepicker: function( target, inst ) {
7511		var input = $( target );
7512		inst.append = $( [] );
7513		inst.trigger = $( [] );
7514		if ( input.hasClass( this.markerClassName ) ) {
7515			return;
7516		}
7517		this._attachments( input, inst );
7518		input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
7519			on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
7520		this._autoSize( inst );
7521		$.data( target, "datepicker", inst );
7522
7523		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
7524		if ( inst.settings.disabled ) {
7525			this._disableDatepicker( target );
7526		}
7527	},
7528
7529	/* Make attachments based on settings. */
7530	_attachments: function( input, inst ) {
7531		var showOn, buttonText, buttonImage,
7532			appendText = this._get( inst, "appendText" ),
7533			isRTL = this._get( inst, "isRTL" );
7534
7535		if ( inst.append ) {
7536			inst.append.remove();
7537		}
7538		if ( appendText ) {
7539			inst.append = $( "<span>" )
7540				.addClass( this._appendClass )
7541				.text( appendText );
7542			input[ isRTL ? "before" : "after" ]( inst.append );
7543		}
7544
7545		input.off( "focus", this._showDatepicker );
7546
7547		if ( inst.trigger ) {
7548			inst.trigger.remove();
7549		}
7550
7551		showOn = this._get( inst, "showOn" );
7552		if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
7553			input.on( "focus", this._showDatepicker );
7554		}
7555		if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
7556			buttonText = this._get( inst, "buttonText" );
7557			buttonImage = this._get( inst, "buttonImage" );
7558
7559			if ( this._get( inst, "buttonImageOnly" ) ) {
7560				inst.trigger = $( "<img>" )
7561					.addClass( this._triggerClass )
7562					.attr( {
7563						src: buttonImage,
7564						alt: buttonText,
7565						title: buttonText
7566					} );
7567			} else {
7568				inst.trigger = $( "<button type='button'>" )
7569					.addClass( this._triggerClass );
7570				if ( buttonImage ) {
7571					inst.trigger.html(
7572						$( "<img>" )
7573							.attr( {
7574								src: buttonImage,
7575								alt: buttonText,
7576								title: buttonText
7577							} )
7578					);
7579				} else {
7580					inst.trigger.text( buttonText );
7581				}
7582			}
7583
7584			input[ isRTL ? "before" : "after" ]( inst.trigger );
7585			inst.trigger.on( "click", function() {
7586				if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
7587					$.datepicker._hideDatepicker();
7588				} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
7589					$.datepicker._hideDatepicker();
7590					$.datepicker._showDatepicker( input[ 0 ] );
7591				} else {
7592					$.datepicker._showDatepicker( input[ 0 ] );
7593				}
7594				return false;
7595			} );
7596		}
7597	},
7598
7599	/* Apply the maximum length for the date format. */
7600	_autoSize: function( inst ) {
7601		if ( this._get( inst, "autoSize" ) && !inst.inline ) {
7602			var findMax, max, maxI, i,
7603				date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
7604				dateFormat = this._get( inst, "dateFormat" );
7605
7606			if ( dateFormat.match( /[DM]/ ) ) {
7607				findMax = function( names ) {
7608					max = 0;
7609					maxI = 0;
7610					for ( i = 0; i < names.length; i++ ) {
7611						if ( names[ i ].length > max ) {
7612							max = names[ i ].length;
7613							maxI = i;
7614						}
7615					}
7616					return maxI;
7617				};
7618				date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
7619					"monthNames" : "monthNamesShort" ) ) ) );
7620				date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
7621					"dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
7622			}
7623			inst.input.attr( "size", this._formatDate( inst, date ).length );
7624		}
7625	},
7626
7627	/* Attach an inline date picker to a div. */
7628	_inlineDatepicker: function( target, inst ) {
7629		var divSpan = $( target );
7630		if ( divSpan.hasClass( this.markerClassName ) ) {
7631			return;
7632		}
7633		divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
7634		$.data( target, "datepicker", inst );
7635		this._setDate( inst, this._getDefaultDate( inst ), true );
7636		this._updateDatepicker( inst );
7637		this._updateAlternate( inst );
7638
7639		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
7640		if ( inst.settings.disabled ) {
7641			this._disableDatepicker( target );
7642		}
7643
7644		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
7645		// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
7646		inst.dpDiv.css( "display", "block" );
7647	},
7648
7649	/* Pop-up the date picker in a "dialog" box.
7650	 * @param  input element - ignored
7651	 * @param  date	string or Date - the initial date to display
7652	 * @param  onSelect  function - the function to call when a date is selected
7653	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
7654	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
7655	 *					event - with x/y coordinates or
7656	 *					leave empty for default (screen centre)
7657	 * @return the manager object
7658	 */
7659	_dialogDatepicker: function( input, date, onSelect, settings, pos ) {
7660		var id, browserWidth, browserHeight, scrollX, scrollY,
7661			inst = this._dialogInst; // internal instance
7662
7663		if ( !inst ) {
7664			this.uuid += 1;
7665			id = "dp" + this.uuid;
7666			this._dialogInput = $( "<input type='text' id='" + id +
7667				"' style='position: absolute; top: -100px; width: 0px;'/>" );
7668			this._dialogInput.on( "keydown", this._doKeyDown );
7669			$( "body" ).append( this._dialogInput );
7670			inst = this._dialogInst = this._newInst( this._dialogInput, false );
7671			inst.settings = {};
7672			$.data( this._dialogInput[ 0 ], "datepicker", inst );
7673		}
7674		datepicker_extendRemove( inst.settings, settings || {} );
7675		date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
7676		this._dialogInput.val( date );
7677
7678		this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
7679		if ( !this._pos ) {
7680			browserWidth = document.documentElement.clientWidth;
7681			browserHeight = document.documentElement.clientHeight;
7682			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
7683			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
7684			this._pos = // should use actual width/height below
7685				[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
7686		}
7687
7688		// Move input on screen for focus, but hidden behind dialog
7689		this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
7690		inst.settings.onSelect = onSelect;
7691		this._inDialog = true;
7692		this.dpDiv.addClass( this._dialogClass );
7693		this._showDatepicker( this._dialogInput[ 0 ] );
7694		if ( $.blockUI ) {
7695			$.blockUI( this.dpDiv );
7696		}
7697		$.data( this._dialogInput[ 0 ], "datepicker", inst );
7698		return this;
7699	},
7700
7701	/* Detach a datepicker from its control.
7702	 * @param  target	element - the target input field or division or span
7703	 */
7704	_destroyDatepicker: function( target ) {
7705		var nodeName,
7706			$target = $( target ),
7707			inst = $.data( target, "datepicker" );
7708
7709		if ( !$target.hasClass( this.markerClassName ) ) {
7710			return;
7711		}
7712
7713		nodeName = target.nodeName.toLowerCase();
7714		$.removeData( target, "datepicker" );
7715		if ( nodeName === "input" ) {
vendor: 12,182 bytes, lines 7716-8067
7716			inst.append.remove();
7717			inst.trigger.remove();
7718			$target.removeClass( this.markerClassName ).
7719				off( "focus", this._showDatepicker ).
7720				off( "keydown", this._doKeyDown ).
7721				off( "keypress", this._doKeyPress ).
7722				off( "keyup", this._doKeyUp );
7723		} else if ( nodeName === "div" || nodeName === "span" ) {
7724			$target.removeClass( this.markerClassName ).empty();
7725		}
7726
7727		if ( datepicker_instActive === inst ) {
7728			datepicker_instActive = null;
7729			this._curInst = null;
7730		}
7731	},
7732
7733	/* Enable the date picker to a jQuery selection.
7734	 * @param  target	element - the target input field or division or span
7735	 */
7736	_enableDatepicker: function( target ) {
7737		var nodeName, inline,
7738			$target = $( target ),
7739			inst = $.data( target, "datepicker" );
7740
7741		if ( !$target.hasClass( this.markerClassName ) ) {
7742			return;
7743		}
7744
7745		nodeName = target.nodeName.toLowerCase();
7746		if ( nodeName === "input" ) {
7747			target.disabled = false;
7748			inst.trigger.filter( "button" ).
7749				each( function() {
7750					this.disabled = false;
7751				} ).end().
7752				filter( "img" ).css( { opacity: "1.0", cursor: "" } );
7753		} else if ( nodeName === "div" || nodeName === "span" ) {
7754			inline = $target.children( "." + this._inlineClass );
7755			inline.children().removeClass( "ui-state-disabled" );
7756			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
7757				prop( "disabled", false );
7758		}
7759		this._disabledInputs = $.map( this._disabledInputs,
7760
7761			// Delete entry
7762			function( value ) {
7763				return ( value === target ? null : value );
7764			} );
7765	},
7766
7767	/* Disable the date picker to a jQuery selection.
7768	 * @param  target	element - the target input field or division or span
7769	 */
7770	_disableDatepicker: function( target ) {
7771		var nodeName, inline,
7772			$target = $( target ),
7773			inst = $.data( target, "datepicker" );
7774
7775		if ( !$target.hasClass( this.markerClassName ) ) {
7776			return;
7777		}
7778
7779		nodeName = target.nodeName.toLowerCase();
7780		if ( nodeName === "input" ) {
7781			target.disabled = true;
7782			inst.trigger.filter( "button" ).
7783				each( function() {
7784					this.disabled = true;
7785				} ).end().
7786				filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
7787		} else if ( nodeName === "div" || nodeName === "span" ) {
7788			inline = $target.children( "." + this._inlineClass );
7789			inline.children().addClass( "ui-state-disabled" );
7790			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
7791				prop( "disabled", true );
7792		}
7793		this._disabledInputs = $.map( this._disabledInputs,
7794
7795			// Delete entry
7796			function( value ) {
7797				return ( value === target ? null : value );
7798			} );
7799		this._disabledInputs[ this._disabledInputs.length ] = target;
7800	},
7801
7802	/* Is the first field in a jQuery collection disabled as a datepicker?
7803	 * @param  target	element - the target input field or division or span
7804	 * @return boolean - true if disabled, false if enabled
7805	 */
7806	_isDisabledDatepicker: function( target ) {
7807		if ( !target ) {
7808			return false;
7809		}
7810		for ( var i = 0; i < this._disabledInputs.length; i++ ) {
7811			if ( this._disabledInputs[ i ] === target ) {
7812				return true;
7813			}
7814		}
7815		return false;
7816	},
7817
7818	/* Retrieve the instance data for the target control.
7819	 * @param  target  element - the target input field or division or span
7820	 * @return  object - the associated instance data
7821	 * @throws  error if a jQuery problem getting data
7822	 */
7823	_getInst: function( target ) {
7824		try {
7825			return $.data( target, "datepicker" );
7826		} catch ( err ) {
7827			throw "Missing instance data for this datepicker";
7828		}
7829	},
7830
7831	/* Update or retrieve the settings for a date picker attached to an input field or division.
7832	 * @param  target  element - the target input field or division or span
7833	 * @param  name	object - the new settings to update or
7834	 *				string - the name of the setting to change or retrieve,
7835	 *				when retrieving also "all" for all instance settings or
7836	 *				"defaults" for all global defaults
7837	 * @param  value   any - the new value for the setting
7838	 *				(omit if above is an object or to retrieve a value)
7839	 */
7840	_optionDatepicker: function( target, name, value ) {
7841		var settings, date, minDate, maxDate,
7842			inst = this._getInst( target );
7843
7844		if ( arguments.length === 2 && typeof name === "string" ) {
7845			return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
7846				( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
7847				this._get( inst, name ) ) : null ) );
7848		}
7849
7850		settings = name || {};
7851		if ( typeof name === "string" ) {
7852			settings = {};
7853			settings[ name ] = value;
7854		}
7855
7856		if ( inst ) {
7857			if ( this._curInst === inst ) {
7858				this._hideDatepicker();
7859			}
7860
7861			date = this._getDateDatepicker( target, true );
7862			minDate = this._getMinMaxDate( inst, "min" );
7863			maxDate = this._getMinMaxDate( inst, "max" );
7864			datepicker_extendRemove( inst.settings, settings );
7865
7866			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
7867			if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
7868				inst.settings.minDate = this._formatDate( inst, minDate );
7869			}
7870			if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
7871				inst.settings.maxDate = this._formatDate( inst, maxDate );
7872			}
7873			if ( "disabled" in settings ) {
7874				if ( settings.disabled ) {
7875					this._disableDatepicker( target );
7876				} else {
7877					this._enableDatepicker( target );
7878				}
7879			}
7880			this._attachments( $( target ), inst );
7881			this._autoSize( inst );
7882			this._setDate( inst, date );
7883			this._updateAlternate( inst );
7884			this._updateDatepicker( inst );
7885		}
7886	},
7887
7888	// Change method deprecated
7889	_changeDatepicker: function( target, name, value ) {
7890		this._optionDatepicker( target, name, value );
7891	},
7892
7893	/* Redraw the date picker attached to an input field or division.
7894	 * @param  target  element - the target input field or division or span
7895	 */
7896	_refreshDatepicker: function( target ) {
7897		var inst = this._getInst( target );
7898		if ( inst ) {
7899			this._updateDatepicker( inst );
7900		}
7901	},
7902
7903	/* Set the dates for a jQuery selection.
7904	 * @param  target element - the target input field or division or span
7905	 * @param  date	Date - the new date
7906	 */
7907	_setDateDatepicker: function( target, date ) {
7908		var inst = this._getInst( target );
7909		if ( inst ) {
7910			this._setDate( inst, date );
7911			this._updateDatepicker( inst );
7912			this._updateAlternate( inst );
7913		}
7914	},
7915
7916	/* Get the date(s) for the first entry in a jQuery selection.
7917	 * @param  target element - the target input field or division or span
7918	 * @param  noDefault boolean - true if no default date is to be used
7919	 * @return Date - the current date
7920	 */
7921	_getDateDatepicker: function( target, noDefault ) {
7922		var inst = this._getInst( target );
7923		if ( inst && !inst.inline ) {
7924			this._setDateFromField( inst, noDefault );
7925		}
7926		return ( inst ? this._getDate( inst ) : null );
7927	},
7928
7929	/* Handle keystrokes. */
7930	_doKeyDown: function( event ) {
7931		var onSelect, dateStr, sel,
7932			inst = $.datepicker._getInst( event.target ),
7933			handled = true,
7934			isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );
7935
7936		inst._keyEvent = true;
7937		if ( $.datepicker._datepickerShowing ) {
7938			switch ( event.keyCode ) {
7939				case 9: $.datepicker._hideDatepicker();
7940						handled = false;
7941						break; // hide on tab out
7942				case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
7943									$.datepicker._currentClass + ")", inst.dpDiv );
7944						if ( sel[ 0 ] ) {
7945							$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
7946						}
7947
7948						onSelect = $.datepicker._get( inst, "onSelect" );
7949						if ( onSelect ) {
7950							dateStr = $.datepicker._formatDate( inst );
7951
7952							// Trigger custom callback
7953							onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
7954						} else {
7955							$.datepicker._hideDatepicker();
7956						}
7957
7958						return false; // don't submit the form
7959				case 27: $.datepicker._hideDatepicker();
7960						break; // hide on escape
7961				case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
7962							-$.datepicker._get( inst, "stepBigMonths" ) :
7963							-$.datepicker._get( inst, "stepMonths" ) ), "M" );
7964						break; // previous month/year on page up/+ ctrl
7965				case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
7966							+$.datepicker._get( inst, "stepBigMonths" ) :
7967							+$.datepicker._get( inst, "stepMonths" ) ), "M" );
7968						break; // next month/year on page down/+ ctrl
7969				case 35: if ( event.ctrlKey || event.metaKey ) {
7970							$.datepicker._clearDate( event.target );
7971						}
7972						handled = event.ctrlKey || event.metaKey;
7973						break; // clear on ctrl or command +end
7974				case 36: if ( event.ctrlKey || event.metaKey ) {
7975							$.datepicker._gotoToday( event.target );
7976						}
7977						handled = event.ctrlKey || event.metaKey;
7978						break; // current on ctrl or command +home
7979				case 37: if ( event.ctrlKey || event.metaKey ) {
7980							$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
7981						}
7982						handled = event.ctrlKey || event.metaKey;
7983
7984						// -1 day on ctrl or command +left
7985						if ( event.originalEvent.altKey ) {
7986							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
7987								-$.datepicker._get( inst, "stepBigMonths" ) :
7988								-$.datepicker._get( inst, "stepMonths" ) ), "M" );
7989						}
7990
7991						// next month/year on alt +left on Mac
7992						break;
7993				case 38: if ( event.ctrlKey || event.metaKey ) {
7994							$.datepicker._adjustDate( event.target, -7, "D" );
7995						}
7996						handled = event.ctrlKey || event.metaKey;
7997						break; // -1 week on ctrl or command +up
7998				case 39: if ( event.ctrlKey || event.metaKey ) {
7999							$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
8000						}
8001						handled = event.ctrlKey || event.metaKey;
8002
8003						// +1 day on ctrl or command +right
8004						if ( event.originalEvent.altKey ) {
8005							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
8006								+$.datepicker._get( inst, "stepBigMonths" ) :
8007								+$.datepicker._get( inst, "stepMonths" ) ), "M" );
8008						}
8009
8010						// next month/year on alt +right
8011						break;
8012				case 40: if ( event.ctrlKey || event.metaKey ) {
8013							$.datepicker._adjustDate( event.target, +7, "D" );
8014						}
8015						handled = event.ctrlKey || event.metaKey;
8016						break; // +1 week on ctrl or command +down
8017				default: handled = false;
8018			}
8019		} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
8020			$.datepicker._showDatepicker( this );
8021		} else {
8022			handled = false;
8023		}
8024
8025		if ( handled ) {
8026			event.preventDefault();
8027			event.stopPropagation();
8028		}
8029	},
8030
8031	/* Filter entered characters - based on date format. */
8032	_doKeyPress: function( event ) {
8033		var chars, chr,
8034			inst = $.datepicker._getInst( event.target );
8035
8036		if ( $.datepicker._get( inst, "constrainInput" ) ) {
8037			chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
8038			chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
8039			return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
8040		}
8041	},
8042
8043	/* Synchronise manual entry and field/alternate field. */
8044	_doKeyUp: function( event ) {
8045		var date,
8046			inst = $.datepicker._getInst( event.target );
8047
8048		if ( inst.input.val() !== inst.lastVal ) {
8049			try {
8050				date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
8051					( inst.input ? inst.input.val() : null ),
8052					$.datepicker._getFormatConfig( inst ) );
8053
8054				if ( date ) { // only if valid
8055					$.datepicker._setDateFromField( inst );
8056					$.datepicker._updateAlternate( inst );
8057					$.datepicker._updateDatepicker( inst );
8058				}
8059			} catch ( err ) {
8060			}
8061		}
8062		return true;
8063	},
8064
8065	/* Pop-up the date picker for a given input field.
8066	 * If false returned from beforeShow event handler do not show.
8067	 * @param  input  element - the input field attached to the date picker or
vendor: 1,885 bytes, lines 8068-8125
8068	 *					event - if triggered by focus
8069	 */
8070	_showDatepicker: function( input ) {
8071		input = input.target || input;
8072		if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
8073			input = $( "input", input.parentNode )[ 0 ];
8074		}
8075
8076		if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
8077			return;
8078		}
8079
8080		var inst, beforeShow, beforeShowSettings, isFixed,
8081			offset, showAnim, duration;
8082
8083		inst = $.datepicker._getInst( input );
8084		if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
8085			$.datepicker._curInst.dpDiv.stop( true, true );
8086			if ( inst && $.datepicker._datepickerShowing ) {
8087				$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
8088			}
8089		}
8090
8091		beforeShow = $.datepicker._get( inst, "beforeShow" );
8092		beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
8093		if ( beforeShowSettings === false ) {
8094			return;
8095		}
8096		datepicker_extendRemove( inst.settings, beforeShowSettings );
8097
8098		inst.lastVal = null;
8099		$.datepicker._lastInput = input;
8100		$.datepicker._setDateFromField( inst );
8101
8102		if ( $.datepicker._inDialog ) { // hide cursor
8103			input.value = "";
8104		}
8105		if ( !$.datepicker._pos ) { // position below input
8106			$.datepicker._pos = $.datepicker._findPos( input );
8107			$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
8108		}
8109
8110		isFixed = false;
8111		$( input ).parents().each( function() {
8112			isFixed |= $( this ).css( "position" ) === "fixed";
8113			return !isFixed;
8114		} );
8115
8116		offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
8117		$.datepicker._pos = null;
8118
8119		//to avoid flashes on Firefox
8120		inst.dpDiv.empty();
8121
8122		// determine sizing offscreen
8123		inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
8124		$.datepicker._updateDatepicker( inst );
8125
vendor: 8,237 bytes, lines 8126-8349
8126		// fix width for dynamic number of date pickers
8127		// and adjust position before showing
8128		offset = $.datepicker._checkOffset( inst, offset, isFixed );
8129		inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
8130			"static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
8131			left: offset.left + "px", top: offset.top + "px" } );
8132
8133		if ( !inst.inline ) {
8134			showAnim = $.datepicker._get( inst, "showAnim" );
8135			duration = $.datepicker._get( inst, "duration" );
8136			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
8137			$.datepicker._datepickerShowing = true;
8138
8139			if ( $.effects && $.effects.effect[ showAnim ] ) {
8140				inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
8141			} else {
8142				inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
8143			}
8144
8145			if ( $.datepicker._shouldFocusInput( inst ) ) {
8146				inst.input.trigger( "focus" );
8147			}
8148
8149			$.datepicker._curInst = inst;
8150		}
8151	},
8152
8153	/* Generate the date picker content. */
8154	_updateDatepicker: function( inst ) {
8155		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
8156		datepicker_instActive = inst; // for delegate hover events
8157		inst.dpDiv.empty().append( this._generateHTML( inst ) );
8158		this._attachHandlers( inst );
8159
8160		var origyearshtml,
8161			numMonths = this._getNumberOfMonths( inst ),
8162			cols = numMonths[ 1 ],
8163			width = 17,
8164			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
8165			onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );
8166
8167		if ( activeCell.length > 0 ) {
8168			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
8169		}
8170
8171		inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
8172		if ( cols > 1 ) {
8173			inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
8174		}
8175		inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
8176			"Class" ]( "ui-datepicker-multi" );
8177		inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
8178			"Class" ]( "ui-datepicker-rtl" );
8179
8180		if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
8181			inst.input.trigger( "focus" );
8182		}
8183
8184		// Deffered render of the years select (to avoid flashes on Firefox)
8185		if ( inst.yearshtml ) {
8186			origyearshtml = inst.yearshtml;
8187			setTimeout( function() {
8188
8189				//assure that inst.yearshtml didn't change.
8190				if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
8191					inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
8192				}
8193				origyearshtml = inst.yearshtml = null;
8194			}, 0 );
8195		}
8196
8197		if ( onUpdateDatepicker ) {
8198			onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
8199		}
8200	},
8201
8202	// #6694 - don't focus the input if it's already focused
8203	// this breaks the change event in IE
8204	// Support: IE and jQuery <1.9
8205	_shouldFocusInput: function( inst ) {
8206		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
8207	},
8208
8209	/* Check positioning to remain on screen. */
8210	_checkOffset: function( inst, offset, isFixed ) {
8211		var dpWidth = inst.dpDiv.outerWidth(),
8212			dpHeight = inst.dpDiv.outerHeight(),
8213			inputWidth = inst.input ? inst.input.outerWidth() : 0,
8214			inputHeight = inst.input ? inst.input.outerHeight() : 0,
8215			viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
8216			viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );
8217
8218		offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
8219		offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
8220		offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;
8221
8222		// Now check if datepicker is showing outside window viewport - move to a better place if so.
8223		offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
8224			Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
8225		offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
8226			Math.abs( dpHeight + inputHeight ) : 0 );
8227
8228		return offset;
8229	},
8230
8231	/* Find an object's position on the screen. */
8232	_findPos: function( obj ) {
8233		var position,
8234			inst = this._getInst( obj ),
8235			isRTL = this._get( inst, "isRTL" );
8236
8237		while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
8238			obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
8239		}
8240
8241		position = $( obj ).offset();
8242		return [ position.left, position.top ];
8243	},
8244
8245	/* Hide the date picker from view.
8246	 * @param  input  element - the input field attached to the date picker
8247	 */
8248	_hideDatepicker: function( input ) {
8249		var showAnim, duration, postProcess, onClose,
8250			inst = this._curInst;
8251
8252		if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
8253			return;
8254		}
8255
8256		if ( this._datepickerShowing ) {
8257			showAnim = this._get( inst, "showAnim" );
8258			duration = this._get( inst, "duration" );
8259			postProcess = function() {
8260				$.datepicker._tidyDialog( inst );
8261			};
8262
8263			// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
8264			if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
8265				inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
8266			} else {
8267				inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
8268					( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
8269			}
8270
8271			if ( !showAnim ) {
8272				postProcess();
8273			}
8274			this._datepickerShowing = false;
8275
8276			onClose = this._get( inst, "onClose" );
8277			if ( onClose ) {
8278				onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
8279			}
8280
8281			this._lastInput = null;
8282			if ( this._inDialog ) {
8283				this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
8284				if ( $.blockUI ) {
8285					$.unblockUI();
8286					$( "body" ).append( this.dpDiv );
8287				}
8288			}
8289			this._inDialog = false;
8290		}
8291	},
8292
8293	/* Tidy up after a dialog display. */
8294	_tidyDialog: function( inst ) {
8295		inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
8296	},
8297
8298	/* Close date picker if clicked elsewhere. */
8299	_checkExternalClick: function( event ) {
8300		if ( !$.datepicker._curInst ) {
8301			return;
8302		}
8303
8304		var $target = $( event.target ),
8305			inst = $.datepicker._getInst( $target[ 0 ] );
8306
8307		if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
8308				$target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
8309				!$target.hasClass( $.datepicker.markerClassName ) &&
8310				!$target.closest( "." + $.datepicker._triggerClass ).length &&
8311				$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
8312			( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
8313				$.datepicker._hideDatepicker();
8314		}
8315	},
8316
8317	/* Adjust one of the date sub-fields. */
8318	_adjustDate: function( id, offset, period ) {
8319		var target = $( id ),
8320			inst = this._getInst( target[ 0 ] );
8321
8322		if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
8323			return;
8324		}
8325		this._adjustInstDate( inst, offset, period );
8326		this._updateDatepicker( inst );
8327	},
8328
8329	/* Action for current link. */
8330	_gotoToday: function( id ) {
8331		var date,
8332			target = $( id ),
8333			inst = this._getInst( target[ 0 ] );
8334
8335		if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
8336			inst.selectedDay = inst.currentDay;
8337			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
8338			inst.drawYear = inst.selectedYear = inst.currentYear;
8339		} else {
8340			date = new Date();
8341			inst.selectedDay = date.getDate();
8342			inst.drawMonth = inst.selectedMonth = date.getMonth();
8343			inst.drawYear = inst.selectedYear = date.getFullYear();
8344		}
8345		this._notifyChange( inst );
8346		this._adjustDate( target );
8347	},
8348
8349	/* Action for selecting a new month/year. */
vendor: 43,873 bytes, lines 8350-9520
8350	_selectMonthYear: function( id, select, period ) {
8351		var target = $( id ),
8352			inst = this._getInst( target[ 0 ] );
8353
8354		inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
8355		inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
8356			parseInt( select.options[ select.selectedIndex ].value, 10 );
8357
8358		this._notifyChange( inst );
8359		this._adjustDate( target );
8360	},
8361
8362	/* Action for selecting a day. */
8363	_selectDay: function( id, month, year, td ) {
8364		var inst,
8365			target = $( id );
8366
8367		if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
8368			return;
8369		}
8370
8371		inst = this._getInst( target[ 0 ] );
8372		inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
8373		inst.selectedMonth = inst.currentMonth = month;
8374		inst.selectedYear = inst.currentYear = year;
8375		this._selectDate( id, this._formatDate( inst,
8376			inst.currentDay, inst.currentMonth, inst.currentYear ) );
8377	},
8378
8379	/* Erase the input field and hide the date picker. */
8380	_clearDate: function( id ) {
8381		var target = $( id );
8382		this._selectDate( target, "" );
8383	},
8384
8385	/* Update the input field with the selected date. */
8386	_selectDate: function( id, dateStr ) {
8387		var onSelect,
8388			target = $( id ),
8389			inst = this._getInst( target[ 0 ] );
8390
8391		dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
8392		if ( inst.input ) {
8393			inst.input.val( dateStr );
8394		}
8395		this._updateAlternate( inst );
8396
8397		onSelect = this._get( inst, "onSelect" );
8398		if ( onSelect ) {
8399			onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );  // trigger custom callback
8400		} else if ( inst.input ) {
8401			inst.input.trigger( "change" ); // fire the change event
8402		}
8403
8404		if ( inst.inline ) {
8405			this._updateDatepicker( inst );
8406		} else {
8407			this._hideDatepicker();
8408			this._lastInput = inst.input[ 0 ];
8409			if ( typeof( inst.input[ 0 ] ) !== "object" ) {
8410				inst.input.trigger( "focus" ); // restore focus
8411			}
8412			this._lastInput = null;
8413		}
8414	},
8415
8416	/* Update any alternate field to synchronise with the main field. */
8417	_updateAlternate: function( inst ) {
8418		var altFormat, date, dateStr,
8419			altField = this._get( inst, "altField" );
8420
8421		if ( altField ) { // update alternate field too
8422			altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
8423			date = this._getDate( inst );
8424			dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
8425			$( document ).find( altField ).val( dateStr );
8426		}
8427	},
8428
8429	/* Set as beforeShowDay function to prevent selection of weekends.
8430	 * @param  date  Date - the date to customise
8431	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
8432	 */
8433	noWeekends: function( date ) {
8434		var day = date.getDay();
8435		return [ ( day > 0 && day < 6 ), "" ];
8436	},
8437
8438	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
8439	 * @param  date  Date - the date to get the week for
8440	 * @return  number - the number of the week within the year that contains this date
8441	 */
8442	iso8601Week: function( date ) {
8443		var time,
8444			checkDate = new Date( date.getTime() );
8445
8446		// Find Thursday of this week starting on Monday
8447		checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );
8448
8449		time = checkDate.getTime();
8450		checkDate.setMonth( 0 ); // Compare with Jan 1
8451		checkDate.setDate( 1 );
8452		return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
8453	},
8454
8455	/* Parse a string value into a date object.
8456	 * See formatDate below for the possible formats.
8457	 *
8458	 * @param  format string - the expected format of the date
8459	 * @param  value string - the date in the above format
8460	 * @param  settings Object - attributes include:
8461	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
8462	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
8463	 *					dayNames		string[7] - names of the days from Sunday (optional)
8464	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
8465	 *					monthNames		string[12] - names of the months (optional)
8466	 * @return  Date - the extracted date value or null if value is blank
8467	 */
8468	parseDate: function( format, value, settings ) {
8469		if ( format == null || value == null ) {
8470			throw "Invalid arguments";
8471		}
8472
8473		value = ( typeof value === "object" ? value.toString() : value + "" );
8474		if ( value === "" ) {
8475			return null;
8476		}
8477
8478		var iFormat, dim, extra,
8479			iValue = 0,
8480			shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
8481			shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
8482				new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
8483			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
8484			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
8485			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
8486			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
8487			year = -1,
8488			month = -1,
8489			day = -1,
8490			doy = -1,
8491			literal = false,
8492			date,
8493
8494			// Check whether a format character is doubled
8495			lookAhead = function( match ) {
8496				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
8497				if ( matches ) {
8498					iFormat++;
8499				}
8500				return matches;
8501			},
8502
8503			// Extract a number from the string value
8504			getNumber = function( match ) {
8505				var isDoubled = lookAhead( match ),
8506					size = ( match === "@" ? 14 : ( match === "!" ? 20 :
8507					( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
8508					minSize = ( match === "y" ? size : 1 ),
8509					digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
8510					num = value.substring( iValue ).match( digits );
8511				if ( !num ) {
8512					throw "Missing number at position " + iValue;
8513				}
8514				iValue += num[ 0 ].length;
8515				return parseInt( num[ 0 ], 10 );
8516			},
8517
8518			// Extract a name from the string value and convert to an index
8519			getName = function( match, shortNames, longNames ) {
8520				var index = -1,
8521					names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
8522						return [ [ k, v ] ];
8523					} ).sort( function( a, b ) {
8524						return -( a[ 1 ].length - b[ 1 ].length );
8525					} );
8526
8527				$.each( names, function( i, pair ) {
8528					var name = pair[ 1 ];
8529					if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
8530						index = pair[ 0 ];
8531						iValue += name.length;
8532						return false;
8533					}
8534				} );
8535				if ( index !== -1 ) {
8536					return index + 1;
8537				} else {
8538					throw "Unknown name at position " + iValue;
8539				}
8540			},
8541
8542			// Confirm that a literal character matches the string value
8543			checkLiteral = function() {
8544				if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
8545					throw "Unexpected literal at position " + iValue;
8546				}
8547				iValue++;
8548			};
8549
8550		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
8551			if ( literal ) {
8552				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
8553					literal = false;
8554				} else {
8555					checkLiteral();
8556				}
8557			} else {
8558				switch ( format.charAt( iFormat ) ) {
8559					case "d":
8560						day = getNumber( "d" );
8561						break;
8562					case "D":
8563						getName( "D", dayNamesShort, dayNames );
8564						break;
8565					case "o":
8566						doy = getNumber( "o" );
8567						break;
8568					case "m":
8569						month = getNumber( "m" );
8570						break;
8571					case "M":
8572						month = getName( "M", monthNamesShort, monthNames );
8573						break;
8574					case "y":
8575						year = getNumber( "y" );
8576						break;
8577					case "@":
8578						date = new Date( getNumber( "@" ) );
8579						year = date.getFullYear();
8580						month = date.getMonth() + 1;
8581						day = date.getDate();
8582						break;
8583					case "!":
8584						date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
8585						year = date.getFullYear();
8586						month = date.getMonth() + 1;
8587						day = date.getDate();
8588						break;
8589					case "'":
8590						if ( lookAhead( "'" ) ) {
8591							checkLiteral();
8592						} else {
8593							literal = true;
8594						}
8595						break;
8596					default:
8597						checkLiteral();
8598				}
8599			}
8600		}
8601
8602		if ( iValue < value.length ) {
8603			extra = value.substr( iValue );
8604			if ( !/^\s+/.test( extra ) ) {
8605				throw "Extra/unparsed characters found in date: " + extra;
8606			}
8607		}
8608
8609		if ( year === -1 ) {
8610			year = new Date().getFullYear();
8611		} else if ( year < 100 ) {
8612			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
8613				( year <= shortYearCutoff ? 0 : -100 );
8614		}
8615
8616		if ( doy > -1 ) {
8617			month = 1;
8618			day = doy;
8619			do {
8620				dim = this._getDaysInMonth( year, month - 1 );
8621				if ( day <= dim ) {
8622					break;
8623				}
8624				month++;
8625				day -= dim;
8626			} while ( true );
8627		}
8628
8629		date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
8630		if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
8631			throw "Invalid date"; // E.g. 31/02/00
8632		}
8633		return date;
8634	},
8635
8636	/* Standard date formats. */
8637	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
8638	COOKIE: "D, dd M yy",
8639	ISO_8601: "yy-mm-dd",
8640	RFC_822: "D, d M y",
8641	RFC_850: "DD, dd-M-y",
8642	RFC_1036: "D, d M y",
8643	RFC_1123: "D, d M yy",
8644	RFC_2822: "D, d M yy",
8645	RSS: "D, d M y", // RFC 822
8646	TICKS: "!",
8647	TIMESTAMP: "@",
8648	W3C: "yy-mm-dd", // ISO 8601
8649
8650	_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
8651		Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),
8652
8653	/* Format a date object into a string value.
8654	 * The format can be combinations of the following:
8655	 * d  - day of month (no leading zero)
8656	 * dd - day of month (two digit)
8657	 * o  - day of year (no leading zeros)
8658	 * oo - day of year (three digit)
8659	 * D  - day name short
8660	 * DD - day name long
8661	 * m  - month of year (no leading zero)
8662	 * mm - month of year (two digit)
8663	 * M  - month name short
8664	 * MM - month name long
8665	 * y  - year (two digit)
8666	 * yy - year (four digit)
8667	 * @ - Unix timestamp (ms since 01/01/1970)
8668	 * ! - Windows ticks (100ns since 01/01/0001)
8669	 * "..." - literal text
8670	 * '' - single quote
8671	 *
8672	 * @param  format string - the desired format of the date
8673	 * @param  date Date - the date value to format
8674	 * @param  settings Object - attributes include:
8675	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
8676	 *					dayNames		string[7] - names of the days from Sunday (optional)
8677	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
8678	 *					monthNames		string[12] - names of the months (optional)
8679	 * @return  string - the date in the above format
8680	 */
8681	formatDate: function( format, date, settings ) {
8682		if ( !date ) {
8683			return "";
8684		}
8685
8686		var iFormat,
8687			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
8688			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
8689			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
8690			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
8691
8692			// Check whether a format character is doubled
8693			lookAhead = function( match ) {
8694				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
8695				if ( matches ) {
8696					iFormat++;
8697				}
8698				return matches;
8699			},
8700
8701			// Format a number, with leading zero if necessary
8702			formatNumber = function( match, value, len ) {
8703				var num = "" + value;
8704				if ( lookAhead( match ) ) {
8705					while ( num.length < len ) {
8706						num = "0" + num;
8707					}
8708				}
8709				return num;
8710			},
8711
8712			// Format a name, short or long as requested
8713			formatName = function( match, value, shortNames, longNames ) {
8714				return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
8715			},
8716			output = "",
8717			literal = false;
8718
8719		if ( date ) {
8720			for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
8721				if ( literal ) {
8722					if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
8723						literal = false;
8724					} else {
8725						output += format.charAt( iFormat );
8726					}
8727				} else {
8728					switch ( format.charAt( iFormat ) ) {
8729						case "d":
8730							output += formatNumber( "d", date.getDate(), 2 );
8731							break;
8732						case "D":
8733							output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
8734							break;
8735						case "o":
8736							output += formatNumber( "o",
8737								Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
8738							break;
8739						case "m":
8740							output += formatNumber( "m", date.getMonth() + 1, 2 );
8741							break;
8742						case "M":
8743							output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
8744							break;
8745						case "y":
8746							output += ( lookAhead( "y" ) ? date.getFullYear() :
8747								( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
8748							break;
8749						case "@":
8750							output += date.getTime();
8751							break;
8752						case "!":
8753							output += date.getTime() * 10000 + this._ticksTo1970;
8754							break;
8755						case "'":
8756							if ( lookAhead( "'" ) ) {
8757								output += "'";
8758							} else {
8759								literal = true;
8760							}
8761							break;
8762						default:
8763							output += format.charAt( iFormat );
8764					}
8765				}
8766			}
8767		}
8768		return output;
8769	},
8770
8771	/* Extract all possible characters from the date format. */
8772	_possibleChars: function( format ) {
8773		var iFormat,
8774			chars = "",
8775			literal = false,
8776
8777			// Check whether a format character is doubled
8778			lookAhead = function( match ) {
8779				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
8780				if ( matches ) {
8781					iFormat++;
8782				}
8783				return matches;
8784			};
8785
8786		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
8787			if ( literal ) {
8788				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
8789					literal = false;
8790				} else {
8791					chars += format.charAt( iFormat );
8792				}
8793			} else {
8794				switch ( format.charAt( iFormat ) ) {
8795					case "d": case "m": case "y": case "@":
8796						chars += "0123456789";
8797						break;
8798					case "D": case "M":
8799						return null; // Accept anything
8800					case "'":
8801						if ( lookAhead( "'" ) ) {
8802							chars += "'";
8803						} else {
8804							literal = true;
8805						}
8806						break;
8807					default:
8808						chars += format.charAt( iFormat );
8809				}
8810			}
8811		}
8812		return chars;
8813	},
8814
8815	/* Get a setting value, defaulting if necessary. */
8816	_get: function( inst, name ) {
8817		return inst.settings[ name ] !== undefined ?
8818			inst.settings[ name ] : this._defaults[ name ];
8819	},
8820
8821	/* Parse existing date and initialise date picker. */
8822	_setDateFromField: function( inst, noDefault ) {
8823		if ( inst.input.val() === inst.lastVal ) {
8824			return;
8825		}
8826
8827		var dateFormat = this._get( inst, "dateFormat" ),
8828			dates = inst.lastVal = inst.input ? inst.input.val() : null,
8829			defaultDate = this._getDefaultDate( inst ),
8830			date = defaultDate,
8831			settings = this._getFormatConfig( inst );
8832
8833		try {
8834			date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
8835		} catch ( event ) {
8836			dates = ( noDefault ? "" : dates );
8837		}
8838		inst.selectedDay = date.getDate();
8839		inst.drawMonth = inst.selectedMonth = date.getMonth();
8840		inst.drawYear = inst.selectedYear = date.getFullYear();
8841		inst.currentDay = ( dates ? date.getDate() : 0 );
8842		inst.currentMonth = ( dates ? date.getMonth() : 0 );
8843		inst.currentYear = ( dates ? date.getFullYear() : 0 );
8844		this._adjustInstDate( inst );
8845	},
8846
8847	/* Retrieve the default date shown on opening. */
8848	_getDefaultDate: function( inst ) {
8849		return this._restrictMinMax( inst,
8850			this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
8851	},
8852
8853	/* A date may be specified as an exact value or a relative one. */
8854	_determineDate: function( inst, date, defaultDate ) {
8855		var offsetNumeric = function( offset ) {
8856				var date = new Date();
8857				date.setDate( date.getDate() + offset );
8858				return date;
8859			},
8860			offsetString = function( offset ) {
8861				try {
8862					return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
8863						offset, $.datepicker._getFormatConfig( inst ) );
8864				} catch ( e ) {
8865
8866					// Ignore
8867				}
8868
8869				var date = ( offset.toLowerCase().match( /^c/ ) ?
8870					$.datepicker._getDate( inst ) : null ) || new Date(),
8871					year = date.getFullYear(),
8872					month = date.getMonth(),
8873					day = date.getDate(),
8874					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
8875					matches = pattern.exec( offset );
8876
8877				while ( matches ) {
8878					switch ( matches[ 2 ] || "d" ) {
8879						case "d" : case "D" :
8880							day += parseInt( matches[ 1 ], 10 ); break;
8881						case "w" : case "W" :
8882							day += parseInt( matches[ 1 ], 10 ) * 7; break;
8883						case "m" : case "M" :
8884							month += parseInt( matches[ 1 ], 10 );
8885							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
8886							break;
8887						case "y": case "Y" :
8888							year += parseInt( matches[ 1 ], 10 );
8889							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
8890							break;
8891					}
8892					matches = pattern.exec( offset );
8893				}
8894				return new Date( year, month, day );
8895			},
8896			newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
8897				( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );
8898
8899		newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
8900		if ( newDate ) {
8901			newDate.setHours( 0 );
8902			newDate.setMinutes( 0 );
8903			newDate.setSeconds( 0 );
8904			newDate.setMilliseconds( 0 );
8905		}
8906		return this._daylightSavingAdjust( newDate );
8907	},
8908
8909	/* Handle switch to/from daylight saving.
8910	 * Hours may be non-zero on daylight saving cut-over:
8911	 * > 12 when midnight changeover, but then cannot generate
8912	 * midnight datetime, so jump to 1AM, otherwise reset.
8913	 * @param  date  (Date) the date to check
8914	 * @return  (Date) the corrected date
8915	 */
8916	_daylightSavingAdjust: function( date ) {
8917		if ( !date ) {
8918			return null;
8919		}
8920		date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
8921		return date;
8922	},
8923
8924	/* Set the date(s) directly. */
8925	_setDate: function( inst, date, noChange ) {
8926		var clear = !date,
8927			origMonth = inst.selectedMonth,
8928			origYear = inst.selectedYear,
8929			newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );
8930
8931		inst.selectedDay = inst.currentDay = newDate.getDate();
8932		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
8933		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
8934		if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
8935			this._notifyChange( inst );
8936		}
8937		this._adjustInstDate( inst );
8938		if ( inst.input ) {
8939			inst.input.val( clear ? "" : this._formatDate( inst ) );
8940		}
8941	},
8942
8943	/* Retrieve the date(s) directly. */
8944	_getDate: function( inst ) {
8945		var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
8946			this._daylightSavingAdjust( new Date(
8947			inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
8948			return startDate;
8949	},
8950
8951	/* Attach the onxxx handlers.  These are declared statically so
8952	 * they work with static code transformers like Caja.
8953	 */
8954	_attachHandlers: function( inst ) {
8955		var stepMonths = this._get( inst, "stepMonths" ),
8956			id = "#" + inst.id.replace( /\\\\/g, "\\" );
8957		inst.dpDiv.find( "[data-handler]" ).map( function() {
8958			var handler = {
8959				prev: function() {
8960					$.datepicker._adjustDate( id, -stepMonths, "M" );
8961				},
8962				next: function() {
8963					$.datepicker._adjustDate( id, +stepMonths, "M" );
8964				},
8965				hide: function() {
8966					$.datepicker._hideDatepicker();
8967				},
8968				today: function() {
8969					$.datepicker._gotoToday( id );
8970				},
8971				selectDay: function() {
8972					$.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
8973					return false;
8974				},
8975				selectMonth: function() {
8976					$.datepicker._selectMonthYear( id, this, "M" );
8977					return false;
8978				},
8979				selectYear: function() {
8980					$.datepicker._selectMonthYear( id, this, "Y" );
8981					return false;
8982				}
8983			};
8984			$( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
8985		} );
8986	},
8987
8988	/* Generate the HTML for the current state of the date picker. */
8989	_generateHTML: function( inst ) {
8990		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
8991			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
8992			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
8993			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
8994			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
8995			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
8996			tempDate = new Date(),
8997			today = this._daylightSavingAdjust(
8998				new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
8999			isRTL = this._get( inst, "isRTL" ),
9000			showButtonPanel = this._get( inst, "showButtonPanel" ),
9001			hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
9002			navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
9003			numMonths = this._getNumberOfMonths( inst ),
9004			showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
9005			stepMonths = this._get( inst, "stepMonths" ),
9006			isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
9007			currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
9008				new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
9009			minDate = this._getMinMaxDate( inst, "min" ),
9010			maxDate = this._getMinMaxDate( inst, "max" ),
9011			drawMonth = inst.drawMonth - showCurrentAtPos,
9012			drawYear = inst.drawYear;
9013
9014		if ( drawMonth < 0 ) {
9015			drawMonth += 12;
9016			drawYear--;
9017		}
9018		if ( maxDate ) {
9019			maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
9020				maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
9021			maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
9022			while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
9023				drawMonth--;
9024				if ( drawMonth < 0 ) {
9025					drawMonth = 11;
9026					drawYear--;
9027				}
9028			}
9029		}
9030		inst.drawMonth = drawMonth;
9031		inst.drawYear = drawYear;
9032
9033		prevText = this._get( inst, "prevText" );
9034		prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
9035			this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
9036			this._getFormatConfig( inst ) ) );
9037
9038		if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
9039			prev = $( "<a>" )
9040				.attr( {
9041					"class": "ui-datepicker-prev ui-corner-all",
9042					"data-handler": "prev",
9043					"data-event": "click",
9044					title: prevText
9045				} )
9046				.append(
9047					$( "<span>" )
9048						.addClass( "ui-icon ui-icon-circle-triangle-" +
9049							( isRTL ? "e" : "w" ) )
9050						.text( prevText )
9051				)[ 0 ].outerHTML;
9052		} else if ( hideIfNoPrevNext ) {
9053			prev = "";
9054		} else {
9055			prev = $( "<a>" )
9056				.attr( {
9057					"class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
9058					title: prevText
9059				} )
9060				.append(
9061					$( "<span>" )
9062						.addClass( "ui-icon ui-icon-circle-triangle-" +
9063							( isRTL ? "e" : "w" ) )
9064						.text( prevText )
9065				)[ 0 ].outerHTML;
9066		}
9067
9068		nextText = this._get( inst, "nextText" );
9069		nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
9070			this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
9071			this._getFormatConfig( inst ) ) );
9072
9073		if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
9074			next = $( "<a>" )
9075				.attr( {
9076					"class": "ui-datepicker-next ui-corner-all",
9077					"data-handler": "next",
9078					"data-event": "click",
9079					title: nextText
9080				} )
9081				.append(
9082					$( "<span>" )
9083						.addClass( "ui-icon ui-icon-circle-triangle-" +
9084							( isRTL ? "w" : "e" ) )
9085						.text( nextText )
9086				)[ 0 ].outerHTML;
9087		} else if ( hideIfNoPrevNext ) {
9088			next = "";
9089		} else {
9090			next = $( "<a>" )
9091				.attr( {
9092					"class": "ui-datepicker-next ui-corner-all ui-state-disabled",
9093					title: nextText
9094				} )
9095				.append(
9096					$( "<span>" )
9097						.attr( "class", "ui-icon ui-icon-circle-triangle-" +
9098							( isRTL ? "w" : "e" ) )
9099						.text( nextText )
9100				)[ 0 ].outerHTML;
9101		}
9102
9103		currentText = this._get( inst, "currentText" );
9104		gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
9105		currentText = ( !navigationAsDateFormat ? currentText :
9106			this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
9107
9108		controls = "";
9109		if ( !inst.inline ) {
9110			controls = $( "<button>" )
9111				.attr( {
9112					type: "button",
9113					"class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
9114					"data-handler": "hide",
9115					"data-event": "click"
9116				} )
9117				.text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
9118		}
9119
9120		buttonPanel = "";
9121		if ( showButtonPanel ) {
9122			buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
9123				.append( isRTL ? controls : "" )
9124				.append( this._isInRange( inst, gotoDate ) ?
9125					$( "<button>" )
9126						.attr( {
9127							type: "button",
9128							"class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
9129							"data-handler": "today",
9130							"data-event": "click"
9131						} )
9132						.text( currentText ) :
9133					"" )
9134				.append( isRTL ? "" : controls )[ 0 ].outerHTML;
9135		}
9136
9137		firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
9138		firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
9139
9140		showWeek = this._get( inst, "showWeek" );
9141		dayNames = this._get( inst, "dayNames" );
9142		dayNamesMin = this._get( inst, "dayNamesMin" );
9143		monthNames = this._get( inst, "monthNames" );
9144		monthNamesShort = this._get( inst, "monthNamesShort" );
9145		beforeShowDay = this._get( inst, "beforeShowDay" );
9146		showOtherMonths = this._get( inst, "showOtherMonths" );
9147		selectOtherMonths = this._get( inst, "selectOtherMonths" );
9148		defaultDate = this._getDefaultDate( inst );
9149		html = "";
9150
9151		for ( row = 0; row < numMonths[ 0 ]; row++ ) {
9152			group = "";
9153			this.maxRows = 4;
9154			for ( col = 0; col < numMonths[ 1 ]; col++ ) {
9155				selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
9156				cornerClass = " ui-corner-all";
9157				calender = "";
9158				if ( isMultiMonth ) {
9159					calender += "<div class='ui-datepicker-group";
9160					if ( numMonths[ 1 ] > 1 ) {
9161						switch ( col ) {
9162							case 0: calender += " ui-datepicker-group-first";
9163								cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
9164							case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
9165								cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
9166							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
9167						}
9168					}
9169					calender += "'>";
9170				}
9171				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
9172					( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
9173					( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
9174					this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
9175					row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
9176					"</div><table class='ui-datepicker-calendar'><thead>" +
9177					"<tr>";
9178				thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
9179				for ( dow = 0; dow < 7; dow++ ) { // days of the week
9180					day = ( dow + firstDay ) % 7;
9181					thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
9182						"<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
9183				}
9184				calender += thead + "</tr></thead><tbody>";
9185				daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
9186				if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
9187					inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
9188				}
9189				leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
9190				curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
9191				numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
9192				this.maxRows = numRows;
9193				printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
9194				for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
9195					calender += "<tr>";
9196					tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
9197						this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
9198					for ( dow = 0; dow < 7; dow++ ) { // create date picker days
9199						daySettings = ( beforeShowDay ?
9200							beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
9201						otherMonth = ( printDate.getMonth() !== drawMonth );
9202						unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
9203							( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
9204						tbody += "<td class='" +
9205							( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
9206							( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
9207							( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
9208							( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?
9209
9210							// or defaultDate is current printedDate and defaultDate is selectedDate
9211							" " + this._dayOverClass : "" ) + // highlight selected day
9212							( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) +  // highlight unselectable days
9213							( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
9214							( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
9215							( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
9216							( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
9217							( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
9218							( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
9219							( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
9220							( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
9221							( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
9222							( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
9223							"' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
9224							"' data-date='" + printDate.getDate() + // store date as data
9225							"'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
9226						printDate.setDate( printDate.getDate() + 1 );
9227						printDate = this._daylightSavingAdjust( printDate );
9228					}
9229					calender += tbody + "</tr>";
9230				}
9231				drawMonth++;
9232				if ( drawMonth > 11 ) {
9233					drawMonth = 0;
9234					drawYear++;
9235				}
9236				calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
9237							( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
9238				group += calender;
9239			}
9240			html += group;
9241		}
9242		html += buttonPanel;
9243		inst._keyEvent = false;
9244		return html;
9245	},
9246
9247	/* Generate the month and year header. */
9248	_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
9249			secondary, monthNames, monthNamesShort ) {
9250
9251		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
9252			changeMonth = this._get( inst, "changeMonth" ),
9253			changeYear = this._get( inst, "changeYear" ),
9254			showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
9255			selectMonthLabel = this._get( inst, "selectMonthLabel" ),
9256				selectYearLabel = this._get( inst, "selectYearLabel" ),
9257			html = "<div class='ui-datepicker-title'>",
9258			monthHtml = "";
9259
9260		// Month selection
9261		if ( secondary || !changeMonth ) {
9262			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
9263		} else {
9264			inMinYear = ( minDate && minDate.getFullYear() === drawYear );
9265			inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
9266			monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
9267			for ( month = 0; month < 12; month++ ) {
9268				if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
9269					monthHtml += "<option value='" + month + "'" +
9270						( month === drawMonth ? " selected='selected'" : "" ) +
9271						">" + monthNamesShort[ month ] + "</option>";
9272				}
9273			}
9274			monthHtml += "</select>";
9275		}
9276
9277		if ( !showMonthAfterYear ) {
9278			html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
9279		}
9280
9281		// Year selection
9282		if ( !inst.yearshtml ) {
9283			inst.yearshtml = "";
9284			if ( secondary || !changeYear ) {
9285				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
9286			} else {
9287
9288				// determine range of years to display
9289				years = this._get( inst, "yearRange" ).split( ":" );
9290				thisYear = new Date().getFullYear();
9291				determineYear = function( value ) {
9292					var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
9293						( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
9294						parseInt( value, 10 ) ) );
9295					return ( isNaN( year ) ? thisYear : year );
9296				};
9297				year = determineYear( years[ 0 ] );
9298				endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
9299				year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
9300				endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
9301				inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
9302				for ( ; year <= endYear; year++ ) {
9303					inst.yearshtml += "<option value='" + year + "'" +
9304						( year === drawYear ? " selected='selected'" : "" ) +
9305						">" + year + "</option>";
9306				}
9307				inst.yearshtml += "</select>";
9308
9309				html += inst.yearshtml;
9310				inst.yearshtml = null;
9311			}
9312		}
9313
9314		html += this._get( inst, "yearSuffix" );
9315		if ( showMonthAfterYear ) {
9316			html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
9317		}
9318		html += "</div>"; // Close datepicker_header
9319		return html;
9320	},
9321
9322	/* Adjust one of the date sub-fields. */
9323	_adjustInstDate: function( inst, offset, period ) {
9324		var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
9325			month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
9326			day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
9327			date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
9328
9329		inst.selectedDay = date.getDate();
9330		inst.drawMonth = inst.selectedMonth = date.getMonth();
9331		inst.drawYear = inst.selectedYear = date.getFullYear();
9332		if ( period === "M" || period === "Y" ) {
9333			this._notifyChange( inst );
9334		}
9335	},
9336
9337	/* Ensure a date is within any min/max bounds. */
9338	_restrictMinMax: function( inst, date ) {
9339		var minDate = this._getMinMaxDate( inst, "min" ),
9340			maxDate = this._getMinMaxDate( inst, "max" ),
9341			newDate = ( minDate && date < minDate ? minDate : date );
9342		return ( maxDate && newDate > maxDate ? maxDate : newDate );
9343	},
9344
9345	/* Notify change of month/year. */
9346	_notifyChange: function( inst ) {
9347		var onChange = this._get( inst, "onChangeMonthYear" );
9348		if ( onChange ) {
9349			onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
9350				[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
9351		}
9352	},
9353
9354	/* Determine the number of months to show. */
9355	_getNumberOfMonths: function( inst ) {
9356		var numMonths = this._get( inst, "numberOfMonths" );
9357		return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
9358	},
9359
9360	/* Determine the current maximum date - ensure no time components are set. */
9361	_getMinMaxDate: function( inst, minMax ) {
9362		return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
9363	},
9364
9365	/* Find the number of days in a given month. */
9366	_getDaysInMonth: function( year, month ) {
9367		return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
9368	},
9369
9370	/* Find the day of the week of the first of a month. */
9371	_getFirstDayOfMonth: function( year, month ) {
9372		return new Date( year, month, 1 ).getDay();
9373	},
9374
9375	/* Determines if we should allow a "next/prev" month display change. */
9376	_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
9377		var numMonths = this._getNumberOfMonths( inst ),
9378			date = this._daylightSavingAdjust( new Date( curYear,
9379			curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
9380
9381		if ( offset < 0 ) {
9382			date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
9383		}
9384		return this._isInRange( inst, date );
9385	},
9386
9387	/* Is the given date in the accepted range? */
9388	_isInRange: function( inst, date ) {
9389		var yearSplit, currentYear,
9390			minDate = this._getMinMaxDate( inst, "min" ),
9391			maxDate = this._getMinMaxDate( inst, "max" ),
9392			minYear = null,
9393			maxYear = null,
9394			years = this._get( inst, "yearRange" );
9395			if ( years ) {
9396				yearSplit = years.split( ":" );
9397				currentYear = new Date().getFullYear();
9398				minYear = parseInt( yearSplit[ 0 ], 10 );
9399				maxYear = parseInt( yearSplit[ 1 ], 10 );
9400				if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
9401					minYear += currentYear;
9402				}
9403				if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
9404					maxYear += currentYear;
9405				}
9406			}
9407
9408		return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
9409			( !maxDate || date.getTime() <= maxDate.getTime() ) &&
9410			( !minYear || date.getFullYear() >= minYear ) &&
9411			( !maxYear || date.getFullYear() <= maxYear ) );
9412	},
9413
9414	/* Provide the configuration settings for formatting/parsing. */
9415	_getFormatConfig: function( inst ) {
9416		var shortYearCutoff = this._get( inst, "shortYearCutoff" );
9417		shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
9418			new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
9419		return { shortYearCutoff: shortYearCutoff,
9420			dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
9421			monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
9422	},
9423
9424	/* Format the given date for display. */
9425	_formatDate: function( inst, day, month, year ) {
9426		if ( !day ) {
9427			inst.currentDay = inst.selectedDay;
9428			inst.currentMonth = inst.selectedMonth;
9429			inst.currentYear = inst.selectedYear;
9430		}
9431		var date = ( day ? ( typeof day === "object" ? day :
9432			this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
9433			this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
9434		return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
9435	}
9436} );
9437
9438/*
9439 * Bind hover events for datepicker elements.
9440 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
9441 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
9442 */
9443function datepicker_bindHover( dpDiv ) {
9444	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
9445	return dpDiv.on( "mouseout", selector, function() {
9446			$( this ).removeClass( "ui-state-hover" );
9447			if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
9448				$( this ).removeClass( "ui-datepicker-prev-hover" );
9449			}
9450			if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
9451				$( this ).removeClass( "ui-datepicker-next-hover" );
9452			}
9453		} )
9454		.on( "mouseover", selector, datepicker_handleMouseover );
9455}
9456
9457function datepicker_handleMouseover() {
9458	if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
9459		$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
9460		$( this ).addClass( "ui-state-hover" );
9461		if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
9462			$( this ).addClass( "ui-datepicker-prev-hover" );
9463		}
9464		if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
9465			$( this ).addClass( "ui-datepicker-next-hover" );
9466		}
9467	}
9468}
9469
9470/* jQuery extend now ignores nulls! */
9471function datepicker_extendRemove( target, props ) {
9472	$.extend( target, props );
9473	for ( var name in props ) {
9474		if ( props[ name ] == null ) {
9475			target[ name ] = props[ name ];
9476		}
9477	}
9478	return target;
9479}
9480
9481/* Invoke the datepicker functionality.
9482   @param  options  string - a command, optionally followed by additional parameters or
9483					Object - settings for attaching new datepicker functionality
9484   @return  jQuery object */
9485$.fn.datepicker = function( options ) {
9486
9487	/* Verify an empty collection wasn't passed - Fixes #6976 */
9488	if ( !this.length ) {
9489		return this;
9490	}
9491
9492	/* Initialise the date picker. */
9493	if ( !$.datepicker.initialized ) {
9494		$( document ).on( "mousedown", $.datepicker._checkExternalClick );
9495		$.datepicker.initialized = true;
9496	}
9497
9498	/* Append datepicker main container to body if not exist. */
9499	if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
9500		$( "body" ).append( $.datepicker.dpDiv );
9501	}
9502
9503	var otherArgs = Array.prototype.slice.call( arguments, 1 );
9504	if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
9505		return $.datepicker[ "_" + options + "Datepicker" ].
9506			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
9507	}
9508	if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
9509		return $.datepicker[ "_" + options + "Datepicker" ].
9510			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
9511	}
9512	return this.each( function() {
9513		if ( typeof options === "string" ) {
9514			$.datepicker[ "_" + options + "Datepicker" ]
9515				.apply( $.datepicker, [ this ].concat( otherArgs ) );
9516		} else {
9517			$.datepicker._attachDatepicker( this, options );
9518		}
9519	} );
9520};
vendor: 14,641 bytes, lines 9521-10072
9521
9522$.datepicker = new Datepicker(); // singleton instance
9523$.datepicker.initialized = false;
9524$.datepicker.uuid = new Date().getTime();
9525$.datepicker.version = "1.13.2";
9526
9527var widgetsDatepicker = $.datepicker;
9528
9529
9530
9531// This file is deprecated
9532var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
9533
9534/*!
9535 * jQuery UI Mouse 1.13.2
9536 * http://jqueryui.com
9537 *
9538 * Copyright jQuery Foundation and other contributors
9539 * Released under the MIT license.
9540 * http://jquery.org/license
9541 */
9542
9543//>>label: Mouse
9544//>>group: Widgets
9545//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
9546//>>docs: http://api.jqueryui.com/mouse/
9547
9548
9549var mouseHandled = false;
9550$( document ).on( "mouseup", function() {
9551	mouseHandled = false;
9552} );
9553
9554var widgetsMouse = $.widget( "ui.mouse", {
9555	version: "1.13.2",
9556	options: {
9557		cancel: "input, textarea, button, select, option",
9558		distance: 1,
9559		delay: 0
9560	},
9561	_mouseInit: function() {
9562		var that = this;
9563
9564		this.element
9565			.on( "mousedown." + this.widgetName, function( event ) {
9566				return that._mouseDown( event );
9567			} )
9568			.on( "click." + this.widgetName, function( event ) {
9569				if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
9570					$.removeData( event.target, that.widgetName + ".preventClickEvent" );
9571					event.stopImmediatePropagation();
9572					return false;
9573				}
9574			} );
9575
9576		this.started = false;
9577	},
9578
9579	// TODO: make sure destroying one instance of mouse doesn't mess with
9580	// other instances of mouse
9581	_mouseDestroy: function() {
9582		this.element.off( "." + this.widgetName );
9583		if ( this._mouseMoveDelegate ) {
9584			this.document
9585				.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
9586				.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
9587		}
9588	},
9589
9590	_mouseDown: function( event ) {
9591
9592		// don't let more than one widget handle mouseStart
9593		if ( mouseHandled ) {
9594			return;
9595		}
9596
9597		this._mouseMoved = false;
9598
9599		// We may have missed mouseup (out of window)
9600		if ( this._mouseStarted ) {
9601			this._mouseUp( event );
9602		}
9603
9604		this._mouseDownEvent = event;
9605
9606		var that = this,
9607			btnIsLeft = ( event.which === 1 ),
9608
9609			// event.target.nodeName works around a bug in IE 8 with
9610			// disabled inputs (#7620)
9611			elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
9612				$( event.target ).closest( this.options.cancel ).length : false );
9613		if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
9614			return true;
9615		}
9616
9617		this.mouseDelayMet = !this.options.delay;
9618		if ( !this.mouseDelayMet ) {
9619			this._mouseDelayTimer = setTimeout( function() {
9620				that.mouseDelayMet = true;
9621			}, this.options.delay );
9622		}
9623
9624		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
9625			this._mouseStarted = ( this._mouseStart( event ) !== false );
9626			if ( !this._mouseStarted ) {
9627				event.preventDefault();
9628				return true;
9629			}
9630		}
9631
9632		// Click event may never have fired (Gecko & Opera)
9633		if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
9634			$.removeData( event.target, this.widgetName + ".preventClickEvent" );
9635		}
9636
9637		// These delegates are required to keep context
9638		this._mouseMoveDelegate = function( event ) {
9639			return that._mouseMove( event );
9640		};
9641		this._mouseUpDelegate = function( event ) {
9642			return that._mouseUp( event );
9643		};
9644
9645		this.document
9646			.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
9647			.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
9648
9649		event.preventDefault();
9650
9651		mouseHandled = true;
9652		return true;
9653	},
9654
9655	_mouseMove: function( event ) {
9656
9657		// Only check for mouseups outside the document if you've moved inside the document
9658		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
9659		// fire a mousemove event if content is placed under the cursor. See #7778
9660		// Support: IE <9
9661		if ( this._mouseMoved ) {
9662
9663			// IE mouseup check - mouseup happened when mouse was out of window
9664			if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
9665					!event.button ) {
9666				return this._mouseUp( event );
9667
9668			// Iframe mouseup check - mouseup occurred in another document
9669			} else if ( !event.which ) {
9670
9671				// Support: Safari <=8 - 9
9672				// Safari sets which to 0 if you press any of the following keys
9673				// during a drag (#14461)
9674				if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
9675						event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
9676					this.ignoreMissingWhich = true;
9677				} else if ( !this.ignoreMissingWhich ) {
9678					return this._mouseUp( event );
9679				}
9680			}
9681		}
9682
9683		if ( event.which || event.button ) {
9684			this._mouseMoved = true;
9685		}
9686
9687		if ( this._mouseStarted ) {
9688			this._mouseDrag( event );
9689			return event.preventDefault();
9690		}
9691
9692		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
9693			this._mouseStarted =
9694				( this._mouseStart( this._mouseDownEvent, event ) !== false );
9695			if ( this._mouseStarted ) {
9696				this._mouseDrag( event );
9697			} else {
9698				this._mouseUp( event );
9699			}
9700		}
9701
9702		return !this._mouseStarted;
9703	},
9704
9705	_mouseUp: function( event ) {
9706		this.document
9707			.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
9708			.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
9709
9710		if ( this._mouseStarted ) {
9711			this._mouseStarted = false;
9712
9713			if ( event.target === this._mouseDownEvent.target ) {
9714				$.data( event.target, this.widgetName + ".preventClickEvent", true );
9715			}
9716
9717			this._mouseStop( event );
9718		}
9719
9720		if ( this._mouseDelayTimer ) {
9721			clearTimeout( this._mouseDelayTimer );
9722			delete this._mouseDelayTimer;
9723		}
9724
9725		this.ignoreMissingWhich = false;
9726		mouseHandled = false;
9727		event.preventDefault();
9728	},
9729
9730	_mouseDistanceMet: function( event ) {
9731		return ( Math.max(
9732				Math.abs( this._mouseDownEvent.pageX - event.pageX ),
9733				Math.abs( this._mouseDownEvent.pageY - event.pageY )
9734			) >= this.options.distance
9735		);
9736	},
9737
9738	_mouseDelayMet: function( /* event */ ) {
9739		return this.mouseDelayMet;
9740	},
9741
9742	// These are placeholder methods, to be overriden by extending plugin
9743	_mouseStart: function( /* event */ ) {},
9744	_mouseDrag: function( /* event */ ) {},
9745	_mouseStop: function( /* event */ ) {},
9746	_mouseCapture: function( /* event */ ) {
9747		return true;
9748	}
9749} );
9750
9751
9752
9753// $.ui.plugin is deprecated. Use $.widget() extensions instead.
9754var plugin = $.ui.plugin = {
9755	add: function( module, option, set ) {
9756		var i,
9757			proto = $.ui[ module ].prototype;
9758		for ( i in set ) {
9759			proto.plugins[ i ] = proto.plugins[ i ] || [];
9760			proto.plugins[ i ].push( [ option, set[ i ] ] );
9761		}
9762	},
9763	call: function( instance, name, args, allowDisconnected ) {
9764		var i,
9765			set = instance.plugins[ name ];
9766
9767		if ( !set ) {
9768			return;
9769		}
9770
9771		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
9772				instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
9773			return;
9774		}
9775
9776		for ( i = 0; i < set.length; i++ ) {
9777			if ( instance.options[ set[ i ][ 0 ] ] ) {
9778				set[ i ][ 1 ].apply( instance.element, args );
9779			}
9780		}
9781	}
9782};
9783
9784
9785
9786var safeBlur = $.ui.safeBlur = function( element ) {
9787
9788	// Support: IE9 - 10 only
9789	// If the <body> is blurred, IE will switch windows, see #9420
9790	if ( element && element.nodeName.toLowerCase() !== "body" ) {
9791		$( element ).trigger( "blur" );
9792	}
9793};
9794
9795
9796/*!
9797 * jQuery UI Draggable 1.13.2
9798 * http://jqueryui.com
9799 *
9800 * Copyright jQuery Foundation and other contributors
9801 * Released under the MIT license.
9802 * http://jquery.org/license
9803 */
9804
9805//>>label: Draggable
9806//>>group: Interactions
9807//>>description: Enables dragging functionality for any element.
9808//>>docs: http://api.jqueryui.com/draggable/
9809//>>demos: http://jqueryui.com/draggable/
9810//>>css.structure: ../../themes/base/draggable.css
9811
9812
9813$.widget( "ui.draggable", $.ui.mouse, {
9814	version: "1.13.2",
9815	widgetEventPrefix: "drag",
9816	options: {
9817		addClasses: true,
9818		appendTo: "parent",
9819		axis: false,
9820		connectToSortable: false,
9821		containment: false,
9822		cursor: "auto",
9823		cursorAt: false,
9824		grid: false,
9825		handle: false,
9826		helper: "original",
9827		iframeFix: false,
9828		opacity: false,
9829		refreshPositions: false,
9830		revert: false,
9831		revertDuration: 500,
9832		scope: "default",
9833		scroll: true,
9834		scrollSensitivity: 20,
9835		scrollSpeed: 20,
9836		snap: false,
9837		snapMode: "both",
9838		snapTolerance: 20,
9839		stack: false,
9840		zIndex: false,
9841
9842		// Callbacks
9843		drag: null,
9844		start: null,
9845		stop: null
9846	},
9847	_create: function() {
9848
9849		if ( this.options.helper === "original" ) {
9850			this._setPositionRelative();
9851		}
9852		if ( this.options.addClasses ) {
9853			this._addClass( "ui-draggable" );
9854		}
9855		this._setHandleClassName();
9856
9857		this._mouseInit();
9858	},
9859
9860	_setOption: function( key, value ) {
9861		this._super( key, value );
9862		if ( key === "handle" ) {
9863			this._removeHandleClassName();
9864			this._setHandleClassName();
9865		}
9866	},
9867
9868	_destroy: function() {
9869		if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
9870			this.destroyOnClear = true;
9871			return;
9872		}
9873		this._removeHandleClassName();
9874		this._mouseDestroy();
9875	},
9876
9877	_mouseCapture: function( event ) {
9878		var o = this.options;
9879
9880		// Among others, prevent a drag on a resizable-handle
9881		if ( this.helper || o.disabled ||
9882				$( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
9883			return false;
9884		}
9885
9886		//Quit if we're not on a valid handle
9887		this.handle = this._getHandle( event );
9888		if ( !this.handle ) {
9889			return false;
9890		}
9891
9892		this._blurActiveElement( event );
9893
9894		this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
9895
9896		return true;
9897
9898	},
9899
9900	_blockFrames: function( selector ) {
9901		this.iframeBlocks = this.document.find( selector ).map( function() {
9902			var iframe = $( this );
9903
9904			return $( "<div>" )
9905				.css( "position", "absolute" )
9906				.appendTo( iframe.parent() )
9907				.outerWidth( iframe.outerWidth() )
9908				.outerHeight( iframe.outerHeight() )
9909				.offset( iframe.offset() )[ 0 ];
9910		} );
9911	},
9912
9913	_unblockFrames: function() {
9914		if ( this.iframeBlocks ) {
9915			this.iframeBlocks.remove();
9916			delete this.iframeBlocks;
9917		}
9918	},
9919
9920	_blurActiveElement: function( event ) {
9921		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
9922			target = $( event.target );
9923
9924		// Don't blur if the event occurred on an element that is within
9925		// the currently focused element
9926		// See #10527, #12472
9927		if ( target.closest( activeElement ).length ) {
9928			return;
9929		}
9930
9931		// Blur any element that currently has focus, see #4261
9932		$.ui.safeBlur( activeElement );
9933	},
9934
9935	_mouseStart: function( event ) {
9936
9937		var o = this.options;
9938
9939		//Create and append the visible helper
9940		this.helper = this._createHelper( event );
9941
9942		this._addClass( this.helper, "ui-draggable-dragging" );
9943
9944		//Cache the helper size
9945		this._cacheHelperProportions();
9946
9947		//If ddmanager is used for droppables, set the global draggable
9948		if ( $.ui.ddmanager ) {
9949			$.ui.ddmanager.current = this;
9950		}
9951
9952		/*
9953		 * - Position generation -
9954		 * This block generates everything position related - it's the core of draggables.
9955		 */
9956
9957		//Cache the margins of the original element
9958		this._cacheMargins();
9959
9960		//Store the helper's css position
9961		this.cssPosition = this.helper.css( "position" );
9962		this.scrollParent = this.helper.scrollParent( true );
9963		this.offsetParent = this.helper.offsetParent();
9964		this.hasFixedAncestor = this.helper.parents().filter( function() {
9965				return $( this ).css( "position" ) === "fixed";
9966			} ).length > 0;
9967
9968		//The element's absolute position on the page minus margins
9969		this.positionAbs = this.element.offset();
9970		this._refreshOffsets( event );
9971
9972		//Generate the original position
9973		this.originalPosition = this.position = this._generatePosition( event, false );
9974		this.originalPageX = event.pageX;
9975		this.originalPageY = event.pageY;
9976
9977		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
9978		if ( o.cursorAt ) {
9979			this._adjustOffsetFromHelper( o.cursorAt );
9980		}
9981
9982		//Set a containment if given in the options
9983		this._setContainment();
9984
9985		//Trigger event + callbacks
9986		if ( this._trigger( "start", event ) === false ) {
9987			this._clear();
9988			return false;
9989		}
9990
9991		//Recache the helper size
9992		this._cacheHelperProportions();
9993
9994		//Prepare the droppable offsets
9995		if ( $.ui.ddmanager && !o.dropBehaviour ) {
9996			$.ui.ddmanager.prepareOffsets( this, event );
9997		}
9998
9999		// Execute the drag once - this causes the helper not to be visible before getting its
10000		// correct position
10001		this._mouseDrag( event, true );
10002
10003		// If the ddmanager is used for droppables, inform the manager that dragging has started
10004		// (see #5003)
10005		if ( $.ui.ddmanager ) {
10006			$.ui.ddmanager.dragStart( this, event );
10007		}
10008
10009		return true;
10010	},
10011
10012	_refreshOffsets: function( event ) {
10013		this.offset = {
10014			top: this.positionAbs.top - this.margins.top,
10015			left: this.positionAbs.left - this.margins.left,
10016			scroll: false,
10017			parent: this._getParentOffset(),
10018			relative: this._getRelativeOffset()
10019		};
10020
10021		this.offset.click = {
10022			left: event.pageX - this.offset.left,
10023			top: event.pageY - this.offset.top
10024		};
10025	},
10026
10027	_mouseDrag: function( event, noPropagation ) {
10028
10029		// reset any necessary cached properties (see #5009)
10030		if ( this.hasFixedAncestor ) {
10031			this.offset.parent = this._getParentOffset();
10032		}
10033
10034		//Compute the helpers position
10035		this.position = this._generatePosition( event, true );
10036		this.positionAbs = this._convertPositionTo( "absolute" );
10037
10038		//Call plugins and callbacks and use the resulting position if something is returned
10039		if ( !noPropagation ) {
10040			var ui = this._uiHash();
10041			if ( this._trigger( "drag", event, ui ) === false ) {
10042				this._mouseUp( new $.Event( "mouseup", event ) );
10043				return false;
10044			}
10045			this.position = ui.position;
10046		}
10047
10048		this.helper[ 0 ].style.left = this.position.left + "px";
10049		this.helper[ 0 ].style.top = this.position.top + "px";
10050
10051		if ( $.ui.ddmanager ) {
10052			$.ui.ddmanager.drag( this, event );
10053		}
10054
10055		return false;
10056	},
10057
10058	_mouseStop: function( event ) {
10059
10060		//If we are using droppables, inform the manager about the drop
10061		var that = this,
10062			dropped = false;
10063		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
10064			dropped = $.ui.ddmanager.drop( this, event );
10065		}
10066
10067		//if a drop comes from outside (a sortable)
10068		if ( this.dropped ) {
10069			dropped = this.dropped;
10070			this.dropped = false;
10071		}
10072
vendor: 29,295 bytes, lines 10073-11033
10073		if ( ( this.options.revert === "invalid" && !dropped ) ||
10074				( this.options.revert === "valid" && dropped ) ||
10075				this.options.revert === true || ( typeof this.options.revert === "function" &&
10076				this.options.revert.call( this.element, dropped ) )
10077		) {
10078			$( this.helper ).animate(
10079				this.originalPosition,
10080				parseInt( this.options.revertDuration, 10 ),
10081				function() {
10082					if ( that._trigger( "stop", event ) !== false ) {
10083						that._clear();
10084					}
10085				}
10086			);
10087		} else {
10088			if ( this._trigger( "stop", event ) !== false ) {
10089				this._clear();
10090			}
10091		}
10092
10093		return false;
10094	},
10095
10096	_mouseUp: function( event ) {
10097		this._unblockFrames();
10098
10099		// If the ddmanager is used for droppables, inform the manager that dragging has stopped
10100		// (see #5003)
10101		if ( $.ui.ddmanager ) {
10102			$.ui.ddmanager.dragStop( this, event );
10103		}
10104
10105		// Only need to focus if the event occurred on the draggable itself, see #10527
10106		if ( this.handleElement.is( event.target ) ) {
10107
10108			// The interaction is over; whether or not the click resulted in a drag,
10109			// focus the element
10110			this.element.trigger( "focus" );
10111		}
10112
10113		return $.ui.mouse.prototype._mouseUp.call( this, event );
10114	},
10115
10116	cancel: function() {
10117
10118		if ( this.helper.is( ".ui-draggable-dragging" ) ) {
10119			this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
10120		} else {
10121			this._clear();
10122		}
10123
10124		return this;
10125
10126	},
10127
10128	_getHandle: function( event ) {
10129		return this.options.handle ?
10130			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
10131			true;
10132	},
10133
10134	_setHandleClassName: function() {
10135		this.handleElement = this.options.handle ?
10136			this.element.find( this.options.handle ) : this.element;
10137		this._addClass( this.handleElement, "ui-draggable-handle" );
10138	},
10139
10140	_removeHandleClassName: function() {
10141		this._removeClass( this.handleElement, "ui-draggable-handle" );
10142	},
10143
10144	_createHelper: function( event ) {
10145
10146		var o = this.options,
10147			helperIsFunction = typeof o.helper === "function",
10148			helper = helperIsFunction ?
10149				$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
10150				( o.helper === "clone" ?
10151					this.element.clone().removeAttr( "id" ) :
10152					this.element );
10153
10154		if ( !helper.parents( "body" ).length ) {
10155			helper.appendTo( ( o.appendTo === "parent" ?
10156				this.element[ 0 ].parentNode :
10157				o.appendTo ) );
10158		}
10159
10160		// Http://bugs.jqueryui.com/ticket/9446
10161		// a helper function can return the original element
10162		// which wouldn't have been set to relative in _create
10163		if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
10164			this._setPositionRelative();
10165		}
10166
10167		if ( helper[ 0 ] !== this.element[ 0 ] &&
10168				!( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
10169			helper.css( "position", "absolute" );
10170		}
10171
10172		return helper;
10173
10174	},
10175
10176	_setPositionRelative: function() {
10177		if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
10178			this.element[ 0 ].style.position = "relative";
10179		}
10180	},
10181
10182	_adjustOffsetFromHelper: function( obj ) {
10183		if ( typeof obj === "string" ) {
10184			obj = obj.split( " " );
10185		}
10186		if ( Array.isArray( obj ) ) {
10187			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
10188		}
10189		if ( "left" in obj ) {
10190			this.offset.click.left = obj.left + this.margins.left;
10191		}
10192		if ( "right" in obj ) {
10193			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
10194		}
10195		if ( "top" in obj ) {
10196			this.offset.click.top = obj.top + this.margins.top;
10197		}
10198		if ( "bottom" in obj ) {
10199			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
10200		}
10201	},
10202
10203	_isRootNode: function( element ) {
10204		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
10205	},
10206
10207	_getParentOffset: function() {
10208
10209		//Get the offsetParent and cache its position
10210		var po = this.offsetParent.offset(),
10211			document = this.document[ 0 ];
10212
10213		// This is a special case where we need to modify a offset calculated on start, since the
10214		// following happened:
10215		// 1. The position of the helper is absolute, so it's position is calculated based on the
10216		// next positioned parent
10217		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
10218		// the document, which means that the scroll is included in the initial calculation of the
10219		// offset of the parent, and never recalculated upon drag
10220		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
10221				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
10222			po.left += this.scrollParent.scrollLeft();
10223			po.top += this.scrollParent.scrollTop();
10224		}
10225
10226		if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
10227			po = { top: 0, left: 0 };
10228		}
10229
10230		return {
10231			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
10232			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
10233		};
10234
10235	},
10236
10237	_getRelativeOffset: function() {
10238		if ( this.cssPosition !== "relative" ) {
10239			return { top: 0, left: 0 };
10240		}
10241
10242		var p = this.element.position(),
10243			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
10244
10245		return {
10246			top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
10247				( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
10248			left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
10249				( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
10250		};
10251
10252	},
10253
10254	_cacheMargins: function() {
10255		this.margins = {
10256			left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
10257			top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
10258			right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
10259			bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
10260		};
10261	},
10262
10263	_cacheHelperProportions: function() {
10264		this.helperProportions = {
10265			width: this.helper.outerWidth(),
10266			height: this.helper.outerHeight()
10267		};
10268	},
10269
10270	_setContainment: function() {
10271
10272		var isUserScrollable, c, ce,
10273			o = this.options,
10274			document = this.document[ 0 ];
10275
10276		this.relativeContainer = null;
10277
10278		if ( !o.containment ) {
10279			this.containment = null;
10280			return;
10281		}
10282
10283		if ( o.containment === "window" ) {
10284			this.containment = [
10285				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
10286				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
10287				$( window ).scrollLeft() + $( window ).width() -
10288					this.helperProportions.width - this.margins.left,
10289				$( window ).scrollTop() +
10290					( $( window ).height() || document.body.parentNode.scrollHeight ) -
10291					this.helperProportions.height - this.margins.top
10292			];
10293			return;
10294		}
10295
10296		if ( o.containment === "document" ) {
10297			this.containment = [
10298				0,
10299				0,
10300				$( document ).width() - this.helperProportions.width - this.margins.left,
10301				( $( document ).height() || document.body.parentNode.scrollHeight ) -
10302					this.helperProportions.height - this.margins.top
10303			];
10304			return;
10305		}
10306
10307		if ( o.containment.constructor === Array ) {
10308			this.containment = o.containment;
10309			return;
10310		}
10311
10312		if ( o.containment === "parent" ) {
10313			o.containment = this.helper[ 0 ].parentNode;
10314		}
10315
10316		c = $( o.containment );
10317		ce = c[ 0 ];
10318
10319		if ( !ce ) {
10320			return;
10321		}
10322
10323		isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
10324
10325		this.containment = [
10326			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
10327				( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
10328			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
10329				( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
10330			( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
10331				( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
10332				( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
10333				this.helperProportions.width -
10334				this.margins.left -
10335				this.margins.right,
10336			( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
10337				( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
10338				( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
10339				this.helperProportions.height -
10340				this.margins.top -
10341				this.margins.bottom
10342		];
10343		this.relativeContainer = c;
10344	},
10345
10346	_convertPositionTo: function( d, pos ) {
10347
10348		if ( !pos ) {
10349			pos = this.position;
10350		}
10351
10352		var mod = d === "absolute" ? 1 : -1,
10353			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
10354
10355		return {
10356			top: (
10357
10358				// The absolute mouse position
10359				pos.top	+
10360
10361				// Only for relative positioned nodes: Relative offset from element to offset parent
10362				this.offset.relative.top * mod +
10363
10364				// The offsetParent's offset without borders (offset + border)
10365				this.offset.parent.top * mod -
10366				( ( this.cssPosition === "fixed" ?
10367					-this.offset.scroll.top :
10368					( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
10369			),
10370			left: (
10371
10372				// The absolute mouse position
10373				pos.left +
10374
10375				// Only for relative positioned nodes: Relative offset from element to offset parent
10376				this.offset.relative.left * mod +
10377
10378				// The offsetParent's offset without borders (offset + border)
10379				this.offset.parent.left * mod	-
10380				( ( this.cssPosition === "fixed" ?
10381					-this.offset.scroll.left :
10382					( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
10383			)
10384		};
10385
10386	},
10387
10388	_generatePosition: function( event, constrainPosition ) {
10389
10390		var containment, co, top, left,
10391			o = this.options,
10392			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
10393			pageX = event.pageX,
10394			pageY = event.pageY;
10395
10396		// Cache the scroll
10397		if ( !scrollIsRootNode || !this.offset.scroll ) {
10398			this.offset.scroll = {
10399				top: this.scrollParent.scrollTop(),
10400				left: this.scrollParent.scrollLeft()
10401			};
10402		}
10403
10404		/*
10405		 * - Position constraining -
10406		 * Constrain the position to a mix of grid, containment.
10407		 */
10408
10409		// If we are not dragging yet, we won't check for options
10410		if ( constrainPosition ) {
10411			if ( this.containment ) {
10412				if ( this.relativeContainer ) {
10413					co = this.relativeContainer.offset();
10414					containment = [
10415						this.containment[ 0 ] + co.left,
10416						this.containment[ 1 ] + co.top,
10417						this.containment[ 2 ] + co.left,
10418						this.containment[ 3 ] + co.top
10419					];
10420				} else {
10421					containment = this.containment;
10422				}
10423
10424				if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
10425					pageX = containment[ 0 ] + this.offset.click.left;
10426				}
10427				if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
10428					pageY = containment[ 1 ] + this.offset.click.top;
10429				}
10430				if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
10431					pageX = containment[ 2 ] + this.offset.click.left;
10432				}
10433				if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
10434					pageY = containment[ 3 ] + this.offset.click.top;
10435				}
10436			}
10437
10438			if ( o.grid ) {
10439
10440				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid
10441				// argument errors in IE (see ticket #6950)
10442				top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
10443					this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
10444				pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
10445					top - this.offset.click.top > containment[ 3 ] ) ?
10446						top :
10447						( ( top - this.offset.click.top >= containment[ 1 ] ) ?
10448							top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;
10449
10450				left = o.grid[ 0 ] ? this.originalPageX +
10451					Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
10452					this.originalPageX;
10453				pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
10454					left - this.offset.click.left > containment[ 2 ] ) ?
10455						left :
10456						( ( left - this.offset.click.left >= containment[ 0 ] ) ?
10457							left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
10458			}
10459
10460			if ( o.axis === "y" ) {
10461				pageX = this.originalPageX;
10462			}
10463
10464			if ( o.axis === "x" ) {
10465				pageY = this.originalPageY;
10466			}
10467		}
10468
10469		return {
10470			top: (
10471
10472				// The absolute mouse position
10473				pageY -
10474
10475				// Click offset (relative to the element)
10476				this.offset.click.top -
10477
10478				// Only for relative positioned nodes: Relative offset from element to offset parent
10479				this.offset.relative.top -
10480
10481				// The offsetParent's offset without borders (offset + border)
10482				this.offset.parent.top +
10483				( this.cssPosition === "fixed" ?
10484					-this.offset.scroll.top :
10485					( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
10486			),
10487			left: (
10488
10489				// The absolute mouse position
10490				pageX -
10491
10492				// Click offset (relative to the element)
10493				this.offset.click.left -
10494
10495				// Only for relative positioned nodes: Relative offset from element to offset parent
10496				this.offset.relative.left -
10497
10498				// The offsetParent's offset without borders (offset + border)
10499				this.offset.parent.left +
10500				( this.cssPosition === "fixed" ?
10501					-this.offset.scroll.left :
10502					( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
10503			)
10504		};
10505
10506	},
10507
10508	_clear: function() {
10509		this._removeClass( this.helper, "ui-draggable-dragging" );
10510		if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
10511			this.helper.remove();
10512		}
10513		this.helper = null;
10514		this.cancelHelperRemoval = false;
10515		if ( this.destroyOnClear ) {
10516			this.destroy();
10517		}
10518	},
10519
10520	// From now on bulk stuff - mainly helpers
10521
10522	_trigger: function( type, event, ui ) {
10523		ui = ui || this._uiHash();
10524		$.ui.plugin.call( this, type, [ event, ui, this ], true );
10525
10526		// Absolute position and offset (see #6884 ) have to be recalculated after plugins
10527		if ( /^(drag|start|stop)/.test( type ) ) {
10528			this.positionAbs = this._convertPositionTo( "absolute" );
10529			ui.offset = this.positionAbs;
10530		}
10531		return $.Widget.prototype._trigger.call( this, type, event, ui );
10532	},
10533
10534	plugins: {},
10535
10536	_uiHash: function() {
10537		return {
10538			helper: this.helper,
10539			position: this.position,
10540			originalPosition: this.originalPosition,
10541			offset: this.positionAbs
10542		};
10543	}
10544
10545} );
10546
10547$.ui.plugin.add( "draggable", "connectToSortable", {
10548	start: function( event, ui, draggable ) {
10549		var uiSortable = $.extend( {}, ui, {
10550			item: draggable.element
10551		} );
10552
10553		draggable.sortables = [];
10554		$( draggable.options.connectToSortable ).each( function() {
10555			var sortable = $( this ).sortable( "instance" );
10556
10557			if ( sortable && !sortable.options.disabled ) {
10558				draggable.sortables.push( sortable );
10559
10560				// RefreshPositions is called at drag start to refresh the containerCache
10561				// which is used in drag. This ensures it's initialized and synchronized
10562				// with any changes that might have happened on the page since initialization.
10563				sortable.refreshPositions();
10564				sortable._trigger( "activate", event, uiSortable );
10565			}
10566		} );
10567	},
10568	stop: function( event, ui, draggable ) {
10569		var uiSortable = $.extend( {}, ui, {
10570			item: draggable.element
10571		} );
10572
10573		draggable.cancelHelperRemoval = false;
10574
10575		$.each( draggable.sortables, function() {
10576			var sortable = this;
10577
10578			if ( sortable.isOver ) {
10579				sortable.isOver = 0;
10580
10581				// Allow this sortable to handle removing the helper
10582				draggable.cancelHelperRemoval = true;
10583				sortable.cancelHelperRemoval = false;
10584
10585				// Use _storedCSS To restore properties in the sortable,
10586				// as this also handles revert (#9675) since the draggable
10587				// may have modified them in unexpected ways (#8809)
10588				sortable._storedCSS = {
10589					position: sortable.placeholder.css( "position" ),
10590					top: sortable.placeholder.css( "top" ),
10591					left: sortable.placeholder.css( "left" )
10592				};
10593
10594				sortable._mouseStop( event );
10595
10596				// Once drag has ended, the sortable should return to using
10597				// its original helper, not the shared helper from draggable
10598				sortable.options.helper = sortable.options._helper;
10599			} else {
10600
10601				// Prevent this Sortable from removing the helper.
10602				// However, don't set the draggable to remove the helper
10603				// either as another connected Sortable may yet handle the removal.
10604				sortable.cancelHelperRemoval = true;
10605
10606				sortable._trigger( "deactivate", event, uiSortable );
10607			}
10608		} );
10609	},
10610	drag: function( event, ui, draggable ) {
10611		$.each( draggable.sortables, function() {
10612			var innermostIntersecting = false,
10613				sortable = this;
10614
10615			// Copy over variables that sortable's _intersectsWith uses
10616			sortable.positionAbs = draggable.positionAbs;
10617			sortable.helperProportions = draggable.helperProportions;
10618			sortable.offset.click = draggable.offset.click;
10619
10620			if ( sortable._intersectsWith( sortable.containerCache ) ) {
10621				innermostIntersecting = true;
10622
10623				$.each( draggable.sortables, function() {
10624
10625					// Copy over variables that sortable's _intersectsWith uses
10626					this.positionAbs = draggable.positionAbs;
10627					this.helperProportions = draggable.helperProportions;
10628					this.offset.click = draggable.offset.click;
10629
10630					if ( this !== sortable &&
10631							this._intersectsWith( this.containerCache ) &&
10632							$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
10633						innermostIntersecting = false;
10634					}
10635
10636					return innermostIntersecting;
10637				} );
10638			}
10639
10640			if ( innermostIntersecting ) {
10641
10642				// If it intersects, we use a little isOver variable and set it once,
10643				// so that the move-in stuff gets fired only once.
10644				if ( !sortable.isOver ) {
10645					sortable.isOver = 1;
10646
10647					// Store draggable's parent in case we need to reappend to it later.
10648					draggable._parent = ui.helper.parent();
10649
10650					sortable.currentItem = ui.helper
10651						.appendTo( sortable.element )
10652						.data( "ui-sortable-item", true );
10653
10654					// Store helper option to later restore it
10655					sortable.options._helper = sortable.options.helper;
10656
10657					sortable.options.helper = function() {
10658						return ui.helper[ 0 ];
10659					};
10660
10661					// Fire the start events of the sortable with our passed browser event,
10662					// and our own helper (so it doesn't create a new one)
10663					event.target = sortable.currentItem[ 0 ];
10664					sortable._mouseCapture( event, true );
10665					sortable._mouseStart( event, true, true );
10666
10667					// Because the browser event is way off the new appended portlet,
10668					// modify necessary variables to reflect the changes
10669					sortable.offset.click.top = draggable.offset.click.top;
10670					sortable.offset.click.left = draggable.offset.click.left;
10671					sortable.offset.parent.left -= draggable.offset.parent.left -
10672						sortable.offset.parent.left;
10673					sortable.offset.parent.top -= draggable.offset.parent.top -
10674						sortable.offset.parent.top;
10675
10676					draggable._trigger( "toSortable", event );
10677
10678					// Inform draggable that the helper is in a valid drop zone,
10679					// used solely in the revert option to handle "valid/invalid".
10680					draggable.dropped = sortable.element;
10681
10682					// Need to refreshPositions of all sortables in the case that
10683					// adding to one sortable changes the location of the other sortables (#9675)
10684					$.each( draggable.sortables, function() {
10685						this.refreshPositions();
10686					} );
10687
10688					// Hack so receive/update callbacks work (mostly)
10689					draggable.currentItem = draggable.element;
10690					sortable.fromOutside = draggable;
10691				}
10692
10693				if ( sortable.currentItem ) {
10694					sortable._mouseDrag( event );
10695
10696					// Copy the sortable's position because the draggable's can potentially reflect
10697					// a relative position, while sortable is always absolute, which the dragged
10698					// element has now become. (#8809)
10699					ui.position = sortable.position;
10700				}
10701			} else {
10702
10703				// If it doesn't intersect with the sortable, and it intersected before,
10704				// we fake the drag stop of the sortable, but make sure it doesn't remove
10705				// the helper by using cancelHelperRemoval.
10706				if ( sortable.isOver ) {
10707
10708					sortable.isOver = 0;
10709					sortable.cancelHelperRemoval = true;
10710
10711					// Calling sortable's mouseStop would trigger a revert,
10712					// so revert must be temporarily false until after mouseStop is called.
10713					sortable.options._revert = sortable.options.revert;
10714					sortable.options.revert = false;
10715
10716					sortable._trigger( "out", event, sortable._uiHash( sortable ) );
10717					sortable._mouseStop( event, true );
10718
10719					// Restore sortable behaviors that were modfied
10720					// when the draggable entered the sortable area (#9481)
10721					sortable.options.revert = sortable.options._revert;
10722					sortable.options.helper = sortable.options._helper;
10723
10724					if ( sortable.placeholder ) {
10725						sortable.placeholder.remove();
10726					}
10727
10728					// Restore and recalculate the draggable's offset considering the sortable
10729					// may have modified them in unexpected ways. (#8809, #10669)
10730					ui.helper.appendTo( draggable._parent );
10731					draggable._refreshOffsets( event );
10732					ui.position = draggable._generatePosition( event, true );
10733
10734					draggable._trigger( "fromSortable", event );
10735
10736					// Inform draggable that the helper is no longer in a valid drop zone
10737					draggable.dropped = false;
10738
10739					// Need to refreshPositions of all sortables just in case removing
10740					// from one sortable changes the location of other sortables (#9675)
10741					$.each( draggable.sortables, function() {
10742						this.refreshPositions();
10743					} );
10744				}
10745			}
10746		} );
10747	}
10748} );
10749
10750$.ui.plugin.add( "draggable", "cursor", {
10751	start: function( event, ui, instance ) {
10752		var t = $( "body" ),
10753			o = instance.options;
10754
10755		if ( t.css( "cursor" ) ) {
10756			o._cursor = t.css( "cursor" );
10757		}
10758		t.css( "cursor", o.cursor );
10759	},
10760	stop: function( event, ui, instance ) {
10761		var o = instance.options;
10762		if ( o._cursor ) {
10763			$( "body" ).css( "cursor", o._cursor );
10764		}
10765	}
10766} );
10767
10768$.ui.plugin.add( "draggable", "opacity", {
10769	start: function( event, ui, instance ) {
10770		var t = $( ui.helper ),
10771			o = instance.options;
10772		if ( t.css( "opacity" ) ) {
10773			o._opacity = t.css( "opacity" );
10774		}
10775		t.css( "opacity", o.opacity );
10776	},
10777	stop: function( event, ui, instance ) {
10778		var o = instance.options;
10779		if ( o._opacity ) {
10780			$( ui.helper ).css( "opacity", o._opacity );
10781		}
10782	}
10783} );
10784
10785$.ui.plugin.add( "draggable", "scroll", {
10786	start: function( event, ui, i ) {
10787		if ( !i.scrollParentNotHidden ) {
10788			i.scrollParentNotHidden = i.helper.scrollParent( false );
10789		}
10790
10791		if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
10792				i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
10793			i.overflowOffset = i.scrollParentNotHidden.offset();
10794		}
10795	},
10796	drag: function( event, ui, i  ) {
10797
10798		var o = i.options,
10799			scrolled = false,
10800			scrollParent = i.scrollParentNotHidden[ 0 ],
10801			document = i.document[ 0 ];
10802
10803		if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
10804			if ( !o.axis || o.axis !== "x" ) {
10805				if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
10806						o.scrollSensitivity ) {
10807					scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
10808				} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
10809					scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
10810				}
10811			}
10812
10813			if ( !o.axis || o.axis !== "y" ) {
10814				if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
10815						o.scrollSensitivity ) {
10816					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
10817				} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
10818					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
10819				}
10820			}
10821
10822		} else {
10823
10824			if ( !o.axis || o.axis !== "x" ) {
10825				if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
10826					scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
10827				} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
10828						o.scrollSensitivity ) {
10829					scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
10830				}
10831			}
10832
10833			if ( !o.axis || o.axis !== "y" ) {
10834				if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
10835					scrolled = $( document ).scrollLeft(
10836						$( document ).scrollLeft() - o.scrollSpeed
10837					);
10838				} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
10839						o.scrollSensitivity ) {
10840					scrolled = $( document ).scrollLeft(
10841						$( document ).scrollLeft() + o.scrollSpeed
10842					);
10843				}
10844			}
10845
10846		}
10847
10848		if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
10849			$.ui.ddmanager.prepareOffsets( i, event );
10850		}
10851
10852	}
10853} );
10854
10855$.ui.plugin.add( "draggable", "snap", {
10856	start: function( event, ui, i ) {
10857
10858		var o = i.options;
10859
10860		i.snapElements = [];
10861
10862		$( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
10863			.each( function() {
10864				var $t = $( this ),
10865					$o = $t.offset();
10866				if ( this !== i.element[ 0 ] ) {
10867					i.snapElements.push( {
10868						item: this,
10869						width: $t.outerWidth(), height: $t.outerHeight(),
10870						top: $o.top, left: $o.left
10871					} );
10872				}
10873			} );
10874
10875	},
10876	drag: function( event, ui, inst ) {
10877
10878		var ts, bs, ls, rs, l, r, t, b, i, first,
10879			o = inst.options,
10880			d = o.snapTolerance,
10881			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
10882			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
10883
10884		for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {
10885
10886			l = inst.snapElements[ i ].left - inst.margins.left;
10887			r = l + inst.snapElements[ i ].width;
10888			t = inst.snapElements[ i ].top - inst.margins.top;
10889			b = t + inst.snapElements[ i ].height;
10890
10891			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
10892					!$.contains( inst.snapElements[ i ].item.ownerDocument,
10893					inst.snapElements[ i ].item ) ) {
10894				if ( inst.snapElements[ i ].snapping ) {
10895					if ( inst.options.snap.release ) {
10896						inst.options.snap.release.call(
10897							inst.element,
10898							event,
10899							$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
10900						);
10901					}
10902				}
10903				inst.snapElements[ i ].snapping = false;
10904				continue;
10905			}
10906
10907			if ( o.snapMode !== "inner" ) {
10908				ts = Math.abs( t - y2 ) <= d;
10909				bs = Math.abs( b - y1 ) <= d;
10910				ls = Math.abs( l - x2 ) <= d;
10911				rs = Math.abs( r - x1 ) <= d;
10912				if ( ts ) {
10913					ui.position.top = inst._convertPositionTo( "relative", {
10914						top: t - inst.helperProportions.height,
10915						left: 0
10916					} ).top;
10917				}
10918				if ( bs ) {
10919					ui.position.top = inst._convertPositionTo( "relative", {
10920						top: b,
10921						left: 0
10922					} ).top;
10923				}
10924				if ( ls ) {
10925					ui.position.left = inst._convertPositionTo( "relative", {
10926						top: 0,
10927						left: l - inst.helperProportions.width
10928					} ).left;
10929				}
10930				if ( rs ) {
10931					ui.position.left = inst._convertPositionTo( "relative", {
10932						top: 0,
10933						left: r
10934					} ).left;
10935				}
10936			}
10937
10938			first = ( ts || bs || ls || rs );
10939
10940			if ( o.snapMode !== "outer" ) {
10941				ts = Math.abs( t - y1 ) <= d;
10942				bs = Math.abs( b - y2 ) <= d;
10943				ls = Math.abs( l - x1 ) <= d;
10944				rs = Math.abs( r - x2 ) <= d;
10945				if ( ts ) {
10946					ui.position.top = inst._convertPositionTo( "relative", {
10947						top: t,
10948						left: 0
10949					} ).top;
10950				}
10951				if ( bs ) {
10952					ui.position.top = inst._convertPositionTo( "relative", {
10953						top: b - inst.helperProportions.height,
10954						left: 0
10955					} ).top;
10956				}
10957				if ( ls ) {
10958					ui.position.left = inst._convertPositionTo( "relative", {
10959						top: 0,
10960						left: l
10961					} ).left;
10962				}
10963				if ( rs ) {
10964					ui.position.left = inst._convertPositionTo( "relative", {
10965						top: 0,
10966						left: r - inst.helperProportions.width
10967					} ).left;
10968				}
10969			}
10970
10971			if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
10972				if ( inst.options.snap.snap ) {
10973					inst.options.snap.snap.call(
10974						inst.element,
10975						event,
10976						$.extend( inst._uiHash(), {
10977							snapItem: inst.snapElements[ i ].item
10978						} ) );
10979				}
10980			}
10981			inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
10982
10983		}
10984
10985	}
10986} );
10987
10988$.ui.plugin.add( "draggable", "stack", {
10989	start: function( event, ui, instance ) {
10990		var min,
10991			o = instance.options,
10992			group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
10993				return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
10994					( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
10995			} );
10996
10997		if ( !group.length ) {
10998			return;
10999		}
11000
11001		min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
11002		$( group ).each( function( i ) {
11003			$( this ).css( "zIndex", min + i );
11004		} );
11005		this.css( "zIndex", ( min + group.length ) );
11006	}
11007} );
11008
11009$.ui.plugin.add( "draggable", "zIndex", {
11010	start: function( event, ui, instance ) {
11011		var t = $( ui.helper ),
11012			o = instance.options;
11013
11014		if ( t.css( "zIndex" ) ) {
11015			o._zIndex = t.css( "zIndex" );
11016		}
11017		t.css( "zIndex", o.zIndex );
11018	},
11019	stop: function( event, ui, instance ) {
11020		var o = instance.options;
11021
11022		if ( o._zIndex ) {
11023			$( ui.helper ).css( "zIndex", o._zIndex );
11024		}
11025	}
11026} );
11027
11028var widgetsDraggable = $.ui.draggable;
11029
11030
11031/*!
11032 * jQuery UI Resizable 1.13.2
11033 * http://jqueryui.com
vendor: 18,161 bytes, lines 11034-11746
11034 *
11035 * Copyright jQuery Foundation and other contributors
11036 * Released under the MIT license.
11037 * http://jquery.org/license
11038 */
11039
11040//>>label: Resizable
11041//>>group: Interactions
11042//>>description: Enables resize functionality for any element.
11043//>>docs: http://api.jqueryui.com/resizable/
11044//>>demos: http://jqueryui.com/resizable/
11045//>>css.structure: ../../themes/base/core.css
11046//>>css.structure: ../../themes/base/resizable.css
11047//>>css.theme: ../../themes/base/theme.css
11048
11049
11050$.widget( "ui.resizable", $.ui.mouse, {
11051	version: "1.13.2",
11052	widgetEventPrefix: "resize",
11053	options: {
11054		alsoResize: false,
11055		animate: false,
11056		animateDuration: "slow",
11057		animateEasing: "swing",
11058		aspectRatio: false,
11059		autoHide: false,
11060		classes: {
11061			"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"
11062		},
11063		containment: false,
11064		ghost: false,
11065		grid: false,
11066		handles: "e,s,se",
11067		helper: false,
11068		maxHeight: null,
11069		maxWidth: null,
11070		minHeight: 10,
11071		minWidth: 10,
11072
11073		// See #7960
11074		zIndex: 90,
11075
11076		// Callbacks
11077		resize: null,
11078		start: null,
11079		stop: null
11080	},
11081
11082	_num: function( value ) {
11083		return parseFloat( value ) || 0;
11084	},
11085
11086	_isNumber: function( value ) {
11087		return !isNaN( parseFloat( value ) );
11088	},
11089
11090	_hasScroll: function( el, a ) {
11091
11092		if ( $( el ).css( "overflow" ) === "hidden" ) {
11093			return false;
11094		}
11095
11096		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
11097			has = false;
11098
11099		if ( el[ scroll ] > 0 ) {
11100			return true;
11101		}
11102
11103		// TODO: determine which cases actually cause this to happen
11104		// if the element doesn't have the scroll set, see if it's possible to
11105		// set the scroll
11106		try {
11107			el[ scroll ] = 1;
11108			has = ( el[ scroll ] > 0 );
11109			el[ scroll ] = 0;
11110		} catch ( e ) {
11111
11112			// `el` might be a string, then setting `scroll` will throw
11113			// an error in strict mode; ignore it.
11114		}
11115		return has;
11116	},
11117
11118	_create: function() {
11119
11120		var margins,
11121			o = this.options,
11122			that = this;
11123		this._addClass( "ui-resizable" );
11124
11125		$.extend( this, {
11126			_aspectRatio: !!( o.aspectRatio ),
11127			aspectRatio: o.aspectRatio,
11128			originalElement: this.element,
11129			_proportionallyResizeElements: [],
11130			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
11131		} );
11132
11133		// Wrap the element if it cannot hold child nodes
11134		if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {
11135
11136			this.element.wrap(
11137				$( "<div class='ui-wrapper'></div>" ).css( {
11138					overflow: "hidden",
11139					position: this.element.css( "position" ),
11140					width: this.element.outerWidth(),
11141					height: this.element.outerHeight(),
11142					top: this.element.css( "top" ),
11143					left: this.element.css( "left" )
11144				} )
11145			);
11146
11147			this.element = this.element.parent().data(
11148				"ui-resizable", this.element.resizable( "instance" )
11149			);
11150
11151			this.elementIsWrapper = true;
11152
11153			margins = {
11154				marginTop: this.originalElement.css( "marginTop" ),
11155				marginRight: this.originalElement.css( "marginRight" ),
11156				marginBottom: this.originalElement.css( "marginBottom" ),
11157				marginLeft: this.originalElement.css( "marginLeft" )
11158			};
11159
11160			this.element.css( margins );
11161			this.originalElement.css( "margin", 0 );
11162
11163			// support: Safari
11164			// Prevent Safari textarea resize
11165			this.originalResizeStyle = this.originalElement.css( "resize" );
11166			this.originalElement.css( "resize", "none" );
11167
11168			this._proportionallyResizeElements.push( this.originalElement.css( {
11169				position: "static",
11170				zoom: 1,
11171				display: "block"
11172			} ) );
11173
11174			// Support: IE9
11175			// avoid IE jump (hard set the margin)
11176			this.originalElement.css( margins );
11177
11178			this._proportionallyResize();
11179		}
11180
11181		this._setupHandles();
11182
11183		if ( o.autoHide ) {
11184			$( this.element )
11185				.on( "mouseenter", function() {
11186					if ( o.disabled ) {
11187						return;
11188					}
11189					that._removeClass( "ui-resizable-autohide" );
11190					that._handles.show();
11191				} )
11192				.on( "mouseleave", function() {
11193					if ( o.disabled ) {
11194						return;
11195					}
11196					if ( !that.resizing ) {
11197						that._addClass( "ui-resizable-autohide" );
11198						that._handles.hide();
11199					}
11200				} );
11201		}
11202
11203		this._mouseInit();
11204	},
11205
11206	_destroy: function() {
11207
11208		this._mouseDestroy();
11209		this._addedHandles.remove();
11210
11211		var wrapper,
11212			_destroy = function( exp ) {
11213				$( exp )
11214					.removeData( "resizable" )
11215					.removeData( "ui-resizable" )
11216					.off( ".resizable" );
11217			};
11218
11219		// TODO: Unwrap at same DOM position
11220		if ( this.elementIsWrapper ) {
11221			_destroy( this.element );
11222			wrapper = this.element;
11223			this.originalElement.css( {
11224				position: wrapper.css( "position" ),
11225				width: wrapper.outerWidth(),
11226				height: wrapper.outerHeight(),
11227				top: wrapper.css( "top" ),
11228				left: wrapper.css( "left" )
11229			} ).insertAfter( wrapper );
11230			wrapper.remove();
11231		}
11232
11233		this.originalElement.css( "resize", this.originalResizeStyle );
11234		_destroy( this.originalElement );
11235
11236		return this;
11237	},
11238
11239	_setOption: function( key, value ) {
11240		this._super( key, value );
11241
11242		switch ( key ) {
11243		case "handles":
11244			this._removeHandles();
11245			this._setupHandles();
11246			break;
11247		case "aspectRatio":
11248			this._aspectRatio = !!value;
11249			break;
11250		default:
11251			break;
11252		}
11253	},
11254
11255	_setupHandles: function() {
11256		var o = this.options, handle, i, n, hname, axis, that = this;
11257		this.handles = o.handles ||
11258			( !$( ".ui-resizable-handle", this.element ).length ?
11259				"e,s,se" : {
11260					n: ".ui-resizable-n",
11261					e: ".ui-resizable-e",
11262					s: ".ui-resizable-s",
11263					w: ".ui-resizable-w",
11264					se: ".ui-resizable-se",
11265					sw: ".ui-resizable-sw",
11266					ne: ".ui-resizable-ne",
11267					nw: ".ui-resizable-nw"
11268				} );
11269
11270		this._handles = $();
11271		this._addedHandles = $();
11272		if ( this.handles.constructor === String ) {
11273
11274			if ( this.handles === "all" ) {
11275				this.handles = "n,e,s,w,se,sw,ne,nw";
11276			}
11277
11278			n = this.handles.split( "," );
11279			this.handles = {};
11280
11281			for ( i = 0; i < n.length; i++ ) {
11282
11283				handle = String.prototype.trim.call( n[ i ] );
11284				hname = "ui-resizable-" + handle;
11285				axis = $( "<div>" );
11286				this._addClass( axis, "ui-resizable-handle " + hname );
11287
11288				axis.css( { zIndex: o.zIndex } );
11289
11290				this.handles[ handle ] = ".ui-resizable-" + handle;
11291				if ( !this.element.children( this.handles[ handle ] ).length ) {
11292					this.element.append( axis );
11293					this._addedHandles = this._addedHandles.add( axis );
11294				}
11295			}
11296
11297		}
11298
11299		this._renderAxis = function( target ) {
11300
11301			var i, axis, padPos, padWrapper;
11302
11303			target = target || this.element;
11304
11305			for ( i in this.handles ) {
11306
11307				if ( this.handles[ i ].constructor === String ) {
11308					this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();
11309				} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
11310					this.handles[ i ] = $( this.handles[ i ] );
11311					this._on( this.handles[ i ], { "mousedown": that._mouseDown } );
11312				}
11313
11314				if ( this.elementIsWrapper &&
11315						this.originalElement[ 0 ]
11316							.nodeName
11317							.match( /^(textarea|input|select|button)$/i ) ) {
11318					axis = $( this.handles[ i ], this.element );
11319
11320					padWrapper = /sw|ne|nw|se|n|s/.test( i ) ?
11321						axis.outerHeight() :
11322						axis.outerWidth();
11323
11324					padPos = [ "padding",
11325						/ne|nw|n/.test( i ) ? "Top" :
11326						/se|sw|s/.test( i ) ? "Bottom" :
11327						/^e$/.test( i ) ? "Right" : "Left" ].join( "" );
11328
11329					target.css( padPos, padWrapper );
11330
11331					this._proportionallyResize();
11332				}
11333
11334				this._handles = this._handles.add( this.handles[ i ] );
11335			}
11336		};
11337
11338		// TODO: make renderAxis a prototype function
11339		this._renderAxis( this.element );
11340
11341		this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
11342		this._handles.disableSelection();
11343
11344		this._handles.on( "mouseover", function() {
11345			if ( !that.resizing ) {
11346				if ( this.className ) {
11347					axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );
11348				}
11349				that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se";
11350			}
11351		} );
11352
11353		if ( o.autoHide ) {
11354			this._handles.hide();
11355			this._addClass( "ui-resizable-autohide" );
11356		}
11357	},
11358
11359	_removeHandles: function() {
11360		this._addedHandles.remove();
11361	},
11362
11363	_mouseCapture: function( event ) {
11364		var i, handle,
11365			capture = false;
11366
11367		for ( i in this.handles ) {
11368			handle = $( this.handles[ i ] )[ 0 ];
11369			if ( handle === event.target || $.contains( handle, event.target ) ) {
11370				capture = true;
11371			}
11372		}
11373
11374		return !this.options.disabled && capture;
11375	},
11376
11377	_mouseStart: function( event ) {
11378
11379		var curleft, curtop, cursor,
11380			o = this.options,
11381			el = this.element;
11382
11383		this.resizing = true;
11384
11385		this._renderProxy();
11386
11387		curleft = this._num( this.helper.css( "left" ) );
11388		curtop = this._num( this.helper.css( "top" ) );
11389
11390		if ( o.containment ) {
11391			curleft += $( o.containment ).scrollLeft() || 0;
11392			curtop += $( o.containment ).scrollTop() || 0;
11393		}
11394
11395		this.offset = this.helper.offset();
11396		this.position = { left: curleft, top: curtop };
11397
11398		this.size = this._helper ? {
11399				width: this.helper.width(),
11400				height: this.helper.height()
11401			} : {
11402				width: el.width(),
11403				height: el.height()
11404			};
11405
11406		this.originalSize = this._helper ? {
11407				width: el.outerWidth(),
11408				height: el.outerHeight()
11409			} : {
11410				width: el.width(),
11411				height: el.height()
11412			};
11413
11414		this.sizeDiff = {
11415			width: el.outerWidth() - el.width(),
11416			height: el.outerHeight() - el.height()
11417		};
11418
11419		this.originalPosition = { left: curleft, top: curtop };
11420		this.originalMousePosition = { left: event.pageX, top: event.pageY };
11421
11422		this.aspectRatio = ( typeof o.aspectRatio === "number" ) ?
11423			o.aspectRatio :
11424			( ( this.originalSize.width / this.originalSize.height ) || 1 );
11425
11426		cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" );
11427		$( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor );
11428
11429		this._addClass( "ui-resizable-resizing" );
11430		this._propagate( "start", event );
11431		return true;
11432	},
11433
11434	_mouseDrag: function( event ) {
11435
11436		var data, props,
11437			smp = this.originalMousePosition,
11438			a = this.axis,
11439			dx = ( event.pageX - smp.left ) || 0,
11440			dy = ( event.pageY - smp.top ) || 0,
11441			trigger = this._change[ a ];
11442
11443		this._updatePrevProperties();
11444
11445		if ( !trigger ) {
11446			return false;
11447		}
11448
11449		data = trigger.apply( this, [ event, dx, dy ] );
11450
11451		this._updateVirtualBoundaries( event.shiftKey );
11452		if ( this._aspectRatio || event.shiftKey ) {
11453			data = this._updateRatio( data, event );
11454		}
11455
11456		data = this._respectSize( data, event );
11457
11458		this._updateCache( data );
11459
11460		this._propagate( "resize", event );
11461
11462		props = this._applyChanges();
11463
11464		if ( !this._helper && this._proportionallyResizeElements.length ) {
11465			this._proportionallyResize();
11466		}
11467
11468		if ( !$.isEmptyObject( props ) ) {
11469			this._updatePrevProperties();
11470			this._trigger( "resize", event, this.ui() );
11471			this._applyChanges();
11472		}
11473
11474		return false;
11475	},
11476
11477	_mouseStop: function( event ) {
11478
11479		this.resizing = false;
11480		var pr, ista, soffseth, soffsetw, s, left, top,
11481			o = this.options, that = this;
11482
11483		if ( this._helper ) {
11484
11485			pr = this._proportionallyResizeElements;
11486			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );
11487			soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height;
11488			soffsetw = ista ? 0 : that.sizeDiff.width;
11489
11490			s = {
11491				width: ( that.helper.width()  - soffsetw ),
11492				height: ( that.helper.height() - soffseth )
11493			};
11494			left = ( parseFloat( that.element.css( "left" ) ) +
11495				( that.position.left - that.originalPosition.left ) ) || null;
11496			top = ( parseFloat( that.element.css( "top" ) ) +
11497				( that.position.top - that.originalPosition.top ) ) || null;
11498
11499			if ( !o.animate ) {
11500				this.element.css( $.extend( s, { top: top, left: left } ) );
11501			}
11502
11503			that.helper.height( that.size.height );
11504			that.helper.width( that.size.width );
11505
11506			if ( this._helper && !o.animate ) {
11507				this._proportionallyResize();
11508			}
11509		}
11510
11511		$( "body" ).css( "cursor", "auto" );
11512
11513		this._removeClass( "ui-resizable-resizing" );
11514
11515		this._propagate( "stop", event );
11516
11517		if ( this._helper ) {
11518			this.helper.remove();
11519		}
11520
11521		return false;
11522
11523	},
11524
11525	_updatePrevProperties: function() {
11526		this.prevPosition = {
11527			top: this.position.top,
11528			left: this.position.left
11529		};
11530		this.prevSize = {
11531			width: this.size.width,
11532			height: this.size.height
11533		};
11534	},
11535
11536	_applyChanges: function() {
11537		var props = {};
11538
11539		if ( this.position.top !== this.prevPosition.top ) {
11540			props.top = this.position.top + "px";
11541		}
11542		if ( this.position.left !== this.prevPosition.left ) {
11543			props.left = this.position.left + "px";
11544		}
11545		if ( this.size.width !== this.prevSize.width ) {
11546			props.width = this.size.width + "px";
11547		}
11548		if ( this.size.height !== this.prevSize.height ) {
11549			props.height = this.size.height + "px";
11550		}
11551
11552		this.helper.css( props );
11553
11554		return props;
11555	},
11556
11557	_updateVirtualBoundaries: function( forceAspectRatio ) {
11558		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
11559			o = this.options;
11560
11561		b = {
11562			minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
11563			maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
11564			minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
11565			maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
11566		};
11567
11568		if ( this._aspectRatio || forceAspectRatio ) {
11569			pMinWidth = b.minHeight * this.aspectRatio;
11570			pMinHeight = b.minWidth / this.aspectRatio;
11571			pMaxWidth = b.maxHeight * this.aspectRatio;
11572			pMaxHeight = b.maxWidth / this.aspectRatio;
11573
11574			if ( pMinWidth > b.minWidth ) {
11575				b.minWidth = pMinWidth;
11576			}
11577			if ( pMinHeight > b.minHeight ) {
11578				b.minHeight = pMinHeight;
11579			}
11580			if ( pMaxWidth < b.maxWidth ) {
11581				b.maxWidth = pMaxWidth;
11582			}
11583			if ( pMaxHeight < b.maxHeight ) {
11584				b.maxHeight = pMaxHeight;
11585			}
11586		}
11587		this._vBoundaries = b;
11588	},
11589
11590	_updateCache: function( data ) {
11591		this.offset = this.helper.offset();
11592		if ( this._isNumber( data.left ) ) {
11593			this.position.left = data.left;
11594		}
11595		if ( this._isNumber( data.top ) ) {
11596			this.position.top = data.top;
11597		}
11598		if ( this._isNumber( data.height ) ) {
11599			this.size.height = data.height;
11600		}
11601		if ( this._isNumber( data.width ) ) {
11602			this.size.width = data.width;
11603		}
11604	},
11605
11606	_updateRatio: function( data ) {
11607
11608		var cpos = this.position,
11609			csize = this.size,
11610			a = this.axis;
11611
11612		if ( this._isNumber( data.height ) ) {
11613			data.width = ( data.height * this.aspectRatio );
11614		} else if ( this._isNumber( data.width ) ) {
11615			data.height = ( data.width / this.aspectRatio );
11616		}
11617
11618		if ( a === "sw" ) {
11619			data.left = cpos.left + ( csize.width - data.width );
11620			data.top = null;
11621		}
11622		if ( a === "nw" ) {
11623			data.top = cpos.top + ( csize.height - data.height );
11624			data.left = cpos.left + ( csize.width - data.width );
11625		}
11626
11627		return data;
11628	},
11629
11630	_respectSize: function( data ) {
11631
11632		var o = this._vBoundaries,
11633			a = this.axis,
11634			ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
11635			ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
11636			isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
11637			isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
11638			dw = this.originalPosition.left + this.originalSize.width,
11639			dh = this.originalPosition.top + this.originalSize.height,
11640			cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
11641		if ( isminw ) {
11642			data.width = o.minWidth;
11643		}
11644		if ( isminh ) {
11645			data.height = o.minHeight;
11646		}
11647		if ( ismaxw ) {
11648			data.width = o.maxWidth;
11649		}
11650		if ( ismaxh ) {
11651			data.height = o.maxHeight;
11652		}
11653
11654		if ( isminw && cw ) {
11655			data.left = dw - o.minWidth;
11656		}
11657		if ( ismaxw && cw ) {
11658			data.left = dw - o.maxWidth;
11659		}
11660		if ( isminh && ch ) {
11661			data.top = dh - o.minHeight;
11662		}
11663		if ( ismaxh && ch ) {
11664			data.top = dh - o.maxHeight;
11665		}
11666
11667		// Fixing jump error on top/left - bug #2330
11668		if ( !data.width && !data.height && !data.left && data.top ) {
11669			data.top = null;
11670		} else if ( !data.width && !data.height && !data.top && data.left ) {
11671			data.left = null;
11672		}
11673
11674		return data;
11675	},
11676
11677	_getPaddingPlusBorderDimensions: function( element ) {
11678		var i = 0,
11679			widths = [],
11680			borders = [
11681				element.css( "borderTopWidth" ),
11682				element.css( "borderRightWidth" ),
11683				element.css( "borderBottomWidth" ),
11684				element.css( "borderLeftWidth" )
11685			],
11686			paddings = [
11687				element.css( "paddingTop" ),
11688				element.css( "paddingRight" ),
11689				element.css( "paddingBottom" ),
11690				element.css( "paddingLeft" )
11691			];
11692
11693		for ( ; i < 4; i++ ) {
11694			widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
11695			widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
11696		}
11697
11698		return {
11699			height: widths[ 0 ] + widths[ 2 ],
11700			width: widths[ 1 ] + widths[ 3 ]
11701		};
11702	},
11703
11704	_proportionallyResize: function() {
11705
11706		if ( !this._proportionallyResizeElements.length ) {
11707			return;
11708		}
11709
11710		var prel,
11711			i = 0,
11712			element = this.helper || this.element;
11713
11714		for ( ; i < this._proportionallyResizeElements.length; i++ ) {
11715
11716			prel = this._proportionallyResizeElements[ i ];
11717
11718			// TODO: Seems like a bug to cache this.outerDimensions
11719			// considering that we are in a loop.
11720			if ( !this.outerDimensions ) {
11721				this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
11722			}
11723
11724			prel.css( {
11725				height: ( element.height() - this.outerDimensions.height ) || 0,
11726				width: ( element.width() - this.outerDimensions.width ) || 0
11727			} );
11728
11729		}
11730
11731	},
11732
11733	_renderProxy: function() {
11734
11735		var el = this.element, o = this.options;
11736		this.elementOffset = el.offset();
11737
11738		if ( this._helper ) {
11739
11740			this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );
11741
11742			this._addClass( this.helper, this._helper );
11743			this.helper.css( {
11744				width: this.element.outerWidth(),
11745				height: this.element.outerHeight(),
11746				position: "absolute",
vendor: 6,636 bytes, lines 11747-11987
11747				left: this.elementOffset.left + "px",
11748				top: this.elementOffset.top + "px",
11749				zIndex: ++o.zIndex //TODO: Don't modify option
11750			} );
11751
11752			this.helper
11753				.appendTo( "body" )
11754				.disableSelection();
11755
11756		} else {
11757			this.helper = this.element;
11758		}
11759
11760	},
11761
11762	_change: {
11763		e: function( event, dx ) {
11764			return { width: this.originalSize.width + dx };
11765		},
11766		w: function( event, dx ) {
11767			var cs = this.originalSize, sp = this.originalPosition;
11768			return { left: sp.left + dx, width: cs.width - dx };
11769		},
11770		n: function( event, dx, dy ) {
11771			var cs = this.originalSize, sp = this.originalPosition;
11772			return { top: sp.top + dy, height: cs.height - dy };
11773		},
11774		s: function( event, dx, dy ) {
11775			return { height: this.originalSize.height + dy };
11776		},
11777		se: function( event, dx, dy ) {
11778			return $.extend( this._change.s.apply( this, arguments ),
11779				this._change.e.apply( this, [ event, dx, dy ] ) );
11780		},
11781		sw: function( event, dx, dy ) {
11782			return $.extend( this._change.s.apply( this, arguments ),
11783				this._change.w.apply( this, [ event, dx, dy ] ) );
11784		},
11785		ne: function( event, dx, dy ) {
11786			return $.extend( this._change.n.apply( this, arguments ),
11787				this._change.e.apply( this, [ event, dx, dy ] ) );
11788		},
11789		nw: function( event, dx, dy ) {
11790			return $.extend( this._change.n.apply( this, arguments ),
11791				this._change.w.apply( this, [ event, dx, dy ] ) );
11792		}
11793	},
11794
11795	_propagate: function( n, event ) {
11796		$.ui.plugin.call( this, n, [ event, this.ui() ] );
11797		if ( n !== "resize" ) {
11798			this._trigger( n, event, this.ui() );
11799		}
11800	},
11801
11802	plugins: {},
11803
11804	ui: function() {
11805		return {
11806			originalElement: this.originalElement,
11807			element: this.element,
11808			helper: this.helper,
11809			position: this.position,
11810			size: this.size,
11811			originalSize: this.originalSize,
11812			originalPosition: this.originalPosition
11813		};
11814	}
11815
11816} );
11817
11818/*
11819 * Resizable Extensions
11820 */
11821
11822$.ui.plugin.add( "resizable", "animate", {
11823
11824	stop: function( event ) {
11825		var that = $( this ).resizable( "instance" ),
11826			o = that.options,
11827			pr = that._proportionallyResizeElements,
11828			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
11829			soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
11830			soffsetw = ista ? 0 : that.sizeDiff.width,
11831			style = {
11832				width: ( that.size.width - soffsetw ),
11833				height: ( that.size.height - soffseth )
11834			},
11835			left = ( parseFloat( that.element.css( "left" ) ) +
11836				( that.position.left - that.originalPosition.left ) ) || null,
11837			top = ( parseFloat( that.element.css( "top" ) ) +
11838				( that.position.top - that.originalPosition.top ) ) || null;
11839
11840		that.element.animate(
11841			$.extend( style, top && left ? { top: top, left: left } : {} ), {
11842				duration: o.animateDuration,
11843				easing: o.animateEasing,
11844				step: function() {
11845
11846					var data = {
11847						width: parseFloat( that.element.css( "width" ) ),
11848						height: parseFloat( that.element.css( "height" ) ),
11849						top: parseFloat( that.element.css( "top" ) ),
11850						left: parseFloat( that.element.css( "left" ) )
11851					};
11852
11853					if ( pr && pr.length ) {
11854						$( pr[ 0 ] ).css( { width: data.width, height: data.height } );
11855					}
11856
11857					// Propagating resize, and updating values for each animation step
11858					that._updateCache( data );
11859					that._propagate( "resize", event );
11860
11861				}
11862			}
11863		);
11864	}
11865
11866} );
11867
11868$.ui.plugin.add( "resizable", "containment", {
11869
11870	start: function() {
11871		var element, p, co, ch, cw, width, height,
11872			that = $( this ).resizable( "instance" ),
11873			o = that.options,
11874			el = that.element,
11875			oc = o.containment,
11876			ce = ( oc instanceof $ ) ?
11877				oc.get( 0 ) :
11878				( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
11879
11880		if ( !ce ) {
11881			return;
11882		}
11883
11884		that.containerElement = $( ce );
11885
11886		if ( /document/.test( oc ) || oc === document ) {
11887			that.containerOffset = {
11888				left: 0,
11889				top: 0
11890			};
11891			that.containerPosition = {
11892				left: 0,
11893				top: 0
11894			};
11895
11896			that.parentData = {
11897				element: $( document ),
11898				left: 0,
11899				top: 0,
11900				width: $( document ).width(),
11901				height: $( document ).height() || document.body.parentNode.scrollHeight
11902			};
11903		} else {
11904			element = $( ce );
11905			p = [];
11906			$( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
11907				p[ i ] = that._num( element.css( "padding" + name ) );
11908			} );
11909
11910			that.containerOffset = element.offset();
11911			that.containerPosition = element.position();
11912			that.containerSize = {
11913				height: ( element.innerHeight() - p[ 3 ] ),
11914				width: ( element.innerWidth() - p[ 1 ] )
11915			};
11916
11917			co = that.containerOffset;
11918			ch = that.containerSize.height;
11919			cw = that.containerSize.width;
11920			width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw );
11921			height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );
11922
11923			that.parentData = {
11924				element: ce,
11925				left: co.left,
11926				top: co.top,
11927				width: width,
11928				height: height
11929			};
11930		}
11931	},
11932
11933	resize: function( event ) {
11934		var woset, hoset, isParent, isOffsetRelative,
11935			that = $( this ).resizable( "instance" ),
11936			o = that.options,
11937			co = that.containerOffset,
11938			cp = that.position,
11939			pRatio = that._aspectRatio || event.shiftKey,
11940			cop = {
11941				top: 0,
11942				left: 0
11943			},
11944			ce = that.containerElement,
11945			continueResize = true;
11946
11947		if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
11948			cop = co;
11949		}
11950
11951		if ( cp.left < ( that._helper ? co.left : 0 ) ) {
11952			that.size.width = that.size.width +
11953				( that._helper ?
11954					( that.position.left - co.left ) :
11955					( that.position.left - cop.left ) );
11956
11957			if ( pRatio ) {
11958				that.size.height = that.size.width / that.aspectRatio;
11959				continueResize = false;
11960			}
11961			that.position.left = o.helper ? co.left : 0;
11962		}
11963
11964		if ( cp.top < ( that._helper ? co.top : 0 ) ) {
11965			that.size.height = that.size.height +
11966				( that._helper ?
11967					( that.position.top - co.top ) :
11968					that.position.top );
11969
11970			if ( pRatio ) {
11971				that.size.width = that.size.height * that.aspectRatio;
11972				continueResize = false;
11973			}
11974			that.position.top = that._helper ? co.top : 0;
11975		}
11976
11977		isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
11978		isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
11979
11980		if ( isParent && isOffsetRelative ) {
11981			that.offset.left = that.parentData.left + that.position.left;
11982			that.offset.top = that.parentData.top + that.position.top;
11983		} else {
11984			that.offset.left = that.element.offset().left;
11985			that.offset.top = that.element.offset().top;
11986		}
11987
vendor: 4,533 bytes, lines 11988-12162
11988		woset = Math.abs( that.sizeDiff.width +
11989			( that._helper ?
11990				that.offset.left - cop.left :
11991				( that.offset.left - co.left ) ) );
11992
11993		hoset = Math.abs( that.sizeDiff.height +
11994			( that._helper ?
11995				that.offset.top - cop.top :
11996				( that.offset.top - co.top ) ) );
11997
11998		if ( woset + that.size.width >= that.parentData.width ) {
11999			that.size.width = that.parentData.width - woset;
12000			if ( pRatio ) {
12001				that.size.height = that.size.width / that.aspectRatio;
12002				continueResize = false;
12003			}
12004		}
12005
12006		if ( hoset + that.size.height >= that.parentData.height ) {
12007			that.size.height = that.parentData.height - hoset;
12008			if ( pRatio ) {
12009				that.size.width = that.size.height * that.aspectRatio;
12010				continueResize = false;
12011			}
12012		}
12013
12014		if ( !continueResize ) {
12015			that.position.left = that.prevPosition.left;
12016			that.position.top = that.prevPosition.top;
12017			that.size.width = that.prevSize.width;
12018			that.size.height = that.prevSize.height;
12019		}
12020	},
12021
12022	stop: function() {
12023		var that = $( this ).resizable( "instance" ),
12024			o = that.options,
12025			co = that.containerOffset,
12026			cop = that.containerPosition,
12027			ce = that.containerElement,
12028			helper = $( that.helper ),
12029			ho = helper.offset(),
12030			w = helper.outerWidth() - that.sizeDiff.width,
12031			h = helper.outerHeight() - that.sizeDiff.height;
12032
12033		if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
12034			$( this ).css( {
12035				left: ho.left - cop.left - co.left,
12036				width: w,
12037				height: h
12038			} );
12039		}
12040
12041		if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
12042			$( this ).css( {
12043				left: ho.left - cop.left - co.left,
12044				width: w,
12045				height: h
12046			} );
12047		}
12048	}
12049} );
12050
12051$.ui.plugin.add( "resizable", "alsoResize", {
12052
12053	start: function() {
12054		var that = $( this ).resizable( "instance" ),
12055			o = that.options;
12056
12057		$( o.alsoResize ).each( function() {
12058			var el = $( this );
12059			el.data( "ui-resizable-alsoresize", {
12060				width: parseFloat( el.width() ), height: parseFloat( el.height() ),
12061				left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
12062			} );
12063		} );
12064	},
12065
12066	resize: function( event, ui ) {
12067		var that = $( this ).resizable( "instance" ),
12068			o = that.options,
12069			os = that.originalSize,
12070			op = that.originalPosition,
12071			delta = {
12072				height: ( that.size.height - os.height ) || 0,
12073				width: ( that.size.width - os.width ) || 0,
12074				top: ( that.position.top - op.top ) || 0,
12075				left: ( that.position.left - op.left ) || 0
12076			};
12077
12078			$( o.alsoResize ).each( function() {
12079				var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {},
12080					css = el.parents( ui.originalElement[ 0 ] ).length ?
12081							[ "width", "height" ] :
12082							[ "width", "height", "top", "left" ];
12083
12084				$.each( css, function( i, prop ) {
12085					var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );
12086					if ( sum && sum >= 0 ) {
12087						style[ prop ] = sum || null;
12088					}
12089				} );
12090
12091				el.css( style );
12092			} );
12093	},
12094
12095	stop: function() {
12096		$( this ).removeData( "ui-resizable-alsoresize" );
12097	}
12098} );
12099
12100$.ui.plugin.add( "resizable", "ghost", {
12101
12102	start: function() {
12103
12104		var that = $( this ).resizable( "instance" ), cs = that.size;
12105
12106		that.ghost = that.originalElement.clone();
12107		that.ghost.css( {
12108			opacity: 0.25,
12109			display: "block",
12110			position: "relative",
12111			height: cs.height,
12112			width: cs.width,
12113			margin: 0,
12114			left: 0,
12115			top: 0
12116		} );
12117
12118		that._addClass( that.ghost, "ui-resizable-ghost" );
12119
12120		// DEPRECATED
12121		// TODO: remove after 1.12
12122		if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) {
12123
12124			// Ghost option
12125			that.ghost.addClass( this.options.ghost );
12126		}
12127
12128		that.ghost.appendTo( that.helper );
12129
12130	},
12131
12132	resize: function() {
12133		var that = $( this ).resizable( "instance" );
12134		if ( that.ghost ) {
12135			that.ghost.css( {
12136				position: "relative",
12137				height: that.size.height,
12138				width: that.size.width
12139			} );
12140		}
12141	},
12142
12143	stop: function() {
12144		var that = $( this ).resizable( "instance" );
12145		if ( that.ghost && that.helper ) {
12146			that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );
12147		}
12148	}
12149
12150} );
12151
12152$.ui.plugin.add( "resizable", "grid", {
12153
12154	resize: function() {
12155		var outerDimensions,
12156			that = $( this ).resizable( "instance" ),
12157			o = that.options,
12158			cs = that.size,
12159			os = that.originalSize,
12160			op = that.originalPosition,
12161			a = that.axis,
12162			grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
vendor: 4,398 bytes, lines 12163-12342
12163			gridX = ( grid[ 0 ] || 1 ),
12164			gridY = ( grid[ 1 ] || 1 ),
12165			ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,
12166			oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,
12167			newWidth = os.width + ox,
12168			newHeight = os.height + oy,
12169			isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),
12170			isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),
12171			isMinWidth = o.minWidth && ( o.minWidth > newWidth ),
12172			isMinHeight = o.minHeight && ( o.minHeight > newHeight );
12173
12174		o.grid = grid;
12175
12176		if ( isMinWidth ) {
12177			newWidth += gridX;
12178		}
12179		if ( isMinHeight ) {
12180			newHeight += gridY;
12181		}
12182		if ( isMaxWidth ) {
12183			newWidth -= gridX;
12184		}
12185		if ( isMaxHeight ) {
12186			newHeight -= gridY;
12187		}
12188
12189		if ( /^(se|s|e)$/.test( a ) ) {
12190			that.size.width = newWidth;
12191			that.size.height = newHeight;
12192		} else if ( /^(ne)$/.test( a ) ) {
12193			that.size.width = newWidth;
12194			that.size.height = newHeight;
12195			that.position.top = op.top - oy;
12196		} else if ( /^(sw)$/.test( a ) ) {
12197			that.size.width = newWidth;
12198			that.size.height = newHeight;
12199			that.position.left = op.left - ox;
12200		} else {
12201			if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {
12202				outerDimensions = that._getPaddingPlusBorderDimensions( this );
12203			}
12204
12205			if ( newHeight - gridY > 0 ) {
12206				that.size.height = newHeight;
12207				that.position.top = op.top - oy;
12208			} else {
12209				newHeight = gridY - outerDimensions.height;
12210				that.size.height = newHeight;
12211				that.position.top = op.top + os.height - newHeight;
12212			}
12213			if ( newWidth - gridX > 0 ) {
12214				that.size.width = newWidth;
12215				that.position.left = op.left - ox;
12216			} else {
12217				newWidth = gridX - outerDimensions.width;
12218				that.size.width = newWidth;
12219				that.position.left = op.left + os.width - newWidth;
12220			}
12221		}
12222	}
12223
12224} );
12225
12226var widgetsResizable = $.ui.resizable;
12227
12228
12229/*!
12230 * jQuery UI Dialog 1.13.2
12231 * http://jqueryui.com
12232 *
12233 * Copyright jQuery Foundation and other contributors
12234 * Released under the MIT license.
12235 * http://jquery.org/license
12236 */
12237
12238//>>label: Dialog
12239//>>group: Widgets
12240//>>description: Displays customizable dialog windows.
12241//>>docs: http://api.jqueryui.com/dialog/
12242//>>demos: http://jqueryui.com/dialog/
12243//>>css.structure: ../../themes/base/core.css
12244//>>css.structure: ../../themes/base/dialog.css
12245//>>css.theme: ../../themes/base/theme.css
12246
12247
12248$.widget( "ui.dialog", {
12249	version: "1.13.2",
12250	options: {
12251		appendTo: "body",
12252		autoOpen: true,
12253		buttons: [],
12254		classes: {
12255			"ui-dialog": "ui-corner-all",
12256			"ui-dialog-titlebar": "ui-corner-all"
12257		},
12258		closeOnEscape: true,
12259		closeText: "Close",
12260		draggable: true,
12261		hide: null,
12262		height: "auto",
12263		maxHeight: null,
12264		maxWidth: null,
12265		minHeight: 150,
12266		minWidth: 150,
12267		modal: false,
12268		position: {
12269			my: "center",
12270			at: "center",
12271			of: window,
12272			collision: "fit",
12273
12274			// Ensure the titlebar is always visible
12275			using: function( pos ) {
12276				var topOffset = $( this ).css( pos ).offset().top;
12277				if ( topOffset < 0 ) {
12278					$( this ).css( "top", pos.top - topOffset );
12279				}
12280			}
12281		},
12282		resizable: true,
12283		show: null,
12284		title: null,
12285		width: 300,
12286
12287		// Callbacks
12288		beforeClose: null,
12289		close: null,
12290		drag: null,
12291		dragStart: null,
12292		dragStop: null,
12293		focus: null,
12294		open: null,
12295		resize: null,
12296		resizeStart: null,
12297		resizeStop: null
12298	},
12299
12300	sizeRelatedOptions: {
12301		buttons: true,
12302		height: true,
12303		maxHeight: true,
12304		maxWidth: true,
12305		minHeight: true,
12306		minWidth: true,
12307		width: true
12308	},
12309
12310	resizableRelatedOptions: {
12311		maxHeight: true,
12312		maxWidth: true,
12313		minHeight: true,
12314		minWidth: true
12315	},
12316
12317	_create: function() {
12318		this.originalCss = {
12319			display: this.element[ 0 ].style.display,
12320			width: this.element[ 0 ].style.width,
12321			minHeight: this.element[ 0 ].style.minHeight,
12322			maxHeight: this.element[ 0 ].style.maxHeight,
12323			height: this.element[ 0 ].style.height
12324		};
12325		this.originalPosition = {
12326			parent: this.element.parent(),
12327			index: this.element.parent().children().index( this.element )
12328		};
12329		this.originalTitle = this.element.attr( "title" );
12330		if ( this.options.title == null && this.originalTitle != null ) {
12331			this.options.title = this.originalTitle;
12332		}
12333
12334		// Dialogs can't be disabled
12335		if ( this.options.disabled ) {
12336			this.options.disabled = false;
12337		}
12338
12339		this._createWrapper();
12340
12341		this.element
12342			.show()
vendor: 25,862 bytes, lines 12343-13335
12343			.removeAttr( "title" )
12344			.appendTo( this.uiDialog );
12345
12346		this._addClass( "ui-dialog-content", "ui-widget-content" );
12347
12348		this._createTitlebar();
12349		this._createButtonPane();
12350
12351		if ( this.options.draggable && $.fn.draggable ) {
12352			this._makeDraggable();
12353		}
12354		if ( this.options.resizable && $.fn.resizable ) {
12355			this._makeResizable();
12356		}
12357
12358		this._isOpen = false;
12359
12360		this._trackFocus();
12361	},
12362
12363	_init: function() {
12364		if ( this.options.autoOpen ) {
12365			this.open();
12366		}
12367	},
12368
12369	_appendTo: function() {
12370		var element = this.options.appendTo;
12371		if ( element && ( element.jquery || element.nodeType ) ) {
12372			return $( element );
12373		}
12374		return this.document.find( element || "body" ).eq( 0 );
12375	},
12376
12377	_destroy: function() {
12378		var next,
12379			originalPosition = this.originalPosition;
12380
12381		this._untrackInstance();
12382		this._destroyOverlay();
12383
12384		this.element
12385			.removeUniqueId()
12386			.css( this.originalCss )
12387
12388			// Without detaching first, the following becomes really slow
12389			.detach();
12390
12391		this.uiDialog.remove();
12392
12393		if ( this.originalTitle ) {
12394			this.element.attr( "title", this.originalTitle );
12395		}
12396
12397		next = originalPosition.parent.children().eq( originalPosition.index );
12398
12399		// Don't try to place the dialog next to itself (#8613)
12400		if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
12401			next.before( this.element );
12402		} else {
12403			originalPosition.parent.append( this.element );
12404		}
12405	},
12406
12407	widget: function() {
12408		return this.uiDialog;
12409	},
12410
12411	disable: $.noop,
12412	enable: $.noop,
12413
12414	close: function( event ) {
12415		var that = this;
12416
12417		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
12418			return;
12419		}
12420
12421		this._isOpen = false;
12422		this._focusedElement = null;
12423		this._destroyOverlay();
12424		this._untrackInstance();
12425
12426		if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
12427
12428			// Hiding a focused element doesn't trigger blur in WebKit
12429			// so in case we have nothing to focus on, explicitly blur the active element
12430			// https://bugs.webkit.org/show_bug.cgi?id=47182
12431			$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
12432		}
12433
12434		this._hide( this.uiDialog, this.options.hide, function() {
12435			that._trigger( "close", event );
12436		} );
12437	},
12438
12439	isOpen: function() {
12440		return this._isOpen;
12441	},
12442
12443	moveToTop: function() {
12444		this._moveToTop();
12445	},
12446
12447	_moveToTop: function( event, silent ) {
12448		var moved = false,
12449			zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
12450				return +$( this ).css( "z-index" );
12451			} ).get(),
12452			zIndexMax = Math.max.apply( null, zIndices );
12453
12454		if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
12455			this.uiDialog.css( "z-index", zIndexMax + 1 );
12456			moved = true;
12457		}
12458
12459		if ( moved && !silent ) {
12460			this._trigger( "focus", event );
12461		}
12462		return moved;
12463	},
12464
12465	open: function() {
12466		var that = this;
12467		if ( this._isOpen ) {
12468			if ( this._moveToTop() ) {
12469				this._focusTabbable();
12470			}
12471			return;
12472		}
12473
12474		this._isOpen = true;
12475		this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
12476
12477		this._size();
12478		this._position();
12479		this._createOverlay();
12480		this._moveToTop( null, true );
12481
12482		// Ensure the overlay is moved to the top with the dialog, but only when
12483		// opening. The overlay shouldn't move after the dialog is open so that
12484		// modeless dialogs opened after the modal dialog stack properly.
12485		if ( this.overlay ) {
12486			this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
12487		}
12488
12489		this._show( this.uiDialog, this.options.show, function() {
12490			that._focusTabbable();
12491			that._trigger( "focus" );
12492		} );
12493
12494		// Track the dialog immediately upon opening in case a focus event
12495		// somehow occurs outside of the dialog before an element inside the
12496		// dialog is focused (#10152)
12497		this._makeFocusTarget();
12498
12499		this._trigger( "open" );
12500	},
12501
12502	_focusTabbable: function() {
12503
12504		// Set focus to the first match:
12505		// 1. An element that was focused previously
12506		// 2. First element inside the dialog matching [autofocus]
12507		// 3. Tabbable element inside the content element
12508		// 4. Tabbable element inside the buttonpane
12509		// 5. The close button
12510		// 6. The dialog itself
12511		var hasFocus = this._focusedElement;
12512		if ( !hasFocus ) {
12513			hasFocus = this.element.find( "[autofocus]" );
12514		}
12515		if ( !hasFocus.length ) {
12516			hasFocus = this.element.find( ":tabbable" );
12517		}
12518		if ( !hasFocus.length ) {
12519			hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
12520		}
12521		if ( !hasFocus.length ) {
12522			hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
12523		}
12524		if ( !hasFocus.length ) {
12525			hasFocus = this.uiDialog;
12526		}
12527		hasFocus.eq( 0 ).trigger( "focus" );
12528	},
12529
12530	_restoreTabbableFocus: function() {
12531		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
12532			isActive = this.uiDialog[ 0 ] === activeElement ||
12533				$.contains( this.uiDialog[ 0 ], activeElement );
12534		if ( !isActive ) {
12535			this._focusTabbable();
12536		}
12537	},
12538
12539	_keepFocus: function( event ) {
12540		event.preventDefault();
12541		this._restoreTabbableFocus();
12542
12543		// support: IE
12544		// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
12545		// so we check again later
12546		this._delay( this._restoreTabbableFocus );
12547	},
12548
12549	_createWrapper: function() {
12550		this.uiDialog = $( "<div>" )
12551			.hide()
12552			.attr( {
12553
12554				// Setting tabIndex makes the div focusable
12555				tabIndex: -1,
12556				role: "dialog"
12557			} )
12558			.appendTo( this._appendTo() );
12559
12560		this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
12561		this._on( this.uiDialog, {
12562			keydown: function( event ) {
12563				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
12564						event.keyCode === $.ui.keyCode.ESCAPE ) {
12565					event.preventDefault();
12566					this.close( event );
12567					return;
12568				}
12569
12570				// Prevent tabbing out of dialogs
12571				if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
12572					return;
12573				}
12574				var tabbables = this.uiDialog.find( ":tabbable" ),
12575					first = tabbables.first(),
12576					last = tabbables.last();
12577
12578				if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
12579						!event.shiftKey ) {
12580					this._delay( function() {
12581						first.trigger( "focus" );
12582					} );
12583					event.preventDefault();
12584				} else if ( ( event.target === first[ 0 ] ||
12585						event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
12586					this._delay( function() {
12587						last.trigger( "focus" );
12588					} );
12589					event.preventDefault();
12590				}
12591			},
12592			mousedown: function( event ) {
12593				if ( this._moveToTop( event ) ) {
12594					this._focusTabbable();
12595				}
12596			}
12597		} );
12598
12599		// We assume that any existing aria-describedby attribute means
12600		// that the dialog content is marked up properly
12601		// otherwise we brute force the content as the description
12602		if ( !this.element.find( "[aria-describedby]" ).length ) {
12603			this.uiDialog.attr( {
12604				"aria-describedby": this.element.uniqueId().attr( "id" )
12605			} );
12606		}
12607	},
12608
12609	_createTitlebar: function() {
12610		var uiDialogTitle;
12611
12612		this.uiDialogTitlebar = $( "<div>" );
12613		this._addClass( this.uiDialogTitlebar,
12614			"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
12615		this._on( this.uiDialogTitlebar, {
12616			mousedown: function( event ) {
12617
12618				// Don't prevent click on close button (#8838)
12619				// Focusing a dialog that is partially scrolled out of view
12620				// causes the browser to scroll it into view, preventing the click event
12621				if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
12622
12623					// Dialog isn't getting focus when dragging (#8063)
12624					this.uiDialog.trigger( "focus" );
12625				}
12626			}
12627		} );
12628
12629		// Support: IE
12630		// Use type="button" to prevent enter keypresses in textboxes from closing the
12631		// dialog in IE (#9312)
12632		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
12633			.button( {
12634				label: $( "<a>" ).text( this.options.closeText ).html(),
12635				icon: "ui-icon-closethick",
12636				showLabel: false
12637			} )
12638			.appendTo( this.uiDialogTitlebar );
12639
12640		this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
12641		this._on( this.uiDialogTitlebarClose, {
12642			click: function( event ) {
12643				event.preventDefault();
12644				this.close( event );
12645			}
12646		} );
12647
12648		uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
12649		this._addClass( uiDialogTitle, "ui-dialog-title" );
12650		this._title( uiDialogTitle );
12651
12652		this.uiDialogTitlebar.prependTo( this.uiDialog );
12653
12654		this.uiDialog.attr( {
12655			"aria-labelledby": uiDialogTitle.attr( "id" )
12656		} );
12657	},
12658
12659	_title: function( title ) {
12660		if ( this.options.title ) {
12661			title.text( this.options.title );
12662		} else {
12663			title.html( "&#160;" );
12664		}
12665	},
12666
12667	_createButtonPane: function() {
12668		this.uiDialogButtonPane = $( "<div>" );
12669		this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
12670			"ui-widget-content ui-helper-clearfix" );
12671
12672		this.uiButtonSet = $( "<div>" )
12673			.appendTo( this.uiDialogButtonPane );
12674		this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
12675
12676		this._createButtons();
12677	},
12678
12679	_createButtons: function() {
12680		var that = this,
12681			buttons = this.options.buttons;
12682
12683		// If we already have a button pane, remove it
12684		this.uiDialogButtonPane.remove();
12685		this.uiButtonSet.empty();
12686
12687		if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
12688			this._removeClass( this.uiDialog, "ui-dialog-buttons" );
12689			return;
12690		}
12691
12692		$.each( buttons, function( name, props ) {
12693			var click, buttonOptions;
12694			props = typeof props === "function" ?
12695				{ click: props, text: name } :
12696				props;
12697
12698			// Default to a non-submitting button
12699			props = $.extend( { type: "button" }, props );
12700
12701			// Change the context for the click callback to be the main element
12702			click = props.click;
12703			buttonOptions = {
12704				icon: props.icon,
12705				iconPosition: props.iconPosition,
12706				showLabel: props.showLabel,
12707
12708				// Deprecated options
12709				icons: props.icons,
12710				text: props.text
12711			};
12712
12713			delete props.click;
12714			delete props.icon;
12715			delete props.iconPosition;
12716			delete props.showLabel;
12717
12718			// Deprecated options
12719			delete props.icons;
12720			if ( typeof props.text === "boolean" ) {
12721				delete props.text;
12722			}
12723
12724			$( "<button></button>", props )
12725				.button( buttonOptions )
12726				.appendTo( that.uiButtonSet )
12727				.on( "click", function() {
12728					click.apply( that.element[ 0 ], arguments );
12729				} );
12730		} );
12731		this._addClass( this.uiDialog, "ui-dialog-buttons" );
12732		this.uiDialogButtonPane.appendTo( this.uiDialog );
12733	},
12734
12735	_makeDraggable: function() {
12736		var that = this,
12737			options = this.options;
12738
12739		function filteredUi( ui ) {
12740			return {
12741				position: ui.position,
12742				offset: ui.offset
12743			};
12744		}
12745
12746		this.uiDialog.draggable( {
12747			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
12748			handle: ".ui-dialog-titlebar",
12749			containment: "document",
12750			start: function( event, ui ) {
12751				that._addClass( $( this ), "ui-dialog-dragging" );
12752				that._blockFrames();
12753				that._trigger( "dragStart", event, filteredUi( ui ) );
12754			},
12755			drag: function( event, ui ) {
12756				that._trigger( "drag", event, filteredUi( ui ) );
12757			},
12758			stop: function( event, ui ) {
12759				var left = ui.offset.left - that.document.scrollLeft(),
12760					top = ui.offset.top - that.document.scrollTop();
12761
12762				options.position = {
12763					my: "left top",
12764					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
12765						"top" + ( top >= 0 ? "+" : "" ) + top,
12766					of: that.window
12767				};
12768				that._removeClass( $( this ), "ui-dialog-dragging" );
12769				that._unblockFrames();
12770				that._trigger( "dragStop", event, filteredUi( ui ) );
12771			}
12772		} );
12773	},
12774
12775	_makeResizable: function() {
12776		var that = this,
12777			options = this.options,
12778			handles = options.resizable,
12779
12780			// .ui-resizable has position: relative defined in the stylesheet
12781			// but dialogs have to use absolute or fixed positioning
12782			position = this.uiDialog.css( "position" ),
12783			resizeHandles = typeof handles === "string" ?
12784				handles :
12785				"n,e,s,w,se,sw,ne,nw";
12786
12787		function filteredUi( ui ) {
12788			return {
12789				originalPosition: ui.originalPosition,
12790				originalSize: ui.originalSize,
12791				position: ui.position,
12792				size: ui.size
12793			};
12794		}
12795
12796		this.uiDialog.resizable( {
12797			cancel: ".ui-dialog-content",
12798			containment: "document",
12799			alsoResize: this.element,
12800			maxWidth: options.maxWidth,
12801			maxHeight: options.maxHeight,
12802			minWidth: options.minWidth,
12803			minHeight: this._minHeight(),
12804			handles: resizeHandles,
12805			start: function( event, ui ) {
12806				that._addClass( $( this ), "ui-dialog-resizing" );
12807				that._blockFrames();
12808				that._trigger( "resizeStart", event, filteredUi( ui ) );
12809			},
12810			resize: function( event, ui ) {
12811				that._trigger( "resize", event, filteredUi( ui ) );
12812			},
12813			stop: function( event, ui ) {
12814				var offset = that.uiDialog.offset(),
12815					left = offset.left - that.document.scrollLeft(),
12816					top = offset.top - that.document.scrollTop();
12817
12818				options.height = that.uiDialog.height();
12819				options.width = that.uiDialog.width();
12820				options.position = {
12821					my: "left top",
12822					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
12823						"top" + ( top >= 0 ? "+" : "" ) + top,
12824					of: that.window
12825				};
12826				that._removeClass( $( this ), "ui-dialog-resizing" );
12827				that._unblockFrames();
12828				that._trigger( "resizeStop", event, filteredUi( ui ) );
12829			}
12830		} )
12831			.css( "position", position );
12832	},
12833
12834	_trackFocus: function() {
12835		this._on( this.widget(), {
12836			focusin: function( event ) {
12837				this._makeFocusTarget();
12838				this._focusedElement = $( event.target );
12839			}
12840		} );
12841	},
12842
12843	_makeFocusTarget: function() {
12844		this._untrackInstance();
12845		this._trackingInstances().unshift( this );
12846	},
12847
12848	_untrackInstance: function() {
12849		var instances = this._trackingInstances(),
12850			exists = $.inArray( this, instances );
12851		if ( exists !== -1 ) {
12852			instances.splice( exists, 1 );
12853		}
12854	},
12855
12856	_trackingInstances: function() {
12857		var instances = this.document.data( "ui-dialog-instances" );
12858		if ( !instances ) {
12859			instances = [];
12860			this.document.data( "ui-dialog-instances", instances );
12861		}
12862		return instances;
12863	},
12864
12865	_minHeight: function() {
12866		var options = this.options;
12867
12868		return options.height === "auto" ?
12869			options.minHeight :
12870			Math.min( options.minHeight, options.height );
12871	},
12872
12873	_position: function() {
12874
12875		// Need to show the dialog to get the actual offset in the position plugin
12876		var isVisible = this.uiDialog.is( ":visible" );
12877		if ( !isVisible ) {
12878			this.uiDialog.show();
12879		}
12880		this.uiDialog.position( this.options.position );
12881		if ( !isVisible ) {
12882			this.uiDialog.hide();
12883		}
12884	},
12885
12886	_setOptions: function( options ) {
12887		var that = this,
12888			resize = false,
12889			resizableOptions = {};
12890
12891		$.each( options, function( key, value ) {
12892			that._setOption( key, value );
12893
12894			if ( key in that.sizeRelatedOptions ) {
12895				resize = true;
12896			}
12897			if ( key in that.resizableRelatedOptions ) {
12898				resizableOptions[ key ] = value;
12899			}
12900		} );
12901
12902		if ( resize ) {
12903			this._size();
12904			this._position();
12905		}
12906		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
12907			this.uiDialog.resizable( "option", resizableOptions );
12908		}
12909	},
12910
12911	_setOption: function( key, value ) {
12912		var isDraggable, isResizable,
12913			uiDialog = this.uiDialog;
12914
12915		if ( key === "disabled" ) {
12916			return;
12917		}
12918
12919		this._super( key, value );
12920
12921		if ( key === "appendTo" ) {
12922			this.uiDialog.appendTo( this._appendTo() );
12923		}
12924
12925		if ( key === "buttons" ) {
12926			this._createButtons();
12927		}
12928
12929		if ( key === "closeText" ) {
12930			this.uiDialogTitlebarClose.button( {
12931
12932				// Ensure that we always pass a string
12933				label: $( "<a>" ).text( "" + this.options.closeText ).html()
12934			} );
12935		}
12936
12937		if ( key === "draggable" ) {
12938			isDraggable = uiDialog.is( ":data(ui-draggable)" );
12939			if ( isDraggable && !value ) {
12940				uiDialog.draggable( "destroy" );
12941			}
12942
12943			if ( !isDraggable && value ) {
12944				this._makeDraggable();
12945			}
12946		}
12947
12948		if ( key === "position" ) {
12949			this._position();
12950		}
12951
12952		if ( key === "resizable" ) {
12953
12954			// currently resizable, becoming non-resizable
12955			isResizable = uiDialog.is( ":data(ui-resizable)" );
12956			if ( isResizable && !value ) {
12957				uiDialog.resizable( "destroy" );
12958			}
12959
12960			// Currently resizable, changing handles
12961			if ( isResizable && typeof value === "string" ) {
12962				uiDialog.resizable( "option", "handles", value );
12963			}
12964
12965			// Currently non-resizable, becoming resizable
12966			if ( !isResizable && value !== false ) {
12967				this._makeResizable();
12968			}
12969		}
12970
12971		if ( key === "title" ) {
12972			this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
12973		}
12974	},
12975
12976	_size: function() {
12977
12978		// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
12979		// divs will both have width and height set, so we need to reset them
12980		var nonContentHeight, minContentHeight, maxContentHeight,
12981			options = this.options;
12982
12983		// Reset content sizing
12984		this.element.show().css( {
12985			width: "auto",
12986			minHeight: 0,
12987			maxHeight: "none",
12988			height: 0
12989		} );
12990
12991		if ( options.minWidth > options.width ) {
12992			options.width = options.minWidth;
12993		}
12994
12995		// Reset wrapper sizing
12996		// determine the height of all the non-content elements
12997		nonContentHeight = this.uiDialog.css( {
12998			height: "auto",
12999			width: options.width
13000		} )
13001			.outerHeight();
13002		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
13003		maxContentHeight = typeof options.maxHeight === "number" ?
13004			Math.max( 0, options.maxHeight - nonContentHeight ) :
13005			"none";
13006
13007		if ( options.height === "auto" ) {
13008			this.element.css( {
13009				minHeight: minContentHeight,
13010				maxHeight: maxContentHeight,
13011				height: "auto"
13012			} );
13013		} else {
13014			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
13015		}
13016
13017		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
13018			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
13019		}
13020	},
13021
13022	_blockFrames: function() {
13023		this.iframeBlocks = this.document.find( "iframe" ).map( function() {
13024			var iframe = $( this );
13025
13026			return $( "<div>" )
13027				.css( {
13028					position: "absolute",
13029					width: iframe.outerWidth(),
13030					height: iframe.outerHeight()
13031				} )
13032				.appendTo( iframe.parent() )
13033				.offset( iframe.offset() )[ 0 ];
13034		} );
13035	},
13036
13037	_unblockFrames: function() {
13038		if ( this.iframeBlocks ) {
13039			this.iframeBlocks.remove();
13040			delete this.iframeBlocks;
13041		}
13042	},
13043
13044	_allowInteraction: function( event ) {
13045		if ( $( event.target ).closest( ".ui-dialog" ).length ) {
13046			return true;
13047		}
13048
13049		// TODO: Remove hack when datepicker implements
13050		// the .ui-front logic (#8989)
13051		return !!$( event.target ).closest( ".ui-datepicker" ).length;
13052	},
13053
13054	_createOverlay: function() {
13055		if ( !this.options.modal ) {
13056			return;
13057		}
13058
13059		var jqMinor = $.fn.jquery.substring( 0, 4 );
13060
13061		// We use a delay in case the overlay is created from an
13062		// event that we're going to be cancelling (#2804)
13063		var isOpening = true;
13064		this._delay( function() {
13065			isOpening = false;
13066		} );
13067
13068		if ( !this.document.data( "ui-dialog-overlays" ) ) {
13069
13070			// Prevent use of anchors and inputs
13071			// This doesn't use `_on()` because it is a shared event handler
13072			// across all open modal dialogs.
13073			this.document.on( "focusin.ui-dialog", function( event ) {
13074				if ( isOpening ) {
13075					return;
13076				}
13077
13078				var instance = this._trackingInstances()[ 0 ];
13079				if ( !instance._allowInteraction( event ) ) {
13080					event.preventDefault();
13081					instance._focusTabbable();
13082
13083					// Support: jQuery >=3.4 <3.6 only
13084					// Focus re-triggering in jQuery 3.4/3.5 makes the original element
13085					// have its focus event propagated last, breaking the re-targeting.
13086					// Trigger focus in a delay in addition if needed to avoid the issue
13087					// See https://github.com/jquery/jquery/issues/4382
13088					if ( jqMinor === "3.4." || jqMinor === "3.5." ) {
13089						instance._delay( instance._restoreTabbableFocus );
13090					}
13091				}
13092			}.bind( this ) );
13093		}
13094
13095		this.overlay = $( "<div>" )
13096			.appendTo( this._appendTo() );
13097
13098		this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
13099		this._on( this.overlay, {
13100			mousedown: "_keepFocus"
13101		} );
13102		this.document.data( "ui-dialog-overlays",
13103			( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
13104	},
13105
13106	_destroyOverlay: function() {
13107		if ( !this.options.modal ) {
13108			return;
13109		}
13110
13111		if ( this.overlay ) {
13112			var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
13113
13114			if ( !overlays ) {
13115				this.document.off( "focusin.ui-dialog" );
13116				this.document.removeData( "ui-dialog-overlays" );
13117			} else {
13118				this.document.data( "ui-dialog-overlays", overlays );
13119			}
13120
13121			this.overlay.remove();
13122			this.overlay = null;
13123		}
13124	}
13125} );
13126
13127// DEPRECATED
13128// TODO: switch return back to widget declaration at top of file when this is removed
13129if ( $.uiBackCompat !== false ) {
13130
13131	// Backcompat for dialogClass option
13132	$.widget( "ui.dialog", $.ui.dialog, {
13133		options: {
13134			dialogClass: ""
13135		},
13136		_createWrapper: function() {
13137			this._super();
13138			this.uiDialog.addClass( this.options.dialogClass );
13139		},
13140		_setOption: function( key, value ) {
13141			if ( key === "dialogClass" ) {
13142				this.uiDialog
13143					.removeClass( this.options.dialogClass )
13144					.addClass( value );
13145			}
13146			this._superApply( arguments );
13147		}
13148	} );
13149}
13150
13151var widgetsDialog = $.ui.dialog;
13152
13153
13154/*!
13155 * jQuery UI Droppable 1.13.2
13156 * http://jqueryui.com
13157 *
13158 * Copyright jQuery Foundation and other contributors
13159 * Released under the MIT license.
13160 * http://jquery.org/license
13161 */
13162
13163//>>label: Droppable
13164//>>group: Interactions
13165//>>description: Enables drop targets for draggable elements.
13166//>>docs: http://api.jqueryui.com/droppable/
13167//>>demos: http://jqueryui.com/droppable/
13168
13169
13170$.widget( "ui.droppable", {
13171	version: "1.13.2",
13172	widgetEventPrefix: "drop",
13173	options: {
13174		accept: "*",
13175		addClasses: true,
13176		greedy: false,
13177		scope: "default",
13178		tolerance: "intersect",
13179
13180		// Callbacks
13181		activate: null,
13182		deactivate: null,
13183		drop: null,
13184		out: null,
13185		over: null
13186	},
13187	_create: function() {
13188
13189		var proportions,
13190			o = this.options,
13191			accept = o.accept;
13192
13193		this.isover = false;
13194		this.isout = true;
13195
13196		this.accept = typeof accept === "function" ? accept : function( d ) {
13197			return d.is( accept );
13198		};
13199
13200		this.proportions = function( /* valueToWrite */ ) {
13201			if ( arguments.length ) {
13202
13203				// Store the droppable's proportions
13204				proportions = arguments[ 0 ];
13205			} else {
13206
13207				// Retrieve or derive the droppable's proportions
13208				return proportions ?
13209					proportions :
13210					proportions = {
13211						width: this.element[ 0 ].offsetWidth,
13212						height: this.element[ 0 ].offsetHeight
13213					};
13214			}
13215		};
13216
13217		this._addToManager( o.scope );
13218
13219		if ( o.addClasses ) {
13220			this._addClass( "ui-droppable" );
13221		}
13222
13223	},
13224
13225	_addToManager: function( scope ) {
13226
13227		// Add the reference and positions to the manager
13228		$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
13229		$.ui.ddmanager.droppables[ scope ].push( this );
13230	},
13231
13232	_splice: function( drop ) {
13233		var i = 0;
13234		for ( ; i < drop.length; i++ ) {
13235			if ( drop[ i ] === this ) {
13236				drop.splice( i, 1 );
13237			}
13238		}
13239	},
13240
13241	_destroy: function() {
13242		var drop = $.ui.ddmanager.droppables[ this.options.scope ];
13243
13244		this._splice( drop );
13245	},
13246
13247	_setOption: function( key, value ) {
13248
13249		if ( key === "accept" ) {
13250			this.accept = typeof value === "function" ? value : function( d ) {
13251				return d.is( value );
13252			};
13253		} else if ( key === "scope" ) {
13254			var drop = $.ui.ddmanager.droppables[ this.options.scope ];
13255
13256			this._splice( drop );
13257			this._addToManager( value );
13258		}
13259
13260		this._super( key, value );
13261	},
13262
13263	_activate: function( event ) {
13264		var draggable = $.ui.ddmanager.current;
13265
13266		this._addActiveClass();
13267		if ( draggable ) {
13268			this._trigger( "activate", event, this.ui( draggable ) );
13269		}
13270	},
13271
13272	_deactivate: function( event ) {
13273		var draggable = $.ui.ddmanager.current;
13274
13275		this._removeActiveClass();
13276		if ( draggable ) {
13277			this._trigger( "deactivate", event, this.ui( draggable ) );
13278		}
13279	},
13280
13281	_over: function( event ) {
13282
13283		var draggable = $.ui.ddmanager.current;
13284
13285		// Bail if draggable and droppable are same element
13286		if ( !draggable || ( draggable.currentItem ||
13287				draggable.element )[ 0 ] === this.element[ 0 ] ) {
13288			return;
13289		}
13290
13291		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
13292				draggable.element ) ) ) {
13293			this._addHoverClass();
13294			this._trigger( "over", event, this.ui( draggable ) );
13295		}
13296
13297	},
13298
13299	_out: function( event ) {
13300
13301		var draggable = $.ui.ddmanager.current;
13302
13303		// Bail if draggable and droppable are same element
13304		if ( !draggable || ( draggable.currentItem ||
13305				draggable.element )[ 0 ] === this.element[ 0 ] ) {
13306			return;
13307		}
13308
13309		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
13310				draggable.element ) ) ) {
13311			this._removeHoverClass();
13312			this._trigger( "out", event, this.ui( draggable ) );
13313		}
13314
13315	},
13316
13317	_drop: function( event, custom ) {
13318
13319		var draggable = custom || $.ui.ddmanager.current,
13320			childrenIntersection = false;
13321
13322		// Bail if draggable and droppable are same element
13323		if ( !draggable || ( draggable.currentItem ||
13324				draggable.element )[ 0 ] === this.element[ 0 ] ) {
13325			return false;
13326		}
13327
13328		this.element
13329			.find( ":data(ui-droppable)" )
13330			.not( ".ui-draggable-dragging" )
13331			.each( function() {
13332				var inst = $( this ).droppable( "instance" );
13333				if (
13334					inst.options.greedy &&
13335					!inst.options.disabled &&
vendor: 4,579 bytes, lines 13336-13496
13336					inst.options.scope === draggable.options.scope &&
13337					inst.accept.call(
13338						inst.element[ 0 ], ( draggable.currentItem || draggable.element )
13339					) &&
13340					$.ui.intersect(
13341						draggable,
13342						$.extend( inst, { offset: inst.element.offset() } ),
13343						inst.options.tolerance, event
13344					)
13345				) {
13346					childrenIntersection = true;
13347					return false;
13348				}
13349			} );
13350		if ( childrenIntersection ) {
13351			return false;
13352		}
13353
13354		if ( this.accept.call( this.element[ 0 ],
13355				( draggable.currentItem || draggable.element ) ) ) {
13356			this._removeActiveClass();
13357			this._removeHoverClass();
13358
13359			this._trigger( "drop", event, this.ui( draggable ) );
13360			return this.element;
13361		}
13362
13363		return false;
13364
13365	},
13366
13367	ui: function( c ) {
13368		return {
13369			draggable: ( c.currentItem || c.element ),
13370			helper: c.helper,
13371			position: c.position,
13372			offset: c.positionAbs
13373		};
13374	},
13375
13376	// Extension points just to make backcompat sane and avoid duplicating logic
13377	// TODO: Remove in 1.14 along with call to it below
13378	_addHoverClass: function() {
13379		this._addClass( "ui-droppable-hover" );
13380	},
13381
13382	_removeHoverClass: function() {
13383		this._removeClass( "ui-droppable-hover" );
13384	},
13385
13386	_addActiveClass: function() {
13387		this._addClass( "ui-droppable-active" );
13388	},
13389
13390	_removeActiveClass: function() {
13391		this._removeClass( "ui-droppable-active" );
13392	}
13393} );
13394
13395$.ui.intersect = ( function() {
13396	function isOverAxis( x, reference, size ) {
13397		return ( x >= reference ) && ( x < ( reference + size ) );
13398	}
13399
13400	return function( draggable, droppable, toleranceMode, event ) {
13401
13402		if ( !droppable.offset ) {
13403			return false;
13404		}
13405
13406		var x1 = ( draggable.positionAbs ||
13407				draggable.position.absolute ).left + draggable.margins.left,
13408			y1 = ( draggable.positionAbs ||
13409				draggable.position.absolute ).top + draggable.margins.top,
13410			x2 = x1 + draggable.helperProportions.width,
13411			y2 = y1 + draggable.helperProportions.height,
13412			l = droppable.offset.left,
13413			t = droppable.offset.top,
13414			r = l + droppable.proportions().width,
13415			b = t + droppable.proportions().height;
13416
13417		switch ( toleranceMode ) {
13418		case "fit":
13419			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
13420		case "intersect":
13421			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
13422				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
13423				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
13424				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
13425		case "pointer":
13426			return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
13427				isOverAxis( event.pageX, l, droppable.proportions().width );
13428		case "touch":
13429			return (
13430				( y1 >= t && y1 <= b ) || // Top edge touching
13431				( y2 >= t && y2 <= b ) || // Bottom edge touching
13432				( y1 < t && y2 > b ) // Surrounded vertically
13433			) && (
13434				( x1 >= l && x1 <= r ) || // Left edge touching
13435				( x2 >= l && x2 <= r ) || // Right edge touching
13436				( x1 < l && x2 > r ) // Surrounded horizontally
13437			);
13438		default:
13439			return false;
13440		}
13441	};
13442} )();
13443
13444/*
13445	This manager tracks offsets of draggables and droppables
13446*/
13447$.ui.ddmanager = {
13448	current: null,
13449	droppables: { "default": [] },
13450	prepareOffsets: function( t, event ) {
13451
13452		var i, j,
13453			m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
13454			type = event ? event.type : null, // workaround for #2317
13455			list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
13456
13457		droppablesLoop: for ( i = 0; i < m.length; i++ ) {
13458
13459			// No disabled and non-accepted
13460			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
13461					( t.currentItem || t.element ) ) ) ) {
13462				continue;
13463			}
13464
13465			// Filter out elements in the current dragged item
13466			for ( j = 0; j < list.length; j++ ) {
13467				if ( list[ j ] === m[ i ].element[ 0 ] ) {
13468					m[ i ].proportions().height = 0;
13469					continue droppablesLoop;
13470				}
13471			}
13472
13473			m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
13474			if ( !m[ i ].visible ) {
13475				continue;
13476			}
13477
13478			// Activate the droppable if used directly from draggables
13479			if ( type === "mousedown" ) {
13480				m[ i ]._activate.call( m[ i ], event );
13481			}
13482
13483			m[ i ].offset = m[ i ].element.offset();
13484			m[ i ].proportions( {
13485				width: m[ i ].element[ 0 ].offsetWidth,
13486				height: m[ i ].element[ 0 ].offsetHeight
13487			} );
13488
13489		}
13490
13491	},
13492	drop: function( draggable, event ) {
13493
13494		var dropped = false;
13495
13496		// Create a copy of the droppables in case the list changes during the drop (#9116)
vendor: 4,304 bytes, lines 13497-13639
13497		$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
13498
13499			if ( !this.options ) {
13500				return;
13501			}
13502			if ( !this.options.disabled && this.visible &&
13503					$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
13504				dropped = this._drop.call( this, event ) || dropped;
13505			}
13506
13507			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
13508					( draggable.currentItem || draggable.element ) ) ) {
13509				this.isout = true;
13510				this.isover = false;
13511				this._deactivate.call( this, event );
13512			}
13513
13514		} );
13515		return dropped;
13516
13517	},
13518	dragStart: function( draggable, event ) {
13519
13520		// Listen for scrolling so that if the dragging causes scrolling the position of the
13521		// droppables can be recalculated (see #5003)
13522		draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
13523			if ( !draggable.options.refreshPositions ) {
13524				$.ui.ddmanager.prepareOffsets( draggable, event );
13525			}
13526		} );
13527	},
13528	drag: function( draggable, event ) {
13529
13530		// If you have a highly dynamic page, you might try this option. It renders positions
13531		// every time you move the mouse.
13532		if ( draggable.options.refreshPositions ) {
13533			$.ui.ddmanager.prepareOffsets( draggable, event );
13534		}
13535
13536		// Run through all droppables and check their positions based on specific tolerance options
13537		$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
13538
13539			if ( this.options.disabled || this.greedyChild || !this.visible ) {
13540				return;
13541			}
13542
13543			var parentInstance, scope, parent,
13544				intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
13545				c = !intersects && this.isover ?
13546					"isout" :
13547					( intersects && !this.isover ? "isover" : null );
13548			if ( !c ) {
13549				return;
13550			}
13551
13552			if ( this.options.greedy ) {
13553
13554				// find droppable parents with same scope
13555				scope = this.options.scope;
13556				parent = this.element.parents( ":data(ui-droppable)" ).filter( function() {
13557					return $( this ).droppable( "instance" ).options.scope === scope;
13558				} );
13559
13560				if ( parent.length ) {
13561					parentInstance = $( parent[ 0 ] ).droppable( "instance" );
13562					parentInstance.greedyChild = ( c === "isover" );
13563				}
13564			}
13565
13566			// We just moved into a greedy child
13567			if ( parentInstance && c === "isover" ) {
13568				parentInstance.isover = false;
13569				parentInstance.isout = true;
13570				parentInstance._out.call( parentInstance, event );
13571			}
13572
13573			this[ c ] = true;
13574			this[ c === "isout" ? "isover" : "isout" ] = false;
13575			this[ c === "isover" ? "_over" : "_out" ].call( this, event );
13576
13577			// We just moved out of a greedy child
13578			if ( parentInstance && c === "isout" ) {
13579				parentInstance.isout = false;
13580				parentInstance.isover = true;
13581				parentInstance._over.call( parentInstance, event );
13582			}
13583		} );
13584
13585	},
13586	dragStop: function( draggable, event ) {
13587		draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
13588
13589		// Call prepareOffsets one final time since IE does not fire return scroll events when
13590		// overflow was caused by drag (see #5003)
13591		if ( !draggable.options.refreshPositions ) {
13592			$.ui.ddmanager.prepareOffsets( draggable, event );
13593		}
13594	}
13595};
13596
13597// DEPRECATED
13598// TODO: switch return back to widget declaration at top of file when this is removed
13599if ( $.uiBackCompat !== false ) {
13600
13601	// Backcompat for activeClass and hoverClass options
13602	$.widget( "ui.droppable", $.ui.droppable, {
13603		options: {
13604			hoverClass: false,
13605			activeClass: false
13606		},
13607		_addActiveClass: function() {
13608			this._super();
13609			if ( this.options.activeClass ) {
13610				this.element.addClass( this.options.activeClass );
13611			}
13612		},
13613		_removeActiveClass: function() {
13614			this._super();
13615			if ( this.options.activeClass ) {
13616				this.element.removeClass( this.options.activeClass );
13617			}
13618		},
13619		_addHoverClass: function() {
13620			this._super();
13621			if ( this.options.hoverClass ) {
13622				this.element.addClass( this.options.hoverClass );
13623			}
13624		},
13625		_removeHoverClass: function() {
13626			this._super();
13627			if ( this.options.hoverClass ) {
13628				this.element.removeClass( this.options.hoverClass );
13629			}
13630		}
13631	} );
13632}
13633
13634var widgetsDroppable = $.ui.droppable;
13635
13636
13637/*!
13638 * jQuery UI Progressbar 1.13.2
13639 * http://jqueryui.com
vendor: 12,231 bytes, lines 13640-14100
13640 *
13641 * Copyright jQuery Foundation and other contributors
13642 * Released under the MIT license.
13643 * http://jquery.org/license
13644 */
13645
13646//>>label: Progressbar
13647//>>group: Widgets
13648/* eslint-disable max-len */
13649//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
13650/* eslint-enable max-len */
13651//>>docs: http://api.jqueryui.com/progressbar/
13652//>>demos: http://jqueryui.com/progressbar/
13653//>>css.structure: ../../themes/base/core.css
13654//>>css.structure: ../../themes/base/progressbar.css
13655//>>css.theme: ../../themes/base/theme.css
13656
13657
13658var widgetsProgressbar = $.widget( "ui.progressbar", {
13659	version: "1.13.2",
13660	options: {
13661		classes: {
13662			"ui-progressbar": "ui-corner-all",
13663			"ui-progressbar-value": "ui-corner-left",
13664			"ui-progressbar-complete": "ui-corner-right"
13665		},
13666		max: 100,
13667		value: 0,
13668
13669		change: null,
13670		complete: null
13671	},
13672
13673	min: 0,
13674
13675	_create: function() {
13676
13677		// Constrain initial value
13678		this.oldValue = this.options.value = this._constrainedValue();
13679
13680		this.element.attr( {
13681
13682			// Only set static values; aria-valuenow and aria-valuemax are
13683			// set inside _refreshValue()
13684			role: "progressbar",
13685			"aria-valuemin": this.min
13686		} );
13687		this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
13688
13689		this.valueDiv = $( "<div>" ).appendTo( this.element );
13690		this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
13691		this._refreshValue();
13692	},
13693
13694	_destroy: function() {
13695		this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );
13696
13697		this.valueDiv.remove();
13698	},
13699
13700	value: function( newValue ) {
13701		if ( newValue === undefined ) {
13702			return this.options.value;
13703		}
13704
13705		this.options.value = this._constrainedValue( newValue );
13706		this._refreshValue();
13707	},
13708
13709	_constrainedValue: function( newValue ) {
13710		if ( newValue === undefined ) {
13711			newValue = this.options.value;
13712		}
13713
13714		this.indeterminate = newValue === false;
13715
13716		// Sanitize value
13717		if ( typeof newValue !== "number" ) {
13718			newValue = 0;
13719		}
13720
13721		return this.indeterminate ? false :
13722			Math.min( this.options.max, Math.max( this.min, newValue ) );
13723	},
13724
13725	_setOptions: function( options ) {
13726
13727		// Ensure "value" option is set after other values (like max)
13728		var value = options.value;
13729		delete options.value;
13730
13731		this._super( options );
13732
13733		this.options.value = this._constrainedValue( value );
13734		this._refreshValue();
13735	},
13736
13737	_setOption: function( key, value ) {
13738		if ( key === "max" ) {
13739
13740			// Don't allow a max less than min
13741			value = Math.max( this.min, value );
13742		}
13743		this._super( key, value );
13744	},
13745
13746	_setOptionDisabled: function( value ) {
13747		this._super( value );
13748
13749		this.element.attr( "aria-disabled", value );
13750		this._toggleClass( null, "ui-state-disabled", !!value );
13751	},
13752
13753	_percentage: function() {
13754		return this.indeterminate ?
13755			100 :
13756			100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
13757	},
13758
13759	_refreshValue: function() {
13760		var value = this.options.value,
13761			percentage = this._percentage();
13762
13763		this.valueDiv
13764			.toggle( this.indeterminate || value > this.min )
13765			.width( percentage.toFixed( 0 ) + "%" );
13766
13767		this
13768			._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
13769				value === this.options.max )
13770			._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );
13771
13772		if ( this.indeterminate ) {
13773			this.element.removeAttr( "aria-valuenow" );
13774			if ( !this.overlayDiv ) {
13775				this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
13776				this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
13777			}
13778		} else {
13779			this.element.attr( {
13780				"aria-valuemax": this.options.max,
13781				"aria-valuenow": value
13782			} );
13783			if ( this.overlayDiv ) {
13784				this.overlayDiv.remove();
13785				this.overlayDiv = null;
13786			}
13787		}
13788
13789		if ( this.oldValue !== value ) {
13790			this.oldValue = value;
13791			this._trigger( "change" );
13792		}
13793		if ( value === this.options.max ) {
13794			this._trigger( "complete" );
13795		}
13796	}
13797} );
13798
13799
13800/*!
13801 * jQuery UI Selectable 1.13.2
13802 * http://jqueryui.com
13803 *
13804 * Copyright jQuery Foundation and other contributors
13805 * Released under the MIT license.
13806 * http://jquery.org/license
13807 */
13808
13809//>>label: Selectable
13810//>>group: Interactions
13811//>>description: Allows groups of elements to be selected with the mouse.
13812//>>docs: http://api.jqueryui.com/selectable/
13813//>>demos: http://jqueryui.com/selectable/
13814//>>css.structure: ../../themes/base/selectable.css
13815
13816
13817var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
13818	version: "1.13.2",
13819	options: {
13820		appendTo: "body",
13821		autoRefresh: true,
13822		distance: 0,
13823		filter: "*",
13824		tolerance: "touch",
13825
13826		// Callbacks
13827		selected: null,
13828		selecting: null,
13829		start: null,
13830		stop: null,
13831		unselected: null,
13832		unselecting: null
13833	},
13834	_create: function() {
13835		var that = this;
13836
13837		this._addClass( "ui-selectable" );
13838
13839		this.dragged = false;
13840
13841		// Cache selectee children based on filter
13842		this.refresh = function() {
13843			that.elementPos = $( that.element[ 0 ] ).offset();
13844			that.selectees = $( that.options.filter, that.element[ 0 ] );
13845			that._addClass( that.selectees, "ui-selectee" );
13846			that.selectees.each( function() {
13847				var $this = $( this ),
13848					selecteeOffset = $this.offset(),
13849					pos = {
13850						left: selecteeOffset.left - that.elementPos.left,
13851						top: selecteeOffset.top - that.elementPos.top
13852					};
13853				$.data( this, "selectable-item", {
13854					element: this,
13855					$element: $this,
13856					left: pos.left,
13857					top: pos.top,
13858					right: pos.left + $this.outerWidth(),
13859					bottom: pos.top + $this.outerHeight(),
13860					startselected: false,
13861					selected: $this.hasClass( "ui-selected" ),
13862					selecting: $this.hasClass( "ui-selecting" ),
13863					unselecting: $this.hasClass( "ui-unselecting" )
13864				} );
13865			} );
13866		};
13867		this.refresh();
13868
13869		this._mouseInit();
13870
13871		this.helper = $( "<div>" );
13872		this._addClass( this.helper, "ui-selectable-helper" );
13873	},
13874
13875	_destroy: function() {
13876		this.selectees.removeData( "selectable-item" );
13877		this._mouseDestroy();
13878	},
13879
13880	_mouseStart: function( event ) {
13881		var that = this,
13882			options = this.options;
13883
13884		this.opos = [ event.pageX, event.pageY ];
13885		this.elementPos = $( this.element[ 0 ] ).offset();
13886
13887		if ( this.options.disabled ) {
13888			return;
13889		}
13890
13891		this.selectees = $( options.filter, this.element[ 0 ] );
13892
13893		this._trigger( "start", event );
13894
13895		$( options.appendTo ).append( this.helper );
13896
13897		// position helper (lasso)
13898		this.helper.css( {
13899			"left": event.pageX,
13900			"top": event.pageY,
13901			"width": 0,
13902			"height": 0
13903		} );
13904
13905		if ( options.autoRefresh ) {
13906			this.refresh();
13907		}
13908
13909		this.selectees.filter( ".ui-selected" ).each( function() {
13910			var selectee = $.data( this, "selectable-item" );
13911			selectee.startselected = true;
13912			if ( !event.metaKey && !event.ctrlKey ) {
13913				that._removeClass( selectee.$element, "ui-selected" );
13914				selectee.selected = false;
13915				that._addClass( selectee.$element, "ui-unselecting" );
13916				selectee.unselecting = true;
13917
13918				// selectable UNSELECTING callback
13919				that._trigger( "unselecting", event, {
13920					unselecting: selectee.element
13921				} );
13922			}
13923		} );
13924
13925		$( event.target ).parents().addBack().each( function() {
13926			var doSelect,
13927				selectee = $.data( this, "selectable-item" );
13928			if ( selectee ) {
13929				doSelect = ( !event.metaKey && !event.ctrlKey ) ||
13930					!selectee.$element.hasClass( "ui-selected" );
13931				that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
13932					._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
13933				selectee.unselecting = !doSelect;
13934				selectee.selecting = doSelect;
13935				selectee.selected = doSelect;
13936
13937				// selectable (UN)SELECTING callback
13938				if ( doSelect ) {
13939					that._trigger( "selecting", event, {
13940						selecting: selectee.element
13941					} );
13942				} else {
13943					that._trigger( "unselecting", event, {
13944						unselecting: selectee.element
13945					} );
13946				}
13947				return false;
13948			}
13949		} );
13950
13951	},
13952
13953	_mouseDrag: function( event ) {
13954
13955		this.dragged = true;
13956
13957		if ( this.options.disabled ) {
13958			return;
13959		}
13960
13961		var tmp,
13962			that = this,
13963			options = this.options,
13964			x1 = this.opos[ 0 ],
13965			y1 = this.opos[ 1 ],
13966			x2 = event.pageX,
13967			y2 = event.pageY;
13968
13969		if ( x1 > x2 ) {
13970			tmp = x2; x2 = x1; x1 = tmp;
13971		}
13972		if ( y1 > y2 ) {
13973			tmp = y2; y2 = y1; y1 = tmp;
13974		}
13975		this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
13976
13977		this.selectees.each( function() {
13978			var selectee = $.data( this, "selectable-item" ),
13979				hit = false,
13980				offset = {};
13981
13982			//prevent helper from being selected if appendTo: selectable
13983			if ( !selectee || selectee.element === that.element[ 0 ] ) {
13984				return;
13985			}
13986
13987			offset.left   = selectee.left   + that.elementPos.left;
13988			offset.right  = selectee.right  + that.elementPos.left;
13989			offset.top    = selectee.top    + that.elementPos.top;
13990			offset.bottom = selectee.bottom + that.elementPos.top;
13991
13992			if ( options.tolerance === "touch" ) {
13993				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
13994                    offset.bottom < y1 ) );
13995			} else if ( options.tolerance === "fit" ) {
13996				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
13997                    offset.bottom < y2 );
13998			}
13999
14000			if ( hit ) {
14001
14002				// SELECT
14003				if ( selectee.selected ) {
14004					that._removeClass( selectee.$element, "ui-selected" );
14005					selectee.selected = false;
14006				}
14007				if ( selectee.unselecting ) {
14008					that._removeClass( selectee.$element, "ui-unselecting" );
14009					selectee.unselecting = false;
14010				}
14011				if ( !selectee.selecting ) {
14012					that._addClass( selectee.$element, "ui-selecting" );
14013					selectee.selecting = true;
14014
14015					// selectable SELECTING callback
14016					that._trigger( "selecting", event, {
14017						selecting: selectee.element
14018					} );
14019				}
14020			} else {
14021
14022				// UNSELECT
14023				if ( selectee.selecting ) {
14024					if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
14025						that._removeClass( selectee.$element, "ui-selecting" );
14026						selectee.selecting = false;
14027						that._addClass( selectee.$element, "ui-selected" );
14028						selectee.selected = true;
14029					} else {
14030						that._removeClass( selectee.$element, "ui-selecting" );
14031						selectee.selecting = false;
14032						if ( selectee.startselected ) {
14033							that._addClass( selectee.$element, "ui-unselecting" );
14034							selectee.unselecting = true;
14035						}
14036
14037						// selectable UNSELECTING callback
14038						that._trigger( "unselecting", event, {
14039							unselecting: selectee.element
14040						} );
14041					}
14042				}
14043				if ( selectee.selected ) {
14044					if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
14045						that._removeClass( selectee.$element, "ui-selected" );
14046						selectee.selected = false;
14047
14048						that._addClass( selectee.$element, "ui-unselecting" );
14049						selectee.unselecting = true;
14050
14051						// selectable UNSELECTING callback
14052						that._trigger( "unselecting", event, {
14053							unselecting: selectee.element
14054						} );
14055					}
14056				}
14057			}
14058		} );
14059
14060		return false;
14061	},
14062
14063	_mouseStop: function( event ) {
14064		var that = this;
14065
14066		this.dragged = false;
14067
14068		$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
14069			var selectee = $.data( this, "selectable-item" );
14070			that._removeClass( selectee.$element, "ui-unselecting" );
14071			selectee.unselecting = false;
14072			selectee.startselected = false;
14073			that._trigger( "unselected", event, {
14074				unselected: selectee.element
14075			} );
14076		} );
14077		$( ".ui-selecting", this.element[ 0 ] ).each( function() {
14078			var selectee = $.data( this, "selectable-item" );
14079			that._removeClass( selectee.$element, "ui-selecting" )
14080				._addClass( selectee.$element, "ui-selected" );
14081			selectee.selecting = false;
14082			selectee.selected = true;
14083			selectee.startselected = true;
14084			that._trigger( "selected", event, {
14085				selected: selectee.element
14086			} );
14087		} );
14088		this._trigger( "stop", event );
14089
14090		this.helper.remove();
14091
14092		return false;
14093	}
14094
14095} );
14096
14097
14098/*!
14099 * jQuery UI Selectmenu 1.13.2
14100 * http://jqueryui.com
vendor: 5,542 bytes, lines 14101-14306
14101 *
14102 * Copyright jQuery Foundation and other contributors
14103 * Released under the MIT license.
14104 * http://jquery.org/license
14105 */
14106
14107//>>label: Selectmenu
14108//>>group: Widgets
14109/* eslint-disable max-len */
14110//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
14111/* eslint-enable max-len */
14112//>>docs: http://api.jqueryui.com/selectmenu/
14113//>>demos: http://jqueryui.com/selectmenu/
14114//>>css.structure: ../../themes/base/core.css
14115//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
14116//>>css.theme: ../../themes/base/theme.css
14117
14118
14119var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
14120	version: "1.13.2",
14121	defaultElement: "<select>",
14122	options: {
14123		appendTo: null,
14124		classes: {
14125			"ui-selectmenu-button-open": "ui-corner-top",
14126			"ui-selectmenu-button-closed": "ui-corner-all"
14127		},
14128		disabled: null,
14129		icons: {
14130			button: "ui-icon-triangle-1-s"
14131		},
14132		position: {
14133			my: "left top",
14134			at: "left bottom",
14135			collision: "none"
14136		},
14137		width: false,
14138
14139		// Callbacks
14140		change: null,
14141		close: null,
14142		focus: null,
14143		open: null,
14144		select: null
14145	},
14146
14147	_create: function() {
14148		var selectmenuId = this.element.uniqueId().attr( "id" );
14149		this.ids = {
14150			element: selectmenuId,
14151			button: selectmenuId + "-button",
14152			menu: selectmenuId + "-menu"
14153		};
14154
14155		this._drawButton();
14156		this._drawMenu();
14157		this._bindFormResetHandler();
14158
14159		this._rendered = false;
14160		this.menuItems = $();
14161	},
14162
14163	_drawButton: function() {
14164		var icon,
14165			that = this,
14166			item = this._parseOption(
14167				this.element.find( "option:selected" ),
14168				this.element[ 0 ].selectedIndex
14169			);
14170
14171		// Associate existing label with the new button
14172		this.labels = this.element.labels().attr( "for", this.ids.button );
14173		this._on( this.labels, {
14174			click: function( event ) {
14175				this.button.trigger( "focus" );
14176				event.preventDefault();
14177			}
14178		} );
14179
14180		// Hide original select element
14181		this.element.hide();
14182
14183		// Create button
14184		this.button = $( "<span>", {
14185			tabindex: this.options.disabled ? -1 : 0,
14186			id: this.ids.button,
14187			role: "combobox",
14188			"aria-expanded": "false",
14189			"aria-autocomplete": "list",
14190			"aria-owns": this.ids.menu,
14191			"aria-haspopup": "true",
14192			title: this.element.attr( "title" )
14193		} )
14194			.insertAfter( this.element );
14195
14196		this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
14197			"ui-button ui-widget" );
14198
14199		icon = $( "<span>" ).appendTo( this.button );
14200		this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
14201		this.buttonItem = this._renderButtonItem( item )
14202			.appendTo( this.button );
14203
14204		if ( this.options.width !== false ) {
14205			this._resizeButton();
14206		}
14207
14208		this._on( this.button, this._buttonEvents );
14209		this.button.one( "focusin", function() {
14210
14211			// Delay rendering the menu items until the button receives focus.
14212			// The menu may have already been rendered via a programmatic open.
14213			if ( !that._rendered ) {
14214				that._refreshMenu();
14215			}
14216		} );
14217	},
14218
14219	_drawMenu: function() {
14220		var that = this;
14221
14222		// Create menu
14223		this.menu = $( "<ul>", {
14224			"aria-hidden": "true",
14225			"aria-labelledby": this.ids.button,
14226			id: this.ids.menu
14227		} );
14228
14229		// Wrap menu
14230		this.menuWrap = $( "<div>" ).append( this.menu );
14231		this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
14232		this.menuWrap.appendTo( this._appendTo() );
14233
14234		// Initialize menu widget
14235		this.menuInstance = this.menu
14236			.menu( {
14237				classes: {
14238					"ui-menu": "ui-corner-bottom"
14239				},
14240				role: "listbox",
14241				select: function( event, ui ) {
14242					event.preventDefault();
14243
14244					// Support: IE8
14245					// If the item was selected via a click, the text selection
14246					// will be destroyed in IE
14247					that._setSelection();
14248
14249					that._select( ui.item.data( "ui-selectmenu-item" ), event );
14250				},
14251				focus: function( event, ui ) {
14252					var item = ui.item.data( "ui-selectmenu-item" );
14253
14254					// Prevent inital focus from firing and check if its a newly focused item
14255					if ( that.focusIndex != null && item.index !== that.focusIndex ) {
14256						that._trigger( "focus", event, { item: item } );
14257						if ( !that.isOpen ) {
14258							that._select( item, event );
14259						}
14260					}
14261					that.focusIndex = item.index;
14262
14263					that.button.attr( "aria-activedescendant",
14264						that.menuItems.eq( item.index ).attr( "id" ) );
14265				}
14266			} )
14267			.menu( "instance" );
14268
14269		// Don't close the menu on mouseleave
14270		this.menuInstance._off( this.menu, "mouseleave" );
14271
14272		// Cancel the menu's collapseAll on document click
14273		this.menuInstance._closeOnDocumentClick = function() {
14274			return false;
14275		};
14276
14277		// Selects often contain empty items, but never contain dividers
14278		this.menuInstance._isDivider = function() {
14279			return false;
14280		};
14281	},
14282
14283	refresh: function() {
14284		this._refreshMenu();
14285		this.buttonItem.replaceWith(
14286			this.buttonItem = this._renderButtonItem(
14287
14288				// Fall back to an empty object in case there are no options
14289				this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
14290			)
14291		);
14292		if ( this.options.width === null ) {
14293			this._resizeButton();
14294		}
14295	},
14296
14297	_refreshMenu: function() {
14298		var item,
14299			options = this.element.find( "option" );
14300
14301		this.menu.empty();
14302
14303		this._parseOptions( options );
14304		this._renderMenu( this.menu, this.items );
14305
14306		this.menuInstance.refresh();
vendor: 4,148 bytes, lines 14307-14489
14307		this.menuItems = this.menu.find( "li" )
14308			.not( ".ui-selectmenu-optgroup" )
14309				.find( ".ui-menu-item-wrapper" );
14310
14311		this._rendered = true;
14312
14313		if ( !options.length ) {
14314			return;
14315		}
14316
14317		item = this._getSelectedItem();
14318
14319		// Update the menu to have the correct item focused
14320		this.menuInstance.focus( null, item );
14321		this._setAria( item.data( "ui-selectmenu-item" ) );
14322
14323		// Set disabled state
14324		this._setOption( "disabled", this.element.prop( "disabled" ) );
14325	},
14326
14327	open: function( event ) {
14328		if ( this.options.disabled ) {
14329			return;
14330		}
14331
14332		// If this is the first time the menu is being opened, render the items
14333		if ( !this._rendered ) {
14334			this._refreshMenu();
14335		} else {
14336
14337			// Menu clears focus on close, reset focus to selected item
14338			this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
14339			this.menuInstance.focus( null, this._getSelectedItem() );
14340		}
14341
14342		// If there are no options, don't open the menu
14343		if ( !this.menuItems.length ) {
14344			return;
14345		}
14346
14347		this.isOpen = true;
14348		this._toggleAttr();
14349		this._resizeMenu();
14350		this._position();
14351
14352		this._on( this.document, this._documentClick );
14353
14354		this._trigger( "open", event );
14355	},
14356
14357	_position: function() {
14358		this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
14359	},
14360
14361	close: function( event ) {
14362		if ( !this.isOpen ) {
14363			return;
14364		}
14365
14366		this.isOpen = false;
14367		this._toggleAttr();
14368
14369		this.range = null;
14370		this._off( this.document );
14371
14372		this._trigger( "close", event );
14373	},
14374
14375	widget: function() {
14376		return this.button;
14377	},
14378
14379	menuWidget: function() {
14380		return this.menu;
14381	},
14382
14383	_renderButtonItem: function( item ) {
14384		var buttonItem = $( "<span>" );
14385
14386		this._setText( buttonItem, item.label );
14387		this._addClass( buttonItem, "ui-selectmenu-text" );
14388
14389		return buttonItem;
14390	},
14391
14392	_renderMenu: function( ul, items ) {
14393		var that = this,
14394			currentOptgroup = "";
14395
14396		$.each( items, function( index, item ) {
14397			var li;
14398
14399			if ( item.optgroup !== currentOptgroup ) {
14400				li = $( "<li>", {
14401					text: item.optgroup
14402				} );
14403				that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
14404					( item.element.parent( "optgroup" ).prop( "disabled" ) ?
14405						" ui-state-disabled" :
14406						"" ) );
14407
14408				li.appendTo( ul );
14409
14410				currentOptgroup = item.optgroup;
14411			}
14412
14413			that._renderItemData( ul, item );
14414		} );
14415	},
14416
14417	_renderItemData: function( ul, item ) {
14418		return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
14419	},
14420
14421	_renderItem: function( ul, item ) {
14422		var li = $( "<li>" ),
14423			wrapper = $( "<div>", {
14424				title: item.element.attr( "title" )
14425			} );
14426
14427		if ( item.disabled ) {
14428			this._addClass( li, null, "ui-state-disabled" );
14429		}
14430		this._setText( wrapper, item.label );
14431
14432		return li.append( wrapper ).appendTo( ul );
14433	},
14434
14435	_setText: function( element, value ) {
14436		if ( value ) {
14437			element.text( value );
14438		} else {
14439			element.html( "&#160;" );
14440		}
14441	},
14442
14443	_move: function( direction, event ) {
14444		var item, next,
14445			filter = ".ui-menu-item";
14446
14447		if ( this.isOpen ) {
14448			item = this.menuItems.eq( this.focusIndex ).parent( "li" );
14449		} else {
14450			item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
14451			filter += ":not(.ui-state-disabled)";
14452		}
14453
14454		if ( direction === "first" || direction === "last" ) {
14455			next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
14456		} else {
14457			next = item[ direction + "All" ]( filter ).eq( 0 );
14458		}
14459
14460		if ( next.length ) {
14461			this.menuInstance.focus( event, next );
14462		}
14463	},
14464
14465	_getSelectedItem: function() {
14466		return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
14467	},
14468
14469	_toggle: function( event ) {
14470		this[ this.isOpen ? "close" : "open" ]( event );
14471	},
14472
14473	_setSelection: function() {
14474		var selection;
14475
14476		if ( !this.range ) {
14477			return;
14478		}
14479
14480		if ( window.getSelection ) {
14481			selection = window.getSelection();
14482			selection.removeAllRanges();
14483			selection.addRange( this.range );
14484
14485		// Support: IE8
14486		} else {
14487			this.range.select();
14488		}
14489
vendor: 11,066 bytes, lines 14490-14931
14490		// Support: IE
14491		// Setting the text selection kills the button focus in IE, but
14492		// restoring the focus doesn't kill the selection.
14493		this.button.trigger( "focus" );
14494	},
14495
14496	_documentClick: {
14497		mousedown: function( event ) {
14498			if ( !this.isOpen ) {
14499				return;
14500			}
14501
14502			if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
14503				$.escapeSelector( this.ids.button ) ).length ) {
14504				this.close( event );
14505			}
14506		}
14507	},
14508
14509	_buttonEvents: {
14510
14511		// Prevent text selection from being reset when interacting with the selectmenu (#10144)
14512		mousedown: function() {
14513			var selection;
14514
14515			if ( window.getSelection ) {
14516				selection = window.getSelection();
14517				if ( selection.rangeCount ) {
14518					this.range = selection.getRangeAt( 0 );
14519				}
14520
14521			// Support: IE8
14522			} else {
14523				this.range = document.selection.createRange();
14524			}
14525		},
14526
14527		click: function( event ) {
14528			this._setSelection();
14529			this._toggle( event );
14530		},
14531
14532		keydown: function( event ) {
14533			var preventDefault = true;
14534			switch ( event.keyCode ) {
14535			case $.ui.keyCode.TAB:
14536			case $.ui.keyCode.ESCAPE:
14537				this.close( event );
14538				preventDefault = false;
14539				break;
14540			case $.ui.keyCode.ENTER:
14541				if ( this.isOpen ) {
14542					this._selectFocusedItem( event );
14543				}
14544				break;
14545			case $.ui.keyCode.UP:
14546				if ( event.altKey ) {
14547					this._toggle( event );
14548				} else {
14549					this._move( "prev", event );
14550				}
14551				break;
14552			case $.ui.keyCode.DOWN:
14553				if ( event.altKey ) {
14554					this._toggle( event );
14555				} else {
14556					this._move( "next", event );
14557				}
14558				break;
14559			case $.ui.keyCode.SPACE:
14560				if ( this.isOpen ) {
14561					this._selectFocusedItem( event );
14562				} else {
14563					this._toggle( event );
14564				}
14565				break;
14566			case $.ui.keyCode.LEFT:
14567				this._move( "prev", event );
14568				break;
14569			case $.ui.keyCode.RIGHT:
14570				this._move( "next", event );
14571				break;
14572			case $.ui.keyCode.HOME:
14573			case $.ui.keyCode.PAGE_UP:
14574				this._move( "first", event );
14575				break;
14576			case $.ui.keyCode.END:
14577			case $.ui.keyCode.PAGE_DOWN:
14578				this._move( "last", event );
14579				break;
14580			default:
14581				this.menu.trigger( event );
14582				preventDefault = false;
14583			}
14584
14585			if ( preventDefault ) {
14586				event.preventDefault();
14587			}
14588		}
14589	},
14590
14591	_selectFocusedItem: function( event ) {
14592		var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
14593		if ( !item.hasClass( "ui-state-disabled" ) ) {
14594			this._select( item.data( "ui-selectmenu-item" ), event );
14595		}
14596	},
14597
14598	_select: function( item, event ) {
14599		var oldIndex = this.element[ 0 ].selectedIndex;
14600
14601		// Change native select element
14602		this.element[ 0 ].selectedIndex = item.index;
14603		this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
14604		this._setAria( item );
14605		this._trigger( "select", event, { item: item } );
14606
14607		if ( item.index !== oldIndex ) {
14608			this._trigger( "change", event, { item: item } );
14609		}
14610
14611		this.close( event );
14612	},
14613
14614	_setAria: function( item ) {
14615		var id = this.menuItems.eq( item.index ).attr( "id" );
14616
14617		this.button.attr( {
14618			"aria-labelledby": id,
14619			"aria-activedescendant": id
14620		} );
14621		this.menu.attr( "aria-activedescendant", id );
14622	},
14623
14624	_setOption: function( key, value ) {
14625		if ( key === "icons" ) {
14626			var icon = this.button.find( "span.ui-icon" );
14627			this._removeClass( icon, null, this.options.icons.button )
14628				._addClass( icon, null, value.button );
14629		}
14630
14631		this._super( key, value );
14632
14633		if ( key === "appendTo" ) {
14634			this.menuWrap.appendTo( this._appendTo() );
14635		}
14636
14637		if ( key === "width" ) {
14638			this._resizeButton();
14639		}
14640	},
14641
14642	_setOptionDisabled: function( value ) {
14643		this._super( value );
14644
14645		this.menuInstance.option( "disabled", value );
14646		this.button.attr( "aria-disabled", value );
14647		this._toggleClass( this.button, null, "ui-state-disabled", value );
14648
14649		this.element.prop( "disabled", value );
14650		if ( value ) {
14651			this.button.attr( "tabindex", -1 );
14652			this.close();
14653		} else {
14654			this.button.attr( "tabindex", 0 );
14655		}
14656	},
14657
14658	_appendTo: function() {
14659		var element = this.options.appendTo;
14660
14661		if ( element ) {
14662			element = element.jquery || element.nodeType ?
14663				$( element ) :
14664				this.document.find( element ).eq( 0 );
14665		}
14666
14667		if ( !element || !element[ 0 ] ) {
14668			element = this.element.closest( ".ui-front, dialog" );
14669		}
14670
14671		if ( !element.length ) {
14672			element = this.document[ 0 ].body;
14673		}
14674
14675		return element;
14676	},
14677
14678	_toggleAttr: function() {
14679		this.button.attr( "aria-expanded", this.isOpen );
14680
14681		// We can't use two _toggleClass() calls here, because we need to make sure
14682		// we always remove classes first and add them second, otherwise if both classes have the
14683		// same theme class, it will be removed after we add it.
14684		this._removeClass( this.button, "ui-selectmenu-button-" +
14685			( this.isOpen ? "closed" : "open" ) )
14686			._addClass( this.button, "ui-selectmenu-button-" +
14687				( this.isOpen ? "open" : "closed" ) )
14688			._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
14689
14690		this.menu.attr( "aria-hidden", !this.isOpen );
14691	},
14692
14693	_resizeButton: function() {
14694		var width = this.options.width;
14695
14696		// For `width: false`, just remove inline style and stop
14697		if ( width === false ) {
14698			this.button.css( "width", "" );
14699			return;
14700		}
14701
14702		// For `width: null`, match the width of the original element
14703		if ( width === null ) {
14704			width = this.element.show().outerWidth();
14705			this.element.hide();
14706		}
14707
14708		this.button.outerWidth( width );
14709	},
14710
14711	_resizeMenu: function() {
14712		this.menu.outerWidth( Math.max(
14713			this.button.outerWidth(),
14714
14715			// Support: IE10
14716			// IE10 wraps long text (possibly a rounding bug)
14717			// so we add 1px to avoid the wrapping
14718			this.menu.width( "" ).outerWidth() + 1
14719		) );
14720	},
14721
14722	_getCreateOptions: function() {
14723		var options = this._super();
14724
14725		options.disabled = this.element.prop( "disabled" );
14726
14727		return options;
14728	},
14729
14730	_parseOptions: function( options ) {
14731		var that = this,
14732			data = [];
14733		options.each( function( index, item ) {
14734			if ( item.hidden ) {
14735				return;
14736			}
14737
14738			data.push( that._parseOption( $( item ), index ) );
14739		} );
14740		this.items = data;
14741	},
14742
14743	_parseOption: function( option, index ) {
14744		var optgroup = option.parent( "optgroup" );
14745
14746		return {
14747			element: option,
14748			index: index,
14749			value: option.val(),
14750			label: option.text(),
14751			optgroup: optgroup.attr( "label" ) || "",
14752			disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
14753		};
14754	},
14755
14756	_destroy: function() {
14757		this._unbindFormResetHandler();
14758		this.menuWrap.remove();
14759		this.button.remove();
14760		this.element.show();
14761		this.element.removeUniqueId();
14762		this.labels.attr( "for", this.ids.element );
14763	}
14764} ] );
14765
14766
14767/*!
14768 * jQuery UI Slider 1.13.2
14769 * http://jqueryui.com
14770 *
14771 * Copyright jQuery Foundation and other contributors
14772 * Released under the MIT license.
14773 * http://jquery.org/license
14774 */
14775
14776//>>label: Slider
14777//>>group: Widgets
14778//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
14779//>>docs: http://api.jqueryui.com/slider/
14780//>>demos: http://jqueryui.com/slider/
14781//>>css.structure: ../../themes/base/core.css
14782//>>css.structure: ../../themes/base/slider.css
14783//>>css.theme: ../../themes/base/theme.css
14784
14785
14786var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
14787	version: "1.13.2",
14788	widgetEventPrefix: "slide",
14789
14790	options: {
14791		animate: false,
14792		classes: {
14793			"ui-slider": "ui-corner-all",
14794			"ui-slider-handle": "ui-corner-all",
14795
14796			// Note: ui-widget-header isn't the most fittingly semantic framework class for this
14797			// element, but worked best visually with a variety of themes
14798			"ui-slider-range": "ui-corner-all ui-widget-header"
14799		},
14800		distance: 0,
14801		max: 100,
14802		min: 0,
14803		orientation: "horizontal",
14804		range: false,
14805		step: 1,
14806		value: 0,
14807		values: null,
14808
14809		// Callbacks
14810		change: null,
14811		slide: null,
14812		start: null,
14813		stop: null
14814	},
14815
14816	// Number of pages in a slider
14817	// (how many times can you page up/down to go through the whole range)
14818	numPages: 5,
14819
14820	_create: function() {
14821		this._keySliding = false;
14822		this._mouseSliding = false;
14823		this._animateOff = true;
14824		this._handleIndex = null;
14825		this._detectOrientation();
14826		this._mouseInit();
14827		this._calculateNewMax();
14828
14829		this._addClass( "ui-slider ui-slider-" + this.orientation,
14830			"ui-widget ui-widget-content" );
14831
14832		this._refresh();
14833
14834		this._animateOff = false;
14835	},
14836
14837	_refresh: function() {
14838		this._createRange();
14839		this._createHandles();
14840		this._setupEvents();
14841		this._refreshValue();
14842	},
14843
14844	_createHandles: function() {
14845		var i, handleCount,
14846			options = this.options,
14847			existingHandles = this.element.find( ".ui-slider-handle" ),
14848			handle = "<span tabindex='0'></span>",
14849			handles = [];
14850
14851		handleCount = ( options.values && options.values.length ) || 1;
14852
14853		if ( existingHandles.length > handleCount ) {
14854			existingHandles.slice( handleCount ).remove();
14855			existingHandles = existingHandles.slice( 0, handleCount );
14856		}
14857
14858		for ( i = existingHandles.length; i < handleCount; i++ ) {
14859			handles.push( handle );
14860		}
14861
14862		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
14863
14864		this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
14865
14866		this.handle = this.handles.eq( 0 );
14867
14868		this.handles.each( function( i ) {
14869			$( this )
14870				.data( "ui-slider-handle-index", i )
14871				.attr( "tabIndex", 0 );
14872		} );
14873	},
14874
14875	_createRange: function() {
14876		var options = this.options;
14877
14878		if ( options.range ) {
14879			if ( options.range === true ) {
14880				if ( !options.values ) {
14881					options.values = [ this._valueMin(), this._valueMin() ];
14882				} else if ( options.values.length && options.values.length !== 2 ) {
14883					options.values = [ options.values[ 0 ], options.values[ 0 ] ];
14884				} else if ( Array.isArray( options.values ) ) {
14885					options.values = options.values.slice( 0 );
14886				}
14887			}
14888
14889			if ( !this.range || !this.range.length ) {
14890				this.range = $( "<div>" )
14891					.appendTo( this.element );
14892
14893				this._addClass( this.range, "ui-slider-range" );
14894			} else {
14895				this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
14896
14897				// Handle range switching from true to min/max
14898				this.range.css( {
14899					"left": "",
14900					"bottom": ""
14901				} );
14902			}
14903			if ( options.range === "min" || options.range === "max" ) {
14904				this._addClass( this.range, "ui-slider-range-" + options.range );
14905			}
14906		} else {
14907			if ( this.range ) {
14908				this.range.remove();
14909			}
14910			this.range = null;
14911		}
14912	},
14913
14914	_setupEvents: function() {
14915		this._off( this.handles );
14916		this._on( this.handles, this._handleEvents );
14917		this._hoverable( this.handles );
14918		this._focusable( this.handles );
14919	},
14920
14921	_destroy: function() {
14922		this.handles.remove();
14923		if ( this.range ) {
14924			this.range.remove();
14925		}
14926
14927		this._mouseDestroy();
14928	},
14929
14930	_mouseCapture: function( event ) {
14931		var position, normValue, distance, closestHandle, index, allowed, offset, mou
vendor: 22,163 bytes, lines 14931-15757
14931seOverHandle,
14932			that = this,
14933			o = this.options;
14934
14935		if ( o.disabled ) {
14936			return false;
14937		}
14938
14939		this.elementSize = {
14940			width: this.element.outerWidth(),
14941			height: this.element.outerHeight()
14942		};
14943		this.elementOffset = this.element.offset();
14944
14945		position = { x: event.pageX, y: event.pageY };
14946		normValue = this._normValueFromMouse( position );
14947		distance = this._valueMax() - this._valueMin() + 1;
14948		this.handles.each( function( i ) {
14949			var thisDistance = Math.abs( normValue - that.values( i ) );
14950			if ( ( distance > thisDistance ) ||
14951				( distance === thisDistance &&
14952					( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
14953				distance = thisDistance;
14954				closestHandle = $( this );
14955				index = i;
14956			}
14957		} );
14958
14959		allowed = this._start( event, index );
14960		if ( allowed === false ) {
14961			return false;
14962		}
14963		this._mouseSliding = true;
14964
14965		this._handleIndex = index;
14966
14967		this._addClass( closestHandle, null, "ui-state-active" );
14968		closestHandle.trigger( "focus" );
14969
14970		offset = closestHandle.offset();
14971		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
14972		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
14973			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
14974			top: event.pageY - offset.top -
14975				( closestHandle.height() / 2 ) -
14976				( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
14977				( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
14978				( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
14979		};
14980
14981		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
14982			this._slide( event, index, normValue );
14983		}
14984		this._animateOff = true;
14985		return true;
14986	},
14987
14988	_mouseStart: function() {
14989		return true;
14990	},
14991
14992	_mouseDrag: function( event ) {
14993		var position = { x: event.pageX, y: event.pageY },
14994			normValue = this._normValueFromMouse( position );
14995
14996		this._slide( event, this._handleIndex, normValue );
14997
14998		return false;
14999	},
15000
15001	_mouseStop: function( event ) {
15002		this._removeClass( this.handles, null, "ui-state-active" );
15003		this._mouseSliding = false;
15004
15005		this._stop( event, this._handleIndex );
15006		this._change( event, this._handleIndex );
15007
15008		this._handleIndex = null;
15009		this._clickOffset = null;
15010		this._animateOff = false;
15011
15012		return false;
15013	},
15014
15015	_detectOrientation: function() {
15016		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
15017	},
15018
15019	_normValueFromMouse: function( position ) {
15020		var pixelTotal,
15021			pixelMouse,
15022			percentMouse,
15023			valueTotal,
15024			valueMouse;
15025
15026		if ( this.orientation === "horizontal" ) {
15027			pixelTotal = this.elementSize.width;
15028			pixelMouse = position.x - this.elementOffset.left -
15029				( this._clickOffset ? this._clickOffset.left : 0 );
15030		} else {
15031			pixelTotal = this.elementSize.height;
15032			pixelMouse = position.y - this.elementOffset.top -
15033				( this._clickOffset ? this._clickOffset.top : 0 );
15034		}
15035
15036		percentMouse = ( pixelMouse / pixelTotal );
15037		if ( percentMouse > 1 ) {
15038			percentMouse = 1;
15039		}
15040		if ( percentMouse < 0 ) {
15041			percentMouse = 0;
15042		}
15043		if ( this.orientation === "vertical" ) {
15044			percentMouse = 1 - percentMouse;
15045		}
15046
15047		valueTotal = this._valueMax() - this._valueMin();
15048		valueMouse = this._valueMin() + percentMouse * valueTotal;
15049
15050		return this._trimAlignValue( valueMouse );
15051	},
15052
15053	_uiHash: function( index, value, values ) {
15054		var uiHash = {
15055			handle: this.handles[ index ],
15056			handleIndex: index,
15057			value: value !== undefined ? value : this.value()
15058		};
15059
15060		if ( this._hasMultipleValues() ) {
15061			uiHash.value = value !== undefined ? value : this.values( index );
15062			uiHash.values = values || this.values();
15063		}
15064
15065		return uiHash;
15066	},
15067
15068	_hasMultipleValues: function() {
15069		return this.options.values && this.options.values.length;
15070	},
15071
15072	_start: function( event, index ) {
15073		return this._trigger( "start", event, this._uiHash( index ) );
15074	},
15075
15076	_slide: function( event, index, newVal ) {
15077		var allowed, otherVal,
15078			currentValue = this.value(),
15079			newValues = this.values();
15080
15081		if ( this._hasMultipleValues() ) {
15082			otherVal = this.values( index ? 0 : 1 );
15083			currentValue = this.values( index );
15084
15085			if ( this.options.values.length === 2 && this.options.range === true ) {
15086				newVal =  index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
15087			}
15088
15089			newValues[ index ] = newVal;
15090		}
15091
15092		if ( newVal === currentValue ) {
15093			return;
15094		}
15095
15096		allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
15097
15098		// A slide can be canceled by returning false from the slide callback
15099		if ( allowed === false ) {
15100			return;
15101		}
15102
15103		if ( this._hasMultipleValues() ) {
15104			this.values( index, newVal );
15105		} else {
15106			this.value( newVal );
15107		}
15108	},
15109
15110	_stop: function( event, index ) {
15111		this._trigger( "stop", event, this._uiHash( index ) );
15112	},
15113
15114	_change: function( event, index ) {
15115		if ( !this._keySliding && !this._mouseSliding ) {
15116
15117			//store the last changed value index for reference when handles overlap
15118			this._lastChangedValue = index;
15119			this._trigger( "change", event, this._uiHash( index ) );
15120		}
15121	},
15122
15123	value: function( newValue ) {
15124		if ( arguments.length ) {
15125			this.options.value = this._trimAlignValue( newValue );
15126			this._refreshValue();
15127			this._change( null, 0 );
15128			return;
15129		}
15130
15131		return this._value();
15132	},
15133
15134	values: function( index, newValue ) {
15135		var vals,
15136			newValues,
15137			i;
15138
15139		if ( arguments.length > 1 ) {
15140			this.options.values[ index ] = this._trimAlignValue( newValue );
15141			this._refreshValue();
15142			this._change( null, index );
15143			return;
15144		}
15145
15146		if ( arguments.length ) {
15147			if ( Array.isArray( arguments[ 0 ] ) ) {
15148				vals = this.options.values;
15149				newValues = arguments[ 0 ];
15150				for ( i = 0; i < vals.length; i += 1 ) {
15151					vals[ i ] = this._trimAlignValue( newValues[ i ] );
15152					this._change( null, i );
15153				}
15154				this._refreshValue();
15155			} else {
15156				if ( this._hasMultipleValues() ) {
15157					return this._values( index );
15158				} else {
15159					return this.value();
15160				}
15161			}
15162		} else {
15163			return this._values();
15164		}
15165	},
15166
15167	_setOption: function( key, value ) {
15168		var i,
15169			valsLength = 0;
15170
15171		if ( key === "range" && this.options.range === true ) {
15172			if ( value === "min" ) {
15173				this.options.value = this._values( 0 );
15174				this.options.values = null;
15175			} else if ( value === "max" ) {
15176				this.options.value = this._values( this.options.values.length - 1 );
15177				this.options.values = null;
15178			}
15179		}
15180
15181		if ( Array.isArray( this.options.values ) ) {
15182			valsLength = this.options.values.length;
15183		}
15184
15185		this._super( key, value );
15186
15187		switch ( key ) {
15188			case "orientation":
15189				this._detectOrientation();
15190				this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
15191					._addClass( "ui-slider-" + this.orientation );
15192				this._refreshValue();
15193				if ( this.options.range ) {
15194					this._refreshRange( value );
15195				}
15196
15197				// Reset positioning from previous orientation
15198				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
15199				break;
15200			case "value":
15201				this._animateOff = true;
15202				this._refreshValue();
15203				this._change( null, 0 );
15204				this._animateOff = false;
15205				break;
15206			case "values":
15207				this._animateOff = true;
15208				this._refreshValue();
15209
15210				// Start from the last handle to prevent unreachable handles (#9046)
15211				for ( i = valsLength - 1; i >= 0; i-- ) {
15212					this._change( null, i );
15213				}
15214				this._animateOff = false;
15215				break;
15216			case "step":
15217			case "min":
15218			case "max":
15219				this._animateOff = true;
15220				this._calculateNewMax();
15221				this._refreshValue();
15222				this._animateOff = false;
15223				break;
15224			case "range":
15225				this._animateOff = true;
15226				this._refresh();
15227				this._animateOff = false;
15228				break;
15229		}
15230	},
15231
15232	_setOptionDisabled: function( value ) {
15233		this._super( value );
15234
15235		this._toggleClass( null, "ui-state-disabled", !!value );
15236	},
15237
15238	//internal value getter
15239	// _value() returns value trimmed by min and max, aligned by step
15240	_value: function() {
15241		var val = this.options.value;
15242		val = this._trimAlignValue( val );
15243
15244		return val;
15245	},
15246
15247	//internal values getter
15248	// _values() returns array of values trimmed by min and max, aligned by step
15249	// _values( index ) returns single value trimmed by min and max, aligned by step
15250	_values: function( index ) {
15251		var val,
15252			vals,
15253			i;
15254
15255		if ( arguments.length ) {
15256			val = this.options.values[ index ];
15257			val = this._trimAlignValue( val );
15258
15259			return val;
15260		} else if ( this._hasMultipleValues() ) {
15261
15262			// .slice() creates a copy of the array
15263			// this copy gets trimmed by min and max and then returned
15264			vals = this.options.values.slice();
15265			for ( i = 0; i < vals.length; i += 1 ) {
15266				vals[ i ] = this._trimAlignValue( vals[ i ] );
15267			}
15268
15269			return vals;
15270		} else {
15271			return [];
15272		}
15273	},
15274
15275	// Returns the step-aligned value that val is closest to, between (inclusive) min and max
15276	_trimAlignValue: function( val ) {
15277		if ( val <= this._valueMin() ) {
15278			return this._valueMin();
15279		}
15280		if ( val >= this._valueMax() ) {
15281			return this._valueMax();
15282		}
15283		var step = ( this.options.step > 0 ) ? this.options.step : 1,
15284			valModStep = ( val - this._valueMin() ) % step,
15285			alignValue = val - valModStep;
15286
15287		if ( Math.abs( valModStep ) * 2 >= step ) {
15288			alignValue += ( valModStep > 0 ) ? step : ( -step );
15289		}
15290
15291		// Since JavaScript has problems with large floats, round
15292		// the final value to 5 digits after the decimal point (see #4124)
15293		return parseFloat( alignValue.toFixed( 5 ) );
15294	},
15295
15296	_calculateNewMax: function() {
15297		var max = this.options.max,
15298			min = this._valueMin(),
15299			step = this.options.step,
15300			aboveMin = Math.round( ( max - min ) / step ) * step;
15301		max = aboveMin + min;
15302		if ( max > this.options.max ) {
15303
15304			//If max is not divisible by step, rounding off may increase its value
15305			max -= step;
15306		}
15307		this.max = parseFloat( max.toFixed( this._precision() ) );
15308	},
15309
15310	_precision: function() {
15311		var precision = this._precisionOf( this.options.step );
15312		if ( this.options.min !== null ) {
15313			precision = Math.max( precision, this._precisionOf( this.options.min ) );
15314		}
15315		return precision;
15316	},
15317
15318	_precisionOf: function( num ) {
15319		var str = num.toString(),
15320			decimal = str.indexOf( "." );
15321		return decimal === -1 ? 0 : str.length - decimal - 1;
15322	},
15323
15324	_valueMin: function() {
15325		return this.options.min;
15326	},
15327
15328	_valueMax: function() {
15329		return this.max;
15330	},
15331
15332	_refreshRange: function( orientation ) {
15333		if ( orientation === "vertical" ) {
15334			this.range.css( { "width": "", "left": "" } );
15335		}
15336		if ( orientation === "horizontal" ) {
15337			this.range.css( { "height": "", "bottom": "" } );
15338		}
15339	},
15340
15341	_refreshValue: function() {
15342		var lastValPercent, valPercent, value, valueMin, valueMax,
15343			oRange = this.options.range,
15344			o = this.options,
15345			that = this,
15346			animate = ( !this._animateOff ) ? o.animate : false,
15347			_set = {};
15348
15349		if ( this._hasMultipleValues() ) {
15350			this.handles.each( function( i ) {
15351				valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
15352					that._valueMin() ) * 100;
15353				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
15354				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
15355				if ( that.options.range === true ) {
15356					if ( that.orientation === "horizontal" ) {
15357						if ( i === 0 ) {
15358							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15359								left: valPercent + "%"
15360							}, o.animate );
15361						}
15362						if ( i === 1 ) {
15363							that.range[ animate ? "animate" : "css" ]( {
15364								width: ( valPercent - lastValPercent ) + "%"
15365							}, {
15366								queue: false,
15367								duration: o.animate
15368							} );
15369						}
15370					} else {
15371						if ( i === 0 ) {
15372							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15373								bottom: ( valPercent ) + "%"
15374							}, o.animate );
15375						}
15376						if ( i === 1 ) {
15377							that.range[ animate ? "animate" : "css" ]( {
15378								height: ( valPercent - lastValPercent ) + "%"
15379							}, {
15380								queue: false,
15381								duration: o.animate
15382							} );
15383						}
15384					}
15385				}
15386				lastValPercent = valPercent;
15387			} );
15388		} else {
15389			value = this.value();
15390			valueMin = this._valueMin();
15391			valueMax = this._valueMax();
15392			valPercent = ( valueMax !== valueMin ) ?
15393					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
15394					0;
15395			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
15396			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
15397
15398			if ( oRange === "min" && this.orientation === "horizontal" ) {
15399				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15400					width: valPercent + "%"
15401				}, o.animate );
15402			}
15403			if ( oRange === "max" && this.orientation === "horizontal" ) {
15404				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15405					width: ( 100 - valPercent ) + "%"
15406				}, o.animate );
15407			}
15408			if ( oRange === "min" && this.orientation === "vertical" ) {
15409				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15410					height: valPercent + "%"
15411				}, o.animate );
15412			}
15413			if ( oRange === "max" && this.orientation === "vertical" ) {
15414				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15415					height: ( 100 - valPercent ) + "%"
15416				}, o.animate );
15417			}
15418		}
15419	},
15420
15421	_handleEvents: {
15422		keydown: function( event ) {
15423			var allowed, curVal, newVal, step,
15424				index = $( event.target ).data( "ui-slider-handle-index" );
15425
15426			switch ( event.keyCode ) {
15427				case $.ui.keyCode.HOME:
15428				case $.ui.keyCode.END:
15429				case $.ui.keyCode.PAGE_UP:
15430				case $.ui.keyCode.PAGE_DOWN:
15431				case $.ui.keyCode.UP:
15432				case $.ui.keyCode.RIGHT:
15433				case $.ui.keyCode.DOWN:
15434				case $.ui.keyCode.LEFT:
15435					event.preventDefault();
15436					if ( !this._keySliding ) {
15437						this._keySliding = true;
15438						this._addClass( $( event.target ), null, "ui-state-active" );
15439						allowed = this._start( event, index );
15440						if ( allowed === false ) {
15441							return;
15442						}
15443					}
15444					break;
15445			}
15446
15447			step = this.options.step;
15448			if ( this._hasMultipleValues() ) {
15449				curVal = newVal = this.values( index );
15450			} else {
15451				curVal = newVal = this.value();
15452			}
15453
15454			switch ( event.keyCode ) {
15455				case $.ui.keyCode.HOME:
15456					newVal = this._valueMin();
15457					break;
15458				case $.ui.keyCode.END:
15459					newVal = this._valueMax();
15460					break;
15461				case $.ui.keyCode.PAGE_UP:
15462					newVal = this._trimAlignValue(
15463						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
15464					);
15465					break;
15466				case $.ui.keyCode.PAGE_DOWN:
15467					newVal = this._trimAlignValue(
15468						curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
15469					break;
15470				case $.ui.keyCode.UP:
15471				case $.ui.keyCode.RIGHT:
15472					if ( curVal === this._valueMax() ) {
15473						return;
15474					}
15475					newVal = this._trimAlignValue( curVal + step );
15476					break;
15477				case $.ui.keyCode.DOWN:
15478				case $.ui.keyCode.LEFT:
15479					if ( curVal === this._valueMin() ) {
15480						return;
15481					}
15482					newVal = this._trimAlignValue( curVal - step );
15483					break;
15484			}
15485
15486			this._slide( event, index, newVal );
15487		},
15488		keyup: function( event ) {
15489			var index = $( event.target ).data( "ui-slider-handle-index" );
15490
15491			if ( this._keySliding ) {
15492				this._keySliding = false;
15493				this._stop( event, index );
15494				this._change( event, index );
15495				this._removeClass( $( event.target ), null, "ui-state-active" );
15496			}
15497		}
15498	}
15499} );
15500
15501
15502/*!
15503 * jQuery UI Sortable 1.13.2
15504 * http://jqueryui.com
15505 *
15506 * Copyright jQuery Foundation and other contributors
15507 * Released under the MIT license.
15508 * http://jquery.org/license
15509 */
15510
15511//>>label: Sortable
15512//>>group: Interactions
15513//>>description: Enables items in a list to be sorted using the mouse.
15514//>>docs: http://api.jqueryui.com/sortable/
15515//>>demos: http://jqueryui.com/sortable/
15516//>>css.structure: ../../themes/base/sortable.css
15517
15518
15519var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
15520	version: "1.13.2",
15521	widgetEventPrefix: "sort",
15522	ready: false,
15523	options: {
15524		appendTo: "parent",
15525		axis: false,
15526		connectWith: false,
15527		containment: false,
15528		cursor: "auto",
15529		cursorAt: false,
15530		dropOnEmpty: true,
15531		forcePlaceholderSize: false,
15532		forceHelperSize: false,
15533		grid: false,
15534		handle: false,
15535		helper: "original",
15536		items: "> *",
15537		opacity: false,
15538		placeholder: false,
15539		revert: false,
15540		scroll: true,
15541		scrollSensitivity: 20,
15542		scrollSpeed: 20,
15543		scope: "default",
15544		tolerance: "intersect",
15545		zIndex: 1000,
15546
15547		// Callbacks
15548		activate: null,
15549		beforeStop: null,
15550		change: null,
15551		deactivate: null,
15552		out: null,
15553		over: null,
15554		receive: null,
15555		remove: null,
15556		sort: null,
15557		start: null,
15558		stop: null,
15559		update: null
15560	},
15561
15562	_isOverAxis: function( x, reference, size ) {
15563		return ( x >= reference ) && ( x < ( reference + size ) );
15564	},
15565
15566	_isFloating: function( item ) {
15567		return ( /left|right/ ).test( item.css( "float" ) ) ||
15568			( /inline|table-cell/ ).test( item.css( "display" ) );
15569	},
15570
15571	_create: function() {
15572		this.containerCache = {};
15573		this._addClass( "ui-sortable" );
15574
15575		//Get the items
15576		this.refresh();
15577
15578		//Let's determine the parent's offset
15579		this.offset = this.element.offset();
15580
15581		//Initialize mouse events for interaction
15582		this._mouseInit();
15583
15584		this._setHandleClassName();
15585
15586		//We're ready to go
15587		this.ready = true;
15588
15589	},
15590
15591	_setOption: function( key, value ) {
15592		this._super( key, value );
15593
15594		if ( key === "handle" ) {
15595			this._setHandleClassName();
15596		}
15597	},
15598
15599	_setHandleClassName: function() {
15600		var that = this;
15601		this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
15602		$.each( this.items, function() {
15603			that._addClass(
15604				this.instance.options.handle ?
15605					this.item.find( this.instance.options.handle ) :
15606					this.item,
15607				"ui-sortable-handle"
15608			);
15609		} );
15610	},
15611
15612	_destroy: function() {
15613		this._mouseDestroy();
15614
15615		for ( var i = this.items.length - 1; i >= 0; i-- ) {
15616			this.items[ i ].item.removeData( this.widgetName + "-item" );
15617		}
15618
15619		return this;
15620	},
15621
15622	_mouseCapture: function( event, overrideHandle ) {
15623		var currentItem = null,
15624			validHandle = false,
15625			that = this;
15626
15627		if ( this.reverting ) {
15628			return false;
15629		}
15630
15631		if ( this.options.disabled || this.options.type === "static" ) {
15632			return false;
15633		}
15634
15635		//We have to refresh the items data once first
15636		this._refreshItems( event );
15637
15638		//Find out if the clicked node (or one of its parents) is a actual item in this.items
15639		$( event.target ).parents().each( function() {
15640			if ( $.data( this, that.widgetName + "-item" ) === that ) {
15641				currentItem = $( this );
15642				return false;
15643			}
15644		} );
15645		if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
15646			currentItem = $( event.target );
15647		}
15648
15649		if ( !currentItem ) {
15650			return false;
15651		}
15652		if ( this.options.handle && !overrideHandle ) {
15653			$( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
15654				if ( this === event.target ) {
15655					validHandle = true;
15656				}
15657			} );
15658			if ( !validHandle ) {
15659				return false;
15660			}
15661		}
15662
15663		this.currentItem = currentItem;
15664		this._removeCurrentsFromItems();
15665		return true;
15666
15667	},
15668
15669	_mouseStart: function( event, overrideHandle, noActivation ) {
15670
15671		var i, body,
15672			o = this.options;
15673
15674		this.currentContainer = this;
15675
15676		//We only need to call refreshPositions, because the refreshItems call has been moved to
15677		// mouseCapture
15678		this.refreshPositions();
15679
15680		//Prepare the dragged items parent
15681		this.appendTo = $( o.appendTo !== "parent" ?
15682				o.appendTo :
15683				this.currentItem.parent() );
15684
15685		//Create and append the visible helper
15686		this.helper = this._createHelper( event );
15687
15688		//Cache the helper size
15689		this._cacheHelperProportions();
15690
15691		/*
15692		 * - Position generation -
15693		 * This block generates everything position related - it's the core of draggables.
15694		 */
15695
15696		//Cache the margins of the original element
15697		this._cacheMargins();
15698
15699		//The element's absolute position on the page minus margins
15700		this.offset = this.currentItem.offset();
15701		this.offset = {
15702			top: this.offset.top - this.margins.top,
15703			left: this.offset.left - this.margins.left
15704		};
15705
15706		$.extend( this.offset, {
15707			click: { //Where the click happened, relative to the element
15708				left: event.pageX - this.offset.left,
15709				top: event.pageY - this.offset.top
15710			},
15711
15712			// This is a relative to absolute position minus the actual position calculation -
15713			// only used for relative positioned helper
15714			relative: this._getRelativeOffset()
15715		} );
15716
15717		// After we get the helper offset, but before we get the parent offset we can
15718		// change the helper's position to absolute
15719		// TODO: Still need to figure out a way to make relative sorting possible
15720		this.helper.css( "position", "absolute" );
15721		this.cssPosition = this.helper.css( "position" );
15722
15723		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
15724		if ( o.cursorAt ) {
15725			this._adjustOffsetFromHelper( o.cursorAt );
15726		}
15727
15728		//Cache the former DOM position
15729		this.domPosition = {
15730			prev: this.currentItem.prev()[ 0 ],
15731			parent: this.currentItem.parent()[ 0 ]
15732		};
15733
15734		// If the helper is not the original, hide the original so it's not playing any role during
15735		// the drag, won't cause anything bad this way
15736		if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
15737			this.currentItem.hide();
15738		}
15739
15740		//Create the placeholder
15741		this._createPlaceholder();
15742
15743		//Get the next scrolling parent
15744		this.scrollParent = this.placeholder.scrollParent();
15745
15746		$.extend( this.offset, {
15747			parent: this._getParentOffset()
15748		} );
15749
15750		//Set a containment if given in the options
15751		if ( o.containment ) {
15752			this._setContainment();
15753		}
15754
15755		if ( o.cursor && o.cursor !== "auto" ) { // cursor option
15756			body = this.document.find( "body" );
15757
vendor: 10,284 bytes, lines 15758-16118
15758			// Support: IE
15759			this.storedCursor = body.css( "cursor" );
15760			body.css( "cursor", o.cursor );
15761
15762			this.storedStylesheet =
15763				$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
15764		}
15765
15766		// We need to make sure to grab the zIndex before setting the
15767		// opacity, because setting the opacity to anything lower than 1
15768		// causes the zIndex to change from "auto" to 0.
15769		if ( o.zIndex ) { // zIndex option
15770			if ( this.helper.css( "zIndex" ) ) {
15771				this._storedZIndex = this.helper.css( "zIndex" );
15772			}
15773			this.helper.css( "zIndex", o.zIndex );
15774		}
15775
15776		if ( o.opacity ) { // opacity option
15777			if ( this.helper.css( "opacity" ) ) {
15778				this._storedOpacity = this.helper.css( "opacity" );
15779			}
15780			this.helper.css( "opacity", o.opacity );
15781		}
15782
15783		//Prepare scrolling
15784		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
15785				this.scrollParent[ 0 ].tagName !== "HTML" ) {
15786			this.overflowOffset = this.scrollParent.offset();
15787		}
15788
15789		//Call callbacks
15790		this._trigger( "start", event, this._uiHash() );
15791
15792		//Recache the helper size
15793		if ( !this._preserveHelperProportions ) {
15794			this._cacheHelperProportions();
15795		}
15796
15797		//Post "activate" events to possible containers
15798		if ( !noActivation ) {
15799			for ( i = this.containers.length - 1; i >= 0; i-- ) {
15800				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
15801			}
15802		}
15803
15804		//Prepare possible droppables
15805		if ( $.ui.ddmanager ) {
15806			$.ui.ddmanager.current = this;
15807		}
15808
15809		if ( $.ui.ddmanager && !o.dropBehaviour ) {
15810			$.ui.ddmanager.prepareOffsets( this, event );
15811		}
15812
15813		this.dragging = true;
15814
15815		this._addClass( this.helper, "ui-sortable-helper" );
15816
15817		//Move the helper, if needed
15818		if ( !this.helper.parent().is( this.appendTo ) ) {
15819			this.helper.detach().appendTo( this.appendTo );
15820
15821			//Update position
15822			this.offset.parent = this._getParentOffset();
15823		}
15824
15825		//Generate the original position
15826		this.position = this.originalPosition = this._generatePosition( event );
15827		this.originalPageX = event.pageX;
15828		this.originalPageY = event.pageY;
15829		this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" );
15830
15831		this._mouseDrag( event );
15832
15833		return true;
15834
15835	},
15836
15837	_scroll: function( event ) {
15838		var o = this.options,
15839			scrolled = false;
15840
15841		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
15842				this.scrollParent[ 0 ].tagName !== "HTML" ) {
15843
15844			if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
15845					event.pageY < o.scrollSensitivity ) {
15846				this.scrollParent[ 0 ].scrollTop =
15847					scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
15848			} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
15849				this.scrollParent[ 0 ].scrollTop =
15850					scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
15851			}
15852
15853			if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
15854					event.pageX < o.scrollSensitivity ) {
15855				this.scrollParent[ 0 ].scrollLeft = scrolled =
15856					this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
15857			} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
15858				this.scrollParent[ 0 ].scrollLeft = scrolled =
15859					this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
15860			}
15861
15862		} else {
15863
15864			if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
15865				scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
15866			} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
15867					o.scrollSensitivity ) {
15868				scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
15869			}
15870
15871			if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
15872				scrolled = this.document.scrollLeft(
15873					this.document.scrollLeft() - o.scrollSpeed
15874				);
15875			} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
15876					o.scrollSensitivity ) {
15877				scrolled = this.document.scrollLeft(
15878					this.document.scrollLeft() + o.scrollSpeed
15879				);
15880			}
15881
15882		}
15883
15884		return scrolled;
15885	},
15886
15887	_mouseDrag: function( event ) {
15888		var i, item, itemElement, intersection,
15889			o = this.options;
15890
15891		//Compute the helpers position
15892		this.position = this._generatePosition( event );
15893		this.positionAbs = this._convertPositionTo( "absolute" );
15894
15895		//Set the helper position
15896		if ( !this.options.axis || this.options.axis !== "y" ) {
15897			this.helper[ 0 ].style.left = this.position.left + "px";
15898		}
15899		if ( !this.options.axis || this.options.axis !== "x" ) {
15900			this.helper[ 0 ].style.top = this.position.top + "px";
15901		}
15902
15903		//Do scrolling
15904		if ( o.scroll ) {
15905			if ( this._scroll( event ) !== false ) {
15906
15907				//Update item positions used in position checks
15908				this._refreshItemPositions( true );
15909
15910				if ( $.ui.ddmanager && !o.dropBehaviour ) {
15911					$.ui.ddmanager.prepareOffsets( this, event );
15912				}
15913			}
15914		}
15915
15916		this.dragDirection = {
15917			vertical: this._getDragVerticalDirection(),
15918			horizontal: this._getDragHorizontalDirection()
15919		};
15920
15921		//Rearrange
15922		for ( i = this.items.length - 1; i >= 0; i-- ) {
15923
15924			//Cache variables and intersection, continue if no intersection
15925			item = this.items[ i ];
15926			itemElement = item.item[ 0 ];
15927			intersection = this._intersectsWithPointer( item );
15928			if ( !intersection ) {
15929				continue;
15930			}
15931
15932			// Only put the placeholder inside the current Container, skip all
15933			// items from other containers. This works because when moving
15934			// an item from one container to another the
15935			// currentContainer is switched before the placeholder is moved.
15936			//
15937			// Without this, moving items in "sub-sortables" can cause
15938			// the placeholder to jitter between the outer and inner container.
15939			if ( item.instance !== this.currentContainer ) {
15940				continue;
15941			}
15942
15943			// Cannot intersect with itself
15944			// no useless actions that have been done before
15945			// no action if the item moved is the parent of the item checked
15946			if ( itemElement !== this.currentItem[ 0 ] &&
15947				this.placeholder[ intersection === 1 ?
15948				"next" : "prev" ]()[ 0 ] !== itemElement &&
15949				!$.contains( this.placeholder[ 0 ], itemElement ) &&
15950				( this.options.type === "semi-dynamic" ?
15951					!$.contains( this.element[ 0 ], itemElement ) :
15952					true
15953				)
15954			) {
15955
15956				this.direction = intersection === 1 ? "down" : "up";
15957
15958				if ( this.options.tolerance === "pointer" ||
15959						this._intersectsWithSides( item ) ) {
15960					this._rearrange( event, item );
15961				} else {
15962					break;
15963				}
15964
15965				this._trigger( "change", event, this._uiHash() );
15966				break;
15967			}
15968		}
15969
15970		//Post events to containers
15971		this._contactContainers( event );
15972
15973		//Interconnect with droppables
15974		if ( $.ui.ddmanager ) {
15975			$.ui.ddmanager.drag( this, event );
15976		}
15977
15978		//Call callbacks
15979		this._trigger( "sort", event, this._uiHash() );
15980
15981		this.lastPositionAbs = this.positionAbs;
15982		return false;
15983
15984	},
15985
15986	_mouseStop: function( event, noPropagation ) {
15987
15988		if ( !event ) {
15989			return;
15990		}
15991
15992		//If we are using droppables, inform the manager about the drop
15993		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
15994			$.ui.ddmanager.drop( this, event );
15995		}
15996
15997		if ( this.options.revert ) {
15998			var that = this,
15999				cur = this.placeholder.offset(),
16000				axis = this.options.axis,
16001				animation = {};
16002
16003			if ( !axis || axis === "x" ) {
16004				animation.left = cur.left - this.offset.parent.left - this.margins.left +
16005					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
16006						0 :
16007						this.offsetParent[ 0 ].scrollLeft
16008					);
16009			}
16010			if ( !axis || axis === "y" ) {
16011				animation.top = cur.top - this.offset.parent.top - this.margins.top +
16012					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
16013						0 :
16014						this.offsetParent[ 0 ].scrollTop
16015					);
16016			}
16017			this.reverting = true;
16018			$( this.helper ).animate(
16019				animation,
16020				parseInt( this.options.revert, 10 ) || 500,
16021				function() {
16022					that._clear( event );
16023				}
16024			);
16025		} else {
16026			this._clear( event, noPropagation );
16027		}
16028
16029		return false;
16030
16031	},
16032
16033	cancel: function() {
16034
16035		if ( this.dragging ) {
16036
16037			this._mouseUp( new $.Event( "mouseup", { target: null } ) );
16038
16039			if ( this.options.helper === "original" ) {
16040				this.currentItem.css( this._storedCSS );
16041				this._removeClass( this.currentItem, "ui-sortable-helper" );
16042			} else {
16043				this.currentItem.show();
16044			}
16045
16046			//Post deactivating events to containers
16047			for ( var i = this.containers.length - 1; i >= 0; i-- ) {
16048				this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
16049				if ( this.containers[ i ].containerCache.over ) {
16050					this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
16051					this.containers[ i ].containerCache.over = 0;
16052				}
16053			}
16054
16055		}
16056
16057		if ( this.placeholder ) {
16058
16059			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
16060			// it unbinds ALL events from the original node!
16061			if ( this.placeholder[ 0 ].parentNode ) {
16062				this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
16063			}
16064			if ( this.options.helper !== "original" && this.helper &&
16065					this.helper[ 0 ].parentNode ) {
16066				this.helper.remove();
16067			}
16068
16069			$.extend( this, {
16070				helper: null,
16071				dragging: false,
16072				reverting: false,
16073				_noFinalSort: null
16074			} );
16075
16076			if ( this.domPosition.prev ) {
16077				$( this.domPosition.prev ).after( this.currentItem );
16078			} else {
16079				$( this.domPosition.parent ).prepend( this.currentItem );
16080			}
16081		}
16082
16083		return this;
16084
16085	},
16086
16087	serialize: function( o ) {
16088
16089		var items = this._getItemsAsjQuery( o && o.connected ),
16090			str = [];
16091		o = o || {};
16092
16093		$( items ).each( function() {
16094			var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
16095				.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
16096			if ( res ) {
16097				str.push(
16098					( o.key || res[ 1 ] + "[]" ) +
16099					"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
16100			}
16101		} );
16102
16103		if ( !str.length && o.key ) {
16104			str.push( o.key + "=" );
16105		}
16106
16107		return str.join( "&" );
16108
16109	},
16110
16111	toArray: function( o ) {
16112
16113		var items = this._getItemsAsjQuery( o && o.connected ),
16114			ret = [];
16115
16116		o = o || {};
16117
16118		items.each( function() {
vendor: 9,873 bytes, lines 16119-16431
16119			ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
16120		} );
16121		return ret;
16122
16123	},
16124
16125	/* Be careful with the following core functions */
16126	_intersectsWith: function( item ) {
16127
16128		var x1 = this.positionAbs.left,
16129			x2 = x1 + this.helperProportions.width,
16130			y1 = this.positionAbs.top,
16131			y2 = y1 + this.helperProportions.height,
16132			l = item.left,
16133			r = l + item.width,
16134			t = item.top,
16135			b = t + item.height,
16136			dyClick = this.offset.click.top,
16137			dxClick = this.offset.click.left,
16138			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
16139				( y1 + dyClick ) < b ),
16140			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
16141				( x1 + dxClick ) < r ),
16142			isOverElement = isOverElementHeight && isOverElementWidth;
16143
16144		if ( this.options.tolerance === "pointer" ||
16145			this.options.forcePointerForContainers ||
16146			( this.options.tolerance !== "pointer" &&
16147				this.helperProportions[ this.floating ? "width" : "height" ] >
16148				item[ this.floating ? "width" : "height" ] )
16149		) {
16150			return isOverElement;
16151		} else {
16152
16153			return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
16154				x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
16155				t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
16156				y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
16157
16158		}
16159	},
16160
16161	_intersectsWithPointer: function( item ) {
16162		var verticalDirection, horizontalDirection,
16163			isOverElementHeight = ( this.options.axis === "x" ) ||
16164				this._isOverAxis(
16165					this.positionAbs.top + this.offset.click.top, item.top, item.height ),
16166			isOverElementWidth = ( this.options.axis === "y" ) ||
16167				this._isOverAxis(
16168					this.positionAbs.left + this.offset.click.left, item.left, item.width ),
16169			isOverElement = isOverElementHeight && isOverElementWidth;
16170
16171		if ( !isOverElement ) {
16172			return false;
16173		}
16174
16175		verticalDirection = this.dragDirection.vertical;
16176		horizontalDirection = this.dragDirection.horizontal;
16177
16178		return this.floating ?
16179			( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) :
16180			( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
16181
16182	},
16183
16184	_intersectsWithSides: function( item ) {
16185
16186		var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
16187				this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
16188			isOverRightHalf = this._isOverAxis( this.positionAbs.left +
16189				this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
16190			verticalDirection = this.dragDirection.vertical,
16191			horizontalDirection = this.dragDirection.horizontal;
16192
16193		if ( this.floating && horizontalDirection ) {
16194			return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
16195				( horizontalDirection === "left" && !isOverRightHalf ) );
16196		} else {
16197			return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
16198				( verticalDirection === "up" && !isOverBottomHalf ) );
16199		}
16200
16201	},
16202
16203	_getDragVerticalDirection: function() {
16204		var delta = this.positionAbs.top - this.lastPositionAbs.top;
16205		return delta !== 0 && ( delta > 0 ? "down" : "up" );
16206	},
16207
16208	_getDragHorizontalDirection: function() {
16209		var delta = this.positionAbs.left - this.lastPositionAbs.left;
16210		return delta !== 0 && ( delta > 0 ? "right" : "left" );
16211	},
16212
16213	refresh: function( event ) {
16214		this._refreshItems( event );
16215		this._setHandleClassName();
16216		this.refreshPositions();
16217		return this;
16218	},
16219
16220	_connectWith: function() {
16221		var options = this.options;
16222		return options.connectWith.constructor === String ?
16223			[ options.connectWith ] :
16224			options.connectWith;
16225	},
16226
16227	_getItemsAsjQuery: function( connected ) {
16228
16229		var i, j, cur, inst,
16230			items = [],
16231			queries = [],
16232			connectWith = this._connectWith();
16233
16234		if ( connectWith && connected ) {
16235			for ( i = connectWith.length - 1; i >= 0; i-- ) {
16236				cur = $( connectWith[ i ], this.document[ 0 ] );
16237				for ( j = cur.length - 1; j >= 0; j-- ) {
16238					inst = $.data( cur[ j ], this.widgetFullName );
16239					if ( inst && inst !== this && !inst.options.disabled ) {
16240						queries.push( [ typeof inst.options.items === "function" ?
16241							inst.options.items.call( inst.element ) :
16242							$( inst.options.items, inst.element )
16243								.not( ".ui-sortable-helper" )
16244								.not( ".ui-sortable-placeholder" ), inst ] );
16245					}
16246				}
16247			}
16248		}
16249
16250		queries.push( [ typeof this.options.items === "function" ?
16251			this.options.items
16252				.call( this.element, null, { options: this.options, item: this.currentItem } ) :
16253			$( this.options.items, this.element )
16254				.not( ".ui-sortable-helper" )
16255				.not( ".ui-sortable-placeholder" ), this ] );
16256
16257		function addItems() {
16258			items.push( this );
16259		}
16260		for ( i = queries.length - 1; i >= 0; i-- ) {
16261			queries[ i ][ 0 ].each( addItems );
16262		}
16263
16264		return $( items );
16265
16266	},
16267
16268	_removeCurrentsFromItems: function() {
16269
16270		var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
16271
16272		this.items = $.grep( this.items, function( item ) {
16273			for ( var j = 0; j < list.length; j++ ) {
16274				if ( list[ j ] === item.item[ 0 ] ) {
16275					return false;
16276				}
16277			}
16278			return true;
16279		} );
16280
16281	},
16282
16283	_refreshItems: function( event ) {
16284
16285		this.items = [];
16286		this.containers = [ this ];
16287
16288		var i, j, cur, inst, targetData, _queries, item, queriesLength,
16289			items = this.items,
16290			queries = [ [ typeof this.options.items === "function" ?
16291				this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
16292				$( this.options.items, this.element ), this ] ],
16293			connectWith = this._connectWith();
16294
16295		//Shouldn't be run the first time through due to massive slow-down
16296		if ( connectWith && this.ready ) {
16297			for ( i = connectWith.length - 1; i >= 0; i-- ) {
16298				cur = $( connectWith[ i ], this.document[ 0 ] );
16299				for ( j = cur.length - 1; j >= 0; j-- ) {
16300					inst = $.data( cur[ j ], this.widgetFullName );
16301					if ( inst && inst !== this && !inst.options.disabled ) {
16302						queries.push( [ typeof inst.options.items === "function" ?
16303							inst.options.items
16304								.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
16305							$( inst.options.items, inst.element ), inst ] );
16306						this.containers.push( inst );
16307					}
16308				}
16309			}
16310		}
16311
16312		for ( i = queries.length - 1; i >= 0; i-- ) {
16313			targetData = queries[ i ][ 1 ];
16314			_queries = queries[ i ][ 0 ];
16315
16316			for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
16317				item = $( _queries[ j ] );
16318
16319				// Data for target checking (mouse manager)
16320				item.data( this.widgetName + "-item", targetData );
16321
16322				items.push( {
16323					item: item,
16324					instance: targetData,
16325					width: 0, height: 0,
16326					left: 0, top: 0
16327				} );
16328			}
16329		}
16330
16331	},
16332
16333	_refreshItemPositions: function( fast ) {
16334		var i, item, t, p;
16335
16336		for ( i = this.items.length - 1; i >= 0; i-- ) {
16337			item = this.items[ i ];
16338
16339			//We ignore calculating positions of all connected containers when we're not over them
16340			if ( this.currentContainer && item.instance !== this.currentContainer &&
16341					item.item[ 0 ] !== this.currentItem[ 0 ] ) {
16342				continue;
16343			}
16344
16345			t = this.options.toleranceElement ?
16346				$( this.options.toleranceElement, item.item ) :
16347				item.item;
16348
16349			if ( !fast ) {
16350				item.width = t.outerWidth();
16351				item.height = t.outerHeight();
16352			}
16353
16354			p = t.offset();
16355			item.left = p.left;
16356			item.top = p.top;
16357		}
16358	},
16359
16360	refreshPositions: function( fast ) {
16361
16362		// Determine whether items are being displayed horizontally
16363		this.floating = this.items.length ?
16364			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
16365			false;
16366
16367		// This has to be redone because due to the item being moved out/into the offsetParent,
16368		// the offsetParent's position will change
16369		if ( this.offsetParent && this.helper ) {
16370			this.offset.parent = this._getParentOffset();
16371		}
16372
16373		this._refreshItemPositions( fast );
16374
16375		var i, p;
16376
16377		if ( this.options.custom && this.options.custom.refreshContainers ) {
16378			this.options.custom.refreshContainers.call( this );
16379		} else {
16380			for ( i = this.containers.length - 1; i >= 0; i-- ) {
16381				p = this.containers[ i ].element.offset();
16382				this.containers[ i ].containerCache.left = p.left;
16383				this.containers[ i ].containerCache.top = p.top;
16384				this.containers[ i ].containerCache.width =
16385					this.containers[ i ].element.outerWidth();
16386				this.containers[ i ].containerCache.height =
16387					this.containers[ i ].element.outerHeight();
16388			}
16389		}
16390
16391		return this;
16392	},
16393
16394	_createPlaceholder: function( that ) {
16395		that = that || this;
16396		var className, nodeName,
16397			o = that.options;
16398
16399		if ( !o.placeholder || o.placeholder.constructor === String ) {
16400			className = o.placeholder;
16401			nodeName = that.currentItem[ 0 ].nodeName.toLowerCase();
16402			o.placeholder = {
16403				element: function() {
16404
16405					var element = $( "<" + nodeName + ">", that.document[ 0 ] );
16406
16407					that._addClass( element, "ui-sortable-placeholder",
16408							className || that.currentItem[ 0 ].className )
16409						._removeClass( element, "ui-sortable-helper" );
16410
16411					if ( nodeName === "tbody" ) {
16412						that._createTrPlaceholder(
16413							that.currentItem.find( "tr" ).eq( 0 ),
16414							$( "<tr>", that.document[ 0 ] ).appendTo( element )
16415						);
16416					} else if ( nodeName === "tr" ) {
16417						that._createTrPlaceholder( that.currentItem, element );
16418					} else if ( nodeName === "img" ) {
16419						element.attr( "src", that.currentItem.attr( "src" ) );
16420					}
16421
16422					if ( !className ) {
16423						element.css( "visibility", "hidden" );
16424					}
16425
16426					return element;
16427				},
16428				update: function( container, p ) {
16429
16430					// 1. If a className is set as 'placeholder option, we don't force sizes -
16431					// the class is responsible for that
vendor: 10,802 bytes, lines 16432-16746
16432					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
16433					// class name is specified
16434					if ( className && !o.forcePlaceholderSize ) {
16435						return;
16436					}
16437
16438					// If the element doesn't have a actual height or width by itself (without
16439					// styles coming from a stylesheet), it receives the inline height and width
16440					// from the dragged item. Or, if it's a tbody or tr, it's going to have a height
16441					// anyway since we're populating them with <td>s above, but they're unlikely to
16442					// be the correct height on their own if the row heights are dynamic, so we'll
16443					// always assign the height of the dragged item given forcePlaceholderSize
16444					// is true.
16445					if ( !p.height() || ( o.forcePlaceholderSize &&
16446							( nodeName === "tbody" || nodeName === "tr" ) ) ) {
16447						p.height(
16448							that.currentItem.innerHeight() -
16449							parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
16450							parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
16451					}
16452					if ( !p.width() ) {
16453						p.width(
16454							that.currentItem.innerWidth() -
16455							parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
16456							parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
16457					}
16458				}
16459			};
16460		}
16461
16462		//Create the placeholder
16463		that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
16464
16465		//Append it after the actual current item
16466		that.currentItem.after( that.placeholder );
16467
16468		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
16469		o.placeholder.update( that, that.placeholder );
16470
16471	},
16472
16473	_createTrPlaceholder: function( sourceTr, targetTr ) {
16474		var that = this;
16475
16476		sourceTr.children().each( function() {
16477			$( "<td>&#160;</td>", that.document[ 0 ] )
16478				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
16479				.appendTo( targetTr );
16480		} );
16481	},
16482
16483	_contactContainers: function( event ) {
16484		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
16485			floating, axis,
16486			innermostContainer = null,
16487			innermostIndex = null;
16488
16489		// Get innermost container that intersects with item
16490		for ( i = this.containers.length - 1; i >= 0; i-- ) {
16491
16492			// Never consider a container that's located within the item itself
16493			if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
16494				continue;
16495			}
16496
16497			if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
16498
16499				// If we've already found a container and it's more "inner" than this, then continue
16500				if ( innermostContainer &&
16501						$.contains(
16502							this.containers[ i ].element[ 0 ],
16503							innermostContainer.element[ 0 ] ) ) {
16504					continue;
16505				}
16506
16507				innermostContainer = this.containers[ i ];
16508				innermostIndex = i;
16509
16510			} else {
16511
16512				// container doesn't intersect. trigger "out" event if necessary
16513				if ( this.containers[ i ].containerCache.over ) {
16514					this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
16515					this.containers[ i ].containerCache.over = 0;
16516				}
16517			}
16518
16519		}
16520
16521		// If no intersecting containers found, return
16522		if ( !innermostContainer ) {
16523			return;
16524		}
16525
16526		// Move the item into the container if it's not there already
16527		if ( this.containers.length === 1 ) {
16528			if ( !this.containers[ innermostIndex ].containerCache.over ) {
16529				this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
16530				this.containers[ innermostIndex ].containerCache.over = 1;
16531			}
16532		} else {
16533
16534			// When entering a new container, we will find the item with the least distance and
16535			// append our item near it
16536			dist = 10000;
16537			itemWithLeastDistance = null;
16538			floating = innermostContainer.floating || this._isFloating( this.currentItem );
16539			posProperty = floating ? "left" : "top";
16540			sizeProperty = floating ? "width" : "height";
16541			axis = floating ? "pageX" : "pageY";
16542
16543			for ( j = this.items.length - 1; j >= 0; j-- ) {
16544				if ( !$.contains(
16545						this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
16546				) {
16547					continue;
16548				}
16549				if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
16550					continue;
16551				}
16552
16553				cur = this.items[ j ].item.offset()[ posProperty ];
16554				nearBottom = false;
16555				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
16556					nearBottom = true;
16557				}
16558
16559				if ( Math.abs( event[ axis ] - cur ) < dist ) {
16560					dist = Math.abs( event[ axis ] - cur );
16561					itemWithLeastDistance = this.items[ j ];
16562					this.direction = nearBottom ? "up" : "down";
16563				}
16564			}
16565
16566			//Check if dropOnEmpty is enabled
16567			if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
16568				return;
16569			}
16570
16571			if ( this.currentContainer === this.containers[ innermostIndex ] ) {
16572				if ( !this.currentContainer.containerCache.over ) {
16573					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
16574					this.currentContainer.containerCache.over = 1;
16575				}
16576				return;
16577			}
16578
16579			if ( itemWithLeastDistance ) {
16580				this._rearrange( event, itemWithLeastDistance, null, true );
16581			} else {
16582				this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
16583			}
16584			this._trigger( "change", event, this._uiHash() );
16585			this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
16586			this.currentContainer = this.containers[ innermostIndex ];
16587
16588			//Update the placeholder
16589			this.options.placeholder.update( this.currentContainer, this.placeholder );
16590
16591			//Update scrollParent
16592			this.scrollParent = this.placeholder.scrollParent();
16593
16594			//Update overflowOffset
16595			if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16596					this.scrollParent[ 0 ].tagName !== "HTML" ) {
16597				this.overflowOffset = this.scrollParent.offset();
16598			}
16599
16600			this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
16601			this.containers[ innermostIndex ].containerCache.over = 1;
16602		}
16603
16604	},
16605
16606	_createHelper: function( event ) {
16607
16608		var o = this.options,
16609			helper = typeof o.helper === "function" ?
16610				$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
16611				( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
16612
16613		//Add the helper to the DOM if that didn't happen already
16614		if ( !helper.parents( "body" ).length ) {
16615			this.appendTo[ 0 ].appendChild( helper[ 0 ] );
16616		}
16617
16618		if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
16619			this._storedCSS = {
16620				width: this.currentItem[ 0 ].style.width,
16621				height: this.currentItem[ 0 ].style.height,
16622				position: this.currentItem.css( "position" ),
16623				top: this.currentItem.css( "top" ),
16624				left: this.currentItem.css( "left" )
16625			};
16626		}
16627
16628		if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
16629			helper.width( this.currentItem.width() );
16630		}
16631		if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
16632			helper.height( this.currentItem.height() );
16633		}
16634
16635		return helper;
16636
16637	},
16638
16639	_adjustOffsetFromHelper: function( obj ) {
16640		if ( typeof obj === "string" ) {
16641			obj = obj.split( " " );
16642		}
16643		if ( Array.isArray( obj ) ) {
16644			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
16645		}
16646		if ( "left" in obj ) {
16647			this.offset.click.left = obj.left + this.margins.left;
16648		}
16649		if ( "right" in obj ) {
16650			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
16651		}
16652		if ( "top" in obj ) {
16653			this.offset.click.top = obj.top + this.margins.top;
16654		}
16655		if ( "bottom" in obj ) {
16656			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
16657		}
16658	},
16659
16660	_getParentOffset: function() {
16661
16662		//Get the offsetParent and cache its position
16663		this.offsetParent = this.helper.offsetParent();
16664		var po = this.offsetParent.offset();
16665
16666		// This is a special case where we need to modify a offset calculated on start, since the
16667		// following happened:
16668		// 1. The position of the helper is absolute, so it's position is calculated based on the
16669		// next positioned parent
16670		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
16671		// the document, which means that the scroll is included in the initial calculation of the
16672		// offset of the parent, and never recalculated upon drag
16673		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16674				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
16675			po.left += this.scrollParent.scrollLeft();
16676			po.top += this.scrollParent.scrollTop();
16677		}
16678
16679		// This needs to be actually done for all browsers, since pageX/pageY includes this
16680		// information with an ugly IE fix
16681		if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
16682				( this.offsetParent[ 0 ].tagName &&
16683				this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
16684			po = { top: 0, left: 0 };
16685		}
16686
16687		return {
16688			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
16689			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
16690		};
16691
16692	},
16693
16694	_getRelativeOffset: function() {
16695
16696		if ( this.cssPosition === "relative" ) {
16697			var p = this.currentItem.position();
16698			return {
16699				top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
16700					this.scrollParent.scrollTop(),
16701				left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
16702					this.scrollParent.scrollLeft()
16703			};
16704		} else {
16705			return { top: 0, left: 0 };
16706		}
16707
16708	},
16709
16710	_cacheMargins: function() {
16711		this.margins = {
16712			left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
16713			top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
16714		};
16715	},
16716
16717	_cacheHelperProportions: function() {
16718		this.helperProportions = {
16719			width: this.helper.outerWidth(),
16720			height: this.helper.outerHeight()
16721		};
16722	},
16723
16724	_setContainment: function() {
16725
16726		var ce, co, over,
16727			o = this.options;
16728		if ( o.containment === "parent" ) {
16729			o.containment = this.helper[ 0 ].parentNode;
16730		}
16731		if ( o.containment === "document" || o.containment === "window" ) {
16732			this.containment = [
16733				0 - this.offset.relative.left - this.offset.parent.left,
16734				0 - this.offset.relative.top - this.offset.parent.top,
16735				o.containment === "document" ?
16736					this.document.width() :
16737					this.window.width() - this.helperProportions.width - this.margins.left,
16738				( o.containment === "document" ?
16739					( this.document.height() || document.body.parentNode.scrollHeight ) :
16740					this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
16741				) - this.helperProportions.height - this.margins.top
16742			];
16743		}
16744
16745		if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
16746			ce = $( o.containment )[ 0 ];
vendor: 2,294 bytes, lines 16747-16807
16747			co = $( o.containment ).offset();
16748			over = ( $( ce ).css( "overflow" ) !== "hidden" );
16749
16750			this.containment = [
16751				co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
16752					( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
16753				co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
16754					( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
16755				co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
16756					( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
16757					( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
16758					this.helperProportions.width - this.margins.left,
16759				co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
16760					( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
16761					( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
16762					this.helperProportions.height - this.margins.top
16763			];
16764		}
16765
16766	},
16767
16768	_convertPositionTo: function( d, pos ) {
16769
16770		if ( !pos ) {
16771			pos = this.position;
16772		}
16773		var mod = d === "absolute" ? 1 : -1,
16774			scroll = this.cssPosition === "absolute" &&
16775				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16776				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
16777					this.offsetParent :
16778					this.scrollParent,
16779			scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
16780
16781		return {
16782			top: (
16783
16784				// The absolute mouse position
16785				pos.top	+
16786
16787				// Only for relative positioned nodes: Relative offset from element to offset parent
16788				this.offset.relative.top * mod +
16789
16790				// The offsetParent's offset without borders (offset + border)
16791				this.offset.parent.top * mod -
16792				( ( this.cssPosition === "fixed" ?
16793					-this.scrollParent.scrollTop() :
16794					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
16795			),
16796			left: (
16797
16798				// The absolute mouse position
16799				pos.left +
16800
16801				// Only for relative positioned nodes: Relative offset from element to offset parent
16802				this.offset.relative.left * mod +
16803
16804				// The offsetParent's offset without borders (offset + border)
16805				this.offset.parent.left * mod	-
16806				( ( this.cssPosition === "fixed" ?
16807					-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
vendor: 42,069 bytes, lines 16808-18321
16808					scroll.scrollLeft() ) * mod )
16809			)
16810		};
16811
16812	},
16813
16814	_generatePosition: function( event ) {
16815
16816		var top, left,
16817			o = this.options,
16818			pageX = event.pageX,
16819			pageY = event.pageY,
16820			scroll = this.cssPosition === "absolute" &&
16821				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16822				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
16823					this.offsetParent :
16824					this.scrollParent,
16825				scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
16826
16827		// This is another very weird special case that only happens for relative elements:
16828		// 1. If the css position is relative
16829		// 2. and the scroll parent is the document or similar to the offset parent
16830		// we have to refresh the relative offset during the scroll so there are no jumps
16831		if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16832				this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
16833			this.offset.relative = this._getRelativeOffset();
16834		}
16835
16836		/*
16837		 * - Position constraining -
16838		 * Constrain the position to a mix of grid, containment.
16839		 */
16840
16841		if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
16842
16843			if ( this.containment ) {
16844				if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
16845					pageX = this.containment[ 0 ] + this.offset.click.left;
16846				}
16847				if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
16848					pageY = this.containment[ 1 ] + this.offset.click.top;
16849				}
16850				if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
16851					pageX = this.containment[ 2 ] + this.offset.click.left;
16852				}
16853				if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
16854					pageY = this.containment[ 3 ] + this.offset.click.top;
16855				}
16856			}
16857
16858			if ( o.grid ) {
16859				top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
16860					o.grid[ 1 ] ) * o.grid[ 1 ];
16861				pageY = this.containment ?
16862					( ( top - this.offset.click.top >= this.containment[ 1 ] &&
16863						top - this.offset.click.top <= this.containment[ 3 ] ) ?
16864							top :
16865							( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
16866								top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
16867								top;
16868
16869				left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
16870					o.grid[ 0 ] ) * o.grid[ 0 ];
16871				pageX = this.containment ?
16872					( ( left - this.offset.click.left >= this.containment[ 0 ] &&
16873						left - this.offset.click.left <= this.containment[ 2 ] ) ?
16874							left :
16875							( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
16876								left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
16877								left;
16878			}
16879
16880		}
16881
16882		return {
16883			top: (
16884
16885				// The absolute mouse position
16886				pageY -
16887
16888				// Click offset (relative to the element)
16889				this.offset.click.top -
16890
16891				// Only for relative positioned nodes: Relative offset from element to offset parent
16892				this.offset.relative.top -
16893
16894				// The offsetParent's offset without borders (offset + border)
16895				this.offset.parent.top +
16896				( ( this.cssPosition === "fixed" ?
16897					-this.scrollParent.scrollTop() :
16898					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
16899			),
16900			left: (
16901
16902				// The absolute mouse position
16903				pageX -
16904
16905				// Click offset (relative to the element)
16906				this.offset.click.left -
16907
16908				// Only for relative positioned nodes: Relative offset from element to offset parent
16909				this.offset.relative.left -
16910
16911				// The offsetParent's offset without borders (offset + border)
16912				this.offset.parent.left +
16913				( ( this.cssPosition === "fixed" ?
16914					-this.scrollParent.scrollLeft() :
16915					scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
16916			)
16917		};
16918
16919	},
16920
16921	_rearrange: function( event, i, a, hardRefresh ) {
16922
16923		if ( a ) {
16924			a[ 0 ].appendChild( this.placeholder[ 0 ] );
16925		} else {
16926			i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
16927				( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
16928		}
16929
16930		//Various things done here to improve the performance:
16931		// 1. we create a setTimeout, that calls refreshPositions
16932		// 2. on the instance, we have a counter variable, that get's higher after every append
16933		// 3. on the local scope, we copy the counter variable, and check in the timeout,
16934		// if it's still the same
16935		// 4. this lets only the last addition to the timeout stack through
16936		this.counter = this.counter ? ++this.counter : 1;
16937		var counter = this.counter;
16938
16939		this._delay( function() {
16940			if ( counter === this.counter ) {
16941
16942				//Precompute after each DOM insertion, NOT on mousemove
16943				this.refreshPositions( !hardRefresh );
16944			}
16945		} );
16946
16947	},
16948
16949	_clear: function( event, noPropagation ) {
16950
16951		this.reverting = false;
16952
16953		// We delay all events that have to be triggered to after the point where the placeholder
16954		// has been removed and everything else normalized again
16955		var i,
16956			delayedTriggers = [];
16957
16958		// We first have to update the dom position of the actual currentItem
16959		// Note: don't do it if the current item is already removed (by a user), or it gets
16960		// reappended (see #4088)
16961		if ( !this._noFinalSort && this.currentItem.parent().length ) {
16962			this.placeholder.before( this.currentItem );
16963		}
16964		this._noFinalSort = null;
16965
16966		if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
16967			for ( i in this._storedCSS ) {
16968				if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
16969					this._storedCSS[ i ] = "";
16970				}
16971			}
16972			this.currentItem.css( this._storedCSS );
16973			this._removeClass( this.currentItem, "ui-sortable-helper" );
16974		} else {
16975			this.currentItem.show();
16976		}
16977
16978		if ( this.fromOutside && !noPropagation ) {
16979			delayedTriggers.push( function( event ) {
16980				this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
16981			} );
16982		}
16983		if ( ( this.fromOutside ||
16984				this.domPosition.prev !==
16985				this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
16986				this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {
16987
16988			// Trigger update callback if the DOM position has changed
16989			delayedTriggers.push( function( event ) {
16990				this._trigger( "update", event, this._uiHash() );
16991			} );
16992		}
16993
16994		// Check if the items Container has Changed and trigger appropriate
16995		// events.
16996		if ( this !== this.currentContainer ) {
16997			if ( !noPropagation ) {
16998				delayedTriggers.push( function( event ) {
16999					this._trigger( "remove", event, this._uiHash() );
17000				} );
17001				delayedTriggers.push( ( function( c ) {
17002					return function( event ) {
17003						c._trigger( "receive", event, this._uiHash( this ) );
17004					};
17005				} ).call( this, this.currentContainer ) );
17006				delayedTriggers.push( ( function( c ) {
17007					return function( event ) {
17008						c._trigger( "update", event, this._uiHash( this ) );
17009					};
17010				} ).call( this, this.currentContainer ) );
17011			}
17012		}
17013
17014		//Post events to containers
17015		function delayEvent( type, instance, container ) {
17016			return function( event ) {
17017				container._trigger( type, event, instance._uiHash( instance ) );
17018			};
17019		}
17020		for ( i = this.containers.length - 1; i >= 0; i-- ) {
17021			if ( !noPropagation ) {
17022				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
17023			}
17024			if ( this.containers[ i ].containerCache.over ) {
17025				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
17026				this.containers[ i ].containerCache.over = 0;
17027			}
17028		}
17029
17030		//Do what was originally in plugins
17031		if ( this.storedCursor ) {
17032			this.document.find( "body" ).css( "cursor", this.storedCursor );
17033			this.storedStylesheet.remove();
17034		}
17035		if ( this._storedOpacity ) {
17036			this.helper.css( "opacity", this._storedOpacity );
17037		}
17038		if ( this._storedZIndex ) {
17039			this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
17040		}
17041
17042		this.dragging = false;
17043
17044		if ( !noPropagation ) {
17045			this._trigger( "beforeStop", event, this._uiHash() );
17046		}
17047
17048		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
17049		// it unbinds ALL events from the original node!
17050		this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
17051
17052		if ( !this.cancelHelperRemoval ) {
17053			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
17054				this.helper.remove();
17055			}
17056			this.helper = null;
17057		}
17058
17059		if ( !noPropagation ) {
17060			for ( i = 0; i < delayedTriggers.length; i++ ) {
17061
17062				// Trigger all delayed events
17063				delayedTriggers[ i ].call( this, event );
17064			}
17065			this._trigger( "stop", event, this._uiHash() );
17066		}
17067
17068		this.fromOutside = false;
17069		return !this.cancelHelperRemoval;
17070
17071	},
17072
17073	_trigger: function() {
17074		if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
17075			this.cancel();
17076		}
17077	},
17078
17079	_uiHash: function( _inst ) {
17080		var inst = _inst || this;
17081		return {
17082			helper: inst.helper,
17083			placeholder: inst.placeholder || $( [] ),
17084			position: inst.position,
17085			originalPosition: inst.originalPosition,
17086			offset: inst.positionAbs,
17087			item: inst.currentItem,
17088			sender: _inst ? _inst.element : null
17089		};
17090	}
17091
17092} );
17093
17094
17095/*!
17096 * jQuery UI Spinner 1.13.2
17097 * http://jqueryui.com
17098 *
17099 * Copyright jQuery Foundation and other contributors
17100 * Released under the MIT license.
17101 * http://jquery.org/license
17102 */
17103
17104//>>label: Spinner
17105//>>group: Widgets
17106//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
17107//>>docs: http://api.jqueryui.com/spinner/
17108//>>demos: http://jqueryui.com/spinner/
17109//>>css.structure: ../../themes/base/core.css
17110//>>css.structure: ../../themes/base/spinner.css
17111//>>css.theme: ../../themes/base/theme.css
17112
17113
17114function spinnerModifier( fn ) {
17115	return function() {
17116		var previous = this.element.val();
17117		fn.apply( this, arguments );
17118		this._refresh();
17119		if ( previous !== this.element.val() ) {
17120			this._trigger( "change" );
17121		}
17122	};
17123}
17124
17125$.widget( "ui.spinner", {
17126	version: "1.13.2",
17127	defaultElement: "<input>",
17128	widgetEventPrefix: "spin",
17129	options: {
17130		classes: {
17131			"ui-spinner": "ui-corner-all",
17132			"ui-spinner-down": "ui-corner-br",
17133			"ui-spinner-up": "ui-corner-tr"
17134		},
17135		culture: null,
17136		icons: {
17137			down: "ui-icon-triangle-1-s",
17138			up: "ui-icon-triangle-1-n"
17139		},
17140		incremental: true,
17141		max: null,
17142		min: null,
17143		numberFormat: null,
17144		page: 10,
17145		step: 1,
17146
17147		change: null,
17148		spin: null,
17149		start: null,
17150		stop: null
17151	},
17152
17153	_create: function() {
17154
17155		// handle string values that need to be parsed
17156		this._setOption( "max", this.options.max );
17157		this._setOption( "min", this.options.min );
17158		this._setOption( "step", this.options.step );
17159
17160		// Only format if there is a value, prevents the field from being marked
17161		// as invalid in Firefox, see #9573.
17162		if ( this.value() !== "" ) {
17163
17164			// Format the value, but don't constrain.
17165			this._value( this.element.val(), true );
17166		}
17167
17168		this._draw();
17169		this._on( this._events );
17170		this._refresh();
17171
17172		// Turning off autocomplete prevents the browser from remembering the
17173		// value when navigating through history, so we re-enable autocomplete
17174		// if the page is unloaded before the widget is destroyed. #7790
17175		this._on( this.window, {
17176			beforeunload: function() {
17177				this.element.removeAttr( "autocomplete" );
17178			}
17179		} );
17180	},
17181
17182	_getCreateOptions: function() {
17183		var options = this._super();
17184		var element = this.element;
17185
17186		$.each( [ "min", "max", "step" ], function( i, option ) {
17187			var value = element.attr( option );
17188			if ( value != null && value.length ) {
17189				options[ option ] = value;
17190			}
17191		} );
17192
17193		return options;
17194	},
17195
17196	_events: {
17197		keydown: function( event ) {
17198			if ( this._start( event ) && this._keydown( event ) ) {
17199				event.preventDefault();
17200			}
17201		},
17202		keyup: "_stop",
17203		focus: function() {
17204			this.previous = this.element.val();
17205		},
17206		blur: function( event ) {
17207			if ( this.cancelBlur ) {
17208				delete this.cancelBlur;
17209				return;
17210			}
17211
17212			this._stop();
17213			this._refresh();
17214			if ( this.previous !== this.element.val() ) {
17215				this._trigger( "change", event );
17216			}
17217		},
17218		mousewheel: function( event, delta ) {
17219			var activeElement = $.ui.safeActiveElement( this.document[ 0 ] );
17220			var isActive = this.element[ 0 ] === activeElement;
17221
17222			if ( !isActive || !delta ) {
17223				return;
17224			}
17225
17226			if ( !this.spinning && !this._start( event ) ) {
17227				return false;
17228			}
17229
17230			this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
17231			clearTimeout( this.mousewheelTimer );
17232			this.mousewheelTimer = this._delay( function() {
17233				if ( this.spinning ) {
17234					this._stop( event );
17235				}
17236			}, 100 );
17237			event.preventDefault();
17238		},
17239		"mousedown .ui-spinner-button": function( event ) {
17240			var previous;
17241
17242			// We never want the buttons to have focus; whenever the user is
17243			// interacting with the spinner, the focus should be on the input.
17244			// If the input is focused then this.previous is properly set from
17245			// when the input first received focus. If the input is not focused
17246			// then we need to set this.previous based on the value before spinning.
17247			previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?
17248				this.previous : this.element.val();
17249			function checkFocus() {
17250				var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );
17251				if ( !isActive ) {
17252					this.element.trigger( "focus" );
17253					this.previous = previous;
17254
17255					// support: IE
17256					// IE sets focus asynchronously, so we need to check if focus
17257					// moved off of the input because the user clicked on the button.
17258					this._delay( function() {
17259						this.previous = previous;
17260					} );
17261				}
17262			}
17263
17264			// Ensure focus is on (or stays on) the text field
17265			event.preventDefault();
17266			checkFocus.call( this );
17267
17268			// Support: IE
17269			// IE doesn't prevent moving focus even with event.preventDefault()
17270			// so we set a flag to know when we should ignore the blur event
17271			// and check (again) if focus moved off of the input.
17272			this.cancelBlur = true;
17273			this._delay( function() {
17274				delete this.cancelBlur;
17275				checkFocus.call( this );
17276			} );
17277
17278			if ( this._start( event ) === false ) {
17279				return;
17280			}
17281
17282			this._repeat( null, $( event.currentTarget )
17283				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
17284		},
17285		"mouseup .ui-spinner-button": "_stop",
17286		"mouseenter .ui-spinner-button": function( event ) {
17287
17288			// button will add ui-state-active if mouse was down while mouseleave and kept down
17289			if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
17290				return;
17291			}
17292
17293			if ( this._start( event ) === false ) {
17294				return false;
17295			}
17296			this._repeat( null, $( event.currentTarget )
17297				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
17298		},
17299
17300		// TODO: do we really want to consider this a stop?
17301		// shouldn't we just stop the repeater and wait until mouseup before
17302		// we trigger the stop event?
17303		"mouseleave .ui-spinner-button": "_stop"
17304	},
17305
17306	// Support mobile enhanced option and make backcompat more sane
17307	_enhance: function() {
17308		this.uiSpinner = this.element
17309			.attr( "autocomplete", "off" )
17310			.wrap( "<span>" )
17311			.parent()
17312
17313				// Add buttons
17314				.append(
17315					"<a></a><a></a>"
17316				);
17317	},
17318
17319	_draw: function() {
17320		this._enhance();
17321
17322		this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
17323		this._addClass( "ui-spinner-input" );
17324
17325		this.element.attr( "role", "spinbutton" );
17326
17327		// Button bindings
17328		this.buttons = this.uiSpinner.children( "a" )
17329			.attr( "tabIndex", -1 )
17330			.attr( "aria-hidden", true )
17331			.button( {
17332				classes: {
17333					"ui-button": ""
17334				}
17335			} );
17336
17337		// TODO: Right now button does not support classes this is already updated in button PR
17338		this._removeClass( this.buttons, "ui-corner-all" );
17339
17340		this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
17341		this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
17342		this.buttons.first().button( {
17343			"icon": this.options.icons.up,
17344			"showLabel": false
17345		} );
17346		this.buttons.last().button( {
17347			"icon": this.options.icons.down,
17348			"showLabel": false
17349		} );
17350
17351		// IE 6 doesn't understand height: 50% for the buttons
17352		// unless the wrapper has an explicit height
17353		if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
17354				this.uiSpinner.height() > 0 ) {
17355			this.uiSpinner.height( this.uiSpinner.height() );
17356		}
17357	},
17358
17359	_keydown: function( event ) {
17360		var options = this.options,
17361			keyCode = $.ui.keyCode;
17362
17363		switch ( event.keyCode ) {
17364		case keyCode.UP:
17365			this._repeat( null, 1, event );
17366			return true;
17367		case keyCode.DOWN:
17368			this._repeat( null, -1, event );
17369			return true;
17370		case keyCode.PAGE_UP:
17371			this._repeat( null, options.page, event );
17372			return true;
17373		case keyCode.PAGE_DOWN:
17374			this._repeat( null, -options.page, event );
17375			return true;
17376		}
17377
17378		return false;
17379	},
17380
17381	_start: function( event ) {
17382		if ( !this.spinning && this._trigger( "start", event ) === false ) {
17383			return false;
17384		}
17385
17386		if ( !this.counter ) {
17387			this.counter = 1;
17388		}
17389		this.spinning = true;
17390		return true;
17391	},
17392
17393	_repeat: function( i, steps, event ) {
17394		i = i || 500;
17395
17396		clearTimeout( this.timer );
17397		this.timer = this._delay( function() {
17398			this._repeat( 40, steps, event );
17399		}, i );
17400
17401		this._spin( steps * this.options.step, event );
17402	},
17403
17404	_spin: function( step, event ) {
17405		var value = this.value() || 0;
17406
17407		if ( !this.counter ) {
17408			this.counter = 1;
17409		}
17410
17411		value = this._adjustValue( value + step * this._increment( this.counter ) );
17412
17413		if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
17414			this._value( value );
17415			this.counter++;
17416		}
17417	},
17418
17419	_increment: function( i ) {
17420		var incremental = this.options.incremental;
17421
17422		if ( incremental ) {
17423			return typeof incremental === "function" ?
17424				incremental( i ) :
17425				Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
17426		}
17427
17428		return 1;
17429	},
17430
17431	_precision: function() {
17432		var precision = this._precisionOf( this.options.step );
17433		if ( this.options.min !== null ) {
17434			precision = Math.max( precision, this._precisionOf( this.options.min ) );
17435		}
17436		return precision;
17437	},
17438
17439	_precisionOf: function( num ) {
17440		var str = num.toString(),
17441			decimal = str.indexOf( "." );
17442		return decimal === -1 ? 0 : str.length - decimal - 1;
17443	},
17444
17445	_adjustValue: function( value ) {
17446		var base, aboveMin,
17447			options = this.options;
17448
17449		// Make sure we're at a valid step
17450		// - find out where we are relative to the base (min or 0)
17451		base = options.min !== null ? options.min : 0;
17452		aboveMin = value - base;
17453
17454		// - round to the nearest step
17455		aboveMin = Math.round( aboveMin / options.step ) * options.step;
17456
17457		// - rounding is based on 0, so adjust back to our base
17458		value = base + aboveMin;
17459
17460		// Fix precision from bad JS floating point math
17461		value = parseFloat( value.toFixed( this._precision() ) );
17462
17463		// Clamp the value
17464		if ( options.max !== null && value > options.max ) {
17465			return options.max;
17466		}
17467		if ( options.min !== null && value < options.min ) {
17468			return options.min;
17469		}
17470
17471		return value;
17472	},
17473
17474	_stop: function( event ) {
17475		if ( !this.spinning ) {
17476			return;
17477		}
17478
17479		clearTimeout( this.timer );
17480		clearTimeout( this.mousewheelTimer );
17481		this.counter = 0;
17482		this.spinning = false;
17483		this._trigger( "stop", event );
17484	},
17485
17486	_setOption: function( key, value ) {
17487		var prevValue, first, last;
17488
17489		if ( key === "culture" || key === "numberFormat" ) {
17490			prevValue = this._parse( this.element.val() );
17491			this.options[ key ] = value;
17492			this.element.val( this._format( prevValue ) );
17493			return;
17494		}
17495
17496		if ( key === "max" || key === "min" || key === "step" ) {
17497			if ( typeof value === "string" ) {
17498				value = this._parse( value );
17499			}
17500		}
17501		if ( key === "icons" ) {
17502			first = this.buttons.first().find( ".ui-icon" );
17503			this._removeClass( first, null, this.options.icons.up );
17504			this._addClass( first, null, value.up );
17505			last = this.buttons.last().find( ".ui-icon" );
17506			this._removeClass( last, null, this.options.icons.down );
17507			this._addClass( last, null, value.down );
17508		}
17509
17510		this._super( key, value );
17511	},
17512
17513	_setOptionDisabled: function( value ) {
17514		this._super( value );
17515
17516		this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
17517		this.element.prop( "disabled", !!value );
17518		this.buttons.button( value ? "disable" : "enable" );
17519	},
17520
17521	_setOptions: spinnerModifier( function( options ) {
17522		this._super( options );
17523	} ),
17524
17525	_parse: function( val ) {
17526		if ( typeof val === "string" && val !== "" ) {
17527			val = window.Globalize && this.options.numberFormat ?
17528				Globalize.parseFloat( val, 10, this.options.culture ) : +val;
17529		}
17530		return val === "" || isNaN( val ) ? null : val;
17531	},
17532
17533	_format: function( value ) {
17534		if ( value === "" ) {
17535			return "";
17536		}
17537		return window.Globalize && this.options.numberFormat ?
17538			Globalize.format( value, this.options.numberFormat, this.options.culture ) :
17539			value;
17540	},
17541
17542	_refresh: function() {
17543		this.element.attr( {
17544			"aria-valuemin": this.options.min,
17545			"aria-valuemax": this.options.max,
17546
17547			// TODO: what should we do with values that can't be parsed?
17548			"aria-valuenow": this._parse( this.element.val() )
17549		} );
17550	},
17551
17552	isValid: function() {
17553		var value = this.value();
17554
17555		// Null is invalid
17556		if ( value === null ) {
17557			return false;
17558		}
17559
17560		// If value gets adjusted, it's invalid
17561		return value === this._adjustValue( value );
17562	},
17563
17564	// Update the value without triggering change
17565	_value: function( value, allowAny ) {
17566		var parsed;
17567		if ( value !== "" ) {
17568			parsed = this._parse( value );
17569			if ( parsed !== null ) {
17570				if ( !allowAny ) {
17571					parsed = this._adjustValue( parsed );
17572				}
17573				value = this._format( parsed );
17574			}
17575		}
17576		this.element.val( value );
17577		this._refresh();
17578	},
17579
17580	_destroy: function() {
17581		this.element
17582			.prop( "disabled", false )
17583			.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );
17584
17585		this.uiSpinner.replaceWith( this.element );
17586	},
17587
17588	stepUp: spinnerModifier( function( steps ) {
17589		this._stepUp( steps );
17590	} ),
17591	_stepUp: function( steps ) {
17592		if ( this._start() ) {
17593			this._spin( ( steps || 1 ) * this.options.step );
17594			this._stop();
17595		}
17596	},
17597
17598	stepDown: spinnerModifier( function( steps ) {
17599		this._stepDown( steps );
17600	} ),
17601	_stepDown: function( steps ) {
17602		if ( this._start() ) {
17603			this._spin( ( steps || 1 ) * -this.options.step );
17604			this._stop();
17605		}
17606	},
17607
17608	pageUp: spinnerModifier( function( pages ) {
17609		this._stepUp( ( pages || 1 ) * this.options.page );
17610	} ),
17611
17612	pageDown: spinnerModifier( function( pages ) {
17613		this._stepDown( ( pages || 1 ) * this.options.page );
17614	} ),
17615
17616	value: function( newVal ) {
17617		if ( !arguments.length ) {
17618			return this._parse( this.element.val() );
17619		}
17620		spinnerModifier( this._value ).call( this, newVal );
17621	},
17622
17623	widget: function() {
17624		return this.uiSpinner;
17625	}
17626} );
17627
17628// DEPRECATED
17629// TODO: switch return back to widget declaration at top of file when this is removed
17630if ( $.uiBackCompat !== false ) {
17631
17632	// Backcompat for spinner html extension points
17633	$.widget( "ui.spinner", $.ui.spinner, {
17634		_enhance: function() {
17635			this.uiSpinner = this.element
17636				.attr( "autocomplete", "off" )
17637				.wrap( this._uiSpinnerHtml() )
17638				.parent()
17639
17640					// Add buttons
17641					.append( this._buttonHtml() );
17642		},
17643		_uiSpinnerHtml: function() {
17644			return "<span>";
17645		},
17646
17647		_buttonHtml: function() {
17648			return "<a></a><a></a>";
17649		}
17650	} );
17651}
17652
17653var widgetsSpinner = $.ui.spinner;
17654
17655
17656/*!
17657 * jQuery UI Tabs 1.13.2
17658 * http://jqueryui.com
17659 *
17660 * Copyright jQuery Foundation and other contributors
17661 * Released under the MIT license.
17662 * http://jquery.org/license
17663 */
17664
17665//>>label: Tabs
17666//>>group: Widgets
17667//>>description: Transforms a set of container elements into a tab structure.
17668//>>docs: http://api.jqueryui.com/tabs/
17669//>>demos: http://jqueryui.com/tabs/
17670//>>css.structure: ../../themes/base/core.css
17671//>>css.structure: ../../themes/base/tabs.css
17672//>>css.theme: ../../themes/base/theme.css
17673
17674
17675$.widget( "ui.tabs", {
17676	version: "1.13.2",
17677	delay: 300,
17678	options: {
17679		active: null,
17680		classes: {
17681			"ui-tabs": "ui-corner-all",
17682			"ui-tabs-nav": "ui-corner-all",
17683			"ui-tabs-panel": "ui-corner-bottom",
17684			"ui-tabs-tab": "ui-corner-top"
17685		},
17686		collapsible: false,
17687		event: "click",
17688		heightStyle: "content",
17689		hide: null,
17690		show: null,
17691
17692		// Callbacks
17693		activate: null,
17694		beforeActivate: null,
17695		beforeLoad: null,
17696		load: null
17697	},
17698
17699	_isLocal: ( function() {
17700		var rhash = /#.*$/;
17701
17702		return function( anchor ) {
17703			var anchorUrl, locationUrl;
17704
17705			anchorUrl = anchor.href.replace( rhash, "" );
17706			locationUrl = location.href.replace( rhash, "" );
17707
17708			// Decoding may throw an error if the URL isn't UTF-8 (#9518)
17709			try {
17710				anchorUrl = decodeURIComponent( anchorUrl );
17711			} catch ( error ) {}
17712			try {
17713				locationUrl = decodeURIComponent( locationUrl );
17714			} catch ( error ) {}
17715
17716			return anchor.hash.length > 1 && anchorUrl === locationUrl;
17717		};
17718	} )(),
17719
17720	_create: function() {
17721		var that = this,
17722			options = this.options;
17723
17724		this.running = false;
17725
17726		this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
17727		this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
17728
17729		this._processTabs();
17730		options.active = this._initialActive();
17731
17732		// Take disabling tabs via class attribute from HTML
17733		// into account and update option properly.
17734		if ( Array.isArray( options.disabled ) ) {
17735			options.disabled = $.uniqueSort( options.disabled.concat(
17736				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
17737					return that.tabs.index( li );
17738				} )
17739			) ).sort();
17740		}
17741
17742		// Check for length avoids error when initializing empty list
17743		if ( this.options.active !== false && this.anchors.length ) {
17744			this.active = this._findActive( options.active );
17745		} else {
17746			this.active = $();
17747		}
17748
17749		this._refresh();
17750
17751		if ( this.active.length ) {
17752			this.load( options.active );
17753		}
17754	},
17755
17756	_initialActive: function() {
17757		var active = this.options.active,
17758			collapsible = this.options.collapsible,
17759			locationHash = location.hash.substring( 1 );
17760
17761		if ( active === null ) {
17762
17763			// check the fragment identifier in the URL
17764			if ( locationHash ) {
17765				this.tabs.each( function( i, tab ) {
17766					if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
17767						active = i;
17768						return false;
17769					}
17770				} );
17771			}
17772
17773			// Check for a tab marked active via a class
17774			if ( active === null ) {
17775				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
17776			}
17777
17778			// No active tab, set to false
17779			if ( active === null || active === -1 ) {
17780				active = this.tabs.length ? 0 : false;
17781			}
17782		}
17783
17784		// Handle numbers: negative, out of range
17785		if ( active !== false ) {
17786			active = this.tabs.index( this.tabs.eq( active ) );
17787			if ( active === -1 ) {
17788				active = collapsible ? false : 0;
17789			}
17790		}
17791
17792		// Don't allow collapsible: false and active: false
17793		if ( !collapsible && active === false && this.anchors.length ) {
17794			active = 0;
17795		}
17796
17797		return active;
17798	},
17799
17800	_getCreateEventData: function() {
17801		return {
17802			tab: this.active,
17803			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
17804		};
17805	},
17806
17807	_tabKeydown: function( event ) {
17808		var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
17809			selectedIndex = this.tabs.index( focusedTab ),
17810			goingForward = true;
17811
17812		if ( this._handlePageNav( event ) ) {
17813			return;
17814		}
17815
17816		switch ( event.keyCode ) {
17817		case $.ui.keyCode.RIGHT:
17818		case $.ui.keyCode.DOWN:
17819			selectedIndex++;
17820			break;
17821		case $.ui.keyCode.UP:
17822		case $.ui.keyCode.LEFT:
17823			goingForward = false;
17824			selectedIndex--;
17825			break;
17826		case $.ui.keyCode.END:
17827			selectedIndex = this.anchors.length - 1;
17828			break;
17829		case $.ui.keyCode.HOME:
17830			selectedIndex = 0;
17831			break;
17832		case $.ui.keyCode.SPACE:
17833
17834			// Activate only, no collapsing
17835			event.preventDefault();
17836			clearTimeout( this.activating );
17837			this._activate( selectedIndex );
17838			return;
17839		case $.ui.keyCode.ENTER:
17840
17841			// Toggle (cancel delayed activation, allow collapsing)
17842			event.preventDefault();
17843			clearTimeout( this.activating );
17844
17845			// Determine if we should collapse or activate
17846			this._activate( selectedIndex === this.options.active ? false : selectedIndex );
17847			return;
17848		default:
17849			return;
17850		}
17851
17852		// Focus the appropriate tab, based on which key was pressed
17853		event.preventDefault();
17854		clearTimeout( this.activating );
17855		selectedIndex = this._focusNextTab( selectedIndex, goingForward );
17856
17857		// Navigating with control/command key will prevent automatic activation
17858		if ( !event.ctrlKey && !event.metaKey ) {
17859
17860			// Update aria-selected immediately so that AT think the tab is already selected.
17861			// Otherwise AT may confuse the user by stating that they need to activate the tab,
17862			// but the tab will already be activated by the time the announcement finishes.
17863			focusedTab.attr( "aria-selected", "false" );
17864			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
17865
17866			this.activating = this._delay( function() {
17867				this.option( "active", selectedIndex );
17868			}, this.delay );
17869		}
17870	},
17871
17872	_panelKeydown: function( event ) {
17873		if ( this._handlePageNav( event ) ) {
17874			return;
17875		}
17876
17877		// Ctrl+up moves focus to the current tab
17878		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
17879			event.preventDefault();
17880			this.active.trigger( "focus" );
17881		}
17882	},
17883
17884	// Alt+page up/down moves focus to the previous/next tab (and activates)
17885	_handlePageNav: function( event ) {
17886		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
17887			this._activate( this._focusNextTab( this.options.active - 1, false ) );
17888			return true;
17889		}
17890		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
17891			this._activate( this._focusNextTab( this.options.active + 1, true ) );
17892			return true;
17893		}
17894	},
17895
17896	_findNextTab: function( index, goingForward ) {
17897		var lastTabIndex = this.tabs.length - 1;
17898
17899		function constrain() {
17900			if ( index > lastTabIndex ) {
17901				index = 0;
17902			}
17903			if ( index < 0 ) {
17904				index = lastTabIndex;
17905			}
17906			return index;
17907		}
17908
17909		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
17910			index = goingForward ? index + 1 : index - 1;
17911		}
17912
17913		return index;
17914	},
17915
17916	_focusNextTab: function( index, goingForward ) {
17917		index = this._findNextTab( index, goingForward );
17918		this.tabs.eq( index ).trigger( "focus" );
17919		return index;
17920	},
17921
17922	_setOption: function( key, value ) {
17923		if ( key === "active" ) {
17924
17925			// _activate() will handle invalid values and update this.options
17926			this._activate( value );
17927			return;
17928		}
17929
17930		this._super( key, value );
17931
17932		if ( key === "collapsible" ) {
17933			this._toggleClass( "ui-tabs-collapsible", null, value );
17934
17935			// Setting collapsible: false while collapsed; open first panel
17936			if ( !value && this.options.active === false ) {
17937				this._activate( 0 );
17938			}
17939		}
17940
17941		if ( key === "event" ) {
17942			this._setupEvents( value );
17943		}
17944
17945		if ( key === "heightStyle" ) {
17946			this._setupHeightStyle( value );
17947		}
17948	},
17949
17950	_sanitizeSelector: function( hash ) {
17951		return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
17952	},
17953
17954	refresh: function() {
17955		var options = this.options,
17956			lis = this.tablist.children( ":has(a[href])" );
17957
17958		// Get disabled tabs from class attribute from HTML
17959		// this will get converted to a boolean if needed in _refresh()
17960		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
17961			return lis.index( tab );
17962		} );
17963
17964		this._processTabs();
17965
17966		// Was collapsed or no tabs
17967		if ( options.active === false || !this.anchors.length ) {
17968			options.active = false;
17969			this.active = $();
17970
17971		// was active, but active tab is gone
17972		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
17973
17974			// all remaining tabs are disabled
17975			if ( this.tabs.length === options.disabled.length ) {
17976				options.active = false;
17977				this.active = $();
17978
17979			// activate previous tab
17980			} else {
17981				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
17982			}
17983
17984		// was active, active tab still exists
17985		} else {
17986
17987			// make sure active index is correct
17988			options.active = this.tabs.index( this.active );
17989		}
17990
17991		this._refresh();
17992	},
17993
17994	_refresh: function() {
17995		this._setOptionDisabled( this.options.disabled );
17996		this._setupEvents( this.options.event );
17997		this._setupHeightStyle( this.options.heightStyle );
17998
17999		this.tabs.not( this.active ).attr( {
18000			"aria-selected": "false",
18001			"aria-expanded": "false",
18002			tabIndex: -1
18003		} );
18004		this.panels.not( this._getPanelForTab( this.active ) )
18005			.hide()
18006			.attr( {
18007				"aria-hidden": "true"
18008			} );
18009
18010		// Make sure one tab is in the tab order
18011		if ( !this.active.length ) {
18012			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
18013		} else {
18014			this.active
18015				.attr( {
18016					"aria-selected": "true",
18017					"aria-expanded": "true",
18018					tabIndex: 0
18019				} );
18020			this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
18021			this._getPanelForTab( this.active )
18022				.show()
18023				.attr( {
18024					"aria-hidden": "false"
18025				} );
18026		}
18027	},
18028
18029	_processTabs: function() {
18030		var that = this,
18031			prevTabs = this.tabs,
18032			prevAnchors = this.anchors,
18033			prevPanels = this.panels;
18034
18035		this.tablist = this._getList().attr( "role", "tablist" );
18036		this._addClass( this.tablist, "ui-tabs-nav",
18037			"ui-helper-reset ui-helper-clearfix ui-widget-header" );
18038
18039		// Prevent users from focusing disabled tabs via click
18040		this.tablist
18041			.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
18042				if ( $( this ).is( ".ui-state-disabled" ) ) {
18043					event.preventDefault();
18044				}
18045			} )
18046
18047			// Support: IE <9
18048			// Preventing the default action in mousedown doesn't prevent IE
18049			// from focusing the element, so if the anchor gets focused, blur.
18050			// We don't have to worry about focusing the previously focused
18051			// element since clicking on a non-focusable element should focus
18052			// the body anyway.
18053			.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
18054				if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
18055					this.blur();
18056				}
18057			} );
18058
18059		this.tabs = this.tablist.find( "> li:has(a[href])" )
18060			.attr( {
18061				role: "tab",
18062				tabIndex: -1
18063			} );
18064		this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
18065
18066		this.anchors = this.tabs.map( function() {
18067			return $( "a", this )[ 0 ];
18068		} )
18069			.attr( {
18070				tabIndex: -1
18071			} );
18072		this._addClass( this.anchors, "ui-tabs-anchor" );
18073
18074		this.panels = $();
18075
18076		this.anchors.each( function( i, anchor ) {
18077			var selector, panel, panelId,
18078				anchorId = $( anchor ).uniqueId().attr( "id" ),
18079				tab = $( anchor ).closest( "li" ),
18080				originalAriaControls = tab.attr( "aria-controls" );
18081
18082			// Inline tab
18083			if ( that._isLocal( anchor ) ) {
18084				selector = anchor.hash;
18085				panelId = selector.substring( 1 );
18086				panel = that.element.find( that._sanitizeSelector( selector ) );
18087
18088			// remote tab
18089			} else {
18090
18091				// If the tab doesn't already have aria-controls,
18092				// generate an id by using a throw-away element
18093				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
18094				selector = "#" + panelId;
18095				panel = that.element.find( selector );
18096				if ( !panel.length ) {
18097					panel = that._createPanel( panelId );
18098					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
18099				}
18100				panel.attr( "aria-live", "polite" );
18101			}
18102
18103			if ( panel.length ) {
18104				that.panels = that.panels.add( panel );
18105			}
18106			if ( originalAriaControls ) {
18107				tab.data( "ui-tabs-aria-controls", originalAriaControls );
18108			}
18109			tab.attr( {
18110				"aria-controls": panelId,
18111				"aria-labelledby": anchorId
18112			} );
18113			panel.attr( "aria-labelledby", anchorId );
18114		} );
18115
18116		this.panels.attr( "role", "tabpanel" );
18117		this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
18118
18119		// Avoid memory leaks (#10056)
18120		if ( prevTabs ) {
18121			this._off( prevTabs.not( this.tabs ) );
18122			this._off( prevAnchors.not( this.anchors ) );
18123			this._off( prevPanels.not( this.panels ) );
18124		}
18125	},
18126
18127	// Allow overriding how to find the list for rare usage scenarios (#7715)
18128	_getList: function() {
18129		return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
18130	},
18131
18132	_createPanel: function( id ) {
18133		return $( "<div>" )
18134			.attr( "id", id )
18135			.data( "ui-tabs-destroy", true );
18136	},
18137
18138	_setOptionDisabled: function( disabled ) {
18139		var currentItem, li, i;
18140
18141		if ( Array.isArray( disabled ) ) {
18142			if ( !disabled.length ) {
18143				disabled = false;
18144			} else if ( disabled.length === this.anchors.length ) {
18145				disabled = true;
18146			}
18147		}
18148
18149		// Disable tabs
18150		for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
18151			currentItem = $( li );
18152			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
18153				currentItem.attr( "aria-disabled", "true" );
18154				this._addClass( currentItem, null, "ui-state-disabled" );
18155			} else {
18156				currentItem.removeAttr( "aria-disabled" );
18157				this._removeClass( currentItem, null, "ui-state-disabled" );
18158			}
18159		}
18160
18161		this.options.disabled = disabled;
18162
18163		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
18164			disabled === true );
18165	},
18166
18167	_setupEvents: function( event ) {
18168		var events = {};
18169		if ( event ) {
18170			$.each( event.split( " " ), function( index, eventName ) {
18171				events[ eventName ] = "_eventHandler";
18172			} );
18173		}
18174
18175		this._off( this.anchors.add( this.tabs ).add( this.panels ) );
18176
18177		// Always prevent the default action, even when disabled
18178		this._on( true, this.anchors, {
18179			click: function( event ) {
18180				event.preventDefault();
18181			}
18182		} );
18183		this._on( this.anchors, events );
18184		this._on( this.tabs, { keydown: "_tabKeydown" } );
18185		this._on( this.panels, { keydown: "_panelKeydown" } );
18186
18187		this._focusable( this.tabs );
18188		this._hoverable( this.tabs );
18189	},
18190
18191	_setupHeightStyle: function( heightStyle ) {
18192		var maxHeight,
18193			parent = this.element.parent();
18194
18195		if ( heightStyle === "fill" ) {
18196			maxHeight = parent.height();
18197			maxHeight -= this.element.outerHeight() - this.element.height();
18198
18199			this.element.siblings( ":visible" ).each( function() {
18200				var elem = $( this ),
18201					position = elem.css( "position" );
18202
18203				if ( position === "absolute" || position === "fixed" ) {
18204					return;
18205				}
18206				maxHeight -= elem.outerHeight( true );
18207			} );
18208
18209			this.element.children().not( this.panels ).each( function() {
18210				maxHeight -= $( this ).outerHeight( true );
18211			} );
18212
18213			this.panels.each( function() {
18214				$( this ).height( Math.max( 0, maxHeight -
18215					$( this ).innerHeight() + $( this ).height() ) );
18216			} )
18217				.css( "overflow", "auto" );
18218		} else if ( heightStyle === "auto" ) {
18219			maxHeight = 0;
18220			this.panels.each( function() {
18221				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
18222			} ).height( maxHeight );
18223		}
18224	},
18225
18226	_eventHandler: function( event ) {
18227		var options = this.options,
18228			active = this.active,
18229			anchor = $( event.currentTarget ),
18230			tab = anchor.closest( "li" ),
18231			clickedIsActive = tab[ 0 ] === active[ 0 ],
18232			collapsing = clickedIsActive && options.collapsible,
18233			toShow = collapsing ? $() : this._getPanelForTab( tab ),
18234			toHide = !active.length ? $() : this._getPanelForTab( active ),
18235			eventData = {
18236				oldTab: active,
18237				oldPanel: toHide,
18238				newTab: collapsing ? $() : tab,
18239				newPanel: toShow
18240			};
18241
18242		event.preventDefault();
18243
18244		if ( tab.hasClass( "ui-state-disabled" ) ||
18245
18246				// tab is already loading
18247				tab.hasClass( "ui-tabs-loading" ) ||
18248
18249				// can't switch durning an animation
18250				this.running ||
18251
18252				// click on active header, but not collapsible
18253				( clickedIsActive && !options.collapsible ) ||
18254
18255				// allow canceling activation
18256				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
18257			return;
18258		}
18259
18260		options.active = collapsing ? false : this.tabs.index( tab );
18261
18262		this.active = clickedIsActive ? $() : tab;
18263		if ( this.xhr ) {
18264			this.xhr.abort();
18265		}
18266
18267		if ( !toHide.length && !toShow.length ) {
18268			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
18269		}
18270
18271		if ( toShow.length ) {
18272			this.load( this.tabs.index( tab ), event );
18273		}
18274		this._toggle( event, eventData );
18275	},
18276
18277	// Handles show/hide for selecting tabs
18278	_toggle: function( event, eventData ) {
18279		var that = this,
18280			toShow = eventData.newPanel,
18281			toHide = eventData.oldPanel;
18282
18283		this.running = true;
18284
18285		function complete() {
18286			that.running = false;
18287			that._trigger( "activate", event, eventData );
18288		}
18289
18290		function show() {
18291			that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
18292
18293			if ( toShow.length && that.options.show ) {
18294				that._show( toShow, that.options.show, complete );
18295			} else {
18296				toShow.show();
18297				complete();
18298			}
18299		}
18300
18301		// Start out by hiding, then showing, then completing
18302		if ( toHide.length && this.options.hide ) {
18303			this._hide( toHide, this.options.hide, function() {
18304				that._removeClass( eventData.oldTab.closest( "li" ),
18305					"ui-tabs-active", "ui-state-active" );
18306				show();
18307			} );
18308		} else {
18309			this._removeClass( eventData.oldTab.closest( "li" ),
18310				"ui-tabs-active", "ui-state-active" );
18311			toHide.hide();
18312			show();
18313		}
18314
18315		toHide.attr( "aria-hidden", "true" );
18316		eventData.oldTab.attr( {
18317			"aria-selected": "false",
18318			"aria-expanded": "false"
18319		} );
18320
18321		// If we're switching tabs, remove the old tab from the tab order.
vendor: 4,129 bytes, lines 18322-18493
18322		// If we're opening from collapsed state, remove the previous tab from the tab order.
18323		// If we're collapsing, then keep the collapsing tab in the tab order.
18324		if ( toShow.length && toHide.length ) {
18325			eventData.oldTab.attr( "tabIndex", -1 );
18326		} else if ( toShow.length ) {
18327			this.tabs.filter( function() {
18328				return $( this ).attr( "tabIndex" ) === 0;
18329			} )
18330				.attr( "tabIndex", -1 );
18331		}
18332
18333		toShow.attr( "aria-hidden", "false" );
18334		eventData.newTab.attr( {
18335			"aria-selected": "true",
18336			"aria-expanded": "true",
18337			tabIndex: 0
18338		} );
18339	},
18340
18341	_activate: function( index ) {
18342		var anchor,
18343			active = this._findActive( index );
18344
18345		// Trying to activate the already active panel
18346		if ( active[ 0 ] === this.active[ 0 ] ) {
18347			return;
18348		}
18349
18350		// Trying to collapse, simulate a click on the current active header
18351		if ( !active.length ) {
18352			active = this.active;
18353		}
18354
18355		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
18356		this._eventHandler( {
18357			target: anchor,
18358			currentTarget: anchor,
18359			preventDefault: $.noop
18360		} );
18361	},
18362
18363	_findActive: function( index ) {
18364		return index === false ? $() : this.tabs.eq( index );
18365	},
18366
18367	_getIndex: function( index ) {
18368
18369		// meta-function to give users option to provide a href string instead of a numerical index.
18370		if ( typeof index === "string" ) {
18371			index = this.anchors.index( this.anchors.filter( "[href$='" +
18372				$.escapeSelector( index ) + "']" ) );
18373		}
18374
18375		return index;
18376	},
18377
18378	_destroy: function() {
18379		if ( this.xhr ) {
18380			this.xhr.abort();
18381		}
18382
18383		this.tablist
18384			.removeAttr( "role" )
18385			.off( this.eventNamespace );
18386
18387		this.anchors
18388			.removeAttr( "role tabIndex" )
18389			.removeUniqueId();
18390
18391		this.tabs.add( this.panels ).each( function() {
18392			if ( $.data( this, "ui-tabs-destroy" ) ) {
18393				$( this ).remove();
18394			} else {
18395				$( this ).removeAttr( "role tabIndex " +
18396					"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
18397			}
18398		} );
18399
18400		this.tabs.each( function() {
18401			var li = $( this ),
18402				prev = li.data( "ui-tabs-aria-controls" );
18403			if ( prev ) {
18404				li
18405					.attr( "aria-controls", prev )
18406					.removeData( "ui-tabs-aria-controls" );
18407			} else {
18408				li.removeAttr( "aria-controls" );
18409			}
18410		} );
18411
18412		this.panels.show();
18413
18414		if ( this.options.heightStyle !== "content" ) {
18415			this.panels.css( "height", "" );
18416		}
18417	},
18418
18419	enable: function( index ) {
18420		var disabled = this.options.disabled;
18421		if ( disabled === false ) {
18422			return;
18423		}
18424
18425		if ( index === undefined ) {
18426			disabled = false;
18427		} else {
18428			index = this._getIndex( index );
18429			if ( Array.isArray( disabled ) ) {
18430				disabled = $.map( disabled, function( num ) {
18431					return num !== index ? num : null;
18432				} );
18433			} else {
18434				disabled = $.map( this.tabs, function( li, num ) {
18435					return num !== index ? num : null;
18436				} );
18437			}
18438		}
18439		this._setOptionDisabled( disabled );
18440	},
18441
18442	disable: function( index ) {
18443		var disabled = this.options.disabled;
18444		if ( disabled === true ) {
18445			return;
18446		}
18447
18448		if ( index === undefined ) {
18449			disabled = true;
18450		} else {
18451			index = this._getIndex( index );
18452			if ( $.inArray( index, disabled ) !== -1 ) {
18453				return;
18454			}
18455			if ( Array.isArray( disabled ) ) {
18456				disabled = $.merge( [ index ], disabled ).sort();
18457			} else {
18458				disabled = [ index ];
18459			}
18460		}
18461		this._setOptionDisabled( disabled );
18462	},
18463
18464	load: function( index, event ) {
18465		index = this._getIndex( index );
18466		var that = this,
18467			tab = this.tabs.eq( index ),
18468			anchor = tab.find( ".ui-tabs-anchor" ),
18469			panel = this._getPanelForTab( tab ),
18470			eventData = {
18471				tab: tab,
18472				panel: panel
18473			},
18474			complete = function( jqXHR, status ) {
18475				if ( status === "abort" ) {
18476					that.panels.stop( false, true );
18477				}
18478
18479				that._removeClass( tab, "ui-tabs-loading" );
18480				panel.removeAttr( "aria-busy" );
18481
18482				if ( jqXHR === that.xhr ) {
18483					delete that.xhr;
18484				}
18485			};
18486
18487		// Not remote
18488		if ( this._isLocal( anchor[ 0 ] ) ) {
18489			return;
18490		}
18491
18492		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
18493
vendor: 16,527 bytes, lines 18494-19071
18494		// Support: jQuery <1.8
18495		// jQuery <1.8 returns false if the request is canceled in beforeSend,
18496		// but as of 1.8, $.ajax() always returns a jqXHR object.
18497		if ( this.xhr && this.xhr.statusText !== "canceled" ) {
18498			this._addClass( tab, "ui-tabs-loading" );
18499			panel.attr( "aria-busy", "true" );
18500
18501			this.xhr
18502				.done( function( response, status, jqXHR ) {
18503
18504					// support: jQuery <1.8
18505					// http://bugs.jquery.com/ticket/11778
18506					setTimeout( function() {
18507						panel.html( response );
18508						that._trigger( "load", event, eventData );
18509
18510						complete( jqXHR, status );
18511					}, 1 );
18512				} )
18513				.fail( function( jqXHR, status ) {
18514
18515					// support: jQuery <1.8
18516					// http://bugs.jquery.com/ticket/11778
18517					setTimeout( function() {
18518						complete( jqXHR, status );
18519					}, 1 );
18520				} );
18521		}
18522	},
18523
18524	_ajaxSettings: function( anchor, event, eventData ) {
18525		var that = this;
18526		return {
18527
18528			// Support: IE <11 only
18529			// Strip any hash that exists to prevent errors with the Ajax request
18530			url: anchor.attr( "href" ).replace( /#.*$/, "" ),
18531			beforeSend: function( jqXHR, settings ) {
18532				return that._trigger( "beforeLoad", event,
18533					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
18534			}
18535		};
18536	},
18537
18538	_getPanelForTab: function( tab ) {
18539		var id = $( tab ).attr( "aria-controls" );
18540		return this.element.find( this._sanitizeSelector( "#" + id ) );
18541	}
18542} );
18543
18544// DEPRECATED
18545// TODO: Switch return back to widget declaration at top of file when this is removed
18546if ( $.uiBackCompat !== false ) {
18547
18548	// Backcompat for ui-tab class (now ui-tabs-tab)
18549	$.widget( "ui.tabs", $.ui.tabs, {
18550		_processTabs: function() {
18551			this._superApply( arguments );
18552			this._addClass( this.tabs, "ui-tab" );
18553		}
18554	} );
18555}
18556
18557var widgetsTabs = $.ui.tabs;
18558
18559
18560/*!
18561 * jQuery UI Tooltip 1.13.2
18562 * http://jqueryui.com
18563 *
18564 * Copyright jQuery Foundation and other contributors
18565 * Released under the MIT license.
18566 * http://jquery.org/license
18567 */
18568
18569//>>label: Tooltip
18570//>>group: Widgets
18571//>>description: Shows additional information for any element on hover or focus.
18572//>>docs: http://api.jqueryui.com/tooltip/
18573//>>demos: http://jqueryui.com/tooltip/
18574//>>css.structure: ../../themes/base/core.css
18575//>>css.structure: ../../themes/base/tooltip.css
18576//>>css.theme: ../../themes/base/theme.css
18577
18578
18579$.widget( "ui.tooltip", {
18580	version: "1.13.2",
18581	options: {
18582		classes: {
18583			"ui-tooltip": "ui-corner-all ui-widget-shadow"
18584		},
18585		content: function() {
18586			var title = $( this ).attr( "title" );
18587
18588			// Escape title, since we're going from an attribute to raw HTML
18589			return $( "<a>" ).text( title ).html();
18590		},
18591		hide: true,
18592
18593		// Disabled elements have inconsistent behavior across browsers (#8661)
18594		items: "[title]:not([disabled])",
18595		position: {
18596			my: "left top+15",
18597			at: "left bottom",
18598			collision: "flipfit flip"
18599		},
18600		show: true,
18601		track: false,
18602
18603		// Callbacks
18604		close: null,
18605		open: null
18606	},
18607
18608	_addDescribedBy: function( elem, id ) {
18609		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
18610		describedby.push( id );
18611		elem
18612			.data( "ui-tooltip-id", id )
18613			.attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) );
18614	},
18615
18616	_removeDescribedBy: function( elem ) {
18617		var id = elem.data( "ui-tooltip-id" ),
18618			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
18619			index = $.inArray( id, describedby );
18620
18621		if ( index !== -1 ) {
18622			describedby.splice( index, 1 );
18623		}
18624
18625		elem.removeData( "ui-tooltip-id" );
18626		describedby = String.prototype.trim.call( describedby.join( " " ) );
18627		if ( describedby ) {
18628			elem.attr( "aria-describedby", describedby );
18629		} else {
18630			elem.removeAttr( "aria-describedby" );
18631		}
18632	},
18633
18634	_create: function() {
18635		this._on( {
18636			mouseover: "open",
18637			focusin: "open"
18638		} );
18639
18640		// IDs of generated tooltips, needed for destroy
18641		this.tooltips = {};
18642
18643		// IDs of parent tooltips where we removed the title attribute
18644		this.parents = {};
18645
18646		// Append the aria-live region so tooltips announce correctly
18647		this.liveRegion = $( "<div>" )
18648			.attr( {
18649				role: "log",
18650				"aria-live": "assertive",
18651				"aria-relevant": "additions"
18652			} )
18653			.appendTo( this.document[ 0 ].body );
18654		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
18655
18656		this.disabledTitles = $( [] );
18657	},
18658
18659	_setOption: function( key, value ) {
18660		var that = this;
18661
18662		this._super( key, value );
18663
18664		if ( key === "content" ) {
18665			$.each( this.tooltips, function( id, tooltipData ) {
18666				that._updateContent( tooltipData.element );
18667			} );
18668		}
18669	},
18670
18671	_setOptionDisabled: function( value ) {
18672		this[ value ? "_disable" : "_enable" ]();
18673	},
18674
18675	_disable: function() {
18676		var that = this;
18677
18678		// Close open tooltips
18679		$.each( this.tooltips, function( id, tooltipData ) {
18680			var event = $.Event( "blur" );
18681			event.target = event.currentTarget = tooltipData.element[ 0 ];
18682			that.close( event, true );
18683		} );
18684
18685		// Remove title attributes to prevent native tooltips
18686		this.disabledTitles = this.disabledTitles.add(
18687			this.element.find( this.options.items ).addBack()
18688				.filter( function() {
18689					var element = $( this );
18690					if ( element.is( "[title]" ) ) {
18691						return element
18692							.data( "ui-tooltip-title", element.attr( "title" ) )
18693							.removeAttr( "title" );
18694					}
18695				} )
18696		);
18697	},
18698
18699	_enable: function() {
18700
18701		// restore title attributes
18702		this.disabledTitles.each( function() {
18703			var element = $( this );
18704			if ( element.data( "ui-tooltip-title" ) ) {
18705				element.attr( "title", element.data( "ui-tooltip-title" ) );
18706			}
18707		} );
18708		this.disabledTitles = $( [] );
18709	},
18710
18711	open: function( event ) {
18712		var that = this,
18713			target = $( event ? event.target : this.element )
18714
18715				// we need closest here due to mouseover bubbling,
18716				// but always pointing at the same event target
18717				.closest( this.options.items );
18718
18719		// No element to show a tooltip for or the tooltip is already open
18720		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
18721			return;
18722		}
18723
18724		if ( target.attr( "title" ) ) {
18725			target.data( "ui-tooltip-title", target.attr( "title" ) );
18726		}
18727
18728		target.data( "ui-tooltip-open", true );
18729
18730		// Kill parent tooltips, custom or native, for hover
18731		if ( event && event.type === "mouseover" ) {
18732			target.parents().each( function() {
18733				var parent = $( this ),
18734					blurEvent;
18735				if ( parent.data( "ui-tooltip-open" ) ) {
18736					blurEvent = $.Event( "blur" );
18737					blurEvent.target = blurEvent.currentTarget = this;
18738					that.close( blurEvent, true );
18739				}
18740				if ( parent.attr( "title" ) ) {
18741					parent.uniqueId();
18742					that.parents[ this.id ] = {
18743						element: this,
18744						title: parent.attr( "title" )
18745					};
18746					parent.attr( "title", "" );
18747				}
18748			} );
18749		}
18750
18751		this._registerCloseHandlers( event, target );
18752		this._updateContent( target, event );
18753	},
18754
18755	_updateContent: function( target, event ) {
18756		var content,
18757			contentOption = this.options.content,
18758			that = this,
18759			eventType = event ? event.type : null;
18760
18761		if ( typeof contentOption === "string" || contentOption.nodeType ||
18762				contentOption.jquery ) {
18763			return this._open( event, target, contentOption );
18764		}
18765
18766		content = contentOption.call( target[ 0 ], function( response ) {
18767
18768			// IE may instantly serve a cached response for ajax requests
18769			// delay this call to _open so the other call to _open runs first
18770			that._delay( function() {
18771
18772				// Ignore async response if tooltip was closed already
18773				if ( !target.data( "ui-tooltip-open" ) ) {
18774					return;
18775				}
18776
18777				// JQuery creates a special event for focusin when it doesn't
18778				// exist natively. To improve performance, the native event
18779				// object is reused and the type is changed. Therefore, we can't
18780				// rely on the type being correct after the event finished
18781				// bubbling, so we set it back to the previous value. (#8740)
18782				if ( event ) {
18783					event.type = eventType;
18784				}
18785				this._open( event, target, response );
18786			} );
18787		} );
18788		if ( content ) {
18789			this._open( event, target, content );
18790		}
18791	},
18792
18793	_open: function( event, target, content ) {
18794		var tooltipData, tooltip, delayedShow, a11yContent,
18795			positionOption = $.extend( {}, this.options.position );
18796
18797		if ( !content ) {
18798			return;
18799		}
18800
18801		// Content can be updated multiple times. If the tooltip already
18802		// exists, then just update the content and bail.
18803		tooltipData = this._find( target );
18804		if ( tooltipData ) {
18805			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
18806			return;
18807		}
18808
18809		// If we have a title, clear it to prevent the native tooltip
18810		// we have to check first to avoid defining a title if none exists
18811		// (we don't want to cause an element to start matching [title])
18812		//
18813		// We use removeAttr only for key events, to allow IE to export the correct
18814		// accessible attributes. For mouse events, set to empty string to avoid
18815		// native tooltip showing up (happens only when removing inside mouseover).
18816		if ( target.is( "[title]" ) ) {
18817			if ( event && event.type === "mouseover" ) {
18818				target.attr( "title", "" );
18819			} else {
18820				target.removeAttr( "title" );
18821			}
18822		}
18823
18824		tooltipData = this._tooltip( target );
18825		tooltip = tooltipData.tooltip;
18826		this._addDescribedBy( target, tooltip.attr( "id" ) );
18827		tooltip.find( ".ui-tooltip-content" ).html( content );
18828
18829		// Support: Voiceover on OS X, JAWS on IE <= 9
18830		// JAWS announces deletions even when aria-relevant="additions"
18831		// Voiceover will sometimes re-read the entire log region's contents from the beginning
18832		this.liveRegion.children().hide();
18833		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
18834		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
18835		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
18836		a11yContent.appendTo( this.liveRegion );
18837
18838		function position( event ) {
18839			positionOption.of = event;
18840			if ( tooltip.is( ":hidden" ) ) {
18841				return;
18842			}
18843			tooltip.position( positionOption );
18844		}
18845		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
18846			this._on( this.document, {
18847				mousemove: position
18848			} );
18849
18850			// trigger once to override element-relative positioning
18851			position( event );
18852		} else {
18853			tooltip.position( $.extend( {
18854				of: target
18855			}, this.options.position ) );
18856		}
18857
18858		tooltip.hide();
18859
18860		this._show( tooltip, this.options.show );
18861
18862		// Handle tracking tooltips that are shown with a delay (#8644). As soon
18863		// as the tooltip is visible, position the tooltip using the most recent
18864		// event.
18865		// Adds the check to add the timers only when both delay and track options are set (#14682)
18866		if ( this.options.track && this.options.show && this.options.show.delay ) {
18867			delayedShow = this.delayedShow = setInterval( function() {
18868				if ( tooltip.is( ":visible" ) ) {
18869					position( positionOption.of );
18870					clearInterval( delayedShow );
18871				}
18872			}, 13 );
18873		}
18874
18875		this._trigger( "open", event, { tooltip: tooltip } );
18876	},
18877
18878	_registerCloseHandlers: function( event, target ) {
18879		var events = {
18880			keyup: function( event ) {
18881				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
18882					var fakeEvent = $.Event( event );
18883					fakeEvent.currentTarget = target[ 0 ];
18884					this.close( fakeEvent, true );
18885				}
18886			}
18887		};
18888
18889		// Only bind remove handler for delegated targets. Non-delegated
18890		// tooltips will handle this in destroy.
18891		if ( target[ 0 ] !== this.element[ 0 ] ) {
18892			events.remove = function() {
18893				var targetElement = this._find( target );
18894				if ( targetElement ) {
18895					this._removeTooltip( targetElement.tooltip );
18896				}
18897			};
18898		}
18899
18900		if ( !event || event.type === "mouseover" ) {
18901			events.mouseleave = "close";
18902		}
18903		if ( !event || event.type === "focusin" ) {
18904			events.focusout = "close";
18905		}
18906		this._on( true, target, events );
18907	},
18908
18909	close: function( event ) {
18910		var tooltip,
18911			that = this,
18912			target = $( event ? event.currentTarget : this.element ),
18913			tooltipData = this._find( target );
18914
18915		// The tooltip may already be closed
18916		if ( !tooltipData ) {
18917
18918			// We set ui-tooltip-open immediately upon open (in open()), but only set the
18919			// additional data once there's actually content to show (in _open()). So even if the
18920			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
18921			// the period between open() and _open().
18922			target.removeData( "ui-tooltip-open" );
18923			return;
18924		}
18925
18926		tooltip = tooltipData.tooltip;
18927
18928		// Disabling closes the tooltip, so we need to track when we're closing
18929		// to avoid an infinite loop in case the tooltip becomes disabled on close
18930		if ( tooltipData.closing ) {
18931			return;
18932		}
18933
18934		// Clear the interval for delayed tracking tooltips
18935		clearInterval( this.delayedShow );
18936
18937		// Only set title if we had one before (see comment in _open())
18938		// If the title attribute has changed since open(), don't restore
18939		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
18940			target.attr( "title", target.data( "ui-tooltip-title" ) );
18941		}
18942
18943		this._removeDescribedBy( target );
18944
18945		tooltipData.hiding = true;
18946		tooltip.stop( true );
18947		this._hide( tooltip, this.options.hide, function() {
18948			that._removeTooltip( $( this ) );
18949		} );
18950
18951		target.removeData( "ui-tooltip-open" );
18952		this._off( target, "mouseleave focusout keyup" );
18953
18954		// Remove 'remove' binding only on delegated targets
18955		if ( target[ 0 ] !== this.element[ 0 ] ) {
18956			this._off( target, "remove" );
18957		}
18958		this._off( this.document, "mousemove" );
18959
18960		if ( event && event.type === "mouseleave" ) {
18961			$.each( this.parents, function( id, parent ) {
18962				$( parent.element ).attr( "title", parent.title );
18963				delete that.parents[ id ];
18964			} );
18965		}
18966
18967		tooltipData.closing = true;
18968		this._trigger( "close", event, { tooltip: tooltip } );
18969		if ( !tooltipData.hiding ) {
18970			tooltipData.closing = false;
18971		}
18972	},
18973
18974	_tooltip: function( element ) {
18975		var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
18976			content = $( "<div>" ).appendTo( tooltip ),
18977			id = tooltip.uniqueId().attr( "id" );
18978
18979		this._addClass( content, "ui-tooltip-content" );
18980		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
18981
18982		tooltip.appendTo( this._appendTo( element ) );
18983
18984		return this.tooltips[ id ] = {
18985			element: element,
18986			tooltip: tooltip
18987		};
18988	},
18989
18990	_find: function( target ) {
18991		var id = target.data( "ui-tooltip-id" );
18992		return id ? this.tooltips[ id ] : null;
18993	},
18994
18995	_removeTooltip: function( tooltip ) {
18996
18997		// Clear the interval for delayed tracking tooltips
18998		clearInterval( this.delayedShow );
18999
19000		tooltip.remove();
19001		delete this.tooltips[ tooltip.attr( "id" ) ];
19002	},
19003
19004	_appendTo: function( target ) {
19005		var element = target.closest( ".ui-front, dialog" );
19006
19007		if ( !element.length ) {
19008			element = this.document[ 0 ].body;
19009		}
19010
19011		return element;
19012	},
19013
19014	_destroy: function() {
19015		var that = this;
19016
19017		// Close open tooltips
19018		$.each( this.tooltips, function( id, tooltipData ) {
19019
19020			// Delegate to close method to handle common cleanup
19021			var event = $.Event( "blur" ),
19022				element = tooltipData.element;
19023			event.target = event.currentTarget = element[ 0 ];
19024			that.close( event, true );
19025
19026			// Remove immediately; destroying an open tooltip doesn't use the
19027			// hide animation
19028			$( "#" + id ).remove();
19029
19030			// Restore the title
19031			if ( element.data( "ui-tooltip-title" ) ) {
19032
19033				// If the title attribute has changed since open(), don't restore
19034				if ( !element.attr( "title" ) ) {
19035					element.attr( "title", element.data( "ui-tooltip-title" ) );
19036				}
19037				element.removeData( "ui-tooltip-title" );
19038			}
19039		} );
19040		this.liveRegion.remove();
19041	}
19042} );
19043
19044// DEPRECATED
19045// TODO: Switch return back to widget declaration at top of file when this is removed
19046if ( $.uiBackCompat !== false ) {
19047
19048	// Backcompat for tooltipClass option
19049	$.widget( "ui.tooltip", $.ui.tooltip, {
19050		options: {
19051			tooltipClass: null
19052		},
19053		_tooltip: function() {
19054			var tooltipData = this._superApply( arguments );
19055			if ( this.options.tooltipClass ) {
19056				tooltipData.tooltip.addClass( this.options.tooltipClass );
19057			}
19058			return tooltipData;
19059		}
19060	} );
19061}
19062
19063var widgetsTooltip = $.ui.tooltip;
19064
19065
19066
19067
19068} );
19069
19070/*
19071 * Capslock 0.2 - jQuery plugin to detect if a user's caps lock 
19071is on or not.
19072 * 
19073 * Provides events, "caps_lock_on" and "caps_lock_off", that custom functions can be bound to.
19074 * The capslock function can be called on a specific element, a set of elements, or globally:
19075 * 		$("#my_textarea").capslock(options);	// One textarea
19076 * 		$("textarea").capslock(options);		// All textareas
19077 * 		$().capslock(options);					// Globally
19078 *
19079 * Copyright (c) 2009 Arthur McLean
19080 *
19081 * Dual licensed under the MIT and GPL licenses:
19082 *   http://www.opensource.org/licenses/mit-license.php
19083 *   http://www.gnu.org/licenses/gpl.html
19084 *
19085 */
19086
19087; // Just in case the previously included plug-in failed to close with a semi-colon.
19088(function($) {
19089	
19090	$.fn.capslock = function(options) {
19091		
19092		if (options) $.extend($.fn.capslock.defaults, options);
19093		
19094		this.each(function() {
19095			$(this).bind("caps_lock_on", $.fn.capslock.defaults.caps_lock_on);
19096			$(this).bind("caps_lock_off", $.fn.capslock.defaults.caps_lock_off);
19097			
19098			$(this).keypress(function(e){
19099				check_caps_lock(e);
19100			});
19101		});
19102		
19103		return this;
19104	};
19105	
19106
19107	
19108	// The actual check:
19109	function check_caps_lock(e)
19110	{
19111		var ascii_code	= e.which;
19112		var shift_key	= e.shiftKey;
19113		if( (65 <= ascii_code) && (ascii_code <= 90) && !shift_key)
19114		{
19115			$(e.target).trigger("caps_lock_on");
19116		}
19117		else
19118		{
19119			$(e.target).trigger("caps_lock_off");
19120		}
19121		
19122	}
19123	
19124	// Public definition of defaults for easy overriding:
19125	$.fn.capslock.defaults = {
19126		caps_lock_on:	function() {},
19127		caps_lock_off:	function() {}
19128	};
19129	
19130})(jQuery);
19131
19132/**
19133 * If a variable (likely a function parameter) is undefined / wasn't supplied, then
19134 * coalesce to a different value.
19135 * @param arg
19136 * @param defaultToVal
19137 * @returns {*}
19138 */
19139function defaultTo(arg, defaultToVal) {
19140	return typeof arg !== 'undefined' ? arg : defaultToVal;
19141}
19142
19143// See https://stackoverflow.com/questions/6756583/prevent-browser-from-loading-a-drag-and-dropped-file/6756680#6756680
19144function disableBrowserFilePreview() {
19145	
19146	window.addEventListener("dragover", function(e){
19147		e = e || event;
19148		e.preventDefault();
19149	}, false);
19150	
19151	window.addEventListener("drop", function(e){
19152		e = e || event;
19153		e.preventDefault();
19154	}, false);
19155}
19156
19157
19158/**
19159 * Implementation of Java's String.hashCode() in JS.
19160 * http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/
19161 * @param absolute
19162 * @returns {number}
19163 */
19164String.prototype.hashCode = function(absolute){
19165	
19166	absolute = defaultTo(absolute, false);
19167	
19168	var hash = 0;
19169	if (this.length === 0) return hash;
19170	for (let i = 0; i < this.length; i++) {
19171		let char = this.charCodeAt(i);
19172		hash = ((hash<<5)-hash)+char;
19173		hash = hash & hash; // Convert to 32bit integer
19174	}
19175	
19176	if (absolute) {
19177		hash = Math.abs(hash);
19178	}
19179	return hash;
19180};
19181
19182
19183/**
19184 * Recursively build a HTML form compatible key-value set from a potentially multidimensional
19185 * key-value set
19186 * @param string name POST key/name.
19187 * @param mixed val POST value, which may be an object or array.
19188 * @returns {unresolved}
19189 */
19190function buildHTMLFormAttributes(name, val) {
19191	var postKeyVals = {};
19192	if (typeof val === 'string') {
19193		postKeyVals[name] = val;
19194	} else {
19195		$.each(val	, function(valEntryName, valEntryVal) {
19196			$.extend(
19197				postKeyVals, 
19198				buildHTMLFormAttributes(
19199					name+'['+valEntryName+']', 
19200					valEntryVal
19201				)
19202			);
19203		});
19204	}
19205
19206	return postKeyVals;
19207}
19208
19209/**
19210 * Create a deep-clone of a simple object.
19211 *
19212 * Should only be used for simple JSON-compliant objects and shouldn't be used for objects with prototypes,
19213 * functions or circular references.
19214 * @return Object
19215 */
19216function deepClone(yourObj) {
19217	return JSON.parse(JSON.stringify(yourObj));
19218}
19219
19220/**
19221 * Toggle browser fullscreen, if it's available.
19222 * Taken from: https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API#Toggling_fullscreen_mode
19223 */
19224function toggleFullScreen(forceEnable) {
19225
19226	forceEnable = defaultTo(forceEnable, null);
19227
19228	var doc = window.document;
19229	var docEl = doc.documentElement;
19230
19231	var requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;
19232	var cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;
19233
19234	if (forceEnable === null) {
19235		forceEnable = !doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement;
19236	}
19237
19238	if(forceEnable) {
19239		requestFullScreen.call(docEl);
19240	} else {
19241		cancelFullScreen.call(doc);
19242	}
19243}
19244
19245/**
19246 * Very simple pluralizer.
19247 */
19248function pluralize(word, quantity) {
19249	return quantity + ' ' + (quantity === 1 ? word : word + 's');
19250}
19251
19252/**
19253 *
19254 * @param {Date} [date]
19255 */
19256function getWelcomeMessage(date) {
19257	date = defaultTo(date, new Date());
19258
19259	var hours = date.getHours();
19260	if (hours < 12) {
19261		return 'Good morning';
19262	} else if (hours < 17) {
19263		return 'Good afternoon';
19264	} else {
19265		return 'Good evening';
19266	}
19267}
19268
19269function round(num, decimalPlaces) {
19270	decimalPlaces = defaultTo(decimalPlaces, 2);
19271	var coefficient = Math.pow(10, decimalPlaces);
19272 	return (Math.round(num * coefficient) / coefficient);
19273}
19274
19275
19276function formatDate(date, incDate, incTime) {
19277
19278	incDate = defaultTo(incDate, true);
19279	incTime = defaultTo(incTime, true);
19280
19281	if (!(date instanceof Date) || (!incDate && !incTime)) {
19282		return null;
19283	}
19284
19285	var opts = {};
19286
19287	if (incDate) {
19288		Object.assign(opts, {day: 'numeric', month: 'short', year:'numeric'});
19289	}
19290	if (incTime) {
19291		Object.assign(opts, {hour:'2-digit', minute:'2-digit'});
19292	}
19293
19294	return date.toLocaleString('en-GB', opts);
19295}
19296
19297/**
19298 * Convert time string to equivalent total number of seconds. E.g. "16:30" -> 59400. 
19299 * An invalid time string e.g. "25:30" would be rejected.
19300 * @param {string} timeString e.g. "16:30", or "4:15" etc.
19301 * @returns {?int} Total seconds, or NULL if supplied arg is invalid.
19302 */
19303function timeToSeconds(timeString) {
19304	const [hours, minutes] = timeString.split(':').map(val => parseInt(val));
19305	// Values which are not-a-number will fail this check:
19306	if (!(hours >= 0 && hours <= 23 && minutes >= 0 && minutes <= 59)) {
19307		return null;
19308	}
19309	return (hours * 3600) + (minutes * 60);
19310}
19311
19312
19313/**
19314 * Convert HTML metacharacters into to their HTML entities.
19315 * @param {string} str
19316 * @return {string}
19317 */
19318function escapeHtml(str) {
19319	var entityMap = {
19320		'&': '&amp;',
19321		'<': '&lt;',
19322		'>': '&gt;',
19323		'"': '&quot;',
19324		"'": '&#39;',
19325		'/': '&#x2F;',
19326		'`': '&#x60;',
19327		'=': '&#x3D;'
19328	};
19329
19330	return String(str).replace(/[&<>"'`=\/]/g, function(s) {
19331		return entityMap[s];
19332	});
19333}
19334
19335/**
19336 * Return string to given length + ellipsis.
19337 * @todo Enhance to prevent word breaking.
19338 * @param {string} str
19339 * @param {number} len
19340 * @return {string}
19341 */
19342function makeNiceString(str, len) {
19343	if (str.length <= len) {
19344		return str;
19345	} else {
19346		return str.substr(0, len - 3) + '...';
19347	}
19348}
19349
19350/**
19351 * Parse a PHP or JS JSON encoded DateTime value and return a corresponding JS Date object.
19352 * @param {(Object|string)} d
19353 */
19354function parseDate(d) {
19355	// Encoded from JS via JSON.stringify
19356	if (typeof d === 'string') {
19357		return new Date(d);
19358	// Encoded from PHP via json_encode:
19359	} else {
19360		// return new Date(Date.parse(d.date));
19361		// Altered for Safari support. See https://stackoverflow.com/questions/5324178
19362		var arr = d.date.split(/[- :]/);
19363		return new Date(arr[0], arr[1]-1, arr[2], arr[3], arr[4], arr[5]);
19364	}
19365
19366}
19367
19368/**
19369 * See https://stackoverflow.com/a/14706877
19370 * @param {*} val
19371 * @return {boolean} TRUE if the argument is an Object or an Array.
19372 */
19373function isObject(val) {
19374	var type = typeof val;
19375	return type === 'function' || type === 'object' && !!val;
19376}
19377
19378/**
19379 * Upper-case the first character in a string.
19380 * @param {string} str
19381 * @return {string}
19382 */
19383function ucFirst(str) {
19384	return str.charAt(0).toUpperCase() + str.substring(1);
19385}
19386
19387/**
19388 * Remove HTML from a string.
19389 * Similar to `strip_tags(..)` in PHP.
19390 * Source: https://stackoverflow.com/a/47140708
19391 * @param {string} html e.g. "<p>Hello</p>"
19392 * @return {string} e.g. "Hello"
19393 */
19394function stripTags(html) {
19395   var doc = new DOMParser().parseFromString(html, 'text/html');
19396   return doc.body.textContent || "";
19397}
19398
19399function setClipboard(text){
19400	var input = document.createElement('input');
19401	document.body.appendChild(input);
19402	input.value = text;
19403	input.select();
19404	document.execCommand('copy', false);
19405	input.remove();
19406}
19407
19408function createTooltip(tooltipProps) {
19409	const {id, heading, content, allowHtml, hideMobile, delayMs, hideOnBlur, autoload, maxWidth} = tooltipProps;
19410
19411	// Optionally hide on mobile:
19412	if (isMobileDevice() && hideMobile) {
19413		return;
19414	}
19415
19416	let title = heading ? "<p class='tippy-header'>" + heading + "</p>" : '';
19417	
19418	let contentWithTitle = 
19419		"<div class='tippy-wrapper'>" +
19420			title +
19421			"<div class='tippy-inner-content'>" + content + "</div>" +
19422		"</div>";
19423
19424	let parent = $("#" + id).parent();
19425	
19426	// Don't apply tooltip if the wrapper is tablesorter - this creates duplicates!
19427	if (parent.hasClass("tablesorter-header-inner")) {
19428		return;
19429	}
19430
19431	// Set tooltip props:
19432	parent.attr('data-tippy-content', contentWithTitle);
19433	parent.attr('data-tippy-allowHTML', allowHtml);
19434	parent.attr('data-tippy-delay', delayMs);
19435	parent.attr('data-tippy-hideOnClick', hideOnBlur);
19436	parent.attr('data-tippy-showOnCreate', autoload);
19437	parent.attr('data-tippy-maxWidth', maxWidth);
19438	parent.attr('aria-label', heading);
19439}
19440
19441/**
19442 * @return {number} Time in milliseconds since initial page load.
19443 */
19444function uptime() 
19445{
19446	// List of performance types - see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/entryType
19447	const [currPage] = performance.getEntriesByType("navigation");
19448	return (performance.now() - currPage.startTime);
19449}
19450
19451
19452/**
19453 * If `arrOrVal` is an array, return it as it is.
19454 * If `arrOrVal` is anything else, box it inside an array and return that.
19455 *
19456 * @param {*|Array} arrOrVal
19457 */
19458Array.box = function(arrOrVal) {
19459	if (Array.isArray(arrOrVal)) {
19460		return arrOrVal;
19461	} else {
19462		return [arrOrVal];
19463	}
19464};
19465
19466// Based on addHours from: https://stackoverflow.com/a/1050782
19467Date.prototype.addMinutes = function(m) {
19468   this.setTime(this.getTime() + (m*60*1000));
19469   return this;
19470};
19471
19472
19473/** IE11 Polyfills: **/
19474
19475/*
19476  `Element.closest` https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill
19477*/
19478
19479if (!Element.prototype.matches) {
19480  Element.prototype.matches = Element.prototype.msMatchesSelector || 
19481                              Element.prototype.webkitMatchesSelector;
19482}
19483
19484if (!Element.prototype.closest) {
19485  Element.prototype.closest = function(s) {
19486    var el = this;
19487
19488    do {
19489      if (el.matches(s)) return el;
19490      el = el.parentElement || el.parentNode;
19491    } while (el !== null && el.nodeType === 1);
19492    return null;
19493  };
19494}
19495
19496/*
19497   `NodeList.forEach` https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach#Polyfill
19498 */
19499if (window.NodeList && !NodeList.prototype.forEach) {
19500   NodeList.prototype.forEach = Array.prototype.forEach;
19501}
19502
19503/* 
19504   `ChildNode.remove` https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove#Polyfill
19505 */
19506(function (arr) {
19507  arr.forEach(function (item) {
19508    if (item.hasOwnProperty('remove')) {
19509      return;
19510    }
19511    Object.defineProperty(item, 'remove', {
19512      configurable: true,
19513      enumerable: true,
19514      writable: true,
19515      value: function remove() {
19516        if (this.parentNode === null) {
19517          return;
19518        }
19519        this.parentNode.removeChild(this);
19520      }
19521    });
19522  });
19523})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
19524
19525
19526// Function to load the image when it's about to come into the viewport
19527const lazyLoadImages = () => {
19528  const images = document.querySelectorAll('img.lazy'); 
19529  const observer = new IntersectionObserver((entries, observer) => {
19530    entries.forEach(entry => {
19531      if (entry.isIntersecting) {
19532        const img = entry.target;
19533		const cacheBuster = new Date().getTime(); // or a server-side version string
19534        const imgSrc = img.getAttribute('data-src'); 
19535        if (imgSrc) {
19536          // Add a fallback for broken or missing images
19537          img.onerror = () => {
19538            img.src = '/images/placeholder.jpg'; // ✅ path to your default placeholder
19539            img.classList.add('broken-image');
19540          };
19541
19542          // Trigger actual image load with cache-busting param
19543          img.src = `${imgSrc}?v=${cacheBuster}`;
19544        }
19545        img.classList.remove('lazy'); 
19546        observer.unobserve(img);
19547      }
19548    });
19549  }, { threshold: 0.1 }); // Load earlier (10% visible)
19550
19551  images.forEach(img => observer.observe(img));
19552
19553  // 👇 Watch for dynamically added images
19554  const mutationObserver = new MutationObserver((mutations) => {
19555    mutations.forEach(mutation => {
19556      mutation.addedNodes.forEach(node => {
19557        if (node.nodeType === 1) {
19558          if (node.tagName === 'IMG' && node.classList.contains('lazy')) {
19559            observer.observe(node);
19560          } else {
19561            // Check inside the added node (e.g., in modal)
19562            node.querySelectorAll && node.querySelectorAll('img.lazy').forEach(img => observer.observe(img));
19563          }
19564        }
19565      });
19566    });
19567  });
19568
19569  mutationObserver.observe(document.body, {
19570    childList: true,
19571    subtree: true
19572  });
19573};
19574
19575// Run on page load
19576document.addEventListener('DOMContentLoaded', lazyLoadImages);
19577
19578/**
19579 * If a Promise is resolving too soon, use this to force a wait on it before we advance.
19580 * Otherwise, if the promise takes as long as the supplied `ms`, then no further delay will be required.
19581 * @return {Promise<[any]>}
19582 */
19583function forcePromiseMinDelay(prom, ms) {
19584	return Promise.all([prom, getDelay(ms)]).then(valArr => valArr[0]);
19585}
19586
19587function getDelay(ms){
19588	return new Promise(resolve => { setTimeout(()=> resolve(ms), ms); } );
19589}
19590
19591/**
19592 * @param {KeyboardEvent} keyEvent
19593 */
19594function isPrintableKey(keyboardEvent) {
19595	// Test the `key` property is single unicode character: 
19596	return /^.$/u.test(keyboardEvent.key);
19597}
19598
19599/**
19600 * Create a new Set featuring items in Set A which are not present in Set B.
19601 * @see {@link https://exploringjs.com/impatient-js/ch_sets.html#difference-a-b} 
19602 * @param {Set} a
19603 * @param {Set} b
19604 */
19605function setDifference(a, b) {
19606	return new Set([...a].filter(item => !b.has(item)));
19607}
19608function setUnion(a, b) {
19609	return new Set([...a, ...b]);
19610}
19611/**
19612 * Are the two sets equal?
19613 * @param {Set} a
19614 * @param {Set} b
19615 */
19616function setEquality(a, b) {
19617	if (a.size !== b.size) {
19618		return false;
19619	}
19620	// Equal if they are the same size are no further differences.
19621	return setDifference(a, b).size === 0;
19622}
19623
19624/** DEBUG **/
19625
19626/** Add your personal JS debug methods here and set SVN to ignore this file **/
19627
19628/**
19629 * Encompasses functions and objects related to the user's browser and their computer.
19630 */
19631
19632// Checks the user's browser for touchscreen support 
19633function isTouchDevice() {
19634	return (
19635		'ontouchstart' in window
19636		|| ( navigator.MaxTouchPoints > 0 )
19637		|| ( navigator.msMaxTouchPoints > 0 )
19638		) ;
19639}
19640
19641function isMobileDevice$1(touchDevicesOnly = true) {
19642    /**
19643     * jQuery.browser.mobile (http://detectmobilebrowser.com/) deprecated;
19644     * Vanilla Javascript method used instead, moving the giant if to here
19645     **/
19646	var touchCheck = !touchDevicesOnly || isTouchDevice(); 
19647	var userAgentCheck = false;
19648	(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) userAgentCheck = true;})(navigator.userAgent||navigator.vendor||window.opera);
19649	return userAgentCheck && touchCheck;
19650}
19651
19652function getCurrentPosition() {
19653	if (navigator.geolocation) {
19654		return new Promise(function(resolve, reject){
19655			// Timeout after 5 seconds.
19656			return navigator.geolocation.getCurrentPosition(resolve, reject, {timeout:5000});
19657		});
19658	} else {
19659		return new Promise(function(resolve, reject) {
19660			return reject(false);
19661		});
19662	}
19663}
19664
19665/**
19666 * @popperjs/core v2.10.1 - MIT License
19667 */
19668
19669"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={});}(undefined,(function(e){function t(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function n(e){return e instanceof t(e).Element||e instanceof Element}function o(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function r(e){return "undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}function i(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;return o(e)&&t&&(t=e.offsetHeight,0<(e=e.offsetWidth)&&(r=n.width/e||1),0<t&&(i=n.height/t||1)),{width:N(n.width/r),height:N(n.height/i),top:N(n.top/i),right:N(n.right/r),bottom:N(n.bottom/i),left:N(n.left/r),x:N(n.left/r),y:N(n.top/i)}}function a(e){return {scrollLeft:(e=t(e)).pageXOffset,scrollTop:e.pageYOffset}}function s(e){return e?(e.nodeName||"").toLowerCase():null}function f(e){return ((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function p(e){return i(f(e)).left+a(e).scrollLeft}function c(e){return t(e).getComputedStyle(e)}function l(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function u(e,n,r){void 0===r&&(r=!1);var c,u=o(n);if(c=o(n)){var d=(c=n.getBoundingClientRect()).height/n.offsetHeight||1;c=1!==(c.width/n.offsetWidth||1)||1!==d;}d=c,c=f(n),e=i(e,d),d={scrollLeft:0,scrollTop:0};var h={x:0,y:0};return (u||!u&&!r)&&(("body"!==s(n)||l(c))&&(d=n!==t(n)&&o(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:a(n)),o(n)?((h=i(n,!0)).x+=n.clientLeft,h.y+=n.clientTop):c&&(h.x=p(c))),{x:e.left+d.scrollLeft-h.x,y:e.top+d.scrollTop-h.y,width:e.width,height:e.height}}function d(e){var t=i(e),n=e.offsetWidth,o=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-o)&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function h(e){return "html"===s(e)?e:e.assignedSlot||e.parentNode||(r(e)?e.host:null)||f(e)}function m(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:o(e)&&l(e)?e:m(h(e))}function v(e,n){var o;void 0===n&&(n=[]);var r=m(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=t(r),r=e?[o].concat(o.visualVie
vendor: 16,186 bytes, line 19669
19669wport||[],l(r)?r:[]):r,n=n.concat(r),e?n:n.concat(v(h(r)))}function g(e){return o(e)&&"fixed"!==c(e).position?e.offsetParent:null}function b(e){for(var n=t(e),r=g(e);r&&0<=["table","td","th"].indexOf(s(r))&&"static"===c(r).position;)r=g(r);if(r&&("html"===s(r)||"body"===s(r)&&"static"===c(r).position))return n;if(!r)e:{if(r=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!o(e)||"fixed"!==c(e).position)for(e=h(e);o(e)&&0>["html","body"].indexOf(s(e));){var i=c(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||r&&"filter"===i.willChange||r&&i.filter&&"none"!==i.filter){r=e;break e}e=e.parentNode;}r=null;}return r||n}function y(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e);})),r.push(e);}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e);})),e.forEach((function(e){o.has(e.name)||t(e);})),r}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e());}));}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return !0;if(n&&r(n))do{if(t&&e.isSameNode(t))return !0;t=t.parentNode||t.host;}while(t);return !1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,n){if("viewport"===n){n=t(e);var r=f(e);n=n.visualViewport;var s=r.clientWidth;r=r.clientHeight;var l=0,u=0;n&&(s=n.width,r=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=n.offsetLeft,u=n.offsetTop)),e=j(e={width:s,height:r,x:l+p(e),y:u});}else o(n)?((e=i(n)).top+=n.clientTop,e.left+=n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=a(u),n=null==(r=u.ownerDocument)?void 0:r.body,r=z(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=z(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(n||e).direction&&(u+=z(e.clientWidth,n?n.clientWidth:0)-r),e=j({width:r,height:l,x:u,y:s}));return e}function D(e,t,r){return t="clippingParents"===t?function(e){var t=v(h(e)),r=0<=["absolute","fixed"].indexOf(c(e).position)&&o(e)?b(e):e;return n(r)?t.filter((function(e){return n(e)&&O(e,r)&&"body"!==s(e)})):[]}(e):[].concat(t),(r=(r=[].concat(t,[r])).reduce((function(t,n){return n=E(e,n),t.top=z(n.top,t.top),t.right=F(n.right,t.right),t.bottom=F(n.bottom,t.bottom),t.left=z(n.left,t.left),t}),E(e,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function L(e){return e.split("-")[1]}function M(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function P(e){var t=e.reference,n=e.element,o=(e=e.placement)?x(e):null;e=e?L(e):null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y};}if(null!=(o=o?M(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2;}return r}function k(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function W(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function A(e,t){void 0===t&&(t={});var o=t;t=void 0===(t=o.placement)?e.placement:t;var r=o.boundary,a=void 0===r?"clippingParents":r,s=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var p=o.altBoundary,c=void 0!==p&&p;o=k("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:W(o,V)),p=e.rects.popper,a=D(n(c=e.elements[c?"popper"===r?"reference":"popper":r])?c:c.contextElement||f(e.elements.popper),a,s),c=P({reference:s=i(e.elements.reference),element:p,strategy:"absolute",placement:t}),p=j(Object.assign({},p,c)),s="popper"===r?p:s;var l={top:a.top-s.top+o.top,bottom:s.bottom-a.bottom+o.bottom,left:a.left-s.left+o.left,right:s.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===r&&e){var u=e[t];Object.keys(l).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";l[e]+=u[n]*t;}));}return l}function B(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return !t.some((function(e){return !(e&&"function"==typeof e.getBoundingClientRect)}))}function H(e){void 0===e&&(e={});var t=e.defaultModifiers,o=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?Y:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[];}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Y,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],p=!1,c={state:s,setOptions:function(i){return i="function"==typeof i?i(s.options):i,a(),s.options=Object.assign({},r,s.options,i),s.scrollParents={reference:n(e)?v(e):e.contextElement?v(e.contextElement):[],popper:v(t)},i=function(e){var t=y(e);return U.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(o,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:c,options:n}),f.push(t||function(){}));})),c.update()},forceUpdate:function(){if(!p){var e=s.elements,t=e.reference;if(B(t,e=e.popper))for(s.rects={reference:u(t,b(e),"fixed"===s.options.strategy),popper:d(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else {var n=s.orderedModifiers[t];e=n.fn;var o=n.options;o=void 0===o?{}:o,n=n.name,"function"==typeof e&&(s=e({state:s,options:o,name:n,instance:c})||s);}}},update:w((function(){return new Promise((function(e){c.forceUpdate(),e(s);}))})),destroy:function(){a(),p=!0;}};return B(e,t)?(c.setOptions(i).then((function(e){!p&&i.onFirstUpdate&&i.onFirstUpdate(e);})),c):c}}function T(e){var n,o=e.popper,r=e.popperRect,i=e.placement,a=e.variation,s=e.offsets,p=e.position,l=e.gpuAcceleration,u=e.adaptive;if(!0===(e=e.roundOffsets)){e=s.y;var d=window.devicePixelRatio||1;e={x:X(X(s.x*d)/d)||0,y:X(X(e*d)/d)||0};}else e="function"==typeof e?e(s):s;e=void 0===(e=(d=e).x)?0:e,d=void 0===(d=d.y)?0:d;var h=s.hasOwnProperty("x");s=s.hasOwnProperty("y");var m,v="left",g="top",y=window;if(u){var w=b(o),x="clientHeight",O="clientWidth";w===t(o)&&("static"!==c(w=f(o)).position&&"absolute"===p&&(x="scrollHeight",O="scrollWidth")),"top"!==i&&("left"!==i&&"right"!==i||"end"!==a)||(g="bottom",d-=w[x]-r.height,d*=l?1:-1),"left"!==i&&("top"!==i&&"bottom"!==i||"end"!==a)||(v="right",e-=w[O]-r.width,e*=l?1:-1);}return o=Object.assign({position:p},u&&Q),l?Object.assign({},o,((m={})[g]=s?"0":"",m[v]=h?"0":"",m.transform=1>=(y.devicePixelRatio||1)?"translate("+e+"px, "+d+"px)":"translate3d("+e+"px, "+d+"px, 0)",m)):Object.assign({},o,((n={})[g]=s?d+"px":"",n[v]=h?e+"px":"",n.transform="",n))}function R(e){return e.replace(/left|right|bottom|top/g,(function(e){return te[e]}))}function S(e){return e.replace(/start|end/g,(function(e){return ne[e]}))}function C(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function q(e){return ["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var N=Math.round,V=["top","bottom","right","left"],I=V.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),_=[].concat(V,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),U="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),z=Math.max,F=Math.min,X=Math.round,Y={placement:"bottom",modifiers:[],strategy:"absolute"},G={passive:!0},J={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=t(n.elements.popper),f=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,G);})),a&&s.addEventListener("resize",o.update,G),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,G);})),a&&s.removeEventListener("resize",o.update,G);}},data:{}},K={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=P({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement});},data:{}},Q={top:"auto",right:"auto",bottom:"auto",left:"auto"},Z={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:x(t.placement),variation:L(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,T(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,T(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement});},data:{}},$={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];o(i)&&s(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t);})));}));},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),o(r)&&s(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(e){r.removeAttribute(e);})));}));}},requires:["computeStyles"]},ee={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=void 0===(e=e.options.offset)?[0,0]:e,r=(e=_.reduce((function(e,n){var r=t.rects,i=x(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof o?o(Object.assign({},r,{placement:n})):o;return r=(r=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:r}:{x:r,y:s},e[n]=i,e}),{}))[t.placement],i=r.x;r=r.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=r),t.modifiersData[n]=e;}},te={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"},oe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var o=n.mainAxis;o=void 0===o||o;var r=n.altAxis;r=void 0===r||r;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,p=n.altBoundary,c=n.flipVariations,l=void 0===c||c,u=n.allowedAutoPlacements;c=x(n=t.options.placement),i=i||(c!==n&&l?function(e){if("auto"===x(e))return [];var t=R(e);return [S(e),t,S(t)]}(n):[R(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===x(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,r=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?_:a,f=L(t.placement);0===(i=(t=f?i?I:I.filter((function(e){return L(e)===f})):V).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var p=i.reduce((function(t,i){return t[i]=A(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[x(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var h=new Map;c=!0;for(var m=d[0],v=0;v<d.length;v++){var g=d[v],b=x(g),y="start"===L(g),w=0<=["top","bottom"].indexOf(b),O=w?"width":"height",j=A(t,{placement:g,boundary:s,rootBoundary:f,altBoundary:p,padding:a});if(y=w?y?"right":"left":y?"bottom":"top",n[O]>i[O]&&(y=R(y)),O=R(y),w=[],o&&w.push(0>=j[b]),r&&w.push(0>=j[y],0>=j[O]),w.every((function(e){return e}))){m=g,c=!1;break}h.set(g,w);}if(c)for(o=function(e){var t=d.find((function(t){if(t=h.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return m=t,"break"},r=l?3:1;0<r&&"break"!==o(r);r--);t.placement!==m&&(t.modifiersData[e]._skip=!0,t.placement=m,t.reset=!0);}},requiresIfExists:["offset"],data:{_skip:!1}},re={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var o=n.mainAxis,r=void 0===o||o,i=void 0!==(o=n.altAxis)&&o;o=void 0===(o=n.tether)||o;var a=n.tetherOffset,s=void 0===a?0:a,f=A(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary});n=x(t.placement);var p=L(t.placement),c=!p,l=M(n);n="x"===l?"y":"x",a=t.modifiersData.popperOffsets;var u=t.rects.reference,h=t.rects.popper,m="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},a){if(r||i){var v="y"===l?"top":"left",g="y"===l?"bottom":"right",y="y"===l?"height":"width",w=a[l],O=a[l]+f[v],j=a[l]-f[g],E=o?-h[y]/2:0,D="start"===p?u[y]:h[y];p="start"===p?-h[y]:-u[y],h=t.elements.arrow,h=o&&h?d(h):{width:0,height:0};var P=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=P[v],g=P[g],h=z(0,F(u[y],h[y])),D=c?u[y]/2-E-h-v-m:D-h-v-m,u=c?-u[y]/2+E+h+g+m:p+h+g+m,c=t.elements.arrow&&b(t.elements.arrow),m=t.modifiersData.offset?t.modifiersData.offset[t.placement][l]:0,c=a[l]+D-m-(c?"y"===l?c.clientTop||0:c.clientLeft||0:0),u=a[l]+u-m,r&&(r=o?F(O,c):O,j=o?z(j,u):j,r=z(r,F(w,j)),a[l]=r,s[l]=r-w),i&&(r=(i=a[n])+f["x"===l?"top":"left"],f=i-f["x"===l?"bottom":"right"],r=o?F(r,c):r,o=o?z(f,u):f,o=z(r,F(i,o)),a[n]=o,s[n]=o-i);}t.modifiersData[e]=s;}},requiresIfExists:["offset"]},ie={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=x(n.placement);if(e=M(s),s=0<=["left","right"].indexOf(s)?"height":"width",i&&a){r=k("number"!=typeof(r="function"==typeof(r=r.padding)?r(Object.assign({},n.rects,{placement:n.placement})):r)?r:W(r,V));var f=d(i),p="y"===e?"top":"left",c="y"===e?"bottom":"right",l=n.rects.reference[s]+n.rects.reference[e]-a[e]-n.rects.popper[s];a=a[e]-n.rects.reference[e],a=(i=(i=b(i))?"y"===e?i.clientHeight||0:i.clientWidth||0:0)/2-f[s]/2+(l/2-a/2),s=z(r[p],F(a,i-f[s]-r[c])),n.modifiersData[o]=((t={})[e]=s,t.centerOffset=s-a,t);}},effect:function(e){var t=e.state;if(null!=(e=void 0===(e=e.options.element)?"[data-popper-arrow]":e)){if("string"==typeof e&&!(e=t.elements.popper.querySelector(e)))return;O(t.elements.popper,e)&&(t.elements.arrow=e);}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},ae={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,o=t.rects.popper,r=t.modifiersData.preventOverflow,i=A(t,{elementContext:"reference"}),a=A(t,{altBoundary:!0});n=C(i,n),o=C(a,o,r),r=q(n),a=q(o),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:o,isReferenceHidden:r,hasPopperEscaped:a},t.attributes.popper=Object.assign({}
19669,t.attributes.popper,{"data-popper-reference-hidden":r,"data-popper-escaped":a});}},se=H({defaultModifiers:[J,K,Z,$]}),fe=[J,K,Z,$,ee,oe,re,ie,ae],pe=H({defaultModifiers:fe});e.applyStyles=$,e.arrow=ie,e.computeStyles=Z,e.createPopper=pe,e.createPopperLite=se,e.defaultModifiers=fe,e.detectOverflow=A,e.eventListeners=J,e.flip=oe,e.hide=ae,e.offset=ee,e.popperGenerator=H,e.popperOffsets=K,e.preventOverflow=re,Object.defineProperty(e,"__esModule",{value:!0});}));
19670
19671!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper);}(undefined,(function(t){"use strict";var e="undefined"!=typeof window&&"undefined"!=typeof document,n=e?navigator.userAgent:"",r=/MSIE |Trident\//.test(n),i={passive:!0,capture:!0};function o(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function a(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function s(t,e){return "function"==typeof t?t.apply(void 0,e):t}function p(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r);}),e);};var n;}function u(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t];})),n}function c(t){return [].concat(t)}function f(t,e){-1===t.indexOf(e)&&t.push(e);}function l(t){return t.split("-")[0]}function d(t){return [].slice.call(t)}function v(){return document.createElement("div")}function m(t){return ["Element","Fragment"].some((function(e){return a(t,e)}))}function g(t){return a(t,"MouseEvent")}function h(t){return !(!t||!t._tippy||t._tippy.reference!==t)}function b(t){return m(t)?[t]:function(t){return a(t,"NodeList")}(t)?d(t):Array.isArray(t)?t:d(document.querySelectorAll(t))}function y(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms");}));}function w(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e);}));}function x(t){var e,n=c(t)[0];return (null==n||null==(e=n.ownerDocument)?void 0:e.body)?n.ownerDocument:document}function E(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n);}));}var O={isTouch:!1},C=0;function T(){O.isTouch||(O.isTouch=!0,window.performance&&document.addEventListener("mousemove",A));}function A(){var t=performance.now();t-C<20&&(O.isTouch=!1,document.removeEventListener("mousemove",A)),C=t;}function L(){var t=document.activeElement;if(h(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur();}}var D=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),k=Object.keys(D);function R(t){var e=(t.plugins||[]).reduce((function(e,n){var r=n.name,i=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:i),e}),{});return Object.assign({},t,{},e)}function j(t,e){var n=Object.assign({},e,{content:s(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return (e?Object.keys(R(Object.assign({},D,{plugins:e}))):k).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r);}catch(t){e[n]=r;}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},D.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.
19671interactive?null:"describedby":n.aria.content},n}function M(t,e){t.innerHTML=e;}function P(t){var e=v();return !0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",m(t)?e.appendChild(t):M(e,t)),e}function V(t,e){m(e.content)?(M(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?M(t,e.content):t.textContent=e.content);}function I(t){var e=t.firstElementChild,n=d(e.children);return {box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function S(t){var e=v(),n=v();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=v();function i(n,r){var i=I(e),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||V(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(P(r.arrow))):o.appendChild(P(r.arrow)):s&&o.removeChild(s);}return r.className="tippy-content",r.setAttribute("data-state","hidden"),V(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props),{popper:e,onUpdate:i}}S.$$tippy=!0;var B=1,H=[],N=[];function U(e,n){var a,u,m,h,b,C,T,A,L,k=j(e,Object.assign({},D,{},R((a=n,Object.keys(a).reduce((function(t,e){return void 0!==a[e]&&(t[e]=a[e]),t}),{}))))),M=!1,P=!1,V=!1,S=!1,U=[],_=p(bt,k.interactiveDebounce),z=B++,F=(L=k.plugins).filter((function(t,e){return L.indexOf(t)===e})),W={id:z,reference:e,popper:v(),popperInstance:null,props:k,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:F,clearDelayTimeouts:function(){clearTimeout(u),clearTimeout(m),cancelAnimationFrame(h);},setProps:function(t){if(W.state.isDestroyed)return;it("onBeforeUpdate",[W,t]),gt();var n=W.props,r=j(e,Object.assign({},W.props,{},t,{ignoreAttributes:!0}));W.props=r,mt(),n.interactiveDebounce!==r.interactiveDebounce&&(st(),_=p(bt,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?c(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded");})):r.triggerTarget&&e.removeAttribute("aria-expanded");at(),rt(),q&&q(n,r);W.popperInstance&&(Et(),Ct().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate);})));it("onAfterUpdate",[W,t]);},setContent:function(t){W.setProps({content:t});},show:function(){var t=W.state.isVisible,e=W.state.isDestroyed,n=!W.state.isEnabled,r=O.isTouch&&!W.props.touch,i=o(W.props.duration,0,D.duration);if(t||e||n||r)return;if(Z().hasAttribute("disabled"))return;if(it("onShow",[W],!1),!1===W.props.onShow(W))return;W.state.isVisible=!0,Q()&&(Y.style.visibility="visible");rt(),ft(),W.state.isMounted||(Y.style.transition="none");if(Q()){var a=et(),p=a.box,u=a.content;y([p,u],0);}T=function(){var t;if(W.state.isVisible&&!S){if(S=!0,Y.offsetHeight,Y.style.transition=W.props.moveTransition,Q()&&W.props.animation){var e=et(),n=e.box,r=e.content;y([n,r],i),w([n,r],"visible");}ot(),at(),f(N,W),null==(t=W.popperInstance)||t.forceUpdate(),W.state.isMounted=!0,it("onMount",[W]),W.props.animation&&Q()&&function(t,e){dt(t,e);}(i,(function(){W.state.isShown=!0,it("onShown",[W]);}));}},function(){var t,e=W.props.appendTo,n=Z();t=W.props.interactive&&e===D.appendTo||"parent"===e?n.parentNode:s(e,[n]);t.contains(Y)||t.appendChild(Y);Et();}();},hide:function(){var t=!W.state.isVisible,e=W.state.isDestroyed,n=!W.state.isEnabled,r=o(W.props.duration,1,D.duration);if(t||e||n)return;if(it("onHide",[W],!1),!1===W.props.onHide(W))return;W.state.isVisible=!1,W.state.isShown=!1,S=!1,M=!1,Q()&&(Y.style.visibility="hidden");if(st(),lt(),rt(),Q()){var i=et(),a=i.box,s=i.content;W.props.animation&&(y([a,s],r),w([a,s],"hidden"));}ot(),at(),W.props.animation?Q()&&function(t,e){dt(t,(function(){!W.state.isVisible&&Y.parentNode&&Y.parentNode.contains(Y)&&e(
19671);}));}(r,W.unmount):W.unmount();},hideWithInteractivity:function(t){tt().addEventListener("mousemove",_),f(H,_),_(t);},enable:function(){W.state.isEnabled=!0;},disable:function(){W.hide(),W.state.isEnabled=!1;},unmount:function(){W.state.isVisible&&W.hide();if(!W.state.isMounted)return;Ot(),Ct().forEach((function(t){t._tippy.unmount();})),Y.parentNode&&Y.parentNode.removeChild(Y);N=N.filter((function(t){return t!==W})),W.state.isMounted=!1,it("onHidden",[W]);},destroy:function(){if(W.state.isDestroyed)return;W.clearDelayTimeouts(),W.unmount(),gt(),delete e._tippy,W.state.isDestroyed=!0,it("onDestroy",[W]);}};if(!k.render)return W;var X=k.render(W),Y=X.popper,q=X.onUpdate;Y.setAttribute("data-tippy-root",""),Y.id="tippy-"+W.id,W.popper=Y,e._tippy=W,Y._tippy=W;var $=F.map((function(t){return t.fn(W)})),J=e.hasAttribute("aria-expanded");return mt(),at(),rt(),it("onCreate",[W]),k.showOnCreate&&Tt(),Y.addEventListener("mouseenter",(function(){W.props.interactive&&W.state.isVisible&&W.clearDelayTimeouts();})),Y.addEventListener("mouseleave",(function(t){W.props.interactive&&W.props.trigger.indexOf("mouseenter")>=0&&(tt().addEventListener("mousemove",_),_(t));})),W;function G(){var t=W.props.touch;return Array.isArray(t)?t:[t,0]}function K(){return "hold"===G()[0]}function Q(){var t;return !!(null==(t=W.props.render)?void 0:t.$$tippy)}function Z(){return A||e}function tt(){var t=Z().parentNode;return t?x(t):document}function et(){return I(Y)}function nt(t){return W.state.isMounted&&!W.state.isVisible||O.isTouch||b&&"focus"===b.type?0:o(W.props.delay,t?0:1,D.delay)}function rt(){Y.style.pointerEvents=W.props.interactive&&W.state.isVisible?"":"none",Y.style.zIndex=""+W.props.zIndex;}function it(t,e,n){var r;(void 0===n&&(n=!0),$.forEach((function(n){n[t]&&n[t].apply(void 0,e);})),n)&&(r=W.props)[t].apply(r,e);}function ot(){var t=W.props.aria;if(t.content){var n="aria-"+t.content,r=Y.id;c(W.props.triggerTarget||e).forEach((function(t){var e=t.getAttribute(n);if(W.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else {var i=e&&e.replace(r,"").trim();i?t.setAttribute(n,i):t.removeAttribute(n);}}));}}function at(){!J&&W.props.aria.expanded&&c(W.props.triggerTarget||e).forEach((function(t){W.props.interactive?t.setAttribute("aria-expanded",W.state.isVisible&&t===Z()?"true":"false"):t.removeAttribute("aria-expanded");}));}function st(){tt().removeEventListener("mousemove",_),H=H.filter((function(t){return t!==_}));}function pt(t){if(!(O.isTouch&&(V||"mousedown"===t.type)||W.props.interactive&&Y.contains(t.target))){if(Z().contains(t.target)){if(O.isTouch)return;if(W.state.isVisible&&W.props.trigger.indexOf("click")>=0)return}else it("onClickOutside",[W,t]);!0===W.props.hideOnClick&&(W.clearDelayTimeouts(),W.hide(),P=!0,setTimeout((function(){P=!1;})),W.state.isMounted||lt());}}function ut(){V=!0;}function ct(){V=!1;}function ft(){var t=tt();t.addEventListener("mousedown",pt,!0),t.addEventListener("touchend",pt,i),t.addEventListener("touchstart",ct,i),t.addEventListener("touchmove",ut,i);}function lt(){var t=tt();t.removeEventListener("mousedown",pt,!0),t.removeEventListener("touchend",pt,i),t.removeEventListener("touchstart",ct,i),t.removeEventListener("touchmove",ut,i);}function dt(t,e){var n=et().box;function r(t){t.target===n&&(E(n,"remove",r),e());}if(0===t)return e();E(n,"remove",C),E(n,"add",r),C=r;}function vt(t,n,r){void 0===r&&(r=!1),c(W.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),U.push({node:e,eventType:t,handler:n,options:r});}));}function mt(){var t;K()&&(vt("touchstart",ht,{passive:!0}),vt("touchend",yt,{passive:!0})),(t=W.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(vt(t,ht),t){case"mouseenter":vt("mouseleave",yt);break;case"focus":vt(r?"focusout":"blur",wt);break;case"focusin":vt("focusout",wt);}}));}function gt(){U.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i);})),U=[];}function ht(t){var e,n=!1;if(W.state.isEnabled&&!xt(t)&&!P){var r="focus"===(null==(e=b)?void 0:e.type);b=t,A=t.currentTarget,at(),!W.state.isVisible&&g(t)&&H.forEach((function(e){return e(t)}
19671)),"click"===t.type&&(W.props.trigger.indexOf("mouseenter")<0||M)&&!1!==W.props.hideOnClick&&W.state.isVisible?n=!0:Tt(t),"click"===t.type&&(M=!n),n&&!r&&At(t);}}function bt(t){var e=t.target,n=Z().contains(e)||Y.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,i=t.popperState,o=t.props.interactiveBorder,a=l(i.placement),s=i.modifiersData.offset;if(!s)return !0;var p="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=e.top-r+p>o,v=r-e.bottom-u>o,m=e.left-n+c>o,g=n-e.right-f>o;return d||v||m||g}))}(Ct().concat(Y).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:k}:null})).filter(Boolean),t)&&(st(),At(t));}function yt(t){xt(t)||W.props.trigger.indexOf("click")>=0&&M||(W.props.interactive?W.hideWithInteractivity(t):At(t));}function wt(t){W.props.trigger.indexOf("focusin")<0&&t.target!==Z()||W.props.interactive&&t.relatedTarget&&Y.contains(t.relatedTarget)||At(t);}function xt(t){return !!O.isTouch&&K()!==t.type.indexOf("touch")>=0}function Et(){Ot();var n=W.props,r=n.popperOptions,i=n.placement,o=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,p=Q()?I(Y).arrow:null,u=a?{getBoundingClientRect:a,contextElement:a.contextElement||Z()}:e,c=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(Q()){var n=et().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t);})),e.attributes.popper={};}}}];Q()&&p&&c.push({name:"arrow",options:{element:p,padding:3}}),c.push.apply(c,(null==r?void 0:r.modifiers)||[]),W.popperInstance=t.createPopper(u,Y,Object.assign({},r,{placement:i,onFirstUpdate:T,modifiers:c}));}function Ot(){W.popperInstance&&(W.popperInstance.destroy(),W.popperInstance=null);}function Ct(){return d(Y.querySelectorAll("[data-tippy-root]"))}function Tt(t){W.clearDelayTimeouts(),t&&it("onTrigger",[W,t]),ft();var e=nt(!0),n=G(),r=n[0],i=n[1];O.isTouch&&"hold"===r&&i&&(e=i),e?u=setTimeout((function(){W.show();}),e):W.show();}function At(t){if(W.clearDelayTimeouts(),it("onUntrigger",[W,t]),W.state.isVisible){if(!(W.props.trigger.indexOf("mouseenter")>=0&&W.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&M)){var e=nt(!1);e?m=setTimeout((function(){W.state.isVisible&&W.hide();}),e):h=requestAnimationFrame((function(){W.hide();}));}}else lt();}}function _(t,e){void 0===e&&(e={});var n=D.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",T,i),window.addEventListener("blur",L);var r=Object.assign({},e,{plugins:n}),o=b(t).reduce((function(t,e){var n=e&&U(e,r);return n&&t.push(n),t}),[]);return m(t)?o[0]:o}_.defaultProps=D,_.setDefaultProps=function(t){Object.keys(t).forEach((function(e){D[e]=t[e];}));},_.currentInput=O;var z=Object.assign({},t.applyStyles,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow);}}),F={mouseover:"mouseenter",focusin:"focus",click:"click"};var W={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(!(null==(e=t.props.render)?void 0:e.$$tippy))return {};var n=I(t.popper),r=n.box,i=n.content,o=t.props.animateFill?function(){var t=v();return t.className="tippy-backdrop",w([t],"hidden"),t}():null;return {onCreate:function(){o&&(r.insertBefore(o,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}));},onMount:function(){if(o){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));i.style.transitionDelay=Math.round(e/10)+"ms",o.style.transitionDuration=t,w([o],"visible");}},onShow:function(){o&&(o.style.transitionDuration="0ms");},onHide:function(){o&&w([o],"hidden");}}}};var X={clientX:0,clientY:0},Y=[];function q(t){var e=t.clientX,n=t.clientY;X={clientX:e,clientY:n};}var $={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=x(t.props.triggerTarget||e),r=!1,i=!1,o=!0,a=t.props;function s(){return "initial"===t.props.followCursor&&t.state.isVisible}function p(){n.addEventListener("mousemove",f);}function u(){n.removeEventListener("mousemove",f);}function c(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1;}function f(n){var r=!n.target||e.contains(n.target),i=t.props.followCursor,o=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),p=o-s.left,u=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=o,r=a;"initial"===i&&(n=t.left+p,r=t.top+u);var s="horizontal"===i?t.top:r,c="vertical"===i?t.right:n,f="horizontal"===i?t.bottom:r,l="vertical"===i?t.left:n;return {width:c-l,height:f-s,top:s,right:c,bottom:f,left:l}}});}function l(){t.props.followCursor&&(Y.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",q);}(n));}function d(){0===(Y=Y.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",q);}(n);}return {onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props;},onAfterUpdate:function(e,n){var o=n.followCursor;r||void 0!==o&&a.followCursor!==o&&(d(),o?(l(),!t.state.isMounted||i||s()||p()):(u(),c()));}
19671,onMount:function(){t.props.followCursor&&!i&&(o&&(f(X),o=!1),s()||p());},onTrigger:function(t,e){g(e)&&(X={clientX:e.clientX,clientY:e.clientY}),i="focus"===e.type;},onHidden:function(){t.props.followCursor&&(c(),u(),o=!0);}}}};var J={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,i=!1,o={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(i){var o=i.state;t.props.inlinePositioning&&(e!==o.placement&&t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var i=n[0],o=n[n.length-1],a="top"===t,s=i.top,p=o.bottom,u=a?i.left:o.left,c=a?i.right:o.right;return {top:s,bottom:p,left:u,right:c,width:c-u,height:p-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(t){return t.left}))),l=Math.max.apply(Math,n.map((function(t){return t.right}))),d=n.filter((function(e){return "left"===t?e.left===f:e.right===l})),v=d[0].top,m=d[d.length-1].bottom;return {top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return e}}(l(t),n.getBoundingClientRect(),d(n.getClientRects()),r)}(o.placement)}}),e=o.placement);}};function a(){var e;i||(e=function(t,e){var n;return {popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,o),i=!0,t.setProps(e),i=!1);}return {onCreate:a,onAfterUpdate:a,onTrigger:function(e,n){if(g(n)){var i=d(t.reference.getClientRects()),o=i.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY}));r=i.indexOf(o);}},onUntrigger:function(){r=-1;}}}};var G={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return !0===t.props.sticky||t.props.sticky===e}var i=null,o=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,p=r("popper")?n.getBoundingClientRect():null;(s&&K(i,s)||p&&K(o,p))&&t.popperInstance&&t.popperInstance.update(),i=s,o=p,t.state.isMounted&&requestAnimationFrame(a);}return {onMount:function(){t.props.sticky&&a();}}}};function K(t,e){return !t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return e&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e);}('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}'),_.setDefaultProps({plugins:[W,$,J,G],render:S}),_.createSingleton=function(t,e){var n;void 0===e&&(e={});var r,i=t,o=[],a=e.overrides,s=[],p=!1;function c(){o=i.map((function(t){return t.reference}));}
19671function f(t){i.forEach((function(e){t?e.enable():e.disable();}));}function l(t){return i.map((function(e){var n=e.setProps;return e.setProps=function(i){n(i),e.reference===r&&t.setProps(i);},function(){e.setProps=n;}}))}function d(t,e){var n=o.indexOf(e);if(e!==r){r=e;var s=(a||[]).concat("content").reduce((function(t,e){return t[e]=i[n].props[e],t}),{});t.setProps(Object.assign({},s,{getReferenceClientRect:"function"==typeof s.getReferenceClientRect?s.getReferenceClientRect:function(){return e.getBoundingClientRect()}}));}}f(!1),c();var m={fn:function(){return {onDestroy:function(){f(!0);},onHidden:function(){r=null;},onClickOutside:function(t){t.props.showOnCreate&&!p&&(p=!0,r=null);},onShow:function(t){t.props.showOnCreate&&!p&&(p=!0,d(t,o[0]));},onTrigger:function(t,e){d(t,e.currentTarget);}}}},g=_(v(),Object.assign({},u(e,["overrides"]),{plugins:[m].concat(e.plugins||[]),triggerTarget:o,popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],[z])})})),h=g.show;g.show=function(t){if(h(),!r&&null==t)return d(g,o[0]);if(!r||null!=t){if("number"==typeof t)return o[t]&&d(g,o[t]);if(i.includes(t)){var e=t.reference;return d(g,e)}return o.includes(t)?d(g,t):void 0}},g.showNext=function(){var t=o[0];if(!r)return g.show(0);var e=o.indexOf(r);g.show(o[e+1]||t);},g.showPrevious=function(){var t=o[o.length-1];if(!r)return g.show(t);var e=o.indexOf(r),n=o[e-1]||t;g.show(n);};var b=g.setProps;return g.setProps=function(t){a=t.overrides||a,b(t);},g.setInstances=function(t){f(!0),s.forEach((function(t){return t()}
19671)),i=t,f(!1),c(),l(g),g.setProps({triggerTarget:o});},s=l(g),g},_.delegate=function(t,e){var n=[],r=[],o=!1,a=e.target,s=u(e,["target"]),p=Object.assign({},s,{trigger:"manual",touch:!1}),f=Object.assign({},s,{showOnCreate:!0}),l=_(t,p);function d(t){if(t.target&&!o){var n=t.target.closest(a);if(n){var i=n.getAttribute("data-tippy-trigger")||e.trigger||D.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof f.touch||"touchstart"!==t.type&&i.indexOf(F[t.type])<0)){var s=_(n,f);s&&(r=r.concat(s));}}}}function v(t,e,r,i){void 0===i&&(i=!1),t.addEventListener(e,r,i),n.push({node:t,eventType:e,handler:r,options:i});}return c(l).forEach((function(t){var e=t.destroy,a=t.enable,s=t.disable;t.destroy=function(t){void 0===t&&(t=!0),t&&r.forEach((function(t){t.destroy();})),r=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i);})),n=[],e();},t.enable=function(){a(),r.forEach((function(t){return t.enable()})),o=!1;},t.disable=function(){s(),r.forEach((function(t){return t.disable()})),o=!0;},function(t){var e=t.reference;v(e,"touchstart",d,i),v(e,"mouseover",d),v(e,"focusin",d),v(e,"click",d);}(t);})),l},_.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;N.forEach((function(t){var e=!1;if(n&&(e=h(n)?t.reference===n:t.popper===n.popper),!e){var i=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:i});}}));},_.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',_}));
19672
19673/**
19674 * Add to this file to include any additional resources into compiled CSS + JS bundle.
19675 */

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.