PageSourceSearch

https://dermavalue.com/apos-frontend/releases/2026-08-04-13-16-51/default/public-module-bundle.js

js dermavalue.com collected 2026-09-24 13:29:58 UTC 1,078,591 bytes, 26,407 lines download raw bytes

vendor: 4,297 bytes, lines 1-2
1/*! For license information please see src-build.js.LICENSE.txt */
2(()=>{var e={692(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(r,o){"use strict";var i=[],a=Object.getPrototypeOf,s=i.slice,u=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},c=i.push,l=i.indexOf,f={},p=f.toString,d=f.hasOwnProperty,h=d.toString,g=h.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,o,i=(n=n||b).createElement("script");if(i.text=e,t)for(r in w)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[p.call(e)]||"object":typeof e}var k="3.7.1",C=/HTML$/i,A=function(e,t){return new A.fn.init(e,t)};function S(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!m(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function j(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}A.fn=A.prototype={jquery:k,constructor:A,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=A.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return A.each(this,e)},map:function(e){return this.pushStack(A.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(A.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:i.sort,splice:i.splice},A.extend=A.fn.extend=function(){var e,t,n,r,o,i,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=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&&(c&&r&&(A.isPlainObject(r)||(o=Array.isArray(r)))?(n=a[t],i=o&&!Array.isArray(n)?[]:o||A.isPlainObject(n)?n:{},o=!1,a[t]=A.extend(c,i,r)):void 0!==r&&(a[t]=r));return a},A.extend({expando:"jQuery"+(k+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]"!==p.call(e)||(t=a(e))&&("function"!=typeof(n=d.call(t,"constructor")&&t.constructor)||h.call(n)!==g))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){x(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(S(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,o=e.nodeType;if(!o)for(;t=e[r++];)n+=A.text(t);return 1===o||11===o?e.textContent:9===o?e.documentElement.textContent:3===o||4===o?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(S(Object(e))?A.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!C.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r=[],o=0,i=e.length,a=!n;o<i;o++)!t(e[o],o)!==a&&r.push(e[o]);return r},map:function(e,t,n){var r,o,i=0,a=[];if(S(e))for(r=e.length;i<r;i++)null!=(o=t(e[i],i,n))&&a.push(o);else for(i in e)null!=(o=t(e[i],i,n))&&a.push(o);return u(a)},guid:1,support:v}),"function"==typeof Symbol&&(A.fn[Symbol.iterator]=i[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){f["[object "+t+"]"]=t.toLowerCase()});
vendor: 17,267 bytes, line 2
2var E=i.pop,T=i.sort,$=i.splice,P="[\\x20\\t\\r\\n\\f]",O=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");A.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var D=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function q(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}A.escapeSelector=function(e){return(e+"").replace(D,q)};var L=b,N=c;!function(){var e,t,n,o,a,u,c,f,p,h,g=N,m=A.expando,y=0,b=0,w=ee(),x=ee(),_=ee(),k=ee(),C=function(e,t){return e===t&&(a=!0),0},S="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",D="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",q="\\["+P+"*("+D+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+D+"))|)"+P+"*\\]",R=":("+D+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+q+")*)|.*)\\)|)",I=new RegExp(P+"+","g"),F=new RegExp("^"+P+"*,"+P+"*"),M=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),H=new RegExp(P+"|>"),W=new RegExp(R),z=new RegExp("^"+D+"$"),B={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+S+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/[+~]/,J=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Q=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))},Y=function(){ue()},K=pe(function(e){return!0===e.disabled&&j(e,"fieldset")},{dir:"parentNode",next:"legend"});try{g.apply(i=s.call(L.childNodes),L.childNodes),i[L.childNodes.length].nodeType}catch(e){g={apply:function(e,t){N.apply(e,s.call(t))},call:function(e){N.apply(e,s.call(arguments,1))}}}function Z(e,t,n,r){var o,i,a,s,c,l,d,h=t&&t.ownerDocument,y=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return n;if(!r&&(ue(t),t=t||u,f)){if(11!==y&&(c=X.exec(e)))if(o=c[1]){if(9===y){if(!(a=t.getElementById(o)))return n;if(a.id===o)return g.call(n,a),n}else if(h&&(a=h.getElementById(o))&&Z.contains(t,a)&&a.id===o)return g.call(n,a),n}else{if(c[2])return g.apply(n,t.getElementsByTagName(e)),n;if((o=c[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(o)),n}if(!(k[e+" "]||p&&p.test(e))){if(d=e,h=t,1===y&&(H.test(e)||M.test(e))){for((h=G.test(e)&&se(t.parentNode)||t)==t&&v.scope||((s=t.getAttribute("id"))?s=A.escapeSelector(s):t.setAttribute("id",s=m)),i=(l=le(e)).length;i--;)l[i]=(s?"#"+s:":scope")+" "+fe(l[i]);d=l.join(",")}try{return g.apply(n,h.querySelectorAll(d)),n}catch(t){k(e,!0)}finally{s===m&&t.removeAttribute("id")}}}return ye(e.replace(O,"$1"),t,n,r)}function ee(){var e=[];return function n(r,o){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=o}}function te(e){return e[m]=!0,e}function ne(e){var t=u.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return j(t,"input")&&t.type===e}}function oe(e){return function(t){return(j(t,"input")||j(t,"button"))&&t.type===e}}function ie(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&K(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ae(e){return te(function(t){return t=+t,te(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function se(e){return e&&void 0!==e.getElementsByTagName&&e}function ue(e){var n,r=e?e.ownerDocument||e:L;return r!=u&&9===r.nodeType&&r.documentElement?(c=(u=r).documentElement,f=!A.isXMLDoc(u),h=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&L!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",Y),v.getById=ne(function(e){return c.appendChild(e).id=A.expando,!u.getElementsByName||!u.getElementsByName(A.expando).length}),v.disconnectedMatch=ne(function(e){return h.call(e,"*")}),v.scope=ne(function(){return u.querySelectorAll(":scope")}),v.cssHas=ne(function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),v.getById?(t.filter.ID=function(e){var t=e.replace(J,Q);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(J,Q);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},p=[],ne(function(e){var t;c.appendChild(e).innerHTML="<a id='"+m+"' href='' disabled='disabled'></a><select id='"+m+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||p.push("\\["+P+"*(?:value|"+S+")"),e.querySelectorAll("[id~="+m+"-]").length||p.push("~="),e.querySelectorAll("a#"+m+"+*").length||p.push(".#.+[+~]"),e.querySelectorAll(":checked").length||p.push(":checked"),(t=u.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(t=u.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||p.push("\\["+P+"*name"+P+"*="+P+"*(?:''|\"\")")}),v.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),C=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===u||e.ownerDocument==L&&Z.contains(L,e)?-1:t===u||t.ownerDocument==L&&Z.contains(L,t)?1:o?l.call(o,e)-l.call(o,t):0:4&n?-1:1)},u):u}for(e in Z.matches=function(e,t){return Z(e,null,null,t)},Z.matchesSelector=function(e,t){if(ue(e),f&&!k[t+" "]&&(!p||!p.test(t)))try{var n=h.call(e,t);if(n||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){k(t,!0)}return Z(t,u,null,[e]).length>0},Z.contains=function(e,t){return(e.ownerDocument||e)!=u&&ue(e),A.contains(e,t)},Z.attr=function(e,n){(e.ownerDocument||e)!=u&&ue(e);var r=t.attrHandle[n.toLowerCase()],o=r&&d.call(t.attrHandle,n.toLowerCase())?r(e,n,!f):void 0;return void 0!==o?o:e.getAttribute(n)},Z.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},A.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!v.sortStable,o=!v.sortStable&&s.call(e,0),T.call(e,C),a){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)$.call(e,n[r],1)}return o=null,e},A.fn.uniqueSort=function(){return this.pushStack(A.uniqueSort(s.apply(this)))},t=A.expr={cacheLength:50,createPseudo:te,match:B,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(J,Q),e[3]=(e[3]||e[4]||e[5]||"").replace(J,Q),"~="===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]||Z.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]&&Z.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return B.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=le(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(J,Q).toLowerCase();return"*"===e?function(){return!0}:function(e){return j(e,t)}},CLASS:function(e){var t=w[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&w(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=Z.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(I," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,p,d,h=i!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),b=!u&&!s,w=!1;if(g){if(i){for(;h;){for(f=t;f=f[h];)if(s?j(f,v):1===f.nodeType)return!1;d=h="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&b){for(w=(p=(c=(l=g[m]||(g[m]={}))[e]||[])[0]===y&&c[1])&&c[2],f=p&&g.childNodes[p];f=++p&&f&&f[h]||(w=p=0)||d.pop();)if(1===f.nodeType&&++w&&f===t){l[e]=[y,p,w];break}}else if(b&&(w=p=(c=(l=t[m]||(t[m]={}))[e]||[])[0]===y&&c[1]),!1===w)for(;(f=++p&&f&&f[h]||(w=p=0)||d.pop())&&(!(s?j(f,v):1===f.nodeType)||!++w||(b&&((l=f[m]||(f[m]={}))[e]=[y,w]),f!==t)););return(w-=o)===r||w%r===0&&w/r>=0}}},PSEUDO:function(e,n){var r,o=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Z.error("unsupported pseudo: "+e);return o[m]?o(n):o.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)e[r=l.call(e,i[a])]=!(t[r]=i[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:te(function(e){var t=[],n=[],r=me(e.replace(O,"$1"));return r[m]?te(function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:te(function(e){return function(t){return Z(e,t).length>0}}),contains:te(function(e){return e=e.replace(J,Q),function(t){return(t.textContent||A.text(t)).indexOf(e)>-1}}),lang:te(function(e){return z.test(e||"")||Z.error("unsupported lang: "+e),e=e.replace(J,Q).toLowerCase(),function(t){var n;do{if(n=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return u.activeElement}catch(e){}}()&&u.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ie(!1),disabled:ie(!0),checked:function(e){return j(e,"input")&&!!e.checked||j(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return U.test(e.nodeName)},button:function(e){return j(e,"input")&&"button"===e.type||j(e,"button")},text:function(e){var t;return j(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ae(function(){return[0]}),last:ae(function(e,t){return[t-1]}),eq:ae(function(e,t,n){return[n<0?n+t:n]}),even:ae(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ae(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ae(function(e,t,n){var r;for(r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:ae(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},t.pseudos.nth=t.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[e]=re(e);for(e in{submit:!0,reset:!0})t.pseudos[e]=oe(e);function ce(){}function le(e,n){var r,o,i,a,s,u,c,l=x[e+" "];if(l)return n?0:l.slice(0);for(s=e,u=[],c=t.preFilter;s;){for(a in r&&!(o=F.exec(s))||(o&&(s=s.slice(o[0].length)||s),u.push(i=[])),r=!1,(o=M.exec(s))&&(r=o.shift(),i.push({value:r,type:o[0].replace(O," ")}),s=s.slice(r.length)),t.filter)!(o=B[a].exec(s))||c[a]&&!(o=c[a](o))||(r=o.shift(),i.push({value:r,type:a,matches:o}),s=s.slice(r.length));if(!r)break}return n?s.length:s?Z.error(e):x(e,u).slice(0)}function fe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function pe(e,t,n){var r=t.dir,o=t.next,i=o||r,a=n&&"parentNode"===i,s=b++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,u){var c,l,f=[y,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(l=t[m]||(t[m]={}),o&&j(t,o))t=t[r]||t;else{if((c=l[i])&&c[0]===y&&c[1]===s)return f[2]=c[2];if(l[i]=f,f[2]=e(t,n,u))return!0}return!1}}function de(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function he(e,t,n,r,o){for(var i,a=[],s=0,u=e.length,c=null!=t;s<u;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),c&&t.push(s)));return a}function ge(e,t,n,r,o,i){return r&&!r[m]&&(r=ge(r)),o&&!o[m]&&(o=ge(o,i)),te(function(i,a,s,u){var c,f,p,d,h=[],v=[],m=a.length,y=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)Z(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),b=!e||!i&&t?y:he(y,h,e,s,u);if(n?n(b,d=o||(i?e:m||r)?[]:a,s,u):d=b,r)for(c=he(d,v),r(c,[],s,u),f=c.length;f--;)(p=c[f])&&(d[v[f]]=!(b[v[f]]=p));if(i){if(o||e){if(o){for(c=[],f=d.length;f--;)(p=d[f])&&c.push(b[f]=p);o(null,d=[],c,u)}for(f=d.length;f--;)(p=d[f])&&(c=o?l.call(i,p):h[f])>-1&&(i[c]=!(a[c]=p))}}else d=he(d===a?d.splice(m,d.length):d),o?o(null,a,d,u):g.apply(a,d)})}function ve(e){for(var r,o,i,a=e.length,s=t.relative[e[0].type],u=s||t.relative[" "],c=s?1:0,f=pe(function(e){return e===r},u,!0),p=pe(function(e){return l.call(r,e)>-1},u,!0),d=[function(e,t,o){var i=!s&&(o||t!=n)||((r=t).nodeType?f(e,t,o):p(e,t,o));return r=null,i}];c<a;c++)if(o=t.relative[e[c].type])d=[pe(de(d),o)];else{if((o=t.filter[e[c].type].apply(null,e[c].matches))[m]){for(i=++c;i<a&&!t.relative[e[i].type];i++);return ge(c>1&&de(d),c>1&&fe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(O,"$1"),o,c<i&&ve(e.slice(c,i)),i<a&&ve(e=e.slice(i)),i<a&&fe(e))}d.push(o)}return de(d)}function me(e,r){var o,i=[],a=[],s=_[e+" "];if(!s){for(r||(r=le(e)),o=r.length;o--;)(s=ve(r[o]))[m]?i.push(s):a.push(s);s=_(e,function(e,r){var o=r.length>0,i=e.length>0,a=function(a,s,c,l,p){var d,h,v,m=0,b="0",w=a&&[],x=[],_=n,k=a||i&&t.find.TAG("*",p),C=y+=null==_?1:Math.random()||.1,S=k.length;for(p&&(n=s==u||s||p);b!==S&&null!=(d=k[b]);b++){if(i&&d){for(h=0,s||d.ownerDocument==u||(ue(d),c=!f);v=e[h++];)if(v(d,s||u,c)){g.call(l,d);break}p&&(y=C)}o&&((d=!v&&d)&&m--,a&&w.push(d))}if(m+=b,o&&b!==m){for(h=0;v=r[h++];)v(w,x,s,c);if(a){if(m>0)for(;b--;)w[b]||x[b]||(x[b]=E.call(l));x=he(x)}g.apply(l,x),p&&!a&&x.length>0&&m+r.length>1&&A.uniqueSort(l)}return p&&(y=C,n=_),w};return o?te(a):a}(a,i)),s.selector=e}return s}function ye(e,n,r,o){var i,a,s,u,c,l="function"==typeof e&&e,p=!o&&le(e=l.selector||e);if(r=r||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(s=a[0]).type&&9===n.nodeType&&f&&t.relative[a[1].type]){if(!(n=(t.find.ID(s.matches[0].replace(J,Q),n)||[])[0]))return r;l&&(n=n.parentNode),e=e.slice(a.shift().value.length)}for(i=B.needsContext.test(e)?0:a.length;i--&&(s=a[i],!t.relative[u=s.type]);)if((c=t.find[u])&&(o=c(s.matches[0].replace(J,Q),G.test(a[0].type)&&se(n.parentNode)||n))){if(a.splice(i,1),!(e=o.length&&fe(a)))return g.apply(r,o),r;break}}return(l||me(e,p))(o,n,!f,r,!n||G.test(e)&&se(n.parentNode)||n),r}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,v.sortStable=m.split("").sort(C).join("")===m,ue(),v.sortDetached=ne(function(e){return 1&e.compareDocumentPosition(u.createElement("fieldset"))}),A.find=Z,A.expr[":"]=A.expr.pseudos,A.unique=A.uniqueSort,Z.compile=me,Z.select=ye,Z.setDocument=ue,Z.tokenize=le,Z.escape=A.escapeSelector,Z.getText=A.text,Z.isXML=A.isXMLDoc,Z.selectors=A.expr,Z.support=A.support,Z.uniqueSort=A.uniqueSort}();var R=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&A(e).is(n))break;r.push(e)}return r},I=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},F=A.expr.match.needsContext,M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function H(e,t,n){return m(t)?A.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?A.grep(e,function(e){return e===t!==n}):"string"!=typeof t?A.grep(e,function(e){return l.call(t,e)>-1!==n}):A.filter(t,e,n)}A.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?A.find.matchesSelector(r,e)?[r]:[]:A.f
vendor: 5,338 bytes, line 2
2ind.matches(e,A.grep(t,function(e){return 1===e.nodeType}))},A.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(A(e).filter(function(){for(t=0;t<r;t++)if(A.contains(o[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)A.find(e,o[t],n);return r>1?A.uniqueSort(n):n},filter:function(e){return this.pushStack(H(this,e||[],!1))},not:function(e){return this.pushStack(H(this,e||[],!0))},is:function(e){return!!H(this,"string"==typeof e&&F.test(e)?A(e):e||[],!1).length}});var W,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||W,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:z.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 A?t[0]:t,A.merge(this,A.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),M.test(r[1])&&A.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=b.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(A):A.makeArray(e,this)}).prototype=A.fn,W=A(b);var B=/^(?:parents|prev(?:Until|All))/,U={children:!0,contents:!0,next:!0,prev:!0};function V(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}A.fn.extend({has:function(e){var t=A(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(A.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,o=this.length,i=[],a="string"!=typeof e&&A(e);if(!F.test(e))for(;r<o;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&A.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?A.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?l.call(A(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),A.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return R(e,"parentNode")},parentsUntil:function(e,t,n){return R(e,"parentNode",n)},next:function(e){return V(e,"nextSibling")},prev:function(e){return V(e,"previousSibling")},nextAll:function(e){return R(e,"nextSibling")},prevAll:function(e){return R(e,"previousSibling")},nextUntil:function(e,t,n){return R(e,"nextSibling",n)},prevUntil:function(e,t,n){return R(e,"previousSibling",n)},siblings:function(e){return I((e.parentNode||{}).firstChild,e)},children:function(e){return I(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(j(e,"template")&&(e=e.content||e),A.merge([],e.childNodes))}},function(e,t){A.fn[e]=function(n,r){var o=A.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=A.filter(r,o)),this.length>1&&(U[e]||A.uniqueSort(o),B.test(e)&&o.reverse()),this.pushStack(o)}});var X=/[^\x20\t\r\n\f]+/g;function G(e){return e}function J(e){throw e}function Q(e,t,n,r){var o;try{e&&m(o=e.promise)?o.call(e).done(t).fail(n):e&&m(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}A.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return A.each(e.match(X)||[],function(e,n){t[n]=!0}),t}(e):A.extend({},e);var t,n,r,o,i=[],a=[],s=-1,u=function(){for(o=o||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},c={add:function(){return i&&(n&&!t&&(s=i.length-1,a.push(n)),function t(n){A.each(n,function(n,r){m(r)?e.unique&&c.has(r)||i.push(r):r&&r.length&&"string"!==_(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return A.each(arguments,function(e,t){for(var n;(n=A.inArray(t,i,n))>-1;)i.splice(n,1),n<=s&&s--}),this},has:function(e){return e?A.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},A.extend({Deferred:function(e){var t=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return A.Deferred(function(n){A.each(t,function(t,r){var o=m(e[r[4]])&&e[r[4]];i[r[1]](function(){var e=o&&o.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(e,n,o){var i=0;function a(e,t,n,o){return function(){var s=this,u=arguments,c=function(){var r,c;if(!(e<i)){if((r=n.apply(s,u))===t.promise())throw new TypeError("Thenable self
2-resolution");c=r&&("object"==typeof r||"function"==typeof r)&&r.then,m(c)?o?c.call(r,a(i,t,G,o),a(i,t,J,o)):(i++,c.call(r,a(i,t,G,o),a(i,t,J,o),a(i,t,G,t.notifyWith))):(n!==G&&(s=void 0,u=[r]),(o||t.resolveWith)(s,u))}},l=o?c:function(){try{c()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,l.error),e+1>=i&&(n!==J&&(s=void 0,u=[r]),t.rejectWith(s,u))}};e?l():(A.Deferred.getErrorHook?l.error=A.Deferred.getErrorHook():A.Deferred.getStackHook&&(l.error=A.Deferred.getStackHook()),r.setTimeout(l))}}return A.Deferred(function(r){t[0][3].add(a(0,r,m(o)?o:G,r.notifyWith)),t[1][3].add(a(0,r,m(e)?e:G)),t[2][3].add(a(0,r,m(n)?n:J))}).promise()},promise:function(e){return null!=e?A.extend(e,o):o}},i={};return A.each(t,function(e,r){var a=r[2],s=r[5];o[r[1]]=a.add,s&&a.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=a.fireWith}),o.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=s.call(arguments),i=A.Deferred(),a=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?s.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(Q(e,i.done(a(n)).resolve,i.reject,!t),"pending"===i.state()||m(o[n]&&o[n].then)))return i.then();for(;n--;)Q(o[n],a(n),i.reject);return i.promise()}});var Y=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&Y.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},A.readyException=function(e){r.setTimeout(function(){throw e})};var K=A.Deferred();function Z(){b.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),A.ready()}A.fn.ready=function(e){return K.then(e).catch(function(e){A.readyException(e)}),this},A.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==e&&--A.readyWait>0||K.resolveWith(b,[A]))}}),A.ready.then=K.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var ee=function(e,t,n,r,o,i,a){var s=0,u=e.length,c=null==n;if("object"===_(n))for(s in o=!0,n)ee(e,t,s,n[s],!0,i,a);else if(void 0!==r&&(o=!0,m(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(A(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return o?e:c?t.call(e):u?t(e[0],n):i},te=/^-ms-/,ne=/-([a-z])/g;function re(e,t){return t.toUpperCase()}function oe(e){return e.replace(te,"ms-").replace(ne,re)}var ie=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function ae(){this.expando=A.expando+ae.uid++}ae.uid=1,ae.prototype={cache:function(e){var t=e[this.expando];return t||(t={},ie(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[oe(t)]=n;else for(r in t)o[oe(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][oe(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(oe):(t=oe(t))in r?[t]:t.match(X)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||A.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&&!A.isEmptyObject(t)}};var se=new ae,ue=new ae,ce=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,le=/[A-Z]/g;function fe(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(le,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ce.test(e)?JSON.parse(e):e)}(n)}catch(e){}ue.set(e,t,n)}else n=void 0;return n}A.extend({hasData:function(e){return ue.hasData(e)||se.hasData(e)},data:function(e,t,n){return ue.access(e,t,n)},removeData:function(e,t){ue.remove(e,t)},_data:function(e,t,n){return se.access(e,t,n)},_removeData:function(e,t){se.remove(e,t)}}),A.fn.extend({data:function(e,t){var n,r,o,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(o=ue.get(i),1===i.nodeType&&!se.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=oe(r.slice(5)),fe(i,r,o[r]));se.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){ue.set(this,e)}):ee(this,function(t){var n;if(i&&void 0===t)return void 0!==(n=ue.get(i,e))||void 0!==(n=fe(i,e))?n:void 0;this.each(function(){ue.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ue.remove(this,e)})}}),A.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=se.get(e,t),n&&(!r||Array.isArray(n)?r=se.access(e,t,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=A.queue(e,t),r=n.length,o=n.shift(),i=A._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,function(){A.dequeue(e,t)}
vendor: 6,632 bytes, line 2
2,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return se.get(e,n)||se.access(e,n,{empty:A.Callbacks("once memory").add(function(){se.remove(e,[t+"queue",n])})})}}),A.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?A.queue(this[0],e):void 0===t?this:this.each(function(){var n=A.queue(this,e,t);A._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&A.dequeue(this,e)})},dequeue:function(e){return this.each(function(){A.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=A.Deferred(),i=this,a=this.length,s=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=se.get(i[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),o.promise(t)}});var pe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,de=new RegExp("^(?:([+-])=|)("+pe+")([a-z%]*)$","i"),he=["Top","Right","Bottom","Left"],ge=b.documentElement,ve=function(e){return A.contains(e.ownerDocument,e)},me={composed:!0};ge.getRootNode&&(ve=function(e){return A.contains(e.ownerDocument,e)||e.getRootNode(me)===e.ownerDocument});var ye=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ve(e)&&"none"===A.css(e,"display")};function be(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return A.css(e,t,"")},u=s(),c=n&&n[3]||(A.cssNumber[t]?"":"px"),l=e.nodeType&&(A.cssNumber[t]||"px"!==c&&+u)&&de.exec(A.css(e,t));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)A.style(e,t,l+c),(1-i)*(1-(i=s()/u||.5))<=0&&(a=0),l/=i;l*=2,A.style(e,t,l+c),n=n||[]}return n&&(l=+l||+u||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=o)),o}var we={};function xe(e){var t,n=e.ownerDocument,r=e.nodeName,o=we[r];return o||(t=n.body.appendChild(n.createElement(r)),o=A.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),we[r]=o,o)}function _e(e,t){for(var n,r,o=[],i=0,a=e.length;i<a;i++)(r=e[i]).style&&(n=r.style.display,t?("none"===n&&(o[i]=se.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&ye(r)&&(o[i]=xe(r))):"none"!==n&&(o[i]="none",se.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}A.fn.extend({show:function(){return _e(this,!0)},hide:function(){return _e(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ye(this)?A(this).show():A(this).hide()})}});var ke,Ce,Ae=/^(?:checkbox|radio)$/i,Se=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,je=/^$|^module$|\/(?:java|ecma)script/i;ke=b.createDocumentFragment().appendChild(b.createElement("div")),(Ce=b.createElement("input")).setAttribute("type","radio"),Ce.setAttribute("checked","checked"),Ce.setAttribute("name","t"),ke.appendChild(Ce),v.checkClone=ke.cloneNode(!0).cloneNode(!0).lastChild.checked,ke.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ke.cloneNode(!0).lastChild.defaultValue,ke.innerHTML="<option></option>",v.option=!!ke.lastChild;var Ee={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 Te(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&j(e,t)?A.merge([e],n):n}function $e(e,t){for(var n=0,r=e.length;n<r;n++)se.set(e[n],"globalEval",!t||se.get(t[n],"globalEval"))}Ee.tbody=Ee.tfoot=Ee.colgroup=Ee.caption=Ee.thead,Ee.th=Ee.td,v.option||(Ee.optgroup=Ee.option=[1,"<select multiple='multiple'>","</select>"]);var Pe=/<|&#?\w+;/;function Oe(e,t,n,r,o){for(var i,a,s,u,c,l,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((i=e[d])||0===i)if("object"===_(i))A.merge(p,i.nodeType?[i]:i);else if(Pe.test(i)){for(a=a||f.appendChild(t.createElement("div")),s=(Se.exec(i)||["",""])[1].toLowerCase(),u=Ee[s]||Ee._default,a.innerHTML=u[1]+A.htmlPrefilter(i)+u[2],l=u[0];l--;)a=a.lastChild;A.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(i));for(f.textContent="",d=0;i=p[d++];)if(r&&A.inArray(i,r)>-1)o&&o.push(i);else if(c=ve(i),a=Te(f.appendChild(i),"script"),c&&$e(a),n)for(l=0;i=a[l++];)je.test(i.type||"")&&n.push(i);return f}var De=/^([^.]*)(?:\.(.+)|)/;function qe(){return!0}function Le(){return!1}function Ne(e,t,n,r,o,i){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ne(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Le;else if(!o)return e;return 1===i&&(a=o,o=function(e){return A().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=A.guid++)),e.each(function(){A.event.add(this,t,o,r,n)})}function Re(e,t,n){n?(se.set(e,t,!1),A.event.add(e,t,{namespace:!1,handler:function(e){var n,r=se.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(A.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),se.set(this,t,r),this[t](),n=se.get(this,t),se.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(se.set(this,t,A.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=qe)}})):void 0===se.get(e,t)&&A.event.add(e,t,qe)}A.event={global:{},add:function(e,t,n,r,o){var i,a,s,u,c,l,f,p,d,h,g,v=se.get(e);if(ie(e))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&A.find.matchesSelector(ge,o),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==A&&A.event.triggered!==t.type?A.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(X)||[""]).length;c--;)d=g=(s=De.exec(t[c])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=A.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=A.event.special[d]||{},l=A.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&A.expr.match.needsContext.test(o),namespace:h.join(".")},i),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,l):p.push(l),A.event.global[d]=!0)},remove:function(e,t,n,r,o){var i,a,s,u,c,l,f,p,d,h,g,v=se.hasData(e)&&se.get(e);if(v&&(u=v.events)){for(c=(t=(t||"").match(X)||[""]).length;c--;)if(d=g=(s=De.exec(t[c])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=A.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=p.length;i--;
vendor: 8,159 bytes, line 2
2)l=p[i],!o&&g!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(i,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(e,l));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||A.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)A.event.remove(e,d+t[c],n,r,!0);A.isEmptyObject(u)&&se.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=new Array(arguments.length),u=A.event.fix(e),c=(se.get(this,"events")||Object.create(null))[u.type]||[],l=A.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=A.event.handlers.call(this,u,c),t=0;(o=a[t++])&&!u.isPropagationStopped();)for(u.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==i.namespace&&!u.rnamespace.test(i.namespace)||(u.handleObj=i,u.data=i.data,void 0!==(r=((A.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,o,i,a,s=[],u=t.delegateCount,c=e.target;if(u&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(i=[],a={},n=0;n<u;n++)void 0===a[o=(r=t[n]).selector+" "]&&(a[o]=r.needsContext?A(o,this).index(c)>-1:A.find(o,this,null,[c]).length),a[o]&&i.push(r);i.length&&s.push({elem:c,handlers:i})}return c=this,u<t.length&&s.push({elem:c,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(A.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[A.expando]?e:new A.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return Ae.test(t.type)&&t.click&&j(t,"input")&&Re(t,"click",!0),!1},trigger:function(e){var t=this||e;return Ae.test(t.type)&&t.click&&j(t,"input")&&Re(t,"click"),!0},_default:function(e){var t=e.target;return Ae.test(t.type)&&t.click&&j(t,"input")&&se.get(t,"click")||j(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},A.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},A.Event=function(e,t){if(!(this instanceof A.Event))return new A.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?qe:Le,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&&A.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[A.expando]=!0},A.Event.prototype={constructor:A.Event,isDefaultPrevented:Le,isPropagationStopped:Le,isImmediatePropagationStopped:Le,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=qe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=qe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=qe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},A.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},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){if(b.documentMode){var n=se.get(this,"handle"),r=A.event.fix(e);r.type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)}else A.event.simulate(t,e.target,A.event.fix(e))}A.event.special[e]={setup:function(){var r;if(Re(this,e,!0),!b.documentMode)return!1;(r=se.get(this,t))||this.addEventListener(t,n),se.set(this,t,(r||0)+1)},trigger:function(){return Re(this,e),!0},teardown:function(){var e;if(!b.documentMode)return!1;(e=se.get(this,t)-1)?se.set(this,t,e):(this.removeEventListener(t,n),se.remove(this,t))},_default:function(t){return se.get(t.target,e)},delegateType:t},A.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,o=b.documentMode?this:r,i=se.get(o,t);i||(b.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),se.set(o,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,o=b.documentMode?this:r,i=se.get(o,t)-1;i?se.set(o,t,i):(b.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),se.remove(o,t))}}}),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){A.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,o=e.handleObj;return r&&(r===this||A.contains(this,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),A.fn.extend({on:function(e,t,n,r){return Ne(this,e,t,n,r)},one:function(e,t,n,r){return Ne(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,A(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Le),this.each(function(){A.event.remove(this,e,n,t)})}});var Ie=/<script|<style|<link/i,Fe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function He(e,t){return j(e,"table")&&j(11!==t.nodeType?t:t.firstChild,"tr")&&A(e).children("tbody")[0]||e}function We(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ze(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var n,r,o,i,a,s;if(1===t.nodeType){if(se.hasData(e)&&(s=se.get(e).events))for(o in se.remove(t,"handle events"),s)for(n=0,r=s[o].length;n<r;n++)A.event.add(t,o,s[o][n]);ue.hasData(e)&&(i=ue.access(e),a=A.extend({},i),ue.set(t,a))}}function Ue(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ae.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Ve(e,t,n,r){t=u(t);var o,i,a,s,c,l,f=0,p=e.length,d=p-1,h=t[0],g=m(h);if(g||p>1&&"string"==typeof h&&!v.checkClone&&Fe.test(h))return e.each(function(o){var i=e.eq(o);g&&(t[0]=h.call(this,o,i.html())),Ve(i,t,n,r)});if(p&&(i=(o=Oe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=(a=A.map(Te(o,"script"),We)).length;f<p;f++)c=o,f!==d&&(c=A.clone(c,!0,!0),s&&A.merge(a,Te(c,"script"))),n.call(e[f],c,f);if(s)for(l=a[a.length-1].ownerDocument,A.map(a,ze),f=0;f<s;f++)c=a[f],je.test(c.type||"")&&!se.access(c,"globalEval")&&A.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?A._evalUrl&&!c.noModule&&A._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},l):x(c.textContent.replace(Me,""),c,l))}return e}function Xe(e,t,n){for(var r,o=t?A.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||A.cleanData(Te(r)),r.parentNode&&(n&&ve(r)&&$e(Te(r,"script")),r.parentNode.removeChild(r));return e}A.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,o,i,a,s=e.cloneNode(!0),u=ve(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||A.isXMLDoc(e)))for(a=Te(s),r=0,o=(i=Te(e)).length;r<o;r++)Ue(i[r],a[r]);if(t)if(n)for(i=i||Te(e),a=a||Te(s),r=0,o=i.length;r<o;r++)Be(i[r],a[r]);else Be(e,s);return(a=Te(s,"script")).length>0&&$e(a,!u&&Te(e,"script")),s},cleanData:function(e){for(var t,n,r,o=A.event.special,i=0;void 0!==(n=e[i]);i++)if(ie(n)){if(t=n[se.expando]){if(t.events)for(r in t.events)
vendor: 10,859 bytes, line 2
2o[r]?A.event.remove(n,r):A.removeEvent(n,r,t.handle);n[se.expando]=void 0}n[ue.expando]&&(n[ue.expando]=void 0)}}}),A.fn.extend({detach:function(e){return Xe(this,e,!0)},remove:function(e){return Xe(this,e)},text:function(e){return ee(this,function(e){return void 0===e?A.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 Ve(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||He(this,e).appendChild(e)})},prepend:function(){return Ve(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=He(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ve(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&&(A.cleanData(Te(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return A.clone(this,e,t)})},html:function(e){return ee(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&&!Ie.test(e)&&!Ee[(Se.exec(e)||["",""])[1].toLowerCase()]){e=A.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(A.cleanData(Te(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Ve(this,arguments,function(t){var n=this.parentNode;A.inArray(this,e)<0&&(A.cleanData(Te(this)),n&&n.replaceChild(t,this))},e)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){A.fn[e]=function(e){for(var n,r=[],o=A(e),i=o.length-1,a=0;a<=i;a++)n=a===i?this:this.clone(!0),A(o[a])[t](n),c.apply(r,n.get());return this.pushStack(r)}});var Ge=new RegExp("^("+pe+")(?!px)[a-z%]+$","i"),Je=/^--/,Qe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},Ye=function(e,t,n){var r,o,i={};for(o in t)i[o]=e.style[o],e.style[o]=t[o];for(o in r=n.call(e),t)e.style[o]=i[o];return r},Ke=new RegExp(he.join("|"),"i");function Ze(e,t,n){var r,o,i,a,s=Je.test(t),u=e.style;return(n=n||Qe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(O,"$1")||void 0),""!==a||ve(e)||(a=A.style(e,t)),!v.pixelBoxStyles()&&Ge.test(a)&&Ke.test(t)&&(r=u.width,o=u.minWidth,i=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=o,u.maxWidth=i)),void 0!==a?a+"":a}function et(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){c.style.cssText="position:absolute;left:-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%",ge.appendChild(c).appendChild(l);var e=r.getComputedStyle(l);n="1%"!==e.top,u=12===t(e.marginLeft),l.style.right="60%",a=36===t(e.right),o=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),ge.removeChild(c),l=null}}function t(e){return Math.round(parseFloat(e))}var n,o,i,a,s,u,c=b.createElement("div"),l=b.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,A.extend(v,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,o;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",ge.appendChild(e).appendChild(t).appendChild(n),o=r.getComputedStyle(t),s=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===t.offsetHeight,ge.removeChild(e)),s}}))}();var tt=["Webkit","Moz","ms"],nt=b.createElement("div").style,rt={};function ot(e){return A.cssProps[e]||rt[e]||(e in nt?e:rt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=tt.length;n--;)if((e=tt[n]+t)in nt)return e}(e)||e)}var it=/^(none|table(?!-c[ea]).+)/,at={position:"absolute",visibility:"hidden",display:"block"},st={letterSpacing:"0",fontWeight:"400"};function ut(e,t,n){var r=de.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function ct(e,t,n,r,o,i){var a="width"===t?1:0,s=0,u=0,c=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=A.css(e,n+he[a],!0,o)),r?("content"===n&&(u-=A.css(e,"padding"+he[a],!0,o)),"margin"!==n&&(u-=A.css(e,"border"+he[a]+"Width",!0,o))):(u+=A.css(e,"padding"+he[a],!0,o),"padding"!==n?u+=A.css(e,"border"+he[a]+"Width",!0,o):s+=A.css(e,"border"+he[a]+"Width",!0,o));return!r&&i>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-u-s-.5))||0),u+c}function lt(e,t,n){var r=Qe(e),o=(!v.boxSizingReliable()||n)&&"border-box"===A.css(e,"boxSizing",!1,r),i=o,a=Ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ge.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&o||!v.reliableTrDimensions()&&j(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===A.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===A.css(e,"boxSizing",!1,r),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+ct(e,t,n||(o?"border":"content"),i,r,a)+"px"}function ft(e,t,n,r,o){return new ft.prototype.init(e,t,n,r,o)}A.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,a,s=oe(t),u=Je.test(t),c=e.style;if(u||(t=ot(s)),a=A.cssHooks[t]||A.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,r))?o:c[t];"string"==(i=typeof n)&&(o=de.exec(n))&&o[1]&&(n=be(e,t,o),i="number"),null!=n&&n==n&&("number"!==i||u||(n+=o&&o[3]||(A.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var o,i,a,s=oe(t);return Je.test(t)||(t=ot(s)),(a=A.cssHooks[t]||A.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=Ze(e,t,r)),"normal"===o&&t in st&&(o=st[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),A.each(["height","width"],function(e,t){A.cssHooks[t]={get:function(e,n,r){if(n)return!it.test(A.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?lt(e,t,r):Ye(e,at,function(){return lt(e,t,r)})},set:function(e,n,r){var o,i=Qe(e),a=!v.scrollboxSize()&&"absolute"===i.position,s=(a||r)&&"border-box"===A.css(e,"boxSizing",!1,i),u=r?ct(e,t,r,s,i):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-ct(e,t,"border",!1,i)-.5)),u&&(o=de.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=A.css(e,t)),ut(0,n,u)}}}),A.cssHooks.marginLeft=et(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ze(e,"marginLeft"))||e.getBoundingClientRect().left-Ye(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),A.each({margin:"",padding:"",border:"Width"},function(e,t){A.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+he[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(A.cssHooks[e+t].set=ut)}),A.fn.extend({css:function(e,t){return ee(this,function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=Qe(e),o=t.length;a<o;a++)i[t[a]]=A.css(e,t[a],!1,r);return i}return void 0!==n?A.style(e,t,n):A.css(e,t)},e,t,arguments.length>1)}}),A.Tween=ft,ft.prototype={constructor:ft,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||A.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(A.cssNumber[n]?"":"px")},cur:function(){var e=ft.propHooks[this.prop];return e&&e.get?e.get(this):ft.propHooks._default.get(this)},run:function(e){var t,n=ft.propHooks[this.prop];return this.options.duration?this.pos=t=A.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):ft.propHooks._default.set(this),this}},ft.prototype.init.prototype=ft.prototype,ft.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=A.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){A.fx.step[e.prop]?A.fx.step[e.prop](e):1!==e.elem.nodeType||!A.cssHooks[e.prop]&&null==e.elem.style[ot(e.prop)]?e.elem[e.prop]=e.now:A.style(e.elem,e.prop,e.now+e.unit)}}},ft.propHooks.scrollTop=ft.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},A.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},A.fx=ft.prototype.init,A.fx.step={};var pt,dt,ht=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;function vt(){dt&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(vt):r.setTimeout(vt,A.fx.interval),A.fx.tick())}function mt(){return r.setTimeout(function(){pt=void 0}),pt=Date.now()}function yt(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=he[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function bt(e,t,n){for(var r,o=(wt.tweeners[t]||[]).concat(wt.tweeners["*"]),i=0,a=o.length;i<a;i++)if(r=o[i].call(n,t,e))return r}function wt(e,t,n){var r,o,i=0,a=wt.prefilters.length,s=A.Deferred().always(function(){delete u.elem}),u=function(){if(o)return!1;for(var t=pt||mt(),n=Math.max(0,c.startTime+c.duration-t),r=1-(n/c.duration||0),i=0,a=c.tweens.length;i<a;i++)c.tweens[i].run(r);return s.notifyWith(e,[c,r,n]),r<1&&a?n:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:A.extend({},t),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:t,originalOptions:n,startTime:pt||mt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=A.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||
vendor: 1,607 bytes, line 2
2c.opts.easing);return c.tweens.push(r),r},stop:function(t){var n=0,r=t?c.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)c.tweens[n].run(1);return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),l=c.props;for(function(e,t){var n,r,o,i,a;for(n in e)if(o=t[r=oe(n)],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),(a=A.cssHooks[r])&&"expand"in a)for(n in i=a.expand(i),delete e[r],i)n in e||(e[n]=i[n],t[n]=o);else t[r]=o}(l,c.opts.specialEasing);i<a;i++)if(r=wt.prefilters[i].call(c,e,l,c.opts))return m(r.stop)&&(A._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return A.map(l,bt,c),m(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),A.fx.timer(A.extend(u,{elem:e,anim:c,queue:c.opts.queue})),c}A.Animation=A.extend(wt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return be(n.elem,e,de.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(X);for(var n,r=0,o=e.length;r<o;r++)n=e[r],wt.tweeners[n]=wt.tweeners[n]||[],wt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,o,i,a,s,u,c,l,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ye(e),v=se.get(e,"fxshow");for(r in n.queue||(null==(a=A._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--,A.queue(e,"fx").length||a.empty.fire()})})),t)if(o=t[r],ht.test(o)){if(delete t[r],i=i||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||
vendor: 5,665 bytes, line 2
2!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||A.style(e,r)}if((u=!A.isEmptyObject(t))||!A.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(c=v&&v.display)&&(c=se.get(e,"display")),"none"===(l=A.css(e,"display"))&&(c?l=c:(_e([e],!0),c=e.style.display||c,l=A.css(e,"display"),_e([e]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===A.css(e,"float")&&(u||(p.done(function(){h.display=c}),null==c&&(l=h.display,c="none"===l?"":l)),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||(v?"hidden"in v&&(g=v.hidden):v=se.access(e,"fxshow",{display:c}),i&&(v.hidden=!g),g&&_e([e],!0),p.done(function(){for(r in g||_e([e]),se.remove(e,"fxshow"),d)A.style(e,r,d[r])})),u=bt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?wt.prefilters.unshift(e):wt.prefilters.push(e)}}),A.speed=function(e,t,n){var r=e&&"object"==typeof e?A.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.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&&A.dequeue(this,r.queue)},r},A.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ye).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=A.isEmptyObject(e),i=A.speed(t,n,r),a=function(){var t=wt(this,A.extend({},e),i);(o||se.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===i.queue?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=A.timers,a=se.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&gt.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||A.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=se.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=A.timers,a=r?r.length:0;for(n.finish=!0,A.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),A.each(["toggle","show","hide"],function(e,t){var n=A.fn[t];A.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(yt(t,!0),e,r,o)}}),A.each({slideDown:yt("show"),slideUp:yt("hide"),slideToggle:yt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){A.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),A.timers=[],A.fx.tick=function(){var e,t=0,n=A.timers;for(pt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||A.fx.stop(),pt=void 0},A.fx.timer=function(e){A.timers.push(e),A.fx.start()},A.fx.interval=13,A.fx.start=function(){dt||(dt=!0,vt())},A.fx.stop=function(){dt=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(e,t){return e=A.fx&&A.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,n){var o=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(o)}})},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var xt,_t=A.expr.attrHandle;A.fn.extend({attr:function(e,t){return ee(this,A.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){A.removeAttr(this,e)})}}),A.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?A.prop(e,t,n):(1===i&&A.isXMLDoc(e)||(o=A.attrHooks[t.toLowerCase()]||(A.expr.match.bool.test(t)?xt:void 0)),void 0!==n?null===n?void A.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=A.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&j(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(X);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),xt={set:function(e,t,n){return!1===t?A.removeAttr(e,n):e.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),function(e,t){var n=_t[t]||A.find.attr;_t[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=_t[a],_t[a]=o,o=null!=n(e,t,r)?a:null,_t[a]=i),o}});var kt=/^(?:input|select|textarea|button)$/i,Ct=/^(?:a|area)$/i;function At(e){return(e.match(X)||[]).join(" ")}function St(e){return e.getAttribute&&e.getAttribute("class")||""}function jt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(X)||[]}A.fn.extend({prop:function(e,t){return ee(this,A.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[A.propFix[e]||e]})}}),A.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&A.isXMLDoc(e)||(t=A.propFix[t]||t,o=A.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=A.find.attr(e,"tabindex");return t?parseInt(t,10):kt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?
vendor: 17,884 bytes, line 2
20:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.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)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){A.propFix[this.toLowerCase()]=this}),A.fn.extend({addClass:function(e){var t,n,r,o,i,a;return m(e)?this.each(function(t){A(this).addClass(e.call(this,t,St(this)))}):(t=jt(e)).length?this.each(function(){if(r=St(this),n=1===this.nodeType&&" "+At(r)+" "){for(i=0;i<t.length;i++)o=t[i],n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=At(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,o,i,a;return m(e)?this.each(function(t){A(this).removeClass(e.call(this,t,St(this)))}):arguments.length?(t=jt(e)).length?this.each(function(){if(r=St(this),n=1===this.nodeType&&" "+At(r)+" "){for(i=0;i<t.length;i++)for(o=t[i];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=At(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,o,i,a=typeof e,s="string"===a||Array.isArray(e);return m(e)?this.each(function(n){A(this).toggleClass(e.call(this,n,St(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=jt(e),this.each(function(){if(s)for(i=A(this),o=0;o<n.length;o++)r=n[o],i.hasClass(r)?i.removeClass(r):i.addClass(r);else void 0!==e&&"boolean"!==a||((r=St(this))&&se.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":se.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+At(St(n))+" ").indexOf(t)>-1)return!0;return!1}});var Et=/\r/g;A.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=m(e),this.each(function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,A(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=A.map(o,function(e){return null==e?"":e+""})),(t=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=A.valHooks[o.type]||A.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(Et,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(e){var t=A.find.attr(e,"value");return null!=t?t:At(A.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?i+1:o.length;for(r=i<0?u:a?i:0;r<u;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!j(n.parentNode,"optgroup"))){if(t=A(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=A.makeArray(t),a=o.length;a--;)((r=o[a]).selected=A.inArray(A.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),A.each(["radio","checkbox"],function(){A.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=A.inArray(A(e).val(),t)>-1}},v.checkOn||(A.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Tt=r.location,$t={guid:Date.now()},Pt=/\?/;A.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||A.error("Invalid XML: "+(n?A.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ot=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){e.stopPropagation()};A.extend(A.event,{trigger:function(e,t,n,o){var i,a,s,u,c,l,f,p,h=[n||b],g=d.call(e,"type")?e.type:e,v=d.call(e,"namespace")?e.namespace.split("."):[];if(a=p=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Ot.test(g+A.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[A.expando]?e:new A.Event(g,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:A.makeArray(t,[e]),f=A.event.special[g]||{},o||!f.trigger||!1!==f.trigger.apply(n,t))){if(!o&&!f.noBubble&&!y(n)){for(u=f.delegateType||g,Ot.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||r)}for(i=0;(a=h[i++])&&!e.isPropagationStopped();)p=a,e.type=i>1?u:f.bindType||g,(l=(se.get(a,"events")||Object.create(null))[e.type]&&se.get(a,"handle"))&&l.apply(a,t),(l=c&&a[c])&&l.apply&&ie(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,o||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!ie(n)||c&&m(n[g])&&!y(n)&&((s=n[c])&&(n[c]=null),A.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,Dt),n[g](),e.isPropagationStopped()&&p.removeEventListener(g,Dt),A.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var r=A.extend(new A.Event,n,{type:e,isSimulated:!0});A.event.trigger(r,null,t)}}),A.fn.extend({trigger:function(e,t){return this.each(function(){A.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return A.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Rt=/^(?:input|select|textarea|keygen)/i;function It(e,t,n,r){var o;if(Array.isArray(t))A.each(t,function(t,o){n||qt.test(e)?r(e,o):It(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==_(t))r(e,t);else for(o in t)It(e+"["+o+"]",t[o],n,r)}A.param=function(e,t){var n,r=[],o=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&&!A.isPlainObject(e))A.each(e,function(){o(this.name,this.value)});else for(n in e)It(n,e[n],t,o);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=A.prop(this,"elements");return e?A.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!A(this).is(":disabled")&&Rt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!Ae.test(e))}).map(function(e,t){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Ft=/%20/g,Mt=/#.*$/,Ht=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:GET|HEAD)$/,Bt=/^\/\//,Ut={},Vt={},Xt="*/".concat("*"),Gt=b.createElement("a");function Jt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(X)||[];if(m(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Qt(e,t,n,r){var o={},i=e===Vt;function a(s){var u;return o[s]=!0,A.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||i||o[c]?i?!(u=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),u}return a(t.dataTypes[0])||!o["*"]&&a("*")}function Yt(e,t){var n,r,o=A.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&A.extend(!0,e,r),e}Gt.href=Tt.href,A.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:{"*":Xt,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":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Yt(Yt(e,A.ajaxSettings),t):Yt(A.ajaxSettings,e)},ajaxPrefilter:Jt(Ut),ajaxTransport:Jt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o,i,a,s,u,c,l,f,p,d=A.ajaxSetup({},t),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?A(h):A.event,v=A.Deferred(),m=A.Callbacks("once memory"),y=d.statusCode||{},w={},x={},_="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Wt.exec(i);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?i:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)k.always(e[k.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||_;return n&&n.abort(t),C(0,t),this}};if(v.promise(k),d.url=((e||d.url||Tt.href)+"").replace(Bt,Tt.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(X)||[""],null==d.crossDomain){u=b.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Gt.protocol+"//"+Gt.host!=u.protocol+"//"+u.host}catch(e){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=A.param(d.data,d.traditional)),Qt(Ut,d,t,k),c)return k;for(f in(l=A.event&&d.global)&&0===A.active++&&A.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!zt.test(d.type),o=d.url.replace(Mt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Ft,"+")):(p=d.url.slice(o.length),d.data&&(d.processData||"string"==typeof d.data)&&(o+=(Pt.test(o)?"&":"?")+d.data,delete d.data),!1===d.cache&&(o=o.replace(Ht,"$1"),p=(Pt.test(o)?"&":"?")+"_="+$t.guid+++p),d.url=o+p),d.ifModified&&(A.lastModified[o]&&k.setRequestHeader("If-Modified-Since",A.lastModified[o]),A.etag[o]&&k.setRequestHeader("If-None-Match",A.etag[o])),(d.data&&d.hasContent&&!1!==d.contentType||t.contentType)&&k.setRequestHeader("Content-Type",d.contentType),k.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Xt+"; q=0.01":""):d.accepts["*"]),d.headers)k.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,k,d)||c))return k.abort();if(_="abort",m.add(d.complete),k.done(d.success),k.fail(d.error),n=Qt(Vt,d,t,k)){if(k.readyState=1,l&&g.trigger("ajaxSend",[k,d]),c)return k;d.async&&d.timeout>0&&(s=r.setTimeout(function(){k.abort("timeout")},d.timeout));try{c=!1,n.send(w,C)}catch(e){if(c)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,a,u){var f,p,b,w,x,_=t;c||(c=!0,s&&r.clearTimeout(s),n=void 0,i=u||"",k.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(w=function(e,t,n){for(var r,o,i,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==u[0]&&u.unshift(i),n[i]}(d,k,a)),!f&&A.inArray("script",d.dataTypes)>-1&&A.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),w=function(e,t,n,r){var o,i,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(i=l.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=l.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(!(a=c[u+" "+i]||c["* "+i]))for(o in c)if((s=o.split(" "))[1]===i&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[o]:!0!==c[o]&&(i=s[0],l.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 "+i}}}return{state:"success",data:t}}(d,w,k,f),f?(d.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(A.lastModified[o]=x),(x=k.getResponseHeader("etag"))&&(A.etag[o]=x)),204===e||"HEAD"===d.type?_="nocontent":304===e?_="notmodified":(_=w.state,p=w.data,f=!(b=w.error))):(b=_,!e&&_||(_="error",e<0&&(e=0))),k.status=e,k.statusText=(t||_)+"",f?v.resolveWith(h,[p,_,k]):v.rejectWith(h,[k,_,b]),k.statusCode(y),y=void 0,l&&g.trigger(f?"ajaxSuccess":"ajaxError",[k,d,f?p:b]),m.fireWith(h,[k,_]),l&&(g.trigger("ajaxComplete",[k,d]),--A.active||A.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return A.get(e,t,n,"json")},getScript:function(e,t){return A.get(e,void 0,t,"script")}}),A.each(["get","post"],function(e,t){A[t]=function(e,n,r,o){return m(n)&&(o=o||r,r=n,n=void 0),A.ajax(A.extend({url:e,type:t,dataType:o,data:n,success:r},A.isPlainObject(e)&&e))}}),A.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),A._evalUrl=function(e,t,n){return A.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){A.globalEval(e,t,n)}})},A.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=A(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return m(e)?this.each(function(t){A(this).wrapInner(e.call(this,t))}):this.each(function(){var t=A(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=m(e);return this.each(function(n){A(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){A(this).replaceWith(this.childNodes)}),this}}),A.expr.pseudos.hidden=function(e){return!A.expr.pseudos.visible(e)},A.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Kt={0:200,1223:204},Zt=A.ajaxSettings.xhr();v.cors=!!Zt&&"withCredentials"in Zt,v.ajax=Zt=!!Zt,A.ajaxTransport(function(e){var t,n;if(v.cors||Zt&&!e.crossDomain)return{send:function(o,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(Kt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),A.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),A.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 A.globalEval(e),e}}}),A.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),A.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=A("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}});var en,tn=[],nn=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||A.expando+"_"+$t.guid++;return this[e]=!0,e}}),A.ajaxPrefilter("json jsonp",function(e,t,n){var o,i,a,s=!1!==e.jsonp&&(nn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(nn,"$1"+o):!1!==e.jsonp&&(e.url+=(Pt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||A.error(o+" was not called"),a[0]},e.dataTypes[0]="json",i=r[o],r[o]=function(){a=arguments},n.always(function(){void 0===i?A(r).removeProp(o):r[o]=i,e[o]&&(e.jsonpCallback=t.jsonpCallback,tn.push(o)),a&&m(i)&&i(a[0]),a=i=void 0}),"script"}),v.createHTMLDocument=((en=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===en.childNodes.length),A.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),i=!n&&[],(o=M.exec(e))?[t.createElement(o[1])]:(o=Oe([e],t,i),i&&i.length&&A(i).remove(),A.merge([],o.childNodes)));var r,o,i},A.fn.load=function(e,t,n){var r,o,i,a=this,s=e.indexOf(" ");return s>-1&&(r=At(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&A.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?A("<div>").append(A.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,i||[e.responseText,t,e])})}),this},A.expr.pseudos.animated=function(e){return A.grep(A.timers,function(t){return e===t.elem}).length},A.offset={setOffset:function(e,t,n){var r,o,i,a,s,u,c=A.css(e,"position"),l=A(e),f={};"static"===c&&(e.style.position="relative"),s=l.offset(),i=A.css(e,"to
2p"),u=A.css(e,"left"),("absolute"===c||"fixed"===c)&&(i+u).indexOf("auto")>-1?(a=(r=l.position()).top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(u)||0),m(t)&&(t=t.call(e,n,A.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):l.css(f)}},A.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){A.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===A.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===A.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=A(e).offset()).top+=A.css(e,"borderTopWidth",!0),o.left+=A.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-A.css(r,"marginTop",!0),left:t.left-o.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===A.css(e,"position");)e=e.offsetParent;return e||ge})}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;A.fn[e]=function(r){return ee(this,function(e,r,o){var i;if(y(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===o)return i?i[t]:e[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o},e,r,arguments.length)}}),A.each(["top","left"],function(e,t){A.cssHooks[t]=et(v.pixelPosition,function(e,n){if(n)return n=Ze(e,t),Ge.test(n)?A(e).position()[t]+"px":n})}),A.each({Height:"height",Width:"width"},function(e,t){A.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){A.fn[r]=function(o,i){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(!0===o||!0===i?"margin":"border");return ee(this,function(t,n,o){var i;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===o?A.css(t,n,s):A.style(t,n,o,s)},t,a?o:void 0,a)}})}),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){A.fn[t]=function(e){return this.on(t,e)}}),A.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.on("mouseenter",e).on("mouseleave",t||e)}}),A.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,t){A.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}});var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),o=function(){return e.apply(t||this,r.concat(s.call(arguments)))},o.guid=e.guid=e.guid||A.guid++,o},A.holdReady=function(e){e?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=j,A.isFunction=m,A.isWindow=y,A.camelCase=oe,A.type=_,A.now=Date.now,A.isNumeric=function(e){var t=A.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},A.trim=function(e){return null==e?"":(e+"").replace(rn,"$1")},void 0===(n=function(){return A}.apply(t,[]))||(e.exports=n);var on=r.jQuery,an=r.$;return A.noConflict=function(e){return r.$===A&&(r.$=an),e&&r.jQuery===A&&(r.jQuery=on),A},void 0===o&&(r.jQuery=r.$=A),A})},543(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",m="[object Boolean]",y="[object Date]",b="[object Error]",w="[object Function]",x="[object GeneratorFunction]",_="[object Map]",k="[object Number]",C="[object Object]",A="[object Promise]",S="[object RegExp]",j="[object Set]",E="[object String]",T="[object Symbol]",$="[object WeakMap]",P="[object ArrayBuffer]",O="[object DataView]",D="[object Float32Array]",q="[object Float64Array
vendor: 4,112 bytes, line 2
2]",L="[object Int8Array]",N="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",F="[object Uint8ClampedArray]",M="[object Uint16Array]",H="[object Uint32Array]",W=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,U=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,X=RegExp(U.source),G=RegExp(V.source),J=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,K=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",Ae="A-Z\\xc0-\\xd6\\xd8-\\xde",Se="\\ufe0e\\ufe0f",je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+xe+"]",Te="["+je+"]",$e="["+_e+"]",Pe="\\d+",Oe="["+ke+"]",De="["+Ce+"]",qe="[^"+xe+je+Pe+ke+Ce+Ae+"]",Le="\\ud83c[\\udffb-\\udfff]",Ne="[^"+xe+"]",Re="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Ae+"]",Me="\\u200d",He="(?:"+De+"|"+qe+")",We="(?:"+Fe+"|"+qe+")",ze="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ue="(?:"+$e+"|"+Le+")?",Ve="["+Se+"]?",Xe=Ve+Ue+"(?:"+Me+"(?:"+[Ne,Re,Ie].join("|")+")"+Ve+Ue+")*",Ge="(?:"+[Oe,Re,Ie].join("|")+")"+Xe,Je="(?:"+[Ne+$e+"?",$e,Re,Ie,Ee].join("|")+")",Qe=RegExp("['’]","g"),Ye=RegExp($e,"g"),Ke=RegExp(Le+"(?="+Le+")|"+Je+Xe,"g"),Ze=RegExp([Fe+"?"+De+"+"+ze+"(?="+[Te,Fe,"$"].join("|")+")",We+"+"+Be+"(?="+[Te,Fe+He,"$"].join("|")+")",Fe+"?"+He+"+"+ze,Fe+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pe,Ge].join("|"),"g"),et=RegExp("["+Me+xe+_e+Se+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[D]=ot[q]=ot[L]=ot[N]=ot[R]=ot[I]=ot[F]=ot[M]=ot[H]=!0,ot[g]=ot[v]=ot[P]=ot[m]=ot[O]=ot[y]=ot[b]=ot[w]=ot[_]=ot[k]=ot[C]=ot[S]=ot[j]=ot[E]=ot[$]=!1;var it={};it[g]=it[v]=it[P]=it[O]=it[m]=it[y]=it[D]=it[q]=it[L]=it[N]=it[R]=it[_]=it[k]=it[C]=it[S]=it[j]=it[E]=it[T]=it[I]=it[F]=it[M]=it[H]=!0,it[b]=it[w]=it[$]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,ct="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ht=dt&&dt.exports===pt,gt=ht&&ct.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||gt&&gt.binding&&gt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,yt=vt&&vt.isDate,bt=vt&&vt.isMap,wt=vt&&vt.isRegExp,xt=vt&&vt.isSet,_t=vt&&vt.isTypedArray;function kt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function St(e,t){for(var n=null==e?0:e.length;
vendor: 4,662 bytes, line 2
2n--&&!1!==t(e[n],n,e););return e}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Tt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function $t(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Pt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Ot(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function qt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Nt=zt("length");function Rt(e,t,n){var r;return n(e,function(e,n,o){if(t(e,n,o))return r=n,!1}),r}function It(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):It(e,Ht,n)}function Mt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Ht(e){return e!=e}function Wt(e,t){var n=null==e?0:e.length;return n?Vt(e,t)/n:p}function zt(e){return function(t){return null==t?o:t[e]}}function Bt(e){return function(t){return null==e?o:e[t]}}function Ut(e,t,n,r,o){return o(e,function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)}),n}function Vt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Gt(e){return e?e.slice(0,pn(e)+1).replace(re,""):e}function Jt(e){return function(t){return e(t)}}function Qt(e,t){return Pt(t,function(t){return e[t]})}function Yt(e,t){return e.has(t)}function Kt(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function Zt(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var en=Bt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tn=Bt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(e){return"\\"+at[e]}function rn(e){return et.test(e)}function on(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function an(e,t){return function(n){return e(t(n))}}function sn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,i[o++]=n)}return i}function un(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function ln(e){return rn(e)?function(e){for(var t=Ke.lastIndex=0;Ke.test(e);)++t;return t}(e):Nt(e)}function fn(e){return rn(e)?function(e){return e.match(Ke)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var dn=Bt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hn=function e(t){var n,r=(t=null==t?ft:hn.defaults(ft.Object(),t,hn.pick(ft,nt))).Array,oe=t.Date,xe=t.Error,_e=t.Function,ke=t.Math,Ce=t.Object,Ae=t.RegExp,Se=t.String,je=t.TypeError,Ee=r.prototype,Te=_e.prototype,$e=Ce.prototype,Pe=t["__core-js_shared__"],Oe=Te.toString,De=$e.hasOwnProperty,qe=0,Le=(n=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(sr
2c)_1."+n:"",Ne=$e.toString,Re=Oe.call(Ce),Ie=ft._,Fe=Ae("^"+Oe.call(De).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Me=ht?t.Buffer:o,He=t.Symbol,We=t.Uint8Array,ze=Me?Me.allocUnsafe:o,Be=an(Ce.getPrototypeOf,Ce),Ue=Ce.create,Ve=$e.propertyIsEnumerable,Xe=Ee.splice,Ge=He?He.isConcatSpreadable:o,Je=He?He.iterator:o,Ke=He?He.toStringTag:o,et=function(){try{var e=ci(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==ft.Date.now&&oe.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=ke.ceil,dt=ke.floor,gt=Ce.getOwnPropertySymbols,vt=Me?Me.isBuffer:o,Nt=t.isFinite,Bt=Ee.join,gn=an(Ce.keys,Ce),vn=ke.max,mn=ke.min,yn=oe.now,bn=t.parseInt,wn=ke.random,xn=Ee.reverse,_n=ci(t,"DataView"),kn=ci(t,"Map"),Cn=ci(t,"Promise"),An=ci(t,"Set"),Sn=ci(t,"WeakMap"),jn=ci(Ce,"create"),En=Sn&&new Sn,Tn={},$n=Ri(_n),Pn=Ri(kn),On=Ri(Cn),Dn=Ri(An),qn=Ri(Sn),Ln=He?He.prototype:o,Nn=Ln?Ln.valueOf:o,Rn=Ln?Ln.toString:o;function In(e){if(es(e)&&!za(e)&&!(e instanceof Wn)){if(e instanceof Hn)return e;if(De.call(e,"__wrapped__"))return Ii(e)}return new Hn(e)}var Fn=function(){function e(){}return function(t){if(!Za(t))return{};if(Ue)return Ue(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Mn(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Un;++t<n;)this.add(e[t])}function Xn(e){var t=this.__data__=new Bn(e);this.size=t.size}function Gn(e,t){var n=za(e),r=!n&&Wa(e),o=!n&&!r&&Xa(e),i=!n&&!r&&!o&&us(e),a=n||r||o||i,s=a?Xt(e.length,Se):[],u=s.length;for(var c in e)!t&&!De.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||vi(c,u))||s.push(c);return s}function Jn(e){var t=e.length;return t?e[Ur(0,t-1)]:o}function Qn(e,t){return Oi(jo(e),ir(t,0,e.length))}function Yn(e){return Oi(jo(e))}function Kn(e,t,n){(n!==o&&!Fa(e[t],n)||n===o&&!(t in e))&&rr(e,t,n)}function Zn(e,t,n){var r=e[t];De.call(e,t)&&Fa(r,n)&&(n!==o||t in e)||rr(e,t,n)}function er(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function tr(e,t,n,r){return lr(e,function(e,o,i){t(r,e,n(e),i)}),r}function nr(e,t){return e&&Eo(t,$s(t),e)}function rr(e,t,n){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var n=-1,i=t.length,a=r(i),s=null==e;++n<i;)a[n]=s?o:As(e,t[n]);return a}function ir(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ar(e,t,n,r,i,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!Za(e))return e;var f=za(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!u)return jo(e,s)}else{var p=pi(e),d=p==w||p==x;if(Xa(e))return xo(e,u);if(p==C||p==g||d&&!i){if(s=c||d?{}:hi(e),!u)return c?function(e,t){return Eo(e,fi(e),t)}(e,function(e,t){return e&&Eo(t,Ps(t),e)}(s,e)):function(e,t){return Eo(e,li(e),t)}(e,nr(s,e))}else{if(!it[p])return i?e:{};s=function(e,t,n){var r,o=e.constructor;switch(t){case P:return _o(e);case m:case y:return new o(+e);case O:return function(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case q:case L:case N:case R:case I:case F:case M:case H:return ko(e,n);case _:return new o;case k:case E:return new o(e);case S:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new o;case T:return r=e,Nn?Ce(Nn.call(r)):{}}
vendor: 16,637 bytes, line 2
2}(e,p,u)}}a||(a=new Xn);var h=a.get(e);if(h)return h;a.set(e,s),is(e)?e.forEach(function(r){s.add(ar(r,t,n,r,e,a))}):ts(e)&&e.forEach(function(r,o){s.set(o,ar(r,t,n,o,e,a))});var v=f?o:(l?c?ni:ti:c?Ps:$s)(e);return At(v||e,function(r,o){v&&(r=e[o=r]),Zn(s,o,ar(r,t,n,o,e,a))}),s}function sr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new je(i);return Ei(function(){e.apply(o,n)},t)}function cr(e,t,n,r){var o=-1,i=Tt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Pt(t,Jt(n))),r?(i=$t,a=!1):t.length>=200&&(i=Yt,a=!1,t=new Vn(t));e:for(;++o<s;){var l=e[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else i(t,f,r)||u.push(l)}return u}In.templateSettings={escape:J,evaluate:Q,interpolate:Y,variable:"",imports:{_:In}},In.prototype=Mn.prototype,In.prototype.constructor=In,Hn.prototype=Fn(Mn.prototype),Hn.prototype.constructor=Hn,Wn.prototype=Fn(Mn.prototype),Wn.prototype.constructor=Wn,zn.prototype.clear=function(){this.__data__=jn?jn(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(jn){var n=t[e];return n===a?o:n}return De.call(t,e)?t[e]:o},zn.prototype.has=function(e){var t=this.__data__;return jn?t[e]!==o:De.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jn&&t===o?a:t,this},Bn.prototype.clear=function(){this.__data__=[],this.size=0},Bn.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Bn.prototype.get=function(e){var t=this.__data__,n=er(t,e);return n<0?o:t[n][1]},Bn.prototype.has=function(e){return er(this.__data__,e)>-1},Bn.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Un.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(kn||Bn),string:new zn}},Un.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Un.prototype.get=function(e){return si(this,e).get(e)},Un.prototype.has=function(e){return si(this,e).has(e)},Un.prototype.set=function(e,t){var n=si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(e){return this.__data__.set(e,a),this},Vn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.clear=function(){this.__data__=new Bn,this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Xn.prototype.get=function(e){return this.__data__.get(e)},Xn.prototype.has=function(e){return this.__data__.has(e)},Xn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Bn){var r=n.__data__;if(!kn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Un(r)}return n.set(e,t),this.size=n.size,this};var lr=Po(yr),fr=Po(br,!0);function pr(e,t){var n=!0;return lr(e,function(e,r,o){return n=!!t(e,r,o)}),n}function dr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(null!=s&&(u===o?s==s&&!ss(s):n(s,u)))var u=s,c=a}return c}function hr(e,t){var n=[];return lr(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}function gr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=gi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?gr(s,t-1,n,r,o):Ot(o,s):r||(o[o.length]=s)}return o}var vr=Oo(),mr=Oo(!0);function yr(e,t){return e&&vr(e,t,$s)}function br(e,t){return e&&mr(e,t,$s)}function wr(e,t){return Et(t,function(t){return Qa(e[t])})}function xr(e,t){for(var n=0,r=(t=mo(t,e)).length;null!=e&&n<r;)e=e[Ni(t[n++])];return n&&n==r?e:o}function _r(e,t,n){var r=t(e);return za(e)?r:Ot(r,n(e))}function kr(e){return null==e?e===o?"[object Undefined]":"[object Null]":Ke&&Ke in Ce(e)?function(e){var t=De.call(e,Ke),n=e[Ke];try{e[Ke]=o;var r=!0}catch(e){}var i=Ne.call(e);return r&&(t?e[Ke]=n:delete e[Ke]),i}(e):function(e){return Ne.call(e)}(e)}function Cr(e,t){return e>t}function Ar(e,t){return null!=e&&De.call(e,t)}function Sr(e,t){return null!=e&&t in Ce(e)}function jr(e,t,n){for(var i=n?$t:Tt,a=e[0].length,s=e.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Pt(p,Jt(t))),l=mn(p.length,l),c[u]=!n&&(t||a>=120&&p.length>=120)?new Vn(u&&p):o}p=e[0];var d=-1,h=c[0];e:for(;++d<a&&f.length<l;){var g=p[d],v=t?t(g):g;if(g=n||0!==g?g:0,!(h?Yt(h,v):i(f,v,n))){for(u=s;--u;){var m=c[u];if(!(m?Yt(m,v):i(e[u],v,n)))continue e}h&&h.push(v),f.push(g)}}return f}function Er(e,t,n){var r=null==(e=Ai(e,t=mo(t,e)))?e:e[Ni(Ji(t))];return null==r?o:kt(r,e,n)}function Tr(e){return es(e)&&kr(e)==g}function $r(e,t,n,r,i){return e===t||(null==e||null==t||!es(e)&&!es(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var s=za(e),u=za(t),c=s?v:pi(e),l=u?v:pi(t),f=(c=c==g?C:c)==C,p=(l=l==g?C:l)==C,d=c==l;if(d&&Xa(e)){if(!Xa(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Xn),s||us(e)?Zo(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!i(new We(e),new We(t)));case m:case y:case k:return Fa(+e,+t);case b:return e.name==t.name&&e.message==t.message;case S:case E:return e==t+"";case _:var s=on;case j:var u=1&r;if(s||(s=un),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Zo(s(e),s(t),r,o,i,a);return a.delete(e),l;case T:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=f&&De.call(e,"__wrapped__"),w=p&&De.call(t,"__wrapped__");if(h||w){var x=h?e.value():e,A=w?t.value():t;return a||(a=new Xn),i(x,A,n,r,a)}}return!!d&&(a||(a=new Xn),function(e,t,n,r,i,a){var s=1&n,u=ti(e),c=u.length;if(c!=ti(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:De.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var g=s;++l<c;){var v=e[f=u[l]],m=t[f];if(r)var y=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(!(y===o?v===m||i(v,m,n,r,a):y)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a))}(e,t,n,r,$r,i))}function Pr(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=Ce(e);i--;){var u=n[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<a;){var c=(u=n[i])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===o&&!(c in e))return!1}else{var p=new Xn;if(r)var d=r(l,f,c,e,t,p);if(!(d===o?$r(f,l,3,r,p):d))return!1}}return!0}function Or(e){return!(!Za(e)||(t=e,Le&&Le in t))&&(Qa(e)?Fe:ge).test(Ri(e));var t}function Dr(e){return"function"==typeof e?e:null==e?nu:"object"==typeof e?za(e)?Ir(e[0],e[1]):Rr(e):fu(e)}function qr(e){if(!xi(e))return gn(e);var t=[];for(var n in Ce(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e,t){return e<t}function Nr(e,t){var n=-1,o=Ua(e)?r(e.length):[];return lr(e,function(e,r,i){o[++n]=t(e,r,i)}),o}function Rr(e){var t=ui(e);return 1==t.length&&t[0][2]?ki(t[0][0],t[0][1]):function(n){return n===e||Pr(n,e,t)}}function Ir(e,t){return yi(e)&&_i(t)?ki(Ni(e),t):function(n){var r=As(n,e);return r===o&&r===t?Ss(n,e):$r(t,r,3)}}function Fr(e,t,n,r,i){e!==t&&vr(t,function(a,s){if(i||(i=new Xn),Za(a))!function(e,t,n,r,i,a,s){var u=Si(e,n),c=Si(t,n),l=s.get(c);if(l)Kn(e,n,l);else{var f=a?a(u,c,n+"",e,t,s):o,p=f===o;if(p){var d=za(c),h=!d&&Xa(c),g=!d&&!h&&us(c);f=c,d||h||g?za(u)?f=u:Va(u)?f=jo(u):h?(p=!1,f=xo(c,!0)):g?(p=!1,f=ko(c,!0)):f=[]:rs(c)||Wa(c)?(f=u,Wa(u)?f=vs(u):Za(u)&&!Qa(u)||(f=hi(c))):p=!1}p&&(s.set(c,f),i(f,c,r,a,s),s.delete(c)),Kn(e,n,f)}}(e,t,s,n,Fr,r,i);else{var u=r?r(Si(e,s),a,s+"",e,t,i):o;u===o&&(u=a),Kn(e,s,u)}},Ps)}function Mr(e,t){var n=e.length;if(n)return vi(t+=t<0?n:0,n)?e[t]:o}function Hr(e,t,n){t=t.length?Pt(t,function(e){return za(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e}):[nu];var r=-1;t=Pt(t,Jt(ai()));var o=Nr(e,function(e,n,o){var i=Pt(t,function(t){return t(e)});return{criteria:i,index:++r,value:e}});return function(e){var t=e.length;for(e.sort(function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var u=Co(o[r],i[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)});t--;)e[t]=e[t].value;return e}(o)}function Wr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=xr(e,a);n(s,a)&&Qr(i,mo(a,e),s)}return i}function zr(e,t,n,r){var o=r?Mt:Ft,i=-1,a=t.length,s=e;for(e===t&&(t=jo(t)),n&&(s=Pt(e,Jt(n)));++i<a;)for(var u=0,c=t[i],l=n?n(c):c;(u=o(s,l,u,r))>-1;)s!==e&&Xe.call(s,u,1),Xe.call(e,u,1);return e}function Br(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;vi(o)?Xe.call(e,o,1):uo(e,o)}}return e}function Ur(e,t){return e+dt(wn()*(t-e+1))}function Vr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=dt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Ti(Ci(e,t,nu),e+"")}function Gr(e){return Jn(Fs(e))}function Jr(e,t){var n=Fs(e);return Oi(n,ir(t,0,n.length))}function Qr(e,t,n,r){if(!Za(e))return e;for(var i=-1,a=(t=mo(t,e)).length,s=a-1,u=e;null!=u&&++i<a;){var c=Ni(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var f=u[c];(l=r?r(f,c,u):o)===o&&(l=Za(f)?f:vi(t[i+1])?[]:{})}Zn(u,c,l),u=u[c]}return e}var Yr=En?function(e,t){return En.set(e,t),e}:nu,Kr=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Zs(t),writable:!0})}:nu;function Zr(e){return Oi(Fs(e))}function eo(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function to(e,t){var n;return lr(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!ss(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ro(e,t,nu,n)}function ro(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=ss(t),l=t===o;i<a;){var f=dt((i+a)/2),p=n(e[f]),d=p!==o,h=null===p,g=p==p,v=ss(p);if(s)var m=r||g;else m=l?g&&(r||d):u?g&&d&&(r||!h):c?g&&d&&!h&&(r||!v):!h&&!v&&(r?p<=t:p<t);m?i=f+1:a=f}return mn(a,4294967294)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Fa(s,u)){var u=s;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:ss(e)?p:+e}function ao(e){if("string"==typeof e)return e;if(za(e))return Pt(e,ao)+"";if(ss(e))return Rn?Rn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function so(e,t,n){var r=-1,o=Tt,i=e.length,a=!0,s=[],u=s;if(n)a=!1,o=$t;else if(i>=200){var c=t?null:Xo(e);if(c)return un(c);a=!1,o=Yt,u=new Vn}else u=t?[]:s;e:for(;++r<i;){var l=e[r],f=t?t(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else o(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function uo(e,t){var n=-1,r=(t=mo(t,e)).length;if(!r)return!0;for(;++n<r;){var o=Ni(t[n]);if("__proto__"===o&&!De.call(e,"__proto__"))return!1;if(("constructor"===o||"prototype"===o)&&n<r-1)return!1}var i=Ai(e,t);return null==i||delete i[Ni(Ji(t))]}function co(e,t,n,r){return Qr(e,t,n(xr(e,t)),r)}function lo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function fo(e,t){var n=e;return n instanceof Wn&&(n=n.value()),Dt(t,function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))},n)}function po(e,t,n){var o=e.length;if(o<2)return o?so(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var s=e[i],u=-1;++u<o;)u!=i&&(a[i]=cr(a[i]||s,e[u],t,n));return so(gr(a,1),t,n)}function ho(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var u=r<a?t[r]:o;n(s,e[r],u)}return s}function go(e){return Va(e)?e:[]}function vo(e){return"function"==typeof e?e:nu}function mo(e,t){return za(e)?e:yi(e,t)?[e]:Li(ms(e))}var yo=Xr;function bo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:eo(e,t,n)}var wo=at||function(e){return ft.clearTimeout(e)};function xo(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function _o(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function ko(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Co(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=ss(e),s=t!==o,u=null===t,c=t==t,l=ss(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function Ao(e,t,n,o){for(var i=-1,a=e.length,s=n.length,u=-1,c=t.length,l=vn(a-s,0),f=r(c+l),p=!o;++u<c;)f[u]=t[u];for(;++i<s;)(p||i<a)&&(f[n[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function So(e,t,n,o){for(var i=-1,a=e.length,s=-1,u=n.length,c=-1,l=t.length,f=vn(a-u,0),p=r(f+l),d=!o;++i<f;)p[i]=e[i];for(var h=i;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||i<a)&&(p[h+n[s]]=e[i++]);return p}function jo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function Eo(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):o;c===o&&(c=e[u]),i?rr(n,u,c):Zn(n,u,c)}return n}function To(e,t){return function(n,r){var o=za(n)?Ct:tr,i=t?t():{};return o(n,e,ai(r,2),i)}}function $o(e){return Xr(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&mi(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Ce(t);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t})}function Po(e,t){return function(n,r){if(null==n)return n;if(!Ua(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ce(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function Oo(e){return function(t,n,r){for(var o=-1,i=Ce(t),a=r(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===n(i[u],u,i))break}return t}}function Do(e){return function(t){var n=rn(t=ms(t))?fn(t):o,r=n?n[0]:t.charAt(0),i=n?bo(n,1).join(""):t.slice(1);return r[e]()+i}}function qo(e){return function(t){return Dt(Qs(Ws(t).replace(Qe,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function No(e){return function(t,n,r){var i=Ce(t);if(!Ua(t)){var a=ai(n,3);t=$s(t),n=function(e){return a(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[a?t[s]:s]:o}}function Ro(e){return ei(function(t){var n=t.length,r=n,a=Hn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new je(i);if(a&&!u&&"wrapper"==oi(s))var u=new Hn([],!0)}for(r=u?r:n;++r<n;){var c=oi(s=t[r]),l="wrapper"==c?ri(s):o;u=l&&bi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[oi(l[0])].apply(u,l[3]):1==s.length&&bi(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&za(r))return u.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}})}function Io(e,t,n,i,a,s,u,l,f,p){var d=t&c,h=1&t,g=2&t,v=24&t,m=512&t,y=g?o:Lo(e);return function c(){for(var b=arguments.length,w=r(b),x=b;x--;)w[x]=arguments[x];if(v)var _=ii(c),k=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,_);if(i&&(w=Ao(w,i,a,v)),s&&(w=So(w,s,u,v)),b-=k,v&&b<p){var C=sn(w,_);return Uo(e,t,Io,c.placeholder,n,w,C,l,f,p-b)}var A=h?n:this,S=g?A[e]:e;return b=w.length,l?w=function(e,t){for(var n=e.length,r=mn(t.length,n),i=jo(e);r--;){var a=t[r];e[r]=vi(a,n)?i[a]:o}return e}(w,l):m&&b>1&&w.reverse(),d&&f<b&&(w.length=f),this&&this!==ft&&this instanceof c&&(S=y||Lo(S)),S.apply(A,w)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return yr(e,function(e,o,i){t(r,n(e),o,i)}),r}(n,e,t(r),{})}}function Mo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=ao(n),r=ao(r)):(n=io(n),r=io(r)),i=e(n,r)}return i}}function Ho(e){return ei(function(t){return t=Pt(t,Jt(ai())),Xr(function(n){var r=this;return e(t,function(e){return kt(e,r,n)})})})}function Wo(e,t){var n=(t=t===o?" ":ao(t)).length;if(n<2)return n?Vr(t,e):t;var r=Vr(t,pt(e/ln(t)));return rn(t)?bo(fn(r),0,e).join(""):r.slice(0,e)}function zo(e){return function(t,n,i){return i&&"number"!=typeof i&&mi(t,n,i)&&(n=i=o),t=ps(t),n===o?(n=t,t=0):n=ps(n),function(e,t,n,o){for(var i=-1,a=vn(
vendor: 4,392 bytes, line 2
2pt((t-e)/(n||1)),0),s=r(a);a--;)s[o?a:++i]=e,e+=n;return s}(t,n,i=i===o?t<n?1:-1:ps(i),e)}}function Bo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=gs(t),n=gs(n)),e(t,n)}}function Uo(e,t,n,r,i,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,i,p?a:o,p?s:o,p?o:a,p?o:s,c,l,f],h=n.apply(o,d);return bi(e)&&ji(h,d),h.placeholder=r,$i(h,e,t)}function Vo(e){var t=ke[e];return function(e,n){if(e=gs(e),(n=null==n?0:mn(ds(n),292))&&Nt(e)){var r=(ms(e)+"e").split("e");return+((r=(ms(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Xo=An&&1/un(new An([,-0]))[1]==l?function(e){return new An(e)}:su;function Go(e){return function(t){var n=pi(t);return n==_?on(t):n==j?cn(t):function(e,t){return Pt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Jo(e,t,n,a,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new je(i);var g=a?a.length:0;if(g||(t&=-97,a=l=o),p=p===o?p:vn(ds(p),0),d=d===o?d:ds(d),g-=l?l.length:0,64&t){var v=a,m=l;a=l=o}var y=h?o:ri(e),b=[e,t,n,a,l,v,m,f,p,d];if(y&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==c&&8==n||r==c&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ao(l,u,t[4]):u,e[4]=l?sn(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?So(l,u,t[6]):u,e[6]=l?sn(e[5],s):t[6]),(u=t[7])&&(e[7]=u),r&c&&(e[8]=null==e[8]?t[8]:mn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,y),e=b[0],t=b[1],n=b[2],a=b[3],l=b[4],!(d=b[9]=b[9]===o?h?0:e.length:vn(b[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Lo(e);return function a(){for(var s=arguments.length,u=r(s),c=s,l=ii(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:sn(u,l);return(s-=f.length)<n?Uo(e,t,Io,a.placeholder,o,u,f,o,o,n-s):kt(this&&this!==ft&&this instanceof a?i:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Io.apply(o,b):function(e,t,n,o){var i=1&t,a=Lo(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=o.length,f=r(l+u),p=this&&this!==ft&&this instanceof t?a:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++s];return kt(p,i?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,o=Lo(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return $i((y?Yr:ji)(w,b),e,t)}function Qo(e,t,n,r){return e===o||Fa(e,$e[n])&&!De.call(r,n)?t:e}function Yo(e,t,n,r,i,a){return Za(e)&&Za(t)&&(a.set(t,e),Fr(e,t,o,Yo,a),a.delete(t)),e}function Ko(e){return rs(e)?o:e}function Zo(e,t,n,r,i,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&n?new Vn:o;for(a.set(e,t),a.set(t,e);++p<u;){var g=e[p],v=t[p];if(r)var m=s?r(v,g,p,t,e,a):r(g,v,p,e,t,a);if(m!==o){if(m)continue;d=!1;break}if(h){if(!Lt(t,function(e,t){if(!Yt(h,t)&&(g===e||i(g,e,n,r,a)))return h.push(t)})){d=!1;break}}else if(g!==v&&!i(g,v,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function ei(e){return Ti(Ci(e,o,Bi),e+"")}function ti(e){return _r(e,$s,li)}function ni(e){return _r(e,Ps,fi)}var ri=En?function(e){return En.get(e)}:su;function oi(e){for(var t=e.name+"",n=Tn[t],r=De.call(Tn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(De.call(In,"placeholder")?In:e).placeholder}function ai(){var e=In.iteratee||ru;return e=e===ru?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function si(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function ui(e){for(var t=$s(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,_i(o)]}return t}function ci(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return Or(n)?n:o}var li=gt?function(e){return null==e?[]:(e=Ce(e),Et(gt(e),function(t){return Ve.call(e,t)}))}:hu,fi=gt?function(e){for(var t=[];e;)Ot(t,li(e)),e=Be(e);return t}:hu,pi=kr;function di(e,t,n){for(var r=-1,o=(t=mo(t,e)).length,i=!1;++r<o;){var a=Ni(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ka(o)&&vi(a,o)&&(za(e)||Wa(e))}function hi(e){return"function"!=typeof e.constructor||xi(e)?{}:Fn(Be(e))}function gi(e){return za(e)||Wa(e)||!!(Ge&&e&&e[Ge])}function vi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}
vendor: 22,516 bytes, line 2
2function mi(e,t,n){if(!Za(n))return!1;var r=typeof t;return!!("number"==r?Ua(n)&&vi(t,n.length):"string"==r&&t in n)&&Fa(n[t],e)}function yi(e,t){if(za(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ss(e))||Z.test(e)||!K.test(e)||null!=t&&e in Ce(t)}function bi(e){var t=oi(e),n=In[t];if("function"!=typeof n||!(t in Wn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(_n&&pi(new _n(new ArrayBuffer(1)))!=O||kn&&pi(new kn)!=_||Cn&&pi(Cn.resolve())!=A||An&&pi(new An)!=j||Sn&&pi(new Sn)!=$)&&(pi=function(e){var t=kr(e),n=t==C?e.constructor:o,r=n?Ri(n):"";if(r)switch(r){case $n:return O;case Pn:return _;case On:return A;case Dn:return j;case qn:return $}return t});var wi=Pe?Qa:gu;function xi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$e)}function _i(e){return e==e&&!Za(e)}function ki(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in Ce(n))}}function Ci(e,t,n){return t=vn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=vn(o.length-t,0),s=r(a);++i<a;)s[i]=o[t+i];i=-1;for(var u=r(t+1);++i<t;)u[i]=o[i];return u[t]=n(s),kt(e,this,u)}}function Ai(e,t){return t.length<2?e:xr(e,eo(t,0,-1))}function Si(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ji=Pi(Yr),Ei=lt||function(e,t){return ft.setTimeout(e,t)},Ti=Pi(Kr);function $i(e,t,n){var r=t+"";return Ti(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return At(h,function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(r),n)))}function Pi(e){var t=0,n=0;return function(){var r=yn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Oi(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Ur(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Di,qi,Li=(Di=Da(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,function(e,n,r,o){t.push(r?o.replace(le,"$1"):n||e)}),t},function(e){return 500===qi.size&&qi.clear(),e}),qi=Di.cache,Di);function Ni(e){if("string"==typeof e||ss(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ri(e){if(null!=e){try{return Oe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ii(e){if(e instanceof Wn)return e.clone();var t=new Hn(e.__wrapped__,e.__chain__);return t.__actions__=jo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=Xr(function(e,t){return Va(e)?cr(e,gr(t,1,Va,!0)):[]}),Mi=Xr(function(e,t){var n=Ji(t);return Va(n)&&(n=o),Va(e)?cr(e,gr(t,1,Va,!0),ai(n,2)):[]}),Hi=Xr(function(e,t){var n=Ji(t);return Va(n)&&(n=o),Va(e)?cr(e,gr(t,1,Va,!0),o,n):[]});function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ds(n);return o<0&&(o=vn(r+o,0)),It(e,ai(t,3),o)}function zi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=ds(n),i=n<0?vn(r+i,0):mn(i,r-1)),It(e,ai(t,3),i,!0)}function Bi(e){return null!=e&&e.length?gr(e,1):[]}function Ui(e){return e&&e.length?e[0]:o}var Vi=Xr(function(e){var t=Pt(e,go);return t.length&&t[0]===e[0]?jr(t):[]}),Xi=Xr(function(e){var t=Ji(e),n=Pt(e,go);return t===Ji(n)?t=o:n.pop(),n.length&&n[0]===e[0]?jr(n,ai(t,2)):[]}),Gi=Xr(function(e){var t=Ji(e),n=Pt(e,go);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?jr(n,o,t):[]});function Ji(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Qi=Xr(Yi);function Yi(e,t){return e&&e.length&&t&&t.length?zr(e,t):e}var Ki=ei(function(e,t){var n=null==e?0:e.length,r=or(e,t);return Br(e,Pt(t,function(e){return vi(e,n)?+e:e}).sort(Co)),r});function Zi(e){return null==e?e:xn.call(e)}var ea=Xr(function(e){return so(gr(e,1,Va,!0))}),ta=Xr(function(e){var t=Ji(e);return Va(t)&&(t=o),so(gr(e,1,Va,!0),ai(t,2))}),na=Xr(function(e){var t=Ji(e);return t="function"==typeof t?t:o,so(gr(e,1,Va,!0),o,t)});function ra(e){if(!e||!e.length)return[];var t=0;return e=Et(e,function(e){if(Va(e))return t=vn(e.length,t),!0}),Xt(t,function(t){return Pt(e,zt(t))})}function oa(e,t){if(!e||!e.length)return[];var n=ra(e);return null==t?n:Pt(n,function(e){return kt(t,o,e)})}var ia=Xr(function(e,t){return Va(e)?cr(e,t):[]}),aa=Xr(function(e){return po(Et(e,Va))}),sa=Xr(function(e){var t=Ji(e);return Va(t)&&(t=o),po(Et(e,Va),ai(t,2))}),ua=Xr(function(e){var t=Ji(e);return t="function"==typeof t?t:o,po(Et(e,Va),o,t)}),ca=Xr(ra),la=Xr(function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,oa(e,n)});function fa(e){var t=In(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var da=ei(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Wn&&vi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:pa,args:[i],thisArg:o}),new Hn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(o),e})):this.thru(i)}),ha=To(function(e,t,n){De.call(e,n)?++e[n]:rr(e,n,1)}),ga=No(Wi),va=No(zi);function ma(e,t){return(za(e)?At:lr)(e,ai(t,3))}function ya(e,t){return(za(e)?St:fr)(e,ai(t,3))}var ba=To(function(e,t,n){De.call(e,n)?e[n].push(t):rr(e,n,[t])}),wa=Xr(function(e,t,n){var o=-1,i="function"==typeof t,a=Ua(e)?r(e.length):[];return lr(e,function(e){a[++o]=i?kt(t,e,n):Er(e,t,n)}),a}),xa=To(function(e,t,n){rr(e,n,t)});function _a(e,t){return(za(e)?Pt:Nr)(e,ai(t,3))}var ka=To(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Ca=Xr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&mi(e,t[0],t[1])?t=[]:n>2&&mi(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,gr(t,1),[])}),Aa=ct||function(){return ft.Date.now()};function Sa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Jo(e,c,o,o,o,o,t)}function ja(e,t){var n;if("function"!=typeof t)throw new je(i);return e=ds(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ea=Xr(function(e,t,n){var r=1;if(n.length){var o=sn(n,ii(Ea));r|=u}return Jo(e,r,t,n,o)}),Ta=Xr(function(e,t,n){var r=3;if(n.length){var o=sn(n,ii(Ta));r|=u}return Jo(t,r,e,n,o)});function $a(e,t,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new je(i);function g(t){var n=r,i=a;return r=a=o,f=t,u=e.apply(i,n)}function v(e){var n=e-l;return l===o||n>=t||n<0||d&&e-f>=s}function m(){var e=Aa();if(v(e))return y(e);c=Ei(m,function(e){var n=t-(e-l);return d?mn(n,s-(e-f)):n}(e))}function y(e){return c=o,h&&r?g(e):(r=a=o,u)}function b(){var e=Aa(),n=v(e);if(r=arguments,a=this,l=e,n){if(c===o)return function(e){return f=e,c=Ei(m,t),p?g(e):u}(l);if(d)return wo(c),c=Ei(m,t),g(l)}return c===o&&(c=Ei(m,t)),u}return t=gs(t)||0,Za(n)&&(p=!!n.leading,s=(d="maxWait"in n)?vn(gs(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==o&&wo(c),f=0,r=l=a=c=o},b.flush=function(){return c===o?u:y(Aa())},b}var Pa=Xr(function(e,t){return ur(e,1,t)}),Oa=Xr(function(e,t,n){return ur(e,gs(t)||0,n)});function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new je(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Da.Cache||Un),n}function qa(e){if("function"!=typeof e)throw new je(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=Un;var La=yo(function(e,t){var n=(t=1==t.length&&za(t[0])?Pt(t[0],Jt(ai())):Pt(gr(t,1),Jt(ai()))).length;return Xr(function(r){for(var o=-1,i=mn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)})}),Na=Xr(function(e,t){var n=sn(t,ii(Na));return Jo(e,u,o,t,n)}),Ra=Xr(function(e,t){var n=sn(t,ii(Ra));return Jo(e,64,o,t,n)}),Ia=ei(function(e,t){return Jo(e,256,o,o,o,t)});function Fa(e,t){return e===t||e!=e&&t!=t}var Ma=Bo(Cr),Ha=Bo(function(e,t){return e>=t}),Wa=Tr(function(){return arguments}())?Tr:function(e){return es(e)&&De.call(e,"callee")&&!Ve.call(e,"callee")},za=r.isArray,Ba=mt?Jt(mt):function(e){return es(e)&&kr(e)==P};function Ua(e){return null!=e&&Ka(e.length)&&!Qa(e)}function Va(e){return es(e)&&Ua(e)}var Xa=vt||gu,Ga=yt?Jt(yt):function(e){return es(e)&&kr(e)==y};function Ja(e){if(!es(e))return!1;var t=kr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!rs(e)}function Qa(e){if(!Za(e))return!1;var t=kr(e);return t==w||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ya(e){return"number"==typeof e&&e==ds(e)}function Ka(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function es(e){return null!=e&&"object"==typeof e}var ts=bt?Jt(bt):function(e){return es(e)&&pi(e)==_};function ns(e){return"number"==typeof e||es(e)&&kr(e)==k}function rs(e){if(!es(e)||kr(e)!=C)return!1;var t=Be(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==Re}var os=wt?Jt(wt):function(e){return es(e)&&kr(e)==S},is=xt?Jt(xt):function(e){return es(e)&&pi(e)==j};function as(e){return"string"==typeof e||!za(e)&&es(e)&&kr(e)==E}function ss(e){return"symbol"==typeof e||es(e)&&kr(e)==T}var us=_t?Jt(_t):function(e){return es(e)&&Ka(e.length)&&!!ot[kr(e)]},cs=Bo(Lr),ls=Bo(function(e,t){return e<=t});function fs(e){if(!e)return[];if(Ua(e))return as(e)?fn(e):jo(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=pi(e);return(t==_?on:t==j?un:Fs)(e)}function ps(e){return e?(e=gs(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ds(e){var t=ps(e),n=t%1;return t==t?n?t-n:t:0}function hs(e){return e?ir(ds(e),0,d):0}function gs(e){if("number"==typeof e)return e;if(ss(e))return p;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Gt(e);var n=he.test(e);return n||ve.test(e)?ut(e.slice(2),n?2:8):de.test(e)?p:+e}function vs(e){return Eo(e,Ps(e))}function ms(e){return null==e?"":ao(e)}var ys=$o(function(e,t){if(xi(t)||Ua(t))Eo(t,$s(t),e);else for(var n in t)De.call(t,n)&&Zn(e,n,t[n])}),bs=$o(function(e,t){Eo(t,Ps(t),e)}),ws=$o(function(e,t,n,r){Eo(t,Ps(t),e,r)}),xs=$o(function(e,t,n,r){Eo(t,$s(t),e,r)}),_s=ei(or),ks=Xr(function(e,t){e=Ce(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&mi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=Ps(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===o||Fa(f,$e[l])&&!De.call(e,l))&&(e[l]=a[l])}return e}),Cs=Xr(function(e){return e.push(o,Yo),kt(Ds,o,e)});function As(e,t,n){var r=null==e?o:xr(e,t);return r===o?n:r}function Ss(e,t){return null!=e&&di(e,t,Sr)}var js=Fo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=n},Zs(nu)),Es=Fo(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]},ai),Ts=Xr(Er);function $s(e){return Ua(e)?Gn(e):qr(e)}function Ps(e){return Ua(e)?Gn(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=xi(e),n=[];for(var r in e)("constructor"!=r||!t&&De.call(e,r))&&n.push(r);return n}(e)}var Os=$o(function(e,t,n){Fr(e,t,n)}),Ds=$o(function(e,t,n,r){Fr(e,t,n,r)}),qs=ei(function(e,t){var n={};if(null==e)return n;var r=!1;t=Pt(t,function(t){return t=mo(t,e),r||(r=t.length>1),t}),Eo(e,ni(e),n),r&&(n=ar(n,7,Ko));for(var o=t.length;o--;)uo(n,t[o]);return n}),Ls=ei(function(e,t){return null==e?{}:function(e,t){return Wr(e,t,function(t,n){return Ss(e,n)})}(e,t)});function Ns(e,t){if(null==e)return{};var n=Pt(ni(e),function(e){return[e]});return t=ai(t),Wr(e,n,function(e,n){return t(e,n[0])})}var Rs=Go($s),Is=Go(Ps);function Fs(e){return null==e?[]:Qt(e,$s(e))}var Ms=qo(function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)});function Hs(e){return Js(ms(e).toLowerCase())}function Ws(e){return(e=ms(e))&&e.replace(ye,en).replace(Ye,"")}var zs=qo(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Bs=qo(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Us=Do("toLowerCase"),Vs=qo(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Xs=qo(function(e,t,n){return e+(n?" ":"")+Js(t)}),Gs=qo(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Js=Do("toUpperCase");function Qs(e,t,n){return e=ms(e),(t=n?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Ys=Xr(function(e,t){try{return kt(e,o,t)}catch(e){return Ja(e)?e:new xe(e)}}),Ks=ei(function(e,t){return At(t,function(t){t=Ni(t),rr(e,t,Ea(e[t],e))}),e});function Zs(e){return function(){return e}}var eu=Ro(),tu=Ro(!0);function nu(e){return e}function ru(e){return Dr("function"==typeof e?e:ar(e,1))}var ou=Xr(function(e,t){return function(n){return Er(n,e,t)}}),iu=Xr(function(e,t){return function(n){return Er(e,n,t)}});function au(e,t,n){var r=$s(t),o=wr(t,r);null!=n||Za(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=wr(t,$s(t)));var i=!(Za(n)&&"chain"in n&&!n.chain),a=Qa(e);return At(o,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=jo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})}),e}function su(){}var uu=Ho(Pt),cu=Ho(jt),lu=Ho(Lt);function fu(e){return yi(e)?zt(Ni(e)):function(e){return function(t){return xr(t,e)}}(e)}var pu=zo(),du=zo(!0);function hu(){return[]}function gu(){return!1}var vu,mu=Mo(function(e,t){return e+t},0),yu=Vo("ceil"),bu=Mo(function(e,t){return e/t},1),wu=Vo("floor"),xu=Mo(function(e,t){return e*t},1),_u=Vo("round"),ku=Mo(function(e,t){return e-t},0);return In.after=function(e,t){if("function"!=typeof t)throw new je(i);return e=ds(e),function(){if(--e<1)return t.apply(this,arguments)}},In.ary=Sa,In.assign=ys,In.assignIn=bs,In.assignInWith=ws,In.assignWith=xs,In.at=_s,In.before=ja,In.bind=Ea,In.bindAll=Ks,In.bindKey=Ta,In.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return za(e)?e:[e]},In.chain=fa,In.chunk=function(e,t,n){t=(n?mi(e,t,n):t===o)?1:vn(ds(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=r(pt(i/t));a<i;)u[s++]=eo(e,a,a+=t);return u},In.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},In.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Ot(za(n)?jo(n):[n],gr(t,1))},In.cond=function(e){var t=null==e?0:e.length,n=ai();return e=t?Pt(e,function(e){if("function"!=typeof e[1])throw new je(i);return[n(e[0]),e[1]]}):[],Xr(function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}})},In.conforms=function(e){return function(e){var t=$s(e);return function(n){return sr(n,e,t)}}(ar(e,1))},In.constant=Zs,In.countBy=ha,In.create=function(e,t){var n=Fn(e);return null==t?n:nr(n,t)},In.curry=function e(t,n,r){var i=Jo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},In.curryRight=function e(t,n,r){var i=Jo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},In.debounce=$a,In.defaults=ks,In.defaultsDeep=Cs,In.defer=Pa,In.delay=Oa,In.difference=Fi,In.differenceBy=Mi,In.differenceWith=Hi,In.drop=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=n||t===o?1:ds(t))<0?0:t,r):[]},In.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,0,(t=r-(t=n||t===o?1:ds(t)))<0?0:t):[]},In.dropRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0,!0):[]},In.dropWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!0):[]},In.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&mi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ds(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:ds(r))<0&&(r+=i),r=n>r?0:hs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},In.filter=function(e,t){return(za(e)?Et:hr)(e,ai(t,3))},In.flatMap=function(e,t){return gr(_a(e,t),1)},In.flatMapDeep=function(e,t){return gr(_a(e,t),l)},In.flatMapDepth=function(e,t,n){return n=n===o?1:ds(n),gr(_a(e,t),n)},In.flatten=Bi,In.flattenDeep=function(e){return null!=e&&e.length?gr(e,l):[]},In.flattenDepth=function(e,t){return null!=e&&e.length?gr(e,t=t===o?1:ds(t)):[]},In.flip=function(e){return Jo(e,512)},In.flow=eu,In.flowRight=tu,In.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];rr(r,o[0],o[1])}return r},In.functions=function(e){return null==e?[]:wr(e,$s(e))},In.functionsIn=function(e){return null==e?[]:wr(e,Ps(e))},In.groupBy=ba,In.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},In.intersection=Vi,In.intersectionBy=Xi,In.intersectionWith=Gi,In.invert=js,In.invertBy=Es,In.invokeMap=wa,In.iteratee=ru,In.keyBy=xa,In.keys=$s,In.keysIn=Ps,In.map=_a,In.mapKeys=function(e,t){var n={};return t=ai(t,3),yr(e,function(e,r,o){rr(n,t(e,r,o),e)}),n},In.mapValues=function(e,t){var n={};return t=ai(t,3),yr(e,function(e,r,o){rr(n,r,t(e,r,o))}),n},In.matches=function(e){return Rr(ar(e,1))},In.matchesProperty=function(e,t){return Ir(e,ar(t,1))},In.memoize=Da,In.merge=Os,In.mergeWith=Ds,In.method=ou,In.methodOf=iu,In.mixin=au,In.negate=qa,In.nthArg=function(e){return e=ds(e),Xr(function(t){return Mr(t,e)})},In.omit=qs,In.omitBy=function(e,t){return Ns(e,qa(ai(t)))},In.once=function(e){return ja(2,e)},In.orderBy=function(e,t,n,r){return null==e?[]:(za(t)||(t=null==t?[]:[t]),za(n=r?o:n)||(n=null==n?[]:[n]),Hr(e,t,n))},In.over=uu,In.overArgs=La,In.overEvery=cu,In.overSome=lu,In.partial=Na,In.partialRight=Ra,In.partition=ka,In.pick=Ls,In.pickBy=Ns,In.property=fu,In.propertyOf=function(e){return function(t){return null==e?o:xr(e,t)}},In.pull=Qi,In.pullAll=Yi,In.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,ai(n,2)):e},In.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?zr(e,t,o,n):e},In.pullAt=Ki,In.range=pu,In.rangeRight=du,In.rearg=Ia,In.reject=function(e,t){return(za(e)?Et:hr)(e,qa(ai(t,3)))},In.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ai(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Br(e,o),n},In.rest=function(e,t){if("function"!=typeof e)throw new je(i);return Xr(e,t=t===o?t:ds(t))},In.reverse=Zi,In.sampleSize=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:ds(t),(za(e)?Qn:Jr)(e,t)},In.set=function(e,t,n){return null==e?e:Qr(e,t,n)},In.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Qr(e,t,n,r)},In.shuffle=function(e){return(za(e)?Yn:Zr)(e)},In.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&mi(e,t,n)?(t=0,n=r):(t=null==t?0:ds(t),n=n===o?r:ds(n)),eo(e,t,n)):[]},In.sortBy=Ca,In.sortedUniq=function(e){return e&&e.length?oo(e):[]},In.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},In.split=function(e,t,n){return n&&"number"!=typeof n&&mi(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=ms(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ao(t))&&rn(e)?bo(fn(e),0,n):e.split(t,n):[]},In.spread=function(e,t){if("function"!=typeof e)throw new je(i);return t=null==t?0:vn(ds(t),0),Xr(function(n){var r=n[t],o=bo(n,0,t);return r&&Ot(o,r),kt(e,this,o)})},In.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},In.take=function(e,t,n){return e&&e.length?eo(e,0,(t=n||t===o?1:ds(t))<0?0:t):[]},In.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?eo(e,(t=r-(t=n||t===o?1:ds(t)))<0?0:t,r):[]},In.takeRightWhile=function(e,t){return e&&e.length?lo(e,ai(t,3),!1,!0):[]},In.takeWhile=function(e,t){return e&&e.length?lo(e,ai(t,3)):[]},In.tap=function(e,t){return t(e),e},In.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new je(i);return Za(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),$a(e,t,{leading:r,maxWait:t,trailing:o})},In.thru=pa,In.toArray=fs,In.toPairs=Rs,In.toPairsIn=Is,In.toPath=function(e){return za(e)?Pt(e,Ni):ss(e)?[e]:jo(Li(ms(e)))},In.toPlainObject=vs,In.transform=function(e,t,n){var r=za(e),o=r||Xa(e)||us(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Za(e)&&Qa(i)?Fn(Be(e)):{}}return(o?At:yr)(e,function(e,r,o){return t(n,e,r,o)}),n},In.unary=function(e){return Sa(e,1)},In.union=ea,In.unionBy=ta,In.unionWith=na,In.uniq=function(e){return e&&e.length?so(e):[]},In.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},In.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?so(e,o,t):[]},In.unset=function(e,t){return null==e||uo(e,t)},In.unzip=ra,In.unzipWith=oa,In.update=function(e,t,n){return null==e?e:co(e,t,vo(n))},In.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:co(e,t,vo(n),r)},In.values=Fs,In.valuesIn=function(e){return null==e?[]:Qt(e,Ps(e))},In.without=ia,In.words=Qs,In.wrap=function(e,t){return Na(vo(t),e)},In.xor=aa,In.xorBy=sa,In.xorWith=ua,In.zip=ca,In.zipObject=function(e,t){return ho(e||[],t||[],Zn)},In.zipObjectDeep=function(e,t){return ho(e||[],t||[],Qr)},In.zipWith=la,In.entries=Rs,In.entriesIn=Is,In.extend=bs,In.extendWith=ws,au(In,In),In.add=mu,In.attempt=Ys,In.camelCase=Ms,In.capitalize=Hs,In.ceil=yu,In.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=gs(n))==n?n:0),t!==o&&(t=(t=gs(t))==t?t:0),ir(gs(e),t,n)},In.clone=function(e){return ar(e,4)},In.cloneDeep=function(e){return ar(e,5)},In.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:o)},In.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:o)},In.conformsTo=function(e,t){return null==t||sr(e,t,$s(t))},In.deburr=Ws,In.defaultTo=function(e,t){return null==e||e!=e?t:e},In.divide=bu,In.endsWith=function(e,t,n){e=ms(e),t=ao(t);var r=e.length,i=n=n===o?r:ir(ds(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},In.eq=Fa,In.escape=function(e){return(e=ms(e))&&G.test(e)?e.replace(V,tn):e},In.escapeRegExp=function(e){return(e=ms(e))&&ne.test(e)?e.replace(te,"\\$&"):e},In.every=function(e,t,n){var r=za(e)?jt:pr;return n&&mi(e,t,n)&&(t=o),r(e,ai(t,3))},In.find=ga,In.findIndex=Wi,In.findKey=function(e,t){return Rt(e,ai(t,3),yr)},In.findLast=va,In.findLastIndex=zi,In.findLastKey=function(e,t){return Rt(e,ai(t,3),br)},In.floor=wu,In.forEach=ma,In.forEachRight=ya,In.forIn=function(e,t){return null==e?e:vr(e,ai(t,3),Ps)},In.forInRight=function(e,t){return null==e?e:mr(e,ai(t,3),Ps)},In.forOwn=function(e,t){return e&&yr(e,ai(t,3))},In.forOwnRight=function(e,t){return e&&br(e,ai(t,3))}
vendor: 4,515 bytes, line 2
2,In.get=As,In.gt=Ma,In.gte=Ha,In.has=function(e,t){return null!=e&&di(e,t,Ar)},In.hasIn=Ss,In.head=Ui,In.identity=nu,In.includes=function(e,t,n,r){e=Ua(e)?e:Fs(e),n=n&&!r?ds(n):0;var o=e.length;return n<0&&(n=vn(o+n,0)),as(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},In.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ds(n);return o<0&&(o=vn(r+o,0)),Ft(e,t,o)},In.inRange=function(e,t,n){return t=ps(t),n===o?(n=t,t=0):n=ps(n),function(e,t,n){return e>=mn(t,n)&&e<vn(t,n)}(e=gs(e),t,n)},In.invoke=Ts,In.isArguments=Wa,In.isArray=za,In.isArrayBuffer=Ba,In.isArrayLike=Ua,In.isArrayLikeObject=Va,In.isBoolean=function(e){return!0===e||!1===e||es(e)&&kr(e)==m},In.isBuffer=Xa,In.isDate=Ga,In.isElement=function(e){return es(e)&&1===e.nodeType&&!rs(e)},In.isEmpty=function(e){if(null==e)return!0;if(Ua(e)&&(za(e)||"string"==typeof e||"function"==typeof e.splice||Xa(e)||us(e)||Wa(e)))return!e.length;var t=pi(e);if(t==_||t==j)return!e.size;if(xi(e))return!qr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},In.isEqual=function(e,t){return $r(e,t)},In.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?$r(e,t,o,n):!!r},In.isError=Ja,In.isFinite=function(e){return"number"==typeof e&&Nt(e)},In.isFunction=Qa,In.isInteger=Ya,In.isLength=Ka,In.isMap=ts,In.isMatch=function(e,t){return e===t||Pr(e,t,ui(t))},In.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Pr(e,t,ui(t),n)},In.isNaN=function(e){return ns(e)&&e!=+e},In.isNative=function(e){if(wi(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},In.isNil=function(e){return null==e},In.isNull=function(e){return null===e},In.isNumber=ns,In.isObject=Za,In.isObjectLike=es,In.isPlainObject=rs,In.isRegExp=os,In.isSafeInteger=function(e){return Ya(e)&&e>=-9007199254740991&&e<=f},In.isSet=is,In.isString=as,In.isSymbol=ss,In.isTypedArray=us,In.isUndefined=function(e){return e===o},In.isWeakMap=function(e){return es(e)&&pi(e)==$},In.isWeakSet=function(e){return es(e)&&"[object WeakSet]"==kr(e)},In.join=function(e,t){return null==e?"":Bt.call(e,t)},In.kebabCase=zs,In.last=Ji,In.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=ds(n))<0?vn(r+i,0):mn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):It(e,Ht,i,!0)},In.lowerCase=Bs,In.lowerFirst=Us,In.lt=cs,In.lte=ls,In.max=function(e){return e&&e.length?dr(e,nu,Cr):o},In.maxBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Cr):o},In.mean=function(e){return Wt(e,nu)},In.meanBy=function(e,t){return Wt(e,ai(t,2))},In.min=function(e){return e&&e.length?dr(e,nu,Lr):o},In.minBy=function(e,t){return e&&e.length?dr(e,ai(t,2),Lr):o},In.stubArray=hu,In.stubFalse=gu,In.stubObject=function(){return{}},In.stubString=function(){return""},In.stubTrue=function(){return!0},In.multiply=xu,In.nth=function(e,t){return e&&e.length?Mr(e,ds(t)):o},In.noConflict=function(){return ft._===this&&(ft._=Ie),this},In.noop=su,In.now=Aa,In.pad=function(e,t,n){e=ms(e);var r=(t=ds(t))?ln(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Wo(dt(o),n)+e+Wo(pt(o),n)},In.padEnd=function(e,t,n){e=ms(e);var r=(t=ds(t))?ln(e):0;return t&&r<t?e+Wo(t-r,n):e},In.padStart=function(e,t,n){e=ms(e);var r=(t=ds(t))?ln(e):0;return t&&r<t?Wo(t-r,n)+e:e},In.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(ms(e).replace(re,""),t||0)},In.random=function(e,t,n){if(n&&"boolean"!=typeof n&&mi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=ps(e),t===o?(t=e,e=0):t=ps(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=wn();return mn(e+i*(t-e+st("1e-"+((i+"").length-1))),t)}return Ur(e,t)},In.reduce=function(e,t,n){var r=za(e)?Dt:Ut,o=arguments.length<3;return r(e,ai(t,4),n,o,lr)},In.reduceRight=function(e,t,n){var r=za(e)?qt:Ut,o=arguments.length<3;return r(e,ai(t,4),n,o,fr)},In.repeat=function(e,t,n){return t=(n?mi(e,t,n):t===o)?1:ds(t),Vr(ms(e),t)},In.replace=function(){var e=arguments,t=ms(e[0]);return e.length<3?t:t.replace(e[1],e[2])},In.result=function(e,t,n){var r=-1,i=(t=mo(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Ni(t[r])];a===o&&(r=i,a=n),e=Qa(a)?a.call(e):a}return e},In.round=_u,In.runInContext=e,In.sample=function(e){return(za(e)?Jn:Gr)(e)},In.size=function(e){if(null==e)return 0;if(Ua(e))return as(e)?ln(e):e.length;var t=pi(e);return t==_||t==j?e.size:qr(e).length},In.snakeCase=Vs,In.some=function(e,t,n){var r=za(e)?Lt:to;
vendor: 8,790 bytes, line 2
2return n&&mi(e,t,n)&&(t=o),r(e,ai(t,3))},In.sortedIndex=function(e,t){return no(e,t)},In.sortedIndexBy=function(e,t,n){return ro(e,t,ai(n,2))},In.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&Fa(e[r],t))return r}return-1},In.sortedLastIndex=function(e,t){return no(e,t,!0)},In.sortedLastIndexBy=function(e,t,n){return ro(e,t,ai(n,2),!0)},In.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},In.startCase=Xs,In.startsWith=function(e,t,n){return e=ms(e),n=null==n?0:ir(ds(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t},In.subtract=ku,In.sum=function(e){return e&&e.length?Vt(e,nu):0},In.sumBy=function(e,t){return e&&e.length?Vt(e,ai(t,2)):0},In.template=function(e,t,n){var r=In.templateSettings;n&&mi(e,t,n)&&(t=o),e=ms(e),t=xs({},t,r,Qo);var i=xs({},t.imports,r.imports,Qo),a=$s(i),s=Qt(i,a);At(a,function(e){if(ce.test(e))throw new xe("Invalid `imports` option passed into `_.template`")});var u,c,l=0,f=t.interpolate||be,p="__p += '",d=Ae((t.escape||be).source+"|"+f.source+"|"+(f===Y?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),h="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(d,function(t,n,r,o,i,a){return r||(r=o),p+=e.slice(l,a).replace(we,nn),n&&(u=!0,p+="' +\n__e("+n+") +\n'"),i&&(c=!0,p+="';\n"+i+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+t.length,t}),p+="';\n";var g=De.call(t,"variable")&&t.variable;if(g){if(ce.test(g))throw new xe("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(c?p.replace(W,""):p).replace(z,"$1").replace(B,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Ys(function(){return _e(a,h+"return "+p).apply(o,s)});if(v.source=p,Ja(v))throw v;return v},In.times=function(e,t){if((e=ds(e))<1||e>f)return[];var n=d,r=mn(e,d);t=ai(t),e-=d;for(var o=Xt(r,t);++n<e;)t(n);return o},In.toFinite=ps,In.toInteger=ds,In.toLength=hs,In.toLower=function(e){return ms(e).toLowerCase()},In.toNumber=gs,In.toSafeInteger=function(e){return e?ir(ds(e),-9007199254740991,f):0===e?e:0},In.toString=ms,In.toUpper=function(e){return ms(e).toUpperCase()},In.trim=function(e,t,n){if((e=ms(e))&&(n||t===o))return Gt(e);if(!e||!(t=ao(t)))return e;var r=fn(e),i=fn(t);return bo(r,Kt(r,i),Zt(r,i)+1).join("")},In.trimEnd=function(e,t,n){if((e=ms(e))&&(n||t===o))return e.slice(0,pn(e)+1);if(!e||!(t=ao(t)))return e;var r=fn(e);return bo(r,0,Zt(r,fn(t))+1).join("")},In.trimStart=function(e,t,n){if((e=ms(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=ao(t)))return e;var r=fn(e);return bo(r,Kt(r,fn(t))).join("")},In.truncate=function(e,t){var n=30,r="...";if(Za(t)){var i="separator"in t?t.separator:i;n="length"in t?ds(t.length):n,r="omission"in t?ao(t.omission):r}var a=(e=ms(e)).length;if(rn(e)){var s=fn(e);a=s.length}if(n>=a)return e;var u=n-ln(r);if(u<1)return r;var c=s?bo(s,0,u).join(""):e.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),os(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Ae(i.source,ms(pe.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;c=c.slice(0,p===o?u:p)}}else if(e.indexOf(ao(i),u)!=u){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},In.unescape=function(e){return(e=ms(e))&&X.test(e)?e.replace(U,dn):e},In.uniqueId=function(e){var t=++qe;return ms(e)+t},In.upperCase=Gs,In.upperFirst=Js,In.each=ma,In.eachRight=ya,In.first=Ui,au(In,(vu={},yr(In,function(e,t){De.call(In.prototype,t)||(vu[t]=e)}),vu),{chain:!1}),In.VERSION="4.18.1",At(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){In[e].placeholder=In}),At(["drop","take"],function(e,t){Wn.prototype[e]=function(n){n=n===o?1:vn(ds(n),0);var r=this.__filtered__&&!t?new Wn(this):this.clone();return r.__filtered__?r.__takeCount__=mn(n,r.__takeCount__):r.__views__.push({size:mn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),At(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),At(["head","last"],function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}}),At(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}}),Wn.prototype.compact=function(){return this.filter(nu)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Xr(function(e,t){return"function"==typeof e?new Wn(this):this.map(function(n){return Er(n,e,t)})}),Wn.prototype.reject=function(e){return this.filter(qa(ai(e)))},Wn.prototype.slice=function(e,t){e=ds(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=ds(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(d)},yr(Wn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=In[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(In.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Wn,c=s[0],l=u||za(t),f=function(e){var t=i.apply(In,Ot([e],s));return r&&p?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,g=u&&!d;if(!a&&l){t=g?t:new Wn(this);var v=e.apply(t,s);return v.__actions__.push({func:pa,args:[f],thisArg:o}),new Hn(v,p)}return h&&g?e.apply(this,s):(v=this.thru(f),h?r?v.value()[0]:v.value():v)})}),At(["pop","push","shift","sort","splice","unshift"],function(e){var t=Ee[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);In.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(za(o)?o:[],e)}return this[n](function(n){return t.apply(za(n)?n:[],e)})}}),yr(Wn.prototype,function(e,t){var n=In[t];if(n){var r=n.name+"";De.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}}),Tn[Io(o,2).name]=[{name:"wrapper",func:o}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=jo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=jo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=jo(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=za(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mn(t,e+a);break;case"takeRight":e=vn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=mn(u,this.__takeCount__);if(!n||!r&&o==u&&d==u)return fo(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var g=-1,v=e[c+=t];++g<f;){var m=l[g],y=m.iteratee,b=m.type,w=y(v);if(2==b)v=w;else if(!w){if(1==b)continue e;break e}}h[p++]=v}return h},In.prototype.at=da,In.prototype.chain=function(){return fa(this)},In.prototype.commit=function(){return new Hn(this.value(),this.__chain__)},In.prototype.next=function(){this.__values__===o&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},In.prototype.plant=function(e){for(var t,n=this;n instanceof Mn;){var r=Ii(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},In.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:pa,args:[Zi],thisArg:o}),new Hn(t,this.__chain__)}return this.thru(Zi)},In.prototype.toJSON=In.prototype.valueOf=In.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},In.prototype.first=In.prototype.head,Je&&(In.prototype[Je]=function(){return this}),In}();ft._=hn,(r=function(){return hn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>
2{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=()=>{const e=window.apos;e.util={},e.util.emit=function(t,n,r){let o;try{o=new window.CustomEvent(n)}catch(e){o=document.createEvent("Event"),o.initEvent(n,!0,!0)}e.util.assign(o,r||{}),t.dispatchEvent(o)},e.util.getCookie=function(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]},e.util.removeClass=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")},e.util.addClass=function(e,t){e.classList?e.classList.add(t):e.className+=" "+t},e.util.closest=function(e,t){return e.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(e){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),e.closest(t)},e.util.assign=function(e,t){if(Object.assign)return Object.assign.apply(Object,arguments);let n,r,o,i;for(n=1;n<arguments.length;n++)for(o=Object.keys(arguments[n]),r=0;r<o.length;r++)i=o[r],e[i]=arguments[n][i];return e};const t={list:{},initialized:!1};e.util.widgetPlayers=new Proxy(t.list,{set:(n,r,o)=>(n[r]=o,t.initialized&&e.util.runPlayers(),!0)}),e.util.onReadyAndRefresh=function(t){!function(e){"loading"!==document.readyState?setTimeout(e,0):document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"loading"!==document.readyState&&e()})}(t),setTimeout(function(){e.bus&&e.bus.$on("refreshed",t)},0)},e.util.onReady=e.util.onReadyAndRefresh.bind(e.util.onReadyAndRefresh),e.util.runPlayers=function(t){const n=e.util.widgetPlayers,r=Object.keys(n);for(let e=0;e<r.length;e++){const o=n[r[e]];(t||document).querySelectorAll(o.selector).forEach(function(e){e.aposWidgetPlayed||(e.aposWidgetPlayed=!0,o.player(e))})}},e.bus||e.util.onReady(function(){t.initialized=!0,e.util.runPlayers()}),e.util.attachmentUrl=function(t,n){let r,o,i=e.uploadsUrl+"/attachments/"+t._id+"-"+t.name;return n||(n={}),n.crop&&n.crop.width?r=n.crop:t.crop&&t.crop.width&&(r=t.crop),r&&(i+="."+r.left+"."+r.top+"."+r.width+"."+r.height),o=!(!n.size||"original"===n.size)&&n.size,o&&(i+="."+o),i+"."+t.extension},e.util.assetUrl=function(t){return e.assetBaseUrl+t},e.util.sameSite=function(e){const t=e.match(/^(https?:)?\/\/([^/]+)/);return!t||window.location.host===t[2]}};(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0});const t=()=>{const e={},t=window.apos;t.http={},t.http.post=function(e,n,r){return t.http.remote("POST",e,n,r)},t.http.get=function(e,n,r){return t.http.remote("GET",e,n,r)},t.http.patch=function(e,n,r){return t.http.remote("PATCH",e,n,r)},t.http.put=function(e,n,r){return t.http.remote("PUT",e,n,r)},t.http.delete=function(e,n,r){return t.http.remote("DELETE",e,n,r)},t.http.remote=function(n,r,o,i){if(!i){if(!window.Promise)throw new Error("If you wish to receive a promise from apos.http methods in older browsers you must have a Promise polyfill. If you do not want to provide one, pass a callback instead.");return new window.Promise(function(e,i){return r?t.http.remote(n,r,o,function(t,n){return t?i(t):e(n)}):i(new Error("url is not defined"))})}if(!r)return i(new Error("url is not defined"));let a,s;t.sitePrefix&&!1!==o.prefix&&"/"===r.substring(0,1)&&(r=t.sitePrefix+r),null!=o.draft&&(o.qs?o.qs=o.draft?t.util.assign({aposMode:"draft"},o.qs):t.util.assign({aposMode:"published"},o.qs):(s=r.indexOf("?"),a=-1!==s?t.http.parseQuery(r.substring(s)):{},a.aposMode=o.draft?"draft":"published",r=t.http.addQueryToUrl(r,a)));const u=!0===o.busy?"busy":o.busy,c=new XMLHttpRequest;let l,f,p=o.body;s=r.indexOf("?");const d={...-1!==s&&t.http.parseQuery(r.substring(s)),...o.qs||{},...o.qs?.aposLocale?{aposLocale:o.qs.aposLocale}:{aposLocale:t.getActiveLocale()}};r=t.http.addQueryToUrl(r,d),o.busy&&(e[u]||(e[u]=0,t.bus&&t.bus.$emit("busy",{active:!0,name:u})),e[u]++),c.open(n,r);const h=window.FormData&&p instanceof window.FormData,g="json"===o.send||o.body&&"object"==typeof o.body&&!h;if(g&&c.setRequestHeader("Content-Type","application/json"),o.headers)for(l=Object.keys(o.headers),f=0;f<l.length;f++)c.setRequestHeader(l[f],o.headers[l[f]]);function v(){const e=c.getAllResponseHeaders();if(!e)return{};const t=e.trim().split(/[\r\n]+/),n={};return t.forEach(function(e){const t=e.split(": "),r=t.shift();if(!r)return;const o=t.shift();n[r.toLowerCase()]=o}),n}t.util.emit(document.body,"apos-before-"+n.toLowerCase(),{uri:r,data:o.body,request:c}),p=g?JSON.stringify(o.body):o.body,c.addEventListener("load",function(){let e=null;const t=this.getResponseHeader("Content-Type");if(t||"json"===o.parse)if("json"===o.parse||t.match(/^application\/json/))try{e=JSON.parse(this.responseText)}catch(e){return i(e)}else e=this.responseText;if(c.status<400)return o.fullResponse?i(null,{body:e,status:c.status,headers:v()}):i(null,e);{const t=new Error(e&&e.message||e&&e.name||"Error");return t.status=c.status,t.name=e&&e.name,t.body=e,t.headers=v(),i(t)}}),c.addEventListener("abort",function(e){return i(e)}),c.addEventListener("error",function(e){return i(e)}
2),o.downloadProgress&&c.addEventListener("progress",function(e){o.downloadProgress(e.loaded,e.lengthComputable?e.total:null)}),c.upload&&o.uploadProgress&&c.upload.addEventListener("progress",function(e){o.uploadProgress(e.loaded,e.lengthComputable?e.total:null)}),c.addEventListener("loadend",function(n){o.busy&&(e[u]--,e[u]||t.bus&&t.bus.$emit("busy",{active:!1,name:u}))}),c.send(p)},t.http.parseQuery=function(e){e=e.replace(/^\?/,"");const t={};return e.split("&").forEach(function(e){let t;-1===e.indexOf("=")?n(e,null):(t=e.split("="),t&&n(t[0],t[1]))}),t.root||{};function n(e,n){let r,o="root",i=t;(e=decodeURIComponent(e)).split("[").forEach(function(e){"]"===e?(Array.isArray(i[o])||(i[o]=[]),i=i[o],o=i.length):e.match(/^\d+]/)?(r=e.match(/^\d+/),Array.isArray(i[o])||(i[o]=[]),i=i[o],o=parseInt(r)):(r=e.replace("]",""),i[o]||(i[o]={}),i=i[o],o=r)}),n=null===n?n:decodeURIComponent(n),Array.isArray(i[o])?i[o].push(n):void 0!==i[o]?i[o]=[i[o],n]:i[o]=n}},t.http.addQueryToUrl=function(e,t){let n="";const r=e.indexOf("#");let o,i;if(-1!==r&&(n=e.substring(r),e=e.substring(0,r)),e=e.replace(/\?.*$/,""),null!=t&&"object"==typeof t)for(i=function e(t,n){let r,o,i=[];if(Array.isArray(n))for(o=0;o<n.length;o++)a(o,n[o]);else for(r=Object.keys(n),o=0;o<r.length;o++)a(r[o],n[r[o]]);return i;function a(n,r){null!=r&&"object"==typeof r?i=i.concat(e(t.length?t+"["+n+"]":n,r)):i.push([t.length?t+"["+n+"]":n,r])}}("",t),o=0;o<i.length;o++){const t=i[o][0],n=i[o][1];e+=o>0?"&":"?",e+=null==n?encodeURIComponent(t):encodeURIComponent(t)+"="+encodeURIComponent(n)}return e+n}};(Object.getOwnPropertyDescriptor(t,"name")||{}).writable||Object.defineProperty(t,"name",{value:"default",configurable:!0});const r=()=>{e(),t()};(Object.getOwnPropertyDescriptor(r,"name")||{}).writable||Object.defineProperty(r,"name",{value:"default",configurable:!0});const o=()=>{apos.getActiveLocale=()=>apos.modal?.getActiveLocale?.()||apos.locale};function i(){const e=!(apos.login&&apos.login.user),t="true"===apos.util.getCookie(`${self.apos.shortName}.loggedIn`);if(!e||!t)return void sessionStorage.setItem("aposRefreshedPages","{}");const n=JSON.parse(sessionStorage.aposRefreshedPages||"{}");n[location.href]||(n[location.href]=!0,sessionStorage.setItem("aposRefreshedPages",JSON.stringify(n)),console.info("Received logged-out content from cache while logged-in, refreshing the page"),location.reload())}(Object.getOwnPropertyDescriptor(o,"name")||{}).writable||Object.defineProperty(o,"name",{value:"default",configurable:!0}),Object.defineProperty(i,"name",{value:"default",configurable:!0});var a=n(543),s=n.n(a);const u=()=>{const e=window.apos;e.s4wCodeProtected={},e.util.onReady(()=>{e.s4wCodeProtected.$page=$("[data-code-protected-page]"),a.isEmpty(e.s4wCodeProtected.$page)||e.s4wCodeProtected.submit()}),e.s4wCodeProtected.submit=function(){const t=e.s4wCodeProtected.$page.find("[data-code-protected-form]");t.on("submit",async n=>{n.preventDefault();const r=t.find("input,select");let o=!0;if(a.each(r,e=>{e.checkValidity()||(o=!1,e.reportValidity())}),o){const n=e.s4wCodeProtected.populateForm(t),r=await e.http.post(e.s4wCodeProtected.getCheckCodeRoute(),{body:n,busy:!0});"ok"===r.status?location.reload():e.s4wCodeProtected.handleErrors(t,r.message)}})},e.s4wCodeProtected.populateForm=function(e){return{pageId:e.attr("data-code-protected-form"),pageType:e.attr("data-page-type"),code:e.find('[name="code"]').val()}},e.s4wCodeProtected.getCheckCodeRoute=function(){return`/modules/${e.s4wCodeProtected.$page.find("[data-code-protected-form]").attr("data-page-type")}/check-code`},e.s4wCodeProtected.handleErrors=function(e,t){e.find("[data-code-error]").text(t).removeClass("d-none")}};(Object.getOwnPropertyDescriptor(u,"name")||{}).writable||Object.defineProperty(u,"name",{value:"default",configurable:!0});const c=()=>{u()};(Object.getOwnPropertyDescriptor(c,"name")||{}).writable||Object.defineProperty(c,"name",{value:"default",configurable:!0});const l=()=>{apos.oembedCache||={},apos.util.widgetPlayers["@apostrophecms/video"]={selector:"[data-apos-video-widget]",player:function(e){const t=e.getAttribute("data-apos-video-url");let n;function r(t){apos.util.removeClass(e,"apos-oembed-busy"),apos.util.addClass(e,"apos-oembed-invalid"),console.error(t),e.innerHTML="undefined"!==t?"<p>Error loading video</p>":""}t&&function(e,t){if(apos.util.removeClass(e,"apos-oembed-invalid"),apos.util.addClass(e,"apos-oembed-busy"),!t.url)return r("undefined");!function(e,t){if(Object.hasOwn(apos.oembedCache,e.url))return t(null,apos.oembedCache[e.url]);const n={qs:{url:e.url}};apos.http.get("/api/v1/@apostrophecms/oembed/query",n,function(n,r){return n?t(n):(apos.oembedCache[e.url]=r,t(null,r))})}(t,function(o,i){return n=i,o||t.type&&i.type!==t.type?r(o||"inappropriate"):(apos.util.removeClass(e,"apos-oembed-busy"),function(e,t){const r=document.createElement("div");r.innerHTML=t.html;const o=r.firstChild;o.setAttribute("data-apos-video-canvas",""),e.innerHTML="",o&&(o.removeAttribute("width"),o.removeAttribute("height"),t.width&&t.height&&(o.style.width="100%",o.style.aspectRatio=`${n.width} / ${n.height}`),e.append(o))}(e,i))})}(e,{url:t})}}};(Object.getOwnPropertyDescriptor(l,"name")||{}).writable||Object.defineProperty(l,"name",{value:"default",configurable:!0});const f=()=>{apos.aposForm=apos.aposForm||{},apos.aposForm.collectors={}};(Object.getOwnPropertyDescriptor(f,"name")||{}
2).writable||Object.defineProperty(f,"name",{value:"default",configurable:!0});const p=()=>{const e=window.apos;e.s4wAposForm={},e.s4wAposForm.$body=$("html, body"),e.util.onReady(async()=>{if(0!==$("[data-apos-form-wrapper]").length){const t=await e.http.get("/modules/@apostrophecms/form/options-and-validation",{}),n=$("[data-header-content]").outerHeight(),r=t?.scrollMarginFirstFieldWithError??0,o=t?.marginScrollAfterSubmit??0,i=!0===t?.skipScrollAfterSubmit,a=!0===t?.skipScrollToFirstFieldWithError,s=!0===t?.doInputValidations;i||e.s4wAposForm.$body.on("@apostrophecms/form:submission-form",function(t){const r=t.originalEvent.form;e.s4wAposForm.$body.animate({scrollTop:$(r).closest("[data-apos-form-wrapper]").offset().top-(n+o)},600)}),a||document.body.addEventListener("@apostrophecms/form:submission-failed",t=>{if($(t.target).find("[data-slide-button]").length>0&&t.errors&&t.errors.length>0){const o=t.errors.findIndex(e=>"slided"===e.field);let i=null;if(-1!==o&&(i=t.errors.splice(o,1)[0]),i&&e.s4wAposForm.slideError(i),0===t.errors.length)return;e.s4wAposForm.$body.animate({scrollTop:$(`[name="${t.errors[0].field}"]`).offset().top-(n+r)},500)}}),s&&$("input, select, textarea").on("change input",function(){const n=$(this).attr("name"),r=$(`[data-apos-input-message=${n}]`);if("radio"===this.type)$(`input[name="${n}"]`).each(function(){$(this).removeClass("apos-form-input-error")});else{if("email"===this.type)return void e.s4wAposForm.validateEmail($(this),r,t);if("number"===this.type)return void e.s4wAposForm.validateNumber($(this),r,t);$(this).removeClass("apos-form-input-error")}r.empty(),r.removeClass("apos-form-error")})}}),e.s4wAposForm.validateEmail=function(t,n,r){const o=t.val(),i=r.validationText.email;/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)||""===o?e.s4wAposForm.removeError(t,n):e.s4wAposForm.showError(t,n,i)},e.s4wAposForm.validateNumber=function(t,n,r){const o=parseFloat(t.val()),i=t.attr("min"),a=t.attr("max"),s=r.validationText.min,u=r.validationText.max;i&&o<i?e.s4wAposForm.showError(t,n,s+i):a&&o>a?e.s4wAposForm.showError(t,n,u+a):e.s4wAposForm.removeError(t,n)},e.s4wAposForm.showError=function(e,t,n){e.addClass("apos-form-input-error"),t.addClass("apos-form-error"),t.text(n),t.removeAttr("hidden")},e.s4wAposForm.removeError=function(e,t){e.removeClass("apos-form-input-error"),t.empty(),t.removeClass("apos-form-error")},e.s4wAposForm.slideError=function(e){}};function d(e,t){const n=t.querySelector("[data-apos-form-form]"),r=t.querySelector("[data-apos-form-submit-error]");apos.util.emit(document.body,"@apostrophecms/form:submission-failed",{form:n,errors:e}),apos.util.addClass(r,"apos-form-visible"),function(e,t){if(!Array.isArray(t))return;const n=e.querySelector("[data-apos-form-form]"),r=e.querySelector("[data-apos-form-global-error]");r.innerText="",t.forEach(function(e){if(!function(e){return!(!e.global&&!e.field||!e.message)}(e))return;if(e.global)return void(r.innerText=r.innerText+" "+e.message);let t=n.querySelectorAll(`[name=${e.field}]`);t=Array.prototype.slice.call(t);const o=n.querySelector(`[data-apos-input-message=${e.field}]`);t.forEach(function(e){apos.util.addClass(e,"apos-form-input-error")}),apos.util.addClass(o,"apos-form-error"),o.innerText=e.message,o.hidden=!1})}(t,e)}let h;function g(e){if(e.querySelector("[data-apos-recaptcha-sitekey]"))return h=e.querySelector("[data-apos-recaptcha-sitekey]").dataset.aposRecaptchaSitekey,document.querySelector("[data-apos-recaptcha-script]")||(window.enableSubmissions=function(){grecaptcha.ready(function(){[...document.querySelectorAll("[data-apos-form-submit]")].forEach(e=>{e.disabled=!1})})},function(e){const t=document.querySelector("[data-apos-refreshable]")||document.body,n=document.createElement("script");n.src=apos.http.addQueryToUrl("https://www.google.com/recaptcha/api.js",{render:e,onload:"enableSubmissions"}),n.setAttribute("data-apos-recaptcha-script",""),n.setAttribute("async",""),n.setAttribute("defer",""),t.appendChild(n)}(h)),{getToken:v}}async function v(e){return grecaptcha.execute(h,{action:"submit"})}(Object.getOwnPropertyDescriptor(p,"name")||{}).writable||Object.defineProperty(p,"name",{value:"default",configurable:!0}),Object.defineProperty(g,"name",{value:"default",configurable:!0});const m=()=>{apos.util.widgetPlayers["@apostrophecms/form"]={selector:"[data-apos-form-wrapper]",player:function(e){const t=e.querySelector("[data-apos-form-form]");if(!t)return;t.addEventListener("submit",async function o(i){if(i.preventDefault(),apos?.adminBar?.editMode)return void await apos.notify("aposForm:disabledInEditMode",{type:"info"});if(e.querySelector("[data-apos-form-busy]"))return setTimeout(async function(){await o(i)},100);let a;t.setAttribute("data-apos-form-busy","1");const s=new window.FormData;try{a=await async function(e){if(!apos.aposForm.collectors||0===apos.aposForm.collectors.length)return;const t=[],n={};for(const r in apos.aposForm.collectors){const o=apos.aposForm.collectors[r].selector,i=apos.aposForm.collectors[r].collector,a=e.querySelectorAll(
2o);for(const e of a)try{const t=await i(e);"object"==typeof t&&t.field||console.error(`${r} field widget type is returning an invalid collector response.`),n[t.field]=t.files?{value:t.value,files:t.files}:t.value}catch(e){const n=e.field?e:e?.data?.fieldError;if(n?.field){const e=n;t.push({field:e.field,message:e.message||"Error"})}else t.push({global:!0,message:"Unknown form field error"})}}if(t.length>0){const e=new Error("invalid");throw e.data={formErrors:t},e}return n}(t);for(const e in a)"object"==typeof a[e]&&a[e].files&&(await r(e,a[e],s),a[e]="files-pending")}catch(n){return d(n?.data?.formErrors,e),void t.removeAttribute("data-apos-form-busy")}if(a._id=t.getAttribute("data-apos-form-form"),n){const t=e.querySelector("[data-apos-form-recaptcha-error]");try{a.recaptcha=await n.getToken(e)}catch(e){return console.error("reCAPTCHA execution error:",e),apos.util.addClass(t,"apos-form-visible"),null}}const u=e.querySelector("[data-apos-form-submit-error]"),c=e.querySelector("[data-apos-form-spinner]"),l=e.querySelector("[data-apos-form-thank-you]");apos.util.removeClass(u,"apos-form-visible"),apos.util.addClass(c,"apos-form-visible");const f=Array.prototype.slice.call(e.querySelectorAll(".apos-form-input-error")),p=Array.prototype.slice.call(e.querySelectorAll("[data-apos-input-message].apos-form-error"));f.forEach(function(e){apos.util.removeClass(e,"apos-form-input-error")}),p.forEach(function(e){apos.util.removeClass(e,"apos-form-error"),e.hidden=!0}),t.hasAttribute("data-apos-form-params")&&function(e){e.queryParams=apos.http.parseQuery(window.location.search)}(a);let h=null;s.append("data",JSON.stringify(a));try{await apos.http.post("/api/v1/@apostrophecms/form/submit",{body:s})}catch(e){h=e.body?.data?.formErrors}t.removeAttribute("data-apos-form-busy"),apos.util.removeClass(c,"apos-form-visible"),h?d(h,e):(apos.util.emit(document.body,"@apostrophecms/form:submission-form",{form:t,formError:null}),apos.util.addClass(l,"apos-form-visible"),apos.util.addClass(t,"apos-form-hidden"))});const n=g(e);async function r(e,t,n){let r=0;for(const o of t.files)n.append(`${e}-${r}`,o),r++}t.hasAttribute("data-apos-form-params")&&function(){const e=t.getAttribute("data-apos-form-params").split(","),n=apos.http.parseQuery(window.location.search);e.forEach(function(e){const r=t.querySelector('[name="'+e+'"]');n[e]&&(r&&"checkbox"===r.type?n[e].split(",").forEach(function(n){const r=t.querySelector('[name="'+e+'"][value="'+n+'"]');r&&(r.checked=!0)}):r&&"radio"===r.type?t.querySelector('[name="'+e+'"][value="'+n[e]+'"]').checked=!0:r&&"select"===r.type?r.querySelector('option[value="'+n[e]+'"')&&(r.value=n[e]):r&&(r.value=n[e]))})}()}}};(Object.getOwnPropertyDescriptor(m,"name")||{}).writable||Object.defineProperty(m,"name",{value:"default",configurable:!0});const y=()=>{apos.aposForm.collectors["@apostrophecms/form-text-field"]={selector:"[data-apos-form-text]",collector(e){const t=e.querySelector("input");return{field:t.getAttribute("name"),value:t.value}}}};(Object.getOwnPropertyDescriptor(y,"name")||{}).writable||Object.defineProperty(y,"name",{value:"default",configurable:!0});const b=()=>{apos.aposForm.collectors["@apostrophecms/form-textarea-field"]={selector:"[data-apos-form-textarea]",collector(e){const t=e.querySelector("textarea");return{field:t.getAttribute("name"),value:t.value}}}};(Object.getOwnPropertyDescriptor(b,"name")||{}).writable||Object.defineProperty(b,"name",{value:"default",configurable:!0});const w="@apostrophecms/form-select-field",x="[data-apos-form-select]",_=()=>{apos.util.widgetPlayers[w]={selector:x,player(e){const t=apos.util.closest(e,"[data-apos-form-form]");if(!t)return;const n=e.querySelector("select"),r=n.getAttribute("name"),o=t.querySelectorAll('[data-apos-form-condition="'+r+'"]');if(o.length>0){const e=apos.aposForm.checkConditional;e(o,n),n.addEventListener("change",function(){e(o,n)})}}},apos.aposForm.collectors[w]={selector:x,collector(e){const t=e.querySelector("select");return{field:t.getAttribute("name"),value:t.value}}}};(Object.getOwnPropertyDescriptor(_,"name")||{}).writable||Object.defineProperty(_,"name",{value:"default",configurable:!0});const k="@apostrophecms/form-radio-field",C="[data-apos-form-radio]",A=()=>{apos.util.widgetPlayers[k]={selector:C,player(e){const t=apos.util.closest(e,"[data-apos-form-form]"),n=e.querySelectorAll('input[type="radio"]');if(!t||0===n.length)return;const r=n[0].getAttribute("name"),o=t.querySelectorAll('[data-apos-form-condition="'+r+'"]');
2if(o.length>0){const t=e.querySelector('input[type="radio"]:checked'),r=apos.aposForm.checkConditional;r(o,t),Array.prototype.forEach.call(n,function(e){e.addEventListener("change",function(e){r(o,e.target)})})}}},apos.aposForm.collectors[k]={selector:C,collector(e){const t=e.querySelectorAll('input[type="radio"]'),n=e.querySelector('input[type="radio"]:checked');return{field:t[0].getAttribute("name"),value:n?n.value:void 0}}}};(Object.getOwnPropertyDescriptor(A,"name")||{}).writable||Object.defineProperty(A,"name",{value:"default",configurable:!0});const S=()=>{const e=({units:e,size:t})=>t<1e3?`${t} ${e.B}`:t<1e6?`${(t/1e3).toFixed(2)} ${e.KB}`:t<1e9?`${(t/1e6).toFixed(2)} ${e.MB}`:`${(t/1e9).toFixed(2)} ${e.GB}`;apos.aposForm.collectors["@apostrophecms/form-file-field"]={selector:"[data-apos-form-file]",collector(t){const n=t.querySelector('input[type="file"]');return(t=>{if(!t.dataset.maxSize)return;const{files:n}=t,r=Array.from(n||[]).reduce((e,{size:t})=>e+t,0),o=JSON.parse(t.dataset.fileSizeUnits||"{}"),i=t.dataset.maxSize,a=(t.dataset.maxSizeError||"").replace("%2$s",e({size:i,units:o}));if(i&&r>i){const n=new Error(a.replace("%1$s",e({size:r,units:o})));throw n.field=t.getAttribute("name"),n}})(n),{field:n.getAttribute("name"),value:"pending",files:n.files}}}};(Object.getOwnPropertyDescriptor(S,"name")||{}).writable||Object.defineProperty(S,"name",{value:"default",configurable:!0});const j="@apostrophecms/form-checkboxes-field",E="[data-apos-form-checkboxes]",T=()=>{apos.util.widgetPlayers[j]={selector:E,player(e){const t=apos.util.closest(e,"[data-apos-form-form]");if(!t)return;const n=e.querySelectorAll('input[type="checkbox"]'),r=n[0].getAttribute("name"),o=t.querySelectorAll('[data-apos-form-condition="'+r+'"]');if(o.length>0){const e=apos.aposForm.checkConditional;Array.prototype.forEach.call(n,function(t){t.addEventListener("change",function(t){e(o,t.target)})})}const i=e.querySelector("[data-apos-form-toggle]");i&&(i.onclick=function(t){t.stopPropagation(),t.preventDefault();const n="is-active";e.classList.contains(n)?e.classList.remove(n):e.classList.add(n)})}},apos.aposForm.collectors[j]={selector:E,collector(e){const t=e.querySelectorAll('input[type="checkbox"]:checked'),n=Array.prototype.slice.call(t);return 0===n.length?{field:e.querySelector('input[type="checkbox"]').getAttribute("name"),value:void 0}:{field:t[0].getAttribute("name"),value:n.map(e=>e.value)}}}};(Object.getOwnPropertyDescriptor(T,"name")||{}).writable||Object.defineProperty(T,"name",{value:"default",configurable:!0});const P="@apostrophecms/form-boolean-field",O="[data-apos-form-boolean]",D=()=>{apos.util.widgetPlayers[P]={selector:O,player(e){const t=apos.util.closest(e,"[data-apos-form-form]");if(!t)return;const n=e.querySelector('input[type="checkbox"]'),r=n.getAttribute("name"),o=t.querySelectorAll('[data-apos-form-condition="'+r+'"]');if(o.length>0){const e=apos.aposForm.checkConditional;n.checked&&e(o,n),n.addEventListener("change",function(t){e(o,t.target)})}}},apos.aposForm.collectors[P]={selector:O,collector(e){const t=e.querySelector('input[type="checkbox"]');return{field:t.getAttribute("name"),value:t.checked}}}};(Object.getOwnPropertyDescriptor(D,"name")||{}).writable||Object.defineProperty(D,"name",{value:"default",configurable:!0});const q=()=>{apos.aposForm.checkConditional=function(e,t){e||(e=[]),t&&Array.prototype.slice.call(e).forEach(function(e){const n=e.getAttribute("data-apos-form-condition-value");let r=!0;"checkbox"===t.type&&t.value!==n||("checkbox"!==t.type||t.checked||(r=!1),t.value===n&&r?e.removeAttribute("disabled"):e.setAttribute("disabled",!0))})}};(Object.getOwnPropertyDescriptor(q,"name")||{}).writable||Object.defineProperty(q,"name",{value:"default",configurable:!0});const L=()=>{const e=window.apos;e.s4wCookieBanner={},e.s4wCookieBanner.sendWebViewEvent=function(){},e.util.onReady(()=>{const t=$("[data-cookie-consent]");if(!s().isEmpty($("[data-cookie-consent]"))){const n=JSON.parse($("[data-cookie-banner]").attr("data-cookie-banner")),r=n.webBaseEndpoint,o=$("[data-cookie-banner-layer]"),i=t.find("[data-cookie-banner-content]"),a=t.attr("data-cookie-consent-design"),u=n.names,c=e.modules["@s4w/apos4-cookie-banner"]?.cookieConsentDashboardSettings||{};function l(){const e={},n=t.find("[data-cookie-name]"),r=s().union(s().map(n,function(e){return $(e).attr("data-cookie-name")}),[]);if(s().some(u,function(e){return r.includes(e)})){const n=s().filter(u,function(e){return r.includes(e)});s().each(n,function(n){const r=t.find('[data-cookie-name="'+n+'"]');e[n]=r.prop("checked")})}else s().each(r,function(n){const r=t.find('[data-cookie-name="'+n+'"]'),o=s().filter(u,function(e){return e.startsWith(n)});s().each(o,function(t){e[t]=r.prop("checked")})});return e}
2async function f(n){try{const i={cookies:n},a=await e.http.post(r+"send-cookies",{body:i});o.removeClass("show"),t.removeClass("show"),"ok"===a.status&&a.matomoId&&(a.disableCookies||d(a.matomoId)),"ok"===a.status&&a.gaId&&(a.disableCookies||h(a.gaId)),"ok"===a.status&&a.gtmId&&(a.disableCookies||g(a.gtmId)),"ok"===a.status&&a.enableMouseFlow&&(a.disableCookies||v()),"ok"===a.status&&a.enableYoutube&&(a.disableCookies||m()),"ok"===a.status&&a.enableGoogleMaps&&(a.disableCookies||y()),"ok"===a.status&&a.enableVimeo&&(a.disableCookies||b()),"ok"===a.status&&a.enableSwiss4wardAds&&(a.disableCookies||w()),e.util.emit($("body")[0],"@s4w/cookie-banner:cookies-set",{})}catch(e){console.log(e)}}async function p(t,n){s().isEmpty(c.baseUrl)||s().isEmpty(c.projectId)||(await e.http.post(c.baseUrl+"/api/v1/visitor/add",{body:{projectId:c.projectId,userAgent:window.navigator.userAgent,cookiesConsent:{consent:n,cookies:s().map(Object.keys(t),function(e){return{name:e,consent:t[e]}})}}}),e.util.emit($("body")[0],"@s4w/cookie-banner:send-statistics-event",{}))}function d(t){try{const n=window._paq=window._paq||[];n.push(["trackPageView"]),n.push(["enableLinkTracking"]),function(){const e="https://www.matomo.swiss4ward.com/";n.push(["setTrackerUrl",e+"matomo.php"]),n.push(["setSiteId",t]);const r=document,o=r.createElement("script"),i=r.getElementsByTagName("script")[0];o.type="text/javascript",o.async=!0,o.src=e+"matomo.js",i.parentNode.insertBefore(o,i)}(),e.s4wCookieBanner.sendWebViewEvent(),e.util.emit($("body")[0],"@s4w/cookie-banner:send-web-view-event",{})}catch(e){console.error("Matomo script failed"),console.error(e)}}function h(e){try{t=window,n=document,r="script",o="ga",t.GoogleAnalyticsObject=o,t[o]=t[o]||function(){(t[o].q=t[o].q||[]).push(arguments)}
2,t[o].l=1*new Date,i=n.createElement(r),a=n.getElementsByTagName(r)[0],i.async=1,i.src="https://www.google-analytics.com/analytics.js",a.parentNode.insertBefore(i,a),ga("create",e,"auto"),ga("send","pageview")}catch(e){console.error("GA script failed"),console.error(e)}var t,n,r,o,i,a}function g(e){try{!function(e,t,n,r,o){e[r]=e[r]||[],e[r].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});const i=t.getElementsByTagName(n)[0],a=t.createElement(n);a.async=!0,a.src="https://www.googletagmanager.com/gtm.js?id="+o,i.parentNode.insertBefore(a,i)}(window,document,"script","dataLayer",e)}catch(e){console.error("GTM script failed"),console.error(e)}}function v(){try{window._mfq=window._mfq||[],function(){const e=document.createElement("script");e.type="text/javascript",e.defer=!0,e.src="//cdn.mouseflow.com/projects/73b45cf4-eb65-4d90-8e0e-4964dfaec2fa.js",document.getElementsByTagName("head")[0].appendChild(e)}()}catch(e){console.error("MouseFlow script failed"),console.error(e)}}function m(){try{const t=$(document).find('[data-apos-video-not-gdpr-compliant-widget="youtube"]');t.removeAttr("data-apos-video-not-gdpr-compliant-widget"),t.attr("data-apos-video-widget",""),e.util.runPlayers()}catch(e){console.error("Enabling Youtube videos failed"),console.error(e)}}function y(){try{const t=$(document).find('[data-map-not-gdpr-compliant-widget="google"]');t.removeAttr("data-map-not-gdpr-compliant-widget"),t.attr("data-map-widget",""),e.util.runPlayers()}catch(e){console.error("Enabling Google Maps failed"),console.error(e)}}function b(){try{const t=$(document).find('[data-apos-video-not-gdpr-compliant-widget="vimeo"]');t.removeAttr("data-apos-video-not-gdpr-compliant-widget"),t.attr("data-apos-video-widget",""),e.util.runPlayers()}catch(e){console.error("Enabling Vimeo videos failed"),console.error(e)}}function w(){try{const t=$(document).find("[data-ad-not-gdpr-compliant-widget]");t.removeAttr("data-ad-not-gdpr-compliant-widget"),t.attr("data-ad-widget",""),e.util.runPlayers()}catch(e){console.error("Enabling Swiss4ward Ads failed"),console.error(e)}}t.on("click","[data-accept-all]",function(){const e={};s().each(u,function(t){e[t]=!0}),f(e),p(e,"accept-all")}),t.on("click","[data-reject-all]",function(){const e={};s().each(u,function(t){e[t]=!1}),f(e),p(e,"reject-all")}),t.on("click","[data-accept-selection]",function(){const e=l();f(e),p(e,"custom")}),t.on("click","[data-cookie-settings]",async function(){const n=await e.http.get(r+"get-cookies-settings",{});n.settingsHtml&&(t.removeClass(a),i.html(n.settingsHtml),i.find("[data-cookie-name][indeterminate]").prop("indeterminate",!0))}),t.on("click","[data-all-cookies-table]",async function(){const n=await e.http.get(r+"cookies-table",{});n.cookiesHtml&&(t.removeClass(a),i.html(n.cookiesHtml))}),t.on("click","[data-go-to-banner]",async function(){const n=await e.http.get(r+"banner",{});n.bannerHtml&&(t.removeClass(a),i.html(n.bannerHtml))}),t.on("click","[data-open-consent]",function(){t.find("[data-consent]").removeClass("show");const e=$(this).attr("data-open-consent");t.find('[data-consent="'+e+'"]').addClass("show")}),t.on("click","[data-close-consent]",function(){const e=$(this).attr("data-close-consent");t.find('[data-consent="'+e+'"]').removeClass("show")}),t.on("change","[data-cookie-name]",function(){const e=t.find("[hide-when-preferences-change]"),n=t.find("[show-when-preferences-change]");e.addClass("d-none"),n.removeClass("d-none");const r=$(this).attr("data-cookie-name"),o=$(this).prop("checked"),i=t.find('[data-cookie-name="'+r+'"]');if(i.prop("indeterminate",!1),i.prop("checked",o),t.find('[data-parent-cookie="'+r+'"]').prop("checked",o),this.hasAttribute("data-parent-cookie")){const e=$(this).attr("data-parent-cookie"),n=t.find('[data-parent-cookie="'+e+'"]'),r=n.filter(":checked"),o=t.find('[data-cookie-name="'+e+'"]');n.length===r.length?(o.prop("indeterminate",!1),o.prop("checked",!0)):0===r.length?(o.prop("indeterminate",!1),o.prop("checked",!1)):o.prop("indeterminate",!0)}}),t.on("click","[data-prevent-click]",function(e){e.preventDefault()}),$("body").on("click","[open-cookie-banner-settings]",async function(n){n.preventDefault();
2const s=await e.http.get(r+"get-cookies-settings",{});if(s.settingsHtml){t.removeClass(a),o.addClass("show"),t.addClass("show"),i.html(s.settingsHtml),i.find("[data-cookie-name][indeterminate]").prop("indeterminate",!0);const e=$(this).attr("open-cookie-banner-settings");e&&$(`[data-tab-link=${e}]`)[0].click()}})}})};(Object.getOwnPropertyDescriptor(L,"name")||{}).writable||Object.defineProperty(L,"name",{value:"default",configurable:!0});const N=()=>{$(function(){0!==$("[data-privacy-policy-page]").length&&$("body").on("click","[data-open-cookie-banner]",function(){$("[data-cookie-banner]").addClass("show")})})};(Object.getOwnPropertyDescriptor(N,"name")||{}).writable||Object.defineProperty(N,"name",{value:"default",configurable:!0});const R=()=>{apos.aposForm.collectors["@apostrophecms/form-honeypot-field"]={selector:"[data-apos-form-honeypot]",collector(e){const t=e.querySelector("input");return{field:t.getAttribute("name"),value:t.value}}}};(Object.getOwnPropertyDescriptor(R,"name")||{}).writable||Object.defineProperty(R,"name",{value:"default",configurable:!0});var I=n(692),F=n.n(I);window.jQuery=F(),window.$=F();const M=()=>{};(Object.getOwnPropertyDescriptor(M,"name")||{}).writable||Object.defineProperty(M,"name",{value:"default",configurable:!0});const H=()=>{apos.util.onReady(()=>{apos.s4wAd.$horizontal=$("[data-horizontal-ad-wrapper]"),a.isEmpty(apos.s4wAd.$horizontal)||apos.s4wAd.initHorizontalAds()}),apos.s4wAd.initHorizontalAds=function(){apos.s4wAd.$horizontal.each(e=>{const t=$(apos.s4wAd.$horizontal[e]);t.is("[data-top-horizontal-wrapper]")&&apos.s4wAd.setTopHorizontalAdPosition(t)})},apos.s4wAd.setTopHorizontalAdPosition=function(e){const t=e.height(),n=$("[data-header-content]"),r=n.find("[data-menu-navbar-toggler]"),o=r.css("top"),i=$("[data-main-content]"),s=i.css("margin-top"),u=$(document.body);n.css("top",`${t}px`),r.css("top",`calc(${o} + ${t}px)`),i.css("margin-top",`calc(${s} + ${t}px)`),u.on("@s4w/ad-widget:close",t=>{const o=t.originalEvent.$el;a.isEmpty(o.closest("[data-top-horizontal-wrapper]"))||(n.css("top",""),r.css("top",""),i.css("margin-top",""),e.empty())})}};(Object.getOwnPropertyDescriptor(H,"name")||{}).writable||Object.defineProperty(H,"name",{value:"default",configurable:!0});const W=()=>{window.apos.s4wAd={},H()};(Object.getOwnPropertyDescriptor(W,"name")||{}).writable||Object.defineProperty(W,"name",{value:"default",configurable:!0});const z=()=>{const e=window.apos;e.s4wAnimate={},e.util.onReady(()=>{e.s4wAnimate.initWow()}),e.s4wAnimate.initWow=function(){"undefined"!=typeof WOW&&(new WOW).init()}};(Object.getOwnPropertyDescriptor(z,"name")||{}).writable||Object.defineProperty(z,"name",{value:"default",configurable:!0});const B=()=>{const e=window.apos;e.s4wSlideToSubmit={},e.util.onReady(()=>{e.s4wSlideToSubmit.$scope=$("[data-slide-button]"),e.s4wSlideToSubmit.init()}),e.s4wSlideToSubmit.init=function(){0!==e.s4wSlideToSubmit.$scope.length&&(e.s4wSlideToSubmit.$scope.each(function(){e.s4wSlideToSubmit.initSlider($(this))}),e.s4wSlideToSubmit.listenApostropheFormFail(),e.s4wSlideToSubmit.initDraggable(),e.s4wSlideToSubmit.cancelClickEvent())},e.s4wSlideToSubmit.initSlider=function(t){const n=t.closest("form");n.is("[data-apos-form-form]")?n.append('<div data-apos-form-text class="apos-form-input-wrapper hidden-slided"><span class="apos-form-label-message " data-apos-input-message="slided" hidden=""></span></label><input class="apos-form-input" type="hidden" name="slided"/></div>'):n.append('<input type="hidden" name="slided"/>'),n[0].addEventListener("formFail",function(){e.s4wSlideToSubmit.resetSlider(t)})},e.s4wSlideToSubmit.initDraggable=function(){e.s4wSlideToSubmit.$scope.draggable({cancel:!1,containment:"parent",axis:"x",stop:function(){if($(this).parent().width()/2<$(this).position().left+$(this).width()){$(this).css({left:"auto",right:0}).addClass("submitted").text($(this).data("submittingMessage"));const t=$(this).closest("form");if(t.find('[name="slided"]').val(!0),t.is("[data-stb-submit-click]")){t.find('[type="submit"]').click();const n=t.find("[data-slide-button]");e.s4wSlideToSubmit.resetSlider(n)}else t[0].dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0}))}else $(this).css({left:0})}})},e.s4wSlideToSubmit.cancelClickEvent=function(){e.s4wSlideToSubmit.$scope.on("click",function(){return!1})},e.s4wSlideToSubmit.resetSlider=function(e){e.removeClass("submitted").css({left:0}).text(e.data("submitMessage"))},e.s4wSlideToSubmit.listenApostropheFormFail=function(){document.body.addEventListener("@apostrophecms/form:submission-failed",t=>
2{const n=$(t.target).find("[data-slide-button]");n.length>0&&e.s4wSlideToSubmit.resetSlider(n)})}};(Object.getOwnPropertyDescriptor(B,"name")||{}).writable||Object.defineProperty(B,"name",{value:"default",configurable:!0});const U=()=>{const e=window.apos;e.s4wDocVersion={},e.s4wDocVersion.preview=async function({_id:t}){const{schema:n,updatedAt:r,user:o}=await e.http.get("/api/v1/@s4w/doc-version/basic-data",{busy:!0,qs:{versionId:t}});return e.modal.execute("AposDocVersionPreview",{docId:t,docVersionSchema:n,lastUpdate:r,author:o})},e.s4wDocVersion.restore=async function({_id:t}){const{doc:n,moduleName:r}=await e.http.get("/api/v1/@s4w/doc-version/basic-data",{busy:!0,qs:{versionId:t}});return e.modal.execute("AposDocVersionRestore",{moduleName:r,versionId:t,docId:n._id})}};(Object.getOwnPropertyDescriptor(U,"name")||{}).writable||Object.defineProperty(U,"name",{value:"default",configurable:!0});const V=()=>{apos.util.widgetPlayers.link={selector:"[data-link-widget]",player:async function(e){const t=$(e),n=JSON.parse(e.dataset.linkWidgetData);t.on("click","[data-link]",async()=>{n.activeStatistics&&await apos.http.get("/modules/@s4w/link-widget/track-click",{qs:{eventName:n.matomoEventName}})})}}};(Object.getOwnPropertyDescriptor(V,"name")||{}).writable||Object.defineProperty(V,"name",{value:"default",configurable:!0});const X=()=>{apos.util.widgetPlayers.slick={selector:"[data-slick-widget]",player:function(e){$(e).find("[data-carousel]").on("init",function(t,n){$(e).find("[data-carousel]").attr("data-carousel","true")});const t=JSON.parse(e.dataset.slickWidget);$(e).find('[data-carousel="false"]').slick(t.slickConfiguration)}}};(Object.getOwnPropertyDescriptor(X,"name")||{}).writable||Object.defineProperty(X,"name",{value:"default",configurable:!0});const G=()=>{apos.util.widgetPlayers.s4wVideo={selector:"[data-video-widget]",player:async function(e){const t=JSON.parse(e.dataset.videoWidgetData),n=$(e).find("[data-paella-player-wrapper]"),r=$(e).find("video"),o=JSON.parse($(e).attr("structured-data")),i=$(e).attr("id");if(s().isEmpty(n)||await apos.s4wPaellaPlayer.init(n.attr("id"),t.activeStatistics,t.matomoEventName),"html"===t?.player&&t?.htmlVideoPreventDownload&&r.on("contextmenu",e=>e.preventDefault()),!s().isEmpty(o)){const e={"@context":"https://schema.org/","@type":"VideoObject",name:o.name,description:o.description,thumbnailUrl:[o.attachmentSrc],uploadDate:o.uploadDate,contentUrl:o.videoUrl},t=$("head").find(`[data-video='${i}'`);s().isEmpty(t)||t.remove(),$("head").append(`<script type="application/ld+json" data-video="${i}">${JSON.stringify(e)}<\/script>`)}$(e).on("click","[data-video-widget-modal-trigger]",t=>{t.preventDefault();const n=$(e).find("[data-video-widget-modal]");s().isEmpty(n)||(new bootstrap.Modal(n[0])?.show(),n.on("hidden.bs.modal",()=>{$(e).find("video").trigger("pause")}))}),r.on("play",async()=>{if(t.activeStatistics){const e=Math.floor(r[0]?.currentTime||0);await apos.http.get("/modules/@s4w/video-widget/track-play",{qs:{eventName:t.matomoEventName,second:e}})}}),r.on("pause",async()=>{if(t.activeStatistics&&!r[0]?.ended){const e=Math.floor(r[0]?.currentTime||0);await apos.http.get("/modules/@s4w/video-widget/track-stop",{qs:{eventName:t.matomoEventName,second:e}})}}),r.on("ended",async()=>{if(t.activeStatistics){const e=Math.floor(r[0]?.currentTime||0);await apos.http.get("/modules/@s4w/video-widget/track-end",{qs:{eventName:t.matomoEventName,second:e}})}})}}};(Object.getOwnPropertyDescriptor(G,"name")||{}).writable||Object.defineProperty(G,"name",{value:"default",configurable:!0});const J=()=>{apos.util.widgetPlayers.map={selector:"[data-map-widget]",player:function(e){$(e).find("[data-map-widget-overlay]").addClass("hide"),$(e).find("[data-google-map]").addClass("show")}}};(Object.getOwnPropertyDescriptor(J,"name")||{}).writable||Object.defineProperty(J,"name",{value:"default",configurable:!0});const Q=()=>{apos.util.widgetPlayers.ad={selector:"[data-ad-widget]",player:async function(e){const t=$(e),n=JSON.parse(e.dataset.adWidgetData),r=t.find("[data-info-icon]"),o=t.find("[data-ad-content-wrapper]"),i=t.find("[data-gdpr-banner-wrapper]");o.removeClass("d-none"),i.addClass("d-none"),[...r].map(e=>new bootstrap.Tooltip(e,{sanitize:!1})),t.on("click","[data-close-icon]",async()=>{t.empty(),apos.util.emit(document.body,"@s4w/ad-widget:close",{$el:t}),n.activeStatistics&&await apos.http.get("/modules/@s4w/ad/track-dismiss",{qs:{adId:n.adId}})}),n.activeStatistics&&await apos.http.get("/modules/@s4w/ad/track-view",{qs:{adId:n.adId}})}}};(Object.getOwnPropertyDescriptor(Q,"name")||{}).writable||Object.defineProperty(Q,"name",{value:"default",configurable:!0});const Y=()=>{};(Object.getOwnPropertyDescriptor(Y,"name")||{}).writable||Object.defineProperty(Y,"name",{value:"default",configurable:!0});const K=()=>{const e=window.apos,t=$("[data-header-content]");e.header={},e.header.$scope=t,e.util.onReady(()=>{e.header.enhanceMenu()}),e.header.enhanceMenu=function(){if(!e.header.$scope.length)return;$("body").on("mouseenter mouseleave",".dropdown",function(){$(this).children(".dropdown-menu").is(":visible")&&$(this).toggleClass("open")}),t.find("[data-bootstrap-menu]").doubleTapToGo(),t.find(".nav-link.dropdown-toggle").on("touchend",function(){const e=$(this).siblings();e.hasClass("show")?e.addClass("hide").removeClass("show"):(t.find(".nav-link.dropdown-toggle").siblings().removeClass("show"),e.removeClass("hide").addClass("show"))});const n=t.find('[nav-links="default"]');n.length&&(n.addClass("sticky"),n.next().addClass("offset-md-3"),n.find(".button-nav-links").length||n.prepend('<div class="button-nav-links"><i class="fas fa-angle-right"></i></div>'),t.find('[nav-links="default"] .button-nav-links').on("click",function(){n.toggleClass("show")})),t.find("[data-tool-menu]").each(function(){const e=$(this),t=e.find("[data-menu-tool-icon]"),n=e.find("[data-menu-tool-description]"),r=e.find("[data-menu-all-tools-info]"),o=e.find("[data-menu-tools-list]"),i=e.find("[data-menu-category]");o.on("mouseleave",function(){r.addClass("show")}),e.find('[data-menu-category="all"]').hasClass("active")?r.addClass("show"):r.removeClass("show"),t.on("mouseenter",function(){const t=`[data-menu-tool-description="${$(this).data("menu-tool-id")}"]`,o=e.find(t);n.removeClass("show"),r.removeClass("show"),o.addClass("show")}),t.on("mouseleave",function(){n.removeClass("show")}),i.on("mouseenter",function(){const e=$(this).data("menu-category");i.removeClass("active"),$(this).addClass("active"),function(e){t.each(function(){const t=$(this),n=t.data("menu-tool-category"),r=Array.isArray(n)?n:String(n||"").split(",").map(e=>
2e.trim()).filter(Boolean);"all"===e||r.includes(e)?t.parent().parent().show():t.parent().parent().hide()})}(e)})});const r=t.find("[data-menu-id]"),o=t.find("[data-menu-description]");r.on("mouseenter",function(){const e=`[data-menu-description="${$(this).data("menu-id")}"]`,n=t.find(e);r.removeClass("active"),o.removeClass("show"),$(this).addClass("active"),n.addClass("show")})}};(Object.getOwnPropertyDescriptor(K,"name")||{}).writable||Object.defineProperty(K,"name",{value:"default",configurable:!0});const Z=()=>{const e=window.apos;e.filter={},e.util.onReady(()=>{e.filter.getActiveFilters=function(e){if(!e||!e.length)return{};const t={};return e.find("[data-name].active").each((e,n)=>{const r=$(n),o=r.data("name"),i=r.data("value");t[o]||(t[o]=[]),t[o].push(i)}),t},e.filter.enableSearch=function(e){if(!e||!e.$page||!e.fetch)return;const t=e.$searchInput||e.$page.find("[data-search-input]");if(e.$searchInput=t,!t||!t.length)return;const n=s().throttle(async()=>{e.$page.find("[data-name]").removeClass("active"),await e.fetch()},1e3);t.on("input",n)},e.filter.enableFilters=function(e){e&&e.$page&&e.fetch&&e.$page.find("[data-name]").on("click",async function(){const t=$(this),n=t.data("name");"all"===t.data("value")?e.$page.find(`[data-name="${n}"]`).removeClass("active"):t.toggleClass("active"),e.$searchInput&&e.$searchInput.length&&e.$searchInput.val(""),await e.fetch()})},e.filter.enablePagination=function(e){e.$page.on("click","[data-pagination-wrapper] a",async function(t){t.preventDefault();const n=$(this),r=new URLSearchParams(n.attr("href").split("?")[1]).get("page");r&&await e.fetch(r)})}})};(Object.getOwnPropertyDescriptor(Z,"name")||{}).writable||Object.defineProperty(Z,"name",{value:"default",configurable:!0});const ee=()=>{const e=window.apos;e.toolPage={},e.util.onReady(()=>{e.toolPage.$page=$("[data-tool-index-page]"),s().isEmpty(e.toolPage.$page)||(e.toolPage.$searchInput=e.toolPage.$page.find("[data-search-input]"),e.toolPage.$category=e.toolPage.$page.find("[data-category]"),e.toolPage.$targetAudience=e.toolPage.$page.find("[data-filter-target-audience]"),e.toolPage.enableSearch(),e.toolPage.enableCategoryFilter(),e.toolPage.enableTargetFilter())}),e.toolPage.enableSearch=function(){e.toolPage.$searchInput.on("click",async()=>{e.toolPage.$category.removeClass("active"),e.toolPage.$category.filter("[data-category='all']").addClass("active"),e.toolPage.$targetAudience.removeClass("active"),e.toolPage.$targetAudience.filter("[data-filter-target-audience='all']").addClass("active");const t=await e.http.get("/modules/tool-page/tools-by-category-and-target",{qs:{category:"",target:""},busy:!0});e.toolPage.$page.find("[data-tools-index-wrapper").empty(),e.toolPage.$page.find("[data-tools-index-wrapper").append(t)}),e.toolPage.$searchInput.on("input",async()=>{const t=e.toolPage.$searchInput.val(),n=await e.http.get("/modules/tool-page/tools-by-search",{qs:{search:t.toLowerCase()},busy:!0});e.toolPage.$page.find("[data-tools-index-wrapper").empty(),e.toolPage.$page.find("[data-tools-index-wrapper").append(n)})},e.toolPage.enableCategoryFilter=function(){e.toolPage.$category.on("click",async t=>{e.toolPage.$searchInput.val(""),e.toolPage.$category.removeClass("active"),$(t.target).addClass("active");const n=$(t.target).attr("data-category"),r=e.toolPage.$targetAudience.filter(".active").attr("data-filter-target-audience"),o=await e.http.get("/modules/tool-page/tools-by-category-and-target",{qs:{category:n,target:r},busy:!0});e.toolPage.$page.find("[data-tools-index-wrapper").empty(),e.toolPage.$page.find("[data-tools-index-wrapper").append(o)})},e.toolPage.enableTargetFilter=function(){e.toolPage.$targetAudience.on("click",async t=>{e.toolPage.$searchInput.val(""),e.toolPage.$targetAudience.removeClass("active"),$(t.target).addClass("active");const n=$(t.target).attr("data-filter-target-audience"),r=e.toolPage.$category.filter(".active").attr("data-category"),o=await e.http.get("/modules/tool-page/tools-by-category-and-target",{qs:{category:r,target:n},busy:!0});e.toolPage.$page.find("[data-tools-index-wrapper").empty(),e.toolPage.$page.find("[data-tools-index-wrapper").append(o)})}};(Object.getOwnPropertyDescriptor(ee,"name")||{}).writable||Object.defineProperty(ee,"name",{value:"default",configurable:!0});const te=()=>{const e=window.apos;e.screeningPage={};const t=e.screeningPage;e.util.onReady(()=>{e.screeningPage.$page=$("[data-screening-page]"),s().isEmpty(e.screeningPage.$page)||(e.screeningPage.$searchInput=e.screeningPage.$page.find("[data-search-input]"),e.filter.enableSearch(e.screeningPage),e.filter.enableFilters(e.screeningPage))}),e.screeningPage.fetch=async function(){const n=e.filter.getActiveFilters(t.$page),r=t.$searchInput.val().toLowerCase(),o=await e.http.get("/modules/screening-page/search",{qs:{...n,search:r},busy:!0});t.$page.find("[data-list-wrapper]").empty(),t.$page.find("[data-list-wrapper]").append(o)}};(Object.getOwnPropertyDescriptor(te,"name")||{}).writable||Object.defineProperty(te,"name",{value:"default",configurable:!0});const ne=()=>{const e=window.apos;e.checklistPage={};const t=e.checklistPage;e.util.onReady(()=>{e.checklistPage.$page=$("[data-checklist-index-page]"),s().isEmpty(e.checklistPage.$page)||(e.checklistPage.$searchInput=e.checklistPage.$page.find("[data-search-input]"),e.filter.enableSearch(e.checklistPage),e.filter.enableFilters(e.checklistPage))}),e.checklistPage.fetch=async function(){const n=e.filter.getActiveFilters(t.$page),r=t.$searchInput.val().toLowerCase(),o=await e.http.get("/modules/checklist-page/search",{qs:{...n,search:r},busy:!0});t.$page.find("[data-checklists-index-wrapper]").empty(),t.$page.find("[data-checklists-index-wrapper]").append(o)}};(Object.getOwnPropertyDescriptor(ne,"name")||{}).writable||Object.defineProperty(ne,"name",{value:"default",configurable:!0});const re=()=>{const e=window.apos;e.solutionPage={};const t=e.solutionPage;e.util.onReady(()=>{e.solutionPage.$page=$("[data-solution-index-page]"),s().isEmpty(e.solutionPage.$page)||(e.solutionPage.$searchInput=e.solutionPage.$page.find("[data-search-input]"),e.filter.enableSearch(e.solutionPage),e.filter.enableFilters(e.solutionPage),e.filter.enablePagination(e.solutionPage))}),e.solutionPage.fetch=async function(n){const r=e.filter.getActiveFilters(t.$page),o=t.$searchInput.val().toLowerCase();n??=1;const i=await e.http.get("/modules/solution-page/search",{qs:{...r,page:n,pageUrl:window.location.href,search:o},busy:!0});t.$page.find("[data-solutions-index-wrapper]").empty(),t.$page.find("[data-solutions-index-wrapper]").append(i)}};(Object.getOwnPropertyDescriptor(re,"name")||{}).writable||Object.defineProperty(re,"name",{value:"default",configurable:!0});const oe=()=>{apos.util.widgetPlayers.functions={selector:"[data-functions-widget]",player:function(e){$(e).find("[data-block]").hover(function(){const t=$(this).attr("data-block");$(e).find("[data-default-image]").addClass("d-none"),$(e).find("[data-block-image]").addClass("d-none"),$(e).find("[data-block-image='"+t+"']").removeClass("d-none")},function(){$(e).find("[data-block-image]").addClass("d-none"),$(e).find("[data-default-image]").removeClass("d-none")})}}};(Object.getOwnPropertyDescriptor(oe,"name")||{}).writable||Object.defineProperty(oe,"name",{value:"default",configurable:!0});const ie=()=>{apos.util.widgetPlayers.sampleBook={selector:"[data-sample-book-widget]",player:function(e){const t=$(e).find("[data-sheet]").length;function n(){$(e).find("[data-sheet]").each(function(){r($(this),t)})}function r(e,t){const n=e.attr("data-sheet"),r=t-n,o=function(e){return 90/(e-1)}(t);let i;i=e.hasClass("active")?0:e.hasClass("rotated")?Math.round(90+parseInt(n)*o):Math.round(o*parseInt(n)*-1),e.attr("style",`z-index: ${r}; transform: rotate(${i}deg); transition: all 1s ease;`)}n(),$(e).find("[data-sheet]").on("click",function(){$(e).find("[data-sheet]").removeClass("active").removeClass("rotated"),n(),$(e).find("[data-button-show-back]").removeClass("active"),$(e).find("[data-sample-expand]").removeClass("active"),$(e).find("[data-sheet-expand]").removeClass("active");const o=$(this).attr("data-sheet");$(this).addClass("active"),$(this).find("[data-button-show-back]").addClass("active");for(let n=o;n>=0;n--){const o=$(e).find("[data-sheet="+n+"]");o.addClass("rotated"),r(o,t)}$(e).find("[data-sample-expand]").addClass("active"),$(e).find('[data-sheet-expand="'+o+'"]').addClass("active")}),$(e).find("[data-button-show-back]").on("click",function(){const t=$(this).closest("[data-sheet]").attr("data-sheet");$(e).find("[data-sheet='"+t+"']").find("[data-body-sheet]").toggleClass("is-flipped"),$(e).find("[data-sheet-expand='"+t+"']").toggleClass("is-flipped")}),$(e).find("[data-sheet-expand]").on("click",function(){const t=$(this).attr("data-sheet-expand"),n=$(this).hasClass("is-flipped"),r=$(e).find("[data-sheet='"+t+"']");let o;o=n?r.find("[data-back]").find("img").attr("src"):r.find("[data-front]").find("img").attr("src"),$(e).find("[data-popup]").find("[data-image]").attr("src",o),$(e).find("[data-popup-overlay]").addClass("active"),$(e).find("[data-popup]").addClass("active")}),$(e).find("[data-close-popup]").on("click",function(){$(e).find("[data-popup-overlay]").removeClass("active"),$(e).find("[data-popup]").removeClass("active")})}}};(Object.getOwnPropertyDescriptor(ie,"name")||{}).writable||Object.defineProperty(ie,"name",{value:"default",configurable:!0}),function(){window.apos=window.apos||{};var e=document.body&&document.body.getAttribute("data-apos");if(Object.assign(window.apos,JSON.parse(e||"{}")),e&&document.body.removeAttribute("data-apos"),window.apos.modules)for(const e of Object.values(window.apos.modules))e.alias&&(window.apos[e.alias]=e)}(),r(),o(),i(),c(),l(),f(),p(),m(),y(),b(),_(),A(),S(),T(),D(),q(),L(),N(),R(),W(),z(),B(),U(),V(),X(),G(),J(),Q(),K(),Z(),ee(),te(),ne(),re(),oe(),ie()})()})();
3//# sourceMappingURL=src-build.js.map
4
5/*!
6  * Bootstrap v5.3.3 (https://getbootstrap.com/)
7  * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
8  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9  */
10!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t=new Map,e={set(e,i,n){t.has(e)||t.set(e,new Map);const s=t.get(e);s.has(i)||0===s.size?s.set(i,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(e,i)=>t.has(e)&&t.get(e).get(i)||null,remove(e,i){if(!t.has(e))return;const n=t.get(e);n.delete(i),0===n.size&&t.delete(e)}},i="transitionend",n=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),s=t=>{t.dispatchEvent(new Event(i))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(n(t)):null,a=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,m=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of f)t()}
vendor: 8,259 bytes, line 10
10)),f.push(e)):e()},g=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,_=(t,e,n=!0)=>{if(!n)return void g(t);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),g(t))};e.addEventListener(i,a),setTimeout((()=>{r||s(e)}),o)},b=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},v=/[^.]*(?=\..*)\.|.*/,y=/\..*/,w=/::\d+$/,A={};let E=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},C=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function x(t){const e=O(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function k(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function L(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=I(t);return C.has(o)||(o=t),[n,s,o]}function S(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=L(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=x(t),c=l[a]||(l[a]={}),h=k(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,e.replace(v,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return P(s,{delegateTarget:r}),n.oneOff&&N.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return P(n,{delegateTarget:t}),i.oneOff&&N.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function D(t,e,i,n,s){const o=k(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function $(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&D(t,e,i,r.callable,r.delegationSelector)}function I(t){return t=t.replace(y,""),T[t]||t}const N={on(t,e,i,n){S(t,e,i,n,!1)},one(t,e,i,n){S(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=L(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))$(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(w,"");a&&!e.includes(s)||D(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;D(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=u();let s=null,o=!0,r=!0,a=!1;e!==I(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=P(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function P(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function j(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function M(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const F={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${M(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${M(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=j(t.dataset[n])}return e},getDataAttribute:(t,e)=>j(t.getAttribute(`data-bs-${M(e)}`))};class H{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=o(e)?F.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...o(e)?F.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,s]of Object.entries(e)){const e=t[n],r=o(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}var i}}class W extends H{constructor(t,i){super(),(t=r(t))&&(this._element=t,this._config=this._getConfig(i),e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),N.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){_(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return e.get(r(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const B=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map((t=>n(t))).join(","):null},z={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!l(t)&&a(t)))},getSelectorFromElement(t){const e=B(t);return e&&z.findOne(e)?e:null},getElementFromSelector(t){const e=B(t);return e?z.findOne(e):null},getMultipleElementsFromSelector(t){const e=B(t);return e?z.find(e):[]}},R=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;N.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),l(this))return;const s=z.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},q=".bs.alert",V=`close${q}`,K=`closed${q}`;class Q extends W{static get NAME(){return"alert"}close(){if(N.trigger(this._element,V).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),N.trigger(this._element,K),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
10amed "${t}"`);e[t](this)}}))}}R(Q,"close"),m(Q);const X='[data-bs-toggle="button"]';class Y extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Y.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}N.on(document,"click.bs.button.data-api",X,(t=>{t.preventDefault();const e=t.target.closest(X);Y.getOrCreateInstance(e).toggle()})),m(Y);const U=".bs.swipe",G=`touchstart${U}`,J=`touchmove${U}`,Z=`touchend${U}`,tt=`pointerdown${U}`,et=`pointerup${U}`,it={endCallback:null,leftCallback:null,rightCallback:null},nt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class st extends H{constructor(t,e){super(),this._element=t,t&&st.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return it}static get DefaultType(){return nt}static get NAME(){return"swipe"}dispose(){N.off(this._element,U)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),g(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&g(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(N.on(this._element,tt,(t=>this._start(t))),N.on(this._element,et,(t=>this._end(t))),this._element.classList.add("pointer-event")):(N.on(this._element,G,(t=>this._start(t))),N.on(this._element,J,(t=>this._move(t))),N.on(this._element,Z,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ot=".bs.carousel",rt=".data-api",at="next",lt="prev",ct="left",ht="right",dt=`slide${ot}`,ut=`slid${ot}`,ft=`keydown${ot}`,pt=`mouseenter${ot}`,mt=`mouseleave${ot}`,gt=`dragstart${ot}`,_t=`load${ot}${rt}`,bt=`click${ot}${rt}`,vt="carousel",yt="active",wt=".active",At=".carousel-item",Et=wt+At,Tt={ArrowLeft:ht,ArrowRight:ct},Ct={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Ot={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class xt extends W{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=z.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===vt&&this.cycle()}static get Default(){return Ct}static get DefaultType(){return Ot}static get NAME(){return"carousel"}next(){this._slide(at)}nextWhenVisible(){!document.hidden&&a(this._element)&&this.next()}prev(){this._slide(lt)}pause(){this._isSliding&&s(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?N.one(this._element,ut,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void N.one(this._element,ut,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?at:lt;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&N.on(this._element,ft,(t=>this._keydown(t))),"hover"===this._config.pause&&(N.on(this._element,pt,(()=>this.pause())),N.on(this._element,mt,(()=>this._maybeEnableCycle()))),this._config.touch&&st.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of z.find(".carousel-item img",this._element))N.on(t,gt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(ct)),rightCallback:()=>this._slide(this._directionToOrder(ht)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new st(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Tt[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=z.findOne(wt,this._indicatorsElement);e.classList.remove(yt),e.removeAttribute("aria-current");const i=z.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(yt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===at,s=e||b(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>N.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(dt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),d(s),i.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(yt),i.classList.remove(yt,c,l),this._isSliding=!1,r(ut)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return z.findOne(Et,this._element)}_getItems(){return z.find(At,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return p()?t===ct?lt:at:t===ct?at:lt}_orderToDirection(t){return p()?t===lt?ct:ht:t===lt?ht:ct}static jQueryInterface(t){return this.each((function(){const e=xt.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
10amed "${t}"`);e[t]()}}else e.to(t)}))}}N.on(document,bt,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=z.getElementFromSelector(this);if(!e||!e.classList.contains(vt))return;t.preventDefault();const i=xt.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===F.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),N.on(window,_t,(()=>{const t=z.find('[data-bs-ride="carousel"]');for(const e of t)xt.getOrCreateInstance(e)})),m(xt);const kt=".bs.collapse",Lt=`show${kt}`,St=`shown${kt}`,Dt=`hide${kt}`,$t=`hidden${kt}`,It=`click${kt}.data-api`,Nt="show",Pt="collapse",jt="collapsing",Mt=`:scope .${Pt} .${Pt}`,Ft='[data-bs-toggle="collapse"]',Ht={parent:null,toggle:!0},Wt={parent:"(null|element)",toggle:"boolean"};class Bt extends W{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=z.find(Ft);for(const t of i){const e=z.getSelectorFromElement(t),i=z.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ht}static get DefaultType(){return Wt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>Bt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(N.trigger(this._element,Lt).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(Pt),this._element.classList.add(jt),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(jt),this._element.classList.add(Pt,Nt),this._element.style[e]="",N.trigger(this._element,St)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(N.trigger(this._element,Dt).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,d(this._element),this._element.classList.add(jt),this._element.classList.remove(Pt,Nt);for(const t of this._triggerArray){const e=z.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(jt),this._element.classList.add(Pt),N.trigger(this._element,$t)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(Nt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=r(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Ft);for(const e of t){const t=z.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=z.find(Mt,this._config.parent);return z.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Bt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}N.on(document,It,Ft,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of z.getMultipleElementsFromSelector(this))Bt.getOrCreateInstance(t,{toggle:!1}).toggle()})),m(Bt);var zt="top",Rt="bottom",qt="right",Vt="left",Kt="auto",Qt=[zt,Rt,qt,Vt],Xt="start",Yt="end",Ut="clippingParents",Gt="viewport",Jt="popper",Zt="reference",te=Qt.reduce((function(t,e){return t.concat([e+"-"+Xt,e+"-"+Yt])}),[]),ee=[].concat(Qt,[Kt]).reduce((function(t,e){return t.concat([e,e+"-"+Xt,e+"-"+Yt])}),[]),ie="beforeRead",ne="read",se="afterRead",oe="beforeMain",re="main",ae="afterMain",le="beforeWrite",ce="write",he="afterWrite",de=[ie,ne,se,oe,re,ae,le,ce,he];
vendor: 4,718 bytes, line 10
10function ue(t){return t?(t.nodeName||"").toLowerCase():null}function fe(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function pe(t){return t instanceof fe(t).Element||t instanceof Element}function me(t){return t instanceof fe(t).HTMLElement||t instanceof HTMLElement}function ge(t){return"undefined"!=typeof ShadowRoot&&(t instanceof fe(t).ShadowRoot||t instanceof ShadowRoot)}const _e={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];me(s)&&ue(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});me(n)&&ue(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function be(t){return t.split("-")[0]}var ve=Math.max,ye=Math.min,we=Math.round;function Ae(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function Ee(){return!/^((?!chrome|android).)*safari/i.test(Ae())}function Te(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&me(t)&&(s=t.offsetWidth>0&&we(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&we(n.height)/t.offsetHeight||1);var r=(pe(t)?fe(t):window).visualViewport,a=!Ee()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function Ce(t){var e=Te(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Oe(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ge(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function xe(t){return fe(t).getComputedStyle(t)}function ke(t){return["table","td","th"].indexOf(ue(t))>=0}function Le(t){return((pe(t)?t.ownerDocument:t.document)||window.document).documentElement}function Se(t){return"html"===ue(t)?t:t.assignedSlot||t.parentNode||(ge(t)?t.host:null)||Le(t)}function De(t){return me(t)&&"fixed"!==xe(t).position?t.offsetParent:null}function $e(t){for(var e=fe(t),i=De(t);i&&ke(i)&&"static"===xe(i).position;)i=De(i);return i&&("html"===ue(i)||"body"===ue(i)&&"static"===xe(i).position)?e:i||function(t){var e=/firefox/i.test(Ae());if(/Trident/i.test(Ae())&&me(t)&&"fixed"===xe(t).position)return null;var i=Se(t);for(ge(i)&&(i=i.host);me(i)&&["html","body"].indexOf(ue(i))<0;){var n=xe(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Ie(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Ne(t,e,i){return ve(t,ye(e,i))}function Pe(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function je(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const Me={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=be(i.placement),l=Ie(a),c=[Vt,qt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Pe("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:je(t,Qt))}(s.padding,i),d=Ce(o),u="y"===l?zt:Vt,f="y"===l?Rt:qt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=$e(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=Ne(v,w,y),E=l;i.modifiersData[n]=((e={})[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Oe(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Fe(t){return t.split("-")[1]}
vendor: 4,497 bytes, line 10
10var He={top:"auto",right:"auto",bottom:"auto",left:"auto"};function We(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,m=void 0===p?0:p,g="function"==typeof h?h({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Vt,y=zt,w=window;if(c){var A=$e(i),E="clientHeight",T="clientWidth";A===fe(i)&&"static"!==xe(A=Le(i)).position&&"absolute"===a&&(E="scrollHeight",T="scrollWidth"),(s===zt||(s===Vt||s===qt)&&o===Yt)&&(y=Rt,m-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,m*=l?1:-1),s!==Vt&&(s!==zt&&s!==Rt||o!==Yt)||(v=qt,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[T])-n.width,f*=l?1:-1)}var C,O=Object.assign({position:a},c&&He),x=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:we(i*s)/s||0,y:we(n*s)/s||0}}({x:f,y:m},fe(i)):{x:f,y:m};return f=x.x,m=x.y,l?Object.assign({},O,((C={})[y]=b?"0":"",C[v]=_?"0":"",C.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",C)):Object.assign({},O,((e={})[y]=b?m+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const Be={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:be(e.placement),variation:Fe(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,We(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,We(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var ze={passive:!0};const Re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=fe(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,ze)})),a&&l.addEventListener("resize",i.update,ze),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,ze)})),a&&l.removeEventListener("resize",i.update,ze)}},data:{}};var qe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ve(t){return t.replace(/left|right|bottom|top/g,(function(t){return qe[t]}))}var Ke={start:"end",end:"start"};function Qe(t){return t.replace(/start|end/g,(function(t){return Ke[t]}))}function Xe(t){var e=fe(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ye(t){return Te(Le(t)).left+Xe(t).scrollLeft}function Ue(t){var e=xe(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Ge(t){return["html","body","#document"].indexOf(ue(t))>=0?t.ownerDocument.body:me(t)&&Ue(t)?t:Ge(Se(t))}function Je(t,e){var i;void 0===e&&(e=[]);var n=Ge(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=fe(n),r=s?[o].concat(o.visualViewport||[],Ue(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Je(Se(r)))}function Ze(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function ti(t,e,i){return e===Gt?Ze(function(t,e){var i=fe(t),n=Le(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Ee();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Ye(t),y:l}}(t,i)):pe(e)?function(t,e){var i=Te(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Ze(function(t){var e,i=Le(t),n=Xe(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=ve(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=ve(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Ye(t),l=-n.scrollTop;return"rtl"===xe(s||i).direction&&(a+=ve(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(Le(t)))}function ei(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?be
vendor: 4,529 bytes, line 10
10(s):null,r=s?Fe(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case zt:e={x:a,y:i.y-n.height};break;case Rt:e={x:a,y:i.y+i.height};break;case qt:e={x:i.x+i.width,y:l};break;case Vt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?Ie(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case Xt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case Yt:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function ii(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Ut:a,c=i.rootBoundary,h=void 0===c?Gt:c,d=i.elementContext,u=void 0===d?Jt:d,f=i.altBoundary,p=void 0!==f&&f,m=i.padding,g=void 0===m?0:m,_=Pe("number"!=typeof g?g:je(g,Qt)),b=u===Jt?Zt:Jt,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=Je(Se(t)),i=["absolute","fixed"].indexOf(xe(t).position)>=0&&me(t)?$e(t):t;return pe(i)?e.filter((function(t){return pe(t)&&Oe(t,i)&&"body"!==ue(t)})):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=ti(t,i,n);return e.top=ve(s.top,e.top),e.right=ye(s.right,e.right),e.bottom=ye(s.bottom,e.bottom),e.left=ve(s.left,e.left),e}),ti(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(pe(y)?y:y.contextElement||Le(t.elements.popper),l,h,r),A=Te(t.elements.reference),E=ei({reference:A,element:v,strategy:"absolute",placement:s}),T=Ze(Object.assign({},v,E)),C=u===Jt?T:A,O={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},x=t.modifiersData.offset;if(u===Jt&&x){var k=x[s];Object.keys(O).forEach((function(t){var e=[qt,Rt].indexOf(t)>=0?1:-1,i=[zt,Rt].indexOf(t)>=0?"y":"x";O[t]+=k[i]*e}))}return O}function ni(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?ee:l,h=Fe(n),d=h?a?te:te.filter((function(t){return Fe(t)===h})):Qt,u=d.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=d);var f=u.reduce((function(e,i){return e[i]=ii(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[be(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}const si={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=be(g),b=l||(_!==g&&p?function(t){if(be(t)===Kt)return[];var e=Ve(t);return[Qe(t),e,Qe(e)]}(g):[Ve(g)]),v=[g].concat(b).reduce((function(t,i){return t.concat(be(i)===Kt?ni(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)}),[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,T=v[0],C=0;C<v.length;C++){var O=v[C],x=be(O),k=Fe(O)===Xt,L=[zt,Rt].indexOf(x)>=0,S=L?"width":"height",D=ii(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),$=L?k?qt:Vt:k?Rt:zt;y[S]>w[S]&&($=Ve($));var I=Ve($),N=[];if(o&&N.push(D[x]<=0),a&&N.push(D[$]<=0,D[I]<=0),N.every((function(t){return t}))){T=O,E=!1;break}A.set(O,N)}if(E)for(var P=function(t){var e=v.find((function(e){var i=A.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},j=p?3:1;j>0&&"break"!==P(j);j--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function oi(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ri(t){return[zt,qt,Rt,Vt].some((function(e){return t[e]>=0}))}const ai={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=ii(e,{elementContext:"reference"}),a=ii(e,{altBoundary:!0}),l=oi(r,n),c=oi(a,s,o),h=ri(l),d=ri(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},li={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=ee.reduce((function(t,i){return t[i]=function(t,e,
vendor: 4,389 bytes, line 10
10i){var n=be(t),s=[Vt,zt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Vt,qt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},ci={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=ei({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},hi={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=ii(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=be(e.placement),b=Fe(e.placement),v=!b,y=Ie(_),w="x"===y?"y":"x",A=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,C="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,O="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var L,S="y"===y?zt:Vt,D="y"===y?Rt:qt,$="y"===y?"height":"width",I=A[y],N=I+g[S],P=I-g[D],j=f?-T[$]/2:0,M=b===Xt?E[$]:T[$],F=b===Xt?-T[$]:-E[$],H=e.elements.arrow,W=f&&H?Ce(H):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=B[S],R=B[D],q=Ne(0,E[$],W[$]),V=v?E[$]/2-j-q-z-O.mainAxis:M-q-z-O.mainAxis,K=v?-E[$]/2+j+q+R+O.mainAxis:F+q+R+O.mainAxis,Q=e.elements.arrow&&$e(e.elements.arrow),X=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,U=I+K-Y,G=Ne(f?ye(N,I+V-Y-X):N,I,f?ve(P,U):P);A[y]=G,k[y]=G-I}if(a){var J,Z="x"===y?zt:Vt,tt="x"===y?Rt:qt,et=A[w],it="y"===w?"height":"width",nt=et+g[Z],st=et-g[tt],ot=-1!==[zt,Vt].indexOf(_),rt=null!=(J=null==x?void 0:x[w])?J:0,at=ot?nt:et-E[it]-T[it]-rt+O.altAxis,lt=ot?et+E[it]+T[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=Ne(t,e,i);return n>i?i:n}(at,et,lt):Ne(f?at:nt,et,f?lt:st);A[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}},requiresIfExists:["offset"]};function di(t,e,i){void 0===i&&(i=!1);var n,s,o=me(e),r=me(e)&&function(t){var e=t.getBoundingClientRect(),i=we(e.width)/t.offsetWidth||1,n=we(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=Le(e),l=Te(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==ue(e)||Ue(a))&&(c=(n=e)!==fe(n)&&me(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Xe(n)),me(e)?((h=Te(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Ye(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function ui(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var fi={placement:"bottom",modifiers:[],strategy:"absolute"};function pi(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function mi(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?fi:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},fi,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:pe(t)?Je(t):t.contextElement?Je(t.contextElement):[],popper:Je(e)};var r,c,u=function(t){var e=ui(t);return de.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((r=[].concat(n,a.options.modifiers),c=r.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=u.filter((function(t){return t.enabled}
10)),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}})),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(pi(e,i)){a.rects={reference:di(e,$e(i),"fixed"===a.options.strategy),popper:Ce(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return r||(r=new Promise((function(t){Promise.resolve().then((function(){r=void 0,t(s())}))}))),r}),destroy:function(){d(),c=!0}};if(!pi(t,e))return h;function d(){l.forEach((function(t){return t()})),l=[]}return h.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),h}}var gi=mi(),_i=mi({defaultModifiers:[Re,ci,Be,_e]}),bi=mi({defaultModifiers:[Re,ci,Be,_e,li,si,hi,Me,ai]});const vi=Object.freeze(Object.defineProperty({__proto__:null,afterMain:ae,afterRead:se,afterWrite:he,applyStyles:_e,arrow:Me,auto:Kt,basePlacements:Qt,beforeMain:oe,beforeRead:ie,beforeWrite:le,bottom:Rt,clippingParents:Ut,computeStyles:Be,createPopper:bi,createPopperBase:gi,createPopperLite:_i,detectOverflow:ii,end:Yt,eventListeners:Re,flip:si,hide:ai,left:Vt,main:re,modifierPhases:de,offset:li,placements:ee,popper:Jt,popperGenerator:mi,popperOffsets:ci,preventOverflow:hi,read:ne,reference:Zt,right:qt,start:Xt,top:zt,variationPlacements:te,viewport:Gt,write:ce},Symbol.toStringTag,{value:"Module"})),yi="dropdown",wi=".bs.dropdown",Ai=".data-api",Ei="ArrowUp",Ti="ArrowDown",Ci=`hide${wi}`,Oi=`hidden${wi}`,xi=`show${wi}`,ki=`shown${wi}`,Li=`click${wi}${Ai}`,Si=`keydown${wi}${Ai}`,Di=`keyup${wi}${Ai}`,$i="show",Ii='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Ni=`${Ii}.${$i}`,Pi=".dropdown-menu",ji=p()?"top-end":"top-start",Mi=p()?"top-start":"top-end",Fi=p()?"bottom-end":"bottom-start",Hi=p()?"bottom-start":"bottom-end",Wi=p()?"left-start":"right-start",Bi=p()?"right-start":"left-start",zi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ri={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class qi extends W{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=z.next(this._element,Pi)[0]||z.prev(this._element,Pi)[0]||z.findOne(Pi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return zi}static get DefaultType(){return Ri}static get NAME(){return yi}toggle(){return this._isShown()?this.hide():this.show()}show(){if(l(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!N.trigger(this._element,xi,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".
10navbar-nav"))for(const t of[].concat(...document.body.children))N.on(t,"mouseover",h);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add($i),this._element.classList.add($i),N.trigger(this._element,ki,t)}}hide(){if(l(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!N.trigger(this._element,Ci,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))N.off(t,"mouseover",h);this._popper&&this._popper.destroy(),this._menu.classList.remove($i),this._element.classList.remove($i),this._element.setAttribute("aria-expanded","false"),F.removeDataAttribute(this._menu,"popper"),N.trigger(this._element,Oi,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!o(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${yi.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===vi)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:o(this._config.reference)?t=r(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=bi(t,this._menu,e)}_isShown(){return this._menu.classList.contains($i)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Wi;if(t.classList.contains("dropstart"))return Bi;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Mi:ji:e?Hi:Fi}
vendor: 5,989 bytes, line 10
10_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(F.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...g(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=z.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>a(t)));i.length&&b(i,e,t===Ti,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=z.find(Ni);for(const i of e){const e=qi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Ei,Ti].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Ii)?this:z.prev(this,Ii)[0]||z.next(this,Ii)[0]||z.findOne(Ii,t.delegateTarget.parentNode),o=qi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}N.on(document,Si,Ii,qi.dataApiKeydownHandler),N.on(document,Si,Pi,qi.dataApiKeydownHandler),N.on(document,Li,qi.clearMenus),N.on(document,Di,qi.clearMenus),N.on(document,Li,Ii,(function(t){t.preventDefault(),qi.getOrCreateInstance(this).toggle()})),m(qi);const Vi="backdrop",Ki="show",Qi=`mousedown.bs.${Vi}`,Xi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Yi={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ui extends H{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Xi}static get DefaultType(){return Yi}static get NAME(){return Vi}show(t){if(!this._config.isVisible)return void g(t);this._append();const e=this._getElement();this._config.isAnimated&&d(e),e.classList.add(Ki),this._emulateAnimation((()=>{g(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ki),this._emulateAnimation((()=>{this.dispose(),g(t)}))):g(t)}dispose(){this._isAppended&&(N.off(this._element,Qi),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=r(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),N.on(t,Qi,(()=>{g(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){_(t,this._getElement(),this._config.isAnimated)}}const Gi=".bs.focustrap",Ji=`focusin${Gi}`,Zi=`keydown.tab${Gi}`,tn="backward",en={autofocus:!0,trapElement:null},nn={autofocus:"boolean",trapElement:"element"};class sn extends H{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return en}static get DefaultType(){return nn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),N.off(document,Gi),N.on(document,Ji,(t=>this._handleFocusin(t))),N.on(document,Zi,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,N.off(document,Gi))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=z.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===tn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?tn:"forward")}}const on=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",rn=".sticky-top",an="padding-right",ln="margin-right";class cn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,an,(e=>e+t)),this._setElementAttributes(on,an,(e=>e+t)),this._setElementAttributes(rn,ln,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,an),this._resetElementAttributes(on,an),this._resetElementAttributes(rn,ln)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&F.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=F.getDataAttribute(t,e);null!==i?(F.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}
10_applyManipulationCallback(t,e){if(o(t))e(t);else for(const i of z.find(t,this._element))e(i)}}const hn=".bs.modal",dn=`hide${hn}`,un=`hidePrevented${hn}`,fn=`hidden${hn}`,pn=`show${hn}`,mn=`shown${hn}`,gn=`resize${hn}`,_n=`click.dismiss${hn}`,bn=`mousedown.dismiss${hn}`,vn=`keydown.dismiss${hn}`,yn=`click${hn}.data-api`,wn="modal-open",An="show",En="modal-static",Tn={backdrop:!0,focus:!0,keyboard:!0},Cn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class On extends W{constructor(t,e){super(t,e),this._dialog=z.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new cn,this._addEventListeners()}static get Default(){return Tn}static get DefaultType(){return Cn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||N.trigger(this._element,pn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(wn),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(N.trigger(this._element,dn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(An),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){N.off(window,hn),N.off(this._dialog,hn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ui({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new sn({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=z.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),d(this._element),this._element.classList.add(An),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,N.trigger(this._element,mn,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){N.on(this._element,vn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),N.on(window,gn,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),N.on(this._element,bn,(t=>{N.one(this._element,_n,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(wn),this._resetAdjustments(),this._scrollBar.reset(),N.trigger(this._element,fn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(N.trigger(this._element,un).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(En)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(En),this._queueCallback((()=>{this._element.classList.remove(En),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=p()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=p()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=On.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
10amed "${t}"`);i[t](e)}}))}}N.on(document,yn,'[data-bs-toggle="modal"]',(function(t){const e=z.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),N.one(e,pn,(t=>{t.defaultPrevented||N.one(e,fn,(()=>{a(this)&&this.focus()}))}));const i=z.findOne(".modal.show");i&&On.getInstance(i).hide(),On.getOrCreateInstance(e).toggle(this)})),R(On),m(On);const xn=".bs.offcanvas",kn=".data-api",Ln=`load${xn}${kn}`,Sn="show",Dn="showing",$n="hiding",In=".offcanvas.show",Nn=`show${xn}`,Pn=`shown${xn}`,jn=`hide${xn}`,Mn=`hidePrevented${xn}`,Fn=`hidden${xn}`,Hn=`resize${xn}`,Wn=`click${xn}${kn}`,Bn=`keydown.dismiss${xn}`,zn={backdrop:!0,keyboard:!0,scroll:!1},Rn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class qn extends W{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return zn}static get DefaultType(){return Rn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||N.trigger(this._element,Nn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new cn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Dn),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Sn),this._element.classList.remove(Dn),N.trigger(this._element,Pn,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(N.trigger(this._element,jn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add($n),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Sn,$n),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new cn).reset(),N.trigger(this._element,Fn)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Ui({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():N.trigger(this._element,Mn)}:null})}_initializeFocusTrap(){return new sn({trapElement:this._element})}_addEventListeners(){N.on(this._element,Bn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():N.trigger(this._element,Mn))}))}static jQueryInterface(t){return this.each((function(){const e=qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}N.on(document,Wn,'[data-bs-toggle="offcanvas"]',(function(t){const e=z.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this))return;N.one(e,Fn,(()=>{a(this)&&this.focus()}));const i=z.findOne(In);i&&i!==e&&qn.getInstance(i).hide(),qn.getOrCreateInstance(e).toggle(this)})),N.on(window,Ln,(()=>{for(const t of z.find(In))qn.getOrCreateInstance(t).show()})),N.on(window,Hn,(()=>{for(const t of z.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&qn.getOrCreateInstance(t).hide()})),R(qn),m(qn);const Vn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Kn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Xn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Kn.has(i)||Boolean(Qn.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Yn={allowList:Vn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Un={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Gn={entry:"(string|element|function|null)",selector:"(string|element)"};class Jn extends H{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Yn}static get DefaultType(){return Un}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>
vendor: 10,003 bytes, line 10
10this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Gn)}_setContent(t,e,i){const n=z.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?o(e)?this._putElementInTemplate(r(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Xn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return g(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Zn=new Set(["sanitize","allowList","sanitizeFn"]),ts="fade",es="show",is=".modal",ns="hide.bs.modal",ss="hover",os="focus",rs={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},as={allowList:Vn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ls={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class cs extends W{constructor(t,e){if(void 0===vi)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return as}static get DefaultType(){return ls}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),N.off(this._element.closest(is),ns,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=N.trigger(this._element,this.constructor.eventName("show")),e=(c(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),N.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(es),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))N.on(t,"mouseover",h);this._queueCallback((()=>{N.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!N.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(es),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))N.off(t,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger[os]=!1,this._activeTrigger[ss]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),N.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ts,es),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(ts),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Jn({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ts)}_isShown(){return this.tip&&this.tip.classList.contains(es)}_createPopper(t){const e=g(this._config.placement,[this,t,this._element]),i=rs[e.toUpperCase()];return bi(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return g(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...g(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)N.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===ss?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===ss?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");N.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?os:ss]=!0,e._enter()})),N.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?os:ss]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},N.on(this._element.closest(is),ns,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=F.getDataAttributes(this._element);for(const t of Object.keys(e))Zn.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:r(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=cs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
10amed "${t}"`);e[t]()}}))}}m(cs);const hs={...cs.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},ds={...cs.DefaultType,content:"(null|string|element|function)"};class us extends cs{static get Default(){return hs}static get DefaultType(){return ds}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=us.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}m(us);const fs=".bs.scrollspy",ps=`activate${fs}`,ms=`click${fs}`,gs=`load${fs}.data-api`,_s="active",bs="[href]",vs=".nav-link",ys=`${vs}, .nav-item > ${vs}, .list-group-item`,ws={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},As={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Es extends W{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ws}static get DefaultType(){return As}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=r(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(N.off(this._config.target,ms),N.on(this._config.target,ms,bs,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=z.find(bs,this._config.target);for(const e of t){if(!e.hash||l(e))continue;const t=z.findOne(decodeURI(e.hash),this._element);a(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(_s),this._activateParents(t),N.trigger(this._element,ps,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))z.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(_s);else for(const e of z.parents(t,".nav, .list-group"))for(const t of z.prev(e,ys))t.classList.add(_s)}_clearActiveClass(t){t.classList.remove(_s);const e=z.find(`${bs}.${_s}`,t);for(const t of e)t.classList.remove(_s)}static jQueryInterface(t){return this.each((function(){const e=Es.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
10amed "${t}"`);e[t]()}}))}}N.on(window,gs,(()=>{for(const t of z.find('[data-bs-spy="scroll"]'))Es.getOrCreateInstance(t)})),m(Es);const Ts=".bs.tab",Cs=`hide${Ts}`,Os=`hidden${Ts}`,xs=`show${Ts}`,ks=`shown${Ts}`,Ls=`click${Ts}`,Ss=`keydown${Ts}`,Ds=`load${Ts}`,$s="ArrowLeft",Is="ArrowRight",Ns="ArrowUp",Ps="ArrowDown",js="Home",Ms="End",Fs="active",Hs="fade",Ws="show",Bs=".dropdown-toggle",zs=`:not(${Bs})`,Rs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',qs=`.nav-link${zs}, .list-group-item${zs}, [role="tab"]${zs}, ${Rs}`,Vs=`.${Fs}[data-bs-toggle="tab"], .${Fs}[data-bs-toggle="pill"], .${Fs}[data-bs-toggle="list"]`;class Ks extends W{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),N.on(this._element,Ss,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?N.trigger(e,Cs,{relatedTarget:t}):null;N.trigger(t,xs,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Fs),this._activate(z.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),N.trigger(t,ks,{relatedTarget:e})):t.classList.add(Ws)}),t,t.classList.contains(Hs)))}_deactivate(t,e){t&&(t.classList.remove(Fs),t.blur(),this._deactivate(z.getElementFromSelector(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),N.trigger(t,Os,{relatedTarget:e})):t.classList.remove(Ws)}),t,t.classList.contains(Hs)))}_keydown(t){if(![$s,Is,Ns,Ps,js,Ms].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter((t=>!l(t)));let i;if([js,Ms].includes(t.key))i=e[t.key===js?0:e.length-1];else{const n=[Is,Ps].includes(t.key);i=b(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Ks.getOrCreateInstance(i).show())}_getChildren(){return z.find(qs,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=z.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=z.findOne(t,i);s&&s.classList.toggle(n,e)};n(Bs,Fs),n(".dropdown-menu",Ws),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Fs)}_getInnerElement(t){return t.matches(qs)?t:z.findOne(qs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Ks.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}N.on(document,Ls,Rs,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),l(this)||Ks.getOrCreateInstance(this).show()})),N.on(window,Ds,(()=>{for(const t of z.find(Vs))Ks.getOrCreateInstance(t)})),m(Ks);const Qs=".bs.toast",Xs=`mouseover${Qs}`,Ys=`mouseout${Qs}`,Us=`focusin${Qs}`,Gs=`focusout${Qs}`,Js=`hide${Qs}`,Zs=`hidden${Qs}`,to=`show${Qs}`,eo=`shown${Qs}`,io="hide",no="show",so="showing",oo={animation:"boolean",autohide:"boolean",delay:"number"},ro={animation:!0,autohide:!0,delay:5e3};class ao extends W{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return ro}static get DefaultType(){return oo}static get NAME(){return"toast"}show(){N.trigger(this._element,to).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(io),d(this._element),this._element.classList.add(no,so),this._queueCallback((()=>{this._element.classList.remove(so),N.trigger(this._element,eo),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(N.trigger(this._element,Js).defaultPrevented||(this._element.classList.add(so),this._queueCallback((()=>{this._element.classList.add(io),this._element.classList.remove(so,no),N.trigger(this._element,Zs)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(no),super.dispose()}isShown(){return this._element.classList.contains(no)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){N.on(this._element,Xs,(t=>this._onInteraction(t,!0))),N.on(this._element,Ys,(t=>this._onInteraction(t,!1))),N.on(this._element,Us,(t=>this._onInteraction(t,!0))),N.on(this._element,Gs,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ao.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
10amed "${t}"`);e[t](this)}}))}}return R(ao),m(ao),{Alert:Q,Button:Y,Carousel:xt,Collapse:Bt,Dropdown:qi,Modal:On,Offcanvas:qn,Popover:us,ScrollSpy:Es,Tab:Ks,Toast:ao,Tooltip:cs}}));
11//# sourceMappingURL=bootstrap.bundle.min.js.map
12/**
13 * @popperjs/core v2.11.8 - MIT License
14 */
15
16 
vendor: 20,034 bytes, line 16
16!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={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function x(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:x(b(e))}function w(e,n){var r;void 0===n&&(n=[]);var o=x(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(w(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function I(e,r,o){return r===H?N(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):N(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function _(e,t,o,s){var f="clippingParents"===t?function(e){var t=w(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&C(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=I(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),I(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function F(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?F(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,x=Y("number"!=typeof b?b:G(b,k)),w=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?w:m],E=_(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=N(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+x.top,bottom:B.bottom-E.bottom+x.bottom,left:E.left-B.left+x.left,right:B.right-E.right+x.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?K:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?w(e):e.contextElement?w(e.contextElement):[],popper:w(t)};var s,p,d=function(e){var t=q(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),p=s.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}),{}),Object.keys(p).map((function(e){return p[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!p){var e=f.elements,t=e.reference,n=e.popper;if(Q(t,n)){f.rects={reference:y(t,E(n),"fixed"===f.options.strategy),popper:g(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:u})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),p=!0}};if(!Q(e,t))return u;function l(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var $={passive:!0};var ee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,$)})),f&&c.addEventListener("resize",r.update,$),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,$)})),f&&c.removeEventListener("resize",r.update,$)}},data:{}};var te={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=X({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,p=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,h=e.isFixed,v=f.x,y=void 0===v?0:v,g=f.y,b=void 0===g?0:g,x="function"==typeof l?l({x:y,y:b}):{x:y,y:b};y=x.x,b=x.y;var w=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),j=P,M=D,k=window;if(u){var W=E(r),H="clientHeight",T="clientWidth";if(W===t(r)&&"static"!==m(W=d(r)).position&&"absolute"===c&&(H="scrollHeight",T="scrollWidth"),W=W,i===D||(i===P||i===L)&&a===B)M=A,b-=(h&&W===k&&k.visualViewport?k.visualViewport.height:W[H])-o.height,b*=p?1:-1;if(i===P||(i===D||i===A)&&a===B)j=L,y-=(h&&W===k&&k.visualViewport?k.visualViewport.width:W[T])-o.width,y*=p?1:-1}var R,S=Object.assign({position:c},u&&ne),V=!0===l?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:s(n*o)/o||0,y:s(r*o)/o||0}}({x:y,y:b},t(r)):{x:y,y:b};return y=V.x,b=V.y,p?Object.assign({},S,((R={})[M]=O?"0":"",R[j]=w?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",R)):Object.assign({},S,((n={})[M]=O?b+"px":"",n[j]=w?y+"px":"",n.transform="",n))}var oe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:F(t.placement),variation:U(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ie={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]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&l(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[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 o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&l(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=S.reduce((function(e,n){return e[n]=function(e,t,n){var r=F(e),o=[P,D].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[F(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=F(v),g=f||(y===v||!h?[fe(v)]:function(e){if(F(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(F(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k<b.length;k++){var B=b[k],H=F(B),T=U(B)===W,R=[D,A].indexOf(H)>=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;x[S]>w[S]&&(q=fe(q));var C=fe(q),N=[];if(i&&N.push(V[H]<=0),s&&N.push(V[q]<=0,V[C]<=0),N.every((function(e){return e}))){E=B,j=!1;break}O.set(B,N)}if(j)for(var I=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},_=h?3:1;_>0;_--){if("break"===I(_))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),x=F(t.placement),w=U(t.placement),O=!w,j=z(x),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,C="y"===j?D:P,N="y"===j?A:L,I="y"===j?"height":"width",_=k[j],X=_+b[C],Y=_-b[N],G=m?-H[I]/2:0,K=w===W?B[I]:H[I],Q=w===W?-H[I]:-B[I],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[C],ne=ee[N],re=de(0,B[I],$[I]),oe=O?B[I]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[I]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=_+ie-fe,pe=de(m?a(X,_+oe-fe-se):X,_,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-_}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(x),xe=null!=(ue=null==S?void 0:S[M])?ue:0,we=be?ye:me-B[ve]-H[ve]-xe+R.altAxis,Oe=be?me+B[ve]+H[ve]-xe-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(we,me,Oe):de(m?we:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=F(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,x=p[l],w=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(x,O,w),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&C(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(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 ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),xe=[ee,te,oe,ie,ae,le,he,me,ge],we=Z({defaultModifiers:xe});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=we,e.createPopperLite=be,e.defaultModifiers=xe,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})}));
17 //# sourceMappingURL=popper.min.js.map
18/*!
19 * Bootstrap-select v1.14.0-gamma1 (https://developer.snapappointments.com/bootstrap-select)
20 *
21 * Copyright 2012-2023 SnapAppointments, LLC
22 * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
23 */
24
25(function ($) {
26  'use strict';
27
28  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
29
30  var uriAttrs = [
31    'background',
32    'cite',
33    'href',
34    'itemtype',
35    'longdesc',
36    'poster',
37    'src',
38    'xlink:href'
39  ];
40
41  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
42
43  var DefaultWhitelist = {
44    // Global attributes allowed on any supplied element below.
45    '*': ['class', 'dir', 'id', 'lang', 'role', 'tabindex', 'style', ARIA_ATTRIBUTE_PATTERN],
46    a: ['target', 'href', 'title', 'rel'],
47    area: [],
48    b: [],
49    br: [],
50    col: [],
51    code: [],
52    div: [],
53    em: [],
54    hr: [],
55    h1: [],
56    h2: [],
57    h3: [],
58    h4: [],
59    h5: [],
60    h6: [],
61    i: [],
62    img: ['src', 'alt', 'title', 'width', 'height'],
63    li: [],
64    ol: [],
65    p: [],
66    pre: [],
67    s: [],
68    small: [],
69    span: [],
70    sub: [],
71    sup: [],
72    strong: [],
73    u: [],
74    ul: []
75  };
76
77  /**
78   * A pattern that recognizes a commonly useful subset of URLs that are safe.
79   *
80   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
81   */
82  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
83
84  /**
85   * A pattern that matches safe data URLs. Only matches image, video and audio types.
86   *
87   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
88   */
89  var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
90
91  var ParseableAttributes = ['title', 'placeholder']; // attributes to use as settings, can add others in the future
92
93  function allowedAttribute (attr, allowedAttributeList) {
94    var attrName = attr.nodeName.toLowerCase();
95
96    if ($.inArray(attrName, allowedAttributeList) !== -1) {
97      if ($.inArray(attrName, uriAttrs) !== -1) {
98        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
99      }
100
101      return true;
102    }
103
104    var regExp = $(allowedAttributeList).filter(function (index, value) {
105      return value instanceof RegExp;
106    });
107
108    // Check if a regular expression validates the attribute.
109    for (var i = 0, l = regExp.length; i < l; i++) {
110      if (attrName.match(regExp[i])) {
111        return true;
112      }
113    }
114
115    return false;
116  }
117
118  function sanitizeHtml (unsafeElements, whiteList, sanitizeFn) {
119    if (sanitizeFn && typeof sanitizeFn === 'function') {
120      return sanitizeFn(unsafeElements);
121    }
122
123    var whitelistKeys = Object.keys(whiteList);
124
125    for (var i = 0, len = unsafeElements.length; i < len; i++) {
126      var elements = unsafeElements[i].querySelectorAll('*');
127
128      for (var j = 0, len2 = elements.length; j < len2; j++) {
129        var el = elements[j];
130        var elName = el.nodeName.toLowerCase();
131
132        if (whitelistKeys.indexOf(elName) === -1) {
133          el.parentNode.removeChild(el);
134
135          continue;
136        }
137
138        var attributeList = [].slice.call(el.attributes);
139        var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
140
141        for (var k = 0, len3 = attributeList.length; k < len3; k++) {
142          var attr = attributeList[k];
143
144          if (!allowedAttribute(attr, whitelistedAttributes)) {
145            el.removeAttribute(attr.nodeName);
146          }
147        }
148      }
149    }
150  }
151
152  function getAttributesObject ($select) {
153    var attributesObject = {},
154        attrVal;
155
156    ParseableAttributes.forEach(function (item) {
157      attrVal = $select.attr(item);
158      if (attrVal) attributesObject[item] = attrVal;
159    });
160
161    // for backwards compatibility
162    // (using title as placeholder is deprecated - remove in v2.0.0)
163    if (!attributesObject.placeholder && attributesObject.title) {
164      attributesObject.placeholder = attributesObject.title;
165    }
166
167    return attributesObject;
168  }
169
170  // Polyfill for browsers with no classList support
171  // Remove in v2
172  if (!('classList' in document.createElement('_'))) {
173    (function (view) {
174      if (!('Element' in view)) return;
175
176      var classListProp = 'classList',
177          protoProp = 'prototype',
178          elemCtrProto = view.Element[protoProp],
179          objCtr = Object,
180          classListGetter = function () {
181            var $elem = $(this);
182
183            return {
184              add: function (classes) {
185                classes = Array.prototype.slice.call(arguments).join(' ');
186                return $elem.addClass(classes);
187              },
188              remove: function (classes) {
189                classes = Array.prototype.slice.call(arguments).join(' ');
190                return $elem.removeClass(classes);
191              },
192              toggle: function (classes, force) {
193                return $elem.toggleClass(classes, force);
194              },
195              contains: function (classes) {
196                return $elem.hasClass(classes);
197              }
198            };
199          };
200
201      if (objCtr.defineProperty) {
202        var classListPropDesc = {
203          get: classListGetter,
204          enumerable: true,
205          configurable: true
206        };
207        try {
208          objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
209        } catch (ex) { // IE 8 doesn't support enumerable:true
210          // adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
211          // modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
212          if (ex.number === undefined || ex.number === -0x7FF5EC54) {
213            classListPropDesc.enumerable = false;
214            objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
215          }
216        }
217      } else if (objCtr[protoProp].__defineGetter__) {
218        elemCtrProto.__defineGetter__(classListProp, classListGetter);
219      }
220    }(window));
221  }
222
223  var testElement = document.createElement('_');
224
225  testElement.classList.add('c1', 'c2');
226
227  if (!testElement.classList.contains('c2')) {
228    var _add = DOMTokenList.prototype.add,
229        _remove = DOMTokenList.prototype.remove;
230
231    DOMTokenList.prototype.add = function () {
232      Array.prototype.forEach.call(arguments, _add.bind(this));
233    };
234
235    DOMTokenList.prototype.remove = function () {
236      Array.prototype.forEach.call(arguments, _remove.bind(this));
237    };
238  }
239
240  testElement.classList.toggle('c3', false);
241
242  // Polyfill for IE 10 and Firefox <24, where classList.toggle does not
243  // support the second argument.
244  if (testElement.classList.contains('c3')) {
245    var _toggle = DOMTokenList.prototype.toggle;
246
247    DOMTokenList.prototype.toggle = function (token, force) {
248      if (1 in arguments && !this.contains(token) === !force) {
249        return force;
250      } else {
251        return _toggle.call(this, token);
252      }
253    };
254  }
255
256  testElement = null;
257
258  // Polyfill for IE (remove in v2)
259  Object.values = typeof Object.values === 'function' ? Object.values : function (obj) {
260    return Object.keys(obj).map(function (key) {
261      return obj[key];
262    });
263  };
264
265  // shallow array comparison
266  function isEqual (array1, array2) {
267    return array1.length === array2.length && array1.every(function (element, index) {
268      return element === array2[index];
269    });
270  };
271
272  // <editor-fold desc="Shims">
273  if (!String.prototype.startsWith) {
274    (function () {
275      'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
276      var toString = {}.toString;
277      var startsWith = function (search) {
278        if (this == null) {
279          throw new TypeError();
280        }
281        var string = String(this);
282        if (search && toString.call(search) == '[object RegExp]') {
283          throw new TypeError();
284        }
285        var stringLength = string.length;
286        var searchString = String(search);
287        var searchLength = searchString.length;
288        var position = arguments.length > 1 ? arguments[1] : undefined;
289        // `ToInteger`
290        var pos = position ? Number(position) : 0;
291        if (pos != pos) { // better `isNaN`
292          pos = 0;
293        }
294        var start = Math.min(Math.max(pos, 0), stringLength);
295        // Avoid the `indexOf` call if no match is possible
296        if (searchLength + start > stringLength) {
297          return false;
298        }
299        var index = -1;
300        while (++index < searchLength) {
301          if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
302            return false;
303          }
304        }
305        return true;
306      };
307      if (Object.defineProperty) {
308        Object.defineProperty(String.prototype, 'startsWith', {
309          'value': startsWith,
310          'configurable': true,
311          'writable': true
312        });
313      } else {
314        String.prototype.startsWith = startsWith;
315      }
316    }());
317  }
318
319  function toKebabCase (str) {
320    return str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, function ($, ofs) {
321      return (ofs ? '-' : '') + $.toLowerCase();
322    });
323  }
324
325  /*function getSelectedOptions () {
326    var options = this.selectpicker.main.data;
327    if (this.options.source.data || this.options.source.search) {
328      options = Object.values(this.selectpicker.optionValuesDataMap);
329    }
330    var selectedOptions = options.filter(function (item) {
331      if (item.selected) {
332        if (this.options.hideDisabled && item.disabled) return false;
333        return true;
334      }
335      return false;
336    }, this);
337    // ensure only 1 option is selected if multiple are set in the data source
338    if (this.options.source.data && !this.multiple && selectedOptions.length > 1) {
339      for (var i = 0; i < selectedOptions.length - 1; i++) {
340        selectedOptions[i].selected = false;
341      }
342      selectedOptions = [ selectedOptions[selectedOptions.length - 1] ];
343    }
344    return selectedOptions;
345  }*/
346  
347  function getSelectedOptions (select, ignoreDisabled) {
348	    var selectedOptions = select.selectedOptions,
349	        options = [],
350	        opt;
351
352	    if (ignoreDisabled) {
353	      for (var i = 0, len = selectedOptions.length; i < len; i++) {
354	        opt = selectedOptions[i];
355
356	        if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {
357	          options.push(opt);
358	        }
359	      }
360
361	      return options;
362	    }
363
364	    return selectedOptions;
365	  }
366  
367  // much faster than $.val()
368  /*function getSelectValues (selectedOptions) {
369    var value = [],
370        options = selectedOptions || getSelectedOptions.call(this),
371        opt;
372    for (var i = 0, len = options.length; i < len; i++) {
373      opt = options[i];
374      if (!opt.disabled) {
375        value.push(opt.value === undefined ? opt.text : opt.value);
376      }
377    }
378    if (!this.multiple) {
379      return !value.length ? null : value[0];
380    }
381    return value;
382  }*/
383  
384  function getSelectValues (select, selectedOptions) {
385    var value = [],
386        options = selectedOptions || select.selectedOptions,
387        opt;
388
389    for (var i = 0, len = options.length; i < len; i++) {
390      opt = options[i];
391
392      if (!(opt.disabled || opt.parentNode.tagName === 'OPTGROUP' && opt.parentNode.disabled)) {
393        value.push(opt.value);
394      }
395    }
396
397    if (!select.multiple) {
398      return !value.length ? null : value[0];
399    }
400
401    return value;
402  }
403  
404  // set data-selected on select element if the value has been programmatically selected
405  // prior to initialization of bootstrap-select
406  // * consider removing or replacing an alternative method *
407  var valHooks = {
408    useDefault: false,
409    _set: $.valHooks.select.set
410  };
411
412  $.valHooks.select.set = function (elem, value) {
413    if (value && !valHooks.useDefault) $(elem).data('selected', true);
414
415    return valHooks._set.apply(this, arguments);
416  };
417
418  var changedArguments = null;
419
420  var EventIsSupported = (function () {
421    try {
422      new Event('change');
423      return true;
424    } catch (e) {
425      return false;
426    }
427  })();
428
429  $.fn.triggerNative = function (eventName) {
430    var el = this[0],
431        event;
432
433    if (el.dispatchEvent) { // for modern browsers & IE9+
434      if (EventIsSupported) {
435        // For modern browsers
436        event = new Event(eventName, {
437          bubbles: true
438        });
439      } else {
440        // For IE since it doesn't support Event constructor
441        event = document.createEvent('Event');
442        event.initEvent(eventName, true, false);
443      }
444
445      el.dispatchEvent(event);
446    }
447  };
448  // </editor-fold>
449
450  function stringSearch (li, searchString, method, normalize) {
451    var stringTypes = [
452          'display',
453          'subtext',
454          'tokens'
455        ],
456        searchSuccess = false;
457
458    for (var i = 0; i < stringTypes.length; i++) {
459      var stringType = stringTypes[i],
460          string = li[stringType];
461
462      if (string) {
463        string = string.toString();
464
465        // Strip HTML tags. This isn't perfect, but it's much faster than any other method
466        if (stringType === 'display') {
467          string = string.replace(/<[^>]+>/g, '');
468        }
469
470        if (normalize) string = normalizeToBase(string);
471        string = string.toUpperCase();
472
473        if (typeof method === 'function') {
474          searchSuccess = method(string, searchString);
475        } else if (method === 'contains') {
476          searchSuccess = string.indexOf(searchString) >= 0;
477        } else if (method === 'containsAll') {
478          var searchArray = searchString.split(' ');
479          var notAllMatched = false;
480          searchSuccess = false;
481
482          for (var searchSubString in searchArray) {
483            searchSuccess = string.indexOf(searchArray[searchSubString]) >= 0;
484            if (!searchSuccess) notAllMatched = true;
485          }
486
487          if (notAllMatched) searchSuccess = false;
488        } else {
489          searchSuccess = string.startsWith(searchString);
490        }
491
492        if (searchSuccess) break;
493      }
494    }
495
496    return searchSuccess;
497  }
498
499  function toInteger (value) {
500    return parseInt(value, 10) || 0;
501  }
502
503  // Borrowed from Lodash (_.deburr)
504  /** Used to map Latin Unicode letters to basic Latin letters. */
505  var deburredLetters = {
506    // Latin-1 Supplement block.
507    '\xc0': 'A',  '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
508    '\xe0': 'a',  '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
509    '\xc7': 'C',  '\xe7': 'c',
510    '\xd0': 'D',  '\xf0': 'd',
511    '\xc8': 'E',  '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
512    '\xe8': 'e',  '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
513    '\xcc': 'I',  '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
514    '\xec': 'i',  '\xed': 'i', '\xee': 'i', '\xef': 'i',
515    '\xd1': 'N',  '\xf1': 'n',
516    '\xd2': 'O',  '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
517    '\xf2': 'o',  '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
518    '\xd9': 'U',  '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
519    '\xf9': 'u',  '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
520    '\xdd': 'Y',  '\xfd': 'y', '\xff': 'y',
521    '\xc6': 'Ae', '\xe6': 'ae',
522    '\xde': 'Th', '\xfe': 'th',
523    '\xdf': 'ss',
524    // Latin Extended-A block.
525    '\u0100': 'A',  '\u0102': 'A', '\u0104': 'A',
526    '\u0101': 'a',  '\u0103': 'a', '\u0105': 'a',
527    '\u0106': 'C',  '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
528    '\u0107': 'c',  '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
529    '\u010e': 'D',  '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
530    '\u0112': 'E',  '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
531    '\u0113': 'e',  '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
532    '\u011c': 'G',  '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
533    '\u011d': 'g',  '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
534    '\u0124': 'H',  '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
535    '\u0128': 'I',  '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
536    '\u0129': 'i',  '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
537    '\u0134': 'J',  '\u0135': 'j',
538    '\u0136': 'K',  '\u0137': 'k', '\u0138': 'k',
539    '\u0139': 'L',  '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
540    '\u013a': 'l',  '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
541    '\u0143': 'N',  '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
542    '\u0144': 'n',  '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
543    '\u014c': 'O',  '\u014e': 'O', '\u0150': 'O',
544    '\u014d': 'o',  '\u014f': 'o', '\u0151': 'o',
545    '\u0154': 'R',  '\u0156': 'R', '\u0158': 'R',
546    '\u0155': 'r',  '\u0157': 'r', '\u0159': 'r',
547    '\u015a': 'S',  '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
548    '\u015b': 's',  '\u015d': 's', '\u015f': 's', '\u0161': 's',
549    '\u0162': 'T',  '\u0164': 'T', '\u0166': 'T',
550    '\u0163': 't',  '\u0165': 't', '\u0167': 't',
551    '\u0168': 'U',  '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
552    '\u0169': 'u',  '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
553    '\u0174': 'W',  '\u0175': 'w',
554    '\u0176': 'Y',  '\u0177': 'y', '\u0178': 'Y',
555    '\u0179': 'Z',  '\u017b': 'Z', '\u017d': 'Z',
556    '\u017a': 'z',  '\u017c': 'z', '\u017e': 'z',
557    '\u0132': 'IJ', '\u0133': 'ij',
558    '\u0152': 'Oe', '\u0153': 'oe',
559    '\u0149': "'n", '\u017f': 's'
560  };
561
562  /** Used to match Latin Unicode letters (excluding mathematical operators). */
vendor: 8,793 bytes, lines 563-874
563  var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
564
565  /** Used to compose unicode character classes. */
566  var rsComboMarksRange = '\\u0300-\\u036f',
567      reComboHalfMarksRange = '\\ufe20-\\ufe2f',
568      rsComboSymbolsRange = '\\u20d0-\\u20ff',
569      rsComboMarksExtendedRange = '\\u1ab0-\\u1aff',
570      rsComboMarksSupplementRange = '\\u1dc0-\\u1dff',
571      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange + rsComboMarksExtendedRange + rsComboMarksSupplementRange;
572
573  /** Used to compose unicode capture groups. */
574  var rsCombo = '[' + rsComboRange + ']';
575
576  /**
577   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
578   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
579   */
580  var reComboMark = RegExp(rsCombo, 'g');
581
582  function deburrLetter (key) {
583    return deburredLetters[key];
584  };
585
586  function normalizeToBase (string) {
587    string = string.toString();
588    return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
589  }
590
591  // List of HTML entities for escaping.
592  var escapeMap = {
593    '&': '&amp;',
594    '<': '&lt;',
595    '>': '&gt;',
596    '"': '&quot;',
597    "'": '&#x27;',
598    '`': '&#x60;'
599  };
600
601  // Functions for escaping and unescaping strings to/from HTML interpolation.
602  var createEscaper = function (map) {
603    var escaper = function (match) {
604      return map[match];
605    };
606    // Regexes for identifying a key that needs to be escaped.
607    var source = '(?:' + Object.keys(map).join('|') + ')';
608    var testRegexp = RegExp(source);
609    var replaceRegexp = RegExp(source, 'g');
610    return function (string) {
611      string = string == null ? '' : '' + string;
612      return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
613    };
614  };
615
616  var htmlEscape = createEscaper(escapeMap);
617
618  /**
619   * ------------------------------------------------------------------------
620   * Constants
621   * ------------------------------------------------------------------------
622   */
623
624  var keyCodeMap = {
625    32: ' ',
626    48: '0',
627    49: '1',
628    50: '2',
629    51: '3',
630    52: '4',
631    53: '5',
632    54: '6',
633    55: '7',
634    56: '8',
635    57: '9',
636    59: ';',
637    65: 'A',
638    66: 'B',
639    67: 'C',
640    68: 'D',
641    69: 'E',
642    70: 'F',
643    71: 'G',
644    72: 'H',
645    73: 'I',
646    74: 'J',
647    75: 'K',
648    76: 'L',
649    77: 'M',
650    78: 'N',
651    79: 'O',
652    80: 'P',
653    81: 'Q',
654    82: 'R',
655    83: 'S',
656    84: 'T',
657    85: 'U',
658    86: 'V',
659    87: 'W',
660    88: 'X',
661    89: 'Y',
662    90: 'Z',
663    96: '0',
664    97: '1',
665    98: '2',
666    99: '3',
667    100: '4',
668    101: '5',
669    102: '6',
670    103: '7',
671    104: '8',
672    105: '9'
673  };
674
675  var keyCodes = {
676    ESCAPE: 27, // KeyboardEvent.which value for Escape (Esc) key
677    ENTER: 13, // KeyboardEvent.which value for Enter key
678    SPACE: 32, // KeyboardEvent.which value for space key
679    TAB: 9, // KeyboardEvent.which value for tab key
680    ARROW_UP: 38, // KeyboardEvent.which value for up arrow key
681    ARROW_DOWN: 40 // KeyboardEvent.which value for down arrow key
682  };
683
684  var Dropdown = window.Dropdown || window.bootstrap && window.bootstrap.Dropdown;
685
686  function getVersion () {
687    var version;
688
689    try {
690      version = $.fn.dropdown.Constructor.VERSION;
691    } catch (err) {
692      version = Dropdown.VERSION;
693    }
694
695    return version;
696  }
697
698  var version = {
699    success: false,
700    major: '3'
701  };
702
703  try {
704    version.full = (getVersion() || '').split(' ')[0].split('.');
705    version.major = version.full[0];
706    version.success = true;
707  } catch (err) {
708    // do nothing
709  }
710
711  var selectId = 0;
712
713  var EVENT_KEY = '.bs.select';
714
715  var classNames = {
716    DISABLED: 'disabled',
717    DIVIDER: 'divider',
718    SHOW: 'open',
719    DROPUP: 'dropup',
720    MENU: 'dropdown-menu',
721    MENURIGHT: 'dropdown-menu-right',
722    MENULEFT: 'dropdown-menu-left',
723    // to-do: replace with more advanced template/customization options
724    BUTTONCLASS: 'btn-default',
725    POPOVERHEADER: 'popover-title',
726    ICONBASE: 'glyphicon',
727    TICKICON: 'glyphicon-ok'
728  };
729
730  var Selector = {
731    MENU: '.' + classNames.MENU,
732    DATA_TOGGLE: 'data-toggle="dropdown"'
733  };
734
735  var elementTemplates = {
736    div: document.createElement('div'),
737    span: document.createElement('span'),
738    i: document.createElement('i'),
739    subtext: document.createElement('small'),
740    a: document.createElement('a'),
741    li: document.createElement('li'),
742    whitespace: document.createTextNode('\u00A0'),
743    fragment: document.createDocumentFragment(),
744    option: document.createElement('option')
745  };
746
747  elementTemplates.selectedOption = elementTemplates.option.cloneNode(false);
748  elementTemplates.selectedOption.setAttribute('selected', true);
749
750  elementTemplates.noResults = elementTemplates.li.cloneNode(false);
751  elementTemplates.noResults.className = 'no-results';
752
753  elementTemplates.a.setAttribute('role', 'option');
754  elementTemplates.a.className = 'dropdown-item';
755
756  elementTemplates.subtext.className = 'text-muted';
757
758  elementTemplates.text = elementTemplates.span.cloneNode(false);
759  elementTemplates.text.className = 'text';
760
761  elementTemplates.checkMark = elementTemplates.span.cloneNode(false);
762
763  var REGEXP_ARROW = new RegExp(keyCodes.ARROW_UP + '|' + keyCodes.ARROW_DOWN);
764  var REGEXP_TAB_OR_ESCAPE = new RegExp('^' + keyCodes.TAB + '$|' + keyCodes.ESCAPE);
765
766  var generateOption = {
767    li: function (content, classes, optgroup) {
768      var li = elementTemplates.li.cloneNode(false);
769
770      if (content) {
771        if (content.nodeType === 1 || content.nodeType === 11) {
772          li.appendChild(content);
773        } else {
774          li.innerHTML = content;
775        }
776      }
777
778      if (typeof classes !== 'undefined' && classes !== '') li.className = classes;
779      if (typeof optgroup !== 'undefined' && optgroup !== null) li.classList.add('optgroup-' + optgroup);
780
781      return li;
782    },
783
784    a: function (text, classes, inline) {
785      var a = elementTemplates.a.cloneNode(true);
786
787      if (text) {
788        if (text.nodeType === 11) {
789          a.appendChild(text);
790        } else {
791          a.insertAdjacentHTML('beforeend', text);
792        }
793      }
794
795      if (typeof classes !== 'undefined' && classes !== '') a.classList.add.apply(a.classList, classes.split(/\s+/));
796      if (inline) a.setAttribute('style', inline);
797
798      return a;
799    },
800
801    text: function (options, useFragment) {
802      var textElement = elementTemplates.text.cloneNode(false),
803          subtextElement,
804          iconElement;
805
806      if (options.content) {
807        textElement.innerHTML = options.content;
808      } else {
809        textElement.textContent = options.text;
810
811        if (options.icon) {
812          var whitespace = elementTemplates.whitespace.cloneNode(false);
813
814          // need to use <i> for icons in the button to prevent a breaking change
815          // note: switch to span in next major release
816          iconElement = (useFragment === true ? elementTemplates.i : elementTemplates.span).cloneNode(false);
817          iconElement.className = this.options.iconBase + ' ' + options.icon;
818
819          elementTemplates.fragment.appendChild(iconElement);
820          elementTemplates.fragment.appendChild(whitespace);
821        }
822
823        if (options.subtext) {
824          subtextElement = elementTemplates.subtext.cloneNode(false);
825          subtextElement.textContent = options.subtext;
826          textElement.appendChild(subtextElement);
827        }
828      }
829
830      if (useFragment === true) {
831        while (textElement.childNodes.length > 0) {
832          elementTemplates.fragment.appendChild(textElement.childNodes[0]);
833        }
834      } else {
835        elementTemplates.fragment.appendChild(textElement);
836      }
837
838      return elementTemplates.fragment;
839    },
840
841    label: function (options) {
842      var textElement = elementTemplates.text.cloneNode(false),
843          subtextElement,
844          iconElement;
845
846      textElement.innerHTML = options.display;
847
848      if (options.icon) {
849        var whitespace = elementTemplates.whitespace.cloneNode(false);
850
851        iconElement = elementTemplates.span.cloneNode(false);
852        iconElement.className = this.options.iconBase + ' ' + options.icon;
853
854        elementTemplates.fragment.appendChild(iconElement);
855        elementTemplates.fragment.appendChild(whitespace);
856      }
857
858      if (options.subtext) {
859        subtextElement = elementTemplates.subtext.cloneNode(false);
860        subtextElement.textContent = options.subtext;
861        textElement.appendChild(subtextElement);
862      }
863
864      elementTemplates.fragment.appendChild(textElement);
865
866      return elementTemplates.fragment;
867    }
868  };
869
870  var getOptionData = {
871    fromOption: function (option, type) {
872      var value;
873
874      switch (type) {
875        case 'divider':
876          value = option.getAttribute('data-divider') === 'true';
877          break;
878
879        case 'text':
880          value = option.textContent;
881          break;
882
883        case 'label':
884          value = option.label;
885          break;
886
887        case 'style':
888          value = option.style.cssText;
889          break;
890
891        case 'title':
892          value = option.title;
893          break;
894
895        default:
896          value = option.getAttribute('data-' + toKebabCase(type));
897          break;
898      }
899
900      return value;
901    },
902    fromDataSource: function (option, type) {
903      var value;
904
905      switch (type) {
906        case 'text':
907        case 'label':
908          value = option.text || option.value || '';
909          break;
910
911        default:
912          value = option[type];
913          break;
914      }
915
916      return value;
917    }
918  };
919
920  function showNoResults (searchMatch, searchValue) {
921    if (!searchMatch.length) {
922      elementTemplates.noResults.innerHTML = this.options.noneResultsText.replace('{0}', '"' + htmlEscape(searchValue) + '"');
923      this.$menuInner[0].firstChild.appendChild(elementTemplates.noResults);
924    }
925  }
926
927  function filterHidden (item) {
928    return !(item.hidden || this.options.hideDisabled && item.disabled);
929  }
930
931  var Selectpicker = function (element, options) {
932    var that = this;
933
934    // bootstrap-select has been initialized - revert valHooks.select.set back to its original function
935    if (!valHooks.useDefault) {
936      $.valHooks.select.set = valHooks._set;
937      valHooks.useDefault = true;
938    }
939
940    this.$element = $(element);
941    this.$newElement = null;
942    this.$button = null;
943    this.$menu = null;
944    this.options = options;
945    this.selectpicker = {
946      main: {
947        data: [],
948        optionQueue: elementTemplates.fragment.cloneNode(false),
949        hasMore: false
950      },
951      search: {
952        data: [],
953        hasMore: false
954      },
955      current: {}, // current is either equal to main or search depending on if a search is in progress
956      view: {},
957      // map of option values and their respective data (only used in conjunction with options.source)
958      optionValuesDataMap: {},
959      isSearching: false,
960      keydown: {
961        keyHistory: '',
962        resetKeyHistory: {
963          start: function () {
964            return setTimeout(function () {
965              that.selectpicker.keydown.keyHistory = '';
966            }, 800);
967          }
968        }
969      }
970    };
971
972    this.sizeInfo = {};
973
974    // Format window padding
975    var winPad = this.options.windowPadding;
976    if (typeof winPad === 'number') {
977      this.options.windowPadding = [winPad, winPad, winPad, winPad];
978    }
979
980    // Expose public methods
981    this.val = Selectpicker.prototype.val;
982    this.render = Selectpicker.prototype.render;
983    this.refresh = Selectpicker.prototype.refresh;
984    this.setStyle = Selectpicker.prototype.setStyle;
985    this.selectAll = Selectpicker.prototype.selectAll;
986    this.deselectAll = Selectpicker.prototype.deselectAll;
987    this.destroy = Selectpicker.prototype.destroy;
988    this.remove = Selectpicker.prototype.remove;
989    this.show = Selectpicker.prototype.show;
990    this.hide = Selectpicker.prototype.hide;
991
992    this.init();
993  };
994
995  Selectpicker.VERSION = '1.14.0-beta3';
996
997  // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
998  Selectpicker.DEFAULTS = {
999    noneSelectedText: 'Nothing selected',
1000    noneResultsText: 'No results matched {0}',
1001    countSelectedText: function (numSelected, numTotal) {
1002      return (numSelected == 1) ? '{0} item selected' : '{0} items selected';
1003    },
1004    maxOptionsText: function (numAll, numGroup) {
1005      return [
1006        (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
1007        (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
1008      ];
1009    },
1010    selectAllText: 'Select All',
1011    deselectAllText: 'Deselect All',
1012    source: {
1013      pageSize: 40
1014    },
1015    //chunkSize: 40,
1016    chunkSize: Number.MAX_VALUE,
1017    doneButton: false,
1018    doneButtonText: 'Close',
1019    multipleSeparator: ' | ',
1020    styleBase: 'btn',
1021    style: classNames.BUTTONCLASS,
1022    size: 'auto',
1023    title: null,
1024    placeholder: null,
1025    titleTip: null,
1026    allowClear: false,
1027    selectedTextFormat: 'values',
1028    width: false,
1029    container: false,
1030    hideDisabled: false,
1031    showSubtext: false,
1032    showIcon: true,
1033    showContent: true,
1034    dropupAuto: true,
1035    header: false,
1036    liveSearch: false,
1037    liveSearchPlaceholder: null,
1038    liveSearchNormalize: false,
1039    liveSearchStyle: 'contains',
1040    actionsBox: false,
1041    iconBase: classNames.ICONBASE,
1042    tickIcon: classNames.TICKICON,
1043    showTick: false,
1044    template: {
1045      caret: '<span class="caret"></span>'
1046    },
1047    maxOptions: false,
1048    mobile: false,
1049    selectOnTab: true,
1050    dropdownAlignRight: false,
1051    windowPadding: 0,
1052    virtualScroll: 600,
1053    display: false,
1054    sanitize: true,
1055    sanitizeFn: null,
1056    whiteList: DefaultWhitelist
1057  };
1058
1059  Selectpicker.prototype = {
1060
1061    constructor: Selectpicker,
1062
1063    init: function () {
1064      var that = this,
1065          id = this.$element.attr('id'),
1066          element = this.$element[0],
1067          form = element.form;
1068
1069      selectId++;
1070      this.selectId = 'bs-select-' + selectId;
1071
1072      element.classList.add('bs-select-hidden');
1073
1074      this.multiple = this.$element.prop('multiple');
1075      this.autofocus = this.$element.prop('autofocus');
1076
1077      if (element.classList.contains('show-tick')) {
1078        this.options.showTick = true;
1079      }
1080
1081      this.$newElement = this.createDropdown();
1082
1083      this.$element
1084        .after(this.$newElement)
1085        .prependTo(this.$newElement);
1086
1087      // ensure select is associated with form element if it got unlinked after mov
vendor: 20,142 bytes, lines 1087-1612
1087ing it inside newElement
1088      if (form && element.form === null) {
1089        if (!form.id) form.id = 'form-' + this.selectId;
1090        element.setAttribute('form', form.id);
1091      }
1092
1093      this.$button = this.$newElement.children('button');
1094      if (this.options.allowClear) this.$clearButton = this.$button.children('.bs-select-clear-selected');
1095      this.$menu = this.$newElement.children(Selector.MENU);
1096      this.$menuInner = this.$menu.children('.inner');
1097      this.$searchbox = this.$menu.find('input');
1098
1099      element.classList.remove('bs-select-hidden');
1100
1101      this.fetchData(function () {
1102        that.render(true);
1103        that.buildList();
1104
1105        requestAnimationFrame(function () {
1106          that.$element.trigger('loaded' + EVENT_KEY);
1107        });
1108      });
1109
1110      if (this.options.dropdownAlignRight === true) this.$menu[0].classList.add(classNames.MENURIGHT);
1111
1112      if (typeof id !== 'undefined') {
1113        this.$button.attr('data-id', id);
1114      }
1115
1116      this.checkDisabled();
1117      this.clickListener();
1118
1119      if (version.major > 4) this.dropdown = new Dropdown(this.$button[0]);
1120
1121      if (this.options.liveSearch) {
1122        this.liveSearchListener();
1123        this.focusedParent = this.$searchbox[0];
1124      } else {
1125        this.focusedParent = this.$menuInner[0];
1126      }
1127
1128      this.setStyle();
1129      this.setWidth();
1130      if (this.options.container) {
1131        this.selectPosition();
1132      } else {
1133        this.$element.on('hide' + EVENT_KEY, function () {
1134          if (that.isVirtual()) {
1135            // empty menu on close
1136            var menuInner = that.$menuInner[0],
1137                emptyMenu = menuInner.firstChild.cloneNode(false);
1138
1139            // replace the existing UL with an empty one - this is faster than $.empty() or innerHTML = ''
1140            menuInner.replaceChild(emptyMenu, menuInner.firstChild);
1141            menuInner.scrollTop = 0;
1142          }
1143        });
1144      }
1145      this.$menu.data('this', this);
1146      this.$newElement.data('this', this);
1147      if (this.options.mobile) this.mobile();
1148
1149      this.$newElement.on({
1150        'hide.bs.dropdown': function (e) {
1151          that.$element.trigger('hide' + EVENT_KEY, e);
1152        },
1153        'hidden.bs.dropdown': function (e) {
1154          that.$element.trigger('hidden' + EVENT_KEY, e);
1155        },
1156        'show.bs.dropdown': function (e) {
1157          that.$element.trigger('show' + EVENT_KEY, e);
1158        },
1159        'shown.bs.dropdown': function (e) {
1160          that.$element.trigger('shown' + EVENT_KEY, e);
1161        }
1162      });
1163
1164      if (element.hasAttribute('required')) {
1165        this.$element.on('invalid' + EVENT_KEY, function () {
1166          that.$button[0].classList.add('bs-invalid');
1167
1168          that.$element
1169            .on('shown' + EVENT_KEY + '.invalid', function () {
1170              that.$element
1171                .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened
1172                .off('shown' + EVENT_KEY + '.invalid');
1173            })
1174            .on('rendered' + EVENT_KEY, function () {
1175              // if select is no longer invalid, remove the bs-invalid class
1176              if (this.validity.valid) that.$button[0].classList.remove('bs-invalid');
1177              that.$element.off('rendered' + EVENT_KEY);
1178            });
1179
1180          that.$button.on('blur' + EVENT_KEY, function () {
1181            that.$element.trigger('focus').trigger('blur');
1182            that.$button.off('blur' + EVENT_KEY);
1183          });
1184        });
1185      }
1186
1187      if (form) {
1188        $(form).on('reset' + EVENT_KEY, function () {
1189          requestAnimationFrame(function () {
1190            that.render();
1191          });
1192        });
1193      }
1194    },
1195
1196    createDropdown: function () {
1197      // Options
1198      // If we are multiple or showTick option is set, then add the show-tick class
1199      var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
1200          multiselectable = this.multiple ? ' aria-multiselectable="true"' : '',
1201          inputGroup = '',
1202          autofocus = this.autofocus ? ' autofocus' : '';
1203
1204      if (version.major < 4 && this.$element.parent().hasClass('input-group')) {
1205        inputGroup = ' input-group-btn';
1206      }
1207
1208      // Elements
1209      var drop,
1210          header = '',
1211          searchbox = '',
1212          actionsbox = '',
1213          donebutton = '',
1214          clearButton = '';
1215
1216      if (this.options.header) {
1217        header =
1218          '<div class="' + classNames.POPOVERHEADER + '">' +
1219            '<button type="button" class="close" aria-hidden="true">&times;</button>' +
1220              this.options.header +
1221          '</div>';
1222      }
1223
1224      if (this.options.liveSearch) {
1225        searchbox =
1226          '<div class="bs-searchbox">' +
1227            '<input type="search" class="form-control" autocomplete="off"' +
1228              (
1229                this.options.liveSearchPlaceholder === null ? ''
1230                :
1231                ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"'
1232              ) +
1233              ' role="combobox" aria-label="Search" aria-controls="' + this.selectId + '" aria-autocomplete="list">' +
1234          '</div>';
1235      }
1236
1237      if (this.multiple && this.options.actionsBox) {
1238        actionsbox =
1239          '<div class="bs-actionsbox">' +
1240            '<div class="btn-group btn-group-sm">' +
1241              '<button type="button" class="actions-btn bs-select-all btn ' + classNames.BUTTONCLASS + '">' +
1242                this.options.selectAllText +
1243              '</button>' +
1244              '<button type="button" class="actions-btn bs-deselect-all btn ' + classNames.BUTTONCLASS + '">' +
1245                this.options.deselectAllText +
1246              '</button>' +
1247            '</div>' +
1248          '</div>';
1249      }
1250
1251      if (this.multiple && this.options.doneButton) {
1252        donebutton =
1253          '<div class="bs-donebutton">' +
1254            '<div class="btn-group">' +
1255              '<button type="button" class="btn btn-sm ' + classNames.BUTTONCLASS + '">' +
1256                this.options.doneButtonText +
1257              '</button>' +
1258            '</div>' +
1259          '</div>';
1260      }
1261
1262      if (this.options.allowClear) {
1263        clearButton = '<span class="close bs-select-clear-selected" title="' + this.options.deselectAllText + '"><span>&times;</span>';
1264      }
1265
1266      drop =
1267        '<div class="dropdown bootstrap-select' + showTick + inputGroup + '">' +
1268          '<button type="button" tabindex="-1" class="' +
1269            this.options.styleBase +
1270            ' dropdown-toggle" ' +
1271            (this.options.display === 'static' ? 'data-display="static"' : '') +
1272            Selector.DATA_TOGGLE +
1273            autofocus +
1274            ' role="combobox" aria-owns="' +
1275            this.selectId +
1276            '" aria-haspopup="listbox" aria-expanded="false">' +
1277            '<div class="filter-option">' +
1278              '<div class="filter-option-inner">' +
1279                '<div class="filter-option-inner-inner">&nbsp;</div>' +
1280              '</div> ' +
1281            '</div>' +
1282            clearButton +
1283            '</span>' +
1284            (
1285              version.major >= '4' ? ''
1286              :
1287              '<span class="bs-caret">' +
1288                this.options.template.caret +
1289              '</span>'
1290            ) +
1291          '</button>' +
1292          '<div class="' + classNames.MENU + ' ' + (version.major >= '4' ? '' : classNames.SHOW) + '">' +
1293            header +
1294            searchbox +
1295            actionsbox +
1296            '<div class="inner ' + classNames.SHOW + '" role="listbox" id="' + this.selectId + '" tabindex="-1" ' + multiselectable + '>' +
1297                '<ul class="' + classNames.MENU + ' inner ' + (version.major >= '4' ? classNames.SHOW : '') + '" role="presentation">' +
1298                '</ul>' +
1299            '</div>' +
1300            donebutton +
1301          '</div>' +
1302        '</div>';
1303
1304      return $(drop);
1305    },
1306
1307    setPositionData: function () {
1308      this.selectpicker.view.canHighlight = [];
1309      this.selectpicker.view.size = 0;
1310      this.selectpicker.view.firstHighlightIndex = false;
1311
1312      for (var i = 0; i < this.selectpicker.current.data.length; i++) {
1313        var li = this.selectpicker.current.data[i],
1314            canHighlight = true;
1315
1316        if (li.type === 'divider') {
1317          canHighlight = false;
1318          li.height = this.sizeInfo.dividerHeight;
1319        } else if (li.type === 'optgroup-label') {
1320          canHighlight = false;
1321          li.height = this.sizeInfo.dropdownHeaderHeight;
1322        } else {
1323          li.height = this.sizeInfo.liHeight;
1324        }
1325
1326        if (li.disabled) canHighlight = false;
1327
1328        this.selectpicker.view.canHighlight.push(canHighlight);
1329
1330        if (canHighlight) {
1331          this.selectpicker.view.size++;
1332          li.posinset = this.selectpicker.view.size;
1333          if (this.selectpicker.view.firstHighlightIndex === false) this.selectpicker.view.firstHighlightIndex = i;
1334        }
1335
1336        li.position = (i === 0 ? 0 : this.selectpicker.current.data[i - 1].position) + li.height;
1337      }
1338    },
1339
1340    isVirtual: function () {
1341      return (this.options.virtualScroll !== false) && (this.selectpicker.main.data.length >= this.options.virtualScroll) || this.options.virtualScroll === true;
1342    },
1343
1344    createView: function (isSearching, setSize, refresh) {
1345      var that = this,
1346          scrollTop = 0;
1347
1348      this.selectpicker.isSearching = isSearching;
1349      this.selectpicker.current = isSearching ? this.selectpicker.search : this.selectpicker.main;
1350
1351      this.setPositionData();
1352
1353      if (setSize) {
1354        if (refresh) {
1355          scrollTop = this.$menuInner[0].scrollTop;
1356        } else if (!that.multiple) {
1357          var element = that.$element[0],
1358              selectedIndex = (element.options[element.selectedIndex] || {}).liIndex;
1359
1360          if (typeof selectedIndex === 'number' && that.options.size !== false) {
1361            var selectedData = that.selectpicker.main.data[selectedIndex],
1362                position = selectedData && selectedData.position;
1363
1364            if (position) {
1365              scrollTop = position - ((that.sizeInfo.menuInnerHeight + that.sizeInfo.liHeight) / 2);
1366            }
1367          }
1368        }
1369      }
1370
1371      scroll(scrollTop, true);
1372
1373      this.$menuInner.off('scroll.createView').on('scroll.createView', function (e, updateValue) {
1374        if (!that.noScroll) scroll(this.scrollTop, updateValue);
1375        that.noScroll = false;
1376      });
1377
1378      function scroll (scrollTop, init) {
1379        var size = that.selectpicker.current.data.length,
1380            chunks = [],
1381            chunkSize,
1382            chunkCount,
1383            firstChunk,
1384            lastChunk,
1385            currentChunk,
1386            prevPositions,
1387            positionIsDifferent,
1388            previousElements,
1389            menuIsDifferent = true,
1390            isVirtual = that.isVirtual();
1391
1392        that.selectpicker.view.scrollTop = scrollTop;
1393
1394        chunkSize = that.options.chunkSize; // number of options in a chunk
1395        chunkCount = Math.ceil(size / chunkSize) || 1; // number of chunks
1396
1397        for (var i = 0; i < chunkCount; i++) {
1398          var endOfChunk = (i + 1) * chunkSize;
1399
1400          if (i === chunkCount - 1) {
1401            endOfChunk = size;
1402          }
1403
1404          chunks[i] = [
1405            (i) * chunkSize + (!i ? 0 : 1),
1406            endOfChunk
1407          ];
1408
1409          if (!size) break;
1410
1411          if (currentChunk === undefined && scrollTop - 1 <= that.selectpicker.current.data[endOfChunk - 1].position - that.sizeInfo.menuInnerHeight) {
1412            currentChunk = i;
1413          }
1414        }
1415
1416        if (currentChunk === undefined) currentChunk = 0;
1417
1418        prevPositions = [that.selectpicker.view.position0, that.selectpicker.view.position1];
1419
1420        // always display previous, current, and next chunks
1421        firstChunk = Math.max(0, currentChunk - 1);
1422        lastChunk = Math.min(chunkCount - 1, currentChunk + 1);
1423
1424        that.selectpicker.view.position0 = isVirtual === false ? 0 : (Math.max(0, chunks[firstChunk][0]) || 0);
1425        that.selectpicker.view.position1 = isVirtual === false ? size : (Math.min(size, chunks[lastChunk][1]) || 0);
1426
1427        positionIsDifferent = prevPositions[0] !== that.selectpicker.view.position0 || prevPositions[1] !== that.selectpicker.view.position1;
1428
1429        if (that.activeElement !== undefined) {
1430          if (init) {
1431            if (that.activeElement !== that.selectedElement) {
1432              that.defocusItem(that.activeElement);
1433            }
1434            that.activeElement = undefined;
1435          }
1436
1437          if (that.activeElement !== that.selectedElement) {
1438            that.defocusItem(that.selectedElement);
1439          }
1440        }
1441
1442        if (that.prevActiveElement !== undefined && that.prevActiveElement !== that.activeElement && that.prevActiveElement !== that.selectedElement) {
1443          that.defocusItem(that.prevActiveElement);
1444        }
1445
1446        if (init || positionIsDifferent || that.selectpicker.current.hasMore) {
1447          previousElements = that.selectpicker.view.visibleElements ? that.selectpicker.view.visibleElements.slice() : [];
1448
1449          if (isVirtual === false) {
1450            that.selectpicker.view.visibleElements = that.selectpicker.current.elements;
1451          } else {
1452            that.selectpicker.view.visibleElements = that.selectpicker.current.elements.slice(that.selectpicker.view.position0, that.selectpicker.view.position1);
1453          }
1454
1455          that.setOptionStatus();
1456
1457          // if searching, check to make sure the list has actually been updated before updating DOM
1458          // this prevents unnecessary repaints
1459          if (isSearching || (isVirtual === false && init)) menuIsDifferent = !isEqual(previousElements, that.selectpicker.view.visibleElements);
1460
1461          // if virtual scroll is disabled and not searching,
1462          // menu should never need to be updated more than once
1463          if ((init || isVirtual === true) && menuIsDifferent) {
1464            var menuInner = that.$menuInner[0],
1465                menuFragment = document.createDocumentFragment(),
1466                emptyMenu = menuInner.firstChild.cloneNode(false),
1467                marginTop,
1468                marginBottom,
1469                elements = that.selectpicker.view.visibleElements,
1470                toSanitize = [];
1471
1472            // replace the existing UL with an empty one - this is faster than $.empty()
1473            menuInner.replaceChild(emptyMenu, menuInner.firstChild);
1474
1475            for (var i = 0, visibleElementsLen = elements.length; i < visibleElementsLen; i++) {
1476              var element = elements[i],
1477                  elText,
1478                  elementData;
1479
1480              if (that.options.sanitize) {
1481                elText = element.lastChild;
1482
1483                if (elText) {
1484                  elementData = that.selectpicker.current.data[i + that.selectpicker.view.position0];
1485
1486                  if (elementData && elementData.content && !elementData.sanitized) {
1487                    toSanitize.push(elText);
1488                    elementData.sanitized = true;
1489                  }
1490                }
1491              }
1492
1493              menuFragment.appendChild(element);
1494            }
1495
1496            if (that.options.sanitize && toSanitize.length) {
1497              sanitizeHtml(toSanitize, that.options.whiteList, that.options.sanitizeFn);
1498            }
1499
1500            if (isVirtual === true) {
1501              marginTop = (that.selectpicker.view.position0 === 0 ? 0 : that.selectpicker.current.data[that.selectpicker.view.position0 - 1].position);
1502              marginBottom = (that.selectpicker.view.position1 > size - 1 ? 0 : that.selectpicker.current.data[size - 1].position - that.selectpicker.current.data[that.selectpicker.view.position1 - 1].position);
1503
1504              menuInner.firstChild.style.marginTop = marginTop + 'px';
1505              menuInner.firstChild.style.marginBottom = marginBottom + 'px';
1506            } else {
1507              menuInner.firstChild.style.marginTop = 0;
1508              menuInner.firstChild.style.marginBottom = 0;
1509            }
1510
1511            menuInner.firstChild.appendChild(menuFragment);
1512
1513            // if an option is encountered that is wider than the current menu width, update the menu width accordingly
1514            // switch to ResizeObserver with increased browser support
1515            if (isVirtual === true && that.sizeInfo.hasScrollBar) {
1516              var menuInnerInnerWidth = menuInner.firstChild.offsetWidth;
1517
1518              if (init && menuInnerInnerWidth < that.sizeInfo.menuInnerInnerWidth && that.sizeInfo.totalMenuWidth > that.sizeInfo.selectWidth) {
1519                menuInner.firstChild.style.minWidth = that.sizeInfo.menuInnerInnerWidth + 'px';
1520              } else if (menuInnerInnerWidth > that.sizeInfo.menuInnerInnerWidth) {
1521                // set to 0 to get actual width of menu
1522                that.$menu[0].style.minWidth = 0;
1523
1524                var actualMenuWidth = menuInner.firstChild.offsetWidth;
1525
1526                if (actualMenuWidth > that.sizeInfo.menuInnerInnerWidth) {
1527                  that.sizeInfo.menuInnerInnerWidth = actualMenuWidth;
1528                  menuInner.firstChild.style.minWidth = that.sizeInfo.menuInnerInnerWidth + 'px';
1529                }
1530
1531                // reset to default CSS styling
1532                that.$menu[0].style.minWidth = '';
1533              }
1534            }
1535          }
1536
1537          if ((!isSearching && that.options.source.data || isSearching && that.options.source.search) && that.selectpicker.current.hasMore && currentChunk === chunkCount - 1) {
1538            // Don't load the next chunk until scrolling has started
1539            // This prevents unnecessary requests while the user is typing if pageSize is <= chunkSize
1540            if (scrollTop > 0) {
1541              // Chunks use 0-based indexing, but pages use 1-based. Add 1 to convert and add 1 again to get next page
1542              var page = Math.floor((currentChunk * that.options.chunkSize) / that.options.source.pageSize) + 2;
1543
1544              that.fetchData(function () {
1545                that.render();
1546                that.buildList(size, isSearching);
1547                that.setPositionData();
1548                scroll(scrollTop);
1549              }, isSearching ? 'search' : 'data', page, isSearching ? that.selectpicker.search.previousValue : undefined);
1550            }
1551          }
1552        }
1553
1554        that.prevActiveElement = that.activeElement;
1555
1556        if (!that.options.liveSearch) {
1557          that.$menuInner.trigger('focus');
1558        } else if (isSearching && init) {
1559          var index = 0,
1560              newActive;
1561
1562          if (!that.selectpicker.view.canHighlight[index]) {
1563            index = 1 + that.selectpicker.view.canHighlight.slice(1).indexOf(true);
1564          }
1565
1566          newActive = that.selectpicker.view.visibleElements[index];
1567
1568          that.defocusItem(that.selectpicker.view.currentActive);
1569
1570          that.activeElement = (that.selectpicker.current.data[index] || {}).element;
1571
1572          that.focusItem(newActive);
1573        }
1574      }
1575
1576      $(window)
1577        .off('resize' + EVENT_KEY + '.' + this.selectId + '.createView')
1578        .on('resize' + EVENT_KEY + '.' + this.selectId + '.createView', function () {
1579          var isActive = that.$newElement.hasClass(classNames.SHOW);
1580
1581          if (isActive) scroll(that.$menuInner[0].scrollTop);
1582        });
1583    },
1584
1585    focusItem: function (li, liData, noStyle) {
1586      if (li) {
1587        liData = liData || this.selectpicker.current.data[this.selectpicker.current.elements.indexOf(this.activeElement)];
1588        var a = li.firstChild;
1589
1590        if (a) {
1591          a.setAttribute('aria-setsize', this.selectpicker.view.size);
1592          a.setAttribute('aria-posinset', liData.posinset);
1593
1594          if (noStyle !== true) {
1595            this.focusedParent.setAttribute('aria-activedescendant', a.id);
1596            li.classList.add('active');
1597            a.classList.add('active');
1598          }
1599        }
1600      }
1601    },
1602
1603    defocusItem: function (li) {
1604      if (li) {
1605        li.classList.remove('active');
1606        if (li.firstChild) li.firstChild.classList.remove('active');
1607      }
1608    },
1609
1610    setPlaceholder: function () {
1611      var that = this,
1612          updateIndex = false;
1613
1614      if ((this.options.placeholder || this.options.allowClear) && !this.multiple) {
1615        if (!this.selectpicker.view.titleOption) this.selectpicker.view.titleOption = document.createElement('option');
1616
1617        // this option doesn't create a new <li> element, but does add a new option at the start,
1618        // so startIndex should increase to prevent having to check every option for the bs-title-option class
1619        updateIndex = true;
1620
1621        var element = this.$element[0],
1622            selectTitleOption = false,
1623            titleNotAppended = !this.selectpicker.view.titleOption.parentNode,
1624            selectedIndex = element.selectedIndex,
1625            selectedOption = element.options[selectedIndex],
1626            firstSelectable = element.querySelector('select > *:not(:disabled)'),
1627            firstSelectableIndex = firstSelectable ? firstSelectable.index : 0,
1628            navigation = window.performance && window.performance.getEntriesByType('navigation'),
1629            // Safari doesn't support getEntriesByType('navigation') - fall back to performance.navigation
1630            isNotBackForward = (navigation && navigation.length) ? navigation[0].type !== 'back_forward' : window.performance.navigation.type !== 2;
1631
1632        if (titleNotAppended) {
1633          // Use native JS to prepend option (faster)
1634          this.selectpicker.view.titleOption.className = 'bs-title-option';
1635          this.selectpicker.view.titleOption.value = '';
1636
1637          // Check if selected or data-selected attribute is already set on an option. If not, select the titleOption option.
1638          // the selected item may have been changed by user or programmatically before the bootstrap select plugin runs,
1639          // if so, the select will have the data-selected attribute
1640          selectTitleOption = !selectedOption || (selectedIndex === firstSelectableIndex && selectedOption.defaultSelected === false && this.$element.data('selected') === undefined);
1641        }
1642
1643        if (titleNotAppended || this.selectpicker.view.titleOption.index !== 0) {
1644          element.insertBefore(this.selectpicker.view.titleOption, element.firstChild);
1645        }
1646
1647        // Set selected *after* appending to select,
1648        // otherwise the option doesn't get selected in IE
1649        // set using selectedIndex, as setting the selected attr to true here doesn't work in IE11
1650        if (selectTitleOption && isNotBackForward) {
1651          element.selectedIndex = 0;
1652        } else if (document.readyState !== 'complete') {
1653          // if navigation type is back_forward, there's a chance the select will have its value set by BFCache
1654          // wait for that value to be set, then run render again
1655          window.addEventListener('pageshow', function () {
1656            if (that.selectpicker.view.displayedValue !== element.value) that.render();
1657          });
1658        }
1659      }
1660
1661      return updateIndex;
1662    },
1663
1664    fetchData: function (callback, type, page, searchValue) {
1665      page = page || 1;
1666      type = type || 'data';
1667
1668      var that = this,
1669          data = this.options.source[type],
1670          builtData;
1671
1672      if (data) {
1673        this.options.virtualScroll = true;
1674
1675        if (typeof data === 'function') {
1676          data.call(
1677            this,
1678            function (data, more, totalItems) {
1679              var current = that.selectpicker[type === 'search' ? 'search' : 'main'];
1680              current.hasMore = more;
1681              current.totalItems = totalItems;
1682              builtData = that.buildData(data, type);
1683              callback.call(that, builtData);
1684              that.$element.trigger('fetched' + EVENT_KEY);
1685            },
1686            page,
1687            searchValue
1688          );
1689        } else if (Array.isArray(data)) {
1690          builtData = that.buildData(data, type);
1691          callback.call(that, builtData);
1692        }
1693      } else {
1694        builtData = this.buildData(false, type);
1695        callback.call(that, builtData);
1696      }
1697    },
1698
1699    buildData: function (data, type) {
1700      var that = this;
1701      var dataGetter = data === false ? getOptionData.fromOption : getOptionData.fromDataSource;
1702
1703      var optionSelector = ':not([hidden]):not([data-hidden="true"]):not([style*="display: none"])',
1704          mainData = [],
1705          startLen = this.selectpicker.main.data ? this.selectpicker.main.data.length : 0,
1706          optID = 0,
1707          startIndex = this.setPlaceholder() && !data ? 1 : 0; // append the titleOption if necessary and skip the first option in the loop
1708
1709      if (type === 'search') {
1710        startLen = this.selectpicker.search.data.length;
1711      }
1712
1713      if (this.options.hideDisabled) optionSelector += ':not(:disabled)';
1714
1715      var selectOptions = data ? data.filter(filterHidden, this) : this.$element[0].querySelectorAll('select > *' + optionSelector);
1716
1717      function addDivider (config) {
1718        var previousData = mainData[mainData.length - 1];
1719
1720        // ensure optgroup doesn't create back-to-back dividers
1721        if (
1722          previousData &&
1723          previousData.type === 'divider' &&
1724          (previousData.optID || config.optID)
1725        ) {
1726          return;
1727        }
1728
1729        config = config || {};
1730        config.type = 'divider';
1731
1732        mainData.push(config);
1733      }
1734
1735      function addOption (item, config) {
1736        config = config || {};
1737
1738        config.divider = dataGetter(item, 'divider');
1739
1740        if (config.divider === true) {
1741          addDivider({
1742            optID: config.optID
1743          });
1744        } else {
1745          var liIndex = mainData.length + startLen,
1746              cssText = dataGetter(item, 'style'),
1747              inlineStyle = cssText ? htmlEscape(cssText) : '',
1748              optionClass = (item.className || '') + (config.optgroupClass || '');
1749
1750          if (config.optID) optionClass = 'opt ' + optionClass;
1751
1752          config.optionClass = optionClass.trim();
1753          config.inlineStyle = inlineStyle;
1754
1755          config.text = dataGetter(item, 'text');
1756          config.title = dataGetter(item, 'title');
1757          config.content = dataGetter(item, 'content');
1758          config.tokens = dataGetter(item, 'tokens');
1759          config.subtext = dataGetter(item, 'subtext');
1760          config.icon = dataGetter(item, 'icon');
1761
1762          config.display = config.content || config.text;
1763          config.value = item.value === undefined ? item.text : item.value;
1764          config.type = 'option';
1765          config.index = liIndex;
1766
1767          config.option = !item.option ? item : item.option; // reference option element if it exists
1768          config.option.liIndex = liIndex;
1769          config.selected = !!item.selected;
1770          config.disabled = config.disabled || !!item.disabled;
1771
1772          if (data !== false) {
1773            if (that.selectpicker.optionValuesDataMap[config.value]) {
1774              config = $.extend(that.selectpicker.optionValuesDataMap[config.value], config);
1775            } else {
1776              that.selectpicker.optionValuesDataMap[config.value] = config;
1777            }
1778          }
1779
1780          mainData.push(config);
1781        }
1782      }
1783
1784      function addOptgroup (index, selectOptions) {
1785        var optgroup = selectOptions[index],
1786            // skip placeholder option
1787            previous = index - 1 < startIndex ? false : selectOptions[index - 1],
1788            next = selectOptions[index + 1],
1789            options = data ? optgroup.children.filter(filterHidden, this) : optgroup.querySelectorAll('option' + optionSelector);
1790
1791        if (!options.length) return;
1792
1793        var config = {
1794              display: htmlEscape(dataGetter(item, 'label')),
1795              subtext: dataGetter(optgroup, 'subtext'),
1796              icon: dataGetter(optgroup, 'icon'),
1797              type: 'optgroup-label',
1798              optgroupClass: ' ' + (optgroup.className || ''),
1799              optgroup: optgroup
1800            },
1801            headerIndex,
1802            lastIndex;
1803
1804        optID++;
1805
1806        if (previous) {
1807          addDivider({ optID: optID });
1808        }
1809
1810        config.optID = optID;
1811
1812        mainData.push(config);
1813
1814        for (var j = 0, len = options.length; j < len; j++) {
1815          var option = options[j];
1816
1817          if (j === 0) {
1818            headerIndex = mainData.length - 1;
1819            lastIndex = headerIndex + len;
1820          }
1821
1822          addOption(option, {
1823            headerIndex: headerIndex,
1824            lastIndex: lastIndex,
1825            optID: config.optID,
1826            optgroupClass: config.optgroupClass,
1827            disabled: optgroup.disabled
1828          });
1829        }
1830
1831        if (next) {
1832          addDivider({ optID: optID });
1833        }
1834      }
1835
1836      for (var len = selectOptions.length, i = startIndex; i < len; i++) {
1837        var item = selectOptions[i],
1838            children = item.children;
1839
1840        if (children && children.length) {
1841          addOptgroup.call(this, i, selectOptions);
1842        } else {
1843          addOption.call(this, item, {});
1844        }
1845      }
1846
1847      switch (type) {
1848        case 'data': {
1849          if (!this.selectpicker.main.data) {
1850            this.selectpicker.main.data = [];
1851          }
1852          Array.prototype.push.apply(this.selectpicker.main.data, mainData);
1853          this.selectpicker.current.data = this.selectpicker.main.data;
1854          break;
1855        }
1856        case 'search': {
1857          Array.prototype.push.apply(this.selectpicker.search.data, mainData);
1858          break;
1859        }
1860      }
1861
1862      return mainData;
1863    },
1864
1865    buildList: function (size, searching) {
1866      var that = this,
1867          selectData = searching ? this.selectpicker.search.data : this.selectpicker.main.data,
1868          mainElements = [],
1869          widestOptionLength = 0;
1870
1871      if ((that.options.showTick || that.multiple) && !elementTemplates.checkMark.parentNode) {
1872        elementTemplates.checkMark.className = this.options.iconBase + ' ' + that.options.tickIcon + ' check-mark';
1873        elementTemplates.a.appendChild(elementTemplates.checkMark);
1874      }
1875
1876      function buildElement (mainElements, item) {
1877        var liElement,
1878            combinedLength = 0;
1879
1880        switch (item.type) {
vendor: 25,116 bytes, lines 1881-2473
1881          case 'divider':
1882            liElement = generateOption.li(
1883              false,
1884              classNames.DIVIDER,
1885              (item.optID ? item.optID + 'div' : undefined)
1886            );
1887
1888            break;
1889
1890          case 'option':
1891            liElement = generateOption.li(
1892              generateOption.a(
1893                generateOption.text.call(that, item),
1894                item.optionClass,
1895                item.inlineStyle
1896              ),
1897              '',
1898              item.optID
1899            );
1900
1901            if (liElement.firstChild) {
1902              liElement.firstChild.id = that.selectId + '-' + item.index;
1903            }
1904
1905            break;
1906
1907          case 'optgroup-label':
1908            liElement = generateOption.li(
1909              generateOption.label.call(that, item),
1910              'dropdown-header' + item.optgroupClass,
1911              item.optID
1912            );
1913
1914            break;
1915        }
1916
1917        if (!item.element) {
1918          item.element = liElement;
1919        } else {
1920          item.element.innerHTML = liElement.innerHTML;
1921        }
1922        mainElements.push(item.element);
1923
1924        // count the number of characters in the option - not perfect, but should work in most cases
1925        if (item.display) combinedLength += item.display.length;
1926        if (item.subtext) combinedLength += item.subtext.length;
1927        // if there is an icon, ensure this option's width is checked
1928        if (item.icon) combinedLength += 1;
1929
1930        if (combinedLength > widestOptionLength) {
1931          widestOptionLength = combinedLength;
1932
1933          // guess which option is the widest
1934          // use this when calculating menu width
1935          // not perfect, but it's fast, and the width will be updating accordingly when scrolling
1936          that.selectpicker.view.widestOption = mainElements[mainElements.length - 1];
1937        }
1938      }
1939
1940      var startIndex = size || 0;
1941
1942      for (var len = selectData.length, i = startIndex; i < len; i++) {
1943        var item = selectData[i];
1944
1945        buildElement(mainElements, item);
1946      }
1947
1948      if (size) {
1949        if (searching) {
1950          Array.prototype.push.apply(this.selectpicker.search.elements, mainElements);
1951        } else {
1952          Array.prototype.push.apply(this.selectpicker.main.elements, mainElements);
1953          this.selectpicker.current.elements = this.selectpicker.main.elements;
1954        }
1955      } else {
1956        if (searching) {
1957          this.selectpicker.search.elements = mainElements;
1958        } else {
1959          this.selectpicker.main.elements = this.selectpicker.current.elements = mainElements;
1960        }
1961      }
1962    },
1963
1964    findLis: function () {
1965      return this.$menuInner.find('.inner > li');
1966    },
1967
1968    render: function (init) {
1969      var that = this,
1970          element = this.$element[0],
1971          // ensure titleOption is appended and selected (if necessary) before getting selectedOptions
1972          placeholderSelected = this.setPlaceholder() && element.selectedIndex === 0,
1973          //selectedOptions = getSelectedOptions.call(this),
1974          selectedOptions = getSelectedOptions(element, this.options.hideDisabled),
1975          selectedCount = selectedOptions.length,
1976          //selectedValues = getSelectValues.call(this, selectedOptions),
1977          selectedValues = getSelectValues(element, selectedOptions),
1978          button = this.$button[0],
1979          buttonInner = button.querySelector('.filter-option-inner-inner'),
1980          multipleSeparator = document.createTextNode(this.options.multipleSeparator),
1981          titleFragment = elementTemplates.fragment.cloneNode(false),
1982          titleTipFragment = elementTemplates.fragment.cloneNode(false),
1983          showCount,
1984          countMax,
1985          hasContent = false;
1986
1987      function createSelected (item) {
1988        if (item.selected) {
1989          that.createOption(item, true);
1990        } else if (item.children && item.children.length) {
1991          item.children.map(createSelected);
1992        }
1993      }
1994
1995      // create selected option elements to ensure select value is correct
1996      if (this.options.source.data && init) {
1997        selectedOptions.map(createSelected);
1998        element.appendChild(this.selectpicker.main.optionQueue);
1999
2000        if (placeholderSelected) placeholderSelected = element.selectedIndex === 0;
2001      }
2002
2003      button.classList.toggle('bs-placeholder', that.multiple ? !selectedCount : !selectedValues && selectedValues !== 0);
2004
2005      if (!that.multiple && selectedOptions.length === 1) {
2006        that.selectpicker.view.displayedValue = selectedValues;
2007      }
2008
2009      if (this.options.selectedTextFormat === 'static') {
2010        titleFragment = generateOption.text.call(this, { text: this.options.placeholder }, true);
2011      } else {
2012        showCount = this.multiple && this.options.selectedTextFormat.indexOf('count') !== -1 && selectedCount > 0;
2013
2014        // determine if the number of selected options will be shown (showCount === true)
2015        if (showCount) {
2016          countMax = this.options.selectedTextFormat.split('>');
2017          showCount = (countMax.length > 1 && selectedCount > countMax[1]) || (countMax.length === 1 && selectedCount >= 2);
2018        }
2019
2020        // only loop through all selected options if the count won't be shown
2021        if (showCount === false) {
2022          if (!placeholderSelected) {
2023            for (var selectedIndex = 0; selectedIndex < selectedCount; selectedIndex++) {
2024              if (selectedIndex < 50) {
2025                var option = selectedOptions[selectedIndex],
2026                	thisData = this.selectpicker.main.data[option.liIndex],
2027                    titleOptions = {};
2028
2029                if (option) {
2030                  if (this.multiple && selectedIndex > 0) {
2031                    titleFragment.appendChild(multipleSeparator.cloneNode(false));
2032                  }
2033
2034                  if (option.title) {
2035                    titleOptions.text = option.title;
2036                  }else if(thisData){ 
2037                	if (thisData.content && that.options.showContent) {
2038                    titleOptions.content = thisData.content.toString();
2039                    hasContent = true;
2040                  } else {
2041                    if (that.options.showIcon) {
2042                      //titleOptions.icon = option.icon;
2043					  titleOptions.icon = thisData.icon;
2044                    }
2045                    if (that.options.showSubtext && !that.multiple && option.subtext) titleOptions.subtext = ' ' + option.subtext;
2046                    titleOptions.text = option.text.trim();
2047                  }
2048                }
2049                  titleFragment.appendChild(generateOption.text.call(this, titleOptions, true));
2050                }
2051              } else {
2052                break;
2053              }
2054            }
2055
2056            // add ellipsis
2057            if (selectedCount > 49) {
2058              titleFragment.appendChild(document.createTextNode('...'));
2059            }
2060          }
2061        } else {
2062          var optionSelector = ':not([hidden]):not([data-hidden="true"]):not([data-divider="true"]):not([style*="display: none"])';
2063          if (this.options.hideDisabled) optionSelector += ':not(:disabled)';
2064
2065          // If this is a multiselect, and selectedTextFormat is count, then show 1 of 2 selected, etc.
2066          var totalCount = this.$element[0].querySelectorAll('select > option' + optionSelector + ', optgroup' + optionSelector + ' option' + optionSelector).length,
2067              tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedCount, totalCount) : this.options.countSelectedText;
2068
2069          titleFragment = generateOption.text.call(this, {
2070            text: tr8nText.replace('{0}', selectedCount.toString()).replace('{1}', totalCount.toString())
2071          }, true);
2072        }
2073      }
2074
2075      // If the select doesn't have a title, then use the default, or if nothing is set at all, use noneSelectedText
2076      if (!titleFragment.childNodes.length) {
2077        titleFragment = generateOption.text.call(this, {
2078          text: this.options.placeholder ? this.options.placeholder : this.options.noneSelectedText
2079        }, true);
2080      }
2081
2082      // if the select has a title, apply it to the button, and if not, apply titleFragment text
2083      // strip all HTML tags and trim the result, then unescape any escaped tags
2084      button.title = titleFragment.textContent.replace(/<[^>]*>?/g, '').trim();
2085
2086      if (this.options.sanitize && hasContent) {
2087        sanitizeHtml([titleFragment], that.options.whiteList, that.options.sanitizeFn);
2088      }
2089
2090      buttonInner.innerHTML = '';
2091      buttonInner.appendChild(titleFragment);
2092
2093      if (this.options.titleTip && !button.querySelector('.title-tip')) {
2094        var titleTip = document.createElement('div');
2095        titleTip.setAttribute('class', 'title-tip');
2096        titleTipFragment = generateOption.text.call(this, {
2097          text: this.options.titleTip ? this.options.titleTip : ''
2098        }, true);
2099        titleTip.appendChild(titleTipFragment);
2100        button.querySelector('.filter-option').prepend(titleTip);
2101      }
2102
2103      if (version.major < 4 && this.$newElement[0].classList.contains('bs3-has-addon')) {
2104        var filterExpand = button.querySelector('.filter-expand'),
2105            clone = buttonInner.cloneNode(true);
2106
2107        clone.className = 'filter-expand';
2108
2109        if (filterExpand) {
2110          button.replaceChild(clone, filterExpand);
2111        } else {
2112          button.appendChild(clone);
2113        }
2114      }
2115
2116      this.$element.trigger('rendered' + EVENT_KEY);
2117    },
2118
2119    /**
2120     * @param [style]
2121     * @param [status]
2122     */
2123    setStyle: function (newStyle, status) {
2124      var button = this.$button[0],
2125          newElement = this.$newElement[0],
2126          style = this.options.style.trim(),
2127          buttonClass;
2128
2129      if (this.$element.attr('class')) {
2130        this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, ''));
2131      }
2132
2133      if (version.major < 4) {
2134        newElement.classList.add('bs3');
2135
2136        if (newElement.parentNode.classList && newElement.parentNode.classList.contains('input-group') &&
2137            (newElement.previousElementSibling || newElement.nextElementSibling) &&
2138            (newElement.previousElementSibling || newElement.nextElementSibling).classList.contains('input-group-addon')
2139        ) {
2140          newElement.classList.add('bs3-has-addon');
2141        }
2142      }
2143
2144      if (newStyle) {
2145        buttonClass = newStyle.trim();
2146      } else {
2147        buttonClass = style;
2148      }
2149
2150      if (status == 'add') {
2151        if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' '));
2152      } else if (status == 'remove') {
2153        if (buttonClass) button.classList.remove.apply(button.classList, buttonClass.split(' '));
2154      } else {
2155        if (style) button.classList.remove.apply(button.classList, style.split(' '));
2156        if (buttonClass) button.classList.add.apply(button.classList, buttonClass.split(' '));
2157      }
2158    },
2159
2160    liHeight: function (refresh) {
2161      if (!refresh && (this.options.size === false || Object.keys(this.sizeInfo).length)) return;
2162
2163      var newElement = elementTemplates.div.cloneNode(false),
2164          menu = elementTemplates.div.cloneNode(false),
2165          menuInner = elementTemplates.div.cloneNode(false),
2166          menuInnerInner = document.createElement('ul'),
2167          divider = elementTemplates.li.cloneNode(false),
2168          dropdownHeader = elementTemplates.li.cloneNode(false),
2169          li,
2170          a = elementTemplates.a.cloneNode(false),
2171          text = elementTemplates.span.cloneNode(false),
2172          header = this.options.header && this.$menu.find('.' + classNames.POPOVERHEADER).length > 0 ? this.$menu.find('.' + classNames.POPOVERHEADER)[0].cloneNode(true) : null,
2173          search = this.options.liveSearch ? elementTemplates.div.cloneNode(false) : null,
2174          actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null,
2175          doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null,
2176          firstOption = this.$element[0].options[0];
2177
2178      this.sizeInfo.selectWidth = this.$newElement[0].offsetWidth;
2179
2180      text.className = 'text';
2181      a.className = 'dropdown-item ' + (firstOption ? firstOption.className : '');
2182      newElement.className = this.$menu[0].parentNode.className + ' ' + classNames.SHOW;
2183      newElement.style.width = 0; // ensure button width doesn't affect natural width of menu when calculating
2184      if (this.options.width === 'auto') menu.style.minWidth = 0;
2185      menu.className = classNames.MENU + ' ' + classNames.SHOW;
2186      menuInner.className = 'inner ' + classNames.SHOW;
2187      menuInnerInner.className = classNames.MENU + ' inner ' + (version.major >= '4' ? classNames.SHOW : '');
2188      divider.className = classNames.DIVIDER;
2189      dropdownHeader.className = 'dropdown-header';
2190
2191      text.appendChild(document.createTextNode('\u200b'));
2192
2193      if (this.selectpicker.current.data.length) {
2194        for (var i = 0; i < this.selectpicker.current.data.length; i++) {
2195          var data = this.selectpicker.current.data[i];
2196          if (data.type === 'option' && $(data.element.firstChild).css('display') !== 'none') {
2197            li = data.element;
2198            break;
2199          }
2200        }
2201      } else {
2202        li = elementTemplates.li.cloneNode(false);
2203        a.appendChild(text);
2204        li.appendChild(a);
2205      }
2206
2207      dropdownHeader.appendChild(text.cloneNode(true));
2208
2209      if (this.selectpicker.view.widestOption) {
2210        menuInnerInner.appendChild(this.selectpicker.view.widestOption.cloneNode(true));
2211      }
2212
2213      menuInnerInner.appendChild(li);
2214      menuInnerInner.appendChild(divider);
2215      menuInnerInner.appendChild(dropdownHeader);
2216      if (header) menu.appendChild(header);
2217      if (search) {
2218        var input = document.createElement('input');
2219        search.className = 'bs-searchbox';
2220        input.className = 'form-control';
2221        search.appendChild(input);
2222        menu.appendChild(search);
2223      }
2224      if (actions) menu.appendChild(actions);
2225      menuInner.appendChild(menuInnerInner);
2226      menu.appendChild(menuInner);
2227      if (doneButton) menu.appendChild(doneButton);
2228      newElement.appendChild(menu);
2229
2230      document.body.appendChild(newElement);
2231
2232      var liHeight = li.offsetHeight,
2233          dropdownHeaderHeight = dropdownHeader ? dropdownHeader.offsetHeight : 0,
2234          headerHeight = header ? header.offsetHeight : 0,
2235          searchHeight = search ? search.offsetHeight : 0,
2236          actionsHeight = actions ? actions.offsetHeight : 0,
2237          doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,
2238          dividerHeight = $(divider).outerHeight(true),
2239          menuStyle = window.getComputedStyle(menu),
2240          menuWidth = menu.offsetWidth,
2241          menuPadding = {
2242            vert: toInteger(menuStyle.paddingTop) +
2243                  toInteger(menuStyle.paddingBottom) +
2244                  toInteger(menuStyle.borderTopWidth) +
2245                  toInteger(menuStyle.borderBottomWidth),
2246            horiz: toInteger(menuStyle.paddingLeft) +
2247                  toInteger(menuStyle.paddingRight) +
2248                  toInteger(menuStyle.borderLeftWidth) +
2249                  toInteger(menuStyle.borderRightWidth)
2250          },
2251          menuExtras = {
2252            vert: menuPadding.vert +
2253                  toInteger(menuStyle.marginTop) +
2254                  toInteger(menuStyle.marginBottom) + 2,
2255            horiz: menuPadding.horiz +
2256                  toInteger(menuStyle.marginLeft) +
2257                  toInteger(menuStyle.marginRight) + 2
2258          },
2259          scrollBarWidth;
2260
2261      menuInner.style.overflowY = 'scroll';
2262
2263      scrollBarWidth = menu.offsetWidth - menuWidth;
2264
2265      document.body.removeChild(newElement);
2266
2267      this.sizeInfo.liHeight = liHeight;
2268      this.sizeInfo.dropdownHeaderHeight = dropdownHeaderHeight;
2269      this.sizeInfo.headerHeight = headerHeight;
2270      this.sizeInfo.searchHeight = searchHeight;
2271      this.sizeInfo.actionsHeight = actionsHeight;
2272      this.sizeInfo.doneButtonHeight = doneButtonHeight;
2273      this.sizeInfo.dividerHeight = dividerHeight;
2274      this.sizeInfo.menuPadding = menuPadding;
2275      this.sizeInfo.menuExtras = menuExtras;
2276      this.sizeInfo.menuWidth = menuWidth;
2277      this.sizeInfo.menuInnerInnerWidth = menuWidth - menuPadding.horiz;
2278      this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth;
2279      this.sizeInfo.scrollBarWidth = scrollBarWidth;
2280      this.sizeInfo.selectHeight = this.$newElement[0].offsetHeight;
2281
2282      this.setPositionData();
2283    },
2284
2285    getSelectPosition: function () {
2286      var that = this,
2287          $window = $(window),
2288          pos = that.$newElement.offset(),
2289          $container = $(that.options.container),
2290          containerPos;
2291
2292      if (that.options.container && $container.length && !$container.is('body')) {
2293        containerPos = $container.offset();
2294        containerPos.top += parseInt($container.css('borderTopWidth'));
2295        containerPos.left += parseInt($container.css('borderLeftWidth'));
2296      } else {
2297        containerPos = { top: 0, left: 0 };
2298      }
2299
2300      var winPad = that.options.windowPadding;
2301
2302      this.sizeInfo.selectOffsetTop = pos.top - containerPos.top - $window.scrollTop();
2303      this.sizeInfo.selectOffsetBot = $window.height() - this.sizeInfo.selectOffsetTop - this.sizeInfo.selectHeight - containerPos.top - winPad[2];
2304      this.sizeInfo.selectOffsetLeft = pos.left - containerPos.left - $window.scrollLeft();
2305      this.sizeInfo.selectOffsetRight = $window.width() - this.sizeInfo.selectOffsetLeft - this.sizeInfo.selectWidth - containerPos.left - winPad[1];
2306      this.sizeInfo.selectOffsetTop -= winPad[0];
2307      this.sizeInfo.selectOffsetLeft -= winPad[3];
2308    },
2309
2310    setMenuSize: function (isAuto) {
2311      this.getSelectPosition();
2312
2313      var selectWidth = this.sizeInfo.selectWidth,
2314          liHeight = this.sizeInfo.liHeight,
2315          headerHeight = this.sizeInfo.headerHeight,
2316          searchHeight = this.sizeInfo.searchHeight,
2317          actionsHeight = this.sizeInfo.actionsHeight,
2318          doneButtonHeight = this.sizeInfo.doneButtonHeight,
2319          divHeight = this.sizeInfo.dividerHeight,
2320          menuPadding = this.sizeInfo.menuPadding,
2321          menuInnerHeight,
2322          menuHeight,
2323          divLength = 0,
2324          minHeight,
2325          _minHeight,
2326          maxHeight,
2327          menuInnerMinHeight,
2328          estimate,
2329          isDropup;
2330
2331      if (this.options.dropupAuto) {
2332        // Get the estimated height of the menu without scrollbars.
2333        // This is useful for smaller menus, where there might be plenty of room
2334        // below the button without setting dropup, but we can't know
2335        // the exact height of the menu until createView is called later
2336        estimate = liHeight * this.selectpicker.current.data.length + menuPadding.vert;
2337
2338        isDropup = this.sizeInfo.selectOffsetTop - this.sizeInfo.selectOffsetBot > this.sizeInfo.menuExtras.vert && estimate + this.sizeInfo.menuExtras.vert + 50 > this.sizeInfo.selectOffsetBot;
2339
2340        // ensure dropup doesn't change while searching (so menu doesn't bounce back and forth)
2341        if (this.selectpicker.isSearching === true) {
2342          isDropup = this.selectpicker.dropup;
2343        }
2344
2345        this.$newElement.toggleClass(classNames.DROPUP, isDropup);
2346        this.selectpicker.dropup = isDropup;
2347      }
2348
2349      if (this.options.size === 'auto') {
2350        _minHeight = this.selectpicker.current.data.length > 3 ? this.sizeInfo.liHeight * 3 + this.sizeInfo.menuExtras.vert - 2 : 0;
2351        menuHeight = this.sizeInfo.selectOffsetBot - this.sizeInfo.menuExtras.vert;
2352        minHeight = _minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight;
2353        menuInnerMinHeight = Math.max(_minHeight - menuPadding.vert, 0);
2354
2355        if (this.$newElement.hasClass(classNames.DROPUP)) {
2356          menuHeight = this.sizeInfo.selectOffsetTop - this.sizeInfo.menuExtras.vert;
2357        }
2358
2359        maxHeight = menuHeight;
2360        menuInnerHeight = menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding.vert;
2361      } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) {
2362        for (var i = 0; i < this.options.size; i++) {
2363          if (this.selectpicker.current.data[i].type === 'divider') divLength++;
2364        }
2365
2366        menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding.vert;
2367        menuInnerHeight = menuHeight - menuPadding.vert;
2368        maxHeight = menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight;
2369        minHeight = menuInnerMinHeight = '';
2370      }
2371
2372      this.$menu.css({
2373        'max-height': maxHeight + 'px',
2374        'overflow': 'hidden',
2375        'min-height': minHeight + 'px'
2376      });
2377
2378      this.$menuInner.css({
2379        'max-height': menuInnerHeight + 'px',
2380        'overflow': 'hidden auto',
2381        'min-height': menuInnerMinHeight + 'px'
2382      });
2383
2384      // ensure menuInnerHeight is always a positive number to prevent issues calculating chunkSize in createView
2385      this.sizeInfo.menuInnerHeight = Math.max(menuInnerHeight, 1);
2386
2387      if (this.selectpicker.current.data.length && this.selectpicker.current.data[this.selectpicker.current.data.length - 1].position > this.sizeInfo.menuInnerHeight) {
2388        this.sizeInfo.hasScrollBar = true;
2389        this.sizeInfo.totalMenuWidth = this.sizeInfo.menuWidth + this.sizeInfo.scrollBarWidth;
2390      }
2391
2392      if (this.options.dropdownAlignRight === 'auto') {
2393        this.$menu.toggleClass(classNames.MENURIGHT, this.sizeInfo.selectOffsetLeft > this.sizeInfo.selectOffsetRight && this.sizeInfo.selectOffsetRight < (this.sizeInfo.totalMenuWidth - selectWidth));
2394      }
2395
2396      if (this.dropdown && this.dropdown._popper) this.dropdown._popper.update();
2397    },
2398
2399    setSize: function (refresh) {
2400      this.liHeight(refresh);
2401
2402      if (this.options.header) this.$menu.css('padding-top', 0);
2403
2404      if (this.options.size !== false) {
2405        var that = this,
2406            $window = $(window);
2407
2408        this.setMenuSize();
2409
2410        if (this.options.liveSearch) {
2411          this.$searchbox
2412            .off('input.setMenuSize propertychange.setMenuSize')
2413            .on('input.setMenuSize propertychange.setMenuSize', function () {
2414              return that.setMenuSize();
2415            });
2416        }
2417
2418        if (this.options.size === 'auto') {
2419          $window
2420            .off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize')
2421            .on('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize', function () {
2422              return that.setMenuSize();
2423            });
2424        } else if (this.options.size && this.options.size != 'auto' && this.selectpicker.current.elements.length > this.options.size) {
2425          $window.off('resize' + EVENT_KEY + '.' + this.selectId + '.setMenuSize' + ' scroll' + EVENT_KEY + '.' + this.selectId + '.setMenuSize');
2426        }
2427      }
2428
2429      this.createView(false, true, refresh);
2430    },
2431
2432    setWidth: function () {
2433      var that = this;
2434
2435      if (this.options.width === 'auto') {
2436        requestAnimationFrame(function () {
2437          that.$menu.css('min-width', '0');
2438
2439          that.$element.on('loaded' + EVENT_KEY, function () {
2440            that.liHeight();
2441            that.setMenuSize();
2442
2443            // Get correct width if element is hidden
2444            var $selectClone = that.$newElement.clone().appendTo('body'),
2445                btnWidth = $selectClone.css('width', 'auto').children('button').outerWidth();
2446
2447            $selectClone.remove();
2448
2449            // Set width to whatever's larger, button title or longest option
2450            that.sizeInfo.selectWidth = Math.max(that.sizeInfo.totalMenuWidth, btnWidth);
2451            that.$newElement.css('width', that.sizeInfo.selectWidth + 'px');
2452          });
2453        });
2454      } else if (this.options.width === 'fit') {
2455        // Remove inline min-width so width can be changed from 'auto'
2456        this.$menu.css('min-width', '');
2457        this.$newElement.css('width', '').addClass('fit-width');
2458      } else if (this.options.width) {
2459        // Remove inline min-width so width can be changed from 'auto'
2460        this.$menu.css('min-width', '');
2461        this.$newElement.css('width', this.options.width);
2462      } else {
2463        // Remove inline min-width/width so width can be changed
2464        this.$menu.css('min-width', '');
2465        this.$newElement.css('width', '');
2466      }
2467      // Remove fit-width class if width is changed programmatically
2468      if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
2469        this.$newElement[0].classList.remove('fit-width');
2470      }
2471    },
2472
2473    selectPosition: function () {
2474      this.$bsContainer = $('<div class="bs-container" />');
2475
2476      var that = this,
2477          $container = $(this.options.container),
2478          pos,
2479          containerPos,
2480          actualHeight,
2481          getPlacement = function ($element) {
2482            var containerPosition = {},
2483                // fall back to dropdown's default display setting if display is not manually set
2484                display = that.options.display || (
2485                  // Bootstrap 3 doesn't have $.fn.dropdown.Constructor.Default
2486                  $.fn.dropdown.Constructor.Default ? $.fn.dropdown.Constructor.Default.display
2487                  : false
2488                );
2489
2490            that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass(classNames.DROPUP, $element.hasClass(classNames.DROPUP));
2491            pos = $element.offset();
2492
2493            if (!$container.is('body')) {
2494              containerPos = $container.offset();
2495              containerPos.top += parseInt($container.css('borderTopWidth')) - $container.scrollTop();
2496              containerPos.left += parseInt($container.css('borderLeftWidth')) - $container.scrollLeft();
2497            } else {
2498              containerPos = { top: 0, left: 0 };
2499            }
2500
2501            actualHeight = $element.hasClass(classNames.DROPUP) ? 0 : $element[0].offsetHeight;
2502
2503            // Bootstrap 4+ uses Popper for menu positioning
2504            if (version.major < 4 || display === 'static') {
2505              containerPosition.top = pos.top - containerPos.top + actualHeight;
2506              containerPosition.left = pos.left - containerPos.left;
2507            }
2508
2509            containerPosition.width = $element[0].offsetWidth;
2510
2511            that.$bsContainer.css(containerPosition);
2512          };
2513
2514      this.$button.on('click.bs.dropdown.data-api', function () {
2515        if (that.isDisabled()) {
2516          return;
2517        }
2518
2519        getPlacement(that.$newElement);
2520
2521        that.$bsContainer
2522          .appendTo(that.options.container)
2523          .toggleClass(classNames.SHOW, !that.$button.hasClass(classNames.SHOW))
2524          .append(that.$menu);
2525      });
2526
2527      $(window)
2528        .off('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId)
2529        .on('resize' + EVENT_KEY + '.' + this.selectId + ' scroll' + EVENT_KEY + '.' + this.selectId, function () {
2530          var isActive = that.$newElement.hasClass(classNames.SHOW);
2531
2532          if (isActive) getPlacement(that.$newElement);
2533        });
2534
2535      this.$element.on('hide' + EVENT_KEY, function () {
2536        that.$menu.data('height', that.$menu.height());
2537        that.$bsContainer.detach();
2538      });
2539    },
2540
2541    createOption: function (data, init) {
2542      var optionData = !data.option ? data : data.option;
2543
2544      if (optionData && optionData.nodeType !== 1) {
2545        var option = (init ? elementTemplates.selectedOption : elementTemplates.option).cloneNode(true);
2546        if (optionData.value !== undefined) option.value = optionData.value;
2547        option.textContent = optionData.text;
2548
2549        option.selected = true;
2550
2551        if (optionData.liIndex !== undefined) {
2552          option.liIndex = optionData.liIndex;
2553        } else if (!init) {
2554          option.liIndex = data.index;
2555        }
2556
2557        data.option = option;
2558
2559        this.selectpicker.main.optionQueue.appendChild(option);
2560      }
2561    },
2562
2563    setOptionStatus: function (selectedOnly) {
2564      var that = this;
2565
2566      that.noScroll = false;
2567
2568      if (that.selectpicker.view.visibleElements && that.selectpicker.view.visibleElements.length) {
2569        for (var i = 0; i < that.selectpicker.view.visibleElements.length; i++) {
2570          var liData = that.selectpicker.current.data[i + that.selectpicker.view.position0],
2571              option = liData.option;
2572
2573          if (option) {
2574            if (selectedOnly !== true) {
2575              that.setDisabled(liData);
2576            }
2577
2578            that.setSelected(liData);
2579          }
2580        }
2581
2582        // append optionQueue (documentFragment with option elements for select options)
2583        if (this.options.source.data) this.$element[0].appendChild(this.selectpicker.main.optionQueue);
2584      }
2585    },
2586
2587    /**
2588     * @param {Object} liData - the option object that is being changed
2589     * @param {boolean} selected - true if the option is being selected, false if being deselected
2590     */
2591    setSelected: function (liData, selected) {
2592      selected = selected === undefined ? liData.selected : selected;
2593
2594      var li = liData.element,
2595          activeElementIsSet = this.activeElement !== undefined,
2596          thisIsActive = this.activeElement === li,
2597          prevActive,
2598          a,
2599          // if current option is already active
2600          // OR
2601          // if the current option is being selected, it's NOT multiple, and
2602          // activeElement is undefined:
2603          //  - when the menu is first being opened, OR
2604          //  - after a search has been performed, OR
2605          //  - when retainActive is false when selecting a new option (i.e. index of the newly selected option is not the same as the current activeElement)
2606          keepActive = thisIsActive || (selected && !this.multiple && !activeElementIsSet);
2607
2608      if (!li) return;
2609
2610      if (selected !== undefined) {
2611        liData.selected = selected;
2612        if (liData.option) liData.option.selected = selected;
2613      }
2614
2615      if (selected && this.options.source.data) {
2616        this.createOption(liData, false);
2617      }
2618
2619      a = li.firstChild;
2620
2621      if (selected) {
2622        this.selectedElement = li;
2623      }
2624
2625      li.classList.toggle('selected', selected);
2626
2627      if (keepActive) {
2628        this.focusItem(li, liData);
2629        this.selectpicker.view.currentActive = li;
2630        this.activeElement = li;
2631      } else {
2632        this.defocusItem(li);
2633      }
2634
2635      if (a) {
2636        a.classList.toggle('selected', selected);
2637
2638        if (selected) {
2639          a.setAttribute('aria-selected', true);
2640        } else {
2641          if (this.multiple) {
2642            a.setAttribute('aria-selected', false);
2643          } else {
2644            a.removeAttribute('aria-selected');
2645          }
2646        }
2647      }
2648
2649      if (!keepActive && !activeElementIsSet && selected && this.prevActiveElement !== undefined) {
2650        prevActive = this.prevActiveElement;
2651
2652        this.defocusItem(prevActive);
2653      }
2654    },
2655
2656    /**
2657     * @param {number} index - the index of the option that is being disabled
2658     * @param {boolean} disabled - true if the option is being disabled, false if being enabled
2659     */
2660    setDisabled: function (liData) {
2661      var disabled = liData.disabled,
2662          li = liData.element,
2663          a;
2664
2665      if (!li) return;
2666
2667      a = li.firstChild;
2668
2669      li.classList.toggle(classNames.DISABLED, disabled);
2670
2671      if (a) {
2672        if (version.major >= '4') a.classList.toggle(classNames.DISABLED, disabled);
2673
2674        if (disabled) {
2675          a.setAttribute('aria-disabled', disabled);
2676          a.setAttribute('tabindex', -1);
2677        } else {
2678          a.removeAttribute('aria-disabled');
2679          a.setAttribute('tabindex', 0);
2680        }
2681      }
2682    },
2683
2684    isDisabled: function () {
2685      return this.$element[0].disabled;
2686    },
2687
2688    checkDisabled: function () {
2689      if (this.isDisabled()) {
2690        this.$newElement[0].classList.add(classNames.DISABLED);
2691        this.$button.addClass(classNames.DISABLED).attr('aria-disabled', true);
2692      } else {
2693        if (this.$button[0].classList.contains(classNames.DISABLED)) {
2694          this.$newElement[0].classList.remove(classNames.DISABLED);
2695          this.$button.removeClass(classNames.DISABLED).attr('aria-disabled', false);
2696        }
2697      }
2698    },
2699
2700    clickListener: function () {
2701      var that = this,
2702          $document = $(document);
2703
2704      $document.data('spaceSelect', false);
2705
2706      this.$button.on('keyup', function (e) {
2707        if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) {
2708          e.preventDefault();
2709          $document.data('spaceSelect', false);
2710        }
2711      });
2712
2713      this.$newElement.on('show.bs.dropdown', function () {
2714        if (!that.dropdown && version.major >= '4') {
2715          that.dropdown = that.$button.data('bs.dropdown');
2716          that.dropdown._menu = that.$menu[0];
2717        }
2718      });
2719
2720      function clearSelection (e) {
2721        if (that.multiple) {
2722          that.deselectAll();
2723        } else {
2724          var element = that.$element[0],
2725              prevValue = element.value,
2726              prevIndex = element.selectedIndex,
2727              prevOption = element.options[prevIndex],
2728              prevData = prevOption ? that.selectpicker.main.data[prevOption.liIndex] : false;
2729
2730          if (prevData) {
2731            that.setSelected(prevData, false);
2732          }
2733
2734          element.selectedIndex = 0;
2735
2736          changedArguments = [prevIndex, false, prevValue];
2737          that.$element.triggerNative('change');
2738        }
2739
2740        // remove selected styling if menu is open
2741        if (that.$newElement.hasClass(classNames.SHOW)) {
2742          if (that.options.liveSearch) {
2743            that.$searchbox.trigger('focus');
2744          }
2745
2746          that.createView(false);
2747        }
2748      }
2749
2750      this.$button.on('click.bs.dropdown.data-api', function (e) {
2751        if (that.options.allowClear) {
2752          var target = e.target,
2753              clearButton = that.$clearButton[0];
2754
2755          // IE doesn't support event listeners on child elements of buttons
2756          if (/MSIE|Trident/.test(window.navigator.userAgent)) {
2757            target = document.elementFromPoint(e.clientX, e.clientY);
2758          }
2759
2760          if (target === clearButton || target.parentElement === clearButton) {
2761            e.stopImmediatePropagation();
2762            clearSelection(e);
2763          }
2764        }
2765
2766        if (!that.$newElement.hasClass(classNames.SHOW)) {
2767          that.setSize();
2768        }
2769      });
2770
2771      function setFocus () {
2772        if (that.options.liveSearch) {
2773          that.$searchbox.trigger('focus');
2774        } else {
2775          that.$menuInner.trigger('focus');
2776        }
2777      }
2778
2779      function checkPopperExists () {
2780        if (that.dropdown && that.dropdown._popper && that.dropdown._popper.state) {
2781          setFocus();
2782        } else {
2783          requestAnimationFrame(checkPopperExists);
2784        }
2785      }
2786
2787      this.$element.on('shown' + EVENT_KEY, function () {
2788        if (that.$menuInner[0].scrollTop !== that.selectpicker.view.scrollTop) {
2789          that.$menuInner[0].scrollTop = that.selectpicker.view.scrollTop;
2790        }
2791
2792        if (version.major > 3) {
2793          requestAnimationFrame(checkPopperExists);
2794        } else {
2795          setFocus();
2796        }
2797      });
2798
2799      // ensure posinset and setsize are correct before selecting an option via a click
2800      this.$menuInner.on('mouseenter', 'li a', function (e) {
2801        var hoverLi = this.parentElement,
2802            position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0,
2803            index = Array.prototype.indexOf.call(hoverLi.parentElement.children, hoverLi),
2804            hoverData = that.selectpicker.current.data[index + position0];
2805
2806        that.focusItem(hoverLi, hoverData, true);
2807      });
2808
2809      this.$menuInner.on('click', 'li a', function (e, retainActive) {
2810        var $this = $(this),
2811            element = that.$element[0],
2812            position0 = that.isVirtual() ? that.selectpicker.view.position0 : 0,
2813            clickedData = that.selectpicker.current.data[$this.parent().index() + position0],
2814            clickedElement = clickedData.element,
2815            prevValue = getSelectValues(element),
2816            prevIndex = element.selectedIndex,
2817            prevOption = element.options[prevIndex],
2818            prevData = prevOption ? that.selectpicker.main.data[prevOption.liIndex] : false,
2819            triggerChange = true;
2820
2821        // Don't close on multi choice menu
2822        if (that.multiple && that.options.maxOptions !== 1) {
2823          e.stopPropagation();
2824        }
2825
2826        e.preventDefault();
2827
2828        // Don't run if the select is disabled
2829        if (!that.isDisabled() && !$this.parent().hasClass(classNames.DISABLED)) {
2830          var option = clickedData.option,
2831              $option = $(option),
2832              state = option.selected,
2833              optgroupData = that.selectpicker.current.data.find(function (datum) {
2834                return datum.optID === clickedData.optID && datum.type === 'optgroup-label';
2835              }),
2836              optgroup = optgroupData ? optgroupData.optgroup : undefined,
2837              dataGetter = optgroup instanceof Element ? getOptionData.fromOption : getOptionData.fromDataSource,
2838              optgroupOptions = optgroup && optgroup.children,
2839              maxOptions = parseInt(that.options.maxOptions),
2840              maxOptionsGrp = optgroup && parseInt(dataGetter(optgroup, 'maxOptions')) || false;
2841
2842          if (clickedElement === that.activeElement) retainActive = true;
2843
2844          if (!retainActive) {
2845            that.prevActiveElement = that.activeElement;
2846            that.activeElement = undefined;
2847          }
2848
2849          if (!that.multiple || maxOptions === 1) { // Deselect previous option if not multi select
2850        	  //if (prevData) that.setSelected(prevData, false);
2851        	  //that.setSelected(clickedData, true);
2852        	  if (prevData) that.setSelected(prevData, !!state);
2853        	  that.setSelected(clickedData, !state);
2854          } else { // Toggle the clicked option if multi select.
2855            that.setSelected(clickedData, !state);
2856            that.focusedParent.focus();
2857
2858            if (maxOptions !== false || maxOptionsGrp !== false) {
2859              var maxReached = maxOptions < getSelectedOptions(element).length,
2860                  selectedGroupOptions = 0;
2861
2862              if (optgroup && optgroup.children) {
2863                for (var i = 0; i < optgroup.children.length; i++) {
2864                  if (optgroup.children[i].selected) selectedGroupOptions++;
2865                }
2866              }
2867
2868              var maxReachedGrp = maxOptionsGrp < selectedGroupOptions;
2869
2870              if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) {
2871                if (maxOptions && maxOptions === 1) {
2872                  element.selectedIndex = -1;
2873                  that.setOptionStatus(true);
2874                } else if (maxOptionsGrp && maxOptionsGrp === 1) {
2875                  for (var i = 0; i < optgroupOptions.length; i++) {
2876                    var _option = optgroupOptions[i];
2877                    that.setSelected(that.selectpicker.current.data[_option.liIndex], false);
2878                  }
2879
2880                  that.setSelected(clickedData, true);
2881                } else {
2882                  var maxOptionsText = typeof that.options.maxOptionsText === 'string' ? [that.options.maxOptionsText, that.options.maxOptionsText] : that.options.maxOptionsText,
2883                      maxOptionsArr = typeof maxOptionsText === 'function' ? maxOptionsText(maxOptions, maxOptionsGrp) : maxOptionsText,
2884                      maxTxt = maxOptionsArr[0].replace('{n}', maxOptions),
2885                      maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp),
2886                      $notify = $('<div class="notify"></div>');
2887                  // If {var} is set in array, replace it
2888                  /** @deprecated */
2889                  if (maxOptionsArr[2]) {
2890                    maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]);
2891                    maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]);
2892                  }
2893
2894                  that.$menu.append($notify);
2895
2896                  if (maxOptions && maxReached) {
2897                    $notify.append($('<div>' + maxTxt + '</div>'));
2898                    triggerChange = false;
vendor: 6,747 bytes, lines 2899-3087
2899                    that.$element.trigger('maxReached' + EVENT_KEY);
2900                  }
2901
2902                  if (maxOptionsGrp && maxReachedGrp) {
2903                    $notify.append($('<div>' + maxTxtGrp + '</div>'));
2904                    triggerChange = false;
2905                    that.$element.trigger('maxReachedGrp' + EVENT_KEY);
2906                  }
2907
2908                  setTimeout(function () {
2909                    that.setSelected(clickedData, false);
2910                  }, 10);
2911
2912                  $notify[0].classList.add('fadeOut');
2913
2914                  setTimeout(function () {
2915                    $notify.remove();
2916                  }, 1050);
2917                }
2918              }
2919            }
2920          }
2921
2922          if (that.options.source.data) that.$element[0].appendChild(that.selectpicker.main.optionQueue);
2923
2924          if (!that.multiple || (that.multiple && that.options.maxOptions === 1)) {
2925            that.$button.trigger('focus');
2926          } else if (that.options.liveSearch) {
2927            that.$searchbox.trigger('focus');
2928          }
2929
2930          // Trigger select 'change'
2931          if (triggerChange) {
2932            if (that.multiple || prevIndex !== element.selectedIndex) {
2933              // $option.prop('selected') is current option state (selected/unselected). prevValue is the value of the select prior to being changed.
2934              changedArguments = [option.index, $option.prop('selected'), prevValue];
2935              that.$element
2936                .triggerNative('change');
2937            }
2938          }
2939        }
2940      });
2941
2942      this.$menu.on('click', 'li.' + classNames.DISABLED + ' a, .' + classNames.POPOVERHEADER + ', .' + classNames.POPOVERHEADER + ' :not(.close)', function (e) {
2943        if (e.currentTarget == this) {
2944          e.preventDefault();
2945          e.stopPropagation();
2946          if (that.options.liveSearch && !$(e.target).hasClass('close')) {
2947            that.$searchbox.trigger('focus');
2948          } else {
2949            that.$button.trigger('focus');
2950          }
2951        }
2952      });
2953
2954      this.$menuInner.on('click', '.divider, .dropdown-header', function (e) {
2955        e.preventDefault();
2956        e.stopPropagation();
2957        if (that.options.liveSearch) {
2958          that.$searchbox.trigger('focus');
2959        } else {
2960          that.$button.trigger('focus');
2961        }
2962      });
2963
2964      this.$menu.on('click', '.' + classNames.POPOVERHEADER + ' .close', function () {
2965        that.$button.trigger('click');
2966      });
2967
2968      this.$searchbox.on('click', function (e) {
2969        e.stopPropagation();
2970      });
2971
2972      this.$menu.on('click', '.actions-btn', function (e) {
2973        if (that.options.liveSearch) {
2974          that.$searchbox.trigger('focus');
2975        } else {
2976          that.$button.trigger('focus');
2977        }
2978
2979        e.preventDefault();
2980        e.stopPropagation();
2981
2982        if ($(this).hasClass('bs-select-all')) {
2983          that.selectAll();
2984        } else {
2985          that.deselectAll();
2986        }
2987      });
2988
2989      this.$button
2990        .on('focus' + EVENT_KEY, function (e) {
2991          var tabindex = that.$element[0].getAttribute('tabindex');
2992
2993          // only change when button is actually focused
2994          if (tabindex !== undefined && e.originalEvent && e.originalEvent.isTrusted) {
2995            // apply select element's tabindex to ensure correct order is followed when tabbing to the next element
2996            this.setAttribute('tabindex', tabindex);
2997            // set element's tabindex to -1 to allow for reverse tabbing
2998            that.$element[0].setAttribute('tabindex', -1);
2999            that.selectpicker.view.tabindex = tabindex;
3000          }
3001        })
3002        .on('blur' + EVENT_KEY, function (e) {
3003          // revert everything to original tabindex
3004          if (that.selectpicker.view.tabindex !== undefined && e.originalEvent && e.originalEvent.isTrusted) {
3005            that.$element[0].setAttribute('tabindex', that.selectpicker.view.tabindex);
3006            this.setAttribute('tabindex', -1);
3007            that.selectpicker.view.tabindex = undefined;
3008          }
3009        });
3010
3011      this.$element
3012        .on('change' + EVENT_KEY, function () {
3013          that.render();
3014          that.$element.trigger('changed' + EVENT_KEY, changedArguments);
3015          changedArguments = null;
3016        })
3017        .on('focus' + EVENT_KEY, function () {
3018          if (!that.options.mobile) that.$button[0].focus();
3019        });
3020    },
3021
3022    liveSearchListener: function () {
3023      var that = this;
3024
3025      this.$button.on('click.bs.dropdown.data-api', function () {
3026        if (!!that.$searchbox.val()) {
3027          that.$searchbox.val('');
3028          that.selectpicker.search.previousValue = undefined;
3029        }
3030      });
3031
3032      this.$searchbox.on('click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api', function (e) {
3033        e.stopPropagation();
3034      });
3035
3036      this.$searchbox.on('input propertychange', function () {
3037        var searchValue = that.$searchbox[0].value;
3038
3039        that.selectpicker.search.elements = [];
3040        that.selectpicker.search.data = [];
3041
3042        if (searchValue) {
3043          that.selectpicker.search.previousValue = searchValue;
3044
3045          if (that.options.source.search) {
3046            that.fetchData(function (builtData) {
3047              that.render();
3048              that.buildList(undefined, true);
3049              that.noScroll = true;
3050              that.$menuInner.scrollTop(0);
3051              that.createView(true);
3052              showNoResults.call(that, builtData, searchValue);
3053            }, 'search', 0, searchValue);
3054          } else {
3055            var i,
3056                searchMatch = [],
3057                q = searchValue.toUpperCase(),
3058                cache = {},
3059                cacheArr = [],
3060                searchStyle = that._searchStyle(),
3061                normalizeSearch = that.options.liveSearchNormalize;
3062
3063            if (normalizeSearch) q = normalizeToBase(q);
3064
3065            for (var i = 0; i < that.selectpicker.main.data.length; i++) {
3066              var li = that.selectpicker.main.data[i];
3067
3068              if (!cache[i]) {
3069                cache[i] = stringSearch(li, q, searchStyle, normalizeSearch);
3070              }
3071
3072              if (cache[i] && li.headerIndex !== undefined && cacheArr.indexOf(li.headerIndex) === -1) {
3073                if (li.headerIndex > 0) {
3074                  cache[li.headerIndex - 1] = true;
3075                  cacheArr.push(li.headerIndex - 1);
3076                }
3077
3078                cache[li.headerIndex] = true;
3079                cacheArr.push(li.headerIndex);
3080
3081                cache[li.lastIndex + 1] = true;
3082              }
3083
3084              if (cache[i] && li.type !== 'optgroup-label') cacheArr.push(i);
3085            }
3086
3087            for (var i = 0, cacheLen = cacheArr.length; i < cacheLen; i++) {
3088              var index = cacheArr[i],
3089                  prevIndex = cacheArr[i - 1],
3090                  li = that.selectpicker.main.data[index],
3091                  liPrev = that.selectpicker.main.data[prevIndex];
3092
3093              if (li.type !== 'divider' || (li.type === 'divider' && liPrev && liPrev.type !== 'divider' && cacheLen - 1 !== i)) {
3094                that.selectpicker.search.data.push(li);
3095                searchMatch.push(that.selectpicker.main.elements[index]);
3096              }
3097            }
3098
3099            that.activeElement = undefined;
3100            that.noScroll = true;
3101            that.$menuInner.scrollTop(0);
3102            that.selectpicker.search.elements = searchMatch;
3103            that.createView(true);
3104            showNoResults.call(that, searchMatch, searchValue);
3105          }
3106        } else if (that.selectpicker.search.previousValue) { // for IE11 (#2402)
3107          that.$menuInner.scrollTop(0);
3108          that.createView(false);
3109        }
3110      });
3111    },
3112
3113    _searchStyle: function () {
3114      return this.options.liveSearchStyle || 'contains';
3115    },
3116
3117    val: function (value) {
3118      var element = this.$element[0];
3119
3120      if (typeof value !== 'undefined') {
3121        var selectedOptions = getSelectedOptions(element).length,
3122            prevValue = getSelectValues(element, selectedOptions);
3123
3124        changedArguments = [null, null, prevValue];
3125
3126        if (!Array.isArray(value)) value = [ value ];
3127
3128        //value.map(String);
3129        value = value.map(String);
3130        
3131        for (var i = 0; i < selectedOptions.length; i++) {
3132          var item = selectedOptions[i];
3133
3134          if (item && value.indexOf(String(item.value)) === -1) {
3135            this.setSelected(item, false);
3136          }
3137        }
3138
3139        // only update selected value if it matches an existing option
3140        this.selectpicker.main.data.filter(function (item) {
3141          if (value.indexOf(String(item.value)) !== -1) {
3142            this.setSelected(item, true);
3143            return true;
3144          }
3145
3146          return false;
3147        }, this);
3148
3149        if (this.options.source.data) element.appendChild(this.selectpicker.main.optionQueue);
3150
3151        this.$element.trigger('changed' + EVENT_KEY, changedArguments);
3152
3153        if (this.$newElement.hasClass(classNames.SHOW)) {
3154          if (this.multiple) {
3155            this.setOptionStatus(true);
3156          } else {
3157            var liSelectedIndex = (element.options[element.selectedIndex] || {}).liIndex;
3158
3159            if (typeof liSelectedIndex === 'number') {
3160              this.setSelected(this.selectpicker.current.data[liSelectedIndex], true);
3161            }
3162          }
3163        }
3164
3165        //this.render();
3166        this.refresh();
3167        
3168        changedArguments = null;
3169
3170        return this.$element;
3171      } else {
3172        return this.$element.val();
3173      }
3174    },
3175
3176    changeAll: function (status) {
3177      if (!this.multiple) return;
3178      if (typeof status === 'undefined') status = true;
3179
3180      var element = this.$element[0],
3181          previousSelected = 0,
3182          currentSelected = 0,
3183          prevValue = getSelectValues(element);
3184
3185      element.classList.add('bs-select-hidden');
3186
3187      for (var i = 0, data = this.selectpicker.current.data, len = data.length; i < len; i++) {
3188        var liData = data[i],
3189            option = liData.option;
3190
3191        if (option && !liData.disabled && liData.type !== 'divider') {
3192          if (liData.selected) previousSelected++;
3193          option.selected = status;
3194          liData.selected = status;
3195          if (status === true) currentSelected++;
3196        }
3197      }
3198
3199      element.classList.remove('bs-select-hidden');
3200
3201      if (previousSelected === currentSelected) return;
3202
3203      this.setOptionStatus();
3204
3205      changedArguments = [null, null, prevValue];
3206
3207      this.$element
3208        .triggerNative('change');
3209    },
3210
3211    selectAll: function () {
3212      return this.changeAll(true);
3213    },
3214
3215    deselectAll: function () {
3216      return this.changeAll(false);
3217    },
3218
3219    toggle: function (e, state) {
3220      var isActive,
3221          triggerClick = state === undefined;
3222
3223      e = e || window.event;
3224
3225      if (e) e.stopPropagation();
3226
3227      if (triggerClick === false) {
3228        isActive = this.$newElement[0].classList.contains(classNames.SHOW);
3229        triggerClick = state === true && isActive === false || state === false && isActive === true;
3230      }
3231
3232      if (triggerClick) this.$button.trigger('click.bs.dropdown.data-api');
3233    },
3234
3235    open: function (e) {
3236      this.toggle(e, true);
3237    },
3238
3239    close: function (e) {
3240      this.toggle(e, false);
3241    },
3242
3243    keydown: function (e) {
3244      var $this = $(this),
3245          isToggle = $this.hasClass('dropdown-toggle'),
3246          $parent = isToggle ? $this.closest('.dropdown') : $this.closest(Selector.MENU),
3247          that = $parent.data('this'),
3248          $items = that.findLis(),
3249          index,
3250          isActive,
3251          liActive,
3252          activeLi,
3253          offset,
3254          updateScroll = false,
3255          downOnTab = e.which === keyCodes.TAB && !isToggle && !that.options.selectOnTab,
3256          isArrowKey = REGEXP_ARROW.test(e.which) || downOnTab,
3257          scrollTop = that.$menuInner[0].scrollTop,
3258          isVirtual = that.isVirtual(),
3259          position0 = isVirtual === true ? that.selectpicker.view.position0 : 0;
3260
3261      // do nothing if a function key is pressed
3262      if (e.which >= 112 && e.which <= 123) return;
3263
3264      isActive = that.$menu.hasClass(classNames.SHOW);
3265
3266      if (
3267        !isActive &&
3268        (
3269          isArrowKey ||
3270          (e.which >= 48 && e.which <= 57) ||
3271          (e.which >= 96 && e.which <= 105) ||
3272          (e.which >= 65 && e.which <= 90)
3273        )
3274      ) {
3275        that.$button.trigger('click.bs.dropdown.data-api');
3276
3277        if (that.options.liveSearch) {
3278          that.$searchbox.trigger('focus');
3279          return;
3280        }
3281      }
3282
3283      if (e.which === keyCodes.ESCAPE && isActive) {
3284        e.preventDefault();
3285        that.$button.trigger('click.bs.dropdown.data-api').trigger('focus');
3286      }
3287
3288      if (isArrowKey) { // if up or down
3289        if (!$items.length) return;
3290
3291        liActive = that.activeElement;
3292        index = liActive ? Array.prototype.indexOf.call(liActive.parentElement.children, liActive) : -1;
3293
3294        if (index !== -1) {
3295          that.defocusItem(liActive);
3296        }
3297
3298        if (e.which === keyCodes.ARROW_UP) { // up
3299          if (index !== -1) index--;
3300          if (index + position0 < 0) index += $items.length;
3301
3302          if (!that.selectpicker.view.canHighlight[index + position0]) {
3303            index = that.selectpicker.view.canHighlight.slice(0, index + position0).lastIndexOf(true) - position0;
3304            if (index === -1) index = $items.length - 1;
3305          }
3306        } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down
3307          index++;
3308          if (index + position0 >
vendor: 4,966 bytes, lines 3308-3449
3308= that.selectpicker.view.canHighlight.length) index = that.selectpicker.view.firstHighlightIndex;
3309
3310          if (!that.selectpicker.view.canHighlight[index + position0]) {
3311            index = index + 1 + that.selectpicker.view.canHighlight.slice(index + position0 + 1).indexOf(true);
3312          }
3313        }
3314
3315        e.preventDefault();
3316
3317        var liActiveIndex = position0 + index;
3318
3319        if (e.which === keyCodes.ARROW_UP) { // up
3320          // scroll to bottom and highlight last option
3321          if (position0 === 0 && index === $items.length - 1) {
3322            that.$menuInner[0].scrollTop = that.$menuInner[0].scrollHeight;
3323
3324            liActiveIndex = that.selectpicker.current.elements.length - 1;
3325          } else {
3326            activeLi = that.selectpicker.current.data[liActiveIndex];
3327
3328            // could be undefined if no results exist
3329            if (activeLi) {
3330              offset = activeLi.position - activeLi.height;
3331
3332              updateScroll = offset < scrollTop;
3333            }
3334          }
3335        } else if (e.which === keyCodes.ARROW_DOWN || downOnTab) { // down
3336          // scroll to top and highlight first option
3337          if (index === that.selectpicker.view.firstHighlightIndex) {
3338            that.$menuInner[0].scrollTop = 0;
3339
3340            liActiveIndex = that.selectpicker.view.firstHighlightIndex;
3341          } else {
3342            activeLi = that.selectpicker.current.data[liActiveIndex];
3343
3344            // could be undefined if no results exist
3345            if (activeLi) {
3346              offset = activeLi.position - that.sizeInfo.menuInnerHeight;
3347
3348              updateScroll = offset > scrollTop;
3349            }
3350          }
3351        }
3352
3353        liActive = that.selectpicker.current.elements[liActiveIndex];
3354
3355        that.activeElement = (that.selectpicker.current.data[liActiveIndex] || {}).element;
3356
3357        that.focusItem(liActive);
3358
3359        that.selectpicker.view.currentActive = liActive;
3360
3361        if (updateScroll) that.$menuInner[0].scrollTop = offset;
3362
3363        if (that.options.liveSearch) {
3364          that.$searchbox.trigger('focus');
3365        } else {
3366          $this.trigger('focus');
3367        }
3368      } else if (
3369        (!$this.is('input') && !REGEXP_TAB_OR_ESCAPE.test(e.which)) ||
3370        (e.which === keyCodes.SPACE && that.selectpicker.keydown.keyHistory)
3371      ) {
3372        var searchMatch,
3373            matches = [],
3374            keyHistory;
3375
3376        e.preventDefault();
3377
3378        that.selectpicker.keydown.keyHistory += keyCodeMap[e.which];
3379
3380        if (that.selectpicker.keydown.resetKeyHistory.cancel) clearTimeout(that.selectpicker.keydown.resetKeyHistory.cancel);
3381        that.selectpicker.keydown.resetKeyHistory.cancel = that.selectpicker.keydown.resetKeyHistory.start();
3382
3383        keyHistory = that.selectpicker.keydown.keyHistory;
3384
3385        // if all letters are the same, set keyHistory to just the first character when searching
3386        if (/^(.)\1+$/.test(keyHistory)) {
3387          keyHistory = keyHistory.charAt(0);
3388        }
3389
3390        // find matches
3391        for (var i = 0; i < that.selectpicker.current.data.length; i++) {
3392          var li = that.selectpicker.current.data[i],
3393              hasMatch;
3394
3395          hasMatch = stringSearch(li, keyHistory, 'startsWith', true);
3396
3397          if (hasMatch && that.selectpicker.view.canHighlight[i]) {
3398            matches.push(li.element);
3399          }
3400        }
3401
3402        if (matches.length) {
3403          var matchIndex = 0;
3404
3405          $items.removeClass('active').find('a').removeClass('active');
3406
3407          // either only one key has been pressed or they are all the same key
3408          if (keyHistory.length === 1) {
3409            matchIndex = matches.indexOf(that.activeElement);
3410
3411            if (matchIndex === -1 || matchIndex === matches.length - 1) {
3412              matchIndex = 0;
3413            } else {
3414              matchIndex++;
3415            }
3416          }
3417
3418          searchMatch = matches[matchIndex];
3419
3420          activeLi = that.selectpicker.main.data[searchMatch];
3421
3422          if (scrollTop - activeLi.position > 0) {
3423            offset = activeLi.position - activeLi.height;
3424            updateScroll = true;
3425          } else {
3426            offset = activeLi.position - that.sizeInfo.menuInnerHeight;
3427            // if the option is already visible at the current scroll position, just keep it the same
3428            updateScroll = activeLi.position > scrollTop + that.sizeInfo.menuInnerHeight;
3429          }
3430
3431          liActive = that.selectpicker.main.elements[searchMatch];
3432
3433          that.activeElement = liActive;
3434
3435          that.focusItem(liActive);
3436
3437          if (liActive) liActive.firstChild.focus();
3438
3439          if (updateScroll) that.$menuInner[0].scrollTop = offset;
3440
3441          $this.trigger('focus');
3442        }
3443      }
3444
3445      // Select focused option if "Enter", "Spacebar" or "Tab" (when selectOnTab is true) are pressed inside the menu.
3446      if (
3447        isActive &&
3448        (
3449          (e.which === keyCodes.SPACE && !that.selectpicker.keydown.keyHistory) ||
3450          e.which === keyCodes.ENTER ||
3451          (e.which === keyCodes.TAB && that.options.selectOnTab)
3452        )
3453      ) {
3454        if (e.which !== keyCodes.SPACE) e.preventDefault();
3455
3456        if (!that.options.liveSearch || e.which !== keyCodes.SPACE) {
3457          that.$menuInner.find('.active a').trigger('click', true); // retain active class
3458          $this.trigger('focus');
3459
3460          if (!that.options.liveSearch) {
3461            // Prevent screen from scrolling if the user hits the spacebar
3462            e.preventDefault();
3463            // Fixes spacebar selection of dropdown items in FF & IE
3464            $(document).data('spaceSelect', true);
3465          }
3466        }
3467        if (e.which === keyCodes.ENTER) {
3468          // hide dropdown menu
3469          that.dropdown.hide();
3470        }
3471      }
3472    },
3473
3474    mobile: function () {
3475      // ensure mobile is set to true if mobile function is called after init
3476      this.options.mobile = true;
3477      this.$element[0].classList.add('mobile-device');
3478    },
3479
3480    refresh: function () {
3481      var that = this;
3482      // update options if data attributes have been changed
3483      var config = $.extend({}, this.options, getAttributesObject(this.$element), this.$element.data()); // in this order on refresh, as user may change attributes on select, and options object is not passed on refresh
3484      this.options = config;
3485
3486      this.selectpicker.main.data = [];
3487
3488      if (this.options.source.data) {
3489        this.render();
3490        this.buildList();
3491      } else {
3492        this.fetchData(function () {
3493          that.render();
3494          that.buildList();
3495        });
3496      }
3497
3498      this.checkDisabled();
3499      this.setStyle();
3500      this.setWidth();
3501
3502      //this.setSize(true);
3503      if(this.$element.hasClass('ajaxselect')) this.setSize(true);
3504
3505      this.$element.trigger('refreshed' + EVENT_KEY);
3506    },
3507
3508    hide: function () {
3509      this.$newElement.hide();
3510    },
3511
3512    show: function () {
3513      this.$newElement.show();
3514    },
3515
3516    remove: function () {
3517      this.$newElement.remove();
3518      this.$element.remove();
3519    },
3520
3521    destroy: function () {
3522      this.$newElement.before(this.$element).remove();
3523
3524      if (this.$bsContainer) {
3525        this.$bsContainer.remove();
3526      } else {
3527        this.$menu.remove();
3528      }
3529
3530      if (this.selectpicker.view.titleOption && this.selectpicker.view.titleOption.parentNode) {
3531        this.selectpicker.view.titleOption.parentNode.removeChild(this.selectpicker.view.titleOption);
3532      }
3533
3534      this.$element
3535        .off(EVENT_KEY)
3536        .removeData('selectpicker')
3537        .removeClass('bs-select-hidden selectpicker mobile-device');
3538
3539      $(window).off(EVENT_KEY + '.' + this.selectId);
3540    }
3541  };
3542
3543  // SELECTPICKER PLUGIN DEFINITION
3544  // ==============================
3545  function Plugin (option) {
3546    // get the args of the outer function..
3547    var args = arguments;
3548    // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
3549    // to get lost/corrupted in android 2.3 and IE9 #715 #775
3550    var _option = option;
3551
3552    [].shift.apply(args);
3553
3554    // if the version was not set successfully
3555    if (!version.success) {
3556      // try to retreive it again
3557      try {
3558        version.full = (getVersion() || '').split(' ')[0].split('.');
3559      } catch (err) {
3560        // fall back to use BootstrapVersion if set
3561        if (Selectpicker.BootstrapVersion) {
3562          version.full = Selectpicker.BootstrapVersion.split(' ')[0].split('.');
3563        } else {
3564          version.full = [version.major, '0', '0'];
3565
3566          console.warn(
3567            'There was an issue retrieving Bootstrap\'s version. ' +
3568            'Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. ' +
3569            'If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.',
3570            err
3571          );
3572        }
3573      }
3574
3575      version.major = version.full[0];
3576      version.success = true;
3577    }
3578
3579    if (version.major >= '4') {
3580      // some defaults need to be changed if using Bootstrap 4
3581      // check to see if they have already been manually changed before forcing them to update
3582      var toUpdate = [];
3583
3584      if (Selectpicker.DEFAULTS.style === classNames.BUTTONCLASS) toUpdate.push({ name: 'style', className: 'BUTTONCLASS' });
3585      if (Selectpicker.DEFAULTS.iconBase === classNames.ICONBASE) toUpdate.push({ name: 'iconBase', className: 'ICONBASE' });
3586      if (Selectpicker.DEFAULTS.tickIcon === classNames.TICKICON) toUpdate.push({ name: 'tickIcon', className: 'TICKICON' });
3587
3588      classNames.DIVIDER = 'dropdown-divider';
3589      classNames.SHOW = 'show';
3590      classNames.BUTTONCLASS = 'btn-light';
3591      classNames.POPOVERHEADER = 'popover-header';
3592      classNames.ICONBASE = '';
3593      classNames.TICKICON = 'bs-ok-default';
3594
3595      for (var i = 0; i < toUpdate.length; i++) {
3596        var option = toUpdate[i];
3597        Selectpicker.DEFAULTS[option.name] = classNames[option.className];
3598      }
3599    }
3600
3601    if (version.major > '4') {
3602      Selector.DATA_TOGGLE = 'data-bs-toggle="dropdown"';
3603    }
3604
3605    var value;
3606    var chain = this.each(function () {
3607      var $this = $(this);
3608      if ($this.is('select')) {
3609        var data = $this.data('selectpicker'),
3610            options = typeof _option == 'object' && _option;
3611
3612        // for backwards compatibility
3613        // (using title as placeholder is deprecated - remove in v2.0.0)
3614        if (options.title) options.placeholder = options.title;
3615
3616        if (!data) {
3617          var dataAttributes = $this.data();
3618
3619          for (var dataAttr in dataAttributes) {
3620            if (Object.prototype.hasOwnProperty.call(dataAttributes, dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
3621              delete dataAttributes[dataAttr];
3622            }
3623          }
3624
3625          var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, getAttributesObject($this), dataAttributes, options); // this is correct order on initial render
3626          config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), dataAttributes.template, options.template);
3627          config.source = $.extend({}, Selectpicker.DEFAULTS.source, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.source : {}), options.source);
3628          $this.data('selectpicker', (data = new Selectpicker(this, config)));
3629        } else if (options) {
3630          for (var i in options) {
3631            if (Object.prototype.hasOwnProperty.call(options, i)) {
3632              data.options[i] = options[i];
3633            }
3634          }
3635        }
3636
3637        if (typeof _option == 'string') {
3638          if (data[_option] instanceof Function) {
3639            value = data[_option].apply(data, args);
3640          } else {
3641            value = data.options[_option];
3642          }
3643        }
3644      }
3645    });
3646
3647    if (typeof value !== 'undefined') {
3648      // noinspection JSUnusedAssignment
3649      return value;
3650    } else {
3651      return chain;
3652    }
3653  }
3654
3655  var old = $.fn.selectpicker;
3656  $.fn.selectpicker = Plugin;
3657  $.fn.selectpicker.Constructor = Selectpicker;
3658
3659  // SELECTPICKER NO CONFLICT
3660  // ========================
3661  $.fn.selectpicker.noConflict = function () {
3662    $.fn.selectpicker = old;
3663    return this;
3664  };
3665
3666  // get Bootstrap's keydown event handler for either Bootstrap 4 or Bootstrap 3
3667  function keydownHandler () {
3668    if (version.major < 5) {
3669      if ($.fn.dropdown) {
3670        // wait to define until function is called in case Bootstrap isn't loaded yet
3671        var bootstrapKeydown = $.fn.dropdown.Constructor._dataApiKeydownHandler || $.fn.dropdown.Constructor.prototype.keydown;
3672        return bootstrapKeydown.apply(this, arguments);
3673      }
3674    } else {
3675      return Dropdown.dataApiKeydownHandler;
3676    }
3677  }
3678
3679  $(document)
3680    .off('keydown.bs.dropdown.data-api')
3681    .on('keydown.bs.dropdown.data-api', ':not(.bootstrap-select) > [' + Selector.DATA_TOGGLE + ']', keydownHandler)
3682    .on('keydown.bs.dropdown.data-api', ':not(.bootstrap-select) > .dropdown-menu', keydownHandler)
3683    .on('keydown' + EVENT_KEY, '.bootstrap-select [' + Selector.DATA_TOGGLE + '], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', Selectpicker.prototype.keydown)
3684    .on('focusin.modal', '.bootstrap-select [' + Selector.DATA_TOGGLE + '], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input', function (e) {
3685      e.stopPropagation();
3686    });
3687
3688  // SELECTPICKER DATA-API
3689  // =====================
3690  document.addEventListener('DOMContentLoaded', function () {
3691    $('.selectpicker').each(function () {
3692      var $selectpicker = $(this);
3693      Plugin.call($selectpicker, $selectpicker.data());
3694    });
3695  });
3696})(jQuery);
3697/*
3698     _ _      _       _
3699 ___| (_) ___| | __  (_)___
3700/ __| | |/ __| |/ /  | / __|
3701\__ \ | | (__|   < _ | \__ \
3702|___/_|_|\___|_|\_(_)/ |___/
3703                   |__/
3704
3705 Version: 1.8.0
3706  Author: Ken Wheeler
3707 Website: http://kenwheeler.github.io
3708    Docs: http://kenwheeler.github.io/slick
3709    Repo: http://github.com/kenwheeler/slick
3710  Issues: http://github.com/kenwheeler/slick/issues
3711
3712 */
3713/* global window, document, define, jQuery, setInterval, clearInterval */
3714;(function(factory) {
3715    'use strict';
3716    if (typeof define === 'function' && define.amd) {
3717        define(['jquery'], factory);
3718    } else if (typeof exports !== 'undefined') {
3719        module.exports = factory(require('jquery'));
3720    } else {
3721        factory(jQuery);
3722    }
3723
3724}(function($) {
3725    'use strict';
3726    var Slick = window.Slick || {};
3727
3728    Slick = (function() {
3729
3730        var instanceUid = 0;
3731
3732        function Slick(element, settings) {
3733
3734            var _ = this, dataSettings;
3735
3736            _.defaults = {
3737                accessibility: true,
3738                adaptiveHeight: false,
3739                appendArrows: $(element),
3740                appendDots: $(element),
3741                arrows: true,
3742                asNavFor: null,
3743                prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
3744                nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
3745                autoplay: false,
3746                autoplaySpeed: 3000,
3747                centerMode: false,
3748                centerPadding: '50px',
3749                cssEase: 'ease',
3750                customPaging: function(slider, i) {
3751                    return $('<button type="button" />').text(i + 1);
3752                },
3753                dots: false,
3754                dotsClass: 'slick-dots',
3755                draggable: true,
3756                easing: 'linear',
3757                edgeFriction: 0.35,
3758                fade: false,
3759                focusOnSelect: false,
3760                focusOnChange: false,
3761                infinite: true,
3762                initialSlide: 0,
3763                lazyLoad: 'ondemand',
3764                mobileFirst: false,
3765                pauseOnHover: true,
3766                pauseOnFocus: true,
3767                pauseOnDotsHover: false,
3768                respondTo: 'window',
3769                responsive: null,
3770                rows: 1,
3771                rtl: false,
3772                slide: '',
3773                slidesPerRow: 1,
3774                slidesToShow: 1,
3775                slidesToScroll: 1,
3776                speed: 500,
3777                swipe: true,
3778                swipeToSlide: false,
3779                touchMove: true,
3780                touchThreshold: 5,
3781                useCSS: true,
3782                useTransform: true,
3783                variableWidth: false,
3784                vertical: false,
3785                verticalSwiping: false,
3786                waitForAnimate: true,
3787                zIndex: 1000
3788            };
3789
3790            _.initials = {
3791                animating: false,
3792                dragging: false,
3793                autoPlayTimer: null,
3794                currentDirection: 0,
3795                currentLeft: null,
3796                currentSlide: 0,
3797                direction: 1,
3798                $dots: null,
3799                listWidth: null,
3800                listHeight: null,
3801                loadIndex: 0,
3802                $nextArrow: null,
3803                $prevArrow: null,
3804                scrolling: false,
3805                slideCount: null,
3806                slideWidth: null,
3807                $slideTrack: null,
3808                $slides: null,
3809                sliding: false,
3810                slideOffset: 0,
3811                swipeLeft: null,
3812                swiping: false,
3813                $list: null,
3814                touchObject: {},
3815                transformsEnabled: false,
3816                unslicked: false
3817            };
3818
3819            $.extend(_, _.initials);
3820
3821            _.activeBreakpoint = null;
3822            _.animType = null;
3823            _.animProp = null;
3824            _.breakpoints = [];
3825            _.breakpointSettings = [];
3826            _.cssTransitions = false;
3827            _.focussed = false;
3828            _.interrupted = false;
3829            _.hidden = 'hidden';
3830            _.paused = true;
3831            _.positionProp = null;
3832            _.respondTo = null;
3833            _.rowCount = 1;
3834            _.shouldClick = true;
3835            _.$slider = $(element);
3836            _.$slidesCache = null;
3837            _.transformType = null;
3838            _.transitionType = null;
3839            _.visibilityChange = 'visibilitychange';
3840            _.windowWidth = 0;
3841            _.windowTimer = null;
3842
3843            dataSettings = $(element).data('slick') || {};
3844
3845            _.options = $.extend({}, _.defaults, settings, dataSettings);
3846
3847            _.currentSlide = _.options.initialSlide;
3848
3849            _.originalSettings = _.options;
3850
3851            if (typeof document.mozHidden !== 'undefined') {
3852                _.hidden = 'mozHidden';
3853                _.visibilityChange = 'mozvisibilitychange';
3854            } else if (typeof document.webkitHidden !== 'undefined') {
3855                _.hidden = 'webkitHidden';
3856                _.visibilityChange = 'webkitvisibilitychange';
3857            }
3858
3859            _.autoPlay = $.proxy(_.autoPlay, _);
3860            _.autoPlayClear = $.proxy(_.autoPlayClear, _);
3861            _.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
3862            _.changeSlide = $.proxy(_.changeSlide, _);
3863            _.clickHandler = $.proxy(_.clickHandler, _);
3864            _.selectHandler = $.proxy(_.selectHandler, _);
3865            _.setPosition = $.proxy(_.setPosition, _);
3866            _.swipeHandler = $.proxy(_.swipeHandler, _);
3867            _.dragHandler = $.proxy(_.dragHandler, _);
3868            _.keyHandler = $.proxy(_.keyHandler, _);
3869
3870            _.instanceUid = instanceUid++;
3871
3872            // A simple way to check for HTML strings
3873            // Strict HTML recognition (must start with <)
3874            // Extracted from jQuery v1.11 source
3875            _.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
3876
3877
3878            _.registerBreakpoints();
3879            _.init(true);
3880
3881        }
3882
3883        return Slick;
3884
3885    }());
3886
3887    Slick.prototype.activateADA = function() {
3888        var _ = this;
3889
3890        _.$slideTrack.find('.slick-active').attr({
3891            'aria-hidden': 'false'
3892        }).find('a, input, button, select').attr({
3893            'tabindex': '0'
3894        });
3895
3896    };
3897
3898    Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
3899
3900        var _ = this;
3901
3902        if (typeof(index) === 'boolean') {
3903            addBefore = index;
3904            index = null;
3905        } else if (index < 0 || (index >= _.slideCount)) {
3906            return false;
3907        }
3908
3909        _.unload();
3910
3911        if (typeof(index) === 'number') {
3912            if (index === 0 && _.$slides.length === 0) {
3913                $(markup).appendTo(_.$slideTrack);
3914            } else if (addBefore) {
3915                $(markup).insertBefore(_.$slides.eq(index));
3916            } else {
3917                $(markup).insertAfter(_.$slides.eq(index));
3918            }
3919        } else {
3920            if (addBefore === true) {
3921                $(markup).prependTo(_.$slideTrack);
3922            } else {
3923                $(markup).appendTo(_.$slideTrack);
3924            }
3925        }
3926
3927        _.$slides = _.$slideTrack.children(this.options.slide);
3928
3929        _.$slideTrack.children(this.options.slide).detach();
3930
3931        _.$slideTrack.append(_.$slides);
3932
3933        _.$slides.each(function(index, element) {
3934            $(element).attr('data-slick-index', index);
3935        });
3936
3937        _.$slidesCache = _.$slides;
3938
3939        _.reinit();
3940
3941    };
3942
3943    Slick.prototype.animateHeight = function() {
3944        var _ = this;
3945        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
3946            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
3947            _.$list.animate({
3948                height: targetHeight
3949            }, _.options.speed);
3950        }
3951    };
3952
3953    Slick.prototype.animateSlide = function(targetLeft, callback) {
3954
3955        var animProps = {},
3956            _ = this;
3957
3958        _.animateHeight();
3959
3960        if (_.options.rtl === true && _.options.vertical === false) {
3961            targetLeft = -targetLeft;
3962        }
3963        if (_.transformsEnabled === false) {
3964            if (_.options.vertical === false) {
3965                _.$slideTrack.animate({
3966                    left: targetLeft
3967                }, _.options.speed, _.options.easing, callback);
3968            } else {
3969                _.$slideTrack.animate({
3970                    top: targetLeft
3971                }, _.options.speed, _.options.easing, callback);
3972            }
3973
3974        } else {
3975
3976            if (_.cssTransitions === false) {
3977                if (_.options.rtl === true) {
3978                    _.currentLeft = -(_.currentLeft);
3979                }
3980                $({
3981                    animStart: _.currentLeft
3982                }).animate({
3983                    animStart: targetLeft
3984                }, {
3985                    duration: _.options.speed,
3986                    easing: _.options.easing,
3987                    step: function(now) {
3988                        now = Math.ceil(now);
3989                        if (_.options.vertical === false) {
3990                            animProps[_.animType] = 'translate(' +
3991                                now + 'px, 0px)';
3992                            _.$slideTrack.css(animProps);
3993                        } else {
3994                            animProps[_.animType] = 'translate(0px,' +
3995                                now + 'px)';
3996                            _.$slideTrack.css(animProps);
3997                        }
3998                    },
3999                    complete: function() {
4000                        if (callback) {
4001                            callback.call();
4002                        }
4003                    }
4004                });
4005
4006            } else {
4007
4008                _.applyTransition();
4009                targetLeft = Math.ceil(targetLeft);
4010
4011                if (_.options.vertical === false) {
4012                    animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
4013                } else {
4014                    animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
4015                }
4016                _.$slideTrack.css(animProps);
4017
4018                if (callback) {
4019                    setTimeout(function() {
4020
4021                        _.disableTransition();
4022
4023                        callback.call();
4024                    }, _.options.speed);
4025                }
4026
4027            }
4028
4029        }
4030
4031    };
4032
4033    Slick.prototype.getNavTarget = function() {
4034
4035        var _ = this,
4036            asNavFor = _.options.asNavFor;
4037
4038        if ( asNavFor && asNavFor !== null ) {
4039            asNavFor = $(asNavFor).not(_.$slider);
4040        }
4041
4042        return asNavFor;
4043
4044    };
4045
4046    Slick.prototype.asNavFor = function(index) {
4047
4048        var _ = this,
4049            asNavFor = _.getNavTarget();
4050
4051        if ( asNavFor !== null && typeof asNavFor === 'object' ) {
4052            asNavFor.each(function() {
4053                var target = $(this).slick('getSlick');
4054                if(!target.unslicked) {
4055                    target.slideHandler(index, true);
4056                }
4057            });
4058        }
4059
4060    };
4061
4062    Slick.prototype.applyTransition = function(slide) {
4063
4064        var _ = this,
4065            transition = {};
4066
4067        if (_.options.fade === false) {
4068            transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
4069        } else {
4070            transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
4071        }
4072
4073        if (_.options.fade === false) {
4074            _.$slideTrack.css(transition);
4075        } else {
4076            _.$slides.eq(slide).css(transition);
4077        }
4078
4079    };
4080
4081    Slick.prototype.autoPlay = function() {
4082
4083        var _ = this;
4084
4085        _.autoPlayClear();
4086
4087        if ( _.slideCount > _.options.slidesToShow ) {
4088            _.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
4089        }
4090
4091    };
4092
4093    Slick.prototype.autoPlayClear = function() {
4094
4095        var _ = this;
4096
4097        if (_.autoPlayTimer) {
4098            clearInterval(_.autoPlayTimer);
4099        }
4100
4101    };
4102
4103    Slick.prototype.autoPlayIterator = function() {
4104
4105        var _ = this,
4106            slideTo = _.currentSlide + _.options.slidesToScroll;
4107
4108        if ( !_.paused && !_.interrupted && !_.focussed ) {
4109
4110            if ( _.options.infinite === false ) {
4111
4112                if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
4113                    _.direction = 0;
4114                }
4115
4116                else if ( _.direction === 0 ) {
4117
4118                    slideTo = _.currentSlide - _.options.slidesToScroll;
4119
4120                    if ( _.currentSlide - 1 === 0 ) {
4121                        _.direction = 1;
4122                    }
4123
4124                }
4125
4126            }
4127
4128            _.slideHandler( slideTo );
4129
4130        }
4131
4132    };
4133
4134    Slick.prototype.buildArrows = function() {
4135
4136        var _ = this;
4137
4138        if (_.options.arrows === true ) {
4139
4140            _.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
4141            _.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
4142
4143            if( _.slideCount > _.options.slidesToShow ) {
4144
4145                _.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
4146                _.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
4147
4148                if (_.htmlExpr.test(_.options.prevArrow)) {
4149                    _.$prevArrow.prependTo(_.options.appendArrows);
4150                }
4151
4152                if (_.htmlExpr.test(_.options.nextArrow)) {
4153                    _.$nextArrow.appendTo(_.options.appendArrows);
4154                }
4155
4156                if (_.options.infinite !== true) {
4157                    _.$prevArrow
4158                        .addClass('slick-disabled')
4159                        .attr('aria-disabled', 'true');
4160                }
4161
4162            } else {
4163
4164                _.$prevArrow.add( _.$nextArrow )
4165
4166                    .addClass('slick-hidden')
4167                    .attr({
4168                        'aria-disabled': 'true',
4169                        'tabindex': '-1'
4170                    });
4171
4172            }
4173
4174        }
4175
4176    };
4177
4178    Slick.prototype.buildDots = function() {
4179
4180        var _ = this,
4181            i, dot;
4182
4183        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
4184
4185            _.$slider.addClass('slick-dotted');
4186
4187            dot = $('<ul />').addClass(_.options.dotsClass);
4188
4189            for (i = 0; i <= _.getDotCount(); i += 1) {
4190                dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
4191            }
4192
4193            _.$dots = dot.appendTo(_.options.appendDots);
4194
4195            _.$dots.find('li').first().addClass('slick-active');
4196
4197        }
4198
4199    };
4200
4201    Slick.prototype.buildOut = function() {
4202
4203        var _ = this;
4204
4205        _.$slides =
4206            _.$slider
4207                .children( _.options.slide + ':not(.slick-cloned)')
4208                .addClass('slick-slide');
4209
4210        _.slideCount = _.$slides.length;
4211
4212        _.$slides.each(function(index, element) {
4213            $(element)
4214                .attr('data-slick-index', index)
4215                .data('originalStyling', $(element).attr('style') || '');
4216        });
4217
4218        _.$slider.addClass('slick-slider');
4219
4220        _.$slideTrack = (_.slideCount === 0) ?
4221            $('<div class="slick-track"/>').appendTo(_.$slider) :
4222            _.$slides.wrapAll('<div class="slick-track"/>').parent();
4223
4224        _.$list = _.$slideTrack.wrap(
4225            '<div class="slick-list"/>').parent();
4226        _.$slideTrack.css('opacity', 0);
4227
4228        if (_.options.centerMode === true || _.options.swipeToSlide === true) {
4229            _.options.slidesToScroll = 1;
4230        }
4231
4232        $('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
4233
4234        _.setupInfinite();
4235
4236        _.buildArrows();
4237
4238        _.buildDots();
4239
4240        _.updateDots();
4241
4242
4243        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
4244
4245        if (_.options.draggable === true) {
4246            _.$list.addClass('draggable');
4247        }
4248
4249    };
4250
4251    Slick.prototype.buildRows = function() {
4252
4253        var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
4254
4255        newSlides = document.createDocumentFragment();
4256        originalSlides = _.$slider.children();
4257
4258        if(_.options.rows > 0) {
4259
4260            slidesPerSection = _.options.slidesPerRow * _.options.rows;
4261            numOfSlides = Math.ceil(
4262                originalSlides.length / slidesPerSection
4263            );
4264
4265            for(a = 0; a < numOfSlides; a++){
4266                var slide = document.createElement('div');
4267                for(b = 0; b < _.options.rows; b++) {
4268                    var row = document.createElement('div');
4269                    for(c = 0; c < _.options.slidesPerRow; c++) {
4270                        var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
4271                        if (originalSlides.get(target)) {
4272                            row.appendChild(originalSlides.get(target));
4273                        }
4274                    }
4275                    slide.appendChild(row);
4276                }
4277                newSlides.appendChild(slide);
4278            }
4279
4280            _.$slider.empty().append(newSlides);
4281            _.$slider.children().children().children()
4282                .css({
4283                    'width':(100 / _.options.slidesPerRow) + '%',
4284                    'display': 'inline-block'
4285                });
4286
4287        }
4288
4289    };
4290
4291    Slick.prototype.checkResponsive = function(initial, forceUpdate) {
4292
4293        var _ = this,
4294            breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
4295        var sliderWidth = _.$slider.width();
4296        var windowWidth = window.innerWidth || $(window).width();
4297
4298        if (_.respondTo === 'window') {
4299            respondToWidth = windowWidth;
4300        } else if (_.respondTo === 'slider') {
4301            respondToWidth = sliderWidth;
4302        } else if (_.respondTo === 'min') {
4303            respondToWidth = Math.min(windowWidth, sliderWidth);
4304        }
4305
4306        if ( _.options.responsive &&
4307            _.options.responsive.length &&
4308            _.options.responsive !== null) {
4309
4310            targetBreakpoint = null;
4311
4312            for (breakpoint in _.breakpoints) {
4313                if (_.breakpoints.hasOwnProperty(breakpoint)) {
4314                    if (_.originalSettings.mobileFirst === false) {
4315                        if (respondToWidth < _.breakpoints[breakpoint]) {
4316                            targetBreakpoint = _.breakpoints[breakpoint];
4317                        }
4318                    } else {
4319                        if (respondToWidth > _.breakpoints[breakpoint]) {
4320                            targetBreakpoint = _.breakpoints[breakpoint];
4321                        }
4322                    }
4323                }
4324            }
4325
4326            if (targetBreakpoint !== null) {
4327                if (_.activeBreakpoint !== null) {
4328                    if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
4329                        _.activeBreakpoint =
4330                            targetBreakpoint;
4331                        if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
4332                            _.unslick(targetBreakpoint);
4333                        } else {
4334                            _.options = $.extend({}, _.originalSettings,
4335                                _.breakpointSettings[
4336                                    targetBreakpoint]);
4337                            if (initial === true) {
4338                                _.currentSlide = _.options.initialSlide;
4339                            }
4340                            _.refresh(initial);
4341                        }
4342                        triggerBreakpoint = targetBreakpoint;
4343                    }
4344                } else {
4345                    _.activeBreakpoint = targetBreakpoint;
4346                    if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
4347                        _.unslick(targetBreakpoint);
4348                    } else {
4349                        _.options = $.extend({}, _.originalSettings,
4350                            _.breakpointSettings[
4351                                targetBreakpoint]);
4352                        if (initial === true) {
4353                            _.currentSlide = _.options.initialSlide;
4354                        }
4355                        _.refresh(initial);
4356                    }
4357                    triggerBreakpoint = targetBreakpoint;
4358                }
4359            } else {
4360                if (_.activeBreakpoint !== null) {
4361                    _.activeBreakpoint = null;
4362                    _.options = _.originalSettings;
4363                    if (initial === true) {
4364                        _.currentSlide = _.options.initialSlide;
4365                    }
4366                    _.refresh(initial);
4367                    triggerBreakpoint = targetBreakpoint;
4368                }
4369            }
4370
4371            // only trigger breakpoints during an actual break. not on initialize.
4372            if( !initial && triggerBreakpoint !== false ) {
4373                _.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
4374            }
4375        }
4376
4377    };
4378
4379    Slick.prototype.changeSlide = function(event, dontAnimate) {
4380
4381        var _ = this,
4382            $target = $(event.currentTarget),
4383            indexOffset, slideOffset, unevenOffset;
4384
4385        // If target is a link, prevent default action.
4386        if($target.is('a')) {
4387            event.preventDefault();
4388        }
4389
4390        // If target is not the <li> element (ie: a child), find the <li>.
4391        if(!$target.is('li')) {
4392            $target = $target.closest('li');
4393        }
4394
4395        unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
4396        indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
4397
4398        switch (event.data.message) {
4399
4400            case 'previous':
4401                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
4402                if (_.slideCount > _.options.slidesToShow) {
4403                    _.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
4404                }
4405                break;
4406
4407            case 'next':
4408                slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
4409                if (_.slideCount > _.options.slidesToShow) {
4410                    _.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
4411                }
4412                break;
4413
4414            case 'index':
4415                var index = event.data.index === 0 ? 0 :
4416                    event.data.index || $target.index() * _.options.slidesToScroll;
4417
4418                _.slideHandler(_.checkNavigable(index), false, dontAnimate);
4419                $target.children().trigger('focus');
4420                break;
4421
4422            default:
4423                return;
4424        }
4425
4426    };
4427
4428    Slick.prototype.checkNavigable = function(index) {
4429
4430        var _ = this,
4431            navigables, prevNavigable;
4432
4433        navigables = _.getNavigableIndexes();
4434        prevNavigable = 0;
4435        if (index > navigables[navigables.length - 1]) {
4436            index = navigables[navigables.length - 1];
4437        } else {
4438            for (var n in navigables) {
4439                if (index < navigables[n]) {
4440                    index = prevNavigable;
4441                    break;
4442                }
4443                prevNavigable = navigables[n];
4444            }
4445        }
4446
4447        return index;
4448    };
4449
4450    Slick.prototype.cleanUpEvents = function() {
4451
4452        var _ = this;
4453
4454        if (_.options.dots && _.$dots !== null) {
4455
4456            $('li', _.$dots)
4457                .off('click.slick', _.changeSlide)
4458                .off('mouseenter.slick', $.proxy(_.interrupt, _, true))
4459                .off('mouseleave.slick', $.proxy(_.interrupt, _, false));
4460
4461            if (_.options.accessibility === true) {
4462                _.$dots.off('keydown.slick', _.keyHandler);
4463            }
4464        }
4465
4466        _.$slider.off('focus.slick blur.slick');
4467
4468        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
4469            _.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
4470            _.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
4471
4472            if (_.options.accessibility === true) {
4473                _.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
4474                _.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
4475            }
4476        }
4477
4478        _.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
4479        _.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
4480        _.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
4481        _.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
4482
4483        _.$list.off('click.slick', _.clickHandler);
4484
4485        $(document).off(_.visibilityChange, _.visibility);
4486
4487        _.cleanUpSlideEvents();
4488
4489        if (_.options.accessibility === true) {
4490            _.$list.off('keydown.slick', _.keyHandler);
4491        }
4492
4493        if (_.options.focusOnSelect === true) {
4494            $(_.$slideTrack).children().off('click.slick', _.selectHandler);
4495        }
4496
4497        $(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
4498
4499        $(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
4500
4501        $('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
4502
4503        $(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
4504
4505    };
4506
4507    Slick.prototype.cleanUpSlideEvents = function() {
4508
4509        var _ = this;
4510
4511        _.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
4512        _.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
4513
4514    };
4515
4516    Slick.prototype.cleanUpRows = function() {
4517
4518        var _ = this, originalSlides;
4519
4520        if(_.options.rows > 0) {
4521            originalSlides = _.$slides.children().children();
4522            originalSlides.removeAttr('style');
4523            _.$slider.empty().append(originalSlides);
4524        }
4525
4526    };
4527
4528    Slick.prototype.clickHandler = function(event) {
4529
4530        var _ = this;
4531
4532        if (_.shouldClick === false) {
4533            event.stopImmediatePropagation();
4534            event.stopPropagation();
4535            event.preventDefault();
4536        }
4537
4538    };
4539
4540    Slick.prototype.destroy = function(refresh) {
4541
4542        var _ = this;
4543
4544        _.autoPlayClear();
4545
4546        _.touchObject = {};
4547
4548        _.cleanUpEvents();
4549
4550        $('.slick-cloned', _.$slider).detach();
4551
4552        if (_.$dots) {
4553            _.$dots.remove();
4554        }
4555
4556        if ( _.$prevArrow && _.$prevArrow.length ) {
4557
4558            _.$prevArrow
4559                .removeClass('slick-disabled slick-arrow slick-hidden')
4560                .removeAttr('aria-hidden aria-disabled tabindex')
4561                .css('display','');
4562
4563            if ( _.htmlExpr.test( _.options.prevArrow )) {
4564                _.$prevArrow.remove();
4565            }
4566        }
4567
4568        if ( _.$nextArrow && _.$nextArrow.length ) {
4569
4570            _.$nextArrow
4571                .removeClass('slick-disabled slick-arrow slick-hidden')
4572                .removeAttr('aria-hidden aria-disabled tabindex')
4573                .css('display','');
4574
4575            if ( _.htmlExpr.test( _.options.nextArrow )) {
4576                _.$nextArrow.remove();
4577            }
4578        }
4579
4580
4581        if (_.$slides) {
4582
4583            _.$slides
4584                .removeClass('slick-slide slick-active slick-center slick-visible slick-current')
4585                .removeAttr('aria-hidden')
4586                .removeAttr('data-slick-index')
4587                .each(function(){
4588                    $(this).attr('style', $(this).data('originalStyling'));
4589                });
4590
4591            _.$slideTrack.children(this.options.slide).detach();
4592
4593            _.$slideTrack.detach();
4594
4595            _.$list.detach();
4596
4597            _.$slider.append(_.$slides);
4598        }
4599
4600        _.cleanUpRows();
4601
4602        _.$slider.removeClass('slick-slider');
4603        _.$slider.removeClass('slick-initialized');
4604        _.$slider.removeClass('slick-dotted');
4605
4606        _.unslicked = true;
4607
4608        if(!refresh) {
4609            _.$slider.trigger('destroy', [_]);
4610        }
4611
4612    };
4613
4614    Slick.prototype.disableTransition = function(slide) {
4615
4616        var _ = this,
4617            transition = {};
4618
4619        transition[_.transitionType] = '';
4620
4621        if (_.options.fade === false) {
4622            _.$slideTrack.css(transition);
4623        } else {
4624            _.$slides.eq(slide).css(transition);
4625        }
4626
4627    };
4628
4629    Slick.prototype.fadeSlide = function(slideIndex, callback) {
4630
4631        var _ = this;
4632
4633        if (_.cssTransitions === false) {
4634
4635            _.$slides.eq(slideIndex).css({
4636                zIndex: _.options.zIndex
4637            });
4638
4639            _.$slides.eq(slideIndex).animate({
4640                opacity: 1
4641            }, _.options.speed, _.options.easing, callback);
4642
4643        } else {
4644
4645            _.applyTransition(slideIndex);
4646
4647            _.$slides.eq(slideIndex).css({
4648                opacity: 1,
4649                zIndex: _.options.zIndex
4650            });
4651
4652            if (callback) {
4653                setTimeout(function() {
4654
4655                    _.disableTransition(slideIndex);
4656
4657                    callback.call();
4658                }, _.options.speed);
4659            }
4660
4661        }
4662
4663    };
4664
4665    Slick.prototype.fadeSlideOut = function(slideIndex) {
4666
4667        var _ = this;
4668
4669        if (_.cssTransitions === false) {
4670
4671            _.$slides.eq(slideIndex).animate({
4672                opacity: 0,
4673                zIndex: _.options.zIndex - 2
4674            }, _.options.speed, _.options.easing);
4675
4676        } else {
4677
4678            _.applyTransition(slideIndex);
4679
4680            _.$slides.eq(slideIndex).css({
4681                opacity: 0,
4682                zIndex: _.options.zIndex - 2
4683            });
4684
4685        }
4686
4687    };
4688
4689    Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
4690
4691        var _ = this;
4692
4693        if (filter !== null) {
4694
4695            _.$slidesCache = _.$slides;
4696
4697            _.unload();
4698
4699            _.$slideTrack.children(this.options.slide).detach();
4700
4701            _.$slidesCache.filter(filter).appendTo(_.$slideTrack);
4702
4703            _.reinit();
4704
4705        }
4706
4707    };
4708
4709    Slick.prototype.focusHandler = function() {
4710
4711        var _ = this;
4712
4713        _.$slider
4714            .off('focus.slick blur.slick')
4715            .on('focus.slick blur.slick', '*', function(event) {
4716
4717            event.stopImmediatePropagation();
4718            var $sf = $(this);
4719
4720            setTimeout(function() {
4721
4722                if( _.options.pauseOnFocus ) {
4723                    _.focussed = $sf.is(':focus');
4724                    _.autoPlay();
4725                }
4726
4727            }, 0);
4728
4729        });
4730    };
4731
4732    Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
4733
4734        var _ = this;
4735        return _.currentSlide;
4736
4737    };
4738
4739    Slick.prototype.getDotCount = function() {
4740
4741        var _ = this;
4742
4743        var breakPoint = 0;
4744        var counter = 0;
4745        var pagerQty = 0;
4746
4747        if (_.options.infinite === true) {
4748            if (_.slideCount <= _.options.slidesToShow) {
4749                 ++pagerQty;
4750            } else {
4751                while (breakPoint < _.slideCount) {
4752                    ++pagerQty;
4753                    breakPoint = counter + _.options.slidesToScroll;
4754                    counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
4755                }
4756            }
4757        } else if (_.options.centerMode === true) {
4758            pagerQty = _.slideCount;
4759        } else if(!_.options.asNavFor) {
4760            pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
4761        }else {
4762            while (breakPoint < _.slideCount) {
4763                ++pagerQty;
4764                breakPoint = counter + _.options.slidesToScroll;
4765                counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
4766            }
4767        }
4768
4769        return pagerQty - 1;
4770
4771    };
4772
4773    Slick.prototype.getLeft = function(slideIndex) {
4774
4775        var _ = this,
4776            targetLeft,
4777            verticalHeight,
4778            verticalOffset = 0,
4779            targetSlide,
4780            coef;
4781
4782        _.slideOffset = 0;
4783        verticalHeight = _.$slides.first().outerHeight(true);
4784
4785        if (_.options.infinite === true) {
4786            if (_.slideCount > _.options.slidesToShow) {
4787                _.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
4788                coef = -1
4789
4790                if (_.options.vertical === true && _.options.centerMode === true) {
4791                    if (_.options.slidesToShow === 2) {
4792                        coef = -1.5;
4793                    } else if (_.options.slidesToShow === 1) {
4794                        coef = -2
4795                    }
4796                }
4797                verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
4798            }
4799            if (_.slideCount % _.options.slidesToScroll !== 0) {
4800                if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
4801                    if (slideIndex > _.slideCount) {
4802                        _.slideOffset = ((_.options.slidesToShow - (sl
4802ideIndex - _.slideCount)) * _.slideWidth) * -1;
4803                        verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
4804                    } else {
4805                        _.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
4806                        verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
4807                    }
4808                }
4809            }
4810        } else {
4811            if (slideIndex + _.options.slidesToShow > _.slideCount) {
4812                _.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
4813                verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
4814            }
4815        }
4816
4817        if (_.slideCount <= _.options.slidesToShow) {
4818            _.slideOffset = 0;
4819            verticalOffset = 0;
4820        }
4821
4822        if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
4823            _.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
4824        } else if (_.options.centerMode === true && _.options.infinite === true) {
4825            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
4826        } else if (_.options.centerMode === true) {
4827            _.slideOffset = 0;
4828            _.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
4829        }
4830
4831        if (_.options.vertical === false) {
4832            targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
4833        } else {
4834            targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
4835        }
4836
4837        if (_.options.variableWidth === true) {
4838
4839            if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
4840                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
4841            } else {
4842                targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
4843            }
4844
4845            if (_.options.rtl === true) {
4846                if (targetSlide[0]) {
4847                    targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
4848                } else {
4849                    targetLeft =  0;
4850                }
4851            } else {
4852                targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
4853            }
4854
4855            if (_.options.centerMode === true) {
4856                if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
4857                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
4858                } else {
4859                    targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
4860                }
4861
4862                if (_.options.rtl === true) {
4863                    if (targetSlide[0]) {
4864                        targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
4865                    } else {
4866                        targetLeft =  0;
4867                    }
4868                } else {
4869                    targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
4870                }
4871
4872                targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
4873            }
4874        }
4875
4876        return targetLeft;
4877
4878    };
4879
4880    Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
4881
4882        var _ = this;
4883
4884        return _.options[option];
4885
4886    };
4887
4888    Slick.prototype.getNavigableIndexes = function() {
4889
4890        var _ = this,
4891            breakPoint = 0,
4892            counter = 0,
4893            indexes = [],
4894            max;
4895
4896        if (_.options.infinite === false) {
4897            max = _.slideCount;
4898        } else {
4899            breakPoint = _.options.slidesToScroll * -1;
4900            counter = _.options.slidesToScroll * -1;
4901            max = _.slideCount * 2;
4902        }
4903
4904        while (breakPoint < max) {
4905            indexes.push(breakPoint);
4906            breakPoint = counter + _.options.slidesToScroll;
4907            counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
4908        }
4909
4910        return indexes;
4911
4912    };
4913
4914    Slick.prototype.getSlick = function() {
4915
4916        return this;
4917
4918    };
4919
4920    Slick.prototype.getSlideCount = function() {
4921
4922        var _ = this,
4923            slidesTraversed, swipedSlide, centerOffset;
4924
4925        centerOffset = _.options.centerMode === true ? _.slideWidth * Math.floor(_.options.slidesToShow / 2) : 0;
4926
4927        if (_.options.swipeToSlide === true) {
4928            _.$slideTrack.find('.slick-slide').each(function(index, slide) {
4929                if (slide.offsetLeft - centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft * -1)) {
4930                    swipedSlide = slide;
4931                    return false;
4932                }
4933            });
4934
4935            slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
4936
4937            return slidesTraversed;
4938
4939        } else {
4940            return _.options.slidesToScroll;
4941        }
4942
4943    };
4944
4945    Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
4946
4947        var _ = this;
4948
4949        _.changeSlide({
4950            data: {
4951                message: 'index',
4952                index: parseInt(slide)
4953            }
4954        }, dontAnimate);
4955
4956    };
4957
4958    Slick.prototype.init = function(creation) {
4959
4960        var _ = this;
4961
4962        if (!$(_.$slider).hasClass('slick-initialized')) {
4963
4964            $(_.$slider).addClass('slick-initialized');
4965
4966            _.buildRows();
4967            _.buildOut();
4968            _.setProps();
4969            _.startLoad();
4970            _.loadSlider();
4971            _.initializeEvents();
4972            _.updateArrows();
4973            _.updateDots();
4974            _.checkResponsive(true);
4975            _.focusHandler();
4976
4977        }
4978
4979        if (creation) {
4980            _.$slider.trigger('init', [_]);
4981        }
4982
4983        if (_.options.accessibility === true) {
4984            _.initADA();
4985        }
4986
4987        if ( _.options.autoplay ) {
4988
4989            _.paused = false;
4990            _.autoPlay();
4991
4992        }
4993
4994    };
4995
4996    Slick.prototype.initADA = function() {
4997        var _ = this,
4998                numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
4999                tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
5000                    return (val >= 0) && (val < _.slideCount);
5001                });
5002
5003        _.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
5004            'aria-hidden': 'true',
5005            'tabindex': '-1'
5006        }).find('a, input, button, select').attr({
5007            'tabindex': '-1'
5008        });
5009
5010        if (_.$dots !== null) {
5011            _.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
5012                var slideControlIndex = tabControlIndexes.indexOf(i);
5013
5014                $(this).attr({
5015                    'role': 'tabpanel',
5016                    'id': 'slick-slide' + _.instanceUid + i,
5017                    'tabindex': -1
5018                });
5019
5020                if (slideControlIndex !== -1) {
5021                   var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
5022                   if ($('#' + ariaButtonControl).length) {
5023                     $(this).attr({
5024                         'aria-describedby': ariaButtonControl
5025                     });
5026                   }
5027                }
5028            });
5029
5030            _.$dots.attr('role', 'tablist').find('li').each(function(i) {
5031                var mappedSlideIndex = tabControlIndexes[i];
5032
5033                $(this).attr({
5034                    'role': 'presentation'
5035                });
5036
5037                $(this).find('button').first().attr({
5038                    'role': 'tab',
5039                    'id': 'slick-slide-control' + _.instanceUid + i,
5040                    'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
5041                    'aria-label': (i + 1) + ' of ' + numDotGroups,
5042                    'aria-selected': null,
5043                    'tabindex': '-1'
5044                });
5045
5046            }).eq(_.currentSlide).find('button').attr({
5047                'aria-selected': 'true',
5048                'tabindex': '0'
5049            }).end();
5050        }
5051
5052        for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
5053          if (_.options.focusOnChange) {
5054            _.$slides.eq(i).attr({'tabindex': '0'});
5055          } else {
5056            _.$slides.eq(i).removeAttr('tabindex');
5057          }
5058        }
5059
5060        _.activateADA();
5061
5062    };
5063
5064    Slick.prototype.initArrowEvents = function() {
5065
5066        var _ = this;
5067
5068        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
5069            _.$prevArrow
5070               .off('click.slick')
5071               .on('click.slick', {
5072                    message: 'previous'
5073               }, _.changeSlide);
5074            _.$nextArrow
5075               .off('click.slick')
5076               .on('click.slick', {
5077                    message: 'next'
5078               }, _.changeSlide);
5079
5080            if (_.options.accessibility === true) {
5081                _.$prevArrow.on('keydown.slick', _.keyHandler);
5082                _.$nextArrow.on('keydown.slick', _.keyHandler);
5083            }
5084        }
5085
5086    };
5087
5088    Slick.prototype.initDotEvents = function() {
5089
5090        var _ = this;
5091
5092        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
5093            $('li', _.$dots).on('click.slick', {
5094                message: 'index'
5095            }, _.changeSlide);
5096
5097            if (_.options.accessibility === true) {
5098                _.$dots.on('keydown.slick', _.keyHandler);
5099            }
5100        }
5101
5102        if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
5103
5104            $('li', _.$dots)
5105                .on('mouseenter.slick', $.proxy(_.interrupt, _, true))
5106                .on('mouseleave.slick', $.proxy(_.interrupt, _, false));
5107
5108        }
5109
5110    };
5111
5112    Slick.prototype.initSlideEvents = function() {
5113
5114        var _ = this;
5115
5116        if ( _.options.pauseOnHover ) {
5117
5118            _.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
5119            _.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
5120
5121        }
5122
5123    };
5124
5125    Slick.prototype.initializeEvents = function() {
5126
5127        var _ = this;
5128
5129        _.initArrowEvents();
5130
5131        _.initDotEvents();
5132        _.initSlideEvents();
5133
5134        _.$list.on('touchstart.slick mousedown.slick', {
5135            action: 'start'
5136        }, _.swipeHandler);
5137        _.$list.on('touchmove.slick mousemove.slick', {
5138            action: 'move'
5139        }, _.swipeHandler);
5140        _.$list.on('touchend.slick mouseup.slick', {
5141            action: 'end'
5142        }, _.swipeHandler);
5143        _.$list.on('touchcancel.slick mouseleave.slick', {
5144            action: 'end'
5145        }, _.swipeHandler);
5146
5147        _.$list.on('click.slick', _.clickHandler);
5148
5149        $(document).on(_.visibilityChange, $.proxy(_.visibility, _));
5150
5151        if (_.options.accessibility === true) {
5152            _.$list.on('keydown.slick', _.keyHandler);
5153        }
5154
5155        if (_.options.focusOnSelect === true) {
5156            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
5157        }
5158
5159        $(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
5160
5161        $(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
5162
5163        $('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
5164
5165        $(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
5166        $(_.setPosition);
5167
5168    };
5169
5170    Slick.prototype.initUI = function() {
5171
5172        var _ = this;
5173
5174        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
5175
5176            _.$prevArrow.show();
5177            _.$nextArrow.show();
5178
5179        }
5180
5181        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
5182
5183            _.$dots.show();
5184
5185        }
5186
5187    };
5188
5189    Slick.prototype.keyHandler = function(event) {
5190
5191        var _ = this;
5192         //Dont slide if the cursor is inside the form fields and arrow keys are pressed
5193        if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
5194            if (event.keyCode === 37 && _.options.accessibility === true) {
5195                _.changeSlide({
5196                    data: {
5197                        message: _.options.rtl === true ? 'next' :  'previous'
5198                    }
5199                });
5200            } else if (event.keyCode === 39 && _.options.accessibility === true) {
5201                _.changeSlide({
5202                    data: {
5203                        message: _.options.rtl === true ? 'previous' : 'next'
5204                    }
5205                });
5206            }
5207        }
5208
5209    };
5210
5211    Slick.prototype.lazyLoad = function() {
5212
5213        var _ = this,
5214            loadRange, cloneRange, rangeStart, rangeEnd;
5215
5216        function loadImages(imagesScope) {
5217
5218            $('img[data-lazy]', imagesScope).each(function() {
5219
5220                var image = $(this),
5221                    imageSource = $(this).attr('data-lazy'),
5222                    imageSrcSet = $(this).attr('data-srcset'),
5223                    imageSizes  = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
5224                    imageToLoad = document.createElement('img');
5225
5226                imageToLoad.onload = function() {
5227
5228                    image
5229                        .animate({ opacity: 0 }, 100, function() {
5230
5231                            if (imageSrcSet) {
5232                                image
5233                                    .attr('srcset', imageSrcSet );
5234
5235                                if (imageSizes) {
5236                                    image
5237                                        .attr('sizes', imageSizes );
5238                                }
5239                            }
5240
5241                            image
5242                                .attr('src', imageSource)
5243                                .animate({ opacity: 1 }, 200, function() {
5244                                    image
5245                                        .removeAttr('data-lazy data-srcset data-sizes')
5246                                        .removeClass('slick-loading');
5247                                });
5248                            _.$slider.trigger('lazyLoaded', [_, image, imageSource]);
5249                        });
5250
5251                };
5252
5253                imageToLoad.onerror = function() {
5254
5255                    image
5256                        .removeAttr( 'data-lazy' )
5257                        .removeClass( 'slick-loading' )
5258                        .addClass( 'slick-lazyload-error' );
5259
5260                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
5261
5262                };
5263
5264                imageToLoad.src = imageSource;
5265
5266            });
5267
5268        }
5269
5270        if (_.options.centerMode === true) {
5271            if (_.options.infinite === true) {
5272                rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
5273                rangeEnd = rangeStart + _.options.slidesToShow + 2;
5274            } else {
5275                rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
5276                rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
5277            }
5278        } else {
5279            rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
5280            rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
5281            if (_.options.fade === true) {
5282                if (rangeStart > 0) rangeStart--;
5283                if (rangeEnd <= _.slideCount) rangeEnd++;
5284            }
5285        }
5286
5287        loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
5288
5289        if (_.options.lazyLoad === 'anticipated') {
5290            var prevSlide = rangeStart - 1,
5291                nextSlide = rangeEnd,
5292                $slides = _.$slider.find('.slick-slide');
5293
5294            for (var i = 0; i < _.options.slidesToScroll; i++) {
5295                if (prevSlide < 0) prevSlide = _.slideCount - 1;
5296                loadRange = loadRange.add($slides.eq(prevSlide));
5297                loadRange = loadRange.add($slides.eq(nextSlide));
5298                prevSlide--;
5299                nextSlide++;
5300            }
5301        }
5302
5303        loadImages(loadRange);
5304
5305        if (_.slideCount <= _.options.slidesToShow) {
5306            cloneRange = _.$slider.find('.slick-slide');
5307            loadImages(cloneRange);
5308        } else
5309        if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
5310            cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
5311            loadImages(cloneRange);
5312        } else if (_.currentSlide === 0) {
5313            cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
5314            loadImages(cloneRange);
5315        }
5316
5317    };
5318
5319    Slick.prototype.loadSlider = function() {
5320
5321        var _ = this;
5322
5323        _.setPosition();
5324
5325        _.$slideTrack.css({
5326            opacity: 1
5327        });
5328
5329        _.$slider.removeClass('slick-loading');
5330
5331        _.initUI();
5332
5333        if (_.options.lazyLoad === 'progressive') {
5334            _.progressiveLazyLoad();
5335        }
5336
5337    };
5338
5339    Slick.prototype.next = Slick.prototype.slickNext = function() {
5340
5341        var _ = this;
5342
5343        _.changeSlide({
5344            data: {
5345                message: 'next'
5346            }
5347        });
5348
5349    };
5350
5351    Slick.prototype.orientationChange = function() {
5352
5353        var _ = this;
5354
5355        _.checkResponsive();
5356        _.setPosition();
5357
5358    };
5359
5360    Slick.prototype.pause = Slick.prototype.slickPause = function() {
5361
5362        var _ = this;
5363
5364        _.autoPlayClear();
5365        _.paused = true;
5366
5367    };
5368
5369    Slick.prototype.play = Slick.prototype.slickPlay = function() {
5370
5371        var _ = this;
5372
5373        _.autoPlay();
5374        _.options.autoplay = true;
5375        _.paused = false;
5376        _.focussed = false;
5377        _.interrupted = false;
5378
5379    };
5380
5381    Slick.prototype.postSlide = function(index) {
5382
5383        var _ = this;
5384
5385        if( !_.unslicked ) {
5386
5387            _.$slider.trigger('afterChange', [_, index]);
5388
5389            _.animating = false;
5390
5391            if (_.slideCount > _.options.slidesToShow) {
5392                _.setPosition();
5393            }
5394
5395            _.swipeLeft = null;
5396
5397            if ( _.options.autoplay ) {
5398                _.autoPlay();
5399            }
5400
5401            if (_.options.accessibility === true) {
5402                _.initADA();
5403
5404                if (_.options.focusOnChange) {
5405                    var $currentSlide = $(_.$slides.get(_.currentSlide));
5406                    $currentSlide.attr('tabindex', 0).focus();
5407                }
5408            }
5409
5410        }
5411
5412    };
5413
5414    Slick.prototype.prev = Slick.prototype.slickPrev = function() {
5415
5416        var _ = this;
5417
5418        _.changeSlide({
5419            data: {
5420                message: 'previous'
5421            }
5422        });
5423
5424    };
5425
5426    Slick.prototype.preventDefault = function(event) {
5427
5428        event.preventDefault();
5429
5430    };
5431
5432    Slick.prototype.progressiveLazyLoad = function( tryCount ) {
5433
5434        tryCount = tryCount || 1;
5435
5436        var _ = this,
5437            $imgsToLoad = $( 'img[data-lazy]', _.$slider ),
5438            image,
5439            imageSource,
5440            imageSrcSet,
5441            imageSizes,
5442            imageToLoad;
5443
5444        if ( $imgsToLoad.length ) {
5445
5446            image = $imgsToLoad.first();
5447            imageSource = image.attr('data-lazy');
5448            imageSrcSet = image.attr('data-srcset');
5449            imageSizes  = image.attr('data-sizes') || _.$slider.attr('data-sizes');
5450            imageToLoad = document.createElement('img');
5451
5452            imageToLoad.onload = function() {
5453
5454                if (imageSrcSet) {
5455                    image
5456                        .attr('srcset', imageSrcSet );
5457
5458                    if (imageSizes) {
5459                        image
5460                            .attr('sizes', imageSizes );
5461                    }
5462                }
5463
5464                image
5465                    .attr( 'src', imageSource )
5466                    .removeAttr('data-lazy data-srcset data-sizes')
5467                    .removeClass('slick-loading');
5468
5469                if ( _.options.adaptiveHeight === true ) {
5470                    _.setPosition();
5471                }
5472
5473                _.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
5474                _.progressiveLazyLoad();
5475
5476            };
5477
5478            imageToLoad.onerror = function() {
5479
5480                if ( tryCount < 3 ) {
5481
5482                    /**
5483                     * try to load the image 3 times,
5484                     * leave a slight delay so we don't get
5485                     * servers blocking the request.
5486                     */
5487                    setTimeout( function() {
5488                        _.progressiveLazyLoad( tryCount + 1 );
5489                    }, 500 );
5490
5491                } else {
5492
5493                    image
5494                        .removeAttr( 'data-lazy' )
5495                        .removeClass( 'slick-loading' )
5496                        .addClass( 'slick-lazyload-error' );
5497
5498                    _.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
5499
5500                    _.progressiveLazyLoad();
5501
5502                }
5503
5504            };
5505
5506            imageToLoad.src = imageSource;
5507
5508        } else {
5509
5510            _.$slider.trigger('allImagesLoaded', [ _ ]);
5511
5512        }
5513
5514    };
5515
5516    Slick.prototype.refresh = function( initializing ) {
5517
5518        var _ = this, currentSlide, lastVisibleIndex;
5519
5520        lastVisibleIndex = _.slideCount - _.options.slidesToShow;
5521
5522        // in non-infinite sliders, we don't want to go past the
5523        // last visible index.
5524        if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
5525            _.currentSlide = lastVisibleIndex;
5526        }
5527
5528        // if less slides than to show, go to start.
5529        if ( _.slideCount <= _.options.slidesToShow ) {
5530            _.currentSlide = 0;
5531
5532        }
5533
5534        currentSlide = _.currentSlide;
5535
5536        _.destroy(true);
5537
5538        $.extend(_, _.initials, { currentSlide: currentSlide });
5539
5540        _.init();
5541
5542        if( !initializing ) {
5543
5544            _.changeSlide({
5545                data: {
5546                    message: 'index',
5547                    index: currentSlide
5548                }
5549            }, false);
5550
5551        }
5552
5553    };
5554
5555    Slick.prototype.registerBreakpoints = function() {
5556
5557        var _ = this, breakpoint, currentBreakpoint, l,
5558            responsiveSettings = _.options.responsive || null;
5559
5560        if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
5561
5562            _.respondTo = _.options.respondTo || 'window';
5563
5564            for ( breakpoint in responsiveSettings ) {
5565
5566                l = _.breakpoints.length-1;
5567
5568                if (responsiveSettings.hasOwnProperty(breakpoint)) {
5569                    currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
5570
5571                    // loop through the breakpoints and cut out any existing
5572                    // ones with the same breakpoint number, we don't want dupes.
5573                    while( l >= 0 ) {
5574                        if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
5575                            _.breakpoints.splice(l,1);
5576                        }
5577                        l--;
5578                    }
5579
5580                    _.breakpoints.push(currentBreakpoint);
5581                    _.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
5582
5583                }
5584
5585            }
5586
5587            _.breakpoints.sort(function(a, b) {
5588                return ( _.options.mobileFirst ) ? a-b : b-a;
5589            });
5590
5591        }
5592
5593    };
5594
5595    Slick.prototype.reinit = function() {
5596
5597        var _ = this;
5598
5599        _.$slides =
5600            _.$slideTrack
5601                .children(_.options.slide)
5602                .addClass('slick-slide');
5603
5604        _.slideCount = _.$slides.length;
5605
5606        if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
5607            _.currentSlide = _.currentSlide - _.options.slidesToScroll;
5608        }
5609
5610        if (_.slideCount <= _.options.slidesToShow) {
5611            _.currentSlide = 0;
5612        }
5613
5614        _.registerBreakpoints();
5615
5616        _.setProps();
5617        _.setupInfinite();
5618        _.buildArrows();
5619        _.updateArrows();
5620        _.initArrowEvents();
5621        _.buildDots();
5622        _.updateDots();
5623        _.initDotEvents();
5624        _.cleanUpSlideEvents();
5625        _.initSlideEvents();
5626
5627        _.checkResponsive(false, true);
5628
5629        if (_.options.focusOnSelect === true) {
5630            $(_.$slideTrack).children().on('click.slick', _.selectHandler);
5631        }
5632
5633        _.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
5634
5635        _.setPosition();
5636        _.focusHandler();
5637
5638        _.paused = !_.options.autoplay;
5639        _.autoPlay();
5640
5641        _.$slider.trigger('reInit', [_]);
5642
5643    };
5644
5645    Slick.prototype.resize = function() {
5646
5647        var _ = this;
5648
5649        if ($(window).width() !== _.windowWidth) {
5650            clearTimeout(_.windowDelay);
5651            _.windowDelay = window.setTimeout(function() {
5652                _.windowWidth = $(window).width();
5653                _.checkResponsive();
5654                if( !_.unslicked ) { _.setPosition(); }
5655            }, 50);
5656        }
5657    };
5658
5659    Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
5660
5661        var _ = this;
5662
5663        if (typeof(index) === 'boolean') {
5664            removeBefore = index;
5665            index = removeBefore === true ? 0 : _.slideCount - 1;
5666        } else {
5667            index = removeBefore === true ? --index : index;
5668        }
5669
5670        if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
5671            return false;
5672        }
5673
5674        _.unload();
5675
5676        if (removeAll === true) {
5677            _.$slideTrack.children().remove();
5678        } else {
5679            _.$slideTrack.children(this.options.slide).eq(index).remove();
5680        }
5681
5682        _.$slides = _.$slideTrack.children(this.options.slide);
5683
5684        _.$slideTrack.children(this.options.slide).detach();
5685
5686        _.$slideTrack.append(_.$slides);
5687
5688        _.$slidesCache = _.$slides;
5689
5690        _.reinit();
5691
5692    };
5693
5694    Slick.prototype.setCSS = function(position) {
5695
5696        var _ = this,
5697            positionProps = {},
5698            x, y;
5699
5700        if (_.options.rtl === true) {
5701            position = -position;
5702        }
5703        x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
5704        y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
5705
5706        positionProps[_.positionProp] = position;
5707
5708        if (_.transformsEnabled === false) {
5709            _.$slideTrack.css(positionProps);
5710        } else {
5711            positionProps = {};
5712            if (_.cssTransitions === false) {
5713                positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
5714                _.$slideTrack.css(positionProps);
5715            } else {
5716                positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
5717                _.$slideTrack.css(positionProps);
5718            }
5719        }
5720
5721    };
5722
5723    Slick.prototype.setDimensions = function() {
5724
5725        var _ = this;
5726
5727        if (_.options.vertical === false) {
5728            if (_.options.centerMode === true) {
5729                _.$list.css({
5730                    padding: ('0px ' + _.options.centerPadding)
5731                });
5732            }
5733        } else {
5734            _.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
5735            if (_.options.centerMode === true) {
5736                _.$list.css({
5737                    padding: (_.options.centerPadding + ' 0px')
5738                });
5739            }
5740        }
5741
5742        _.listWidth = _.$list.width();
5743        _.listHeight = _.$list.height();
5744
5745
5746        if (_.options.vertical === false && _.options.variableWidth === false) {
5747            _.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
5748            _.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
5749
5750        } else if (_.options.variableWidth === true) {
5751            _.$slideTrack.width(5000 * _.slideCount);
5752        } else {
5753            _.slideWidth = Math.ceil(_.listWidth);
5754            _.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
5755        }
5756
5757        var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
5758        if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
5759
5760    };
5761
5762    Slick.prototype.setFade = function() {
5763
5764        var _ = this,
5765            targetLeft;
5766
5767        _.$slides.each(function(index, element) {
5768            targetLeft = (_.slideWidth * index) * -1;
5769            if (_.options.rtl === true) {
5770                $(element).css({
5771                    position: 'relative',
5772                    right: targetLeft,
5773                    top: 0,
5774                    zIndex: _.options.zIndex - 2,
5775                    opacity: 0
5776                });
5777            } else {
5778                $(element).css({
5779                    position: 'relative',
5780                    left: targetLeft,
5781                    top: 0,
5782                    zIndex: _.options.zIndex - 2,
5783                    opacity: 0
5784                });
5785            }
5786        });
5787
5788        _.$slides.eq(_.currentSlide).css({
5789            zIndex: _.options.zIndex - 1,
5790            opacity: 1
5791        });
5792
5793    };
5794
5795    Slick.prototype.setHeight = function() {
5796
5797        var _ = this;
5798
5799        if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
5800            var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
5801            _.$list.css('height', targetHeight);
5802        }
5803
5804    };
5805
5806    Slick.prototype.setOption =
5807    Slick.prototype.slickSetOption = function() {
5808
5809        /**
5810         * accepts arguments in format of:
5811         *
5812         *  - for changing a single option's value:
5813         *     .slick("setOption", option, value, refresh )
5814         *
5815         *  - for changing a set of responsive options:
5816         *     .slick("setOption", 'responsive', [{}, ...], refresh )
5817         *
5818         *  - for updating multiple values at once (not responsive)
5819         *     .slick("setOption", { 'option': value, ... }, refresh )
5820         */
5821
5822        var _ = this, l, item, option, value, refresh = false, t
5822ype;
5823
5824        if( $.type( arguments[0] ) === 'object' ) {
5825
5826            option =  arguments[0];
5827            refresh = arguments[1];
5828            type = 'multiple';
5829
5830        } else if ( $.type( arguments[0] ) === 'string' ) {
5831
5832            option =  arguments[0];
5833            value = arguments[1];
5834            refresh = arguments[2];
5835
5836            if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
5837
5838                type = 'responsive';
5839
5840            } else if ( typeof arguments[1] !== 'undefined' ) {
5841
5842                type = 'single';
5843
5844            }
5845
5846        }
5847
5848        if ( type === 'single' ) {
5849
5850            _.options[option] = value;
5851
5852
5853        } else if ( type === 'multiple' ) {
5854
5855            $.each( option , function( opt, val ) {
5856
5857                _.options[opt] = val;
5858
5859            });
5860
5861
5862        } else if ( type === 'responsive' ) {
5863
5864            for ( item in value ) {
5865
5866                if( $.type( _.options.responsive ) !== 'array' ) {
5867
5868                    _.options.responsive = [ value[item] ];
5869
5870                } else {
5871
5872                    l = _.options.responsive.length-1;
5873
5874                    // loop through the responsive object and splice out duplicates.
5875                    while( l >= 0 ) {
5876
5877                        if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
5878
5879                            _.options.responsive.splice(l,1);
5880
5881                        }
5882
5883                        l--;
5884
5885                    }
5886
5887                    _.options.responsive.push( value[item] );
5888
5889                }
5890
5891            }
5892
5893        }
5894
5895        if ( refresh ) {
5896
5897            _.unload();
5898            _.reinit();
5899
5900        }
5901
5902    };
5903
5904    Slick.prototype.setPosition = function() {
5905
5906        var _ = this;
5907
5908        _.setDimensions();
5909
5910        _.setHeight();
5911
5912        if (_.options.fade === false) {
5913            _.setCSS(_.getLeft(_.currentSlide));
5914        } else {
5915            _.setFade();
5916        }
5917
5918        _.$slider.trigger('setPosition', [_]);
5919
5920    };
5921
5922    Slick.prototype.setProps = function() {
5923
5924        var _ = this,
5925            bodyStyle = document.body.style;
5926
5927        _.positionProp = _.options.vertical === true ? 'top' : 'left';
5928
5929        if (_.positionProp === 'top') {
5930            _.$slider.addClass('slick-vertical');
5931        } else {
5932            _.$slider.removeClass('slick-vertical');
5933        }
5934
5935        if (bodyStyle.WebkitTransition !== undefined ||
5936            bodyStyle.MozTransition !== undefined ||
5937            bodyStyle.msTransition !== undefined) {
5938            if (_.options.useCSS === true) {
5939                _.cssTransitions = true;
5940            }
5941        }
5942
5943        if ( _.options.fade ) {
5944            if ( typeof _.options.zIndex === 'number' ) {
5945                if( _.options.zIndex < 3 ) {
5946                    _.options.zIndex = 3;
5947                }
5948            } else {
5949                _.options.zIndex = _.defaults.zIndex;
5950            }
5951        }
5952
5953        if (bodyStyle.OTransform !== undefined) {
5954            _.animType = 'OTransform';
5955            _.transformType = '-o-transform';
5956            _.transitionType = 'OTransition';
5957            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
5958        }
5959        if (bodyStyle.MozTransform !== undefined) {
5960            _.animType = 'MozTransform';
5961            _.transformType = '-moz-transform';
5962            _.transitionType = 'MozTransition';
5963            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
5964        }
5965        if (bodyStyle.webkitTransform !== undefined) {
5966            _.animType = 'webkitTransform';
5967            _.transformType = '-webkit-transform';
5968            _.transitionType = 'webkitTransition';
5969            if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
5970        }
5971        if (bodyStyle.msTransform !== undefined) {
5972            _.animType = 'msTransform';
5973            _.transformType = '-ms-transform';
5974            _.transitionType = 'msTransition';
5975            if (bodyStyle.msTransform === undefined) _.animType = false;
5976        }
5977        if (bodyStyle.transform !== undefined && _.animType !== false) {
5978            _.animType = 'transform';
5979            _.transformType = 'transform';
5980            _.transitionType = 'transition';
5981        }
5982        _.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
5983    };
5984
5985
5986    Slick.prototype.setSlideClasses = function(index) {
5987
5988        var _ = this,
5989            centerOffset, allSlides, indexOffset, remainder;
5990
5991        allSlides = _.$slider
5992            .find('.slick-slide')
5993            .removeClass('slick-active slick-center slick-current')
5994            .attr('aria-hidden', 'true');
5995
5996        _.$slides
5997            .eq(index)
5998            .addClass('slick-current');
5999
6000        if (_.options.centerMode === true) {
6001
6002            var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
6003
6004            centerOffset = Math.floor(_.options.slidesToShow / 2);
6005
6006            if (_.options.infinite === true) {
6007
6008                if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
6009                    _.$slides
6010                        .slice(index - centerOffset + evenCoef, index + centerOffset + 1)
6011                        .addClass('slick-active')
6012                        .attr('aria-hidden', 'false');
6013
6014                } else {
6015
6016                    indexOffset = _.options.slidesToShow + index;
6017                    allSlides
6018                        .slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
6019                        .addClass('slick-active')
6020                        .attr('aria-hidden', 'false');
6021
6022                }
6023
6024                if (index === 0) {
6025
6026                    allSlides
6027                        .eq(allSlides.length - 1 - _.options.slidesToShow)
6028                        .addClass('slick-center');
6029
6030                } else if (index === _.slideCount - 1) {
6031
6032                    allSlides
6033                        .eq(_.options.slidesToShow)
6034                        .addClass('slick-center');
6035
6036                }
6037
6038            }
6039
6040            _.$slides
6041                .eq(index)
6042                .addClass('slick-center');
6043
6044        } else {
6045
6046            if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
6047
6048                _.$slides
6049                    .slice(index, index + _.options.slidesToShow)
6050                    .addClass('slick-active')
6051                    .attr('aria-hidden', 'false');
6052
6053            } else if (allSlides.length <= _.options.slidesToShow) {
6054
6055                allSlides
6056                    .addClass('slick-active')
6057                    .attr('aria-hidden', 'false');
6058
6059            } else {
6060
6061                remainder = _.slideCount % _.options.slidesToShow;
6062                indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
6063
6064                if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
6065
6066                    allSlides
6067                        .slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
6068                        .addClass('slick-active')
6069                        .attr('aria-hidden', 'false');
6070
6071                } else {
6072
6073                    allSlides
6074                        .slice(indexOffset, indexOffset + _.options.slidesToShow)
6075                        .addClass('slick-active')
6076                        .attr('aria-hidden', 'false');
6077
6078                }
6079
6080            }
6081
6082        }
6083
6084        if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
6085            _.lazyLoad();
6086        }
6087    };
6088
6089    Slick.prototype.setupInfinite = function() {
6090
6091        var _ = this,
6092            i, slideIndex, infiniteCount;
6093
6094        if (_.options.fade === true) {
6095            _.options.centerMode = false;
6096        }
6097
6098        if (_.options.infinite === true && _.options.fade === false) {
6099
6100            slideIndex = null;
6101
6102            if (_.slideCount > _.options.slidesToShow) {
6103
6104                if (_.options.centerMode === true) {
6105                    infiniteCount = _.options.slidesToShow + 1;
6106                } else {
6107                    infiniteCount = _.options.slidesToShow;
6108                }
6109
6110                for (i = _.slideCount; i > (_.slideCount -
6111                        infiniteCount); i -= 1) {
6112                    slideIndex = i - 1;
6113                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
6114                        .attr('data-slick-index', slideIndex - _.slideCount)
6115                        .prependTo(_.$slideTrack).addClass('slick-cloned');
6116                }
6117                for (i = 0; i < infiniteCount  + _.slideCount; i += 1) {
6118                    slideIndex = i;
6119                    $(_.$slides[slideIndex]).clone(true).attr('id', '')
6120                        .attr('data-slick-index', slideIndex + _.slideCount)
6121                        .appendTo(_.$slideTrack).addClass('slick-cloned');
6122                }
6123                _.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
6124                    $(this).attr('id', '');
6125                });
6126
6127            }
6128
6129        }
6130
6131    };
6132
6133    Slick.prototype.interrupt = function( toggle ) {
6134
6135        var _ = this;
6136
6137        if( !toggle ) {
6138            _.autoPlay();
6139        }
6140        _.interrupted = toggle;
6141
6142    };
6143
6144    Slick.prototype.selectHandler = function(event) {
6145
6146        var _ = this;
6147
6148        var targetElement =
6149            $(event.target).is('.slick-slide') ?
6150                $(event.target) :
6151                $(event.target).parents('.slick-slide');
6152
6153        var index = parseInt(targetElement.attr('data-slick-index'));
6154
6155        if (!index) index = 0;
6156
6157        if (_.slideCount <= _.options.slidesToShow) {
6158
6159            _.slideHandler(index, false, true);
6160            return;
6161
6162        }
6163
6164        _.slideHandler(index);
6165
6166    };
6167
6168    Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
6169
6170        var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
6171            _ = this, navTarget;
6172
6173        sync = sync || false;
6174
6175        if (_.animating === true && _.options.waitForAnimate === true) {
6176            return;
6177        }
6178
6179        if (_.options.fade === true && _.currentSlide === index) {
6180            return;
6181        }
6182
6183        if (sync === false) {
6184            _.asNavFor(index);
6185        }
6186
6187        targetSlide = index;
6188        targetLeft = _.getLeft(targetSlide);
6189        slideLeft = _.getLeft(_.currentSlide);
6190
6191        _.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
6192
6193        if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
6194            if (_.options.fade === false) {
6195                targetSlide = _.currentSlide;
6196                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
6197                    _.animateSlide(slideLeft, function() {
6198                        _.postSlide(targetSlide);
6199                    });
6200                } else {
6201                    _.postSlide(targetSlide);
6202                }
6203            }
6204            return;
6205        } else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
6206            if (_.options.fade === false) {
6207                targetSlide = _.currentSlide;
6208                if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
6209                    _.animateSlide(slideLeft, function() {
6210                        _.postSlide(targetSlide);
6211                    });
6212                } else {
6213                    _.postSlide(targetSlide);
6214                }
6215            }
6216            return;
6217        }
6218
6219        if ( _.options.autoplay ) {
6220            clearInterval(_.autoPlayTimer);
6221        }
6222
6223        if (targetSlide < 0) {
6224            if (_.slideCount % _.options.slidesToScroll !== 0) {
6225                animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
6226            } else {
6227                animSlide = _.slideCount + targetSlide;
6228            }
6229        }
6229 else if (targetSlide >= _.slideCount) {
6230            if (_.slideCount % _.options.slidesToScroll !== 0) {
6231                animSlide = 0;
6232            } else {
6233                animSlide = targetSlide - _.slideCount;
6234            }
6235        } else {
6236            animSlide = targetSlide;
6237        }
6238
6239        _.animating = true;
6240
6241        _.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
6242
6243        oldSlide = _.currentSlide;
6244        _.currentSlide = animSlide;
6245
6246        _.setSlideClasses(_.currentSlide);
6247
6248        if ( _.options.asNavFor ) {
6249
6250            navTarget = _.getNavTarget();
6251            navTarget = navTarget.slick('getSlick');
6252
6253            if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
6254                navTarget.setSlideClasses(_.currentSlide);
6255            }
6256
6257        }
6258
6259        _.updateDots();
6260        _.updateArrows();
6261
6262        if (_.options.fade === true) {
6263            if (dontAnimate !== true) {
6264
6265                _.fadeSlideOut(oldSlide);
6266
6267                _.fadeSlide(animSlide, function() {
6268                    _.postSlide(animSlide);
6269                });
6270
6271            } else {
6272                _.postSlide(animSlide);
6273            }
6274            _.animateHeight();
6275            return;
6276        }
6277
6278        if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
6279            _.animateSlide(targetLeft, function() {
6280                _.postSlide(animSlide);
6281            });
6282        } else {
6283            _.postSlide(animSlide);
6284        }
6285
6286    };
6287
6288    Slick.prototype.startLoad = function() {
6289
6290        var _ = this;
6291
6292        if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
6293
6294            _.$prevArrow.hide();
6295            _.$nextArrow.hide();
6296
6297        }
6298
6299        if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
6300
6301            _.$dots.hide();
6302
6303        }
6304
6305        _.$slider.addClass('slick-loading');
6306
6307    };
6308
6309    Slick.prototype.swipeDirection = function() {
6310
6311        var xDist, yDist, r, swipeAngle, _ = this;
6312
6313        xDist = _.touchObject.startX - _.touchObject.curX;
6314        yDist = _.touchObject.startY - _.touchObject.curY;
6315        r = Math.atan2(yDist, xDist);
6316
6317        swipeAngle = Math.round(r * 180 / Math.PI);
6318        if (swipeAngle < 0) {
6319            swipeAngle = 360 - Math.abs(swipeAngle);
6320        }
6321
6322        if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
6323            return (_.options.rtl === false ? 'left' : 'right');
6324        }
6325        if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
6326            return (_.options.rtl === false ? 'left' : 'right');
6327        }
6328        if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
6329            return (_.options.rtl === false ? 'right' : 'left');
6330        }
6331        if (_.options.verticalSwiping === true) {
6332            if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
6333                return 'down';
6334            } else {
6335                return 'up';
6336            }
6337        }
6338
6339        return 'vertical';
6340
6341    };
6342
6343    Slick.prototype.swipeEnd = function(event) {
6344
6345        var _ = this,
6346            slideCount,
6347            direction;
6348
6349        _.dragging = false;
6350        _.swiping = false;
6351
6352        if (_.scrolling) {
6353            _.scrolling = false;
6354            return false;
6355        }
6356
6357        _.interrupted = false;
6358        _.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
6359
6360        if ( _.touchObject.curX === undefined ) {
6361            return false;
6362        }
6363
6364        if ( _.touchObject.edgeHit === true ) {
6365            _.$slider.trigger('edge', [_, _.swipeDirection() ]);
6366        }
6367
6368        if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
6369
6370            direction = _.swipeDirection();
6371
6372            switch ( direction ) {
6373
6374                case 'left':
6375                case 'down':
6376
6377                    slideCount =
6378                        _.options.swipeToSlide ?
6379                            _.checkNavigable( _.currentSlide + _.getSlideCount() ) :
6380                            _.currentSlide + _.getSlideCount();
6381
6382                    _.currentDirection = 0;
6383
6384                    break;
6385
6386                case 'right':
6387                case 'up':
6388
6389                    slideCount =
6390                        _.options.swipeToSlide ?
6391                            _.checkNavigable( _.currentSlide - _.getSlideCount() ) :
6392                            _.currentSlide - _.getSlideCount();
6393
6394                    _.currentDirection = 1;
6395
6396                    break;
6397
6398                default:
6399
6400
6401            }
6402
6403            if( direction != 'vertical' ) {
6404
6405                _.slideHandler( slideCount );
6406                _.touchObject = {};
6407                _.$slider.trigger('swipe', [_, direction ]);
6408
6409            }
6410
6411        } else {
6412
6413            if ( _.touchObject.startX !== _.touchObject.curX ) {
6414
6415                _.slideHandler( _.currentSlide );
6416                _.touchObject = {};
6417
6418            }
6419
6420        }
6421
6422    };
6423
6424    Slick.prototype.swipeHandler = function(event) {
6425
6426        var _ = this;
6427
6428        if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
6429            return;
6430        } else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
6431            return;
6432        }
6433
6434        _.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
6435            event.originalEvent.touches.length : 1;
6436
6437        _.touchObject.minSwipe = _.listWidth / _.options
6438            .touchThreshold;
6439
6440        if (_.options.verticalSwiping === true) {
6441            _.touchObject.minSwipe = _.listHeight / _.options
6442                .touchThreshold;
6443        }
6444
6445        switch (event.data.action) {
6446
6447            case 'start':
6448                _.swipeStart(event);
6449                break;
6450
6451            case 'move':
6452                _.swipeMove(event);
6453                break;
6454
6455            case 'end':
6456                _.swipeEnd(event);
6457                break;
6458
6459        }
6460
6461    };
6462
6463    Slick.prototype.swipeMove = function(event) {
6464
6465        var _ = this,
6466            edgeWasHit = false,
6467            curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
6468
6469        touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
6470
6471        if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
6472            return false;
6473        }
6474
6475        curLeft = _.getLeft(_.currentSlide);
6476
6477        _.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
6478        _.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
6479
6480        _.touchObject.swipeLength = Math.round(Math.sqrt(
6481            Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
6482
6483        verticalSwipeLength = Math.round(Math.sqrt(
6484            Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
6485
6486        if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
6487            _.scrolling = true;
6488            return false;
6489        }
6490
6491        if (_.options.verticalSwiping === true) {
6492            _.touchObject.swipeLength = verticalSwipeLength;
6493        }
6494
6495        swipeDirection = _.swipeDirection();
6496
6497        if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
6498            _.swiping = true;
6499            event.preventDefault();
6500        }
6501
6502        positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
6503        if (_.options.verticalSwiping === true) {
6504            positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
6505        }
6506
6507
6508        swipeLength = _.touchObject.swipeLength;
6509
6510        _.touchObject.edgeHit = false;
6511
6512        if (_.options.infinite === false) {
6513            if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
6514                swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
6515                _.touchObject.edgeHit = true;
6516            }
6517        }
6518
6519        if (_.options.vertical === false) {
6520            _.swipeLeft = curLeft + swipeLength * positionOffset;
6521        } else {
6522            _.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
6523        }
6524        if (_.options.verticalSwiping === true) {
6525            _.swipeLeft = curLeft + swipeLength * positionOffset;
6526        }
6527
6528        if (_.options.fade === true || _.options.touchMove === false) {
6529            return false;
6530        }
6531
6532        if (_.animating === true) {
6533            _.swipeLeft = null;
6534            return false;
6535        }
6536
6537        _.setCSS(_.swipeLeft);
6538
6539    };
6540
6541    Slick.prototype.swipeStart = function(event) {
6542
6543        var _ = this,
6544            touches;
6545
6546        _.interrupted = true;
6547
6548        if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
6549            _.touchObject = {};
6550            return false;
6551        }
6552
6553        if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
6554            touches = event.originalEvent.touches[0];
6555        }
6556
6557        _.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
6558        _.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
6559
6560        _.dragging = true;
6561
6562    };
6563
6564    Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
6565
6566        var _ = this;
6567
6568        if (_.$slidesCache !== null) {
6569
6570            _.unload();
6571
6572            _.$slideTrack.children(this.options.slide).detach();
6573
6574            _.$slidesCache.appendTo(_.$slideTrack);
6575
6576            _.reinit();
6577
6578        }
6579
6580    };
6581
6582    Slick.prototype.unload = function() {
6583
6584        var _ = this;
6585
6586        $('.slick-cloned', _.$slider).remove();
6587
6588        if (_.$dots) {
6589            _.$dots.remove();
6590        }
6591
6592        if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
6593            _.$prevArrow.remove();
6594        }
6595
6596        if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
6597            _.$nextArrow.remove();
6598        }
6599
6600        _.$slides
6601            .removeClass('slick-slide slick-active slick-visible slick-current')
6602            .attr('aria-hidden', 'true')
6603            .css('width', '');
6604
6605    };
6606
6607    Slick.prototype.unslick = function(fromBreakpoint) {
6608
6609        var _ = this;
6610        _.$slider.trigger('unslick', [_, fromBreakpoint]);
6611        _.destroy();
6612
6613    };
6614
6615    Slick.prototype.updateArrows = function() {
6616
6617        var _ = this,
6618            centerOffset;
6619
6620        centerOffset = Math.floor(_.options.slidesToShow / 2);
6621
6622        if ( _.options.arrows === true &&
6623            _.slideCount > _.options.slidesToShow &&
6624            !_.options.infinite ) {
6625
6626            _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
6627            _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
6628
6629            if (_.currentSlide === 0) {
6630
6631                _.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
6632                _.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
6633
6634            } else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
6635
6636                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
6637                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
6638
6639            } else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
6640
6641                _.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
6642                _.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
6643
6644            }
6645
6646        }
6647
6648    };
6649
6650    Slick.prototype.updateDots = function() {
6651
6652        var _ = this;
6653
6654        if (_.$dots !== null) {
6655
6656            _.$dots
6657                .find('li')
6658                    .removeClass('slick-active')
6659                    .end();
6660
6661            _.$dots
6662                .find('li')
6663                .eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
6664                .addClass('slick-active');
6665
6666        }
6667
6668    };
6669
6670    Slick.prototype.visibility = function() {
6671
6672        var _ = this;
6673
6674        if ( _.options.autoplay ) {
6675
6676            if ( document[_.hidden] ) {
6677
6678                _.interrupted = true;
6679
6680            } else {
6681
6682                _.interrupted = false;
6683
6684            }
6685
6686        }
6687
6688    };
6689
6690    $.fn.slick = function() {
6691        var _ = this,
6692            opt = arguments[0],
6693            args = Array.prototype.slice.call(arguments, 1),
6694            l = _.length,
6695            i,
6696            ret;
6697        for (i = 0; i < l; i++) {
6698            if (typeof opt == 'object' || typeof opt == 'undefined')
6699                _[i].slick = new Slick(_[i], opt);
6700            else
6701                ret = _[i].slick[opt].apply(_[i].slick, args);
6702            if (typeof ret != 'undefined') return ret;
6703        }
6704        return _;
6705    };
6706
6707}));
6708
6709/*
6710 Original Plugin by Osvaldas Valutis, www.osvaldas.info
6711 http://osvaldas.info/drop-down-navigation-responsive-and-touch-friendly
6712 Available for use under the MIT License
6713 */
6714/**
6715 * jquery-doubleTapToGo plugin
6716 * Copyright 2017 DACHCOM.DIGITAL AG
6717 * @author Marco Rieser
6718 * @author Volker Andres
6719 * @author Stefan Hagspiel
6720 * @version 3.0.2
6721 * @see https://github.com/dachcom-digital/jquery-doubletaptogo
6722 */
6723(function ($, window, document, undefined) {
6724    'use strict';
6725    var pluginName = 'doubleTapToGo',
6726        defaults = {
6727            automatic: true,
6728            selectorClass: 'doubletap',
6729            selectorChain: 'li:has(ul)'
6730        };
6731
6732    function DoubleTapToGo (element, options) {
6733        this.element = element;
6734        this.settings = $.extend({}, defaults, options);
6735        this._defaults = defaults;
6736        this._name = pluginName;
6737        this.init();
6738    }
6739
6740    $.extend(DoubleTapToGo.prototype, {
6741        preventClick: false,
6742        currentTap: $(),
6743        init: function () {
6744            $(this.element)
6745                .on('touchstart', '.' + this.settings.selectorClass, this._tap.bind(this))
6746                .on('click', '.' + this.settings.selectorClass, this._click.bind(this))
6747                .on('remove', this._destroy.bind(this));
6748
6749            this._addSelectors();
6750        },
6751
6752        _addSelectors: function () {
6753            if (this.settings.automatic !== true) {
6754                return;
6755            }
6756            $(this.element)
6757                .find(this.settings.selectorChain)
6758                .addClass(this.settings.selectorClass);
6759        },
6760
6761        _click: function (event) {
6762            if (this.preventClick) {
6763                event.preventDefault();
6764            } else {
6765                this.currentTap = $();
6766            }
6767        },
6768
6769        _tap: function (event) {
6770            var $target = $(event.target).closest('li');
6771            if (!$target.hasClass(this.settings.selectorClass)) {
6772                this.preventClick = false;
6773                return;
6774            }
6775            if ($target.get(0) === this.currentTap.get(0)) {
6776                this.preventClick = false;
6777                return;
6778            }
6779            this.preventClick = true;
6780            this.currentTap = $target;
6781            event.stopPropagation();
6782        },
6783
6784        _destroy: function () {
6785            $(this.element).off();
6786        },
6787
6788        reset: function () {
6789            this.currentTap = $();
6790        }
6791    });
6792
6793    $.fn[pluginName] = function (options) {
6794        var args = arguments,
6795            returns;
6796        if (options === undefined || typeof options === 'object') {
6797            return this.each(function () {
6798                if (!$.data(this, pluginName)) {
6799                    $.data(this, pluginName, new DoubleTapToGo(this, options));
6800                }
6801            });
6802        } else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
6803            this.each(function () {
6804                var instance = $.data(this, pluginName),
6805                    methodName = (options === 'destroy' ? '_destroy' : options);
6806                if (instance instanceof DoubleTapToGo && typeof instance[methodName] === 'function') {
6807                    returns = instance[methodName].apply(instance, Array.prototype.slice.call(args, 1));
6808                }
6809                if (options === 'destroy') {
6810                    $.data(this, pluginName, null);
6811                }
6812            });
6813            return returns !== undefined ? returns : this;
6814        }
6815    };
6816})(jQuery, window, document);
6817
6818/*! WOW wow.js - v1.3.0 - 2016-10-04 */
6819(function (global, factory) {
6820  if (typeof define === "function" && define.amd) {
6821    define(['module', 'exports'], factory);
6822  } else if (typeof exports !== "undefined") {
6823    factory(module, exports);
6824  } else {
6825    var mod = {
6826      exports: {}
6827    };
6828    factory(mod, mod.exports);
6829    global.WOW = mod.exports;
6830  }
6831})(this, function (module, exports) {
6832  'use strict';
6833
6834  Object.defineProperty(exports, "__esModule", {
6835    value: true
6836  });
6837
6838  var _class, _temp;
6839
6840  function _classCallCheck(instance, Constructor) {
6841    if (!(instance instanceof Constructor)) {
6842      throw new TypeError("Cannot call a class as a function");
6843    }
6844  }
6845
6846  var _createClass = function () {
6847    function defineProperties(target, props) {
6848      for (var i = 0; i < props.length; i++) {
6849        var descriptor = props[i];
6850        descriptor.enumerable = descriptor.enumerable || false;
6851        descriptor.configurable = true;
6852        if ("value" in descriptor) descriptor.writable = true;
6853        Object.defineProperty(target, descriptor.key, descriptor);
6854      }
6855    }
6856
6857    return function (Constructor, protoProps, staticProps) {
6858      if (protoProps) defineProperties(Constructor.prototype, protoProps);
6859      if (staticProps) defineProperties(Constructor, staticProps);
6860      return Constructor;
6861    };
6862  }();
6863
6864  function isIn(needle, haystack) {
6865    return haystack.indexOf(needle) >= 0;
6866  }
6867
6868  function extend(custom, defaults) {
6869    for (var key in defaults) {
6870      if (custom[key] == null) {
6871        var value = defaults[key];
6872        custom[key] = value;
6873      }
6874    }
6875    return custom;
6876  }
6877
6878  function isMobile(agent) {
6879    return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent)
6880    );
6881  }
6882
6883  function createEvent(event) {
6884    var bubble = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
6885    var cancel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
6886    var detail = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];
6887
6888    var customEvent = void 0;
6889    if (document.createEvent != null) {
6890      // W3C DOM
6891      customEvent = document.createEvent('CustomEvent');
6892      customEvent.initCustomEvent(event, bubble, cancel, detail);
6893    } else if (document.createEventObject != null) {
6894      // IE DOM < 9
6895      customEvent = document.createEventObject();
6896      customEvent.eventType = event;
6897    } else {
6898      customEvent.eventName = event;
6899    }
6900
6901    return customEvent;
6902  }
6903
6904  function emitEvent(elem, event) {
6905    if (elem.dispatchEvent != null) {
6906      // W3C DOM
6907      elem.dispatchEvent(event);
6908    } else if (event in (elem != null)) {
6909      elem[event]();
6910    } else if ('on' + event in (elem != null)) {
6911      elem['on' + event]();
6912    }
6913  }
6914
6915  function addEvent(elem, event, fn) {
6916    if (elem.addEventListener != null) {
6917      // W3C DOM
6918      elem.addEventListener(event, fn, false);
6919    } else if (elem.attachEvent != null) {
6920      // IE DOM
6921      elem.attachEvent('on' + event, fn);
6922    } else {
6923      // fallback
6924      elem[event] = fn;
6925    }
6926  }
6927
6928  function removeEvent(elem, event, fn) {
6929    if (elem.removeEventListener != null) {
6930      // W3C DOM
6931      elem.removeEventListener(event, fn, false);
6932    } else if (elem.detachEvent != null) {
6933      // IE DOM
6934      elem.detachEvent('on' + event, fn);
6935    } else {
6936      // fallback
6937      delete elem[event];
6938    }
6939  }
6940
6941  function getInnerHeight() {
6942    if ('innerHeight' in window) {
6943      return window.innerHeight;
6944    }
6945
6946    return document.documentElement.clientHeight;
6947  }
6948
6949  // Minimalistic WeakMap shim, just in case.
6950  var WeakMap = window.WeakMap || window.MozWeakMap || function () {
6951    function WeakMap() {
6952      _classCallCheck(this, WeakMap);
6953
6954      this.keys = [];
6955      this.values = [];
6956    }
6957
6958    _createClass(WeakMap, [{
6959      key: 'get',
6960      value: function get(key) {
6961        for (var i = 0; i < this.keys.length; i++) {
6962          var item = this.keys[i];
6963          if (item === key) {
6964            return this.values[i];
6965          }
6966        }
6967        return undefined;
6968      }
6969    }, {
6970      key: 'set',
6971      value: function set(key, value) {
6972        for (var i = 0; i < this.keys.length; i++) {
6973          var item = this.keys[i];
6974          if (item === key) {
6975            this.values[i] = value;
6976            return this;
6977          }
6978        }
6979        this.keys.push(key);
6980        this.values.push(value);
6981        return this;
6982      }
6983    }]);
6984
6985    return WeakMap;
6986  }();
6987
6988  // Dummy MutationObserver, to avoid raising exceptions.
6989  var MutationObserver = window.MutationObserver || window.WebkitMutationObserver || window.MozMutationObserver || (_temp = _class = function () {
6990    function MutationObserver() {
6991      _classCallCheck(this, MutationObserver);
6992
6993      if (typeof console !== 'undefined' && console !== null) {
6994        console.warn('MutationObserver is not supported by your browser.');
6995        console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.');
6996      }
6997    }
6998
6999    _createClass(MutationObserver, [{
7000      key: 'observe',
7001      value: function observe() {}
7002    }]);
7003
7004    return MutationObserver;
7005  }(), _class.notSupported = true, _temp);
7006
7007  // getComputedStyle shim, from http://stackoverflow.com/a/21797294
7008  var getComputedStyle = window.getComputedStyle || function getComputedStyle(el) {
7009    var getComputedStyleRX = /(\-([a-z]){1})/g;
7010    return {
7011      getPropertyValue: function getPropertyValue(prop) {
7012        if (prop === 'float') {
7013          prop = 'styleFloat';
7014        }
7015        if (getComputedStyleRX.test(prop)) {
7016          prop.replace(getComputedStyleRX, function (_, _char) {
7017            return _char.toUpperCase();
7018          });
7019        }
7020        var currentStyle = el.currentStyle;
7021
7022        return (currentStyle != null ? currentStyle[prop] : void 0) || null;
7023      }
7024    };
7025  };
7026
7027  var WOW = function () {
7028    function WOW() {
7029      var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
7030
7031      _classCallCheck(this, WOW);
7032
7033      this.defaults = {
7034        boxClass: 'wow',
7035        animateClass: 'animated',
7036        offset: 0,
7037        mobile: true,
7038        live: true,
7039        callback: null,
7040        scrollContainer: null,
7041        resetAnimation: true
7042      };
7043
7044      this.animate = function animateFactory() {
7045        if ('requestAnimationFrame' in window) {
7046          return function (callback) {
7047            return window.requestAnimationFrame(callback);
7048          };
7049        }
7050        return function (callback) {
7051          return callback();
7052        };
7053      }();
7054
7055      this.vendors = ['moz', 'webkit'];
7056
7057      this.start = this.start.bind(this);
7058      this.resetAnimation = this.resetAnimation.bind(this);
7059      this.scrollHandler = this.scrollHandler.bind(this);
7060      this.scrollCallback = this.scrollCallback.bind(this);
7061      this.scrolled = true;
7062      this.config = extend(options, this.defaults);
7063      if (options.scrollContainer != null) {
7064        this.config.scrollContainer = document.querySelector(options.scrollContainer);
7065      }
7066      // Map of elements to animation names:
7067      this.animationNameCache = new WeakMap();
7068      this.wowEvent = createEvent(this.config.boxClass);
7069    }
7070
7071    _createClass(WOW, [{
7072      key: 'init',
7073      value: function init() {
7074        this.element = window.document.documentElement;
7075        if (isIn(document.readyState, ['interactive', 'complete'])) {
7076          this.start();
7077        } else {
7078          addEvent(document, 'DOMContentLoaded', this.start);
7079        }
7080        this.finished = [];
7081      }
7082    }, {
7083      key: 'start',
7084      value: function start() {
7085        var _this = this;
7086
7087        this.stopped = false;
7088        this.boxes = [].slice.call(this.element.querySelectorAll('.' + this.config.boxClass));
7089        this.all = this.boxes.slice(0);
7090        if (this.boxes.length) {
7091          if (this.disabled()) {
7092            this.resetStyle();
7093          } else {
7094            for (var i = 0; i < this.boxes.length; i++) {
7095              var box = this.boxes[i];
7096              this.applyStyle(box, true);
7097            }
7098          }
7099        }
7100        if (!this.disabled()) {
7101          addEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler);
7102          addEvent(window, 'resize', this.scrollHandler);
7103          this.interval = setInterval(this.scrollCallback, 50);
7104        }
7105        if (this.config.live) {
7106          var mut = new MutationObserver(function (records) {
7107            for (var j = 0; j < records.length; j++) {
7108              var record = records[j];
7109              for (var k = 0; k < record.addedNodes.length; k++) {
7110                var node = record.addedNodes[k];
7111                _this.doSync(node);
7112              }
7113            }
7114            return undefined;
7115          });
7116          mut.observe(document.body, {
7117            childList: true,
7118            subtree: true
7119          });
7120        }
7121      }
7122    }, {
7123      key: 'stop',
7124      value: function stop() {
7125        this.stopped = true;
7126        removeEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler);
7127        removeEvent(window, 'resize', this.scrollHandler);
7128        if (this.interval != null) {
7129          clearInterval(this.interval);
7130        }
7131      }
7132    }, {
7133      key: 'sync',
7134      value: function sync() {
7135        if (MutationObserver.notSupported) {
7136          this.doSync(this.element);
7137        }
7138      }
7139    }, {
7140      key: 'doSync',
7141      value: function doSync(element) {
7142        if (typeof element === 'undefined' || element === null) {
7143          element = this.element;
7144        }
7145        if (element.nodeType !== 1) {
7146          return;
7147        }
7148        element = element.parentNode || element;
7149        var iterable = element.querySelectorAll('.' + this.config.boxClass);
7150        for (var i = 0; i < iterable.length; i++) {
7151          var box = iterable[i];
7152          if (!isIn(box, this.all)) {
7153            this.boxes.push(box);
7154            this.all.push(box);
7155            if (this.stopped || this.disabled()) {
7156              this.resetStyle();
7157            } else {
7158              this.applyStyle(box, true);
7159            }
7160            this.scrolled = true;
7161          }
7162        }
7163      }
7164    }, {
7165      key: 'show',
7166      value: function show(box) {
7167        this.applyStyle(box);
7168        box.className = box.className + ' ' + this.config.animateClass;
7169        if (this.config.callback != null) {
7170          this.config.callback(box);
7171        }
7172        emitEvent(box, this.wowEvent);
7173
7174        if (this.config.resetAnimation) {
7175          addEvent(box, 'animationend', this.resetAnimation);
7176          addEvent(box, 'oanimationend', this.resetAnimation);
7177          addEvent(box, 'webkitAnimationEnd', this.resetAnimation);
7178          addEvent(box, 'MSAnimationEnd', this.resetAnimation);
7179        }
7180
7181        return box;
7182      }
7183    }, {
7184      key: 'applyStyle',
7185      value: function applyStyle(box, hidden) {
7186        var _this2 = this;
7187
7188        var duration = box.getAttribute('data-wow-duration');
7189        var delay = box.getAttribute('data-wow-delay');
7190        var iteration = box.getAttribute('data-wow-iteration');
7191
7192        return this.animate(function () {
7193          return _this2.customStyle(box, hidden, duration, delay, iteration);
7194        });
7195      }
7196    }, {
7197      key: 'resetStyle',
7198      value: function resetStyle() {
7199        for (var i = 0; i < this.boxes.length; i++) {
7200          var box = this.boxes[i];
7201          box.style.visibility = 'visible';
7202        }
7203        return undefined;
7204      }
7205    }, {
7206      key: 'resetAnimation',
7207      value: function resetAnimation(event) {
7208        if (event.type.toLowerCase().indexOf('animationend') >= 0) {
7209          var target = event.target || event.srcElement;
7210          target.className = target.className.replace(this.config.animateClass, '').trim();
7211        }
7212      }
7213    }, {
7214      key: 'customStyle',
7215      value: function customStyle(box, hidden, duration, delay, iteration) {
7216        if (hidden) {
7217          this.cacheAnimationName(box);
7218        }
7219        box.style.visibility = hidden ? 'hidden' : 'visible';
7220
7221        if (duration) {
7222          this.vendorSet(box.style, { animationDuration: duration });
7223        }
7224        if (delay) {
7225          this.vendorSet(box.style, { animationDelay: delay });
7226        }
7227        if (iteration) {
7228          this.vendorSet(box.style, { animationIterationCount: iteration });
7229        }
7230        this.vendorSet(box.style, { animationName: hidden ? 'none' : this.cachedAnimationName(box) });
7231
7232        return box;
7233      }
7234    }, {
7235      key: 'vendorSet',
7236      value: function vendorSet(elem, properties) {
7237        for (var name in properties) {
7238          if (properties.hasOwnProperty(name)) {
7239            var value = properties[name];
7240            elem['' + name] = value;
7241            for (var i = 0; i < this.vendors.length; i++) {
7242              var vendor = this.vendors[i];
7243              elem['' + vendor + name.charAt(0).toUpperCase() + name.substr(1)] = value;
7244            }
7245          }
7246        }
7247      }
7248    }, {
7249      key: 'vendorCSS',
7250      value: function vendorCSS(elem, property) {
7251        var style = getComputedStyle(elem);
7252        var result = style.getPropertyCSSValue(property);
7253        for (var i = 0; i < this.vendors.length; i++) {
7254          var vendor = this.vendors[i];
7255          result = result || style.getPropertyCSSValue('-' + vendor + '-' + property);
7256        }
7257        return result;
7258      }
7259    }, {
7260      key: 'animationName',
7261      value: function animationName(box) {
7262        var aName = void 0;
7263        try {
7264          aName = this.vendorCSS(box, 'animation-name').cssText;
7265        } catch (error) {
7266          // Opera, fall back to plain property value
7267          aName = getComputedStyle(box).getPropertyValue('animation-name');
7268        }
7269
7270        if (aName === 'none') {
7271          return ''; // SVG/Firefox, unable to get animation name?
7272        }
7273
7274        return aName;
7275      }
7276    }, {
7277      key: 'cacheAnimationName',
7278      value: function cacheAnimationName(box) {
7279        // https://bugzilla.mozilla.org/show_bug.cgi?id=921834
7280        // box.dataset is not supported for SVG elements in Firefox
7281        return this.animationNameCache.set(box, this.animationName(box));
7282      }
7283    }, {
7284      key: 'cachedAnimationName',
7285      value: function cachedAnimationName(box) {
7286        return this.animationNameCache.get(box);
7287      }
7288    }, {
7289      key: 'scrollHandler',
7290      value: function scrollHandler() {
7291        this.scrolled = true;
7292      }
7293    }, {
7294      key: 'scrollCallback',
7295      value: function scrollCallback() {
7296        if (this.scrolled) {
7297          this.scrolled = false;
7298          var results = [];
7299          for (var i = 0; i < this.boxes.length; i++) {
7300            var box = this.boxes[i];
7301            if (box) {
7302              if (this.isVisible(box)) {
7303                this.show(box);
7304                continue;
7305              }
7306              results.push(box);
7307            }
7308          }
7309          this.boxes = results;
7310          if (!this.boxes.length && !this.config.live) {
7311            this.stop();
7312          }
7313        }
7314      }
7315    }, {
7316      key: 'offsetTop',
7317      value: function offsetTop(element) {
7318        // SVG elements don't have an offsetTop in Firefox.
7319        // This will use their nearest parent that has an offsetTop.
7320        // Also, using ('offsetTop' of element) causes an exception in Firefox.
7321        while (element.offsetTop === undefined) {
7322          element = element.parentNode;
7323        }
7324        var top = element.offsetTop;
7325        while (element.offsetParent) {
7326          element = element.offsetParent;
7327          top += element.offsetTop;
7328        }
7329        return top;
7330      }
7331    }, {
7332      key: 'isVisible',
7333      value: function isVisible(box) {
7334        var offset = box.getAttribute('data-wow-offset') || this.config.offset;
7335        var viewTop = this.config.scrollContainer && this.config.scrollContainer.scrollTop || window.pageYOffset;
7336        var viewBottom = viewTop + Math.min(this.element.clientHeight, getInnerHeight()) - offset;
7337        var top = this.offsetTop(box);
7338        var bottom = top + box.clientHeight;
7339
7340        return top <= viewBottom && bottom >= viewTop;
7341      }
7342    }, {
7343      key: 'disabled',
7344      value: function disabled() {
7345        return !this.config.mobile && isMobile(navigator.userAgent);
7346      }
7347    }]);
7348
7349    return WOW;
7350  }();
7351
7352  exports.default = WOW;
7353  module.exports = exports['default'];
7354});
7355/*! jQuery UI - v1.14.1 - 2024-10-30
7356* https://jqueryui.com
7357* 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
7358* Copyright OpenJS Foundation and other contributors; Licensed MIT */
7359
7360( function( factory ) {
7361	"use strict";
7362
7363	if ( typeof define === "function" && define.amd ) {
7364
7365		// AMD. Register as an anonymous module.
7366		define( [ "jquery" ], factory );
7367	} else {
7368
7369		// Browser globals
7370		factory( jQuery );
7371	}
7372} )( function( $ ) {
7373"use strict";
7374
7375$.ui = $.ui || {};
7376
7377var version = $.ui.version = "1.14.1";
7378
7379
7380/*!
7381 * jQuery UI Widget 1.14.1
7382 * https://jqueryui.com
7383 *
7384 * Copyright OpenJS Foundation and other contributors
7385 * Released under the MIT license.
7386 * https://jquery.org/license
7387 */
7388
7389//>>label: Widget
7390//>>group: Core
7391//>>description: Provides a factory for creating stateful widgets with a common API.
7392//>>docs: https://api.jqueryui.com/jQuery.widget/
7393//>>demos: https://jqueryui.com/widget/
7394
7395
7396var widgetUuid = 0;
7397var widgetHasOwnProperty = Array.prototype.hasOwnProperty;
7398var widgetSlice = Array.prototype.slice;
7399
7400$.cleanData = ( function( orig ) {
7401	return function( elems ) {
7402		var events, elem, i;
7403		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
7404
7405			// Only trigger remove when necessary to save time
7406			events = $._data( elem, "events" );
7407			if ( events && events.remove ) {
7408				$( elem ).triggerHandler( "remove" );
7409			}
7410		}
7411		orig( elems );
7412	};
7413} )( $.cleanData );
7414
7415$.widget = function( name, base, prototype ) {
7416	var existingConstructor, constructor, basePrototype;
7417
7418	// ProxiedPrototype allows the provided prototype to remain unmodified
7419	// so that it can be used as a mixin for multiple widgets (#8876)
7420	var proxiedPrototype = {};
7421
7422	var namespace = name.split( "." )[ 0 ];
7423	name = name.split( "." )[ 1 ];
7424	if ( name === "__proto__" || name === "constructor" ) {
7425		return $.error( "Invalid widget name: " + name );
7426	}
vendor: 7,262 bytes, lines 7426-7687
7426
7427	var fullName = namespace + "-" + name;
7428
7429	if ( !prototype ) {
7430		prototype = base;
7431		base = $.Widget;
7432	}
7433
7434	if ( Array.isArray( prototype ) ) {
7435		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
7436	}
7437
7438	// Create selector for plugin
7439	$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
7440		return !!$.data( elem, fullName );
7441	};
7442
7443	$[ namespace ] = $[ namespace ] || {};
7444	existingConstructor = $[ namespace ][ name ];
7445	constructor = $[ namespace ][ name ] = function( options, element ) {
7446
7447		// Allow instantiation without "new" keyword
7448		if ( !this || !this._createWidget ) {
7449			return new constructor( options, element );
7450		}
7451
7452		// Allow instantiation without initializing for simple inheritance
7453		// must use "new" keyword (the code above always passes args)
7454		if ( arguments.length ) {
7455			this._createWidget( options, element );
7456		}
7457	};
7458
7459	// Extend with the existing constructor to carry over any static properties
7460	$.extend( constructor, existingConstructor, {
7461		version: prototype.version,
7462
7463		// Copy the object used to create the prototype in case we need to
7464		// redefine the widget later
7465		_proto: $.extend( {}, prototype ),
7466
7467		// Track widgets that inherit from this widget in case this widget is
7468		// redefined after a widget inherits from it
7469		_childConstructors: []
7470	} );
7471
7472	basePrototype = new base();
7473
7474	// We need to make the options hash a property directly on the new instance
7475	// otherwise we'll modify the options hash on the prototype that we're
7476	// inheriting from
7477	basePrototype.options = $.widget.extend( {}, basePrototype.options );
7478	$.each( prototype, function( prop, value ) {
7479		if ( typeof value !== "function" ) {
7480			proxiedPrototype[ prop ] = value;
7481			return;
7482		}
7483		proxiedPrototype[ prop ] = ( function() {
7484			function _super() {
7485				return base.prototype[ prop ].apply( this, arguments );
7486			}
7487
7488			function _superApply( args ) {
7489				return base.prototype[ prop ].apply( this, args );
7490			}
7491
7492			return function() {
7493				var __super = this._super;
7494				var __superApply = this._superApply;
7495				var returnValue;
7496
7497				this._super = _super;
7498				this._superApply = _superApply;
7499
7500				returnValue = value.apply( this, arguments );
7501
7502				this._super = __super;
7503				this._superApply = __superApply;
7504
7505				return returnValue;
7506			};
7507		} )();
7508	} );
7509	constructor.prototype = $.widget.extend( basePrototype, {
7510
7511		// TODO: remove support for widgetEventPrefix
7512		// always use the name + a colon as the prefix, e.g., draggable:start
7513		// don't prefix for widgets that aren't DOM-based
7514		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
7515	}, proxiedPrototype, {
7516		constructor: constructor,
7517		namespace: namespace,
7518		widgetName: name,
7519		widgetFullName: fullName
7520	} );
7521
7522	// If this widget is being redefined then we need to find all widgets that
7523	// are inheriting from it and redefine all of them so that they inherit from
7524	// the new version of this widget. We're essentially trying to replace one
7525	// level in the prototype chain.
7526	if ( existingConstructor ) {
7527		$.each( existingConstructor._childConstructors, function( i, child ) {
7528			var childPrototype = child.prototype;
7529
7530			// Redefine the child widget using the same prototype that was
7531			// originally used, but inherit from the new version of the base
7532			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
7533				child._proto );
7534		} );
7535
7536		// Remove the list of existing child constructors from the old constructor
7537		// so the old child constructors can be garbage collected
7538		delete existingConstructor._childConstructors;
7539	} else {
7540		base._childConstructors.push( constructor );
7541	}
7542
7543	$.widget.bridge( name, constructor );
7544
7545	return constructor;
7546};
7547
7548$.widget.extend = function( target ) {
7549	var input = widgetSlice.call( arguments, 1 );
7550	var inputIndex = 0;
7551	var inputLength = input.length;
7552	var key;
7553	var value;
7554
7555	for ( ; inputIndex < inputLength; inputIndex++ ) {
7556		for ( key in input[ inputIndex ] ) {
7557			value = input[ inputIndex ][ key ];
7558			if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {
7559
7560				// Clone objects
7561				if ( $.isPlainObject( value ) ) {
7562					target[ key ] = $.isPlainObject( target[ key ] ) ?
7563						$.widget.extend( {}, target[ key ], value ) :
7564
7565						// Don't extend strings, arrays, etc. with objects
7566						$.widget.extend( {}, value );
7567
7568				// Copy everything else by reference
7569				} else {
7570					target[ key ] = value;
7571				}
7572			}
7573		}
7574	}
7575	return target;
7576};
7577
7578$.widget.bridge = function( name, object ) {
7579	var fullName = object.prototype.widgetFullName || name;
7580	$.fn[ name ] = function( options ) {
7581		var isMethodCall = typeof options === "string";
7582		var args = widgetSlice.call( arguments, 1 );
7583		var returnValue = this;
7584
7585		if ( isMethodCall ) {
7586
7587			// If this is an empty collection, we need to have the instance method
7588			// return undefined instead of the jQuery instance
7589			if ( !this.length && options === "instance" ) {
7590				returnValue = undefined;
7591			} else {
7592				this.each( function() {
7593					var methodValue;
7594					var instance = $.data( this, fullName );
7595
7596					if ( options === "instance" ) {
7597						returnValue = instance;
7598						return false;
7599					}
7600
7601					if ( !instance ) {
7602						return $.error( "cannot call methods on " + name +
7603							" prior to initialization; " +
7604							"attempted to call method '" + options + "'" );
7605					}
7606
7607					if ( typeof instance[ options ] !== "function" ||
7608						options.charAt( 0 ) === "_" ) {
7609						return $.error( "no such method '" + options + "' for " + name +
7610							" widget instance" );
7611					}
7612
7613					methodValue = instance[ options ].apply( instance, args );
7614
7615					if ( methodValue !== instance && methodValue !== undefined ) {
7616						returnValue = methodValue && methodValue.jquery ?
7617							returnValue.pushStack( methodValue.get() ) :
7618							methodValue;
7619						return false;
7620					}
7621				} );
7622			}
7623		} else {
7624
7625			// Allow multiple hashes to be passed on init
7626			if ( args.length ) {
7627				options = $.widget.extend.apply( null, [ options ].concat( args ) );
7628			}
7629
7630			this.each( function() {
7631				var instance = $.data( this, fullName );
7632				if ( instance ) {
7633					instance.option( options || {} );
7634					if ( instance._init ) {
7635						instance._init();
7636					}
7637				} else {
7638					$.data( this, fullName, new object( options, this ) );
7639				}
7640			} );
7641		}
7642
7643		return returnValue;
7644	};
7645};
7646
7647$.Widget = function( /* options, element */ ) {};
7648$.Widget._childConstructors = [];
7649
7650$.Widget.prototype = {
7651	widgetName: "widget",
7652	widgetEventPrefix: "",
7653	defaultElement: "<div>",
7654
7655	options: {
7656		classes: {},
7657		disabled: false,
7658
7659		// Callbacks
7660		create: null
7661	},
7662
7663	_createWidget: function( options, element ) {
7664		element = $( element || this.defaultElement || this )[ 0 ];
7665		this.element = $( element );
7666		this.uuid = widgetUuid++;
7667		this.eventNamespace = "." + this.widgetName + this.uuid;
7668
7669		this.bindings = $();
7670		this.hoverable = $();
7671		this.focusable = $();
7672		this.classesElementLookup = {};
7673
7674		if ( element !== this ) {
7675			$.data( element, this.widgetFullName, this );
7676			this._on( true, this.element, {
7677				remove: function( event ) {
7678					if ( event.target === element ) {
7679						this.destroy();
7680					}
7681				}
7682			} );
7683			this.document = $( element.style ?
7684
7685				// Element within the document
7686				element.ownerDocument :
7687
vendor: 13,177 bytes, lines 7688-8199
7688				// Element is window or document
7689				element.document || element );
7690			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
7691		}
7692
7693		this.options = $.widget.extend( {},
7694			this.options,
7695			this._getCreateOptions(),
7696			options );
7697
7698		this._create();
7699
7700		if ( this.options.disabled ) {
7701			this._setOptionDisabled( this.options.disabled );
7702		}
7703
7704		this._trigger( "create", null, this._getCreateEventData() );
7705		this._init();
7706	},
7707
7708	_getCreateOptions: function() {
7709		return {};
7710	},
7711
7712	_getCreateEventData: $.noop,
7713
7714	_create: $.noop,
7715
7716	_init: $.noop,
7717
7718	destroy: function() {
7719		var that = this;
7720
7721		this._destroy();
7722		$.each( this.classesElementLookup, function( key, value ) {
7723			that._removeClass( value, key );
7724		} );
7725
7726		// We can probably remove the unbind calls in 2.0
7727		// all event bindings should go through this._on()
7728		this.element
7729			.off( this.eventNamespace )
7730			.removeData( this.widgetFullName );
7731		this.widget()
7732			.off( this.eventNamespace )
7733			.removeAttr( "aria-disabled" );
7734
7735		// Clean up events and states
7736		this.bindings.off( this.eventNamespace );
7737	},
7738
7739	_destroy: $.noop,
7740
7741	widget: function() {
7742		return this.element;
7743	},
7744
7745	option: function( key, value ) {
7746		var options = key;
7747		var parts;
7748		var curOption;
7749		var i;
7750
7751		if ( arguments.length === 0 ) {
7752
7753			// Don't return a reference to the internal hash
7754			return $.widget.extend( {}, this.options );
7755		}
7756
7757		if ( typeof key === "string" ) {
7758
7759			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
7760			options = {};
7761			parts = key.split( "." );
7762			key = parts.shift();
7763			if ( parts.length ) {
7764				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
7765				for ( i = 0; i < parts.length - 1; i++ ) {
7766					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
7767					curOption = curOption[ parts[ i ] ];
7768				}
7769				key = parts.pop();
7770				if ( arguments.length === 1 ) {
7771					return curOption[ key ] === undefined ? null : curOption[ key ];
7772				}
7773				curOption[ key ] = value;
7774			} else {
7775				if ( arguments.length === 1 ) {
7776					return this.options[ key ] === undefined ? null : this.options[ key ];
7777				}
7778				options[ key ] = value;
7779			}
7780		}
7781
7782		this._setOptions( options );
7783
7784		return this;
7785	},
7786
7787	_setOptions: function( options ) {
7788		var key;
7789
7790		for ( key in options ) {
7791			this._setOption( key, options[ key ] );
7792		}
7793
7794		return this;
7795	},
7796
7797	_setOption: function( key, value ) {
7798		if ( key === "classes" ) {
7799			this._setOptionClasses( value );
7800		}
7801
7802		this.options[ key ] = value;
7803
7804		if ( key === "disabled" ) {
7805			this._setOptionDisabled( value );
7806		}
7807
7808		return this;
7809	},
7810
7811	_setOptionClasses: function( value ) {
7812		var classKey, elements, currentElements;
7813
7814		for ( classKey in value ) {
7815			currentElements = this.classesElementLookup[ classKey ];
7816			if ( value[ classKey ] === this.options.classes[ classKey ] ||
7817					!currentElements ||
7818					!currentElements.length ) {
7819				continue;
7820			}
7821
7822			// We are doing this to create a new jQuery object because the _removeClass() call
7823			// on the next line is going to destroy the reference to the current elements being
7824			// tracked. We need to save a copy of this collection so that we can add the new classes
7825			// below.
7826			elements = $( currentElements.get() );
7827			this._removeClass( currentElements, classKey );
7828
7829			// We don't use _addClass() here, because that uses this.options.classes
7830			// for generating the string of classes. We want to use the value passed in from
7831			// _setOption(), this is the new value of the classes option which was passed to
7832			// _setOption(). We pass this value directly to _classes().
7833			elements.addClass( this._classes( {
7834				element: elements,
7835				keys: classKey,
7836				classes: value,
7837				add: true
7838			} ) );
7839		}
7840	},
7841
7842	_setOptionDisabled: function( value ) {
7843		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
7844
7845		// If the widget is becoming disabled, then nothing is interactive
7846		if ( value ) {
7847			this._removeClass( this.hoverable, null, "ui-state-hover" );
7848			this._removeClass( this.focusable, null, "ui-state-focus" );
7849		}
7850	},
7851
7852	enable: function() {
7853		return this._setOptions( { disabled: false } );
7854	},
7855
7856	disable: function() {
7857		return this._setOptions( { disabled: true } );
7858	},
7859
7860	_classes: function( options ) {
7861		var full = [];
7862		var that = this;
7863
7864		options = $.extend( {
7865			element: this.element,
7866			classes: this.options.classes || {}
7867		}, options );
7868
7869		function bindRemoveEvent() {
7870			var nodesToBind = [];
7871
7872			options.element.each( function( _, element ) {
7873				var isTracked = $.map( that.classesElementLookup, function( elements ) {
7874					return elements;
7875				} )
7876					.some( function( elements ) {
7877						return elements.is( element );
7878					} );
7879
7880				if ( !isTracked ) {
7881					nodesToBind.push( element );
7882				}
7883			} );
7884
7885			that._on( $( nodesToBind ), {
7886				remove: "_untrackClassesElement"
7887			} );
7888		}
7889
7890		function processClassString( classes, checkOption ) {
7891			var current, i;
7892			for ( i = 0; i < classes.length; i++ ) {
7893				current = that.classesElementLookup[ classes[ i ] ] || $();
7894				if ( options.add ) {
7895					bindRemoveEvent();
7896					current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
7897				} else {
7898					current = $( current.not( options.element ).get() );
7899				}
7900				that.classesElementLookup[ classes[ i ] ] = current;
7901				full.push( classes[ i ] );
7902				if ( checkOption && options.classes[ classes[ i ] ] ) {
7903					full.push( options.classes[ classes[ i ] ] );
7904				}
7905			}
7906		}
7907
7908		if ( options.keys ) {
7909			processClassString( options.keys.match( /\S+/g ) || [], true );
7910		}
7911		if ( options.extra ) {
7912			processClassString( options.extra.match( /\S+/g ) || [] );
7913		}
7914
7915		return full.join( " " );
7916	},
7917
7918	_untrackClassesElement: function( event ) {
7919		var that = this;
7920		$.each( that.classesElementLookup, function( key, value ) {
7921			if ( $.inArray( event.target, value ) !== -1 ) {
7922				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
7923			}
7924		} );
7925
7926		this._off( $( event.target ) );
7927	},
7928
7929	_removeClass: function( element, keys, extra ) {
7930		return this._toggleClass( element, keys, extra, false );
7931	},
7932
7933	_addClass: function( element, keys, extra ) {
7934		return this._toggleClass( element, keys, extra, true );
7935	},
7936
7937	_toggleClass: function( element, keys, extra, add ) {
7938		add = ( typeof add === "boolean" ) ? add : extra;
7939		var shift = ( typeof element === "string" || element === null ),
7940			options = {
7941				extra: shift ? keys : extra,
7942				keys: shift ? element : keys,
7943				element: shift ? this.element : element,
7944				add: add
7945			};
7946		options.element.toggleClass( this._classes( options ), add );
7947		return this;
7948	},
7949
7950	_on: function( suppressDisabledCheck, element, handlers ) {
7951		var delegateElement;
7952		var instance = this;
7953
7954		// No suppressDisabledCheck flag, shuffle arguments
7955		if ( typeof suppressDisabledCheck !== "boolean" ) {
7956			handlers = element;
7957			element = suppressDisabledCheck;
7958			suppressDisabledCheck = false;
7959		}
7960
7961		// No element argument, shuffle and use this.element
7962		if ( !handlers ) {
7963			handlers = element;
7964			element = this.element;
7965			delegateElement = this.widget();
7966		} else {
7967			element = delegateElement = $( element );
7968			this.bindings = this.bindings.add( element );
7969		}
7970
7971		$.each( handlers, function( event, handler ) {
7972			function handlerProxy() {
7973
7974				// Allow widgets to customize the disabled handling
7975				// - disabled as an array instead of boolean
7976				// - disabled class as method for disabling individual parts
7977				if ( !suppressDisabledCheck &&
7978						( instance.options.disabled === true ||
7979						$( this ).hasClass( "ui-state-disabled" ) ) ) {
7980					return;
7981				}
7982				return ( typeof handler === "string" ? instance[ handler ] : handler )
7983					.apply( instance, arguments );
7984			}
7985
7986			// Copy the guid so direct unbinding works
7987			if ( typeof handler !== "string" ) {
7988				handlerProxy.guid = handler.guid =
7989					handler.guid || handlerProxy.guid || $.guid++;
7990			}
7991
7992			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
7993			var eventName = match[ 1 ] + instance.eventNamespace;
7994			var selector = match[ 2 ];
7995
7996			if ( selector ) {
7997				delegateElement.on( eventName, selector, handlerProxy );
7998			} else {
7999				element.on( eventName, handlerProxy );
8000			}
8001		} );
8002	},
8003
8004	_off: function( element, eventName ) {
8005		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
8006			this.eventNamespace;
8007		element.off( eventName );
8008
8009		// Clear the stack to avoid memory leaks (#10056)
8010		this.bindings = $( this.bindings.not( element ).get() );
8011		this.focusable = $( this.focusable.not( element ).get() );
8012		this.hoverable = $( this.hoverable.not( element ).get() );
8013	},
8014
8015	_delay: function( handler, delay ) {
8016		function handlerProxy() {
8017			return ( typeof handler === "string" ? instance[ handler ] : handler )
8018				.apply( instance, arguments );
8019		}
8020		var instance = this;
8021		return setTimeout( handlerProxy, delay || 0 );
8022	},
8023
8024	_hoverable: function( element ) {
8025		this.hoverable = this.hoverable.add( element );
8026		this._on( element, {
8027			mouseenter: function( event ) {
8028				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
8029			},
8030			mouseleave: function( event ) {
8031				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
8032			}
8033		} );
8034	},
8035
8036	_focusable: function( element ) {
8037		this.focusable = this.focusable.add( element );
8038		this._on( element, {
8039			focusin: function( event ) {
8040				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
8041			},
8042			focusout: function( event ) {
8043				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
8044			}
8045		} );
8046	},
8047
8048	_trigger: function( type, event, data ) {
8049		var prop, orig;
8050		var callback = this.options[ type ];
8051
8052		data = data || {};
8053		event = $.Event( event );
8054		event.type = ( type === this.widgetEventPrefix ?
8055			type :
8056			this.widgetEventPrefix + type ).toLowerCase();
8057
8058		// The original event may come from any element
8059		// so we need to reset the target on the new event
8060		event.target = this.element[ 0 ];
8061
8062		// Copy original event properties over to the new event
8063		orig = event.originalEvent;
8064		if ( orig ) {
8065			for ( prop in orig ) {
8066				if ( !( prop in event ) ) {
8067					event[ prop ] = orig[ prop ];
8068				}
8069			}
8070		}
8071
8072		this.element.trigger( event, data );
8073		return !( typeof callback === "function" &&
8074			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
8075			event.isDefaultPrevented() );
8076	}
8077};
8078
8079$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
8080	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
8081		if ( typeof options === "string" ) {
8082			options = { effect: options };
8083		}
8084
8085		var hasOptions;
8086		var effectName = !options ?
8087			method :
8088			options === true || typeof options === "number" ?
8089				defaultEffect :
8090				options.effect || defaultEffect;
8091
8092		options = options || {};
8093		if ( typeof options === "number" ) {
8094			options = { duration: options };
8095		} else if ( options === true ) {
8096			options = {};
8097		}
8098
8099		hasOptions = !$.isEmptyObject( options );
8100		options.complete = callback;
8101
8102		if ( options.delay ) {
8103			element.delay( options.delay );
8104		}
8105
8106		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
8107			element[ method ]( options );
8108		} else if ( effectName !== method && element[ effectName ] ) {
8109			element[ effectName ]( options.duration, options.easing, callback );
8110		} else {
8111			element.queue( function( next ) {
8112				$( this )[ method ]();
8113				if ( callback ) {
8114					callback.call( element[ 0 ] );
8115				}
8116				next();
8117			} );
8118		}
8119	};
8120} );
8121
8122var widget = $.widget;
8123
8124
8125/*!
8126 * jQuery UI Position 1.14.1
8127 * https://jqueryui.com
8128 *
8129 * Copyright OpenJS Foundation and other contributors
8130 * Released under the MIT license.
8131 * https://jquery.org/license
8132 *
8133 * https://api.jqueryui.com/position/
8134 */
8135
8136//>>label: Position
8137//>>group: Core
8138//>>description: Positions elements relative to other elements.
8139//>>docs: https://api.jqueryui.com/position/
8140//>>demos: https://jqueryui.com/position/
8141
8142
8143( function() {
8144var cachedScrollbarWidth,
8145	max = Math.max,
8146	abs = Math.abs,
8147	rhorizontal = /left|center|right/,
8148	rvertical = /top|center|bottom/,
8149	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
8150	rposition = /^\w+/,
8151	rpercent = /%$/,
8152	_position = $.fn.position;
8153
8154function getOffsets( offsets, width, height ) {
8155	return [
8156		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
8157		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
8158	];
8159}
8160
8161function parseCss( element, property ) {
8162	return parseInt( $.css( element, property ), 10 ) || 0;
8163}
8164
8165function isWindow( obj ) {
8166	return obj != null && obj === obj.window;
8167}
8168
8169function getDimensions( elem ) {
8170	var raw = elem[ 0 ];
8171	if ( raw.nodeType === 9 ) {
8172		return {
8173			width: elem.width(),
8174			height: elem.height(),
8175			offset: { top: 0, left: 0 }
8176		};
8177	}
8178	if ( isWindow( raw ) ) {
8179		return {
8180			width: elem.width(),
8181			height: elem.height(),
8182			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
8183		};
8184	}
8185	if ( raw.preventDefault ) {
8186		return {
8187			width: 0,
8188			height: 0,
8189			offset: { top: raw.pageY, left: raw.pageX }
8190		};
8191	}
8192	return {
8193		width: elem.outerWidth(),
8194		height: elem.outerHeight(),
8195		offset: elem.offset()
8196	};
8197}
8198
8199$.position = 
vendor: 2,247 bytes, lines 8199-8269
8199{
8200	scrollbarWidth: function() {
8201		if ( cachedScrollbarWidth !== undefined ) {
8202			return cachedScrollbarWidth;
8203		}
8204		var w1, w2,
8205			div = $( "<div style=" +
8206				"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" +
8207				"<div style='height:300px;width:auto;'></div></div>" ),
8208			innerDiv = div.children()[ 0 ];
8209
8210		$( "body" ).append( div );
8211		w1 = innerDiv.offsetWidth;
8212		div.css( "overflow", "scroll" );
8213
8214		w2 = innerDiv.offsetWidth;
8215
8216		if ( w1 === w2 ) {
8217			w2 = div[ 0 ].clientWidth;
8218		}
8219
8220		div.remove();
8221
8222		return ( cachedScrollbarWidth = w1 - w2 );
8223	},
8224	getScrollInfo: function( within ) {
8225		var overflowX = within.isWindow || within.isDocument ? "" :
8226				within.element.css( "overflow-x" ),
8227			overflowY = within.isWindow || within.isDocument ? "" :
8228				within.element.css( "overflow-y" ),
8229			hasOverflowX = overflowX === "scroll" ||
8230				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
8231			hasOverflowY = overflowY === "scroll" ||
8232				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
8233		return {
8234			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
8235			height: hasOverflowX ? $.position.scrollbarWidth() : 0
8236		};
8237	},
8238	getWithinInfo: function( element ) {
8239		var withinElement = $( element || window ),
8240			isElemWindow = isWindow( withinElement[ 0 ] ),
8241			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
8242			hasOffset = !isElemWindow && !isDocument;
8243		return {
8244			element: withinElement,
8245			isWindow: isElemWindow,
8246			isDocument: isDocument,
8247			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
8248			scrollLeft: withinElement.scrollLeft(),
8249			scrollTop: withinElement.scrollTop(),
8250			width: withinElement.outerWidth(),
8251			height: withinElement.outerHeight()
8252		};
8253	}
8254};
8255
8256$.fn.position = function( options ) {
8257	if ( !options || !options.of ) {
8258		return _position.apply( this, arguments );
8259	}
8260
8261	// Make a copy, we don't want to modify arguments
8262	options = $.extend( {}, options );
8263
8264	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
8265
8266		// Make sure string options are treated as CSS selectors
8267		target = typeof options.of === "string" ?
8268			$( document ).find( options.of ) :
8269			$( options.of ),
vendor: 10,992 bytes, lines 8270-8623
8270
8271		within = $.position.getWithinInfo( options.within ),
8272		scrollInfo = $.position.getScrollInfo( within ),
8273		collision = ( options.collision || "flip" ).split( " " ),
8274		offsets = {};
8275
8276	dimensions = getDimensions( target );
8277	if ( target[ 0 ].preventDefault ) {
8278
8279		// Force left top to allow flipping
8280		options.at = "left top";
8281	}
8282	targetWidth = dimensions.width;
8283	targetHeight = dimensions.height;
8284	targetOffset = dimensions.offset;
8285
8286	// Clone to reuse original targetOffset later
8287	basePosition = $.extend( {}, targetOffset );
8288
8289	// Force my and at to have valid horizontal and vertical positions
8290	// if a value is missing or invalid, it will be converted to center
8291	$.each( [ "my", "at" ], function() {
8292		var pos = ( options[ this ] || "" ).split( " " ),
8293			horizontalOffset,
8294			verticalOffset;
8295
8296		if ( pos.length === 1 ) {
8297			pos = rhorizontal.test( pos[ 0 ] ) ?
8298				pos.concat( [ "center" ] ) :
8299				rvertical.test( pos[ 0 ] ) ?
8300					[ "center" ].concat( pos ) :
8301					[ "center", "center" ];
8302		}
8303		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
8304		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
8305
8306		// Calculate offsets
8307		horizontalOffset = roffset.exec( pos[ 0 ] );
8308		verticalOffset = roffset.exec( pos[ 1 ] );
8309		offsets[ this ] = [
8310			horizontalOffset ? horizontalOffset[ 0 ] : 0,
8311			verticalOffset ? verticalOffset[ 0 ] : 0
8312		];
8313
8314		// Reduce to just the positions without the offsets
8315		options[ this ] = [
8316			rposition.exec( pos[ 0 ] )[ 0 ],
8317			rposition.exec( pos[ 1 ] )[ 0 ]
8318		];
8319	} );
8320
8321	// Normalize collision option
8322	if ( collision.length === 1 ) {
8323		collision[ 1 ] = collision[ 0 ];
8324	}
8325
8326	if ( options.at[ 0 ] === "right" ) {
8327		basePosition.left += targetWidth;
8328	} else if ( options.at[ 0 ] === "center" ) {
8329		basePosition.left += targetWidth / 2;
8330	}
8331
8332	if ( options.at[ 1 ] === "bottom" ) {
8333		basePosition.top += targetHeight;
8334	} else if ( options.at[ 1 ] === "center" ) {
8335		basePosition.top += targetHeight / 2;
8336	}
8337
8338	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
8339	basePosition.left += atOffset[ 0 ];
8340	basePosition.top += atOffset[ 1 ];
8341
8342	return this.each( function() {
8343		var collisionPosition, using,
8344			elem = $( this ),
8345			elemWidth = elem.outerWidth(),
8346			elemHeight = elem.outerHeight(),
8347			marginLeft = parseCss( this, "marginLeft" ),
8348			marginTop = parseCss( this, "marginTop" ),
8349			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
8350				scrollInfo.width,
8351			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
8352				scrollInfo.height,
8353			position = $.extend( {}, basePosition ),
8354			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
8355
8356		if ( options.my[ 0 ] === "right" ) {
8357			position.left -= elemWidth;
8358		} else if ( options.my[ 0 ] === "center" ) {
8359			position.left -= elemWidth / 2;
8360		}
8361
8362		if ( options.my[ 1 ] === "bottom" ) {
8363			position.top -= elemHeight;
8364		} else if ( options.my[ 1 ] === "center" ) {
8365			position.top -= elemHeight / 2;
8366		}
8367
8368		position.left += myOffset[ 0 ];
8369		position.top += myOffset[ 1 ];
8370
8371		collisionPosition = {
8372			marginLeft: marginLeft,
8373			marginTop: marginTop
8374		};
8375
8376		$.each( [ "left", "top" ], function( i, dir ) {
8377			if ( $.ui.position[ collision[ i ] ] ) {
8378				$.ui.position[ collision[ i ] ][ dir ]( position, {
8379					targetWidth: targetWidth,
8380					targetHeight: targetHeight,
8381					elemWidth: elemWidth,
8382					elemHeight: elemHeight,
8383					collisionPosition: collisionPosition,
8384					collisionWidth: collisionWidth,
8385					collisionHeight: collisionHeight,
8386					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
8387					my: options.my,
8388					at: options.at,
8389					within: within,
8390					elem: elem
8391				} );
8392			}
8393		} );
8394
8395		if ( options.using ) {
8396
8397			// Adds feedback as second argument to using callback, if present
8398			using = function( props ) {
8399				var left = targetOffset.left - position.left,
8400					right = left + targetWidth - elemWidth,
8401					top = targetOffset.top - position.top,
8402					bottom = top + targetHeight - elemHeight,
8403					feedback = {
8404						target: {
8405							element: target,
8406							left: targetOffset.left,
8407							top: targetOffset.top,
8408							width: targetWidth,
8409							height: targetHeight
8410						},
8411						element: {
8412							element: elem,
8413							left: position.left,
8414							top: position.top,
8415							width: elemWidth,
8416							height: elemHeight
8417						},
8418						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
8419						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
8420					};
8421				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
8422					feedback.horizontal = "center";
8423				}
8424				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
8425					feedback.vertical = "middle";
8426				}
8427				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
8428					feedback.important = "horizontal";
8429				} else {
8430					feedback.important = "vertical";
8431				}
8432				options.using.call( this, props, feedback );
8433			};
8434		}
8435
8436		elem.offset( $.extend( position, { using: using } ) );
8437	} );
8438};
8439
8440$.ui.position = {
8441	fit: {
8442		left: function( position, data ) {
8443			var within = data.within,
8444				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
8445				outerWidth = within.width,
8446				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
8447				overLeft = withinOffset - collisionPosLeft,
8448				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
8449				newOverRight;
8450
8451			// Element is wider than within
8452			if ( data.collisionWidth > outerWidth ) {
8453
8454				// Element is initially over the left side of within
8455				if ( overLeft > 0 && overRight <= 0 ) {
8456					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
8457						withinOffset;
8458					position.left += overLeft - newOverRight;
8459
8460				// Element is initially over right side of within
8461				} else if ( overRight > 0 && overLeft <= 0 ) {
8462					position.left = withinOffset;
8463
8464				// Element is initially over both left and right sides of within
8465				} else {
8466					if ( overLeft > overRight ) {
8467						position.left = withinOffset + outerWidth - data.collisionWidth;
8468					} else {
8469						position.left = withinOffset;
8470					}
8471				}
8472
8473			// Too far left -> align with left edge
8474			} else if ( overLeft > 0 ) {
8475				position.left += overLeft;
8476
8477			// Too far right -> align with right edge
8478			} else if ( overRight > 0 ) {
8479				position.left -= overRight;
8480
8481			// Adjust based on position and margin
8482			} else {
8483				position.left = max( position.left - collisionPosLeft, position.left );
8484			}
8485		},
8486		top: function( position, data ) {
8487			var within = data.within,
8488				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
8489				outerHeight = data.within.height,
8490				collisionPosTop = position.top - data.collisionPosition.marginTop,
8491				overTop = withinOffset - collisionPosTop,
8492				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
8493				newOverBottom;
8494
8495			// Element is taller than within
8496			if ( data.collisionHeight > outerHeight ) {
8497
8498				// Element is initially over the top of within
8499				if ( overTop > 0 && overBottom <= 0 ) {
8500					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
8501						withinOffset;
8502					position.top += overTop - newOverBottom;
8503
8504				// Element is initially over bottom of within
8505				} else if ( overBottom > 0 && overTop <= 0 ) {
8506					position.top = withinOffset;
8507
8508				// Element is initially over both top and bottom of within
8509				} else {
8510					if ( overTop > overBottom ) {
8511						position.top = withinOffset + outerHeight - data.collisionHeight;
8512					} else {
8513						position.top = withinOffset;
8514					}
8515				}
8516
8517			// Too far up -> align with top
8518			} else if ( overTop > 0 ) {
8519				position.top += overTop;
8520
8521			// Too far down -> align with bottom edge
8522			} else if ( overBottom > 0 ) {
8523				position.top -= overBottom;
8524
8525			// Adjust based on position and margin
8526			} else {
8527				position.top = max( position.top - collisionPosTop, position.top );
8528			}
8529		}
8530	},
8531	flip: {
8532		left: function( position, data ) {
8533			var within = data.within,
8534				withinOffset = within.offset.left + within.scrollLeft,
8535				outerWidth = within.width,
8536				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
8537				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
8538				overLeft = collisionPosLeft - offsetLeft,
8539				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
8540				myOffset = data.my[ 0 ] === "left" ?
8541					-data.elemWidth :
8542					data.my[ 0 ] === "right" ?
8543						data.elemWidth :
8544						0,
8545				atOffset = data.at[ 0 ] === "left" ?
8546					data.targetWidth :
8547					data.at[ 0 ] === "right" ?
8548						-data.targetWidth :
8549						0,
8550				offset = -2 * data.offset[ 0 ],
8551				newOverRight,
8552				newOverLeft;
8553
8554			if ( overLeft < 0 ) {
8555				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
8556					outerWidth - withinOffset;
8557				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
8558					position.left += myOffset + atOffset + offset;
8559				}
8560			} else if ( overRight > 0 ) {
8561				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
8562					atOffset + offset - offsetLeft;
8563				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
8564					position.left += myOffset + atOffset + offset;
8565				}
8566			}
8567		},
8568		top: function( position, data ) {
8569			var within = data.within,
8570				withinOffset = within.offset.top + within.scrollTop,
8571				outerHeight = within.height,
8572				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
8573				collisionPosTop = position.top - data.collisionPosition.marginTop,
8574				overTop = collisionPosTop - offsetTop,
8575				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
8576				top = data.my[ 1 ] === "top",
8577				myOffset = top ?
8578					-data.elemHeight :
8579					data.my[ 1 ] === "bottom" ?
8580						data.elemHeight :
8581						0,
8582				atOffset = data.at[ 1 ] === "top" ?
8583					data.targetHeight :
8584					data.at[ 1 ] === "bottom" ?
8585						-data.targetHeight :
8586						0,
8587				offset = -2 * data.offset[ 1 ],
8588				newOverTop,
8589				newOverBottom;
8590			if ( overTop < 0 ) {
8591				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
8592					outerHeight - withinOffset;
8593				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
8594					position.top += myOffset + atOffset + offset;
8595				}
8596			} else if ( overBottom > 0 ) {
8597				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
8598					offset - offsetTop;
8599				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
8600					position.top += myOffset + atOffset + offset;
8601				}
8602			}
8603		}
8604	},
8605	flipfit: {
8606		left: function() {
8607			$.ui.position.flip.left.apply( this, arguments );
8608			$.ui.position.fit.left.apply( this, arguments );
8609		},
8610		top: function() {
8611			$.ui.position.flip.top.apply( this, arguments );
8612			$.ui.position.fit.top.apply( this, arguments );
8613		}
8614	}
8615};
8616
8617} )();
8618
8619var position = $.ui.position;
8620
8621
8622/*!
8623 * jQuery UI :data 1.1
86234.1
8624 * https://jqueryui.com
8625 *
8626 * Copyright OpenJS Foundation and other contributors
8627 * Released under the MIT license.
8628 * https://jquery.org/license
8629 */
8630
8631//>>label: :data Selector
8632//>>group: Core
8633//>>description: Selects elements which have data stored under the specified key.
8634//>>docs: https://api.jqueryui.com/data-selector/
8635
8636
8637var data = $.extend( $.expr.pseudos, {
8638	data: $.expr.createPseudo( function( dataName ) {
8639		return function( elem ) {
8640			return !!$.data( elem, dataName );
8641		};
8642	} )
8643} );
8644
8645/*!
8646 * jQuery UI Disable Selection 1.14.1
vendor: 16,993 bytes, lines 8646-9366
8646
8647 * https://jqueryui.com
8648 *
8649 * Copyright OpenJS Foundation and other contributors
8650 * Released under the MIT license.
8651 * https://jquery.org/license
8652 */
8653
8654//>>label: disableSelection
8655//>>group: Core
8656//>>description: Disable selection of text content within the set of matched elements.
8657//>>docs: https://api.jqueryui.com/disableSelection/
8658
8659// This file is deprecated
8660
8661var disableSelection = $.fn.extend( {
8662	disableSelection: ( function() {
8663		var eventType = "onselectstart" in document.createElement( "div" ) ?
8664			"selectstart" :
8665			"mousedown";
8666
8667		return function() {
8668			return this.on( eventType + ".ui-disableSelection", function( event ) {
8669				event.preventDefault();
8670			} );
8671		};
8672	} )(),
8673
8674	enableSelection: function() {
8675		return this.off( ".ui-disableSelection" );
8676	}
8677} );
8678
8679
8680
8681// Create a local jQuery because jQuery Color relies on it and the
8682// global may not exist with AMD and a custom build (#10199).
8683// This module is a noop if used as a regular AMD module.
8684// eslint-disable-next-line no-unused-vars
8685var jQuery = $;
8686
8687
8688/*!
8689 * jQuery Color Animations v3.0.0
8690 * https://github.com/jquery/jquery-color
8691 *
8692 * Copyright OpenJS Foundation and other contributors
8693 * Released under the MIT license.
8694 * https://jquery.org/license
8695 *
8696 * Date: Wed May 15 16:49:44 2024 +0200
8697 */
8698
8699
8700	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
8701		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
8702
8703	class2type = {},
8704	toString = class2type.toString,
8705
8706	// plusequals test for += 100 -= 100
8707	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
8708
8709	// a set of RE's that can match strings and generate color tuples.
8710	stringParsers = [ {
8711			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
8712			parse: function( execResult ) {
8713				return [
8714					execResult[ 1 ],
8715					execResult[ 2 ],
8716					execResult[ 3 ],
8717					execResult[ 4 ]
8718				];
8719			}
8720		}, {
8721			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
8722			parse: function( execResult ) {
8723				return [
8724					execResult[ 1 ] * 2.55,
8725					execResult[ 2 ] * 2.55,
8726					execResult[ 3 ] * 2.55,
8727					execResult[ 4 ]
8728				];
8729			}
8730		}, {
8731
8732			// this regex ignores A-F because it's compared against an already lowercased string
8733			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
8734			parse: function( execResult ) {
8735				return [
8736					parseInt( execResult[ 1 ], 16 ),
8737					parseInt( execResult[ 2 ], 16 ),
8738					parseInt( execResult[ 3 ], 16 ),
8739					execResult[ 4 ] ?
8740						( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
8741						1
8742				];
8743			}
8744		}, {
8745
8746			// this regex ignores A-F because it's compared against an already lowercased string
8747			re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
8748			parse: function( execResult ) {
8749				return [
8750					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
8751					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
8752					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
8753					execResult[ 4 ] ?
8754						( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
8755							.toFixed( 2 ) :
8756						1
8757				];
8758			}
8759		}, {
8760			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
8761			space: "hsla",
8762			parse: function( execResult ) {
8763				return [
8764					execResult[ 1 ],
8765					execResult[ 2 ] / 100,
8766					execResult[ 3 ] / 100,
8767					execResult[ 4 ]
8768				];
8769			}
8770		} ],
8771
8772	// jQuery.Color( )
8773	color = jQuery.Color = function( color, green, blue, alpha ) {
8774		return new jQuery.Color.fn.parse( color, green, blue, alpha );
8775	},
8776	spaces = {
8777		rgba: {
8778			props: {
8779				red: {
8780					idx: 0,
8781					type: "byte"
8782				},
8783				green: {
8784					idx: 1,
8785					type: "byte"
8786				},
8787				blue: {
8788					idx: 2,
8789					type: "byte"
8790				}
8791			}
8792		},
8793
8794		hsla: {
8795			props: {
8796				hue: {
8797					idx: 0,
8798					type: "degrees"
8799				},
8800				saturation: {
8801					idx: 1,
8802					type: "percent"
8803				},
8804				lightness: {
8805					idx: 2,
8806					type: "percent"
8807				}
8808			}
8809		}
8810	},
8811	propTypes = {
8812		"byte": {
8813			floor: true,
8814			max: 255
8815		},
8816		"percent": {
8817			max: 1
8818		},
8819		"degrees": {
8820			mod: 360,
8821			floor: true
8822		}
8823	},
8824
8825	// colors = jQuery.Color.names
8826	colors,
8827
8828	// local aliases of functions called often
8829	each = jQuery.each;
8830
8831// define cache name and alpha properties
8832// for rgba and hsla spaces
8833each( spaces, function( spaceName, space ) {
8834	space.cache = "_" + spaceName;
8835	space.props.alpha = {
8836		idx: 3,
8837		type: "percent",
8838		def: 1
8839	};
8840} );
8841
8842// Populate the class2type map
8843jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
8844	function( _i, name ) {
8845		class2type[ "[object " + name + "]" ] = name.toLowerCase();
8846	} );
8847
8848function getType( obj ) {
8849	if ( obj == null ) {
8850		return obj + "";
8851	}
8852
8853	return typeof obj === "object" ?
8854		class2type[ toString.call( obj ) ] || "object" :
8855		typeof obj;
8856}
8857
8858function clamp( value, prop, allowEmpty ) {
8859	var type = propTypes[ prop.type ] || {};
8860
8861	if ( value == null ) {
8862		return ( allowEmpty || !prop.def ) ? null : prop.def;
8863	}
8864
8865	// ~~ is an short way of doing floor for positive numbers
8866	value = type.floor ? ~~value : parseFloat( value );
8867
8868	if ( type.mod ) {
8869
8870		// we add mod before modding to make sure that negatives values
8871		// get converted properly: -10 -> 350
8872		return ( value + type.mod ) % type.mod;
8873	}
8874
8875	// for now all property types without mod have min and max
8876	return Math.min( type.max, Math.max( 0, value ) );
8877}
8878
8879function stringParse( string ) {
8880	var inst = color(),
8881		rgba = inst._rgba = [];
8882
8883	string = string.toLowerCase();
8884
8885	each( stringParsers, function( _i, parser ) {
8886		var parsed,
8887			match = parser.re.exec( string ),
8888			values = match && parser.parse( match ),
8889			spaceName = parser.space || "rgba";
8890
8891		if ( values ) {
8892			parsed = inst[ spaceName ]( values );
8893
8894			// if this was an rgba parse the assignment might happen twice
8895			// oh well....
8896			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
8897			rgba = inst._rgba = parsed._rgba;
8898
8899			// exit each( stringParsers ) here because we matched
8900			return false;
8901		}
8902	} );
8903
8904	// Found a stringParser that handled it
8905	if ( rgba.length ) {
8906
8907		// if this came from a parsed string, force "transparent" when alpha is 0
8908		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
8909		if ( rgba.join() === "0,0,0,0" ) {
8910			jQuery.extend( rgba, colors.transparent );
8911		}
8912		return inst;
8913	}
8914
8915	// named colors
8916	return colors[ string ];
8917}
8918
8919color.fn = jQuery.extend( color.prototype, {
8920	parse: function( red, green, blue, alpha ) {
8921		if ( red === undefined ) {
8922			this._rgba = [ null, null, null, null ];
8923			return this;
8924		}
8925		if ( red.jquery || red.nodeType ) {
8926			red = jQuery( red ).css( green );
8927			green = undefined;
8928		}
8929
8930		var inst = this,
8931			type = getType( red ),
8932			rgba = this._rgba = [];
8933
8934		// more than 1 argument specified - assume ( red, green, blue, alpha )
8935		if ( green !== undefined ) {
8936			red = [ red, green, blue, alpha ];
8937			type = "array";
8938		}
8939
8940		if ( type === "string" ) {
8941			return this.parse( stringParse( red ) || colors._default );
8942		}
8943
8944		if ( type === "array" ) {
8945			each( spaces.rgba.props, function( _key, prop ) {
8946				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
8947			} );
8948			return this;
8949		}
8950
8951		if ( type === "object" ) {
8952			if ( red instanceof color ) {
8953				each( spaces, function( _spaceName, space ) {
8954					if ( red[ space.cache ] ) {
8955						inst[ space.cache ] = red[ space.cache ].slice();
8956					}
8957				} );
8958			} else {
8959				each( spaces, function( _spaceName, space ) {
8960					var cache = space.cache;
8961					each( space.props, function( key, prop ) {
8962
8963						// if the cache doesn't exist, and we know how to convert
8964						if ( !inst[ cache ] && space.to ) {
8965
8966							// if the value was null, we don't need to copy it
8967							// if the key was alpha, we don't need to copy it either
8968							if ( key === "alpha" || red[ key ] == null ) {
8969								return;
8970							}
8971							inst[ cache ] = space.to( inst._rgba );
8972						}
8973
8974						// this is the only case where we allow nulls for ALL properties.
8975						// call clamp with alwaysAllowEmpty
8976						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
8977					} );
8978
8979					// everything defined but alpha?
8980					if ( inst[ cache ] && jQuery.inArray(
8981						null,
8982						inst[ cache ].slice( 0, 3 )
8983					) < 0 ) {
8984
8985						// use the default of 1
8986						if ( inst[ cache ][ 3 ] == null ) {
8987							inst[ cache ][ 3 ] = 1;
8988						}
8989
8990						if ( space.from ) {
8991							inst._rgba = space.from( inst[ cache ] );
8992						}
8993					}
8994				} );
8995			}
8996			return this;
8997		}
8998	},
8999	is: function( compare ) {
9000		var is = color( compare ),
9001			same = true,
9002			inst = this;
9003
9004		each( spaces, function( _, space ) {
9005			var localCache,
9006				isCache = is[ space.cache ];
9007			if ( isCache ) {
9008				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
9009				each( space.props, function( _, prop ) {
9010					if ( isCache[ prop.idx ] != null ) {
9011						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
9012						return same;
9013					}
9014				} );
9015			}
9016			return same;
9017		} );
9018		return same;
9019	},
9020	_space: function() {
9021		var used = [],
9022			inst = this;
9023		each( spaces, function( spaceName, space ) {
9024			if ( inst[ space.cache ] ) {
9025				used.push( spaceName );
9026			}
9027		} );
9028		return used.pop();
9029	},
9030	transition: function( other, distance ) {
9031		var end = color( other ),
9032			spaceName = end._space(),
9033			space = spaces[ spaceName ],
9034			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
9035			start = startColor[ space.cache ] || space.to( startColor._rgba ),
9036			result = start.slice();
9037
9038		end = end[ space.cache ];
9039		each( space.props, function( _key, prop ) {
9040			var index = prop.idx,
9041				startValue = start[ index ],
9042				endValue = end[ index ],
9043				type = propTypes[ prop.type ] || {};
9044
9045			// if null, don't override start value
9046			if ( endValue === null ) {
9047				return;
9048			}
9049
9050			// if null - use end
9051			if ( startValue === null ) {
9052				result[ index ] = endValue;
9053			} else {
9054				if ( type.mod ) {
9055					if ( endValue - startValue > type.mod / 2 ) {
9056						startValue += type.mod;
9057					} else if ( startValue - endValue > type.mod / 2 ) {
9058						startValue -= type.mod;
9059					}
9060				}
9061				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
9062			}
9063		} );
9064		return this[ spaceName ]( result );
9065	},
9066	blend: function( opaque ) {
9067
9068		// if we are already opaque - return ourself
9069		if ( this._rgba[ 3 ] === 1 ) {
9070			return this;
9071		}
9072
9073		var rgb = this._rgba.slice(),
9074			a = rgb.pop(),
9075			blend = color( opaque )._rgba;
9076
9077		return color( jQuery.map( rgb, function( v, i ) {
9078			return ( 1 - a ) * blend[ i ] + a * v;
9079		} ) );
9080	},
9081	toRgbaString: function() {
9082		var prefix = "rgba(",
9083			rgba = jQuery.map( this._rgba, function( v, i ) {
9084				if ( v != null ) {
9085					return v;
9086				}
9087				return i > 2 ? 1 : 0;
9088			} );
9089
9090		if ( rgba[ 3 ] === 1 ) {
9091			rgba.pop();
9092			prefix = "rgb(";
9093		}
9094
9095		return prefix + rgba.join( ", " ) + ")";
9096	},
9097	toHslaString: function() {
9098		var prefix = "hsla(",
9099			hsla = jQuery.map( this.hsla(), function( v, i ) {
9100				if ( v == null ) {
9101					v = i > 2 ? 1 : 0;
9102				}
9103
9104				// catch 1 and 2
9105				if ( i && i < 3 ) {
9106					v = Math.round( v * 100 ) + "%";
9107				}
9108				return v;
9109			} );
9110
9111		if ( hsla[ 3 ] === 1 ) {
9112			hsla.pop();
9113			prefix = "hsl(";
9114		}
9115		return prefix + hsla.join( ", " ) + ")";
9116	},
9117	toHexString: function( includeAlpha ) {
9118		var rgba = this._rgba.slice(),
9119			alpha = rgba.pop();
9120
9121		if ( includeAlpha ) {
9122			rgba.push( ~~( alpha * 255 ) );
9123		}
9124
9125		return "#" + jQuery.map( rgba, function( v ) {
9126
9127			// default to 0 when nulls exist
9128			return ( "0" + ( v || 0 ).toString( 16 ) ).substr( -2 );
9129		} ).join( "" );
9130	},
9131	toString: function() {
9132		return this.toRgbaString();
9133	}
9134} );
9135color.fn.parse.prototype = color.fn;
9136
9137// hsla conversions adapted from:
9138// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
9139
9140function hue2rgb( p, q, h ) {
9141	h = ( h + 1 ) % 1;
9142	if ( h * 6 < 1 ) {
9143		return p + ( q - p ) * h * 6;
9144	}
9145	if ( h * 2 < 1 ) {
9146		return q;
9147	}
9148	if ( h * 3 < 2 ) {
9149		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
9150	}
9151	return p;
9152}
9153
9154spaces.hsla.to = function( rgba ) {
9155	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
9156		return [ null, null, null, rgba[ 3 ] ];
9157	}
9158	var r = rgba[ 0 ] / 255,
9159		g = rgba[ 1 ] / 255,
9160		b = rgba[ 2 ] / 255,
9161		a = rgba[ 3 ],
9162		max = Math.max( r, g, b ),
9163		min = Math.min( r, g, b ),
9164		diff = max - min,
9165		add = max + min,
9166		l = add * 0.5,
9167		h, s;
9168
9169	if ( min === max ) {
9170		h = 0;
9171	} else if ( r === max ) {
9172		h = ( 60 * ( g - b ) / diff ) + 360;
9173	} else if ( g === max ) {
9174		h = ( 60 * ( b - r ) / diff ) + 120;
9175	} else {
9176		h = ( 60 * ( r - g ) / diff ) + 240;
9177	}
9178
9179	// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
9180	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
9181	if ( diff === 0 ) {
9182		s = 0;
9183	} else if ( l <= 0.5 ) {
9184		s = diff / add;
9185	} else {
9186		s = diff / ( 2 - add );
9187	}
9188	return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
9189};
9190
9191spaces.hsla.from = function( hsla ) {
9192	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
9193		return [ null, null, null, hsla[ 3 ] ];
9194	}
9195	var h = hsla[ 0 ] / 360,
9196		s = hsla[ 1 ],
9197		l = hsla[ 2 ],
9198		a = hsla[ 3 ],
9199		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
9200		p = 2 * l - q;
9201
9202	return [
9203		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
9204		Math.round( hue2rgb( p, q, h ) * 255 ),
9205		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
9206		a
9207	];
9208};
9209
9210
9211each( spaces, function( spaceName, space ) {
9212	var props = space.props,
9213		cache = space.cache,
9214		to = space.to,
9215		from = space.from;
9216
9217	// makes rgba() and hsla()
9218	color.fn[ spaceName ] = function( value ) {
9219
9220		// generate a cache for this space if it doesn't exist
9221		if ( to && !this[ cache ] ) {
9222			this[ cache ] = to( this._rgba );
9223		}
9224		if ( value === undefined ) {
9225			return this[ cache ].slice();
9226		}
9227
9228		var ret,
9229			type = getType( value ),
9230			arr = ( type === "array" || type === "object" ) ? value : arguments,
9231			local = this[ cache ].slice();
9232
9233		each( props, function( key, prop ) {
9234			var val = arr[ type === "object" ? key : prop.idx ];
9235			if ( val == null ) {
9236				val = local[ prop.idx ];
9237			}
9238			local[ prop.idx ] = clamp( val, prop );
9239		} );
9240
9241		if ( from ) {
9242			ret = color( from( local ) );
9243			ret[ cache ] = local;
9244			return ret;
9245		} else {
9246			return color( local );
9247		}
9248	};
9249
9250	// makes red() green() blue() alpha() hue() saturation() lightness()
9251	each( props, function( key, prop ) {
9252
9253		// alpha is included in more than one space
9254		if ( color.fn[ key ] ) {
9255			return;
9256		}
9257		color.fn[ key ] = function( value ) {
9258			var local, cur, match, fn,
9259				vtype = getType( value );
9260
9261			if ( key === "alpha" ) {
9262				fn = this._hsla ? "hsla" : "rgba";
9263			} else {
9264				fn = spaceName;
9265			}
9266			local = this[ fn ]();
9267			cur = local[ prop.idx ];
9268
9269			if ( vtype === "undefined" ) {
9270				return cur;
9271			}
9272
9273			if ( vtype === "function" ) {
9274				value = value.call( this, cur );
9275				vtype = getType( value );
9276			}
9277			if ( value == null && prop.empty ) {
9278				return this;
9279			}
9280			if ( vtype === "string" ) {
9281				match = rplusequals.exec( value );
9282				if ( match ) {
9283					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
9284				}
9285			}
9286			local[ prop.idx ] = value;
9287			return this[ fn ]( local );
9288		};
9289	} );
9290} );
9291
9292// add cssHook and .fx.step function for each named hook.
9293// accept a space separated string of properties
9294color.hook = function( hook ) {
9295	var hooks = hook.split( " " );
9296	each( hooks, function( _i, hook ) {
9297		jQuery.cssHooks[ hook ] = {
9298			set: function( elem, value ) {
9299				var parsed;
9300
9301				if ( value !== "transparent" &&
9302					( getType( value ) !== "string" ||
9303						( parsed = stringParse( value ) ) ) ) {
9304					value = color( parsed || value );
9305					value = value.toRgbaString();
9306				}
9307				elem.style[ hook ] = value;
9308			}
9309		};
9310		jQuery.fx.step[ hook ] = function( fx ) {
9311			if ( !fx.colorInit ) {
9312				fx.start = color( fx.elem, hook );
9313				fx.end = color( fx.end );
9314				fx.colorInit = true;
9315			}
9316			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
9317		};
9318	} );
9319
9320};
9321
9322color.hook( stepHooks );
9323
9324jQuery.cssHooks.borderColor = {
9325	expand: function( value ) {
9326		var expanded = {};
9327
9328		each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
9329			expanded[ "border" + part + "Color" ] = value;
9330		} );
9331		return expanded;
9332	}
9333};
9334
9335// Basic color names only.
9336// Usage of any of the other color names requires adding yourself or including
9337// jquery.color.svg-names.js.
9338colors = jQuery.Color.names = {
9339
9340	// 4.1. Basic color keywords
9341	aqua: "#00ffff",
9342	black: "#000000",
9343	blue: "#0000ff",
9344	fuchsia: "#ff00ff",
9345	gray: "#808080",
9346	green: "#008000",
9347	lime: "#00ff00",
9348	maroon: "#800000",
9349	navy: "#000080",
9350	olive: "#808000",
9351	purple: "#800080",
9352	red: "#ff0000",
9353	silver: "#c0c0c0",
9354	teal: "#008080",
9355	white: "#ffffff",
9356	yellow: "#ffff00",
9357
9358	// 4.2.3. "transparent" color keyword
9359	transparent: [ null, null, null, 0 ],
9360
9361	_default: "#ffffff"
9362};
9363
9364
9365/*!
9366 * jQuery UI Effects 1.14.
93661
9367 * https://jqueryui.com
9368 *
9369 * Copyright OpenJS Foundation and other contributors
9370 * Released under the MIT license.
9371 * https://jquery.org/license
9372 */
9373
9374//>>label: Effects Core
9375//>>group: Effects
9376/* eslint-disable max-len */
9377//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
9378/* eslint-enable max-len */
vendor: 7,523 bytes, lines 9378-9668
9378
9379//>>docs: https://api.jqueryui.com/category/effects-core/
9380//>>demos: https://jqueryui.com/effect/
9381
9382
9383var dataSpace = "ui-effects-",
9384	dataSpaceStyle = "ui-effects-style",
9385	dataSpaceAnimated = "ui-effects-animated";
9386
9387$.effects = {
9388	effect: {}
9389};
9390
9391/******************************************************************************/
9392/****************************** CLASS ANIMATIONS ******************************/
9393/******************************************************************************/
9394( function() {
9395
9396var classAnimationActions = [ "add", "remove", "toggle" ],
9397	shorthandStyles = {
9398		border: 1,
9399		borderBottom: 1,
9400		borderColor: 1,
9401		borderLeft: 1,
9402		borderRight: 1,
9403		borderTop: 1,
9404		borderWidth: 1,
9405		margin: 1,
9406		padding: 1
9407	};
9408
9409$.each(
9410	[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
9411	function( _, prop ) {
9412		$.fx.step[ prop ] = function( fx ) {
9413			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
9414				jQuery.style( fx.elem, prop, fx.end );
9415				fx.setAttr = true;
9416			}
9417		};
9418	}
9419);
9420
9421function camelCase( string ) {
9422	return string.replace( /-([\da-z])/gi, function( all, letter ) {
9423		return letter.toUpperCase();
9424	} );
9425}
9426
9427function getElementStyles( elem ) {
9428	var key, len,
9429		style = elem.ownerDocument.defaultView.getComputedStyle( elem ),
9430		styles = {};
9431
9432	len = style.length;
9433	while ( len-- ) {
9434		key = style[ len ];
9435		if ( typeof style[ key ] === "string" ) {
9436			styles[ camelCase( key ) ] = style[ key ];
9437		}
9438	}
9439
9440	return styles;
9441}
9442
9443function styleDifference( oldStyle, newStyle ) {
9444	var diff = {},
9445		name, value;
9446
9447	for ( name in newStyle ) {
9448		value = newStyle[ name ];
9449		if ( oldStyle[ name ] !== value ) {
9450			if ( !shorthandStyles[ name ] ) {
9451				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
9452					diff[ name ] = value;
9453				}
9454			}
9455		}
9456	}
9457
9458	return diff;
9459}
9460
9461$.effects.animateClass = function( value, duration, easing, callback ) {
9462	var o = $.speed( duration, easing, callback );
9463
9464	return this.queue( function() {
9465		var animated = $( this ),
9466			baseClass = animated.attr( "class" ) || "",
9467			applyClassChange,
9468			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
9469
9470		// Map the animated objects to store the original styles.
9471		allAnimations = allAnimations.map( function() {
9472			var el = $( this );
9473			return {
9474				el: el,
9475				start: getElementStyles( this )
9476			};
9477		} );
9478
9479		// Apply class change
9480		applyClassChange = function() {
9481			$.each( classAnimationActions, function( i, action ) {
9482				if ( value[ action ] ) {
9483					animated[ action + "Class" ]( value[ action ] );
9484				}
9485			} );
9486		};
9487		applyClassChange();
9488
9489		// Map all animated objects again - calculate new styles and diff
9490		allAnimations = allAnimations.map( function() {
9491			this.end = getElementStyles( this.el[ 0 ] );
9492			this.diff = styleDifference( this.start, this.end );
9493			return this;
9494		} );
9495
9496		// Apply original class
9497		animated.attr( "class", baseClass );
9498
9499		// Map all animated objects again - this time collecting a promise
9500		allAnimations = allAnimations.map( function() {
9501			var styleInfo = this,
9502				dfd = $.Deferred(),
9503				opts = $.extend( {}, o, {
9504					queue: false,
9505					complete: function() {
9506						dfd.resolve( styleInfo );
9507					}
9508				} );
9509
9510			this.el.animate( this.diff, opts );
9511			return dfd.promise();
9512		} );
9513
9514		// Once all animations have completed:
9515		$.when.apply( $, allAnimations.get() ).done( function() {
9516
9517			// Set the final class
9518			applyClassChange();
9519
9520			// For each animated element,
9521			// clear all css properties that were animated
9522			$.each( arguments, function() {
9523				var el = this.el;
9524				$.each( this.diff, function( key ) {
9525					el.css( key, "" );
9526				} );
9527			} );
9528
9529			// This is guarnteed to be there if you use jQuery.speed()
9530			// it also handles dequeuing the next anim...
9531			o.complete.call( animated[ 0 ] );
9532		} );
9533	} );
9534};
9535
9536$.fn.extend( {
9537	addClass: ( function( orig ) {
9538		return function( classNames, speed, easing, callback ) {
9539			return speed ?
9540				$.effects.animateClass.call( this,
9541					{ add: classNames }, speed, easing, callback ) :
9542				orig.apply( this, arguments );
9543		};
9544	} )( $.fn.addClass ),
9545
9546	removeClass: ( function( orig ) {
9547		return function( classNames, speed, easing, callback ) {
9548			return arguments.length > 1 ?
9549				$.effects.animateClass.call( this,
9550					{ remove: classNames }, speed, easing, callback ) :
9551				orig.apply( this, arguments );
9552		};
9553	} )( $.fn.removeClass ),
9554
9555	toggleClass: ( function( orig ) {
9556		return function( classNames, force, speed, easing, callback ) {
9557			if ( typeof force === "boolean" || force === undefined ) {
9558				if ( !speed ) {
9559
9560					// Without speed parameter
9561					return orig.apply( this, arguments );
9562				} else {
9563					return $.effects.animateClass.call( this,
9564						( force ? { add: classNames } : { remove: classNames } ),
9565						speed, easing, callback );
9566				}
9567			} else {
9568
9569				// Without force parameter
9570				return $.effects.animateClass.call( this,
9571					{ toggle: classNames }, force, speed, easing );
9572			}
9573		};
9574	} )( $.fn.toggleClass ),
9575
9576	switchClass: function( remove, add, speed, easing, callback ) {
9577		return $.effects.animateClass.call( this, {
9578			add: add,
9579			remove: remove
9580		}, speed, easing, callback );
9581	}
9582} );
9583
9584} )();
9585
9586/******************************************************************************/
9587/*********************************** EFFECTS **********************************/
9588/******************************************************************************/
9589
9590( function() {
9591
9592if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
9593	$.expr.pseudos.animated = ( function( orig ) {
9594		return function( elem ) {
9595			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
9596		};
9597	} )( $.expr.pseudos.animated );
9598}
9599
9600if ( $.uiBackCompat === true ) {
9601	$.extend( $.effects, {
9602
9603		// Saves a set of properties in a data storage
9604		save: function( element, set ) {
9605			var i = 0, length = set.length;
9606			for ( ; i < length; i++ ) {
9607				if ( set[ i ] !== null ) {
9608					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
9609				}
9610			}
9611		},
9612
9613		// Restores a set of previously saved properties from a data storage
9614		restore: function( element, set ) {
9615			var val, i = 0, length = set.length;
9616			for ( ; i < length; i++ ) {
9617				if ( set[ i ] !== null ) {
9618					val = element.data( dataSpace + set[ i ] );
9619					element.css( set[ i ], val );
9620				}
9621			}
9622		},
9623
9624		setMode: function( el, mode ) {
9625			if ( mode === "toggle" ) {
9626				mode = el.is( ":hidden" ) ? "show" : "hide";
9627			}
9628			return mode;
9629		},
9630
9631		// Wraps the element around a wrapper that copies position properties
9632		createWrapper: function( element ) {
9633
9634			// If the element is already wrapped, return it
9635			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
9636				return element.parent();
9637			}
9638
9639			// Wrap the element
9640			var props = {
9641					width: element.outerWidth( true ),
9642					height: element.outerHeight( true ),
9643					"float": element.css( "float" )
9644				},
9645				wrapper = $( "<div></div>" )
9646					.addClass( "ui-effects-wrapper" )
9647					.css( {
9648						fontSize: "100%",
9649						background: "transparent",
9650						border: "none",
9651						margin: 0,
9652						padding: 0
9653					} ),
9654
9655				// Store the size in case width/height are defined in % - Fixes #5245
9656				size = {
9657					width: element.width(),
9658					height: element.height()
9659				},
9660				active = document.activeElement;
9661
9662			// Support: Firefox
9663			// Firefox incorrectly exposes anonymous content
9664			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
9665			try {
9666				// eslint-disable-next-line no-unused-expressions
9667				active.id;
9668			} catch ( 
vendor: 1,550 bytes, lines 9668-9729
9668e ) {
9669				active = document.body;
9670			}
9671
9672			element.wrap( wrapper );
9673
9674			// Fixes #7595 - Elements lose focus when wrapped.
9675			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
9676				$( active ).trigger( "focus" );
9677			}
9678
9679			// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
9680			// lose the reference to the wrapped element
9681			wrapper = element.parent();
9682
9683			// Transfer positioning properties to the wrapper
9684			if ( element.css( "position" ) === "static" ) {
9685				wrapper.css( { position: "relative" } );
9686				element.css( { position: "relative" } );
9687			} else {
9688				$.extend( props, {
9689					position: element.css( "position" ),
9690					zIndex: element.css( "z-index" )
9691				} );
9692				$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
9693					props[ pos ] = element.css( pos );
9694					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
9695						props[ pos ] = "auto";
9696					}
9697				} );
9698				element.css( {
9699					position: "relative",
9700					top: 0,
9701					left: 0,
9702					right: "auto",
9703					bottom: "auto"
9704				} );
9705			}
9706			element.css( size );
9707
9708			return wrapper.css( props ).show();
9709		},
9710
9711		removeWrapper: function( element ) {
9712			var active = document.activeElement;
9713
9714			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
9715				element.parent().replaceWith( element );
9716
9717				// Fixes #7595 - Elements lose focus when wrapped.
9718				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
9719					$( active ).trigger( "focus" );
9720				}
9721			}
9722
9723			return element;
9724		}
9725	} );
9726}
9727
9728$.extend( $.effects, {
9729	version: "1.14.1
vendor: 6,301 bytes, lines 9729-9997
9729",
9730
9731	define: function( name, mode, effect ) {
9732		if ( !effect ) {
9733			effect = mode;
9734			mode = "effect";
9735		}
9736
9737		$.effects.effect[ name ] = effect;
9738		$.effects.effect[ name ].mode = mode;
9739
9740		return effect;
9741	},
9742
9743	scaledDimensions: function( element, percent, direction ) {
9744		if ( percent === 0 ) {
9745			return {
9746				height: 0,
9747				width: 0,
9748				outerHeight: 0,
9749				outerWidth: 0
9750			};
9751		}
9752
9753		var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
9754			y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
9755
9756		return {
9757			height: element.height() * y,
9758			width: element.width() * x,
9759			outerHeight: element.outerHeight() * y,
9760			outerWidth: element.outerWidth() * x
9761		};
9762
9763	},
9764
9765	clipToBox: function( animation ) {
9766		return {
9767			width: animation.clip.right - animation.clip.left,
9768			height: animation.clip.bottom - animation.clip.top,
9769			left: animation.clip.left,
9770			top: animation.clip.top
9771		};
9772	},
9773
9774	// Injects recently queued functions to be first in line (after "inprogress")
9775	unshift: function( element, queueLength, count ) {
9776		var queue = element.queue();
9777
9778		if ( queueLength > 1 ) {
9779			queue.splice.apply( queue,
9780				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
9781		}
9782		element.dequeue();
9783	},
9784
9785	saveStyle: function( element ) {
9786		element.data( dataSpaceStyle, element[ 0 ].style.cssText );
9787	},
9788
9789	restoreStyle: function( element ) {
9790		element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
9791		element.removeData( dataSpaceStyle );
9792	},
9793
9794	mode: function( element, mode ) {
9795		var hidden = element.is( ":hidden" );
9796
9797		if ( mode === "toggle" ) {
9798			mode = hidden ? "show" : "hide";
9799		}
9800		if ( hidden ? mode === "hide" : mode === "show" ) {
9801			mode = "none";
9802		}
9803		return mode;
9804	},
9805
9806	// Translates a [top,left] array into a baseline value
9807	getBaseline: function( origin, original ) {
9808		var y, x;
9809
9810		switch ( origin[ 0 ] ) {
9811		case "top":
9812			y = 0;
9813			break;
9814		case "middle":
9815			y = 0.5;
9816			break;
9817		case "bottom":
9818			y = 1;
9819			break;
9820		default:
9821			y = origin[ 0 ] / original.height;
9822		}
9823
9824		switch ( origin[ 1 ] ) {
9825		case "left":
9826			x = 0;
9827			break;
9828		case "center":
9829			x = 0.5;
9830			break;
9831		case "right":
9832			x = 1;
9833			break;
9834		default:
9835			x = origin[ 1 ] / original.width;
9836		}
9837
9838		return {
9839			x: x,
9840			y: y
9841		};
9842	},
9843
9844	// Creates a placeholder element so that the original element can be made absolute
9845	createPlaceholder: function( element ) {
9846		var placeholder,
9847			cssPosition = element.css( "position" ),
9848			position = element.position();
9849
9850		// Lock in margins first to account for form elements, which
9851		// will change margin if you explicitly set height
9852		// see: https://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
9853		// Support: Safari
9854		element.css( {
9855			marginTop: element.css( "marginTop" ),
9856			marginBottom: element.css( "marginBottom" ),
9857			marginLeft: element.css( "marginLeft" ),
9858			marginRight: element.css( "marginRight" )
9859		} )
9860		.outerWidth( element.outerWidth() )
9861		.outerHeight( element.outerHeight() );
9862
9863		if ( /^(static|relative)/.test( cssPosition ) ) {
9864			cssPosition = "absolute";
9865
9866			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
9867
9868				// Convert inline to inline block to account for inline elements
9869				// that turn to inline block based on content (like img)
9870				display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
9871					"inline-block" :
9872					"block",
9873				visibility: "hidden",
9874
9875				// Margins need to be set to account for margin collapse
9876				marginTop: element.css( "marginTop" ),
9877				marginBottom: element.css( "marginBottom" ),
9878				marginLeft: element.css( "marginLeft" ),
9879				marginRight: element.css( "marginRight" ),
9880				"float": element.css( "float" )
9881			} )
9882			.outerWidth( element.outerWidth() )
9883			.outerHeight( element.outerHeight() )
9884			.addClass( "ui-effects-placeholder" );
9885
9886			element.data( dataSpace + "placeholder", placeholder );
9887		}
9888
9889		element.css( {
9890			position: cssPosition,
9891			left: position.left,
9892			top: position.top
9893		} );
9894
9895		return placeholder;
9896	},
9897
9898	removePlaceholder: function( element ) {
9899		var dataKey = dataSpace + "placeholder",
9900				placeholder = element.data( dataKey );
9901
9902		if ( placeholder ) {
9903			placeholder.remove();
9904			element.removeData( dataKey );
9905		}
9906	},
9907
9908	// Removes a placeholder if it exists and restores
9909	// properties that were modified during placeholder creation
9910	cleanUp: function( element ) {
9911		$.effects.restoreStyle( element );
9912		$.effects.removePlaceholder( element );
9913	},
9914
9915	setTransition: function( element, list, factor, value ) {
9916		value = value || {};
9917		$.each( list, function( i, x ) {
9918			var unit = element.cssUnit( x );
9919			if ( unit[ 0 ] > 0 ) {
9920				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
9921			}
9922		} );
9923		return value;
9924	}
9925} );
9926
9927// Return an effect options object for the given parameters:
9928function _normalizeArguments( effect, options, speed, callback ) {
9929
9930	// Allow passing all options as the first parameter
9931	if ( $.isPlainObject( effect ) ) {
9932		options = effect;
9933		effect = effect.effect;
9934	}
9935
9936	// Convert to an object
9937	effect = { effect: effect };
9938
9939	// Catch (effect, null, ...)
9940	if ( options == null ) {
9941		options = {};
9942	}
9943
9944	// Catch (effect, callback)
9945	if ( typeof options === "function" ) {
9946		callback = options;
9947		speed = null;
9948		options = {};
9949	}
9950
9951	// Catch (effect, speed, ?)
9952	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
9953		callback = speed;
9954		speed = options;
9955		options = {};
9956	}
9957
9958	// Catch (effect, options, callback)
9959	if ( typeof speed === "function" ) {
9960		callback = speed;
9961		speed = null;
9962	}
9963
9964	// Add options to effect
9965	if ( options ) {
9966		$.extend( effect, options );
9967	}
9968
9969	speed = speed || options.duration;
9970	effect.duration = $.fx.off ? 0 :
9971		typeof speed === "number" ? speed :
9972		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
9973		$.fx.speeds._default;
9974
9975	effect.complete = callback || options.complete;
9976
9977	return effect;
9978}
9979
9980function standardAnimationOption( option ) {
9981
9982	// Valid standard speeds (nothing, number, named speed)
9983	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
9984		return true;
9985	}
9986
9987	// Invalid strings - treat as "normal" speed
9988	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
9989		return true;
9990	}
9991
9992	// Complete callback
9993	if ( typeof option === "function" ) {
9994		return true;
9995	}
9996
9997	// Options hash (but not naming an effect)
vendor: 8,038 bytes, lines 9998-10297
9998	if ( typeof option === "object" && !option.effect ) {
9999		return true;
10000	}
10001
10002	// Didn't match any standard API
10003	return false;
10004}
10005
10006$.fn.extend( {
10007	effect: function( /* effect, options, speed, callback */ ) {
10008		var args = _normalizeArguments.apply( this, arguments ),
10009			effectMethod = $.effects.effect[ args.effect ],
10010			defaultMode = effectMethod.mode,
10011			queue = args.queue,
10012			queueName = queue || "fx",
10013			complete = args.complete,
10014			mode = args.mode,
10015			modes = [],
10016			prefilter = function( next ) {
10017				var el = $( this ),
10018					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
10019
10020				// Sentinel for duck-punching the :animated pseudo-selector
10021				el.data( dataSpaceAnimated, true );
10022
10023				// Save effect mode for later use,
10024				// we can't just call $.effects.mode again later,
10025				// as the .show() below destroys the initial state
10026				modes.push( normalizedMode );
10027
10028				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
10029				if ( defaultMode && ( normalizedMode === "show" ||
10030						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
10031					el.show();
10032				}
10033
10034				if ( !defaultMode || normalizedMode !== "none" ) {
10035					$.effects.saveStyle( el );
10036				}
10037
10038				if ( typeof next === "function" ) {
10039					next();
10040				}
10041			};
10042
10043		if ( $.fx.off || !effectMethod ) {
10044
10045			// Delegate to the original method (e.g., .show()) if possible
10046			if ( mode ) {
10047				return this[ mode ]( args.duration, complete );
10048			} else {
10049				return this.each( function() {
10050					if ( complete ) {
10051						complete.call( this );
10052					}
10053				} );
10054			}
10055		}
10056
10057		function run( next ) {
10058			var elem = $( this );
10059
10060			function cleanup() {
10061				elem.removeData( dataSpaceAnimated );
10062
10063				$.effects.cleanUp( elem );
10064
10065				if ( args.mode === "hide" ) {
10066					elem.hide();
10067				}
10068
10069				done();
10070			}
10071
10072			function done() {
10073				if ( typeof complete === "function" ) {
10074					complete.call( elem[ 0 ] );
10075				}
10076
10077				if ( typeof next === "function" ) {
10078					next();
10079				}
10080			}
10081
10082			// Override mode option on a per element basis,
10083			// as toggle can be either show or hide depending on element state
10084			args.mode = modes.shift();
10085
10086			if ( $.uiBackCompat === true && !defaultMode ) {
10087				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
10088
10089					// Call the core method to track "olddisplay" properly
10090					elem[ mode ]();
10091					done();
10092				} else {
10093					effectMethod.call( elem[ 0 ], args, done );
10094				}
10095			} else {
10096				if ( args.mode === "none" ) {
10097
10098					// Call the core method to track "olddisplay" properly
10099					elem[ mode ]();
10100					done();
10101				} else {
10102					effectMethod.call( elem[ 0 ], args, cleanup );
10103				}
10104			}
10105		}
10106
10107		// Run prefilter on all elements first to ensure that
10108		// any showing or hiding happens before placeholder creation,
10109		// which ensures that any layout changes are correctly captured.
10110		return queue === false ?
10111			this.each( prefilter ).each( run ) :
10112			this.queue( queueName, prefilter ).queue( queueName, run );
10113	},
10114
10115	show: ( function( orig ) {
10116		return function( option ) {
10117			if ( standardAnimationOption( option ) ) {
10118				return orig.apply( this, arguments );
10119			} else {
10120				var args = _normalizeArguments.apply( this, arguments );
10121				args.mode = "show";
10122				return this.effect.call( this, args );
10123			}
10124		};
10125	} )( $.fn.show ),
10126
10127	hide: ( function( orig ) {
10128		return function( option ) {
10129			if ( standardAnimationOption( option ) ) {
10130				return orig.apply( this, arguments );
10131			} else {
10132				var args = _normalizeArguments.apply( this, arguments );
10133				args.mode = "hide";
10134				return this.effect.call( this, args );
10135			}
10136		};
10137	} )( $.fn.hide ),
10138
10139	toggle: ( function( orig ) {
10140		return function( option ) {
10141			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
10142				return orig.apply( this, arguments );
10143			} else {
10144				var args = _normalizeArguments.apply( this, arguments );
10145				args.mode = "toggle";
10146				return this.effect.call( this, args );
10147			}
10148		};
10149	} )( $.fn.toggle ),
10150
10151	cssUnit: function( key ) {
10152		var style = this.css( key ),
10153			val = [];
10154
10155		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
10156			if ( style.indexOf( unit ) > 0 ) {
10157				val = [ parseFloat( style ), unit ];
10158			}
10159		} );
10160		return val;
10161	},
10162
10163	cssClip: function( clipObj ) {
10164		if ( clipObj ) {
10165			return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
10166				clipObj.bottom + "px " + clipObj.left + "px)" );
10167		}
10168		return parseClip( this.css( "clip" ), this );
10169	},
10170
10171	transfer: function( options, done ) {
10172		var element = $( this ),
10173			target = $( options.to ),
10174			targetFixed = target.css( "position" ) === "fixed",
10175			body = $( "body" ),
10176			fixTop = targetFixed ? body.scrollTop() : 0,
10177			fixLeft = targetFixed ? body.scrollLeft() : 0,
10178			endPosition = target.offset(),
10179			animation = {
10180				top: endPosition.top - fixTop,
10181				left: endPosition.left - fixLeft,
10182				height: target.innerHeight(),
10183				width: target.innerWidth()
10184			},
10185			startPosition = element.offset(),
10186			transfer = $( "<div class='ui-effects-transfer'></div>" );
10187
10188		transfer
10189			.appendTo( "body" )
10190			.addClass( options.className )
10191			.css( {
10192				top: startPosition.top - fixTop,
10193				left: startPosition.left - fixLeft,
10194				height: element.innerHeight(),
10195				width: element.innerWidth(),
10196				position: targetFixed ? "fixed" : "absolute"
10197			} )
10198			.animate( animation, options.duration, options.easing, function() {
10199				transfer.remove();
10200				if ( typeof done === "function" ) {
10201					done();
10202				}
10203			} );
10204	}
10205} );
10206
10207function parseClip( str, element ) {
10208		var outerWidth = element.outerWidth(),
10209			outerHeight = element.outerHeight(),
10210			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)\)$/,
10211			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
10212
10213		return {
10214			top: parseFloat( values[ 1 ] ) || 0,
10215			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
10216			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
10217			left: parseFloat( values[ 4 ] ) || 0
10218		};
10219}
10220
10221$.fx.step.clip = function( fx ) {
10222	if ( !fx.clipInit ) {
10223		fx.start = $( fx.elem ).cssClip();
10224		if ( typeof fx.end === "string" ) {
10225			fx.end = parseClip( fx.end, fx.elem );
10226		}
10227		fx.clipInit = true;
10228	}
10229
10230	$( fx.elem ).cssClip( {
10231		top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
10232		right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
10233		bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
10234		left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
10235	} );
10236};
10237
10238} )();
10239
10240/******************************************************************************/
10241/*********************************** EASING ***********************************/
10242/******************************************************************************/
10243
10244( function() {
10245
10246// Based on easing equations from Robert Penner (http://robertpenner.com/easing)
10247
10248var baseEasings = {};
10249
10250$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
10251	baseEasings[ name ] = function( p ) {
10252		return Math.pow( p, i + 2 );
10253	};
10254} );
10255
10256$.extend( baseEasings, {
10257	Sine: function( p ) {
10258		return 1 - Math.cos( p * Math.PI / 2 );
10259	},
10260	Circ: function( p ) {
10261		return 1 - Math.sqrt( 1 - p * p );
10262	},
10263	Elastic: function( p ) {
10264		return p === 0 || p === 1 ? p :
10265			-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
10266	},
10267	Back: function( p ) {
10268		return p * p * ( 3 * p - 2 );
10269	},
10270	Bounce: function( p ) {
10271		var pow2,
10272			bounce = 4;
10273
10274		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
10275		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
10276	}
10277} );
10278
10279$.each( baseEasings, function( name, easeIn ) {
10280	$.easing[ "easeIn" + name ] = easeIn;
10281	$.easing[ "easeOut" + name ] = function( p ) {
10282		return 1 - easeIn( 1 - p );
10283	};
10284	$.easing[ "easeInOut" + name ] = function( p ) {
10285		return p < 0.5 ?
10286			easeIn( p * 2 ) / 2 :
10287			1 - easeIn( p * -2 + 2 ) / 2;
10288	};
10289} );
10290
10291} )();
10292
10293var effect = $.effects;
10294
10295
10296/*!
10297 * jQuery UI Effects Blind 1.14.
vendor: 33,753 bytes, lines 10297-11606
102971
10298 * https://jqueryui.com
10299 *
10300 * Copyright OpenJS Foundation and other contributors
10301 * Released under the MIT license.
10302 * https://jquery.org/license
10303 */
10304
10305//>>label: Blind Effect
10306//>>group: Effects
10307//>>description: Blinds the element.
10308//>>docs: https://api.jqueryui.com/blind-effect/
10309//>>demos: https://jqueryui.com/effect/
10310
10311
10312var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) {
10313	var map = {
10314			up: [ "bottom", "top" ],
10315			vertical: [ "bottom", "top" ],
10316			down: [ "top", "bottom" ],
10317			left: [ "right", "left" ],
10318			horizontal: [ "right", "left" ],
10319			right: [ "left", "right" ]
10320		},
10321		element = $( this ),
10322		direction = options.direction || "up",
10323		start = element.cssClip(),
10324		animate = { clip: $.extend( {}, start ) },
10325		placeholder = $.effects.createPlaceholder( element );
10326
10327	animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];
10328
10329	if ( options.mode === "show" ) {
10330		element.cssClip( animate.clip );
10331		if ( placeholder ) {
10332			placeholder.css( $.effects.clipToBox( animate ) );
10333		}
10334
10335		animate.clip = start;
10336	}
10337
10338	if ( placeholder ) {
10339		placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
10340	}
10341
10342	element.animate( animate, {
10343		queue: false,
10344		duration: options.duration,
10345		easing: options.easing,
10346		complete: done
10347	} );
10348} );
10349
10350
10351/*!
10352 * jQuery UI Effects Bounce 1.14.1
10353 * https://jqueryui.com
10354 *
10355 * Copyright OpenJS Foundation and other contributors
10356 * Released under the MIT license.
10357 * https://jquery.org/license
10358 */
10359
10360//>>label: Bounce Effect
10361//>>group: Effects
10362//>>description: Bounces an element horizontally or vertically n times.
10363//>>docs: https://api.jqueryui.com/bounce-effect/
10364//>>demos: https://jqueryui.com/effect/
10365
10366
10367var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) {
10368	var upAnim, downAnim, refValue,
10369		element = $( this ),
10370
10371		// Defaults:
10372		mode = options.mode,
10373		hide = mode === "hide",
10374		show = mode === "show",
10375		direction = options.direction || "up",
10376		distance = options.distance,
10377		times = options.times || 5,
10378
10379		// Number of internal animations
10380		anims = times * 2 + ( show || hide ? 1 : 0 ),
10381		speed = options.duration / anims,
10382		easing = options.easing,
10383
10384		// Utility:
10385		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
10386		motion = ( direction === "up" || direction === "left" ),
10387		i = 0,
10388
10389		queuelen = element.queue().length;
10390
10391	$.effects.createPlaceholder( element );
10392
10393	refValue = element.css( ref );
10394
10395	// Default distance for the BIGGEST bounce is the outer Distance / 3
10396	if ( !distance ) {
10397		distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
10398	}
10399
10400	if ( show ) {
10401		downAnim = { opacity: 1 };
10402		downAnim[ ref ] = refValue;
10403
10404		// If we are showing, force opacity 0 and set the initial position
10405		// then do the "first" animation
10406		element
10407			.css( "opacity", 0 )
10408			.css( ref, motion ? -distance * 2 : distance * 2 )
10409			.animate( downAnim, speed, easing );
10410	}
10411
10412	// Start at the smallest distance if we are hiding
10413	if ( hide ) {
10414		distance = distance / Math.pow( 2, times - 1 );
10415	}
10416
10417	downAnim = {};
10418	downAnim[ ref ] = refValue;
10419
10420	// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
10421	for ( ; i < times; i++ ) {
10422		upAnim = {};
10423		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
10424
10425		element
10426			.animate( upAnim, speed, easing )
10427			.animate( downAnim, speed, easing );
10428
10429		distance = hide ? distance * 2 : distance / 2;
10430	}
10431
10432	// Last Bounce when Hiding
10433	if ( hide ) {
10434		upAnim = { opacity: 0 };
10435		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
10436
10437		element.animate( upAnim, speed, easing );
10438	}
10439
10440	element.queue( done );
10441
10442	$.effects.unshift( element, queuelen, anims + 1 );
10443} );
10444
10445
10446/*!
10447 * jQuery UI Effects Clip 1.14.1
10448 * https://jqueryui.com
10449 *
10450 * Copyright OpenJS Foundation and other contributors
10451 * Released under the MIT license.
10452 * https://jquery.org/license
10453 */
10454
10455//>>label: Clip Effect
10456//>>group: Effects
10457//>>description: Clips the element on and off like an old TV.
10458//>>docs: https://api.jqueryui.com/clip-effect/
10459//>>demos: https://jqueryui.com/effect/
10460
10461
10462var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) {
10463	var start,
10464		animate = {},
10465		element = $( this ),
10466		direction = options.direction || "vertical",
10467		both = direction === "both",
10468		horizontal = both || direction === "horizontal",
10469		vertical = both || direction === "vertical";
10470
10471	start = element.cssClip();
10472	animate.clip = {
10473		top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
10474		right: horizontal ? ( start.right - start.left ) / 2 : start.right,
10475		bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
10476		left: horizontal ? ( start.right - start.left ) / 2 : start.left
10477	};
10478
10479	$.effects.createPlaceholder( element );
10480
10481	if ( options.mode === "show" ) {
10482		element.cssClip( animate.clip );
10483		animate.clip = start;
10484	}
10485
10486	element.animate( animate, {
10487		queue: false,
10488		duration: options.duration,
10489		easing: options.easing,
10490		complete: done
10491	} );
10492
10493} );
10494
10495
10496/*!
10497 * jQuery UI Effects Drop 1.14.1
10498 * https://jqueryui.com
10499 *
10500 * Copyright OpenJS Foundation and other contributors
10501 * Released under the MIT license.
10502 * https://jquery.org/license
10503 */
10504
10505//>>label: Drop Effect
10506//>>group: Effects
10507//>>description: Moves an element in one direction and hides it at the same time.
10508//>>docs: https://api.jqueryui.com/drop-effect/
10509//>>demos: https://jqueryui.com/effect/
10510
10511
10512var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) {
10513
10514	var distance,
10515		element = $( this ),
10516		mode = options.mode,
10517		show = mode === "show",
10518		direction = options.direction || "left",
10519		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
10520		motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
10521		oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
10522		animation = {
10523			opacity: 0
10524		};
10525
10526	$.effects.createPlaceholder( element );
10527
10528	distance = options.distance ||
10529		element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
10530
10531	animation[ ref ] = motion + distance;
10532
10533	if ( show ) {
10534		element.css( animation );
10535
10536		animation[ ref ] = oppositeMotion + distance;
10537		animation.opacity = 1;
10538	}
10539
10540	// Animate
10541	element.animate( animation, {
10542		queue: false,
10543		duration: options.duration,
10544		easing: options.easing,
10545		complete: done
10546	} );
10547} );
10548
10549
10550/*!
10551 * jQuery UI Effects Explode 1.14.1
10552 * https://jqueryui.com
10553 *
10554 * Copyright OpenJS Foundation and other contributors
10555 * Released under the MIT license.
10556 * https://jquery.org/license
10557 */
10558
10559//>>label: Explode Effect
10560//>>group: Effects
10561/* eslint-disable max-len */
10562//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
10563/* eslint-enable max-len */
10564//>>docs: https://api.jqueryui.com/explode-effect/
10565//>>demos: https://jqueryui.com/effect/
10566
10567
10568var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) {
10569
10570	var i, j, left, top, mx, my,
10571		rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
10572		cells = rows,
10573		element = $( this ),
10574		mode = options.mode,
10575		show = mode === "show",
10576
10577		// Show and then visibility:hidden the element before calculating offset
10578		offset = element.show().css( "visibility", "hidden" ).offset(),
10579
10580		// Width and height of a piece
10581		width = Math.ceil( element.outerWidth() / cells ),
10582		height = Math.ceil( element.outerHeight() / rows ),
10583		pieces = [];
10584
10585	// Children animate complete:
10586	function childComplete() {
10587		pieces.push( this );
10588		if ( pieces.length === rows * cells ) {
10589			animComplete();
10590		}
10591	}
10592
10593	// Clone the element for each row and cell.
10594	for ( i = 0; i < rows; i++ ) { // ===>
10595		top = offset.top + i * height;
10596		my = i - ( rows - 1 ) / 2;
10597
10598		for ( j = 0; j < cells; j++ ) { // |||
10599			left = offset.left + j * width;
10600			mx = j - ( cells - 1 ) / 2;
10601
10602			// Create a clone of the now hidden main element that will be absolute positioned
10603			// within a wrapper div off the -left and -top equal to size of our pieces
10604			element
10605				.clone()
10606				.appendTo( "body" )
10607				.wrap( "<div></div>" )
10608				.css( {
10609					position: "absolute",
10610					visibility: "visible",
10611					left: -j * width,
10612					top: -i * height
10613				} )
10614
10615				// Select the wrapper - make it overflow: hidden and absolute positioned based on
10616				// where the original was located +left and +top equal to the size of pieces
10617				.parent()
10618					.addClass( "ui-effects-explode" )
10619					.css( {
10620						position: "absolute",
10621						overflow: "hidden",
10622						width: width,
10623						height: height,
10624						left: left + ( show ? mx * width : 0 ),
10625						top: top + ( show ? my * height : 0 ),
10626						opacity: show ? 0 : 1
10627					} )
10628					.animate( {
10629						left: left + ( show ? 0 : mx * width ),
10630						top: top + ( show ? 0 : my * height ),
10631						opacity: show ? 1 : 0
10632					}, options.duration || 500, options.easing, childComplete );
10633		}
10634	}
10635
10636	function animComplete() {
10637		element.css( {
10638			visibility: "visible"
10639		} );
10640		$( pieces ).remove();
10641		done();
10642	}
10643} );
10644
10645
10646/*!
10647 * jQuery UI Effects Fade 1.14.1
10648 * https://jqueryui.com
10649 *
10650 * Copyright OpenJS Foundation and other contributors
10651 * Released under the MIT license.
10652 * https://jquery.org/license
10653 */
10654
10655//>>label: Fade Effect
10656//>>group: Effects
10657//>>description: Fades the element.
10658//>>docs: https://api.jqueryui.com/fade-effect/
10659//>>demos: https://jqueryui.com/effect/
10660
10661
10662var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) {
10663	var show = options.mode === "show";
10664
10665	$( this )
10666		.css( "opacity", show ? 0 : 1 )
10667		.animate( {
10668			opacity: show ? 1 : 0
10669		}, {
10670			queue: false,
10671			duration: options.duration,
10672			easing: options.easing,
10673			complete: done
10674		} );
10675} );
10676
10677
10678/*!
10679 * jQuery UI Effects Fold 1.14.1
10680 * https://jqueryui.com
10681 *
10682 * Copyright OpenJS Foundation and other contributors
10683 * Released under the MIT license.
10684 * https://jquery.org/license
10685 */
10686
10687//>>label: Fold Effect
10688//>>group: Effects
10689//>>description: Folds an element first horizontally and then vertically.
10690//>>docs: https://api.jqueryui.com/fold-effect/
10691//>>demos: https://jqueryui.com/effect/
10692
10693
10694var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) {
10695
10696	// Create element
10697	var element = $( this ),
10698		mode = options.mode,
10699		show = mode === "show",
10700		hide = mode === "hide",
10701		size = options.size || 15,
10702		percent = /([0-9]+)%/.exec( size ),
10703		horizFirst = !!options.horizFirst,
10704		ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
10705		duration = options.duration / 2,
10706
10707		placeholder = $.effects.createPlaceholder( element ),
10708
10709		start = element.cssClip(),
10710		animation1 = { clip: $.extend( {}, start ) },
10711		animation2 = { clip: $.extend( {}, start ) },
10712
10713		distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],
10714
10715		queuelen = element.queue().length;
10716
10717	if ( percent ) {
10718		size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
10719	}
10720	animation1.clip[ ref[ 0 ] ] = size;
10721	animation2.clip[ ref[ 0 ] ] = size;
10722	animation2.clip[ ref[ 1 ] ] = 0;
10723
10724	if ( show ) {
10725		element.cssClip( animation2.clip );
10726		if ( placeholder ) {
10727			placeholder.css( $.effects.clipToBox( animation2 ) );
10728		}
10729
10730		animation2.clip = start;
10731	}
10732
10733	// Animate
10734	element
10735		.queue( function( next ) {
10736			if ( placeholder ) {
10737				placeholder
10738					.animate( $.effects.clipToBox( animation1 ), duration, options.easing )
10739					.animate( $.effects.clipToBox( animation2 ), duration, options.easing );
10740			}
10741
10742			next();
10743		} )
10744		.animate( animation1, duration, options.easing )
10745		.animate( animation2, duration, options.easing )
10746		.queue( done );
10747
10748	$.effects.unshift( element, queuelen, 4 );
10749} );
10750
10751
10752/*!
10753 * jQuery UI Effects Highlight 1.14.1
10754 * https://jqueryui.com
10755 *
10756 * Copyright OpenJS Foundation and other contributors
10757 * Released under the MIT license.
10758 * https://jquery.org/license
10759 */
10760
10761//>>label: Highlight Effect
10762//>>group: Effects
10763//>>description: Highlights the background of an element in a defined color for a custom duration.
10764//>>docs: https://api.jqueryui.com/highlight-effect/
10765//>>demos: https://jqueryui.com/effect/
10766
10767
10768var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) {
10769	var element = $( this ),
10770		animation = {
10771			backgroundColor: element.css( "backgroundColor" )
10772		};
10773
10774	if ( options.mode === "hide" ) {
10775		animation.opacity = 0;
10776	}
10777
10778	$.effects.saveStyle( element );
10779
10780	element
10781		.css( {
10782			backgroundImage: "none",
10783			backgroundColor: options.color || "#ffff99"
10784		} )
10785		.animate( animation, {
10786			queue: false,
10787			duration: options.duration,
10788			easing: options.easing,
10789			complete: done
10790		} );
10791} );
10792
10793
10794/*!
10795 * jQuery UI Effects Size 1.14.1
10796 * https://jqueryui.com
10797 *
10798 * Copyright OpenJS Foundation and other contributors
10799 * Released under the MIT license.
10800 * https://jquery.org/license
10801 */
10802
10803//>>label: Size Effect
10804//>>group: Effects
10805//>>description: Resize an element to a specified width and height.
10806//>>docs: https://api.jqueryui.com/size-effect/
10807//>>demos: https://jqueryui.com/effect/
10808
10809
10810var effectsEffectSize = $.effects.define( "size", function( options, done ) {
10811
10812	// Create element
10813	var baseline, factor, temp,
10814		element = $( this ),
10815
10816		// Copy for children
10817		cProps = [ "fontSize" ],
10818		vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
10819		hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
10820
10821		// Set options
10822		mode = options.mode,
10823		restore = mode !== "effect",
10824		scale = options.scale || "both",
10825		origin = options.origin || [ "middle", "center" ],
10826		position = element.css( "position" ),
10827		pos = element.position(),
10828		original = $.effects.scaledDimensions( element ),
10829		from = options.from || original,
10830		to = options.to || $.effects.scaledDimensions( element, 0 );
10831
10832	$.effects.createPlaceholder( element );
10833
10834	if ( mode === "show" ) {
10835		temp = from;
10836		from = to;
10837		to = temp;
10838	}
10839
10840	// Set scaling factor
10841	factor = {
10842		from: {
10843			y: from.height / original.height,
10844			x: from.width / original.width
10845		},
10846		to: {
10847			y: to.height / original.height,
10848			x: to.width / original.width
10849		}
10850	};
10851
10852	// Scale the css box
10853	if ( scale === "box" || scale === "both" ) {
10854
10855		// Vertical props scaling
10856		if ( factor.from.y !== factor.to.y ) {
10857			from = $.effects.setTransition( element, vProps, factor.from.y, from );
10858			to = $.effects.setTransition( element, vProps, factor.to.y, to );
10859		}
10860
10861		// Horizontal props scaling
10862		if ( factor.from.x !== factor.to.x ) {
10863			from = $.effects.setTransition( element, hProps, factor.from.x, from );
10864			to = $.effects.setTransition( element, hProps, factor.to.x, to );
10865		}
10866	}
10867
10868	// Scale the content
10869	if ( scale === "content" || scale === "both" ) {
10870
10871		// Vertical props scaling
10872		if ( factor.from.y !== factor.to.y ) {
10873			from = $.effects.setTransition( element, cProps, factor.from.y, from );
10874			to = $.effects.setTransition( element, cProps, factor.to.y, to );
10875		}
10876	}
10877
10878	// Adjust the position properties based on the provided origin points
10879	if ( origin ) {
10880		baseline = $.effects.getBaseline( origin, original );
10881		from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
10882		from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
10883		to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
10884		to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
10885	}
10886	delete from.outerHeight;
10887	delete from.outerWidth;
10888	element.css( from );
10889
10890	// Animate the children if desired
10891	if ( scale === "content" || scale === "both" ) {
10892
10893		vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
10894		hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
10895
10896		// Only animate children with width attributes specified
10897		// TODO: is this right? should we include anything with css width specified as well
10898		element.find( "*[width]" ).each( function() {
10899			var child = $( this ),
10900				childOriginal = $.effects.scaledDimensions( child ),
10901				childFrom = {
10902					height: childOriginal.height * factor.from.y,
10903					width: childOriginal.width * factor.from.x,
10904					outerHeight: childOriginal.outerHeight * factor.from.y,
10905					outerWidth: childOriginal.outerWidth * factor.from.x
10906				},
10907				childTo = {
10908					height: childOriginal.height * factor.to.y,
10909					width: childOriginal.width * factor.to.x,
10910					outerHeight: childOriginal.height * factor.to.y,
10911					outerWidth: childOriginal.width * factor.to.x
10912				};
10913
10914			// Vertical props scaling
10915			if ( factor.from.y !== factor.to.y ) {
10916				childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
10917				childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
10918			}
10919
10920			// Horizontal props scaling
10921			if ( factor.from.x !== factor.to.x ) {
10922				childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
10923				childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
10924			}
10925
10926			if ( restore ) {
10927				$.effects.saveStyle( child );
10928			}
10929
10930			// Animate children
10931			child.css( childFrom );
10932			child.animate( childTo, options.duration, options.easing, function() {
10933
10934				// Restore children
10935				if ( restore ) {
10936					$.effects.restoreStyle( child );
10937				}
10938			} );
10939		} );
10940	}
10941
10942	// Animate
10943	element.animate( to, {
10944		queue: false,
10945		duration: options.duration,
10946		easing: options.easing,
10947		complete: function() {
10948
10949			var offset = element.offset();
10950
10951			if ( to.opacity === 0 ) {
10952				element.css( "opacity", from.opacity );
10953			}
10954
10955			if ( !restore ) {
10956				element
10957					.css( "position", position === "static" ? "relative" : position )
10958					.offset( offset );
10959
10960				// Need to save style here so that automatic style restoration
10961				// doesn't restore to the original styles from before the animation.
10962				$.effects.saveStyle( element );
10963			}
10964
10965			done();
10966		}
10967	} );
10968
10969} );
10970
10971
10972/*!
10973 * jQuery UI Effects Scale 1.14.1
10974 * https://jqueryui.com
10975 *
10976 * Copyright OpenJS Foundation and other contributors
10977 * Released under the MIT license.
10978 * https://jquery.org/license
10979 */
10980
10981//>>label: Scale Effect
10982//>>group: Effects
10983//>>description: Grows or shrinks an element and its content.
10984//>>docs: https://api.jqueryui.com/scale-effect/
10985//>>demos: https://jqueryui.com/effect/
10986
10987
10988var effectsEffectScale = $.effects.define( "scale", function( options, done ) {
10989
10990	// Create element
10991	var el = $( this ),
10992		mode = options.mode,
10993		percent = parseInt( options.percent, 10 ) ||
10994			( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),
10995
10996		newOptions = $.extend( true, {
10997			from: $.effects.scaledDimensions( el ),
10998			to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
10999			origin: options.origin || [ "middle", "center" ]
11000		}, options );
11001
11002	// Fade option to support puff
11003	if ( options.fade ) {
11004		newOptions.from.opacity = 1;
11005		newOptions.to.opacity = 0;
11006	}
11007
11008	$.effects.effect.size.call( this, newOptions, done );
11009} );
11010
11011
11012/*!
11013 * jQuery UI Effects Puff 1.14.1
11014 * https://jqueryui.com
11015 *
11016 * Copyright OpenJS Foundation and other contributors
11017 * Released under the MIT license.
11018 * https://jquery.org/license
11019 */
11020
11021//>>label: Puff Effect
11022//>>group: Effects
11023//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
11024//>>docs: https://api.jqueryui.com/puff-effect/
11025//>>demos: https://jqueryui.com/effect/
11026
11027
11028var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) {
11029	var newOptions = $.extend( true, {}, options, {
11030		fade: true,
11031		percent: parseInt( options.percent, 10 ) || 150
11032	} );
11033
11034	$.effects.effect.scale.call( this, newOptions, done );
11035} );
11036
11037
11038/*!
11039 * jQuery UI Effects Pulsate 1.14.1
11040 * https://jqueryui.com
11041 *
11042 * Copyright OpenJS Foundation and other contributors
11043 * Released under the MIT license.
11044 * https://jquery.org/license
11045 */
11046
11047//>>label: Pulsate Effect
11048//>>group: Effects
11049//>>description: Pulsates an element n times by changing the opacity to zero and back.
11050//>>docs: https://api.jqueryui.com/pulsate-effect/
11051//>>demos: https://jqueryui.com/effect/
11052
11053
11054var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) {
11055	var element = $( this ),
11056		mode = options.mode,
11057		show = mode === "show",
11058		hide = mode === "hide",
11059		showhide = show || hide,
11060
11061		// Showing or hiding leaves off the "last" animation
11062		anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
11063		duration = options.duration / anims,
11064		animateTo = 0,
11065		i = 1,
11066		queuelen = element.queue().length;
11067
11068	if ( show || !element.is( ":visible" ) ) {
11069		element.css( "opacity", 0 ).show();
11070		animateTo = 1;
11071	}
11072
11073	// Anims - 1 opacity "toggles"
11074	for ( ; i < anims; i++ ) {
11075		element.animate( { opacity: animateTo }, duration, options.easing );
11076		animateTo = 1 - animateTo;
11077	}
11078
11079	element.animate( { opacity: animateTo }, duration, options.easing );
11080
11081	element.queue( done );
11082
11083	$.effects.unshift( element, queuelen, anims + 1 );
11084} );
11085
11086
11087/*!
11088 * jQuery UI Effects Shake 1.14.1
11089 * https://jqueryui.com
11090 *
11091 * Copyright OpenJS Foundation and other contributors
11092 * Released under the MIT license.
11093 * https://jquery.org/license
11094 */
11095
11096//>>label: Shake Effect
11097//>>group: Effects
11098//>>description: Shakes an element horizontally or vertically n times.
11099//>>docs: https://api.jqueryui.com/shake-effect/
11100//>>demos: https://jqueryui.com/effect/
11101
11102
11103var effectsEffectShake = $.effects.define( "shake", function( options, done ) {
11104
11105	var i = 1,
11106		element = $( this ),
11107		direction = options.direction || "left",
11108		distance = options.distance || 20,
11109		times = options.times || 3,
11110		anims = times * 2 + 1,
11111		speed = Math.round( options.duration / anims ),
11112		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
11113		positiveMotion = ( direction === "up" || direction === "left" ),
11114		animation = {},
11115		animation1 = {},
11116		animation2 = {},
11117
11118		queuelen = element.queue().length;
11119
11120	$.effects.createPlaceholder( element );
11121
11122	// Animation
11123	animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
11124	animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
11125	animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
11126
11127	// Animate
11128	element.animate( animation, speed, options.easing );
11129
11130	// Shakes
11131	for ( ; i < times; i++ ) {
11132		element
11133			.animate( animation1, speed, options.easing )
11134			.animate( animation2, speed, options.easing );
11135	}
11136
11137	element
11138		.animate( animation1, speed, options.easing )
11139		.animate( animation, speed / 2, options.easing )
11140		.queue( done );
11141
11142	$.effects.unshift( element, queuelen, anims + 1 );
11143} );
11144
11145
11146/*!
11147 * jQuery UI Effects Slide 1.14.1
11148 * https://jqueryui.com
11149 *
11150 * Copyright OpenJS Foundation and other contributors
11151 * Released under the MIT license.
11152 * https://jquery.org/license
11153 */
11154
11155//>>label: Slide Effect
11156//>>group: Effects
11157//>>description: Slides an element in and out of the viewport.
11158//>>docs: https://api.jqueryui.com/slide-effect/
11159//>>demos: https://jqueryui.com/effect/
11160
11161
11162var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) {
11163	var startClip, startRef,
11164		element = $( this ),
11165		map = {
11166			up: [ "bottom", "top" ],
11167			down: [ "top", "bottom" ],
11168			left: [ "right", "left" ],
11169			right: [ "left", "right" ]
11170		},
11171		mode = options.mode,
11172		direction = options.direction || "left",
11173		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
11174		positiveMotion = ( direction === "up" || direction === "left" ),
11175		distance = options.distance ||
11176			element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
11177		animation = {};
11178
11179	$.effects.createPlaceholder( element );
11180
11181	startClip = element.cssClip();
11182	startRef = element.position()[ ref ];
11183
11184	// Define hide animation
11185	animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
11186	animation.clip = element.cssClip();
11187	animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];
11188
11189	// Reverse the animation if we're showing
11190	if ( mode === "show" ) {
11191		element.cssClip( animation.clip );
11192		element.css( ref, animation[ ref ] );
11193		animation.clip = startClip;
11194		animation[ ref ] = startRef;
11195	}
11196
11197	// Actually animate
11198	element.animate( animation, {
11199		queue: false,
11200		duration: options.duration,
11201		easing: options.easing,
11202		complete: done
11203	} );
11204} );
11205
11206
11207/*!
11208 * jQuery UI Effects Transfer 1.14.1
11209 * https://jqueryui.com
11210 *
11211 * Copyright OpenJS Foundation and other contributors
11212 * Released under the MIT license.
11213 * https://jquery.org/license
11214 */
11215
11216//>>label: Transfer Effect
11217//>>group: Effects
11218//>>description: Displays a transfer effect from one element to another.
11219//>>docs: https://api.jqueryui.com/transfer-effect/
11220//>>demos: https://jqueryui.com/effect/
11221
11222
11223var effect;
11224if ( $.uiBackCompat === true ) {
11225	effect = $.effects.define( "transfer", function( options, done ) {
11226		$( this ).transfer( options, done );
11227	} );
11228}
11229var effectsEffectTransfer = effect;
11230
11231
11232/*!
11233 * jQuery UI Focusable 1.14.1
11234 * https://jqueryui.com
11235 *
11236 * Copyright OpenJS Foundation and other contributors
11237 * Released under the MIT license.
11238 * https://jquery.org/license
11239 */
11240
11241//>>label: :focusable Selector
11242//>>group: Core
11243//>>description: Selects elements which can be focused.
11244//>>docs: https://api.jqueryui.com/focusable-selector/
11245
11246
11247// Selectors
11248$.ui.focusable = function( element, hasTabindex ) {
11249	var map, mapName, img, focusableIfVisible, fieldset,
11250		nodeName = element.nodeName.toLowerCase();
11251
11252	if ( "area" === nodeName ) {
11253		map = element.parentNode;
11254		mapName = map.name;
11255		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
11256			return false;
11257		}
11258		img = $( "img[usemap='#" + mapName + "']" );
11259		return img.length > 0 && img.is( ":visible" );
11260	}
11261
11262	if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
11263		focusableIfVisible = !element.disabled;
11264
11265		if ( focusableIfVisible ) {
11266
11267			// Form controls within a disabled fieldset are disabled.
11268			// However, controls within the fieldset's legend do not get disabled.
11269			// Since controls generally aren't placed inside legends, we skip
11270			// this portion of the check.
11271			fieldset = $( element ).closest( "fieldset" )[ 0 ];
11272			if ( fieldset ) {
11273				focusableIfVisible = !fieldset.disabled;
11274			}
11275		}
11276	} else if ( "a" === nodeName ) {
11277		focusableIfVisible = element.href || hasTabindex;
11278	} else {
11279		focusableIfVisible = hasTabindex;
11280	}
11281
11282	return focusableIfVisible && $( element ).is( ":visible" ) &&
11283		$( element ).css( "visibility" ) === "visible";
11284};
11285
11286$.extend( $.expr.pseudos, {
11287	focusable: function( element ) {
11288		return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
11289	}
11290} );
11291
11292var focusable = $.ui.focusable;
11293
11294
11295/*!
11296 * jQuery UI Form Reset Mixin 1.14.1
11297 * https://jqueryui.com
11298 *
11299 * Copyright OpenJS Foundation and other contributors
11300 * Released under the MIT license.
11301 * https://jquery.org/license
11302 */
11303
11304//>>label: Form Reset Mixin
11305//>>group: Core
11306//>>description: Refresh input widgets when their form is reset
11307//>>docs: https://api.jqueryui.com/form-reset-mixin/
11308
11309
11310var formResetMixin = $.ui.formResetMixin = {
11311	_formResetHandler: function() {
11312		var form = $( this );
11313
11314		// Wait for the form reset to actually happen before refreshing
11315		setTimeout( function() {
11316			var instances = form.data( "ui-form-reset-instances" );
11317			$.each( instances, function() {
11318				this.refresh();
11319			} );
11320		} );
11321	},
11322
11323	_bindFormResetHandler: function() {
11324		this.form = $( this.element.prop( "form" ) );
11325		if ( !this.form.length ) {
11326			return;
11327		}
11328
11329		var instances = this.form.data( "ui-form-reset-instances" ) || [];
11330		if ( !instances.length ) {
11331
11332			// We don't use _on() here because we use a single event handler per form
11333			this.form.on( "reset.ui-form-reset", this._formResetHandler );
11334		}
11335		instances.push( this );
11336		this.form.data( "ui-form-reset-instances", instances );
11337	},
11338
11339	_unbindFormResetHandler: function() {
11340		if ( !this.form.length ) {
11341			return;
11342		}
11343
11344		var instances = this.form.data( "ui-form-reset-instances" );
11345		instances.splice( $.inArray( this, instances ), 1 );
11346		if ( instances.length ) {
11347			this.form.data( "ui-form-reset-instances", instances );
11348		} else {
11349			this.form
11350				.removeData( "ui-form-reset-instances" )
11351				.off( "reset.ui-form-reset" );
11352		}
11353	}
11354};
11355
11356
11357/*!
11358 * jQuery UI Legacy jQuery Core patches 1.14.1
11359 * https://jqueryui.com
11360 *
11361 * Copyright OpenJS Foundation and other contributors
11362 * Released under the MIT license.
11363 * https://jquery.org/license
11364 *
11365 */
11366
11367//>>label: Legacy jQuery Core patches
11368//>>group: Core
11369//>>description: Backport `.even()`, `.odd()` and `$.escapeSelector` to older jQuery Core versions (deprecated)
11370
11371
11372// Support: jQuery 2.2.x or older.
11373// This method has been defined in jQuery 3.0.0.
11374// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
11375if ( !$.escapeSelector ) {
11376	$.escapeSelector = function( id ) {
11377		return CSS.escape( id + "" );
11378	};
11379}
11380
11381// Support: jQuery 3.4.x or older
11382// These methods have been defined in jQuery 3.5.0.
11383if ( !$.fn.even || !$.fn.odd ) {
11384	$.fn.extend( {
11385		even: function() {
11386			return this.filter( function( i ) {
11387				return i % 2 === 0;
11388			} );
11389		},
11390		odd: function() {
11391			return this.filter( function( i ) {
11392				return i % 2 === 1;
11393			} );
11394		}
11395	} );
11396}
11397
11398;
11399/*!
11400 * jQuery UI Keycode 1.14.1
11401 * https://jqueryui.com
11402 *
11403 * Copyright OpenJS Foundation and other contributors
11404 * Released under the MIT license.
11405 * https://jquery.org/license
11406 */
11407
11408//>>label: Keycode
11409//>>group: Core
11410//>>description: Provide keycodes as keynames
11411//>>docs: https://api.jqueryui.com/jQuery.ui.keyCode/
11412
11413
11414var keycode = $.ui.keyCode = {
11415	BACKSPACE: 8,
11416	COMMA: 188,
11417	DELETE: 46,
11418	DOWN: 40,
11419	END: 35,
11420	ENTER: 13,
11421	ESCAPE: 27,
11422	HOME: 36,
11423	LEFT: 37,
11424	PAGE_DOWN: 34,
11425	PAGE_UP: 33,
11426	PERIOD: 190,
11427	RIGHT: 39,
11428	SPACE: 32,
11429	TAB: 9,
11430	UP: 38
11431};
11432
11433
11434/*!
11435 * jQuery UI Labels 1.14.1
11436 * https://jqueryui.com
11437 *
11438 * Copyright OpenJS Foundation and other contributors
11439 * Released under the MIT license.
11440 * https://jquery.org/license
11441 */
11442
11443//>>label: labels
11444//>>group: Core
11445//>>description: Find all the labels associated with a given input
11446//>>docs: https://api.jqueryui.com/labels/
11447
11448
11449var labels = $.fn.labels = function() {
11450	var ancestor, selector, id, labels, ancestors;
11451
11452	if ( !this.length ) {
11453		return this.pushStack( [] );
11454	}
11455
11456	// Check control.labels first
11457	if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
11458		return this.pushStack( this[ 0 ].labels );
11459	}
11460
11461	// If `control.labels` is empty - e.g. inside of document fragments - find
11462	// the labels manually
11463	labels = this.eq( 0 ).parents( "label" );
11464
11465	// Look for the label based on the id
11466	id = this.attr( "id" );
11467	if ( id ) {
11468
11469		// We don't search against the document in case the element
11470		// is disconnected from the DOM
11471		ancestor = this.eq( 0 ).parents().last();
11472
11473		// Get a full set of top level ancestors
11474		ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
11475
11476		// Create a selector for the label based on the id
11477		selector = "label[for='" + CSS.escape( id ) + "']";
11478
11479		labels = labels.add( ancestors.find( selector ).addBack( selector ) );
11480
11481	}
11482
11483	// Return whatever we have found for labels
11484	return this.pushStack( labels );
11485};
11486
11487
11488/*!
11489 * jQuery UI Scroll Parent 1.14.1
11490 * https://jqueryui.com
11491 *
11492 * Copyright OpenJS Foundation and other contributors
11493 * Released under the MIT license.
11494 * https://jquery.org/license
11495 */
11496
11497//>>label: scrollParent
11498//>>group: Core
11499//>>description: Get the closest ancestor element that is scrollable.
11500//>>docs: https://api.jqueryui.com/scrollParent/
11501
11502
11503var scrollParent = $.fn.scrollParent = function( includeHidden ) {
11504	var position = this.css( "position" ),
11505		excludeStaticParent = position === "absolute",
11506		overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
11507		scrollParent = this.parents().filter( function() {
11508			var parent = $( this );
11509			if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
11510				return false;
11511			}
11512			return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
11513				parent.css( "overflow-x" ) );
11514		} ).eq( 0 );
11515
11516	return position === "fixed" || !scrollParent.length ?
11517		$( this[ 0 ].ownerDocument || document ) :
11518		scrollParent;
11519};
11520
11521
11522/*!
11523 * jQuery UI Tabbable 1.14.1
11524 * https://jqueryui.com
11525 *
11526 * Copyright OpenJS Foundation and other contributors
11527 * Released under the MIT license.
11528 * https://jquery.org/license
11529 */
11530
11531//>>label: :tabbable Selector
11532//>>group: Core
11533//>>description: Selects elements which can be tabbed to.
11534//>>docs: https://api.jqueryui.com/tabbable-selector/
11535
11536
11537var tabbable = $.extend( $.expr.pseudos, {
11538	tabbable: function( element ) {
11539		var tabIndex = $.attr( element, "tabindex" ),
11540			hasTabindex = tabIndex != null;
11541		return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
11542	}
11543} );
11544
11545
11546/*!
11547 * jQuery UI Unique ID 1.14.1
11548 * https://jqueryui.com
11549 *
11550 * Copyright OpenJS Foundation and other contributors
11551 * Released under the MIT license.
11552 * https://jquery.org/license
11553 */
11554
11555//>>label: uniqueId
11556//>>group: Core
11557//>>description: Functions to generate and remove uniqueId's
11558//>>docs: https://api.jqueryui.com/uniqueId/
11559
11560
11561var uniqueId = $.fn.extend( {
11562	uniqueId: ( function() {
11563		var uuid = 0;
11564
11565		return function() {
11566			return this.each( function() {
11567				if ( !this.id ) {
11568					this.id = "ui-id-" + ( ++uuid );
11569				}
11570			} );
11571		};
11572	} )(),
11573
11574	removeUniqueId: function() {
11575		return this.each( function() {
11576			if ( /^ui-id-\d+$/.test( this.id ) ) {
11577				$( this ).removeAttr( "id" );
11578			}
11579		} );
11580	}
11581} );
11582
11583
11584/*!
11585 * jQuery UI Accordion 1.14.1
11586 * https://jqueryui.com
11587 *
11588 * Copyright OpenJS Foundation and other contributors
11589 * Released under the MIT license.
11590 * https://jquery.org/license
11591 */
11592
11593//>>label: Accordion
11594//>>group: Widgets
11595/* eslint-disable max-len */
11596//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
11597/* eslint-enable max-len */
11598//>>docs: https://api.jqueryui.com/accordion/
11599//>>demos: https://jqueryui.com/accordion/
11600//>>css.structure: ../../themes/base/core.css
11601//>>css.structure: ../../themes/base/accordion.css
11602//>>css.theme: ../../themes/base/theme.css
11603
11604
11605var widgetsAccordion = $.widget( "ui.accordion", {
11606	version: "1.14.1
vendor: 14,922 bytes, lines 11606-12187
11606",
11607	options: {
11608		active: 0,
11609		animate: {},
11610		classes: {
11611			"ui-accordion-header": "ui-corner-top",
11612			"ui-accordion-header-collapsed": "ui-corner-all",
11613			"ui-accordion-content": "ui-corner-bottom"
11614		},
11615		collapsible: false,
11616		event: "click",
11617		header: function( elem ) {
11618			return elem
11619				.find( "> li > :first-child" )
11620				.add(
11621					elem.find( "> :not(li)" )
11622
11623						// Support: jQuery <3.5 only
11624						// We could use `.even()` but that's unavailable in older jQuery.
11625						.filter( function( i ) {
11626							return i % 2 === 0;
11627						} )
11628				);
11629		},
11630		heightStyle: "auto",
11631		icons: {
11632			activeHeader: "ui-icon-triangle-1-s",
11633			header: "ui-icon-triangle-1-e"
11634		},
11635
11636		// Callbacks
11637		activate: null,
11638		beforeActivate: null
11639	},
11640
11641	hideProps: {
11642		borderTopWidth: "hide",
11643		borderBottomWidth: "hide",
11644		paddingTop: "hide",
11645		paddingBottom: "hide",
11646		height: "hide"
11647	},
11648
11649	showProps: {
11650		borderTopWidth: "show",
11651		borderBottomWidth: "show",
11652		paddingTop: "show",
11653		paddingBottom: "show",
11654		height: "show"
11655	},
11656
11657	_create: function() {
11658		var options = this.options;
11659
11660		this.prevShow = this.prevHide = $();
11661		this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
11662		this.element.attr( "role", "tablist" );
11663
11664		// Don't allow collapsible: false and active: false / null
11665		if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
11666			options.active = 0;
11667		}
11668
11669		this._processPanels();
11670
11671		// handle negative values
11672		if ( options.active < 0 ) {
11673			options.active += this.headers.length;
11674		}
11675		this._refresh();
11676	},
11677
11678	_getCreateEventData: function() {
11679		return {
11680			header: this.active,
11681			panel: !this.active.length ? $() : this.active.next()
11682		};
11683	},
11684
11685	_createIcons: function() {
11686		var icon, children,
11687			icons = this.options.icons;
11688
11689		if ( icons ) {
11690			icon = $( "<span>" );
11691			this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
11692			icon.prependTo( this.headers );
11693			children = this.active.children( ".ui-accordion-header-icon" );
11694			this._removeClass( children, icons.header )
11695				._addClass( children, null, icons.activeHeader )
11696				._addClass( this.headers, "ui-accordion-icons" );
11697		}
11698	},
11699
11700	_destroyIcons: function() {
11701		this._removeClass( this.headers, "ui-accordion-icons" );
11702		this.headers.children( ".ui-accordion-header-icon" ).remove();
11703	},
11704
11705	_destroy: function() {
11706		var contents;
11707
11708		// Clean up main element
11709		this.element.removeAttr( "role" );
11710
11711		// Clean up headers
11712		this.headers
11713			.removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
11714			.removeUniqueId();
11715
11716		this._destroyIcons();
11717
11718		// Clean up content panels
11719		contents = this.headers.next()
11720			.css( "display", "" )
11721			.removeAttr( "role aria-hidden aria-labelledby" )
11722			.removeUniqueId();
11723
11724		if ( this.options.heightStyle !== "content" ) {
11725			contents.css( "height", "" );
11726		}
11727	},
11728
11729	_setOption: function( key, value ) {
11730		if ( key === "active" ) {
11731
11732			// _activate() will handle invalid values and update this.options
11733			this._activate( value );
11734			return;
11735		}
11736
11737		if ( key === "event" ) {
11738			if ( this.options.event ) {
11739				this._off( this.headers, this.options.event );
11740			}
11741			this._setupEvents( value );
11742		}
11743
11744		this._super( key, value );
11745
11746		// Setting collapsible: false while collapsed; open first panel
11747		if ( key === "collapsible" && !value && this.options.active === false ) {
11748			this._activate( 0 );
11749		}
11750
11751		if ( key === "icons" ) {
11752			this._destroyIcons();
11753			if ( value ) {
11754				this._createIcons();
11755			}
11756		}
11757	},
11758
11759	_setOptionDisabled: function( value ) {
11760		this._super( value );
11761
11762		this.element.attr( "aria-disabled", value );
11763		this._toggleClass( null, "ui-state-disabled", !!value );
11764	},
11765
11766	_keydown: function( event ) {
11767		if ( event.altKey || event.ctrlKey ) {
11768			return;
11769		}
11770
11771		var keyCode = $.ui.keyCode,
11772			length = this.headers.length,
11773			currentIndex = this.headers.index( event.target ),
11774			toFocus = false;
11775
11776		switch ( event.keyCode ) {
11777		case keyCode.RIGHT:
11778		case keyCode.DOWN:
11779			toFocus = this.headers[ ( currentIndex + 1 ) % length ];
11780			break;
11781		case keyCode.LEFT:
11782		case keyCode.UP:
11783			toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
11784			break;
11785		case keyCode.SPACE:
11786		case keyCode.ENTER:
11787			this._eventHandler( event );
11788			break;
11789		case keyCode.HOME:
11790			toFocus = this.headers[ 0 ];
11791			break;
11792		case keyCode.END:
11793			toFocus = this.headers[ length - 1 ];
11794			break;
11795		}
11796
11797		if ( toFocus ) {
11798			$( event.target ).attr( "tabIndex", -1 );
11799			$( toFocus ).attr( "tabIndex", 0 );
11800			$( toFocus ).trigger( "focus" );
11801			event.preventDefault();
11802		}
11803	},
11804
11805	_panelKeyDown: function( event ) {
11806		if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
11807			$( event.currentTarget ).prev().trigger( "focus" );
11808		}
11809	},
11810
11811	refresh: function() {
11812		var options = this.options;
11813		this._processPanels();
11814
11815		// Was collapsed or no panel
11816		if ( ( options.active === false && options.collapsible === true ) ||
11817				!this.headers.length ) {
11818			options.active = false;
11819			this.active = $();
11820
11821		// active false only when collapsible is true
11822		} else if ( options.active === false ) {
11823			this._activate( 0 );
11824
11825		// was active, but active panel is gone
11826		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
11827
11828			// all remaining panel are disabled
11829			if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
11830				options.active = false;
11831				this.active = $();
11832
11833			// activate previous panel
11834			} else {
11835				this._activate( Math.max( 0, options.active - 1 ) );
11836			}
11837
11838		// was active, active panel still exists
11839		} else {
11840
11841			// make sure active index is correct
11842			options.active = this.headers.index( this.active );
11843		}
11844
11845		this._destroyIcons();
11846
11847		this._refresh();
11848	},
11849
11850	_processPanels: function() {
11851		var prevHeaders = this.headers,
11852			prevPanels = this.panels;
11853
11854		if ( typeof this.options.header === "function" ) {
11855			this.headers = this.options.header( this.element );
11856		} else {
11857			this.headers = this.element.find( this.options.header );
11858		}
11859		this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
11860			"ui-state-default" );
11861
11862		this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
11863		this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );
11864
11865		// Avoid memory leaks (#10056)
11866		if ( prevPanels ) {
11867			this._off( prevHeaders.not( this.headers ) );
11868			this._off( prevPanels.not( this.panels ) );
11869		}
11870	},
11871
11872	_refresh: function() {
11873		var maxHeight,
11874			options = this.options,
11875			heightStyle = options.heightStyle,
11876			parent = this.element.parent();
11877
11878		this.active = this._findActive( options.active );
11879		this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
11880			._removeClass( this.active, "ui-accordion-header-collapsed" );
11881		this._addClass( this.active.next(), "ui-accordion-content-active" );
11882		this.active.next().show();
11883
11884		this.headers
11885			.attr( "role", "tab" )
11886			.each( function() {
11887				var header = $( this ),
11888					headerId = header.uniqueId().attr( "id" ),
11889					panel = header.next(),
11890					panelId = panel.uniqueId().attr( "id" );
11891				header.attr( "aria-controls", panelId );
11892				panel.attr( "aria-labelledby", headerId );
11893			} )
11894			.next()
11895				.attr( "role", "tabpanel" );
11896
11897		this.headers
11898			.not( this.active )
11899				.attr( {
11900					"aria-selected": "false",
11901					"aria-expanded": "false",
11902					tabIndex: -1
11903				} )
11904				.next()
11905					.attr( {
11906						"aria-hidden": "true"
11907					} )
11908					.hide();
11909
11910		// Make sure at least one header is in the tab order
11911		if ( !this.active.length ) {
11912			this.headers.eq( 0 ).attr( "tabIndex", 0 );
11913		} else {
11914			this.active.attr( {
11915				"aria-selected": "true",
11916				"aria-expanded": "true",
11917				tabIndex: 0
11918			} )
11919				.next()
11920					.attr( {
11921						"aria-hidden": "false"
11922					} );
11923		}
11924
11925		this._createIcons();
11926
11927		this._setupEvents( options.event );
11928
11929		if ( heightStyle === "fill" ) {
11930			maxHeight = parent.height();
11931			this.element.siblings( ":visible" ).each( function() {
11932				var elem = $( this ),
11933					position = elem.css( "position" );
11934
11935				if ( position === "absolute" || position === "fixed" ) {
11936					return;
11937				}
11938				maxHeight -= elem.outerHeight( true );
11939			} );
11940
11941			this.headers.each( function() {
11942				maxHeight -= $( this ).outerHeight( true );
11943			} );
11944
11945			this.headers.next()
11946				.each( function() {
11947					$( this ).height( Math.max( 0, maxHeight -
11948						$( this ).innerHeight() + $( this ).height() ) );
11949				} )
11950				.css( "overflow", "auto" );
11951		} else if ( heightStyle === "auto" ) {
11952			maxHeight = 0;
11953			this.headers.next()
11954				.each( function() {
11955					var isVisible = $( this ).is( ":visible" );
11956					if ( !isVisible ) {
11957						$( this ).show();
11958					}
11959					maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
11960					if ( !isVisible ) {
11961						$( this ).hide();
11962					}
11963				} )
11964				.height( maxHeight );
11965		}
11966	},
11967
11968	_activate: function( index ) {
11969		var active = this._findActive( index )[ 0 ];
11970
11971		// Trying to activate the already active panel
11972		if ( active === this.active[ 0 ] ) {
11973			return;
11974		}
11975
11976		// Trying to collapse, simulate a click on the currently active header
11977		active = active || this.active[ 0 ];
11978
11979		this._eventHandler( {
11980			target: active,
11981			currentTarget: active,
11982			preventDefault: $.noop
11983		} );
11984	},
11985
11986	_findActive: function( selector ) {
11987		return typeof selector === "number" ? this.headers.eq( selector ) : $();
11988	},
11989
11990	_setupEvents: function( event ) {
11991		var events = {
11992			keydown: "_keydown"
11993		};
11994		if ( event ) {
11995			$.each( event.split( " " ), function( index, eventName ) {
11996				events[ eventName ] = "_eventHandler";
11997			} );
11998		}
11999
12000		this._off( this.headers.add( this.headers.next() ) );
12001		this._on( this.headers, events );
12002		this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
12003		this._hoverable( this.headers );
12004		this._focusable( this.headers );
12005	},
12006
12007	_eventHandler: function( event ) {
12008		var activeChildren, clickedChildren,
12009			options = this.options,
12010			active = this.active,
12011			clicked = $( event.currentTarget ),
12012			clickedIsActive = clicked[ 0 ] === active[ 0 ],
12013			collapsing = clickedIsActive && options.collapsible,
12014			toShow = collapsing ? $() : clicked.next(),
12015			toHide = active.next(),
12016			eventData = {
12017				oldHeader: active,
12018				oldPanel: toHide,
12019				newHeader: collapsing ? $() : clicked,
12020				newPanel: toShow
12021			};
12022
12023		event.preventDefault();
12024
12025		if (
12026
12027				// click on active header, but not collapsible
12028				( clickedIsActive && !options.collapsible ) ||
12029
12030				// allow canceling activation
12031				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
12032			return;
12033		}
12034
12035		options.active = collapsing ? false : this.headers.index( clicked );
12036
12037		// When the call to ._toggle() comes after the class changes
12038		// it causes a very odd bug in IE 8 (see #6720)
12039		this.active = clickedIsActive ? $() : clicked;
12040		this._toggle( eventData );
12041
12042		// Switch classes
12043		// corner classes on the previously active header stay after the animation
12044		this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
12045		if ( options.icons ) {
12046			activeChildren = active.children( ".ui-accordion-header-icon" );
12047			this._removeClass( activeChildren, null, options.icons.activeHeader )
12048				._addClass( activeChildren, null, options.icons.header );
12049		}
12050
12051		if ( !clickedIsActive ) {
12052			this._removeClass( clicked, "ui-accordion-header-collapsed" )
12053				._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
12054			if ( options.icons ) {
12055				clickedChildren = clicked.children( ".ui-accordion-header-icon" );
12056				this._removeClass( clickedChildren, null, options.icons.header )
12057					._addClass( clickedChildren, null, options.icons.activeHeader );
12058			}
12059
12060			this._addClass( clicked.next(), "ui-accordion-content-active" );
12061		}
12062	},
12063
12064	_toggle: function( data ) {
12065		var toShow = data.newPanel,
12066			toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
12067
12068		// Handle activating a panel during the animation for another activation
12069		this.prevShow.add( this.prevHide ).stop( true, true );
12070		this.prevShow = toShow;
12071		this.prevHide = toHide;
12072
12073		if ( this.options.animate ) {
12074			this._animate( toShow, toHide, data );
12075		} else {
12076			toHide.hide();
12077			toShow.show();
12078			this._toggleComplete( data );
12079		}
12080
12081		toHide.attr( {
12082			"aria-hidden": "true"
12083		} );
12084		toHide.prev().attr( {
12085			"aria-selected": "false",
12086			"aria-expanded": "false"
12087		} );
12088
12089		// if we're switching panels, remove the old header from the tab order
12090		// if we're opening from collapsed state, remove the previous header from the tab order
12091		// if we're collapsing, then keep the collapsing header in the tab order
12092		if ( toShow.length && toHide.length ) {
12093			toHide.prev().attr( {
12094				"tabIndex": -1,
12095				"aria-expanded": "false"
12096			} );
12097		} else if ( toShow.length ) {
12098			this.headers.filter( function() {
12099				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
12100			} )
12101				.attr( "tabIndex", -1 );
12102		}
12103
12104		toShow
12105			.attr( "aria-hidden", "false" )
12106			.prev()
12107				.attr( {
12108					"aria-selected": "true",
12109					"aria-expanded": "true",
12110					tabIndex: 0
12111				} );
12112	},
12113
12114	_animate: function( toShow, toHide, data ) {
12115		var total, easing, duration,
12116			that = this,
12117			adjust = 0,
12118			boxSizing = toShow.css( "box-sizing" ),
12119			down = toShow.length &&
12120				( !toHide.length || ( toShow.index() < toHide.index() ) ),
12121			animate = this.options.animate || {},
12122			options = down && animate.down || animate,
12123			complete = function() {
12124				that._toggleComplete( data );
12125			};
12126
12127		if ( typeof options === "number" ) {
12128			duration = options;
12129		}
12130		if ( typeof options === "string" ) {
12131			easing = options;
12132		}
12133
12134		// fall back from options to animation in case of partial down settings
12135		easing = easing || options.easing || animate.easing;
12136		duration = duration || options.duration || animate.duration;
12137
12138		if ( !toHide.length ) {
12139			return toShow.animate( this.showProps, duration, easing, complete );
12140		}
12141		if ( !toShow.length ) {
12142			return toHide.animate( this.hideProps, duration, easing, complete );
12143		}
12144
12145		total = toShow.show().outerHeight();
12146		toHide.animate( this.hideProps, {
12147			duration: duration,
12148			easing: easing,
12149			step: function( now, fx ) {
12150				fx.now = Math.round( now );
12151			}
12152		} );
12153		toShow
12154			.hide()
12155			.animate( this.showProps, {
12156				duration: duration,
12157				easing: easing,
12158				complete: complete,
12159				step: function( now, fx ) {
12160					fx.now = Math.round( now );
12161					if ( fx.prop !== "height" ) {
12162						if ( boxSizing === "content-box" ) {
12163							adjust += fx.now;
12164						}
12165					} else if ( that.options.heightStyle !== "content" ) {
12166						fx.now = Math.round( total - toHide.outerHeight() - adjust );
12167						adjust = 0;
12168					}
12169				}
12170			} );
12171	},
12172
12173	_toggleComplete: function( data ) {
12174		var toHide = data.oldPanel,
12175			prev = toHide.prev();
12176
12177		this._removeClass( toHide, "ui-accordion-content-active" );
12178		this._removeClass( prev, "ui-accordion-header-active" )
12179			._addClass( prev, "ui-accordion-header-collapsed" );
12180
12181		this._trigger( "activate", null, data );
12182	}
12183} );
12184
12185
12186/*!
12187 * jQuery UI Menu 1.14.
121871
12188 * https://jqueryui.com
12189 *
12190 * Copyright OpenJS Foundation and other contributors
12191 * Released under the MIT license.
12192 * https://jquery.org/license
12193 */
12194
12195//>>label: Menu
12196//>>group: Widgets
12197//>>description: Creates nestable menus.
12198//>>docs: https://api.jqueryui.com/menu/
12199//>>demos: https://jqueryui.com/menu/
12200//>>css.structure: ../../themes/base/core.css
12201//>>css.structure: ../../themes/base/menu.css
12202//>>css.theme: ../../themes/base/theme.css
12203
12204
12205var widgetsMenu = $.widget( "ui.menu", {
12206	version: "1.14.1
vendor: 2,644 bytes, lines 12206-12308
12206",
12207	defaultElement: "<ul>",
12208	delay: 300,
12209	options: {
12210		icons: {
12211			submenu: "ui-icon-caret-1-e"
12212		},
12213		items: "> *",
12214		menus: "ul",
12215		position: {
12216			my: "left top",
12217			at: "right top"
12218		},
12219		role: "menu",
12220
12221		// Callbacks
12222		blur: null,
12223		focus: null,
12224		select: null
12225	},
12226
12227	_create: function() {
12228		this.activeMenu = this.element;
12229
12230		// Flag used to prevent firing of the click handler
12231		// as the event bubbles up through nested menus
12232		this.mouseHandled = false;
12233		this.lastMousePosition = { x: null, y: null };
12234		this.element
12235			.uniqueId()
12236			.attr( {
12237				role: this.options.role,
12238				tabIndex: 0
12239			} );
12240
12241		this._addClass( "ui-menu", "ui-widget ui-widget-content" );
12242		this._on( {
12243
12244			// Prevent focus from sticking to links inside menu after clicking
12245			// them (focus should always stay on UL during navigation).
12246			"mousedown .ui-menu-item": function( event ) {
12247				event.preventDefault();
12248
12249				this._activateItem( event );
12250			},
12251			"click .ui-menu-item": function( event ) {
12252				var target = $( event.target );
12253				var active = $( this.document[ 0 ].activeElement );
12254				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
12255					this.select( event );
12256
12257					// Only set the mouseHandled flag if the event will bubble, see #9469.
12258					if ( !event.isPropagationStopped() ) {
12259						this.mouseHandled = true;
12260					}
12261
12262					// Open submenu on click
12263					if ( target.has( ".ui-menu" ).length ) {
12264						this.expand( event );
12265					} else if ( !this.element.is( ":focus" ) &&
12266							active.closest( ".ui-menu" ).length ) {
12267
12268						// Redirect focus to the menu
12269						this.element.trigger( "focus", [ true ] );
12270
12271						// If the active item is on the top level, let it stay active.
12272						// Otherwise, blur the active item since it is no longer visible.
12273						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
12274							clearTimeout( this.timer );
12275						}
12276					}
12277				}
12278			},
12279			"mouseenter .ui-menu-item": "_activateItem",
12280			"mousemove .ui-menu-item": "_activateItem",
12281			mouseleave: "collapseAll",
12282			"mouseleave .ui-menu": "collapseAll",
12283			focus: function( event, keepActiveItem ) {
12284
12285				// If there's already an active item, keep it active
12286				// If not, activate the first item
12287				var item = this.active || this._menuItems().first();
12288
12289				if ( !keepActiveItem ) {
12290					this.focus( event, item );
12291				}
12292			},
12293			blur: function( event ) {
12294				this._delay( function() {
12295					var notContained = !$.contains(
12296						this.element[ 0 ],
12297						this.document[ 0 ].activeElement
12298					);
12299					if ( notContained ) {
12300						this.collapseAll( event );
12301					}
12302				} );
12303			},
12304			keydown: "_keydown"
12305		} );
12306
12307		this.refresh();
12308
vendor: 3,056 bytes, lines 12309-12425
12309		// Clicks outside of a menu collapse any open menus
12310		this._on( this.document, {
12311			click: function( event ) {
12312				if ( this._closeOnDocumentClick( event ) ) {
12313					this.collapseAll( event, true );
12314				}
12315
12316				// Reset the mouseHandled flag
12317				this.mouseHandled = false;
12318			}
12319		} );
12320	},
12321
12322	_activateItem: function( event ) {
12323
12324		// Ignore mouse events while typeahead is active, see #10458.
12325		// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
12326		// is over an item in the menu
12327		if ( this.previousFilter ) {
12328			return;
12329		}
12330
12331		// If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
12332		if ( event.clientX === this.lastMousePosition.x &&
12333				event.clientY === this.lastMousePosition.y ) {
12334			return;
12335		}
12336
12337		this.lastMousePosition = {
12338			x: event.clientX,
12339			y: event.clientY
12340		};
12341
12342		var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
12343			target = $( event.currentTarget );
12344
12345		// Ignore bubbled events on parent items, see #11641
12346		if ( actualTarget[ 0 ] !== target[ 0 ] ) {
12347			return;
12348		}
12349
12350		// If the item is already active, there's nothing to do
12351		if ( target.is( ".ui-state-active" ) ) {
12352			return;
12353		}
12354
12355		// Remove ui-state-active class from siblings of the newly focused menu item
12356		// to avoid a jump caused by adjacent elements both having a class with a border
12357		this._removeClass( target.siblings().children( ".ui-state-active" ),
12358			null, "ui-state-active" );
12359		this.focus( event, target );
12360	},
12361
12362	_destroy: function() {
12363		var items = this.element.find( ".ui-menu-item" )
12364				.removeAttr( "role aria-disabled" ),
12365			submenus = items.children( ".ui-menu-item-wrapper" )
12366				.removeUniqueId()
12367				.removeAttr( "tabIndex role aria-haspopup" );
12368
12369		// Destroy (sub)menus
12370		this.element
12371			.removeAttr( "aria-activedescendant" )
12372			.find( ".ui-menu" ).addBack()
12373				.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
12374					"tabIndex" )
12375				.removeUniqueId()
12376				.show();
12377
12378		submenus.children().each( function() {
12379			var elem = $( this );
12380			if ( elem.data( "ui-menu-submenu-caret" ) ) {
12381				elem.remove();
12382			}
12383		} );
12384	},
12385
12386	_keydown: function( event ) {
12387		var match, prev, character, skip,
12388			preventDefault = true;
12389
12390		switch ( event.keyCode ) {
12391		case $.ui.keyCode.PAGE_UP:
12392			this.previousPage( event );
12393			break;
12394		case $.ui.keyCode.PAGE_DOWN:
12395			this.nextPage( event );
12396			break;
12397		case $.ui.keyCode.HOME:
12398			this._move( "first", "first", event );
12399			break;
12400		case $.ui.keyCode.END:
12401			this._move( "last", "last", event );
12402			break;
12403		case $.ui.keyCode.UP:
12404			this.previous( event );
12405			break;
12406		case $.ui.keyCode.DOWN:
12407			this.next( event );
12408			break;
12409		case $.ui.keyCode.LEFT:
12410			this.collapse( event );
12411			break;
12412		case $.ui.keyCode.RIGHT:
12413			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
12414				this.expand( event );
12415			}
12416			break;
12417		case $.ui.keyCode.ENTER:
12418		case $.ui.keyCode.SPACE:
12419			this._activate( event );
12420			break;
12421		case $.ui.keyCode.ESCAPE:
12422			this.collapse( event );
12423			break;
12424		default:
12425			preventDefault = false;
vendor: 6,930 bytes, lines 12426-12674
12426			prev = this.previousFilter || "";
12427			skip = false;
12428
12429			// Support number pad values
12430			character = event.keyCode >= 96 && event.keyCode <= 105 ?
12431				( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
12432
12433			clearTimeout( this.filterTimer );
12434
12435			if ( character === prev ) {
12436				skip = true;
12437			} else {
12438				character = prev + character;
12439			}
12440
12441			match = this._filterMenuItems( character );
12442			match = skip && match.index( this.active.next() ) !== -1 ?
12443				this.active.nextAll( ".ui-menu-item" ) :
12444				match;
12445
12446			// If no matches on the current filter, reset to the last character pressed
12447			// to move down the menu to the first item that starts with that character
12448			if ( !match.length ) {
12449				character = String.fromCharCode( event.keyCode );
12450				match = this._filterMenuItems( character );
12451			}
12452
12453			if ( match.length ) {
12454				this.focus( event, match );
12455				this.previousFilter = character;
12456				this.filterTimer = this._delay( function() {
12457					delete this.previousFilter;
12458				}, 1000 );
12459			} else {
12460				delete this.previousFilter;
12461			}
12462		}
12463
12464		if ( preventDefault ) {
12465			event.preventDefault();
12466		}
12467	},
12468
12469	_activate: function( event ) {
12470		if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
12471			if ( this.active.children( "[aria-haspopup='true']" ).length ) {
12472				this.expand( event );
12473			} else {
12474				this.select( event );
12475			}
12476		}
12477	},
12478
12479	refresh: function() {
12480		var menus, items, newSubmenus, newItems, newWrappers,
12481			that = this,
12482			icon = this.options.icons.submenu,
12483			submenus = this.element.find( this.options.menus );
12484
12485		this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
12486
12487		// Initialize nested menus
12488		newSubmenus = submenus.filter( ":not(.ui-menu)" )
12489			.hide()
12490			.attr( {
12491				role: this.options.role,
12492				"aria-hidden": "true",
12493				"aria-expanded": "false"
12494			} )
12495			.each( function() {
12496				var menu = $( this ),
12497					item = menu.prev(),
12498					submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
12499
12500				that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
12501				item
12502					.attr( "aria-haspopup", "true" )
12503					.prepend( submenuCaret );
12504				menu.attr( "aria-labelledby", item.attr( "id" ) );
12505			} );
12506
12507		this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
12508
12509		menus = submenus.add( this.element );
12510		items = menus.find( this.options.items );
12511
12512		// Initialize menu-items containing spaces and/or dashes only as dividers
12513		items.not( ".ui-menu-item" ).each( function() {
12514			var item = $( this );
12515			if ( that._isDivider( item ) ) {
12516				that._addClass( item, "ui-menu-divider", "ui-widget-content" );
12517			}
12518		} );
12519
12520		// Don't refresh list items that are already adapted
12521		newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
12522		newWrappers = newItems.children()
12523			.not( ".ui-menu" )
12524				.uniqueId()
12525				.attr( {
12526					tabIndex: -1,
12527					role: this._itemRole()
12528				} );
12529		this._addClass( newItems, "ui-menu-item" )
12530			._addClass( newWrappers, "ui-menu-item-wrapper" );
12531
12532		// Add aria-disabled attribute to any disabled menu item
12533		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
12534
12535		// If the active item has been removed, blur the menu
12536		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
12537			this.blur();
12538		}
12539	},
12540
12541	_itemRole: function() {
12542		return {
12543			menu: "menuitem",
12544			listbox: "option"
12545		}[ this.options.role ];
12546	},
12547
12548	_setOption: function( key, value ) {
12549		if ( key === "icons" ) {
12550			var icons = this.element.find( ".ui-menu-icon" );
12551			this._removeClass( icons, null, this.options.icons.submenu )
12552				._addClass( icons, null, value.submenu );
12553		}
12554		this._super( key, value );
12555	},
12556
12557	_setOptionDisabled: function( value ) {
12558		this._super( value );
12559
12560		this.element.attr( "aria-disabled", String( value ) );
12561		this._toggleClass( null, "ui-state-disabled", !!value );
12562	},
12563
12564	focus: function( event, item ) {
12565		var nested, focused, activeParent;
12566		this.blur( event, event && event.type === "focus" );
12567
12568		this._scrollIntoView( item );
12569
12570		this.active = item.first();
12571
12572		focused = this.active.children( ".ui-menu-item-wrapper" );
12573		this._addClass( focused, null, "ui-state-active" );
12574
12575		// Only update aria-activedescendant if there's a role
12576		// otherwise we assume focus is managed elsewhere
12577		if ( this.options.role ) {
12578			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
12579		}
12580
12581		// Highlight active parent menu item, if any
12582		activeParent = this.active
12583			.parent()
12584				.closest( ".ui-menu-item" )
12585					.children( ".ui-menu-item-wrapper" );
12586		this._addClass( activeParent, null, "ui-state-active" );
12587
12588		if ( event && event.type === "keydown" ) {
12589			this._close();
12590		} else {
12591			this.timer = this._delay( function() {
12592				this._close();
12593			}, this.delay );
12594		}
12595
12596		nested = item.children( ".ui-menu" );
12597		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
12598			this._startOpening( nested );
12599		}
12600		this.activeMenu = item.parent();
12601
12602		this._trigger( "focus", event, { item: item } );
12603	},
12604
12605	_scrollIntoView: function( item ) {
12606		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
12607		if ( this._hasScroll() ) {
12608			borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
12609			paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
12610			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
12611			scroll = this.activeMenu.scrollTop();
12612			elementHeight = this.activeMenu.height();
12613			itemHeight = item.outerHeight();
12614
12615			if ( offset < 0 ) {
12616				this.activeMenu.scrollTop( scroll + offset );
12617			} else if ( offset + itemHeight > elementHeight ) {
12618				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
12619			}
12620		}
12621	},
12622
12623	blur: function( event, fromFocus ) {
12624		if ( !fromFocus ) {
12625			clearTimeout( this.timer );
12626		}
12627
12628		if ( !this.active ) {
12629			return;
12630		}
12631
12632		this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
12633			null, "ui-state-active" );
12634
12635		this._trigger( "blur", event, { item: this.active } );
12636		this.active = null;
12637	},
12638
12639	_startOpening: function( submenu ) {
12640		clearTimeout( this.timer );
12641
12642		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
12643		// shift in the submenu position when mousing over the caret icon
12644		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
12645			return;
12646		}
12647
12648		this.timer = this._delay( function() {
12649			this._close();
12650			this._open( submenu );
12651		}, this.delay );
12652	},
12653
12654	_open: function( submenu ) {
12655		var position = $.extend( {
12656			of: this.active
12657		}, this.options.position );
12658
12659		clearTimeout( this.timer );
12660		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
12661			.hide()
12662			.attr( "aria-hidden", "true" );
12663
12664		submenu
12665			.show()
12666			.removeAttr( "aria-hidden" )
12667			.attr( "aria-expanded", "true" )
12668			.position( position );
12669	},
12670
12671	collapseAll: function( event, all ) {
12672		clearTimeout( this.timer );
12673		this.timer = this._delay( function() {
12674
vendor: 5,432 bytes, lines 12675-12878
12675			// If we were passed an event, look for the submenu that contains the event
12676			var currentMenu = all ? this.element :
12677				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
12678
12679			// If we found no valid submenu ancestor, use the main menu to close all
12680			// sub menus anyway
12681			if ( !currentMenu.length ) {
12682				currentMenu = this.element;
12683			}
12684
12685			this._close( currentMenu );
12686
12687			this.blur( event );
12688
12689			// Work around active item staying active after menu is blurred
12690			this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
12691
12692			this.activeMenu = currentMenu;
12693		}, all ? 0 : this.delay );
12694	},
12695
12696	// With no arguments, closes the currently active menu - if nothing is active
12697	// it closes all menus.  If passed an argument, it will search for menus BELOW
12698	_close: function( startMenu ) {
12699		if ( !startMenu ) {
12700			startMenu = this.active ? this.active.parent() : this.element;
12701		}
12702
12703		startMenu.find( ".ui-menu" )
12704			.hide()
12705			.attr( "aria-hidden", "true" )
12706			.attr( "aria-expanded", "false" );
12707	},
12708
12709	_closeOnDocumentClick: function( event ) {
12710		return !$( event.target ).closest( ".ui-menu" ).length;
12711	},
12712
12713	_isDivider: function( item ) {
12714
12715		// Match hyphen, em dash, en dash
12716		return !/[^\-\u2014\u2013\s]/.test( item.text() );
12717	},
12718
12719	collapse: function( event ) {
12720		var newItem = this.active &&
12721			this.active.parent().closest( ".ui-menu-item", this.element );
12722		if ( newItem && newItem.length ) {
12723			this._close();
12724			this.focus( event, newItem );
12725		}
12726	},
12727
12728	expand: function( event ) {
12729		var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first();
12730
12731		if ( newItem && newItem.length ) {
12732			this._open( newItem.parent() );
12733
12734			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
12735			this._delay( function() {
12736				this.focus( event, newItem );
12737			} );
12738		}
12739	},
12740
12741	next: function( event ) {
12742		this._move( "next", "first", event );
12743	},
12744
12745	previous: function( event ) {
12746		this._move( "prev", "last", event );
12747	},
12748
12749	isFirstItem: function() {
12750		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
12751	},
12752
12753	isLastItem: function() {
12754		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
12755	},
12756
12757	_menuItems: function( menu ) {
12758		return ( menu || this.element )
12759			.find( this.options.items )
12760			.filter( ".ui-menu-item" );
12761	},
12762
12763	_move: function( direction, filter, event ) {
12764		var next;
12765		if ( this.active ) {
12766			if ( direction === "first" || direction === "last" ) {
12767				next = this.active
12768					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
12769					.last();
12770			} else {
12771				next = this.active
12772					[ direction + "All" ]( ".ui-menu-item" )
12773					.first();
12774			}
12775		}
12776		if ( !next || !next.length || !this.active ) {
12777			next = this._menuItems( this.activeMenu )[ filter ]();
12778		}
12779
12780		this.focus( event, next );
12781	},
12782
12783	nextPage: function( event ) {
12784		var item, base, height;
12785
12786		if ( !this.active ) {
12787			this.next( event );
12788			return;
12789		}
12790		if ( this.isLastItem() ) {
12791			return;
12792		}
12793		if ( this._hasScroll() ) {
12794			base = this.active.offset().top;
12795			height = this.element.innerHeight();
12796
12797			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
12798			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
12799				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
12800			}
12801
12802			this.active.nextAll( ".ui-menu-item" ).each( function() {
12803				item = $( this );
12804				return item.offset().top - base - height < 0;
12805			} );
12806
12807			this.focus( event, item );
12808		} else {
12809			this.focus( event, this._menuItems( this.activeMenu )
12810				[ !this.active ? "first" : "last" ]() );
12811		}
12812	},
12813
12814	previousPage: function( event ) {
12815		var item, base, height;
12816		if ( !this.active ) {
12817			this.next( event );
12818			return;
12819		}
12820		if ( this.isFirstItem() ) {
12821			return;
12822		}
12823		if ( this._hasScroll() ) {
12824			base = this.active.offset().top;
12825			height = this.element.innerHeight();
12826
12827			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
12828			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
12829				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
12830			}
12831
12832			this.active.prevAll( ".ui-menu-item" ).each( function() {
12833				item = $( this );
12834				return item.offset().top - base + height > 0;
12835			} );
12836
12837			this.focus( event, item );
12838		} else {
12839			this.focus( event, this._menuItems( this.activeMenu ).first() );
12840		}
12841	},
12842
12843	_hasScroll: function() {
12844		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
12845	},
12846
12847	select: function( event ) {
12848
12849		// TODO: It should never be possible to not have an active item at this
12850		// point, but the tests don't trigger mouseenter before click.
12851		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
12852		var ui = { item: this.active };
12853		if ( !this.active.has( ".ui-menu" ).length ) {
12854			this.collapseAll( event, true );
12855		}
12856		this._trigger( "select", event, ui );
12857	},
12858
12859	_filterMenuItems: function( character ) {
12860		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
12861			regex = new RegExp( "^" + escapedCharacter, "i" );
12862
12863		return this.activeMenu
12864			.find( this.options.items )
12865
12866				// Only match on items, not dividers or other content (#10571)
12867				.filter( ".ui-menu-item" )
12868					.filter( function() {
12869						return regex.test(
12870							String.prototype.trim.call(
12871								$( this ).children( ".ui-menu-item-wrapper" ).text() ) );
12872					} );
12873	}
12874} );
12875
12876
12877/*!
12878 * jQuery UI Autocomplete 1.1
128784.1
12879 * https://jqueryui.com
12880 *
12881 * Copyright OpenJS Foundation and other contributors
12882 * Released under the MIT license.
12883 * https://jquery.org/license
12884 */
12885
12886//>>label: Autocomplete
12887//>>group: Widgets
12888//>>description: Lists suggested words as the user is typing.
12889//>>docs: https://api.jqueryui.com/autocomplete/
12890//>>demos: https://jqueryui.com/autocomplete/
12891//>>css.structure: ../../themes/base/core.css
12892//>>css.structure: ../../themes/base/autocomplete.css
12893//>>css.theme: ../../themes/base/theme.css
12894
12895
12896$.widget( "ui.autocomplete", {
12897	version: "1.14.1
vendor: 15,301 bytes, lines 12897-13497
12897",
12898	defaultElement: "<input>",
12899	options: {
12900		appendTo: null,
12901		autoFocus: false,
12902		delay: 300,
12903		minLength: 1,
12904		position: {
12905			my: "left top",
12906			at: "left bottom",
12907			collision: "none"
12908		},
12909		source: null,
12910
12911		// Callbacks
12912		change: null,
12913		close: null,
12914		focus: null,
12915		open: null,
12916		response: null,
12917		search: null,
12918		select: null
12919	},
12920
12921	requestIndex: 0,
12922	pending: 0,
12923	liveRegionTimer: null,
12924
12925	_create: function() {
12926
12927		// Some browsers only repeat keydown events, not keypress events,
12928		// so we use the suppressKeyPress flag to determine if we've already
12929		// handled the keydown event. #7269
12930		// Unfortunately the code for & in keypress is the same as the up arrow,
12931		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
12932		// events when we know the keydown event was used to modify the
12933		// search term. #7799
12934		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
12935			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
12936			isTextarea = nodeName === "textarea",
12937			isInput = nodeName === "input";
12938
12939		// Textareas are always multi-line
12940		// Inputs are always single-line, even if inside a contentEditable element
12941		// All other element types are determined by whether they're contentEditable
12942		this.isMultiLine = isTextarea ||
12943			!isInput && this.element.prop( "contentEditable" ) === "true";
12944
12945		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
12946		this.isNewMenu = true;
12947
12948		this._addClass( "ui-autocomplete-input" );
12949		this.element.attr( "autocomplete", "off" );
12950
12951		this._on( this.element, {
12952			keydown: function( event ) {
12953				if ( this.element.prop( "readOnly" ) ) {
12954					suppressKeyPress = true;
12955					suppressInput = true;
12956					suppressKeyPressRepeat = true;
12957					return;
12958				}
12959
12960				suppressKeyPress = false;
12961				suppressInput = false;
12962				suppressKeyPressRepeat = false;
12963				var keyCode = $.ui.keyCode;
12964				switch ( event.keyCode ) {
12965				case keyCode.PAGE_UP:
12966					suppressKeyPress = true;
12967					this._move( "previousPage", event );
12968					break;
12969				case keyCode.PAGE_DOWN:
12970					suppressKeyPress = true;
12971					this._move( "nextPage", event );
12972					break;
12973				case keyCode.UP:
12974					suppressKeyPress = true;
12975					this._keyEvent( "previous", event );
12976					break;
12977				case keyCode.DOWN:
12978					suppressKeyPress = true;
12979					this._keyEvent( "next", event );
12980					break;
12981				case keyCode.ENTER:
12982
12983					// when menu is open and has focus
12984					if ( this.menu.active ) {
12985
12986						// #6055 - Opera still allows the keypress to occur
12987						// which causes forms to submit
12988						suppressKeyPress = true;
12989						event.preventDefault();
12990						this.menu.select( event );
12991					}
12992					break;
12993				case keyCode.TAB:
12994					if ( this.menu.active ) {
12995						this.menu.select( event );
12996					}
12997					break;
12998				case keyCode.ESCAPE:
12999					if ( this.menu.element.is( ":visible" ) ) {
13000						if ( !this.isMultiLine ) {
13001							this._value( this.term );
13002						}
13003						this.close( event );
13004
13005						// Different browsers have different default behavior for escape
13006						// Single press can mean undo or clear
13007						event.preventDefault();
13008					}
13009					break;
13010				default:
13011					suppressKeyPressRepeat = true;
13012
13013					// search timeout should be triggered before the input value is changed
13014					this._searchTimeout( event );
13015					break;
13016				}
13017			},
13018			keypress: function( event ) {
13019				if ( suppressKeyPress ) {
13020					suppressKeyPress = false;
13021					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
13022						event.preventDefault();
13023					}
13024					return;
13025				}
13026				if ( suppressKeyPressRepeat ) {
13027					return;
13028				}
13029
13030				// Replicate some key handlers to allow them to repeat in Firefox and Opera
13031				var keyCode = $.ui.keyCode;
13032				switch ( event.keyCode ) {
13033				case keyCode.PAGE_UP:
13034					this._move( "previousPage", event );
13035					break;
13036				case keyCode.PAGE_DOWN:
13037					this._move( "nextPage", event );
13038					break;
13039				case keyCode.UP:
13040					this._keyEvent( "previous", event );
13041					break;
13042				case keyCode.DOWN:
13043					this._keyEvent( "next", event );
13044					break;
13045				}
13046			},
13047			input: function( event ) {
13048				if ( suppressInput ) {
13049					suppressInput = false;
13050					event.preventDefault();
13051					return;
13052				}
13053				this._searchTimeout( event );
13054			},
13055			focus: function() {
13056				this.selectedItem = null;
13057				this.previous = this._value();
13058			},
13059			blur: function( event ) {
13060				clearTimeout( this.searching );
13061				this.close( event );
13062				this._change( event );
13063			}
13064		} );
13065
13066		this._initSource();
13067		this.menu = $( "<ul>" )
13068			.appendTo( this._appendTo() )
13069			.menu( {
13070
13071				// disable ARIA support, the live region takes care of that
13072				role: null
13073			} )
13074			.hide()
13075			.menu( "instance" );
13076
13077		this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
13078		this._on( this.menu.element, {
13079			mousedown: function( event ) {
13080
13081				// Prevent moving focus out of the text field
13082				event.preventDefault();
13083			},
13084			menufocus: function( event, ui ) {
13085				var label, item;
13086
13087				// Support: Firefox
13088				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
13089				if ( this.isNewMenu ) {
13090					this.isNewMenu = false;
13091					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
13092						this.menu.blur();
13093
13094						this.document.one( "mousemove", function() {
13095							$( event.target ).trigger( event.originalEvent );
13096						} );
13097
13098						return;
13099					}
13100				}
13101
13102				item = ui.item.data( "ui-autocomplete-item" );
13103				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
13104
13105					// use value to match what will end up in the input, if it was a key event
13106					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
13107						this._value( item.value );
13108					}
13109				}
13110
13111				// Announce the value in the liveRegion
13112				label = ui.item.attr( "aria-label" ) || item.value;
13113				if ( label && String.prototype.trim.call( label ).length ) {
13114					clearTimeout( this.liveRegionTimer );
13115					this.liveRegionTimer = this._delay( function() {
13116						this.liveRegion.html( $( "<div>" ).text( label ) );
13117					}, 100 );
13118				}
13119			},
13120			menuselect: function( event, ui ) {
13121				var item = ui.item.data( "ui-autocomplete-item" ),
13122					previous = this.previous;
13123
13124				// Only trigger when focus was lost (click on menu)
13125				if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
13126					this.element.trigger( "focus" );
13127					this.previous = previous;
13128				}
13129
13130				if ( false !== this._trigger( "select", event, { item: item } ) ) {
13131					this._value( item.value );
13132				}
13133
13134				// reset the term after the select event
13135				// this allows custom select handling to work properly
13136				this.term = this._value();
13137
13138				this.close( event );
13139				this.selectedItem = item;
13140			}
13141		} );
13142
13143		this.liveRegion = $( "<div>", {
13144			role: "status",
13145			"aria-live": "assertive",
13146			"aria-relevant": "additions"
13147		} )
13148			.appendTo( this.document[ 0 ].body );
13149
13150		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
13151
13152		// Turning off autocomplete prevents the browser from remembering the
13153		// value when navigating through history, so we re-enable autocomplete
13154		// if the page is unloaded before the widget is destroyed. #7790
13155		this._on( this.window, {
13156			beforeunload: function() {
13157				this.element.removeAttr( "autocomplete" );
13158			}
13159		} );
13160	},
13161
13162	_destroy: function() {
13163		clearTimeout( this.searching );
13164		this.element.removeAttr( "autocomplete" );
13165		this.menu.element.remove();
13166		this.liveRegion.remove();
13167	},
13168
13169	_setOption: function( key, value ) {
13170		this._super( key, value );
13171		if ( key === "source" ) {
13172			this._initSource();
13173		}
13174		if ( key === "appendTo" ) {
13175			this.menu.element.appendTo( this._appendTo() );
13176		}
13177		if ( key === "disabled" && value && this.xhr ) {
13178			this.xhr.abort();
13179		}
13180	},
13181
13182	_isEventTargetInWidget: function( event ) {
13183		var menuElement = this.menu.element[ 0 ];
13184
13185		return event.target === this.element[ 0 ] ||
13186			event.target === menuElement ||
13187			$.contains( menuElement, event.target );
13188	},
13189
13190	_closeOnClickOutside: function( event ) {
13191		if ( !this._isEventTargetInWidget( event ) ) {
13192			this.close();
13193		}
13194	},
13195
13196	_appendTo: function() {
13197		var element = this.options.appendTo;
13198
13199		if ( element ) {
13200			element = element.jquery || element.nodeType ?
13201				$( element ) :
13202				this.document.find( element ).eq( 0 );
13203		}
13204
13205		if ( !element || !element[ 0 ] ) {
13206			element = this.element.closest( ".ui-front, dialog" );
13207		}
13208
13209		if ( !element.length ) {
13210			element = this.document[ 0 ].body;
13211		}
13212
13213		return element;
13214	},
13215
13216	_initSource: function() {
13217		var array, url,
13218			that = this;
13219		if ( Array.isArray( this.options.source ) ) {
13220			array = this.options.source;
13221			this.source = function( request, response ) {
13222				response( $.ui.autocomplete.filter( array, request.term ) );
13223			};
13224		} else if ( typeof this.options.source === "string" ) {
13225			url = this.options.source;
13226			this.source = function( request, response ) {
13227				if ( that.xhr ) {
13228					that.xhr.abort();
13229				}
13230				that.xhr = $.ajax( {
13231					url: url,
13232					data: request,
13233					dataType: "json",
13234					success: function( data ) {
13235						response( data );
13236					},
13237					error: function() {
13238						response( [] );
13239					}
13240				} );
13241			};
13242		} else {
13243			this.source = this.options.source;
13244		}
13245	},
13246
13247	_searchTimeout: function( event ) {
13248		clearTimeout( this.searching );
13249		this.searching = this._delay( function() {
13250
13251			// Search if the value has changed, or if the user retypes the same value (see #7434)
13252			var equalValues = this.term === this._value(),
13253				menuVisible = this.menu.element.is( ":visible" ),
13254				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
13255
13256			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
13257				this.selectedItem = null;
13258				this.search( null, event );
13259			}
13260		}, this.options.delay );
13261	},
13262
13263	search: function( value, event ) {
13264		value = value != null ? value : this._value();
13265
13266		// Always save the actual value, not the one passed as an argument
13267		this.term = this._value();
13268
13269		if ( value.length < this.options.minLength ) {
13270			return this.close( event );
13271		}
13272
13273		if ( this._trigger( "search", event ) === false ) {
13274			return;
13275		}
13276
13277		return this._search( value );
13278	},
13279
13280	_search: function( value ) {
13281		this.pending++;
13282		this._addClass( "ui-autocomplete-loading" );
13283		this.cancelSearch = false;
13284
13285		this.source( { term: value }, this._response() );
13286	},
13287
13288	_response: function() {
13289		var index = ++this.requestIndex;
13290
13291		return function( content ) {
13292			if ( index === this.requestIndex ) {
13293				this.__response( content );
13294			}
13295
13296			this.pending--;
13297			if ( !this.pending ) {
13298				this._removeClass( "ui-autocomplete-loading" );
13299			}
13300		}.bind( this );
13301	},
13302
13303	__response: function( content ) {
13304		if ( content ) {
13305			content = this._normalize( content );
13306		}
13307		this._trigger( "response", null, { content: content } );
13308		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
13309			this._suggest( content );
13310			this._trigger( "open" );
13311		} else {
13312
13313			// use ._close() instead of .close() so we don't cancel future searches
13314			this._close();
13315		}
13316	},
13317
13318	close: function( event ) {
13319		this.cancelSearch = true;
13320		this._close( event );
13321	},
13322
13323	_close: function( event ) {
13324
13325		// Remove the handler that closes the menu on outside clicks
13326		this._off( this.document, "mousedown" );
13327
13328		if ( this.menu.element.is( ":visible" ) ) {
13329			this.menu.element.hide();
13330			this.menu.blur();
13331			this.isNewMenu = true;
13332			this._trigger( "close", event );
13333		}
13334	},
13335
13336	_change: function( event ) {
13337		if ( this.previous !== this._value() ) {
13338			this._trigger( "change", event, { item: this.selectedItem } );
13339		}
13340	},
13341
13342	_normalize: function( items ) {
13343
13344		// assume all items have the right format when the first item is complete
13345		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
13346			return items;
13347		}
13348		return $.map( items, function( item ) {
13349			if ( typeof item === "string" ) {
13350				return {
13351					label: item,
13352					value: item
13353				};
13354			}
13355			return $.extend( {}, item, {
13356				label: item.label || item.value,
13357				value: item.value || item.label
13358			} );
13359		} );
13360	},
13361
13362	_suggest: function( items ) {
13363		var ul = this.menu.element.empty();
13364		this._renderMenu( ul, items );
13365		this.isNewMenu = true;
13366		this.menu.refresh();
13367
13368		// Size and position menu
13369		ul.show();
13370		this._resizeMenu();
13371		ul.position( $.extend( {
13372			of: this.element
13373		}, this.options.position ) );
13374
13375		if ( this.options.autoFocus ) {
13376			this.menu.next();
13377		}
13378
13379		// Listen for interactions outside of the widget (#6642)
13380		this._on( this.document, {
13381			mousedown: "_closeOnClickOutside"
13382		} );
13383	},
13384
13385	_resizeMenu: function() {
13386		var ul = this.menu.element;
13387		ul.outerWidth( Math.max(
13388
13389			// Firefox wraps long text (possibly a rounding bug)
13390			// so we add 1px to avoid the wrapping (#7513)
13391			ul.width( "" ).outerWidth() + 1,
13392			this.element.outerWidth()
13393		) );
13394	},
13395
13396	_renderMenu: function( ul, items ) {
13397		var that = this;
13398		$.each( items, function( index, item ) {
13399			that._renderItemData( ul, item );
13400		} );
13401	},
13402
13403	_renderItemData: function( ul, item ) {
13404		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
13405	},
13406
13407	_renderItem: function( ul, item ) {
13408		return $( "<li>" )
13409			.append( $( "<div>" ).text( item.label ) )
13410			.appendTo( ul );
13411	},
13412
13413	_move: function( direction, event ) {
13414		if ( !this.menu.element.is( ":visible" ) ) {
13415			this.search( null, event );
13416			return;
13417		}
13418		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
13419				this.menu.isLastItem() && /^next/.test( direction ) ) {
13420
13421			if ( !this.isMultiLine ) {
13422				this._value( this.term );
13423			}
13424
13425			this.menu.blur();
13426			return;
13427		}
13428		this.menu[ direction ]( event );
13429	},
13430
13431	widget: function() {
13432		return this.menu.element;
13433	},
13434
13435	_value: function() {
13436		return this.valueMethod.apply( this.element, arguments );
13437	},
13438
13439	_keyEvent: function( keyEvent, event ) {
13440		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
13441			this._move( keyEvent, event );
13442
13443			// Prevents moving cursor to beginning/end of the text field in some browsers
13444			event.preventDefault();
13445		}
13446	}
13447} );
13448
13449$.extend( $.ui.autocomplete, {
13450	escapeRegex: function( value ) {
13451		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
13452	},
13453	filter: function( array, term ) {
13454		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
13455		return $.grep( array, function( value ) {
13456			return matcher.test( value.label || value.value || value );
13457		} );
13458	}
13459} );
13460
13461// Live region extension, adding a `messages` option
13462// NOTE: This is an experimental API. We are still investigating
13463// a full solution for string manipulation and internationalization.
13464$.widget( "ui.autocomplete", $.ui.autocomplete, {
13465	options: {
13466		messages: {
13467			noResults: "No search results.",
13468			results: function( amount ) {
13469				return amount + ( amount > 1 ? " results are" : " result is" ) +
13470					" available, use up and down arrow keys to navigate.";
13471			}
13472		}
13473	},
13474
13475	__response: function( content ) {
13476		var message;
13477		this._superApply( arguments );
13478		if ( this.options.disabled || this.cancelSearch ) {
13479			return;
13480		}
13481		if ( content && content.length ) {
13482			message = this.options.messages.results( content.length );
13483		} else {
13484			message = this.options.messages.noResults;
13485		}
13486		clearTimeout( this.liveRegionTimer );
13487		this.liveRegionTimer = this._delay( function() {
13488			this.liveRegion.html( $( "<div>" ).text( message ) );
13489		}, 100 );
13490	}
13491} );
13492
13493var widgetsAutocomplete = $.ui.autocomplete;
13494
13495
13496/*!
13497 * jQuery UI Controlgroup 1.14.
134971
13498 * https://jqueryui.com
13499 *
13500 * Copyright OpenJS Foundation and other contributors
13501 * Released under the MIT license.
13502 * https://jquery.org/license
13503 */
13504
13505//>>label: Controlgroup
13506//>>group: Widgets
13507//>>description: Visually groups form control widgets
13508//>>docs: https://api.jqueryui.com/controlgroup/
13509//>>demos: https://jqueryui.com/controlgroup/
13510//>>css.structure: ../../themes/base/core.css
13511//>>css.structure: ../../themes/base/controlgroup.css
13512//>>css.theme: ../../themes/base/theme.css
13513
13514
13515var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
13516
13517var widgetsControlgroup = $.widget( "ui.controlgroup", {
13518	version: "1.14.1
vendor: 7,734 bytes, lines 13518-13782
13518",
13519	defaultElement: "<div>",
13520	options: {
13521		direction: "horizontal",
13522		disabled: null,
13523		onlyVisible: true,
13524		items: {
13525			"button": "input[type=button], input[type=submit], input[type=reset], button, a",
13526			"controlgroupLabel": ".ui-controlgroup-label",
13527			"checkboxradio": "input[type='checkbox'], input[type='radio']",
13528			"selectmenu": "select",
13529			"spinner": ".ui-spinner-input"
13530		}
13531	},
13532
13533	_create: function() {
13534		this._enhance();
13535	},
13536
13537	// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
13538	_enhance: function() {
13539		this.element.attr( "role", "toolbar" );
13540		this.refresh();
13541	},
13542
13543	_destroy: function() {
13544		this._callChildMethod( "destroy" );
13545		this.childWidgets.removeData( "ui-controlgroup-data" );
13546		this.element.removeAttr( "role" );
13547		if ( this.options.items.controlgroupLabel ) {
13548			this.element
13549				.find( this.options.items.controlgroupLabel )
13550				.find( ".ui-controlgroup-label-contents" )
13551				.contents().unwrap();
13552		}
13553	},
13554
13555	_initWidgets: function() {
13556		var that = this,
13557			childWidgets = [];
13558
13559		// First we iterate over each of the items options
13560		$.each( this.options.items, function( widget, selector ) {
13561			var labels;
13562			var options = {};
13563
13564			// Make sure the widget has a selector set
13565			if ( !selector ) {
13566				return;
13567			}
13568
13569			if ( widget === "controlgroupLabel" ) {
13570				labels = that.element.find( selector );
13571				labels.each( function() {
13572					var element = $( this );
13573
13574					if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
13575						return;
13576					}
13577					element.contents()
13578						.wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
13579				} );
13580				that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
13581				childWidgets = childWidgets.concat( labels.get() );
13582				return;
13583			}
13584
13585			// Make sure the widget actually exists
13586			if ( !$.fn[ widget ] ) {
13587				return;
13588			}
13589
13590			// We assume everything is in the middle to start because we can't determine
13591			// first / last elements until all enhancments are done.
13592			if ( that[ "_" + widget + "Options" ] ) {
13593				options = that[ "_" + widget + "Options" ]( "middle" );
13594			} else {
13595				options = { classes: {} };
13596			}
13597
13598			// Find instances of this widget inside controlgroup and init them
13599			that.element
13600				.find( selector )
13601				.each( function() {
13602					var element = $( this );
13603					var instance = element[ widget ]( "instance" );
13604
13605					// We need to clone the default options for this type of widget to avoid
13606					// polluting the variable options which has a wider scope than a single widget.
13607					var instanceOptions = $.widget.extend( {}, options );
13608
13609					// If the button is the child of a spinner ignore it
13610					// TODO: Find a more generic solution
13611					if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
13612						return;
13613					}
13614
13615					// Create the widget if it doesn't exist
13616					if ( !instance ) {
13617						instance = element[ widget ]()[ widget ]( "instance" );
13618					}
13619					if ( instance ) {
13620						instanceOptions.classes =
13621							that._resolveClassesValues( instanceOptions.classes, instance );
13622					}
13623					element[ widget ]( instanceOptions );
13624
13625					// Store an instance of the controlgroup to be able to reference
13626					// from the outermost element for changing options and refresh
13627					var widgetElement = element[ widget ]( "widget" );
13628					$.data( widgetElement[ 0 ], "ui-controlgroup-data",
13629						instance ? instance : element[ widget ]( "instance" ) );
13630
13631					childWidgets.push( widgetElement[ 0 ] );
13632				} );
13633		} );
13634
13635		this.childWidgets = $( $.uniqueSort( childWidgets ) );
13636		this._addClass( this.childWidgets, "ui-controlgroup-item" );
13637	},
13638
13639	_callChildMethod: function( method ) {
13640		this.childWidgets.each( function() {
13641			var element = $( this ),
13642				data = element.data( "ui-controlgroup-data" );
13643			if ( data && data[ method ] ) {
13644				data[ method ]();
13645			}
13646		} );
13647	},
13648
13649	_updateCornerClass: function( element, position ) {
13650		var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
13651		var add = this._buildSimpleOptions( position, "label" ).classes.label;
13652
13653		this._removeClass( element, null, remove );
13654		this._addClass( element, null, add );
13655	},
13656
13657	_buildSimpleOptions: function( position, key ) {
13658		var direction = this.options.direction === "vertical";
13659		var result = {
13660			classes: {}
13661		};
13662		result.classes[ key ] = {
13663			"middle": "",
13664			"first": "ui-corner-" + ( direction ? "top" : "left" ),
13665			"last": "ui-corner-" + ( direction ? "bottom" : "right" ),
13666			"only": "ui-corner-all"
13667		}[ position ];
13668
13669		return result;
13670	},
13671
13672	_spinnerOptions: function( position ) {
13673		var options = this._buildSimpleOptions( position, "ui-spinner" );
13674
13675		options.classes[ "ui-spinner-up" ] = "";
13676		options.classes[ "ui-spinner-down" ] = "";
13677
13678		return options;
13679	},
13680
13681	_buttonOptions: function( position ) {
13682		return this._buildSimpleOptions( position, "ui-button" );
13683	},
13684
13685	_checkboxradioOptions: function( position ) {
13686		return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
13687	},
13688
13689	_selectmenuOptions: function( position ) {
13690		var direction = this.options.direction === "vertical";
13691		return {
13692			width: direction ? "auto" : false,
13693			classes: {
13694				middle: {
13695					"ui-selectmenu-button-open": "",
13696					"ui-selectmenu-button-closed": ""
13697				},
13698				first: {
13699					"ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
13700					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
13701				},
13702				last: {
13703					"ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
13704					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
13705				},
13706				only: {
13707					"ui-selectmenu-button-open": "ui-corner-top",
13708					"ui-selectmenu-button-closed": "ui-corner-all"
13709				}
13710
13711			}[ position ]
13712		};
13713	},
13714
13715	_resolveClassesValues: function( classes, instance ) {
13716		var result = {};
13717		$.each( classes, function( key ) {
13718			var current = instance.options.classes[ key ] || "";
13719			current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
13720			result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
13721		} );
13722		return result;
13723	},
13724
13725	_setOption: function( key, value ) {
13726		if ( key === "direction" ) {
13727			this._removeClass( "ui-controlgroup-" + this.options.direction );
13728		}
13729
13730		this._super( key, value );
13731		if ( key === "disabled" ) {
13732			this._callChildMethod( value ? "disable" : "enable" );
13733			return;
13734		}
13735
13736		this.refresh();
13737	},
13738
13739	refresh: function() {
13740		var children,
13741			that = this;
13742
13743		this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );
13744
13745		if ( this.options.direction === "horizontal" ) {
13746			this._addClass( null, "ui-helper-clearfix" );
13747		}
13748		this._initWidgets();
13749
13750		children = this.childWidgets;
13751
13752		// We filter here because we need to track all childWidgets not just the visible ones
13753		if ( this.options.onlyVisible ) {
13754			children = children.filter( ":visible" );
13755		}
13756
13757		if ( children.length ) {
13758
13759			// We do this last because we need to make sure all enhancment is done
13760			// before determining first and last
13761			$.each( [ "first", "last" ], function( index, value ) {
13762				var instance = children[ value ]().data( "ui-controlgroup-data" );
13763
13764				if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
13765					var options = that[ "_" + instance.widgetName + "Options" ](
13766						children.length === 1 ? "only" : value
13767					);
13768					options.classes = that._resolveClassesValues( options.classes, instance );
13769					instance.element[ instance.widgetName ]( options );
13770				} else {
13771					that._updateCornerClass( children[ value ](), value );
13772				}
13773			} );
13774
13775			// Finally call the refresh method on each of the child widgets.
13776			this._callChildMethod( "refresh" );
13777		}
13778	}
13779} );
13780
13781/*!
13782 * jQuery UI Checkboxradio 1.1
vendor: 7,791 bytes, lines 13782-14072
137824.1
13783 * https://jqueryui.com
13784 *
13785 * Copyright OpenJS Foundation and other contributors
13786 * Released under the MIT license.
13787 * https://jquery.org/license
13788 */
13789
13790//>>label: Checkboxradio
13791//>>group: Widgets
13792//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
13793//>>docs: https://api.jqueryui.com/checkboxradio/
13794//>>demos: https://jqueryui.com/checkboxradio/
13795//>>css.structure: ../../themes/base/core.css
13796//>>css.structure: ../../themes/base/button.css
13797//>>css.structure: ../../themes/base/checkboxradio.css
13798//>>css.theme: ../../themes/base/theme.css
13799
13800
13801$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
13802	version: "1.14.1",
13803	options: {
13804		disabled: null,
13805		label: null,
13806		icon: true,
13807		classes: {
13808			"ui-checkboxradio-label": "ui-corner-all",
13809			"ui-checkboxradio-icon": "ui-corner-all"
13810		}
13811	},
13812
13813	_getCreateOptions: function() {
13814		var disabled, labels, labelContents;
13815		var options = this._super() || {};
13816
13817		// We read the type here, because it makes more sense to throw a element type error first,
13818		// rather then the error for lack of a label. Often if its the wrong type, it
13819		// won't have a label (e.g. calling on a div, btn, etc)
13820		this._readType();
13821
13822		labels = this.element.labels();
13823
13824		// If there are multiple labels, use the last one
13825		this.label = $( labels[ labels.length - 1 ] );
13826		if ( !this.label.length ) {
13827			$.error( "No label found for checkboxradio widget" );
13828		}
13829
13830		this.originalLabel = "";
13831
13832		// We need to get the label text but this may also need to make sure it does not contain the
13833		// input itself.
13834		// The label contents could be text, html, or a mix. We wrap all elements
13835		// and read the wrapper's `innerHTML` to get a string representation of
13836		// the label, without the input as part of it.
13837		labelContents = this.label.contents().not( this.element[ 0 ] );
13838
13839		if ( labelContents.length ) {
13840			this.originalLabel += labelContents
13841				.clone()
13842				.wrapAll( "<div></div>" )
13843				.parent()
13844				.html();
13845		}
13846
13847		// Set the label option if we found label text
13848		if ( this.originalLabel ) {
13849			options.label = this.originalLabel;
13850		}
13851
13852		disabled = this.element[ 0 ].disabled;
13853		if ( disabled != null ) {
13854			options.disabled = disabled;
13855		}
13856		return options;
13857	},
13858
13859	_create: function() {
13860		var checked = this.element[ 0 ].checked;
13861
13862		this._bindFormResetHandler();
13863
13864		if ( this.options.disabled == null ) {
13865			this.options.disabled = this.element[ 0 ].disabled;
13866		}
13867
13868		this._setOption( "disabled", this.options.disabled );
13869		this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
13870		this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
13871
13872		if ( this.type === "radio" ) {
13873			this._addClass( this.label, "ui-checkboxradio-radio-label" );
13874		}
13875
13876		if ( this.options.label && this.options.label !== this.originalLabel ) {
13877			this._updateLabel();
13878		} else if ( this.originalLabel ) {
13879			this.options.label = this.originalLabel;
13880		}
13881
13882		this._enhance();
13883
13884		if ( checked ) {
13885			this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
13886		}
13887
13888		this._on( {
13889			change: "_toggleClasses",
13890			focus: function() {
13891				this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
13892			},
13893			blur: function() {
13894				this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
13895			}
13896		} );
13897	},
13898
13899	_readType: function() {
13900		var nodeName = this.element[ 0 ].nodeName.toLowerCase();
13901		this.type = this.element[ 0 ].type;
13902		if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
13903			$.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
13904				" and element.type=" + this.type );
13905		}
13906	},
13907
13908	// Support jQuery Mobile enhanced option
13909	_enhance: function() {
13910		this._updateIcon( this.element[ 0 ].checked );
13911	},
13912
13913	widget: function() {
13914		return this.label;
13915	},
13916
13917	_getRadioGroup: function() {
13918		var group;
13919		var name = this.element[ 0 ].name;
13920		var nameSelector = "input[name='" + CSS.escape( name ) + "']";
13921
13922		if ( !name ) {
13923			return $( [] );
13924		}
13925
13926		if ( this.form.length ) {
13927			group = $( this.form[ 0 ].elements ).filter( nameSelector );
13928		} else {
13929
13930			// Not inside a form, check all inputs that also are not inside a form
13931			group = $( nameSelector ).filter( function() {
13932				return $( $( this ).prop( "form" ) ).length === 0;
13933			} );
13934		}
13935
13936		return group.not( this.element );
13937	},
13938
13939	_toggleClasses: function() {
13940		var checked = this.element[ 0 ].checked;
13941		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
13942
13943		if ( this.options.icon && this.type === "checkbox" ) {
13944			this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
13945				._toggleClass( this.icon, null, "ui-icon-blank", !checked );
13946		}
13947
13948		if ( this.type === "radio" ) {
13949			this._getRadioGroup()
13950				.each( function() {
13951					var instance = $( this ).checkboxradio( "instance" );
13952
13953					if ( instance ) {
13954						instance._removeClass( instance.label,
13955							"ui-checkboxradio-checked", "ui-state-active" );
13956					}
13957				} );
13958		}
13959	},
13960
13961	_destroy: function() {
13962		this._unbindFormResetHandler();
13963
13964		if ( this.icon ) {
13965			this.icon.remove();
13966			this.iconSpace.remove();
13967		}
13968	},
13969
13970	_setOption: function( key, value ) {
13971
13972		// We don't allow the value to be set to nothing
13973		if ( key === "label" && !value ) {
13974			return;
13975		}
13976
13977		this._super( key, value );
13978
13979		if ( key === "disabled" ) {
13980			this._toggleClass( this.label, null, "ui-state-disabled", value );
13981			this.element[ 0 ].disabled = value;
13982
13983			// Don't refresh when setting disabled
13984			return;
13985		}
13986		this.refresh();
13987	},
13988
13989	_updateIcon: function( checked ) {
13990		var toAdd = "ui-icon ui-icon-background ";
13991
13992		if ( this.options.icon ) {
13993			if ( !this.icon ) {
13994				this.icon = $( "<span>" );
13995				this.iconSpace = $( "<span> </span>" );
13996				this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
13997			}
13998
13999			if ( this.type === "checkbox" ) {
14000				toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
14001				this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
14002			} else {
14003				toAdd += "ui-icon-blank";
14004			}
14005			this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
14006			if ( !checked ) {
14007				this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
14008			}
14009			this.icon.prependTo( this.label ).after( this.iconSpace );
14010		} else if ( this.icon !== undefined ) {
14011			this.icon.remove();
14012			this.iconSpace.remove();
14013			delete this.icon;
14014		}
14015	},
14016
14017	_updateLabel: function() {
14018
14019		// Remove the contents of the label ( minus the icon, icon space, and input )
14020		var contents = this.label.contents().not( this.element[ 0 ] );
14021		if ( this.icon ) {
14022			contents = contents.not( this.icon[ 0 ] );
14023		}
14024		if ( this.iconSpace ) {
14025			contents = contents.not( this.iconSpace[ 0 ] );
14026		}
14027		contents.remove();
14028
14029		this.label.append( this.options.label );
14030	},
14031
14032	refresh: function() {
14033		var checked = this.element[ 0 ].checked,
14034			isDisabled = this.element[ 0 ].disabled;
14035
14036		this._updateIcon( checked );
14037		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
14038		if ( this.options.label !== null ) {
14039			this._updateLabel();
14040		}
14041
14042		if ( isDisabled !== this.options.disabled ) {
14043			this._setOptions( { "disabled": isDisabled } );
14044		}
14045	}
14046
14047} ] );
14048
14049var widgetsCheckboxradio = $.ui.checkboxradio;
14050
14051
14052/*!
14053 * jQuery UI Button 1.14.1
14054 * https://jqueryui.com
14055 *
14056 * Copyright OpenJS Foundation and other contributors
14057 * Released under the MIT license.
14058 * https://jquery.org/license
14059 */
14060
14061//>>label: Button
14062//>>group: Widgets
14063//>>description: Enhances a form with themeable buttons.
14064//>>docs: https://api.jqueryui.com/button/
14065//>>demos: https://jqueryui.com/button/
14066//>>css.structure: ../../themes/base/core.css
14067//>>css.structure: ../../themes/base/button.css
14068//>>css.theme: ../../themes/base/theme.css
14069
14070
14071$.widget( "ui.button", {
14072	version: "1.14.1
vendor: 10,754 bytes, lines 14072-14477
14072",
14073	defaultElement: "<button>",
14074	options: {
14075		classes: {
14076			"ui-button": "ui-corner-all"
14077		},
14078		disabled: null,
14079		icon: null,
14080		iconPosition: "beginning",
14081		label: null,
14082		showLabel: true
14083	},
14084
14085	_getCreateOptions: function() {
14086		var disabled,
14087
14088			// This is to support cases like in jQuery Mobile where the base widget does have
14089			// an implementation of _getCreateOptions
14090			options = this._super() || {};
14091
14092		this.isInput = this.element.is( "input" );
14093
14094		disabled = this.element[ 0 ].disabled;
14095		if ( disabled != null ) {
14096			options.disabled = disabled;
14097		}
14098
14099		this.originalLabel = this.isInput ? this.element.val() : this.element.html();
14100		if ( this.originalLabel ) {
14101			options.label = this.originalLabel;
14102		}
14103
14104		return options;
14105	},
14106
14107	_create: function() {
14108		if ( !this.option.showLabel & !this.options.icon ) {
14109			this.options.showLabel = true;
14110		}
14111
14112		// We have to check the option again here even though we did in _getCreateOptions,
14113		// because null may have been passed on init which would override what was set in
14114		// _getCreateOptions
14115		if ( this.options.disabled == null ) {
14116			this.options.disabled = this.element[ 0 ].disabled || false;
14117		}
14118
14119		this.hasTitle = !!this.element.attr( "title" );
14120
14121		// Check to see if the label needs to be set or if its already correct
14122		if ( this.options.label && this.options.label !== this.originalLabel ) {
14123			if ( this.isInput ) {
14124				this.element.val( this.options.label );
14125			} else {
14126				this.element.html( this.options.label );
14127			}
14128		}
14129		this._addClass( "ui-button", "ui-widget" );
14130		this._setOption( "disabled", this.options.disabled );
14131		this._enhance();
14132
14133		if ( this.element.is( "a" ) ) {
14134			this._on( {
14135				"keyup": function( event ) {
14136					if ( event.keyCode === $.ui.keyCode.SPACE ) {
14137						event.preventDefault();
14138
14139						// If a native click is available use it, so we
14140						// actually cause navigation. Otherwise, just trigger
14141						// a click event.
14142						if ( this.element[ 0 ].click ) {
14143							this.element[ 0 ].click();
14144						} else {
14145							this.element.trigger( "click" );
14146						}
14147					}
14148				}
14149			} );
14150		}
14151	},
14152
14153	_enhance: function() {
14154		if ( !this.element.is( "button" ) ) {
14155			this.element.attr( "role", "button" );
14156		}
14157
14158		if ( this.options.icon ) {
14159			this._updateIcon( "icon", this.options.icon );
14160			this._updateTooltip();
14161		}
14162	},
14163
14164	_updateTooltip: function() {
14165		this.title = this.element.attr( "title" );
14166
14167		if ( !this.options.showLabel && !this.title ) {
14168			this.element.attr( "title", this.options.label );
14169		}
14170	},
14171
14172	_updateIcon: function( option, value ) {
14173		var icon = option !== "iconPosition",
14174			position = icon ? this.options.iconPosition : value,
14175			displayBlock = position === "top" || position === "bottom";
14176
14177		// Create icon
14178		if ( !this.icon ) {
14179			this.icon = $( "<span>" );
14180
14181			this._addClass( this.icon, "ui-button-icon", "ui-icon" );
14182
14183			if ( !this.options.showLabel ) {
14184				this._addClass( "ui-button-icon-only" );
14185			}
14186		} else if ( icon ) {
14187
14188			// If we are updating the icon remove the old icon class
14189			this._removeClass( this.icon, null, this.options.icon );
14190		}
14191
14192		// If we are updating the icon add the new icon class
14193		if ( icon ) {
14194			this._addClass( this.icon, null, value );
14195		}
14196
14197		this._attachIcon( position );
14198
14199		// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove
14200		// the iconSpace if there is one.
14201		if ( displayBlock ) {
14202			this._addClass( this.icon, null, "ui-widget-icon-block" );
14203			if ( this.iconSpace ) {
14204				this.iconSpace.remove();
14205			}
14206		} else {
14207
14208			// Position is beginning or end so remove the ui-widget-icon-block class and add the
14209			// space if it does not exist
14210			if ( !this.iconSpace ) {
14211				this.iconSpace = $( "<span> </span>" );
14212				this._addClass( this.iconSpace, "ui-button-icon-space" );
14213			}
14214			this._removeClass( this.icon, null, "ui-wiget-icon-block" );
14215			this._attachIconSpace( position );
14216		}
14217	},
14218
14219	_destroy: function() {
14220		this.element.removeAttr( "role" );
14221
14222		if ( this.icon ) {
14223			this.icon.remove();
14224		}
14225		if ( this.iconSpace ) {
14226			this.iconSpace.remove();
14227		}
14228		if ( !this.hasTitle ) {
14229			this.element.removeAttr( "title" );
14230		}
14231	},
14232
14233	_attachIconSpace: function( iconPosition ) {
14234		this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace );
14235	},
14236
14237	_attachIcon: function( iconPosition ) {
14238		this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon );
14239	},
14240
14241	_setOptions: function( options ) {
14242		var newShowLabel = options.showLabel === undefined ?
14243				this.options.showLabel :
14244				options.showLabel,
14245			newIcon = options.icon === undefined ? this.options.icon : options.icon;
14246
14247		if ( !newShowLabel && !newIcon ) {
14248			options.showLabel = true;
14249		}
14250		this._super( options );
14251	},
14252
14253	_setOption: function( key, value ) {
14254		if ( key === "icon" ) {
14255			if ( value ) {
14256				this._updateIcon( key, value );
14257			} else if ( this.icon ) {
14258				this.icon.remove();
14259				if ( this.iconSpace ) {
14260					this.iconSpace.remove();
14261				}
14262			}
14263		}
14264
14265		if ( key === "iconPosition" ) {
14266			this._updateIcon( key, value );
14267		}
14268
14269		// Make sure we can't end up with a button that has neither text nor icon
14270		if ( key === "showLabel" ) {
14271				this._toggleClass( "ui-button-icon-only", null, !value );
14272				this._updateTooltip();
14273		}
14274
14275		if ( key === "label" ) {
14276			if ( this.isInput ) {
14277				this.element.val( value );
14278			} else {
14279
14280				// If there is an icon, append it, else nothing then append the value
14281				// this avoids removal of the icon when setting label text
14282				this.element.html( value );
14283				if ( this.icon ) {
14284					this._attachIcon( this.options.iconPosition );
14285					this._attachIconSpace( this.options.iconPosition );
14286				}
14287			}
14288		}
14289
14290		this._super( key, value );
14291
14292		if ( key === "disabled" ) {
14293			this._toggleClass( null, "ui-state-disabled", value );
14294			this.element[ 0 ].disabled = value;
14295			if ( value ) {
14296				this.element.trigger( "blur" );
14297			}
14298		}
14299	},
14300
14301	refresh: function() {
14302
14303		// Make sure to only check disabled if its an element that supports this otherwise
14304		// check for the disabled class to determine state
14305		var isDisabled = this.element.is( "input, button" ) ?
14306			this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" );
14307
14308		if ( isDisabled !== this.options.disabled ) {
14309			this._setOptions( { disabled: isDisabled } );
14310		}
14311
14312		this._updateTooltip();
14313	}
14314} );
14315
14316// DEPRECATED
14317if ( $.uiBackCompat === true ) {
14318
14319	// Text and Icons options
14320	$.widget( "ui.button", $.ui.button, {
14321		options: {
14322			text: true,
14323			icons: {
14324				primary: null,
14325				secondary: null
14326			}
14327		},
14328
14329		_create: function() {
14330			if ( this.options.showLabel && !this.options.text ) {
14331				this.options.showLabel = this.options.text;
14332			}
14333			if ( !this.options.showLabel && this.options.text ) {
14334				this.options.text = this.options.showLabel;
14335			}
14336			if ( !this.options.icon && ( this.options.icons.primary ||
14337					this.options.icons.secondary ) ) {
14338				if ( this.options.icons.primary ) {
14339					this.options.icon = this.options.icons.primary;
14340				} else {
14341					this.options.icon = this.options.icons.secondary;
14342					this.options.iconPosition = "end";
14343				}
14344			} else if ( this.options.icon ) {
14345				this.options.icons.primary = this.options.icon;
14346			}
14347			this._super();
14348		},
14349
14350		_setOption: function( key, value ) {
14351			if ( key === "text" ) {
14352				this._super( "showLabel", value );
14353				return;
14354			}
14355			if ( key === "showLabel" ) {
14356				this.options.text = value;
14357			}
14358			if ( key === "icon" ) {
14359				this.options.icons.primary = value;
14360			}
14361			if ( key === "icons" ) {
14362				if ( value.primary ) {
14363					this._super( "icon", value.primary );
14364					this._super( "iconPosition", "beginning" );
14365				} else if ( value.secondary ) {
14366					this._super( "icon", value.secondary );
14367					this._super( "iconPosition", "end" );
14368				}
14369			}
14370			this._superApply( arguments );
14371		}
14372	} );
14373
14374	$.fn.button = ( function( orig ) {
14375		return function( options ) {
14376			var isMethodCall = typeof options === "string";
14377			var args = Array.prototype.slice.call( arguments, 1 );
14378			var returnValue = this;
14379
14380			if ( isMethodCall ) {
14381
14382				// If this is an empty collection, we need to have the instance method
14383				// return undefined instead of the jQuery instance
14384				if ( !this.length && options === "instance" ) {
14385					returnValue = undefined;
14386				} else {
14387					this.each( function() {
14388						var methodValue;
14389						var type = $( this ).attr( "type" );
14390						var name = type !== "checkbox" && type !== "radio" ?
14391							"button" :
14392							"checkboxradio";
14393						var instance = $.data( this, "ui-" + name );
14394
14395						if ( options === "instance" ) {
14396							returnValue = instance;
14397							return false;
14398						}
14399
14400						if ( !instance ) {
14401							return $.error( "cannot call methods on button" +
14402								" prior to initialization; " +
14403								"attempted to call method '" + options + "'" );
14404						}
14405
14406						if ( typeof instance[ options ] !== "function" ||
14407							options.charAt( 0 ) === "_" ) {
14408							return $.error( "no such method '" + options + "' for button" +
14409								" widget instance" );
14410						}
14411
14412						methodValue = instance[ options ].apply( instance, args );
14413
14414						if ( methodValue !== instance && methodValue !== undefined ) {
14415							returnValue = methodValue && methodValue.jquery ?
14416								returnValue.pushStack( methodValue.get() ) :
14417								methodValue;
14418							return false;
14419						}
14420					} );
14421				}
14422			} else {
14423
14424				// Allow multiple hashes to be passed on init
14425				if ( args.length ) {
14426					options = $.widget.extend.apply( null, [ options ].concat( args ) );
14427				}
14428
14429				this.each( function() {
14430					var type = $( this ).attr( "type" );
14431					var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio";
14432					var instance = $.data( this, "ui-" + name );
14433
14434					if ( instance ) {
14435						instance.option( options || {} );
14436						if ( instance._init ) {
14437							instance._init();
14438						}
14439					} else {
14440						if ( name === "button" ) {
14441							orig.call( $( this ), options );
14442							return;
14443						}
14444
14445						$( this ).checkboxradio( $.extend( { icon: false }, options ) );
14446					}
14447				} );
14448			}
14449
14450			return returnValue;
14451		};
14452	} )( $.fn.button );
14453
14454	$.fn.buttonset = function() {
14455		if ( !$.ui.controlgroup ) {
14456			$.error( "Controlgroup widget missing" );
14457		}
14458		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) {
14459			return this.controlgroup.apply( this,
14460				[ arguments[ 0 ], "items.button", arguments[ 2 ] ] );
14461		}
14462		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) {
14463			return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] );
14464		}
14465		if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) {
14466			arguments[ 0 ].items = {
14467				button: arguments[ 0 ].items
14468			};
14469		}
14470		return this.controlgroup.apply( this, arguments );
14471	};
14472}
14473
14474var widgetsButton = $.ui.button;
14475
14476
14477/* eslint-disable max-len
14477, camelcase */
14478/*!
14479 * jQuery UI Datepicker 1.14.1
14480 * https://jqueryui.com
14481 *
14482 * Copyright OpenJS Foundation and other contributors
14483 * Released under the MIT license.
14484 * https://jquery.org/license
14485 */
14486
14487//>>label: Datepicker
14488//>>group: Widgets
14489//>>description: Displays a calendar from an input or inline for selecting dates.
14490//>>docs: https://api.jqueryui.com/datepicker/
14491//>>demos: https://jqueryui.com/datepicker/
14492//>>css.structure: ../../themes/base/core.css
14493//>>css.structure: ../../themes/base/datepicker.css
14494//>>css.theme: ../../themes/base/theme.css
14495
14496
14497$.extend( $.ui, { datepicker: { version: "1.14.1
vendor: 17,405 bytes, lines 14497-14896
14497" } } );
14498
14499var datepicker_instActive;
14500
14501function datepicker_getZindex( elem ) {
14502	var position, value;
14503	while ( elem.length && elem[ 0 ] !== document ) {
14504
14505		// Ignore z-index if position is set to a value where z-index is ignored by the browser
14506		// This makes behavior of this function consistent across browsers
14507		// WebKit always returns auto if the element is positioned
14508		position = elem.css( "position" );
14509		if ( position === "absolute" || position === "relative" || position === "fixed" ) {
14510
14511			// IE returns 0 when zIndex is not specified
14512			// other browsers return a string
14513			// we ignore the case of nested elements with an explicit value of 0
14514			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
14515			value = parseInt( elem.css( "zIndex" ), 10 );
14516			if ( !isNaN( value ) && value !== 0 ) {
14517				return value;
14518			}
14519		}
14520		elem = elem.parent();
14521	}
14522
14523	return 0;
14524}
14525
14526/* Date picker manager.
14527   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
14528   Settings for (groups of) date pickers are maintained in an instance object,
14529   allowing multiple different settings on the same page. */
14530
14531function Datepicker() {
14532	this._curInst = null; // The current instance in use
14533	this._keyEvent = false; // If the last event was a key event
14534	this._disabledInputs = []; // List of date picker inputs that have been disabled
14535	this._datepickerShowing = false; // True if the popup picker is showing , false if not
14536	this._inDialog = false; // True if showing within a "dialog", false if not
14537	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
14538	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
14539	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
14540	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
14541	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
14542	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
14543	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
14544	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
14545	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
14546	this.regional = []; // Available regional settings, indexed by language code
14547	this.regional[ "" ] = { // Default regional settings
14548		closeText: "Done", // Display text for close link
14549		prevText: "Prev", // Display text for previous month link
14550		nextText: "Next", // Display text for next month link
14551		currentText: "Today", // Display text for current month link
14552		monthNames: [ "January", "February", "March", "April", "May", "June",
14553			"July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
14554		monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
14555		dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
14556		dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
14557		dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
14558		weekHeader: "Wk", // Column header for week of the year
14559		dateFormat: "mm/dd/yy", // See format options on parseDate
14560		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
14561		isRTL: false, // True if right-to-left language, false if left-to-right
14562		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
14563		yearSuffix: "", // Additional text to append to the year in the month headers,
14564		selectMonthLabel: "Select month", // Invisible label for month selector
14565		selectYearLabel: "Select year" // Invisible label for year selector
14566	};
14567	this._defaults = { // Global defaults for all the date picker instances
14568		showOn: "focus", // "focus" for popup on focus,
14569			// "button" for trigger button, or "both" for either
14570		showAnim: "fadeIn", // Name of jQuery animation for popup
14571		showOptions: {}, // Options for enhanced animations
14572		defaultDate: null, // Used when field is blank: actual date,
14573			// +/-number for offset from today, null for today
14574		appendText: "", // Display text following the input box, e.g. showing the format
14575		buttonText: "...", // Text for trigger button
14576		buttonImage: "", // URL for trigger button image
14577		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
14578		hideIfNoPrevNext: false, // True to hide next/previous month links
14579			// if not applicable, false to just disable them
14580		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
14581		gotoCurrent: false, // True if today link goes back to current selection instead
14582		changeMonth: false, // True if month can be selected directly, false if only prev/next
14583		changeYear: false, // True if year can be selected directly, false if only prev/next
14584		yearRange: "c-10:c+10", // Range of years to display in drop-down,
14585			// either relative to today's year (-nn:+nn), relative to currently displayed year
14586			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
14587		showOtherMonths: false, // True to show dates in other months, false to leave blank
14588		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
14589		showWeek: false, // True to show week of the year, false to not show it
14590		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
14591			// takes a Date and returns the number of the week for it
14592		shortYearCutoff: "+10", // Short year values < this are in the current century,
14593			// > this are in the previous century,
14594			// string value starting with "+" for current year + value
14595		minDate: null, // The earliest selectable date, or null for no limit
14596		maxDate: null, // The latest selectable date, or null for no limit
14597		duration: "fast", // Duration of display/closure
14598		beforeShowDay: null, // Function that takes a date and returns an array with
14599			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
14600			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
14601		beforeShow: null, // Function that takes an input field and
14602			// returns a set of custom settings for the date picker
14603		onSelect: null, // Define a callback function when a date is selected
14604		onChangeMonthYear: null, // Define a callback function when the month or year is changed
14605		onClose: null, // Define a callback function when the datepicker is closed
14606		onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
14607		numberOfMonths: 1, // Number of months to show at a time
14608		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
14609		stepMonths: 1, // Number of months to step back/forward
14610		stepBigMonths: 12, // Number of months to step back/forward for the big links
14611		altField: "", // Selector for an alternate field to store selected dates into
14612		altFormat: "", // The date format to use for the alternate field
14613		constrainInput: true, // The input is constrained by the current date format
14614		showButtonPanel: false, // True to show button panel, false to not show it
14615		autoSize: false, // True to size the input for the date format, false to leave as is
14616		disabled: false // The initial disabled state
14617	};
14618	$.extend( this._defaults, this.regional[ "" ] );
14619	this.regional.en = $.extend( true, {}, this.regional[ "" ] );
14620	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
14621	this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
14622}
14623
14624$.extend( Datepicker.prototype, {
14625
14626	/* Class name added to elements to indicate already configured with a date picker. */
14627	markerClassName: "hasDatepicker",
14628
14629	//Keep track of the maximum number of rows displayed (see #7043)
14630	maxRows: 4,
14631
14632	// TODO rename to "widget" when switching to widget factory
14633	_widgetDatepicker: function() {
14634		return this.dpDiv;
14635	},
14636
14637	/* Override the default settings for all instances of the date picker.
14638	 * @param  settings  object - the new settings to use as defaults (anonymous object)
14639	 * @return the manager object
14640	 */
14641	setDefaults: function( settings ) {
14642		datepicker_extendRemove( this._defaults, settings || {} );
14643		return this;
14644	},
14645
14646	/* Attach the date picker to a jQuery selection.
14647	 * @param  target	element - the target input field or division or span
14648	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
14649	 */
14650	_attachDatepicker: function( target, settings ) {
14651		var nodeName, inline, inst;
14652		nodeName = target.nodeName.toLowerCase();
14653		inline = ( nodeName === "div" || nodeName === "span" );
14654		if ( !target.id ) {
14655			this.uuid += 1;
14656			target.id = "dp" + this.uuid;
14657		}
14658		inst = this._newInst( $( target ), inline );
14659		inst.settings = $.extend( {}, settings || {} );
14660		if ( nodeName === "input" ) {
14661			this._connectDatepicker( target, inst );
14662		} else if ( inline ) {
14663			this._inlineDatepicker( target, inst );
14664		}
14665	},
14666
14667	/* Create a new instance object. */
14668	_newInst: function( target, inline ) {
14669		var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
14670		return { id: id, input: target, // associated target
14671			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
14672			drawMonth: 0, drawYear: 0, // month being drawn
14673			inline: inline, // is datepicker inline or not
14674			dpDiv: ( !inline ? this.dpDiv : // presentation div
14675			datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
14676	},
14677
14678	/* Attach the date picker to an input field. */
14679	_connectDatepicker: function( target, inst ) {
14680		var input = $( target );
14681		inst.append = $( [] );
14682		inst.trigger = $( [] );
14683		if ( input.hasClass( this.markerClassName ) ) {
14684			return;
14685		}
14686		this._attachments( input, inst );
14687		input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
14688			on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
14689		this._autoSize( inst );
14690		$.data( target, "datepicker", inst );
14691
14692		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
14693		if ( inst.settings.disabled ) {
14694			this._disableDatepicker( target );
14695		}
14696	},
14697
14698	/* Make attachments based on settings. */
14699	_attachments: function( input, inst ) {
14700		var showOn, buttonText, buttonImage,
14701			appendText = this._get( inst, "appendText" ),
14702			isRTL = this._get( inst, "isRTL" );
14703
14704		if ( inst.append ) {
14705			inst.append.remove();
14706		}
14707		if ( appendText ) {
14708			inst.append = $( "<span>" )
14709				.addClass( this._appendClass )
14710				.text( appendText );
14711			input[ isRTL ? "before" : "after" ]( inst.append );
14712		}
14713
14714		input.off( "focus", this._showDatepicker );
14715
14716		if ( inst.trigger ) {
14717			inst.trigger.remove();
14718		}
14719
14720		showOn = this._get( inst, "showOn" );
14721		if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
14722			input.on( "focus", this._showDatepicker );
14723		}
14724		if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
14725			buttonText = this._get( inst, "buttonText" );
14726			buttonImage = this._get( inst, "buttonImage" );
14727
14728			if ( this._get( inst, "buttonImageOnly" ) ) {
14729				inst.trigger = $( "<img>" )
14730					.addClass( this._triggerClass )
14731					.attr( {
14732						src: buttonImage,
14733						alt: buttonText,
14734						title: buttonText
14735					} );
14736			} else {
14737				inst.trigger = $( "<button type='button'>" )
14738					.addClass( this._triggerClass );
14739				if ( buttonImage ) {
14740					inst.trigger.html(
14741						$( "<img>" )
14742							.attr( {
14743								src: buttonImage,
14744								alt: buttonText,
14745								title: buttonText
14746							} )
14747					);
14748				} else {
14749					inst.trigger.text( buttonText );
14750				}
14751			}
14752
14753			input[ isRTL ? "before" : "after" ]( inst.trigger );
14754			inst.trigger.on( "click", function() {
14755				if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
14756					$.datepicker._hideDatepicker();
14757				} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
14758					$.datepicker._hideDatepicker();
14759					$.datepicker._showDatepicker( input[ 0 ] );
14760				} else {
14761					$.datepicker._showDatepicker( input[ 0 ] );
14762				}
14763				return false;
14764			} );
14765		}
14766	},
14767
14768	/* Apply the maximum length for the date format. */
14769	_autoSize: function( inst ) {
14770		if ( this._get( inst, "autoSize" ) && !inst.inline ) {
14771			var findMax, max, maxI, i,
14772				date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
14773				dateFormat = this._get( inst, "dateFormat" );
14774
14775			if ( dateFormat.match( /[DM]/ ) ) {
14776				findMax = function( names ) {
14777					max = 0;
14778					maxI = 0;
14779					for ( i = 0; i < names.length; i++ ) {
14780						if ( names[ i ].length > max ) {
14781							max = names[ i ].length;
14782							maxI = i;
14783						}
14784					}
14785					return maxI;
14786				};
14787				date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
14788					"monthNames" : "monthNamesShort" ) ) ) );
14789				date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
14790					"dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
14791			}
14792			inst.input.attr( "size", this._formatDate( inst, date ).length );
14793		}
14794	},
14795
14796	/* Attach an inline date picker to a div. */
14797	_inlineDatepicker: function( target, inst ) {
14798		var divSpan = $( target );
14799		if ( divSpan.hasClass( this.markerClassName ) ) {
14800			return;
14801		}
14802		divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
14803		$.data( target, "datepicker", inst );
14804		this._setDate( inst, this._getDefaultDate( inst ), true );
14805		this._updateDatepicker( inst );
14806		this._updateAlternate( inst );
14807
14808		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
14809		if ( inst.settings.disabled ) {
14810			this._disableDatepicker( target );
14811		}
14812
14813		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
14814		// https://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
14815		inst.dpDiv.css( "display", "block" );
14816	},
14817
14818	/* Pop-up the date picker in a "dialog" box.
14819	 * @param  input element - ignored
14820	 * @param  date	string or Date - the initial date to display
14821	 * @param  onSelect  function - the function to call when a date is selected
14822	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
14823	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
14824	 *					event - with x/y coordinates or
14825	 *					leave empty for default (screen centre)
14826	 * @return the manager object
14827	 */
14828	_dialogDatepicker: function( input, date, onSelect, settings, pos ) {
14829		var id, browserWidth, browserHeight, scrollX, scrollY,
14830			inst = this._dialogInst; // internal instance
14831
14832		if ( !inst ) {
14833			this.uuid += 1;
14834			id = "dp" + this.uuid;
14835			this._dialogInput = $( "<input type='text' id='" + id +
14836				"' style='position: absolute; top: -100px; width: 0px;'/>" );
14837			this._dialogInput.on( "keydown", this._doKeyDown );
14838			$( "body" ).append( this._dialogInput );
14839			inst = this._dialogInst = this._newInst( this._dialogInput, false );
14840			inst.settings = {};
14841			$.data( this._dialogInput[ 0 ], "datepicker", inst );
14842		}
14843		datepicker_extendRemove( inst.settings, settings || {} );
14844		date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
14845		this._dialogInput.val( date );
14846
14847		this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
14848		if ( !this._pos ) {
14849			browserWidth = document.documentElement.clientWidth;
14850			browserHeight = document.documentElement.clientHeight;
14851			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
14852			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
14853			this._pos = // should use actual width/height below
14854				[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
14855		}
14856
14857		// Move input on screen for focus, but hidden behind dialog
14858		this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
14859		inst.settings.onSelect = onSelect;
14860		this._inDialog = true;
14861		this.dpDiv.addClass( this._dialogClass );
14862		this._showDatepicker( this._dialogInput[ 0 ] );
14863		if ( $.blockUI ) {
14864			$.blockUI( this.dpDiv );
14865		}
14866		$.data( this._dialogInput[ 0 ], "datepicker", inst );
14867		return this;
14868	},
14869
14870	/* Detach a datepicker from its control.
14871	 * @param  target	element - the target input field or division or span
14872	 */
14873	_destroyDatepicker: function( target ) {
14874		var nodeName,
14875			$target = $( target ),
14876			inst = $.data( target, "datepicker" );
14877
14878		if ( !$target.hasClass( this.markerClassName ) ) {
14879			return;
14880		}
14881
14882		nodeName = target.nodeName.toLowerCase();
14883		$.removeData( target, "datepicker" );
14884		if ( nodeName === "input" ) {
14885			inst.append.remove();
14886			inst.trigger.remove();
14887			$target.removeClass( this.markerClassName ).
14888				off( "focus", this._showDatepicker ).
14889				off( "keydown", this._doKeyDown ).
14890				off( "keypress", this._doKeyPress ).
14891				off( "keyup", this._doKeyUp );
14892		} else if ( nodeName === "div" || nodeName === "span" ) {
14893			$target.removeClass( this.markerClassName ).empty();
14894		}
14895
14896		
14896$.datepicker._hideDatepicker();
vendor: 15,786 bytes, lines 14896-15360
14896
14897		if ( datepicker_instActive === inst ) {
14898			datepicker_instActive = null;
14899			this._curInst = null;
14900		}
14901	},
14902
14903	/* Enable the date picker to a jQuery selection.
14904	 * @param  target	element - the target input field or division or span
14905	 */
14906	_enableDatepicker: function( target ) {
14907		var nodeName, inline,
14908			$target = $( target ),
14909			inst = $.data( target, "datepicker" );
14910
14911		if ( !$target.hasClass( this.markerClassName ) ) {
14912			return;
14913		}
14914
14915		nodeName = target.nodeName.toLowerCase();
14916		if ( nodeName === "input" ) {
14917			target.disabled = false;
14918			inst.trigger.filter( "button" ).
14919				each( function() {
14920					this.disabled = false;
14921				} ).end().
14922				filter( "img" ).css( { opacity: "1.0", cursor: "" } );
14923		} else if ( nodeName === "div" || nodeName === "span" ) {
14924			inline = $target.children( "." + this._inlineClass );
14925			inline.children().removeClass( "ui-state-disabled" );
14926			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
14927				prop( "disabled", false );
14928		}
14929		this._disabledInputs = $.map( this._disabledInputs,
14930
14931			// Delete entry
14932			function( value ) {
14933				return ( value === target ? null : value );
14934			} );
14935	},
14936
14937	/* Disable the date picker to a jQuery selection.
14938	 * @param  target	element - the target input field or division or span
14939	 */
14940	_disableDatepicker: function( target ) {
14941		var nodeName, inline,
14942			$target = $( target ),
14943			inst = $.data( target, "datepicker" );
14944
14945		if ( !$target.hasClass( this.markerClassName ) ) {
14946			return;
14947		}
14948
14949		nodeName = target.nodeName.toLowerCase();
14950		if ( nodeName === "input" ) {
14951			target.disabled = true;
14952			inst.trigger.filter( "button" ).
14953				each( function() {
14954					this.disabled = true;
14955				} ).end().
14956				filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
14957		} else if ( nodeName === "div" || nodeName === "span" ) {
14958			inline = $target.children( "." + this._inlineClass );
14959			inline.children().addClass( "ui-state-disabled" );
14960			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
14961				prop( "disabled", true );
14962		}
14963		this._disabledInputs = $.map( this._disabledInputs,
14964
14965			// Delete entry
14966			function( value ) {
14967				return ( value === target ? null : value );
14968			} );
14969		this._disabledInputs[ this._disabledInputs.length ] = target;
14970	},
14971
14972	/* Is the first field in a jQuery collection disabled as a datepicker?
14973	 * @param  target	element - the target input field or division or span
14974	 * @return boolean - true if disabled, false if enabled
14975	 */
14976	_isDisabledDatepicker: function( target ) {
14977		if ( !target ) {
14978			return false;
14979		}
14980		for ( var i = 0; i < this._disabledInputs.length; i++ ) {
14981			if ( this._disabledInputs[ i ] === target ) {
14982				return true;
14983			}
14984		}
14985		return false;
14986	},
14987
14988	/* Retrieve the instance data for the target control.
14989	 * @param  target  element - the target input field or division or span
14990	 * @return  object - the associated instance data
14991	 * @throws  error if a jQuery problem getting data
14992	 */
14993	_getInst: function( target ) {
14994		try {
14995			return $.data( target, "datepicker" );
14996		} catch ( err ) {
14997			throw "Missing instance data for this datepicker";
14998		}
14999	},
15000
15001	/* Update or retrieve the settings for a date picker attached to an input field or division.
15002	 * @param  target  element - the target input field or division or span
15003	 * @param  name	object - the new settings to update or
15004	 *				string - the name of the setting to change or retrieve,
15005	 *				when retrieving also "all" for all instance settings or
15006	 *				"defaults" for all global defaults
15007	 * @param  value   any - the new value for the setting
15008	 *				(omit if above is an object or to retrieve a value)
15009	 */
15010	_optionDatepicker: function( target, name, value ) {
15011		var settings, date, minDate, maxDate,
15012			inst = this._getInst( target );
15013
15014		if ( arguments.length === 2 && typeof name === "string" ) {
15015			return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
15016				( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
15017				this._get( inst, name ) ) : null ) );
15018		}
15019
15020		settings = name || {};
15021		if ( typeof name === "string" ) {
15022			settings = {};
15023			settings[ name ] = value;
15024		}
15025
15026		if ( inst ) {
15027			if ( this._curInst === inst ) {
15028				this._hideDatepicker();
15029			}
15030
15031			date = this._getDateDatepicker( target, true );
15032			minDate = this._getMinMaxDate( inst, "min" );
15033			maxDate = this._getMinMaxDate( inst, "max" );
15034			datepicker_extendRemove( inst.settings, settings );
15035
15036			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
15037			if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
15038				inst.settings.minDate = this._formatDate( inst, minDate );
15039			}
15040			if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
15041				inst.settings.maxDate = this._formatDate( inst, maxDate );
15042			}
15043			if ( "disabled" in settings ) {
15044				if ( settings.disabled ) {
15045					this._disableDatepicker( target );
15046				} else {
15047					this._enableDatepicker( target );
15048				}
15049			}
15050			this._attachments( $( target ), inst );
15051			this._autoSize( inst );
15052			this._setDate( inst, date );
15053			this._updateAlternate( inst );
15054			this._updateDatepicker( inst );
15055		}
15056	},
15057
15058	// Change method deprecated
15059	_changeDatepicker: function( target, name, value ) {
15060		this._optionDatepicker( target, name, value );
15061	},
15062
15063	/* Redraw the date picker attached to an input field or division.
15064	 * @param  target  element - the target input field or division or span
15065	 */
15066	_refreshDatepicker: function( target ) {
15067		var inst = this._getInst( target );
15068		if ( inst ) {
15069			this._updateDatepicker( inst );
15070		}
15071	},
15072
15073	/* Set the dates for a jQuery selection.
15074	 * @param  target element - the target input field or division or span
15075	 * @param  date	Date - the new date
15076	 */
15077	_setDateDatepicker: function( target, date ) {
15078		var inst = this._getInst( target );
15079		if ( inst ) {
15080			this._setDate( inst, date );
15081			this._updateDatepicker( inst );
15082			this._updateAlternate( inst );
15083		}
15084	},
15085
15086	/* Get the date(s) for the first entry in a jQuery selection.
15087	 * @param  target element - the target input field or division or span
15088	 * @param  noDefault boolean - true if no default date is to be used
15089	 * @return Date - the current date
15090	 */
15091	_getDateDatepicker: function( target, noDefault ) {
15092		var inst = this._getInst( target );
15093		if ( inst && !inst.inline ) {
15094			this._setDateFromField( inst, noDefault );
15095		}
15096		return ( inst ? this._getDate( inst ) : null );
15097	},
15098
15099	/* Handle keystrokes. */
15100	_doKeyDown: function( event ) {
15101		var onSelect, dateStr, sel,
15102			inst = $.datepicker._getInst( event.target ),
15103			handled = true,
15104			isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );
15105
15106		inst._keyEvent = true;
15107		if ( $.datepicker._datepickerShowing ) {
15108			switch ( event.keyCode ) {
15109				case 9: $.datepicker._hideDatepicker();
15110						handled = false;
15111						break; // hide on tab out
15112				case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
15113									$.datepicker._currentClass + ")", inst.dpDiv );
15114						if ( sel[ 0 ] ) {
15115							$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
15116						}
15117
15118						onSelect = $.datepicker._get( inst, "onSelect" );
15119						if ( onSelect ) {
15120							dateStr = $.datepicker._formatDate( inst );
15121
15122							// Trigger custom callback
15123							onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
15124						} else {
15125							$.datepicker._hideDatepicker();
15126						}
15127
15128						return false; // don't submit the form
15129				case 27: $.datepicker._hideDatepicker();
15130						break; // hide on escape
15131				case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15132							-$.datepicker._get( inst, "stepBigMonths" ) :
15133							-$.datepicker._get( inst, "stepMonths" ) ), "M" );
15134						break; // previous month/year on page up/+ ctrl
15135				case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15136							+$.datepicker._get( inst, "stepBigMonths" ) :
15137							+$.datepicker._get( inst, "stepMonths" ) ), "M" );
15138						break; // next month/year on page down/+ ctrl
15139				case 35: if ( event.ctrlKey || event.metaKey ) {
15140							$.datepicker._clearDate( event.target );
15141						}
15142						handled = event.ctrlKey || event.metaKey;
15143						break; // clear on ctrl or command +end
15144				case 36: if ( event.ctrlKey || event.metaKey ) {
15145							$.datepicker._gotoToday( event.target );
15146						}
15147						handled = event.ctrlKey || event.metaKey;
15148						break; // current on ctrl or command +home
15149				case 37: if ( event.ctrlKey || event.metaKey ) {
15150							$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
15151						}
15152						handled = event.ctrlKey || event.metaKey;
15153
15154						// -1 day on ctrl or command +left
15155						if ( event.originalEvent.altKey ) {
15156							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15157								-$.datepicker._get( inst, "stepBigMonths" ) :
15158								-$.datepicker._get( inst, "stepMonths" ) ), "M" );
15159						}
15160
15161						// next month/year on alt +left on Mac
15162						break;
15163				case 38: if ( event.ctrlKey || event.metaKey ) {
15164							$.datepicker._adjustDate( event.target, -7, "D" );
15165						}
15166						handled = event.ctrlKey || event.metaKey;
15167						break; // -1 week on ctrl or command +up
15168				case 39: if ( event.ctrlKey || event.metaKey ) {
15169							$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
15170						}
15171						handled = event.ctrlKey || event.metaKey;
15172
15173						// +1 day on ctrl or command +right
15174						if ( event.originalEvent.altKey ) {
15175							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
15176								+$.datepicker._get( inst, "stepBigMonths" ) :
15177								+$.datepicker._get( inst, "stepMonths" ) ), "M" );
15178						}
15179
15180						// next month/year on alt +right
15181						break;
15182				case 40: if ( event.ctrlKey || event.metaKey ) {
15183							$.datepicker._adjustDate( event.target, +7, "D" );
15184						}
15185						handled = event.ctrlKey || event.metaKey;
15186						break; // +1 week on ctrl or command +down
15187				default: handled = false;
15188			}
15189		} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
15190			$.datepicker._showDatepicker( this );
15191		} else {
15192			handled = false;
15193		}
15194
15195		if ( handled ) {
15196			event.preventDefault();
15197			event.stopPropagation();
15198		}
15199	},
15200
15201	/* Filter entered characters - based on date format. */
15202	_doKeyPress: function( event ) {
15203		var chars, chr,
15204			inst = $.datepicker._getInst( event.target );
15205
15206		if ( $.datepicker._get( inst, "constrainInput" ) ) {
15207			chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
15208			chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
15209			return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
15210		}
15211	},
15212
15213	/* Synchronise manual entry and field/alternate field. */
15214	_doKeyUp: function( event ) {
15215		var date,
15216			inst = $.datepicker._getInst( event.target );
15217
15218		if ( inst.input.val() !== inst.lastVal ) {
15219			try {
15220				date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
15221					( inst.input ? inst.input.val() : null ),
15222					$.datepicker._getFormatConfig( inst ) );
15223
15224				if ( date ) { // only if valid
15225					$.datepicker._setDateFromField( inst );
15226					$.datepicker._updateAlternate( inst );
15227					$.datepicker._updateDatepicker( inst );
15228				}
15229			} catch ( err ) {
15230			}
15231		}
15232		return true;
15233	},
15234
15235	/* Pop-up the date picker for a given input field.
15236	 * If false returned from beforeShow event handler do not show.
15237	 * @param  input  element - the input field attached to the date picker or
15238	 *					event - if triggered by focus
15239	 */
15240	_showDatepicker: function( input ) {
15241		input = input.target || input;
15242		if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
15243			input = $( "input", input.parentNode )[ 0 ];
15244		}
15245
15246		if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
15247			return;
15248		}
15249
15250		var inst, beforeShow, beforeShowSettings, isFixed,
15251			offset, showAnim, duration;
15252
15253		inst = $.datepicker._getInst( input );
15254		if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
15255			$.datepicker._curInst.dpDiv.stop( true, true );
15256			if ( inst && $.datepicker._datepickerShowing ) {
15257				$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
15258			}
15259		}
15260
15261		beforeShow = $.datepicker._get( inst, "beforeShow" );
15262		beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
15263		if ( beforeShowSettings === false ) {
15264			return;
15265		}
15266		datepicker_extendRemove( inst.settings, beforeShowSettings );
15267
15268		inst.lastVal = null;
15269		$.datepicker._lastInput = input;
15270		$.datepicker._setDateFromField( inst );
15271
15272		if ( $.datepicker._inDialog ) { // hide cursor
15273			input.value = "";
15274		}
15275		if ( !$.datepicker._pos ) { // position below input
15276			$.datepicker._pos = $.datepicker._findPos( input );
15277			$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
15278		}
15279
15280		isFixed = false;
15281		$( input ).parents().each( function() {
15282			isFixed |= $( this ).css( "position" ) === "fixed";
15283			return !isFixed;
15284		} );
15285
15286		offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
15287		$.datepicker._pos = null;
15288
15289		//to avoid flashes on Firefox
15290		inst.dpDiv.empty();
15291
15292		// determine sizing offscreen
15293		inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
15294		$.datepicker._updateDatepicker( inst );
15295
15296		// fix width for dynamic number of date pickers
15297		// and adjust position before showing
15298		offset = $.datepicker._checkOffset( inst, offset, isFixed );
15299		inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
15300			"static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
15301			left: offset.left + "px", top: offset.top + "px" } );
15302
15303		if ( !inst.inline ) {
15304			showAnim = $.datepicker._get( inst, "showAnim" );
15305			duration = $.datepicker._get( inst, "duration" );
15306			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
15307			$.datepicker._datepickerShowing = true;
15308
15309			if ( $.effects && $.effects.effect[ showAnim ] ) {
15310				inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
15311			} else {
15312				inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
15313			}
15314
15315			if ( $.datepicker._shouldFocusInput( inst ) ) {
15316				inst.input.trigger( "focus" );
15317			}
15318
15319			$.datepicker._curInst = inst;
15320		}
15321	},
15322
15323	/* Generate the date picker content. */
15324	_updateDatepicker: function( inst ) {
15325		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
15326		datepicker_instActive = inst; // for delegate hover events
15327		inst.dpDiv.empty().append( this._generateHTML( inst ) );
15328		this._attachHandlers( inst );
15329
15330		var origyearshtml,
15331			numMonths = this._getNumberOfMonths( inst ),
15332			cols = numMonths[ 1 ],
15333			width = 17,
15334			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
15335			onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );
15336
15337		if ( activeCell.length > 0 ) {
15338			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
15339		}
15340
15341		inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
15342		if ( cols > 1 ) {
15343			inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
15344		}
15345		inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
15346			"Class" ]( "ui-datepicker-multi" );
15347		inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
15348			"Class" ]( "ui-datepicker-rtl" );
15349
15350		if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
15351			inst.input.trigger( "focus" );
15352		}
15353
15354		// Deffered render of the years select (to avoid flashes on Firefox)
15355		if ( inst.yearshtml ) {
15356			origyearshtml = inst.yearshtml;
15357			setTimeout( function() {
15358
15359				//assure that inst.yearshtml didn't change.
15360				if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
vendor: 5,251 bytes, lines 15361-15515
15361					inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
15362				}
15363				origyearshtml = inst.yearshtml = null;
15364			}, 0 );
15365		}
15366
15367		if ( onUpdateDatepicker ) {
15368			onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
15369		}
15370	},
15371
15372	_shouldFocusInput: function( inst ) {
15373		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" );
15374	},
15375
15376	/* Check positioning to remain on screen. */
15377	_checkOffset: function( inst, offset, isFixed ) {
15378		var dpWidth = inst.dpDiv.outerWidth(),
15379			dpHeight = inst.dpDiv.outerHeight(),
15380			inputWidth = inst.input ? inst.input.outerWidth() : 0,
15381			inputHeight = inst.input ? inst.input.outerHeight() : 0,
15382			viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
15383			viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );
15384
15385		offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
15386		offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
15387		offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;
15388
15389		// Now check if datepicker is showing outside window viewport - move to a better place if so.
15390		offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
15391			Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
15392		offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
15393			Math.abs( dpHeight + inputHeight ) : 0 );
15394
15395		return offset;
15396	},
15397
15398	/* Find an object's position on the screen. */
15399	_findPos: function( obj ) {
15400		var position,
15401			inst = this._getInst( obj ),
15402			isRTL = this._get( inst, "isRTL" );
15403
15404		while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
15405			obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
15406		}
15407
15408		position = $( obj ).offset();
15409		return [ position.left, position.top ];
15410	},
15411
15412	/* Hide the date picker from view.
15413	 * @param  input  element - the input field attached to the date picker
15414	 */
15415	_hideDatepicker: function( input ) {
15416		var showAnim, duration, postProcess, onClose,
15417			inst = this._curInst;
15418
15419		if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
15420			return;
15421		}
15422
15423		if ( this._datepickerShowing ) {
15424			showAnim = this._get( inst, "showAnim" );
15425			duration = this._get( inst, "duration" );
15426			postProcess = function() {
15427				$.datepicker._tidyDialog( inst );
15428			};
15429
15430			if ( $.effects && ( $.effects.effect[ showAnim ] ) ) {
15431				inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
15432			} else {
15433				inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
15434					( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
15435			}
15436
15437			if ( !showAnim ) {
15438				postProcess();
15439			}
15440			this._datepickerShowing = false;
15441
15442			onClose = this._get( inst, "onClose" );
15443			if ( onClose ) {
15444				onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
15445			}
15446
15447			this._lastInput = null;
15448			if ( this._inDialog ) {
15449				this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
15450				if ( $.blockUI ) {
15451					$.unblockUI();
15452					$( "body" ).append( this.dpDiv );
15453				}
15454			}
15455			this._inDialog = false;
15456		}
15457	},
15458
15459	/* Tidy up after a dialog display. */
15460	_tidyDialog: function( inst ) {
15461		inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
15462	},
15463
15464	/* Close date picker if clicked elsewhere. */
15465	_checkExternalClick: function( event ) {
15466		if ( !$.datepicker._curInst ) {
15467			return;
15468		}
15469
15470		var $target = $( event.target ),
15471			inst = $.datepicker._getInst( $target[ 0 ] );
15472
15473		if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
15474				$target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
15475				!$target.hasClass( $.datepicker.markerClassName ) &&
15476				!$target.closest( "." + $.datepicker._triggerClass ).length &&
15477				$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
15478			( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
15479				$.datepicker._hideDatepicker();
15480		}
15481	},
15482
15483	/* Adjust one of the date sub-fields. */
15484	_adjustDate: function( id, offset, period ) {
15485		var target = $( id ),
15486			inst = this._getInst( target[ 0 ] );
15487
15488		if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
15489			return;
15490		}
15491		this._adjustInstDate( inst, offset, period );
15492		this._updateDatepicker( inst );
15493	},
15494
15495	/* Action for current link. */
15496	_gotoToday: function( id ) {
15497		var date,
15498			target = $( id ),
15499			inst = this._getInst( target[ 0 ] );
15500
15501		if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
15502			inst.selectedDay = inst.currentDay;
15503			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
15504			inst.drawYear = inst.selectedYear = inst.currentYear;
15505		} else {
15506			date = new Date();
15507			inst.selectedDay = date.getDate();
15508			inst.drawMonth = inst.selectedMonth = date.getMonth();
15509			inst.drawYear = inst.selectedYear = date.getFullYear();
15510		}
15511		this._notifyChange( inst );
15512		this._adjustDate( target );
15513	},
15514
15515	/* Action for selecting a new month/year. */
vendor: 4,615 bytes, lines 15516-15647
15516	_selectMonthYear: function( id, select, period ) {
15517		var target = $( id ),
15518			inst = this._getInst( target[ 0 ] );
15519
15520		inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
15521		inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
15522			parseInt( select.options[ select.selectedIndex ].value, 10 );
15523
15524		this._notifyChange( inst );
15525		this._adjustDate( target );
15526	},
15527
15528	/* Action for selecting a day. */
15529	_selectDay: function( id, month, year, td ) {
15530		var inst,
15531			target = $( id );
15532
15533		if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
15534			return;
15535		}
15536
15537		inst = this._getInst( target[ 0 ] );
15538		inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
15539		inst.selectedMonth = inst.currentMonth = month;
15540		inst.selectedYear = inst.currentYear = year;
15541		this._selectDate( id, this._formatDate( inst,
15542			inst.currentDay, inst.currentMonth, inst.currentYear ) );
15543	},
15544
15545	/* Erase the input field and hide the date picker. */
15546	_clearDate: function( id ) {
15547		var target = $( id );
15548		this._selectDate( target, "" );
15549	},
15550
15551	/* Update the input field with the selected date. */
15552	_selectDate: function( id, dateStr ) {
15553		var onSelect,
15554			target = $( id ),
15555			inst = this._getInst( target[ 0 ] );
15556
15557		dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
15558		if ( inst.input ) {
15559			inst.input.val( dateStr );
15560		}
15561		this._updateAlternate( inst );
15562
15563		onSelect = this._get( inst, "onSelect" );
15564		if ( onSelect ) {
15565			onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );  // trigger custom callback
15566		} else if ( inst.input ) {
15567			inst.input.trigger( "change" ); // fire the change event
15568		}
15569
15570		if ( inst.inline ) {
15571			this._updateDatepicker( inst );
15572		} else {
15573			this._hideDatepicker();
15574			this._lastInput = inst.input[ 0 ];
15575			if ( typeof( inst.input[ 0 ] ) !== "object" ) {
15576				inst.input.trigger( "focus" ); // restore focus
15577			}
15578			this._lastInput = null;
15579		}
15580	},
15581
15582	/* Update any alternate field to synchronise with the main field. */
15583	_updateAlternate: function( inst ) {
15584		var altFormat, date, dateStr,
15585			altField = this._get( inst, "altField" );
15586
15587		if ( altField ) { // update alternate field too
15588			altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
15589			date = this._getDate( inst );
15590			dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
15591			$( document ).find( altField ).val( dateStr );
15592		}
15593	},
15594
15595	/* Set as beforeShowDay function to prevent selection of weekends.
15596	 * @param  date  Date - the date to customise
15597	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
15598	 */
15599	noWeekends: function( date ) {
15600		var day = date.getDay();
15601		return [ ( day > 0 && day < 6 ), "" ];
15602	},
15603
15604	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
15605	 * @param  date  Date - the date to get the week for
15606	 * @return  number - the number of the week within the year that contains this date
15607	 */
15608	iso8601Week: function( date ) {
15609		var time,
15610			checkDate = new Date( date.getTime() );
15611
15612		// Find Thursday of this week starting on Monday
15613		checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );
15614
15615		time = checkDate.getTime();
15616		checkDate.setMonth( 0 ); // Compare with Jan 1
15617		checkDate.setDate( 1 );
15618		return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
15619	},
15620
15621	/* Parse a string value into a date object.
15622	 * See formatDate below for the possible formats.
15623	 *
15624	 * @param  format string - the expected format of the date
15625	 * @param  value string - the date in the above format
15626	 * @param  settings Object - attributes include:
15627	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
15628	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
15629	 *					dayNames		string[7] - names of the days from Sunday (optional)
15630	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
15631	 *					monthNames		string[12] - names of the months (optional)
15632	 * @return  Date - the extracted date value or null if value is blank
15633	 */
15634	parseDate: function( format, value, settings ) {
15635		if ( format == null || value == null ) {
15636			throw "Invalid arguments";
15637		}
15638
15639		value = ( typeof value === "object" ? value.toString() : value + "" );
15640		if ( value === "" ) {
15641			return null;
15642		}
15643
15644		var iFormat, dim, extra,
15645			iValue = 0,
15646			shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
15647			shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp 
vendor: 5,431 bytes, lines 15647-15837
15647:
15648				new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
15649			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
15650			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
15651			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
15652			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
15653			year = -1,
15654			month = -1,
15655			day = -1,
15656			doy = -1,
15657			literal = false,
15658			date,
15659
15660			// Check whether a format character is doubled
15661			lookAhead = function( match ) {
15662				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
15663				if ( matches ) {
15664					iFormat++;
15665				}
15666				return matches;
15667			},
15668
15669			// Extract a number from the string value
15670			getNumber = function( match ) {
15671				var isDoubled = lookAhead( match ),
15672					size = ( match === "@" ? 14 : ( match === "!" ? 20 :
15673					( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
15674					minSize = ( match === "y" ? size : 1 ),
15675					digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
15676					num = value.substring( iValue ).match( digits );
15677				if ( !num ) {
15678					throw "Missing number at position " + iValue;
15679				}
15680				iValue += num[ 0 ].length;
15681				return parseInt( num[ 0 ], 10 );
15682			},
15683
15684			// Extract a name from the string value and convert to an index
15685			getName = function( match, shortNames, longNames ) {
15686				var index = -1,
15687					names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
15688						return [ [ k, v ] ];
15689					} ).sort( function( a, b ) {
15690						return -( a[ 1 ].length - b[ 1 ].length );
15691					} );
15692
15693				$.each( names, function( i, pair ) {
15694					var name = pair[ 1 ];
15695					if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
15696						index = pair[ 0 ];
15697						iValue += name.length;
15698						return false;
15699					}
15700				} );
15701				if ( index !== -1 ) {
15702					return index + 1;
15703				} else {
15704					throw "Unknown name at position " + iValue;
15705				}
15706			},
15707
15708			// Confirm that a literal character matches the string value
15709			checkLiteral = function() {
15710				if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
15711					throw "Unexpected literal at position " + iValue;
15712				}
15713				iValue++;
15714			};
15715
15716		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
15717			if ( literal ) {
15718				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
15719					literal = false;
15720				} else {
15721					checkLiteral();
15722				}
15723			} else {
15724				switch ( format.charAt( iFormat ) ) {
15725					case "d":
15726						day = getNumber( "d" );
15727						break;
15728					case "D":
15729						getName( "D", dayNamesShort, dayNames );
15730						break;
15731					case "o":
15732						doy = getNumber( "o" );
15733						break;
15734					case "m":
15735						month = getNumber( "m" );
15736						break;
15737					case "M":
15738						month = getName( "M", monthNamesShort, monthNames );
15739						break;
15740					case "y":
15741						year = getNumber( "y" );
15742						break;
15743					case "@":
15744						date = new Date( getNumber( "@" ) );
15745						year = date.getFullYear();
15746						month = date.getMonth() + 1;
15747						day = date.getDate();
15748						break;
15749					case "!":
15750						date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
15751						year = date.getFullYear();
15752						month = date.getMonth() + 1;
15753						day = date.getDate();
15754						break;
15755					case "'":
15756						if ( lookAhead( "'" ) ) {
15757							checkLiteral();
15758						} else {
15759							literal = true;
15760						}
15761						break;
15762					default:
15763						checkLiteral();
15764				}
15765			}
15766		}
15767
15768		if ( iValue < value.length ) {
15769			extra = value.substr( iValue );
15770			if ( !/^\s+/.test( extra ) ) {
15771				throw "Extra/unparsed characters found in date: " + extra;
15772			}
15773		}
15774
15775		if ( year === -1 ) {
15776			year = new Date().getFullYear();
15777		} else if ( year < 100 ) {
15778			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
15779				( year <= shortYearCutoff ? 0 : -100 );
15780		}
15781
15782		if ( doy > -1 ) {
15783			month = 1;
15784			day = doy;
15785			do {
15786				dim = this._getDaysInMonth( year, month - 1 );
15787				if ( day <= dim ) {
15788					break;
15789				}
15790				month++;
15791				day -= dim;
15792			} while ( true );
15793		}
15794
15795		date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
15796		if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
15797			throw "Invalid date"; // E.g. 31/02/00
15798		}
15799		return date;
15800	},
15801
15802	/* Standard date formats. */
15803	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
15804	COOKIE: "D, dd M yy",
15805	ISO_8601: "yy-mm-dd",
15806	RFC_822: "D, d M y",
15807	RFC_850: "DD, dd-M-y",
15808	RFC_1036: "D, d M y",
15809	RFC_1123: "D, d M yy",
15810	RFC_2822: "D, d M yy",
15811	RSS: "D, d M y", // RFC 822
15812	TICKS: "!",
15813	TIMESTAMP: "@",
15814	W3C: "yy-mm-dd", // ISO 8601
15815
15816	_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
15817		Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),
15818
15819	/* Format a date object into a string value.
15820	 * The format can be combinations of the following:
15821	 * d  - day of month (no leading zero)
15822	 * dd - day of month (two digit)
15823	 * o  - day of year (no leading zeros)
15824	 * oo - day of year (three digit)
15825	 * D  - day name short
15826	 * DD - day name long
15827	 * m  - month of year (no leading zero)
15828	 * mm - month of year (two digit)
15829	 * M  - month name short
15830	 * MM - month name long
15831	 * y  - year (two digit)
15832	 * yy - year (four digit)
15833	 * @ - Unix timestamp (ms since 01/01/1970)
15834	 * ! - Windows ticks (100ns since 01/01/0001)
15835	 * "..." - literal text
15836	 * '' - single quote
15837	 *
vendor: 6,198 bytes, lines 15838-16037
15838	 * @param  format string - the desired format of the date
15839	 * @param  date Date - the date value to format
15840	 * @param  settings Object - attributes include:
15841	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
15842	 *					dayNames		string[7] - names of the days from Sunday (optional)
15843	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
15844	 *					monthNames		string[12] - names of the months (optional)
15845	 * @return  string - the date in the above format
15846	 */
15847	formatDate: function( format, date, settings ) {
15848		if ( !date ) {
15849			return "";
15850		}
15851
15852		var iFormat,
15853			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
15854			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
15855			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
15856			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
15857
15858			// Check whether a format character is doubled
15859			lookAhead = function( match ) {
15860				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
15861				if ( matches ) {
15862					iFormat++;
15863				}
15864				return matches;
15865			},
15866
15867			// Format a number, with leading zero if necessary
15868			formatNumber = function( match, value, len ) {
15869				var num = "" + value;
15870				if ( lookAhead( match ) ) {
15871					while ( num.length < len ) {
15872						num = "0" + num;
15873					}
15874				}
15875				return num;
15876			},
15877
15878			// Format a name, short or long as requested
15879			formatName = function( match, value, shortNames, longNames ) {
15880				return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
15881			},
15882			output = "",
15883			literal = false;
15884
15885		if ( date ) {
15886			for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
15887				if ( literal ) {
15888					if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
15889						literal = false;
15890					} else {
15891						output += format.charAt( iFormat );
15892					}
15893				} else {
15894					switch ( format.charAt( iFormat ) ) {
15895						case "d":
15896							output += formatNumber( "d", date.getDate(), 2 );
15897							break;
15898						case "D":
15899							output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
15900							break;
15901						case "o":
15902							output += formatNumber( "o",
15903								Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
15904							break;
15905						case "m":
15906							output += formatNumber( "m", date.getMonth() + 1, 2 );
15907							break;
15908						case "M":
15909							output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
15910							break;
15911						case "y":
15912							output += ( lookAhead( "y" ) ? date.getFullYear() :
15913								( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
15914							break;
15915						case "@":
15916							output += date.getTime();
15917							break;
15918						case "!":
15919							output += date.getTime() * 10000 + this._ticksTo1970;
15920							break;
15921						case "'":
15922							if ( lookAhead( "'" ) ) {
15923								output += "'";
15924							} else {
15925								literal = true;
15926							}
15927							break;
15928						default:
15929							output += format.charAt( iFormat );
15930					}
15931				}
15932			}
15933		}
15934		return output;
15935	},
15936
15937	/* Extract all possible characters from the date format. */
15938	_possibleChars: function( format ) {
15939		var iFormat,
15940			chars = "",
15941			literal = false,
15942
15943			// Check whether a format character is doubled
15944			lookAhead = function( match ) {
15945				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
15946				if ( matches ) {
15947					iFormat++;
15948				}
15949				return matches;
15950			};
15951
15952		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
15953			if ( literal ) {
15954				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
15955					literal = false;
15956				} else {
15957					chars += format.charAt( iFormat );
15958				}
15959			} else {
15960				switch ( format.charAt( iFormat ) ) {
15961					case "d": case "m": case "y": case "@":
15962						chars += "0123456789";
15963						break;
15964					case "D": case "M":
15965						return null; // Accept anything
15966					case "'":
15967						if ( lookAhead( "'" ) ) {
15968							chars += "'";
15969						} else {
15970							literal = true;
15971						}
15972						break;
15973					default:
15974						chars += format.charAt( iFormat );
15975				}
15976			}
15977		}
15978		return chars;
15979	},
15980
15981	/* Get a setting value, defaulting if necessary. */
15982	_get: function( inst, name ) {
15983		return inst.settings[ name ] !== undefined ?
15984			inst.settings[ name ] : this._defaults[ name ];
15985	},
15986
15987	/* Parse existing date and initialise date picker. */
15988	_setDateFromField: function( inst, noDefault ) {
15989		if ( inst.input.val() === inst.lastVal ) {
15990			return;
15991		}
15992
15993		var dateFormat = this._get( inst, "dateFormat" ),
15994			dates = inst.lastVal = inst.input ? inst.input.val() : null,
15995			defaultDate = this._getDefaultDate( inst ),
15996			date = defaultDate,
15997			settings = this._getFormatConfig( inst );
15998
15999		try {
16000			date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
16001		} catch ( event ) {
16002			dates = ( noDefault ? "" : dates );
16003		}
16004		inst.selectedDay = date.getDate();
16005		inst.drawMonth = inst.selectedMonth = date.getMonth();
16006		inst.drawYear = inst.selectedYear = date.getFullYear();
16007		inst.currentDay = ( dates ? date.getDate() : 0 );
16008		inst.currentMonth = ( dates ? date.getMonth() : 0 );
16009		inst.currentYear = ( dates ? date.getFullYear() : 0 );
16010		this._adjustInstDate( inst );
16011	},
16012
16013	/* Retrieve the default date shown on opening. */
16014	_getDefaultDate: function( inst ) {
16015		return this._restrictMinMax( inst,
16016			this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
16017	},
16018
16019	/* A date may be specified as an exact value or a relative one. */
16020	_determineDate: function( inst, date, defaultDate ) {
16021		var offsetNumeric = function( offset ) {
16022				var date = new Date();
16023				date.setDate( date.getDate() + offset );
16024				return date;
16025			},
16026			offsetString = function( offset ) {
16027				try {
16028					return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
16029						offset, $.datepicker._getFormatConfig( inst ) );
16030				} catch ( e ) {
16031
16032					// Ignore
16033				}
16034
16035				var date = ( offset.toLowerCase().match( /^c/ ) ?
16036					$.datepicker._getDate( inst ) : null ) || new Date(),
16037					year = date.getFullYear(),
vendor: 5,359 bytes, lines 16038-16176
16038					month = date.getMonth(),
16039					day = date.getDate(),
16040					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
16041					matches = pattern.exec( offset );
16042
16043				while ( matches ) {
16044					switch ( matches[ 2 ] || "d" ) {
16045						case "d" : case "D" :
16046							day += parseInt( matches[ 1 ], 10 ); break;
16047						case "w" : case "W" :
16048							day += parseInt( matches[ 1 ], 10 ) * 7; break;
16049						case "m" : case "M" :
16050							month += parseInt( matches[ 1 ], 10 );
16051							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
16052							break;
16053						case "y": case "Y" :
16054							year += parseInt( matches[ 1 ], 10 );
16055							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
16056							break;
16057					}
16058					matches = pattern.exec( offset );
16059				}
16060				return new Date( year, month, day );
16061			},
16062			newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
16063				( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );
16064
16065		newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
16066		if ( newDate ) {
16067			newDate.setHours( 0 );
16068			newDate.setMinutes( 0 );
16069			newDate.setSeconds( 0 );
16070			newDate.setMilliseconds( 0 );
16071		}
16072		return this._daylightSavingAdjust( newDate );
16073	},
16074
16075	/* Handle switch to/from daylight saving.
16076	 * Hours may be non-zero on daylight saving cut-over:
16077	 * > 12 when midnight changeover, but then cannot generate
16078	 * midnight datetime, so jump to 1AM, otherwise reset.
16079	 * @param  date  (Date) the date to check
16080	 * @return  (Date) the corrected date
16081	 */
16082	_daylightSavingAdjust: function( date ) {
16083		if ( !date ) {
16084			return null;
16085		}
16086		date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
16087		return date;
16088	},
16089
16090	/* Set the date(s) directly. */
16091	_setDate: function( inst, date, noChange ) {
16092		var clear = !date,
16093			origMonth = inst.selectedMonth,
16094			origYear = inst.selectedYear,
16095			newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );
16096
16097		inst.selectedDay = inst.currentDay = newDate.getDate();
16098		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
16099		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
16100		if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
16101			this._notifyChange( inst );
16102		}
16103		this._adjustInstDate( inst );
16104		if ( inst.input ) {
16105			inst.input.val( clear ? "" : this._formatDate( inst ) );
16106		}
16107	},
16108
16109	/* Retrieve the date(s) directly. */
16110	_getDate: function( inst ) {
16111		var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
16112			this._daylightSavingAdjust( new Date(
16113			inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
16114			return startDate;
16115	},
16116
16117	/* Attach the onxxx handlers.  These are declared statically so
16118	 * they work with static code transformers like Caja.
16119	 */
16120	_attachHandlers: function( inst ) {
16121		var stepMonths = this._get( inst, "stepMonths" ),
16122			id = "#" + inst.id.replace( /\\\\/g, "\\" );
16123		inst.dpDiv.find( "[data-handler]" ).map( function() {
16124			var handler = {
16125				prev: function() {
16126					$.datepicker._adjustDate( id, -stepMonths, "M" );
16127				},
16128				next: function() {
16129					$.datepicker._adjustDate( id, +stepMonths, "M" );
16130				},
16131				hide: function() {
16132					$.datepicker._hideDatepicker();
16133				},
16134				today: function() {
16135					$.datepicker._gotoToday( id );
16136				},
16137				selectDay: function() {
16138					$.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
16139					return false;
16140				},
16141				selectMonth: function() {
16142					$.datepicker._selectMonthYear( id, this, "M" );
16143					return false;
16144				},
16145				selectYear: function() {
16146					$.datepicker._selectMonthYear( id, this, "Y" );
16147					return false;
16148				}
16149			};
16150			$( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
16151		} );
16152	},
16153
16154	/* Generate the HTML for the current state of the date picker. */
16155	_generateHTML: function( inst ) {
16156		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
16157			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
16158			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
16159			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
16160			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
16161			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
16162			tempDate = new Date(),
16163			today = this._daylightSavingAdjust(
16164				new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
16165			isRTL = this._get( inst, "isRTL" ),
16166			showButtonPanel = this._get( inst, "showButtonPanel" ),
16167			hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
16168			navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
16169			numMonths = this._getNumberOfMonths( inst ),
16170			showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
16171			stepMonths = this._get( inst, "stepMonths" ),
16172			isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
16173			currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
16174				new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
16175			minDate = this._getMinMaxDate( inst, "min" ),
16176			maxDate = this._getMinMaxDate( inst, "max" ),
vendor: 21,257 bytes, lines 16177-16691
16177			drawMonth = inst.drawMonth - showCurrentAtPos,
16178			drawYear = inst.drawYear;
16179
16180		if ( drawMonth < 0 ) {
16181			drawMonth += 12;
16182			drawYear--;
16183		}
16184		if ( maxDate ) {
16185			maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
16186				maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
16187			maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
16188			while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
16189				drawMonth--;
16190				if ( drawMonth < 0 ) {
16191					drawMonth = 11;
16192					drawYear--;
16193				}
16194			}
16195		}
16196		inst.drawMonth = drawMonth;
16197		inst.drawYear = drawYear;
16198
16199		prevText = this._get( inst, "prevText" );
16200		prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
16201			this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
16202			this._getFormatConfig( inst ) ) );
16203
16204		if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
16205			prev = $( "<a>" )
16206				.attr( {
16207					"class": "ui-datepicker-prev ui-corner-all",
16208					"data-handler": "prev",
16209					"data-event": "click",
16210					title: prevText
16211				} )
16212				.append(
16213					$( "<span>" )
16214						.addClass( "ui-icon ui-icon-circle-triangle-" +
16215							( isRTL ? "e" : "w" ) )
16216						.text( prevText )
16217				)[ 0 ].outerHTML;
16218		} else if ( hideIfNoPrevNext ) {
16219			prev = "";
16220		} else {
16221			prev = $( "<a>" )
16222				.attr( {
16223					"class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
16224					title: prevText
16225				} )
16226				.append(
16227					$( "<span>" )
16228						.addClass( "ui-icon ui-icon-circle-triangle-" +
16229							( isRTL ? "e" : "w" ) )
16230						.text( prevText )
16231				)[ 0 ].outerHTML;
16232		}
16233
16234		nextText = this._get( inst, "nextText" );
16235		nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
16236			this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
16237			this._getFormatConfig( inst ) ) );
16238
16239		if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
16240			next = $( "<a>" )
16241				.attr( {
16242					"class": "ui-datepicker-next ui-corner-all",
16243					"data-handler": "next",
16244					"data-event": "click",
16245					title: nextText
16246				} )
16247				.append(
16248					$( "<span>" )
16249						.addClass( "ui-icon ui-icon-circle-triangle-" +
16250							( isRTL ? "w" : "e" ) )
16251						.text( nextText )
16252				)[ 0 ].outerHTML;
16253		} else if ( hideIfNoPrevNext ) {
16254			next = "";
16255		} else {
16256			next = $( "<a>" )
16257				.attr( {
16258					"class": "ui-datepicker-next ui-corner-all ui-state-disabled",
16259					title: nextText
16260				} )
16261				.append(
16262					$( "<span>" )
16263						.attr( "class", "ui-icon ui-icon-circle-triangle-" +
16264							( isRTL ? "w" : "e" ) )
16265						.text( nextText )
16266				)[ 0 ].outerHTML;
16267		}
16268
16269		currentText = this._get( inst, "currentText" );
16270		gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
16271		currentText = ( !navigationAsDateFormat ? currentText :
16272			this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
16273
16274		controls = "";
16275		if ( !inst.inline ) {
16276			controls = $( "<button>" )
16277				.attr( {
16278					type: "button",
16279					"class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
16280					"data-handler": "hide",
16281					"data-event": "click"
16282				} )
16283				.text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
16284		}
16285
16286		buttonPanel = "";
16287		if ( showButtonPanel ) {
16288			buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
16289				.append( isRTL ? controls : "" )
16290				.append( this._isInRange( inst, gotoDate ) ?
16291					$( "<button>" )
16292						.attr( {
16293							type: "button",
16294							"class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
16295							"data-handler": "today",
16296							"data-event": "click"
16297						} )
16298						.text( currentText ) :
16299					"" )
16300				.append( isRTL ? "" : controls )[ 0 ].outerHTML;
16301		}
16302
16303		firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
16304		firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
16305
16306		showWeek = this._get( inst, "showWeek" );
16307		dayNames = this._get( inst, "dayNames" );
16308		dayNamesMin = this._get( inst, "dayNamesMin" );
16309		monthNames = this._get( inst, "monthNames" );
16310		monthNamesShort = this._get( inst, "monthNamesShort" );
16311		beforeShowDay = this._get( inst, "beforeShowDay" );
16312		showOtherMonths = this._get( inst, "showOtherMonths" );
16313		selectOtherMonths = this._get( inst, "selectOtherMonths" );
16314		defaultDate = this._getDefaultDate( inst );
16315		html = "";
16316
16317		for ( row = 0; row < numMonths[ 0 ]; row++ ) {
16318			group = "";
16319			this.maxRows = 4;
16320			for ( col = 0; col < numMonths[ 1 ]; col++ ) {
16321				selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
16322				cornerClass = " ui-corner-all";
16323				calender = "";
16324				if ( isMultiMonth ) {
16325					calender += "<div class='ui-datepicker-group";
16326					if ( numMonths[ 1 ] > 1 ) {
16327						switch ( col ) {
16328							case 0: calender += " ui-datepicker-group-first";
16329								cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
16330							case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
16331								cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
16332							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
16333						}
16334					}
16335					calender += "'>";
16336				}
16337				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
16338					( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
16339					( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
16340					this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
16341					row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
16342					"</div><table class='ui-datepicker-calendar'><thead>" +
16343					"<tr>";
16344				thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
16345				for ( dow = 0; dow < 7; dow++ ) { // days of the week
16346					day = ( dow + firstDay ) % 7;
16347					thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
16348						"<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
16349				}
16350				calender += thead + "</tr></thead><tbody>";
16351				daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
16352				if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
16353					inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
16354				}
16355				leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
16356				curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
16357				numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
16358				this.maxRows = numRows;
16359				printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
16360				for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
16361					calender += "<tr>";
16362					tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
16363						this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
16364					for ( dow = 0; dow < 7; dow++ ) { // create date picker days
16365						daySettings = ( beforeShowDay ?
16366							beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
16367						otherMonth = ( printDate.getMonth() !== drawMonth );
16368						unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
16369							( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
16370						tbody += "<td class='" +
16371							( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
16372							( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
16373							( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
16374							( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?
16375
16376							// or defaultDate is current printedDate and defaultDate is selectedDate
16377							" " + this._dayOverClass : "" ) + // highlight selected day
16378							( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) +  // highlight unselectable days
16379							( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
16380							( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
16381							( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
16382							( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
16383							( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
16384							( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
16385							( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
16386							( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
16387							( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
16388							( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
16389							"' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
16390							"' data-date='" + printDate.getDate() + // store date as data
16391							"'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
16392						printDate.setDate( printDate.getDate() + 1 );
16393						printDate = this._daylightSavingAdjust( printDate );
16394					}
16395					calender += tbody + "</tr>";
16396				}
16397				drawMonth++;
16398				if ( drawMonth > 11 ) {
16399					drawMonth = 0;
16400					drawYear++;
16401				}
16402				calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
16403							( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
16404				group += calender;
16405			}
16406			html += group;
16407		}
16408		html += buttonPanel;
16409		inst._keyEvent = false;
16410		return html;
16411	},
16412
16413	/* Generate the month and year header. */
16414	_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
16415			secondary, monthNames, monthNamesShort ) {
16416
16417		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
16418			changeMonth = this._get( inst, "changeMonth" ),
16419			changeYear = this._get( inst, "changeYear" ),
16420			showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
16421			selectMonthLabel = this._get( inst, "selectMonthLabel" ),
16422			selectYearLabel = this._get( inst, "selectYearLabel" ),
16423			html = "<div class='ui-datepicker-title'>",
16424			monthHtml = "";
16425
16426		// Month selection
16427		if ( secondary || !changeMonth ) {
16428			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
16429		} else {
16430			inMinYear = ( minDate && minDate.getFullYear() === drawYear );
16431			inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
16432			monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
16433			for ( month = 0; month < 12; month++ ) {
16434				if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
16435					monthHtml += "<option value='" + month + "'" +
16436						( month === drawMonth ? " selected='selected'" : "" ) +
16437						">" + monthNamesShort[ month ] + "</option>";
16438				}
16439			}
16440			monthHtml += "</select>";
16441		}
16442
16443		if ( !showMonthAfterYear ) {
16444			html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
16445		}
16446
16447		// Year selection
16448		if ( !inst.yearshtml ) {
16449			inst.yearshtml = "";
16450			if ( secondary || !changeYear ) {
16451				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
16452			} else {
16453
16454				// determine range of years to display
16455				years = this._get( inst, "yearRange" ).split( ":" );
16456				thisYear = new Date().getFullYear();
16457				determineYear = function( value ) {
16458					var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
16459						( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
16460						parseInt( value, 10 ) ) );
16461					return ( isNaN( year ) ? thisYear : year );
16462				};
16463				year = determineYear( years[ 0 ] );
16464				endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
16465				year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
16466				endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
16467				inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
16468				for ( ; year <= endYear; year++ ) {
16469					inst.yearshtml += "<option value='" + year + "'" +
16470						( year === drawYear ? " selected='selected'" : "" ) +
16471						">" + year + "</option>";
16472				}
16473				inst.yearshtml += "</select>";
16474
16475				html += inst.yearshtml;
16476				inst.yearshtml = null;
16477			}
16478		}
16479
16480		html += this._get( inst, "yearSuffix" );
16481		if ( showMonthAfterYear ) {
16482			html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
16483		}
16484		html += "</div>"; // Close datepicker_header
16485		return html;
16486	},
16487
16488	/* Adjust one of the date sub-fields. */
16489	_adjustInstDate: function( inst, offset, period ) {
16490		var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
16491			month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
16492			day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
16493			date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
16494
16495		inst.selectedDay = date.getDate();
16496		inst.drawMonth = inst.selectedMonth = date.getMonth();
16497		inst.drawYear = inst.selectedYear = date.getFullYear();
16498		if ( period === "M" || period === "Y" ) {
16499			this._notifyChange( inst );
16500		}
16501	},
16502
16503	/* Ensure a date is within any min/max bounds. */
16504	_restrictMinMax: function( inst, date ) {
16505		var minDate = this._getMinMaxDate( inst, "min" ),
16506			maxDate = this._getMinMaxDate( inst, "max" ),
16507			newDate = ( minDate && date < minDate ? minDate : date );
16508		return ( maxDate && newDate > maxDate ? maxDate : newDate );
16509	},
16510
16511	/* Notify change of month/year. */
16512	_notifyChange: function( inst ) {
16513		var onChange = this._get( inst, "onChangeMonthYear" );
16514		if ( onChange ) {
16515			onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
16516				[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
16517		}
16518	},
16519
16520	/* Determine the number of months to show. */
16521	_getNumberOfMonths: function( inst ) {
16522		var numMonths = this._get( inst, "numberOfMonths" );
16523		return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
16524	},
16525
16526	/* Determine the current maximum date - ensure no time components are set. */
16527	_getMinMaxDate: function( inst, minMax ) {
16528		return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
16529	},
16530
16531	/* Find the number of days in a given month. */
16532	_getDaysInMonth: function( year, month ) {
16533		return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
16534	},
16535
16536	/* Find the day of the week of the first of a month. */
16537	_getFirstDayOfMonth: function( year, month ) {
16538		return new Date( year, month, 1 ).getDay();
16539	},
16540
16541	/* Determines if we should allow a "next/prev" month display change. */
16542	_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
16543		var numMonths = this._getNumberOfMonths( inst ),
16544			date = this._daylightSavingAdjust( new Date( curYear,
16545			curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
16546
16547		if ( offset < 0 ) {
16548			date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
16549		}
16550		return this._isInRange( inst, date );
16551	},
16552
16553	/* Is the given date in the accepted range? */
16554	_isInRange: function( inst, date ) {
16555		var yearSplit, currentYear,
16556			minDate = this._getMinMaxDate( inst, "min" ),
16557			maxDate = this._getMinMaxDate( inst, "max" ),
16558			minYear = null,
16559			maxYear = null,
16560			years = this._get( inst, "yearRange" );
16561			if ( years ) {
16562				yearSplit = years.split( ":" );
16563				currentYear = new Date().getFullYear();
16564				minYear = parseInt( yearSplit[ 0 ], 10 );
16565				maxYear = parseInt( yearSplit[ 1 ], 10 );
16566				if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
16567					minYear += currentYear;
16568				}
16569				if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
16570					maxYear += currentYear;
16571				}
16572			}
16573
16574		return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
16575			( !maxDate || date.getTime() <= maxDate.getTime() ) &&
16576			( !minYear || date.getFullYear() >= minYear ) &&
16577			( !maxYear || date.getFullYear() <= maxYear ) );
16578	},
16579
16580	/* Provide the configuration settings for formatting/parsing. */
16581	_getFormatConfig: function( inst ) {
16582		var shortYearCutoff = this._get( inst, "shortYearCutoff" );
16583		shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
16584			new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
16585		return { shortYearCutoff: shortYearCutoff,
16586			dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
16587			monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
16588	},
16589
16590	/* Format the given date for display. */
16591	_formatDate: function( inst, day, month, year ) {
16592		if ( !day ) {
16593			inst.currentDay = inst.selectedDay;
16594			inst.currentMonth = inst.selectedMonth;
16595			inst.currentYear = inst.selectedYear;
16596		}
16597		var date = ( day ? ( typeof day === "object" ? day :
16598			this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
16599			this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
16600		return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
16601	}
16602} );
16603
16604/*
16605 * Bind hover events for datepicker elements.
16606 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
16607 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
16608 */
16609function datepicker_bindHover( dpDiv ) {
16610	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
16611	return dpDiv.on( "mouseout", selector, function() {
16612			$( this ).removeClass( "ui-state-hover" );
16613			if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
16614				$( this ).removeClass( "ui-datepicker-prev-hover" );
16615			}
16616			if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
16617				$( this ).removeClass( "ui-datepicker-next-hover" );
16618			}
16619		} )
16620		.on( "mouseover", selector, datepicker_handleMouseover );
16621}
16622
16623function datepicker_handleMouseover() {
16624	if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
16625		$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
16626		$( this ).addClass( "ui-state-hover" );
16627		if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
16628			$( this ).addClass( "ui-datepicker-prev-hover" );
16629		}
16630		if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
16631			$( this ).addClass( "ui-datepicker-next-hover" );
16632		}
16633	}
16634}
16635
16636/* jQuery extend now ignores nulls! */
16637function datepicker_extendRemove( target, props ) {
16638	$.extend( target, props );
16639	for ( var name in props ) {
16640		if ( props[ name ] == null ) {
16641			target[ name ] = props[ name ];
16642		}
16643	}
16644	return target;
16645}
16646
16647/* Invoke the datepicker functionality.
16648   @param  options  string - a command, optionally followed by additional parameters or
16649					Object - settings for attaching new datepicker functionality
16650   @return  jQuery object */
16651$.fn.datepicker = function( options ) {
16652
16653	/* Verify an empty collection wasn't passed - Fixes #6976 */
16654	if ( !this.length ) {
16655		return this;
16656	}
16657
16658	/* Initialise the date picker. */
16659	if ( !$.datepicker.initialized ) {
16660		$( document ).on( "mousedown", $.datepicker._checkExternalClick );
16661		$.datepicker.initialized = true;
16662	}
16663
16664	/* Append datepicker main container to body if not exist. */
16665	if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
16666		$( "body" ).append( $.datepicker.dpDiv );
16667	}
16668
16669	var otherArgs = Array.prototype.slice.call( arguments, 1 );
16670	if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
16671		return $.datepicker[ "_" + options + "Datepicker" ].
16672			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
16673	}
16674	if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
16675		return $.datepicker[ "_" + options + "Datepicker" ].
16676			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
16677	}
16678	return this.each( function() {
16679		if ( typeof options === "string" ) {
16680			$.datepicker[ "_" + options + "Datepicker" ]
16681				.apply( $.datepicker, [ this ].concat( otherArgs ) );
16682		} else {
16683			$.datepicker._attachDatepicker( this, options );
16684		}
16685	} );
16686};
16687
16688$.datepicker = new Datepicker(); // singleton instance
16689$.datepicker.initialized = false;
16690$.datepicker.uuid = new Date().getTime();
16691$.datepicker.version = "1.1
vendor: 6,619 bytes, lines 16691-16952
166914.1";
16692
16693var widgetsDatepicker = $.datepicker;
16694
16695
16696/*!
16697 * jQuery UI Mouse 1.14.1
16698 * https://jqueryui.com
16699 *
16700 * Copyright OpenJS Foundation and other contributors
16701 * Released under the MIT license.
16702 * https://jquery.org/license
16703 */
16704
16705//>>label: Mouse
16706//>>group: Widgets
16707//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
16708//>>docs: https://api.jqueryui.com/mouse/
16709
16710
16711var mouseHandled = false;
16712$( document ).on( "mouseup", function() {
16713	mouseHandled = false;
16714} );
16715
16716var widgetsMouse = $.widget( "ui.mouse", {
16717	version: "1.14.1",
16718	options: {
16719		cancel: "input, textarea, button, select, option",
16720		distance: 1,
16721		delay: 0
16722	},
16723	_mouseInit: function() {
16724		var that = this;
16725
16726		this.element
16727			.on( "mousedown." + this.widgetName, function( event ) {
16728				return that._mouseDown( event );
16729			} )
16730			.on( "click." + this.widgetName, function( event ) {
16731				if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
16732					$.removeData( event.target, that.widgetName + ".preventClickEvent" );
16733					event.stopImmediatePropagation();
16734					return false;
16735				}
16736			} );
16737
16738		this.started = false;
16739	},
16740
16741	// TODO: make sure destroying one instance of mouse doesn't mess with
16742	// other instances of mouse
16743	_mouseDestroy: function() {
16744		this.element.off( "." + this.widgetName );
16745		if ( this._mouseMoveDelegate ) {
16746			this.document
16747				.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
16748				.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
16749		}
16750	},
16751
16752	_mouseDown: function( event ) {
16753
16754		// don't let more than one widget handle mouseStart
16755		if ( mouseHandled ) {
16756			return;
16757		}
16758
16759		this._mouseMoved = false;
16760
16761		// We may have missed mouseup (out of window)
16762		if ( this._mouseStarted ) {
16763			this._mouseUp( event );
16764		}
16765
16766		this._mouseDownEvent = event;
16767
16768		var that = this,
16769			btnIsLeft = event.which === 1,
16770			elIsCancel = typeof this.options.cancel === "string" ?
16771				$( event.target ).closest( this.options.cancel ).length :
16772				false;
16773		if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
16774			return true;
16775		}
16776
16777		this.mouseDelayMet = !this.options.delay;
16778		if ( !this.mouseDelayMet ) {
16779			this._mouseDelayTimer = setTimeout( function() {
16780				that.mouseDelayMet = true;
16781			}, this.options.delay );
16782		}
16783
16784		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
16785			this._mouseStarted = ( this._mouseStart( event ) !== false );
16786			if ( !this._mouseStarted ) {
16787				event.preventDefault();
16788				return true;
16789			}
16790		}
16791
16792		// Click event may never have fired (Gecko & Opera)
16793		if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
16794			$.removeData( event.target, this.widgetName + ".preventClickEvent" );
16795		}
16796
16797		// These delegates are required to keep context
16798		this._mouseMoveDelegate = function( event ) {
16799			return that._mouseMove( event );
16800		};
16801		this._mouseUpDelegate = function( event ) {
16802			return that._mouseUp( event );
16803		};
16804
16805		this.document
16806			.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
16807			.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
16808
16809		event.preventDefault();
16810
16811		mouseHandled = true;
16812		return true;
16813	},
16814
16815	_mouseMove: function( event ) {
16816
16817		// Only check for mouseups outside the document if you've moved inside the document
16818		// at least once.
16819		if ( this._mouseMoved && !event.which ) {
16820
16821			// Support: Safari <=8 - 9
16822			// Safari sets which to 0 if you press any of the following keys
16823			// during a drag (#14461)
16824			if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
16825					event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
16826				this.ignoreMissingWhich = true;
16827			} else if ( !this.ignoreMissingWhich ) {
16828				return this._mouseUp( event );
16829			}
16830		}
16831
16832		if ( event.which || event.button ) {
16833			this._mouseMoved = true;
16834		}
16835
16836		if ( this._mouseStarted ) {
16837			this._mouseDrag( event );
16838			return event.preventDefault();
16839		}
16840
16841		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
16842			this._mouseStarted =
16843				( this._mouseStart( this._mouseDownEvent, event ) !== false );
16844			if ( this._mouseStarted ) {
16845				this._mouseDrag( event );
16846			} else {
16847				this._mouseUp( event );
16848			}
16849		}
16850
16851		return !this._mouseStarted;
16852	},
16853
16854	_mouseUp: function( event ) {
16855		this.document
16856			.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
16857			.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
16858
16859		if ( this._mouseStarted ) {
16860			this._mouseStarted = false;
16861
16862			if ( event.target === this._mouseDownEvent.target ) {
16863				$.data( event.target, this.widgetName + ".preventClickEvent", true );
16864			}
16865
16866			this._mouseStop( event );
16867		}
16868
16869		if ( this._mouseDelayTimer ) {
16870			clearTimeout( this._mouseDelayTimer );
16871			delete this._mouseDelayTimer;
16872		}
16873
16874		this.ignoreMissingWhich = false;
16875		mouseHandled = false;
16876		event.preventDefault();
16877	},
16878
16879	_mouseDistanceMet: function( event ) {
16880		return ( Math.max(
16881				Math.abs( this._mouseDownEvent.pageX - event.pageX ),
16882				Math.abs( this._mouseDownEvent.pageY - event.pageY )
16883			) >= this.options.distance
16884		);
16885	},
16886
16887	_mouseDelayMet: function( /* event */ ) {
16888		return this.mouseDelayMet;
16889	},
16890
16891	// These are placeholder methods, to be overriden by extending plugin
16892	_mouseStart: function( /* event */ ) {},
16893	_mouseDrag: function( /* event */ ) {},
16894	_mouseStop: function( /* event */ ) {},
16895	_mouseCapture: function( /* event */ ) {
16896		return true;
16897	}
16898} );
16899
16900
16901
16902// $.ui.plugin is deprecated. Use $.widget() extensions instead.
16903var plugin = $.ui.plugin = {
16904	add: function( module, option, set ) {
16905		var i,
16906			proto = $.ui[ module ].prototype;
16907		for ( i in set ) {
16908			proto.plugins[ i ] = proto.plugins[ i ] || [];
16909			proto.plugins[ i ].push( [ option, set[ i ] ] );
16910		}
16911	},
16912	call: function( instance, name, args, allowDisconnected ) {
16913		var i,
16914			set = instance.plugins[ name ];
16915
16916		if ( !set ) {
16917			return;
16918		}
16919
16920		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
16921				instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
16922			return;
16923		}
16924
16925		for ( i = 0; i < set.length; i++ ) {
16926			if ( instance.options[ set[ i ][ 0 ] ] ) {
16927				set[ i ][ 1 ].apply( instance.element, args );
16928			}
16929		}
16930	}
16931};
16932
16933
16934/*!
16935 * jQuery UI Draggable 1.14.1
16936 * https://jqueryui.com
16937 *
16938 * Copyright OpenJS Foundation and other contributors
16939 * Released under the MIT license.
16940 * https://jquery.org/license
16941 */
16942
16943//>>label: Draggable
16944//>>group: Interactions
16945//>>description: Enables dragging functionality for any element.
16946//>>docs: https://api.jqueryui.com/draggable/
16947//>>demos: https://jqueryui.com/draggable/
16948//>>css.structure: ../../themes/base/draggable.css
16949
16950
16951$.widget( "ui.draggable", $.ui.mouse, {
16952	version: "1.14.1
vendor: 13,254 bytes, lines 16952-17445
16952",
16953	widgetEventPrefix: "drag",
16954	options: {
16955		addClasses: true,
16956		appendTo: "parent",
16957		axis: false,
16958		connectToSortable: false,
16959		containment: false,
16960		cursor: "auto",
16961		cursorAt: false,
16962		grid: false,
16963		handle: false,
16964		helper: "original",
16965		iframeFix: false,
16966		opacity: false,
16967		refreshPositions: false,
16968		revert: false,
16969		revertDuration: 500,
16970		scope: "default",
16971		scroll: true,
16972		scrollSensitivity: 20,
16973		scrollSpeed: 20,
16974		snap: false,
16975		snapMode: "both",
16976		snapTolerance: 20,
16977		stack: false,
16978		zIndex: false,
16979
16980		// Callbacks
16981		drag: null,
16982		start: null,
16983		stop: null
16984	},
16985	_create: function() {
16986
16987		if ( this.options.helper === "original" ) {
16988			this._setPositionRelative();
16989		}
16990		if ( this.options.addClasses ) {
16991			this._addClass( "ui-draggable" );
16992		}
16993		this._setHandleClassName();
16994
16995		this._mouseInit();
16996	},
16997
16998	_setOption: function( key, value ) {
16999		this._super( key, value );
17000		if ( key === "handle" ) {
17001			this._removeHandleClassName();
17002			this._setHandleClassName();
17003		}
17004	},
17005
17006	_destroy: function() {
17007		if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
17008			this.destroyOnClear = true;
17009			return;
17010		}
17011		this._removeHandleClassName();
17012		this._mouseDestroy();
17013	},
17014
17015	_mouseCapture: function( event ) {
17016		var o = this.options;
17017
17018		// Among others, prevent a drag on a resizable-handle
17019		if ( this.helper || o.disabled ||
17020				$( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
17021			return false;
17022		}
17023
17024		//Quit if we're not on a valid handle
17025		this.handle = this._getHandle( event );
17026		if ( !this.handle ) {
17027			return false;
17028		}
17029
17030		this._blurActiveElement( event );
17031
17032		this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
17033
17034		return true;
17035
17036	},
17037
17038	_blockFrames: function( selector ) {
17039		this.iframeBlocks = this.document.find( selector ).map( function() {
17040			var iframe = $( this );
17041
17042			return $( "<div>" )
17043				.css( "position", "absolute" )
17044				.appendTo( iframe.parent() )
17045				.outerWidth( iframe.outerWidth() )
17046				.outerHeight( iframe.outerHeight() )
17047				.offset( iframe.offset() )[ 0 ];
17048		} );
17049	},
17050
17051	_unblockFrames: function() {
17052		if ( this.iframeBlocks ) {
17053			this.iframeBlocks.remove();
17054			delete this.iframeBlocks;
17055		}
17056	},
17057
17058	_blurActiveElement: function( event ) {
17059		var activeElement = this.document[ 0 ].activeElement,
17060			target = $( event.target );
17061
17062		// Don't blur if the event occurred on an element that is within
17063		// the currently focused element
17064		// See #10527, #12472
17065		if ( target.closest( activeElement ).length ) {
17066			return;
17067		}
17068
17069		// Blur any element that currently has focus, see #4261
17070		$( activeElement ).trigger( "blur" );
17071	},
17072
17073	_mouseStart: function( event ) {
17074
17075		var o = this.options;
17076
17077		//Create and append the visible helper
17078		this.helper = this._createHelper( event );
17079
17080		this._addClass( this.helper, "ui-draggable-dragging" );
17081
17082		//Cache the helper size
17083		this._cacheHelperProportions();
17084
17085		//If ddmanager is used for droppables, set the global draggable
17086		if ( $.ui.ddmanager ) {
17087			$.ui.ddmanager.current = this;
17088		}
17089
17090		/*
17091		 * - Position generation -
17092		 * This block generates everything position related - it's the core of draggables.
17093		 */
17094
17095		//Cache the margins of the original element
17096		this._cacheMargins();
17097
17098		//Store the helper's css position
17099		this.cssPosition = this.helper.css( "position" );
17100		this.scrollParent = this.helper.scrollParent( true );
17101		this.offsetParent = this.helper.offsetParent();
17102		this.hasFixedAncestor = this.helper.parents().filter( function() {
17103				return $( this ).css( "position" ) === "fixed";
17104			} ).length > 0;
17105
17106		//The element's absolute position on the page minus margins
17107		this.positionAbs = this.element.offset();
17108		this._refreshOffsets( event );
17109
17110		//Generate the original position
17111		this.originalPosition = this.position = this._generatePosition( event, false );
17112		this.originalPageX = event.pageX;
17113		this.originalPageY = event.pageY;
17114
17115		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
17116		if ( o.cursorAt ) {
17117			this._adjustOffsetFromHelper( o.cursorAt );
17118		}
17119
17120		//Set a containment if given in the options
17121		this._setContainment();
17122
17123		//Trigger event + callbacks
17124		if ( this._trigger( "start", event ) === false ) {
17125			this._clear();
17126			return false;
17127		}
17128
17129		//Recache the helper size
17130		this._cacheHelperProportions();
17131
17132		//Prepare the droppable offsets
17133		if ( $.ui.ddmanager && !o.dropBehaviour ) {
17134			$.ui.ddmanager.prepareOffsets( this, event );
17135		}
17136
17137		// Execute the drag once - this causes the helper not to be visible before getting its
17138		// correct position
17139		this._mouseDrag( event, true );
17140
17141		// If the ddmanager is used for droppables, inform the manager that dragging has started
17142		// (see #5003)
17143		if ( $.ui.ddmanager ) {
17144			$.ui.ddmanager.dragStart( this, event );
17145		}
17146
17147		return true;
17148	},
17149
17150	_refreshOffsets: function( event ) {
17151		this.offset = {
17152			top: this.positionAbs.top - this.margins.top,
17153			left: this.positionAbs.left - this.margins.left,
17154			scroll: false,
17155			parent: this._getParentOffset(),
17156			relative: this._getRelativeOffset()
17157		};
17158
17159		this.offset.click = {
17160			left: event.pageX - this.offset.left,
17161			top: event.pageY - this.offset.top
17162		};
17163	},
17164
17165	_mouseDrag: function( event, noPropagation ) {
17166
17167		// reset any necessary cached properties (see #5009)
17168		if ( this.hasFixedAncestor ) {
17169			this.offset.parent = this._getParentOffset();
17170		}
17171
17172		//Compute the helpers position
17173		this.position = this._generatePosition( event, true );
17174		this.positionAbs = this._convertPositionTo( "absolute" );
17175
17176		//Call plugins and callbacks and use the resulting position if something is returned
17177		if ( !noPropagation ) {
17178			var ui = this._uiHash();
17179			if ( this._trigger( "drag", event, ui ) === false ) {
17180				this._mouseUp( new $.Event( "mouseup", event ) );
17181				return false;
17182			}
17183			this.position = ui.position;
17184		}
17185
17186		this.helper[ 0 ].style.left = this.position.left + "px";
17187		this.helper[ 0 ].style.top = this.position.top + "px";
17188
17189		if ( $.ui.ddmanager ) {
17190			$.ui.ddmanager.drag( this, event );
17191		}
17192
17193		return false;
17194	},
17195
17196	_mouseStop: function( event ) {
17197
17198		//If we are using droppables, inform the manager about the drop
17199		var that = this,
17200			dropped = false;
17201		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
17202			dropped = $.ui.ddmanager.drop( this, event );
17203		}
17204
17205		//if a drop comes from outside (a sortable)
17206		if ( this.dropped ) {
17207			dropped = this.dropped;
17208			this.dropped = false;
17209		}
17210
17211		if ( ( this.options.revert === "invalid" && !dropped ) ||
17212				( this.options.revert === "valid" && dropped ) ||
17213				this.options.revert === true || ( typeof this.options.revert === "function" &&
17214				this.options.revert.call( this.element, dropped ) )
17215		) {
17216			$( this.helper ).animate(
17217				this.originalPosition,
17218				parseInt( this.options.revertDuration, 10 ),
17219				function() {
17220					if ( that._trigger( "stop", event ) !== false ) {
17221						that._clear();
17222					}
17223				}
17224			);
17225		} else {
17226			if ( this._trigger( "stop", event ) !== false ) {
17227				this._clear();
17228			}
17229		}
17230
17231		return false;
17232	},
17233
17234	_mouseUp: function( event ) {
17235		this._unblockFrames();
17236
17237		// If the ddmanager is used for droppables, inform the manager that dragging has stopped
17238		// (see #5003)
17239		if ( $.ui.ddmanager ) {
17240			$.ui.ddmanager.dragStop( this, event );
17241		}
17242
17243		// Only need to focus if the event occurred on the draggable itself, see #10527
17244		if ( this.handleElement.is( event.target ) ) {
17245
17246			// The interaction is over; whether or not the click resulted in a drag,
17247			// focus the element
17248			this.element.trigger( "focus" );
17249		}
17250
17251		return $.ui.mouse.prototype._mouseUp.call( this, event );
17252	},
17253
17254	cancel: function() {
17255
17256		if ( this.helper.is( ".ui-draggable-dragging" ) ) {
17257			this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
17258		} else {
17259			this._clear();
17260		}
17261
17262		return this;
17263
17264	},
17265
17266	_getHandle: function( event ) {
17267		return this.options.handle ?
17268			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
17269			true;
17270	},
17271
17272	_setHandleClassName: function() {
17273		this.handleElement = this.options.handle ?
17274			this.element.find( this.options.handle ) : this.element;
17275		this._addClass( this.handleElement, "ui-draggable-handle" );
17276	},
17277
17278	_removeHandleClassName: function() {
17279		this._removeClass( this.handleElement, "ui-draggable-handle" );
17280	},
17281
17282	_createHelper: function( event ) {
17283
17284		var o = this.options,
17285			helperIsFunction = typeof o.helper === "function",
17286			helper = helperIsFunction ?
17287				$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
17288				( o.helper === "clone" ?
17289					this.element.clone().removeAttr( "id" ) :
17290					this.element );
17291
17292		if ( !helper.parents( "body" ).length ) {
17293			helper.appendTo( ( o.appendTo === "parent" ?
17294				this.element[ 0 ].parentNode :
17295				o.appendTo ) );
17296		}
17297
17298		// https://bugs.jqueryui.com/ticket/9446
17299		// a helper function can return the original element
17300		// which wouldn't have been set to relative in _create
17301		if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
17302			this._setPositionRelative();
17303		}
17304
17305		if ( helper[ 0 ] !== this.element[ 0 ] &&
17306				!( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
17307			helper.css( "position", "absolute" );
17308		}
17309
17310		return helper;
17311
17312	},
17313
17314	_setPositionRelative: function() {
17315		if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
17316			this.element[ 0 ].style.position = "relative";
17317		}
17318	},
17319
17320	_adjustOffsetFromHelper: function( obj ) {
17321		if ( typeof obj === "string" ) {
17322			obj = obj.split( " " );
17323		}
17324		if ( Array.isArray( obj ) ) {
17325			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
17326		}
17327		if ( "left" in obj ) {
17328			this.offset.click.left = obj.left + this.margins.left;
17329		}
17330		if ( "right" in obj ) {
17331			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
17332		}
17333		if ( "top" in obj ) {
17334			this.offset.click.top = obj.top + this.margins.top;
17335		}
17336		if ( "bottom" in obj ) {
17337			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
17338		}
17339	},
17340
17341	_isRootNode: function( element ) {
17342		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
17343	},
17344
17345	_getParentOffset: function() {
17346
17347		//Get the offsetParent and cache its position
17348		var po = this.offsetParent.offset(),
17349			document = this.document[ 0 ];
17350
17351		// This is a special case where we need to modify a offset calculated on start, since the
17352		// following happened:
17353		// 1. The position of the helper is absolute, so it's position is calculated based on the
17354		// next positioned parent
17355		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
17356		// the document, which means that the scroll is included in the initial calculation of the
17357		// offset of the parent, and never recalculated upon drag
17358		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
17359				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
17360			po.left += this.scrollParent.scrollLeft();
17361			po.top += this.scrollParent.scrollTop();
17362		}
17363
17364		if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
17365			po = { top: 0, left: 0 };
17366		}
17367
17368		return {
17369			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
17370			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
17371		};
17372
17373	},
17374
17375	_getRelativeOffset: function() {
17376		if ( this.cssPosition !== "relative" ) {
17377			return { top: 0, left: 0 };
17378		}
17379
17380		var p = this.element.position(),
17381			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
17382
17383		return {
17384			top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
17385				( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
17386			left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
17387				( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
17388		};
17389
17390	},
17391
17392	_cacheMargins: function() {
17393		this.margins = {
17394			left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
17395			top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
17396			right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
17397			bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
17398		};
17399	},
17400
17401	_cacheHelperProportions: function() {
17402		this.helperProportions = {
17403			width: this.helper.outerWidth(),
17404			height: this.helper.outerHeight()
17405		};
17406	},
17407
17408	_setContainment: function() {
17409
17410		var isUserScrollable, c, ce,
17411			o = this.options,
17412			document = this.document[ 0 ];
17413
17414		this.relativeContainer = null;
17415
17416		if ( !o.containment ) {
17417			this.containment = null;
17418			return;
17419		}
17420
17421		if ( o.containment === "window" ) {
17422			this.containment = [
17423				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
17424				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
17425				$( window ).scrollLeft() + $( window ).width() -
17426					this.helperProportions.width - this.margins.left,
17427				$( window ).scrollTop() +
17428					( $( window ).height() || document.body.parentNode.scrollHeight ) -
17429					this.helperProportions.height - this.margins.top
17430			];
17431			return;
17432		}
17433
17434		if ( o.containment === "document" ) {
17435			this.containment = [
17436				0,
17437				0,
17438				$( document ).width() - this.helperProportions.width - this.margins.left,
17439				( $( document ).height() || document.body.parentNode.scrollHeight ) -
17440					this.helperProportions.height - this.margins.top
17441			];
17442			return;
17443		}
17444
17445		if ( o.containment.constructor === Array ) {
vendor: 10,369 bytes, lines 17446-17792
17446			this.containment = o.containment;
17447			return;
17448		}
17449
17450		if ( o.containment === "parent" ) {
17451			o.containment = this.helper[ 0 ].parentNode;
17452		}
17453
17454		c = $( o.containment );
17455		ce = c[ 0 ];
17456
17457		if ( !ce ) {
17458			return;
17459		}
17460
17461		isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
17462
17463		this.containment = [
17464			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
17465				( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
17466			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
17467				( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
17468			( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
17469				( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
17470				( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
17471				this.helperProportions.width -
17472				this.margins.left -
17473				this.margins.right,
17474			( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
17475				( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
17476				( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
17477				this.helperProportions.height -
17478				this.margins.top -
17479				this.margins.bottom
17480		];
17481		this.relativeContainer = c;
17482	},
17483
17484	_convertPositionTo: function( d, pos ) {
17485
17486		if ( !pos ) {
17487			pos = this.position;
17488		}
17489
17490		var mod = d === "absolute" ? 1 : -1,
17491			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
17492
17493		return {
17494			top: (
17495
17496				// The absolute mouse position
17497				pos.top	+
17498
17499				// Only for relative positioned nodes: Relative offset from element to offset parent
17500				this.offset.relative.top * mod +
17501
17502				// The offsetParent's offset without borders (offset + border)
17503				this.offset.parent.top * mod -
17504				( ( this.cssPosition === "fixed" ?
17505					-this.offset.scroll.top :
17506					( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
17507			),
17508			left: (
17509
17510				// The absolute mouse position
17511				pos.left +
17512
17513				// Only for relative positioned nodes: Relative offset from element to offset parent
17514				this.offset.relative.left * mod +
17515
17516				// The offsetParent's offset without borders (offset + border)
17517				this.offset.parent.left * mod	-
17518				( ( this.cssPosition === "fixed" ?
17519					-this.offset.scroll.left :
17520					( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
17521			)
17522		};
17523
17524	},
17525
17526	_generatePosition: function( event, constrainPosition ) {
17527
17528		var containment, co, top, left,
17529			o = this.options,
17530			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
17531			pageX = event.pageX,
17532			pageY = event.pageY;
17533
17534		// Cache the scroll
17535		if ( !scrollIsRootNode || !this.offset.scroll ) {
17536			this.offset.scroll = {
17537				top: this.scrollParent.scrollTop(),
17538				left: this.scrollParent.scrollLeft()
17539			};
17540		}
17541
17542		/*
17543		 * - Position constraining -
17544		 * Constrain the position to a mix of grid, containment.
17545		 */
17546
17547		// If we are not dragging yet, we won't check for options
17548		if ( constrainPosition ) {
17549			if ( this.containment ) {
17550				if ( this.relativeContainer ) {
17551					co = this.relativeContainer.offset();
17552					containment = [
17553						this.containment[ 0 ] + co.left,
17554						this.containment[ 1 ] + co.top,
17555						this.containment[ 2 ] + co.left,
17556						this.containment[ 3 ] + co.top
17557					];
17558				} else {
17559					containment = this.containment;
17560				}
17561
17562				if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
17563					pageX = containment[ 0 ] + this.offset.click.left;
17564				}
17565				if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
17566					pageY = containment[ 1 ] + this.offset.click.top;
17567				}
17568				if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
17569					pageX = containment[ 2 ] + this.offset.click.left;
17570				}
17571				if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
17572					pageY = containment[ 3 ] + this.offset.click.top;
17573				}
17574			}
17575
17576			if ( o.grid ) {
17577
17578				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid
17579				// argument errors in IE (see ticket #6950)
17580				top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
17581					this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
17582				pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
17583					top - this.offset.click.top > containment[ 3 ] ) ?
17584						top :
17585						( ( top - this.offset.click.top >= containment[ 1 ] ) ?
17586							top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;
17587
17588				left = o.grid[ 0 ] ? this.originalPageX +
17589					Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
17590					this.originalPageX;
17591				pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
17592					left - this.offset.click.left > containment[ 2 ] ) ?
17593						left :
17594						( ( left - this.offset.click.left >= containment[ 0 ] ) ?
17595							left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
17596			}
17597
17598			if ( o.axis === "y" ) {
17599				pageX = this.originalPageX;
17600			}
17601
17602			if ( o.axis === "x" ) {
17603				pageY = this.originalPageY;
17604			}
17605		}
17606
17607		return {
17608			top: (
17609
17610				// The absolute mouse position
17611				pageY -
17612
17613				// Click offset (relative to the element)
17614				this.offset.click.top -
17615
17616				// Only for relative positioned nodes: Relative offset from element to offset parent
17617				this.offset.relative.top -
17618
17619				// The offsetParent's offset without borders (offset + border)
17620				this.offset.parent.top +
17621				( this.cssPosition === "fixed" ?
17622					-this.offset.scroll.top :
17623					( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
17624			),
17625			left: (
17626
17627				// The absolute mouse position
17628				pageX -
17629
17630				// Click offset (relative to the element)
17631				this.offset.click.left -
17632
17633				// Only for relative positioned nodes: Relative offset from element to offset parent
17634				this.offset.relative.left -
17635
17636				// The offsetParent's offset without borders (offset + border)
17637				this.offset.parent.left +
17638				( this.cssPosition === "fixed" ?
17639					-this.offset.scroll.left :
17640					( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
17641			)
17642		};
17643
17644	},
17645
17646	_clear: function() {
17647		this._removeClass( this.helper, "ui-draggable-dragging" );
17648		if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
17649			this.helper.remove();
17650		}
17651		this.helper = null;
17652		this.cancelHelperRemoval = false;
17653		if ( this.destroyOnClear ) {
17654			this.destroy();
17655		}
17656	},
17657
17658	// From now on bulk stuff - mainly helpers
17659
17660	_trigger: function( type, event, ui ) {
17661		ui = ui || this._uiHash();
17662		$.ui.plugin.call( this, type, [ event, ui, this ], true );
17663
17664		// Absolute position and offset (see #6884 ) have to be recalculated after plugins
17665		if ( /^(drag|start|stop)/.test( type ) ) {
17666			this.positionAbs = this._convertPositionTo( "absolute" );
17667			ui.offset = this.positionAbs;
17668		}
17669		return $.Widget.prototype._trigger.call( this, type, event, ui );
17670	},
17671
17672	plugins: {},
17673
17674	_uiHash: function() {
17675		return {
17676			helper: this.helper,
17677			position: this.position,
17678			originalPosition: this.originalPosition,
17679			offset: this.positionAbs
17680		};
17681	}
17682
17683} );
17684
17685$.ui.plugin.add( "draggable", "connectToSortable", {
17686	start: function( event, ui, draggable ) {
17687		var uiSortable = $.extend( {}, ui, {
17688			item: draggable.element
17689		} );
17690
17691		draggable.sortables = [];
17692		$( draggable.options.connectToSortable ).each( function() {
17693			var sortable = $( this ).sortable( "instance" );
17694
17695			if ( sortable && !sortable.options.disabled ) {
17696				draggable.sortables.push( sortable );
17697
17698				// RefreshPositions is called at drag start to refresh the containerCache
17699				// which is used in drag. This ensures it's initialized and synchronized
17700				// with any changes that might have happened on the page since initialization.
17701				sortable.refreshPositions();
17702				sortable._trigger( "activate", event, uiSortable );
17703			}
17704		} );
17705	},
17706	stop: function( event, ui, draggable ) {
17707		var uiSortable = $.extend( {}, ui, {
17708			item: draggable.element
17709		} );
17710
17711		draggable.cancelHelperRemoval = false;
17712
17713		$.each( draggable.sortables, function() {
17714			var sortable = this;
17715
17716			if ( sortable.isOver ) {
17717				sortable.isOver = 0;
17718
17719				// Allow this sortable to handle removing the helper
17720				draggable.cancelHelperRemoval = true;
17721				sortable.cancelHelperRemoval = false;
17722
17723				// Use _storedCSS To restore properties in the sortable,
17724				// as this also handles revert (#9675) since the draggable
17725				// may have modified them in unexpected ways (#8809)
17726				sortable._storedCSS = {
17727					position: sortable.placeholder.css( "position" ),
17728					top: sortable.placeholder.css( "top" ),
17729					left: sortable.placeholder.css( "left" )
17730				};
17731
17732				sortable._mouseStop( event );
17733
17734				// Once drag has ended, the sortable should return to using
17735				// its original helper, not the shared helper from draggable
17736				sortable.options.helper = sortable.options._helper;
17737			} else {
17738
17739				// Prevent this Sortable from removing the helper.
17740				// However, don't set the draggable to remove the helper
17741				// either as another connected Sortable may yet handle the removal.
17742				sortable.cancelHelperRemoval = true;
17743
17744				sortable._trigger( "deactivate", event, uiSortable );
17745			}
17746		} );
17747	},
17748	drag: function( event, ui, draggable ) {
17749		$.each( draggable.sortables, function() {
17750			var innermostIntersecting = false,
17751				sortable = this;
17752
17753			// Copy over variables that sortable's _intersectsWith uses
17754			sortable.positionAbs = draggable.positionAbs;
17755			sortable.helperProportions = draggable.helperProportions;
17756			sortable.offset.click = draggable.offset.click;
17757
17758			if ( sortable._intersectsWith( sortable.containerCache ) ) {
17759				innermostIntersecting = true;
17760
17761				$.each( draggable.sortables, function() {
17762
17763					// Copy over variables that sortable's _intersectsWith uses
17764					this.positionAbs = draggable.positionAbs;
17765					this.helperProportions = draggable.helperProportions;
17766					this.offset.click = draggable.offset.click;
17767
17768					if ( this !== sortable &&
17769							this._intersectsWith( this.containerCache ) &&
17770							$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
17771						innermostIntersecting = false;
17772					}
17773
17774					return innermostIntersecting;
17775				} );
17776			}
17777
17778			if ( innermostIntersecting ) {
17779
17780				// If it intersects, we use a little isOver variable and set it once,
17781				// so that the move-in stuff gets fired only once.
17782				if ( !sortable.isOver ) {
17783					sortable.isOver = 1;
17784
17785					// Store draggable's parent in case we need to reappend to it later.
17786					draggable._parent = ui.helper.parent();
17787
17788					sortable.currentItem = ui.helper
17789						.appendTo( sortable.element )
17790						.data( "ui-sortable-item", true );
17791
17792					// Store helper option to later restore it
vendor: 11,051 bytes, lines 17793-18170
17793					sortable.options._helper = sortable.options.helper;
17794
17795					sortable.options.helper = function() {
17796						return ui.helper[ 0 ];
17797					};
17798
17799					// Fire the start events of the sortable with our passed browser event,
17800					// and our own helper (so it doesn't create a new one)
17801					event.target = sortable.currentItem[ 0 ];
17802					sortable._mouseCapture( event, true );
17803					sortable._mouseStart( event, true, true );
17804
17805					// Because the browser event is way off the new appended portlet,
17806					// modify necessary variables to reflect the changes
17807					sortable.offset.click.top = draggable.offset.click.top;
17808					sortable.offset.click.left = draggable.offset.click.left;
17809					sortable.offset.parent.left -= draggable.offset.parent.left -
17810						sortable.offset.parent.left;
17811					sortable.offset.parent.top -= draggable.offset.parent.top -
17812						sortable.offset.parent.top;
17813
17814					draggable._trigger( "toSortable", event );
17815
17816					// Inform draggable that the helper is in a valid drop zone,
17817					// used solely in the revert option to handle "valid/invalid".
17818					draggable.dropped = sortable.element;
17819
17820					// Need to refreshPositions of all sortables in the case that
17821					// adding to one sortable changes the location of the other sortables (#9675)
17822					$.each( draggable.sortables, function() {
17823						this.refreshPositions();
17824					} );
17825
17826					// Hack so receive/update callbacks work (mostly)
17827					draggable.currentItem = draggable.element;
17828					sortable.fromOutside = draggable;
17829				}
17830
17831				if ( sortable.currentItem ) {
17832					sortable._mouseDrag( event );
17833
17834					// Copy the sortable's position because the draggable's can potentially reflect
17835					// a relative position, while sortable is always absolute, which the dragged
17836					// element has now become. (#8809)
17837					ui.position = sortable.position;
17838				}
17839			} else {
17840
17841				// If it doesn't intersect with the sortable, and it intersected before,
17842				// we fake the drag stop of the sortable, but make sure it doesn't remove
17843				// the helper by using cancelHelperRemoval.
17844				if ( sortable.isOver ) {
17845
17846					sortable.isOver = 0;
17847					sortable.cancelHelperRemoval = true;
17848
17849					// Calling sortable's mouseStop would trigger a revert,
17850					// so revert must be temporarily false until after mouseStop is called.
17851					sortable.options._revert = sortable.options.revert;
17852					sortable.options.revert = false;
17853
17854					sortable._trigger( "out", event, sortable._uiHash( sortable ) );
17855					sortable._mouseStop( event, true );
17856
17857					// Restore sortable behaviors that were modfied
17858					// when the draggable entered the sortable area (#9481)
17859					sortable.options.revert = sortable.options._revert;
17860					sortable.options.helper = sortable.options._helper;
17861
17862					if ( sortable.placeholder ) {
17863						sortable.placeholder.remove();
17864					}
17865
17866					// Restore and recalculate the draggable's offset considering the sortable
17867					// may have modified them in unexpected ways. (#8809, #10669)
17868					ui.helper.appendTo( draggable._parent );
17869					draggable._refreshOffsets( event );
17870					ui.position = draggable._generatePosition( event, true );
17871
17872					draggable._trigger( "fromSortable", event );
17873
17874					// Inform draggable that the helper is no longer in a valid drop zone
17875					draggable.dropped = false;
17876
17877					// Need to refreshPositions of all sortables just in case removing
17878					// from one sortable changes the location of other sortables (#9675)
17879					$.each( draggable.sortables, function() {
17880						this.refreshPositions();
17881					} );
17882				}
17883			}
17884		} );
17885	}
17886} );
17887
17888$.ui.plugin.add( "draggable", "cursor", {
17889	start: function( event, ui, instance ) {
17890		var t = $( "body" ),
17891			o = instance.options;
17892
17893		if ( t.css( "cursor" ) ) {
17894			o._cursor = t.css( "cursor" );
17895		}
17896		t.css( "cursor", o.cursor );
17897	},
17898	stop: function( event, ui, instance ) {
17899		var o = instance.options;
17900		if ( o._cursor ) {
17901			$( "body" ).css( "cursor", o._cursor );
17902		}
17903	}
17904} );
17905
17906$.ui.plugin.add( "draggable", "opacity", {
17907	start: function( event, ui, instance ) {
17908		var t = $( ui.helper ),
17909			o = instance.options;
17910		if ( t.css( "opacity" ) ) {
17911			o._opacity = t.css( "opacity" );
17912		}
17913		t.css( "opacity", o.opacity );
17914	},
17915	stop: function( event, ui, instance ) {
17916		var o = instance.options;
17917		if ( o._opacity ) {
17918			$( ui.helper ).css( "opacity", o._opacity );
17919		}
17920	}
17921} );
17922
17923$.ui.plugin.add( "draggable", "scroll", {
17924	start: function( event, ui, i ) {
17925		if ( !i.scrollParentNotHidden ) {
17926			i.scrollParentNotHidden = i.helper.scrollParent( false );
17927		}
17928
17929		if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
17930				i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
17931			i.overflowOffset = i.scrollParentNotHidden.offset();
17932		}
17933	},
17934	drag: function( event, ui, i  ) {
17935
17936		var o = i.options,
17937			scrolled = false,
17938			scrollParent = i.scrollParentNotHidden[ 0 ],
17939			document = i.document[ 0 ];
17940
17941		if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
17942			if ( !o.axis || o.axis !== "x" ) {
17943				if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
17944						o.scrollSensitivity ) {
17945					scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
17946				} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
17947					scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
17948				}
17949			}
17950
17951			if ( !o.axis || o.axis !== "y" ) {
17952				if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
17953						o.scrollSensitivity ) {
17954					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
17955				} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
17956					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
17957				}
17958			}
17959
17960		} else {
17961
17962			if ( !o.axis || o.axis !== "x" ) {
17963				if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
17964					scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
17965				} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
17966						o.scrollSensitivity ) {
17967					scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
17968				}
17969			}
17970
17971			if ( !o.axis || o.axis !== "y" ) {
17972				if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
17973					scrolled = $( document ).scrollLeft(
17974						$( document ).scrollLeft() - o.scrollSpeed
17975					);
17976				} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
17977						o.scrollSensitivity ) {
17978					scrolled = $( document ).scrollLeft(
17979						$( document ).scrollLeft() + o.scrollSpeed
17980					);
17981				}
17982			}
17983
17984		}
17985
17986		if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
17987			$.ui.ddmanager.prepareOffsets( i, event );
17988		}
17989
17990	}
17991} );
17992
17993$.ui.plugin.add( "draggable", "snap", {
17994	start: function( event, ui, i ) {
17995
17996		var o = i.options;
17997
17998		i.snapElements = [];
17999
18000		$( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
18001			.each( function() {
18002				var $t = $( this ),
18003					$o = $t.offset();
18004				if ( this !== i.element[ 0 ] ) {
18005					i.snapElements.push( {
18006						item: this,
18007						width: $t.outerWidth(), height: $t.outerHeight(),
18008						top: $o.top, left: $o.left
18009					} );
18010				}
18011			} );
18012
18013	},
18014	drag: function( event, ui, inst ) {
18015
18016		var ts, bs, ls, rs, l, r, t, b, i, first,
18017			o = inst.options,
18018			d = o.snapTolerance,
18019			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
18020			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
18021
18022		for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {
18023
18024			l = inst.snapElements[ i ].left - inst.margins.left;
18025			r = l + inst.snapElements[ i ].width;
18026			t = inst.snapElements[ i ].top - inst.margins.top;
18027			b = t + inst.snapElements[ i ].height;
18028
18029			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
18030					!$.contains( inst.snapElements[ i ].item.ownerDocument,
18031					inst.snapElements[ i ].item ) ) {
18032				if ( inst.snapElements[ i ].snapping ) {
18033					if ( inst.options.snap.release ) {
18034						inst.options.snap.release.call(
18035							inst.element,
18036							event,
18037							$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
18038						);
18039					}
18040				}
18041				inst.snapElements[ i ].snapping = false;
18042				continue;
18043			}
18044
18045			if ( o.snapMode !== "inner" ) {
18046				ts = Math.abs( t - y2 ) <= d;
18047				bs = Math.abs( b - y1 ) <= d;
18048				ls = Math.abs( l - x2 ) <= d;
18049				rs = Math.abs( r - x1 ) <= d;
18050				if ( ts ) {
18051					ui.position.top = inst._convertPositionTo( "relative", {
18052						top: t - inst.helperProportions.height,
18053						left: 0
18054					} ).top;
18055				}
18056				if ( bs ) {
18057					ui.position.top = inst._convertPositionTo( "relative", {
18058						top: b,
18059						left: 0
18060					} ).top;
18061				}
18062				if ( ls ) {
18063					ui.position.left = inst._convertPositionTo( "relative", {
18064						top: 0,
18065						left: l - inst.helperProportions.width
18066					} ).left;
18067				}
18068				if ( rs ) {
18069					ui.position.left = inst._convertPositionTo( "relative", {
18070						top: 0,
18071						left: r
18072					} ).left;
18073				}
18074			}
18075
18076			first = ( ts || bs || ls || rs );
18077
18078			if ( o.snapMode !== "outer" ) {
18079				ts = Math.abs( t - y1 ) <= d;
18080				bs = Math.abs( b - y2 ) <= d;
18081				ls = Math.abs( l - x1 ) <= d;
18082				rs = Math.abs( r - x2 ) <= d;
18083				if ( ts ) {
18084					ui.position.top = inst._convertPositionTo( "relative", {
18085						top: t,
18086						left: 0
18087					} ).top;
18088				}
18089				if ( bs ) {
18090					ui.position.top = inst._convertPositionTo( "relative", {
18091						top: b - inst.helperProportions.height,
18092						left: 0
18093					} ).top;
18094				}
18095				if ( ls ) {
18096					ui.position.left = inst._convertPositionTo( "relative", {
18097						top: 0,
18098						left: l
18099					} ).left;
18100				}
18101				if ( rs ) {
18102					ui.position.left = inst._convertPositionTo( "relative", {
18103						top: 0,
18104						left: r - inst.helperProportions.width
18105					} ).left;
18106				}
18107			}
18108
18109			if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
18110				if ( inst.options.snap.snap ) {
18111					inst.options.snap.snap.call(
18112						inst.element,
18113						event,
18114						$.extend( inst._uiHash(), {
18115							snapItem: inst.snapElements[ i ].item
18116						} ) );
18117				}
18118			}
18119			inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
18120
18121		}
18122
18123	}
18124} );
18125
18126$.ui.plugin.add( "draggable", "stack", {
18127	start: function( event, ui, instance ) {
18128		var min,
18129			o = instance.options,
18130			group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
18131				return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
18132					( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
18133			} );
18134
18135		if ( !group.length ) {
18136			return;
18137		}
18138
18139		min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
18140		$( group ).each( function( i ) {
18141			$( this ).css( "zIndex", min + i );
18142		} );
18143		this.css( "zIndex", ( min + group.length ) );
18144	}
18145} );
18146
18147$.ui.plugin.add( "draggable", "zIndex", {
18148	start: function( event, ui, instance ) {
18149		var t = $( ui.helper ),
18150			o = instance.options;
18151
18152		if ( t.css( "zIndex" ) ) {
18153			o._zIndex = t.css( "zIndex" );
18154		}
18155		t.css( "zIndex", o.zIndex );
18156	},
18157	stop: function( event, ui, instance ) {
18158		var o = instance.options;
18159
18160		if ( o._zIndex ) {
18161			$( ui.helper ).css( "zIndex", o._zIndex );
18162		}
18163	}
18164} );
18165
18166var widgetsDraggable = $.ui.draggable;
18167
18168
18169/*!
18170 * jQuery UI Resizable 1.14.
181701
18171 * https://jqueryui.com
18172 *
18173 * Copyright OpenJS Foundation and other contributors
18174 * Released under the MIT license.
18175 * https://jquery.org/license
18176 */
18177
18178//>>label: Resizable
18179//>>group: Interactions
18180//>>description: Enables resize functionality for any element.
18181//>>docs: https://api.jqueryui.com/resizable/
18182//>>demos: https://jqueryui.com/resizable/
18183//>>css.structure: ../../themes/base/core.css
18184//>>css.structure: ../../themes/base/resizable.css
18185//>>css.theme: ../../themes/base/theme.css
18186
18187
18188$.widget( "ui.resizable", $.ui.mouse, {
18189	version: "1.14.1",
18190	widgetEventPrefix: "resize",
18191	options: {
18192		alsoResize: false,
18193		animate: false,
18194		animateDuration: "slow",
18195		animateEasing: "swing",
18196		aspectRatio: false,
18197		autoHide: false,
18198		classes: {
18199			"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"
18200		},
18201		containment: false,
18202		ghost: false,
18203		grid: false,
18204		handles: "e,s,se",
18205		helper: false,
18206		maxHeight: null,
18207		maxWidth: null,
18208		minHeight: 10,
18209		minWidth: 10,
18210
18211		// See #7960
18212		zIndex: 90,
18213
18214		// Callbacks
18215		resize: null,
18216		start: null,
18217		stop: null
18218	},
18219
18220	_num: function( value ) {
18221		return parseFloat( value ) || 0;
18222	},
18223
18224	_isNumber: function( value ) {
18225		return !isNaN( parseFloat( value ) );
18226	},
18227
18228	_hasScroll: function( el, a ) {
18229
18230		var scroll,
18231			has = false,
18232			overflow = $( el ).css( "overflow" );
18233
18234		if ( overflow === "hidden" ) {
18235			return false;
18236		}
18237		if ( overflow === "scroll" ) {
18238			return true;
18239		}
18240
18241		scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop";
18242
18243		if ( el[ scroll ] > 0 ) {
18244			return true;
18245		}
18246
18247		// TODO: determine which cases actually cause this to happen
18248		// if the element doesn't have the scroll set, see if it's possible to
18249		// set the scroll
18250		try {
18251			el[ scroll ] = 1;
18252			has = ( el[ scroll ] > 0 );
18253			el[ scroll ] = 0;
18254		} catch ( 
vendor: 29,932 bytes, lines 18254-19424
18254e ) {
18255
18256			// `el` might be a string, then setting `scroll` will throw
18257			// an error in strict mode; ignore it.
18258		}
18259		return has;
18260	},
18261
18262	_create: function() {
18263
18264		var margins,
18265			o = this.options,
18266			that = this;
18267		this._addClass( "ui-resizable" );
18268
18269		$.extend( this, {
18270			_aspectRatio: !!( o.aspectRatio ),
18271			aspectRatio: o.aspectRatio,
18272			originalElement: this.element,
18273			_proportionallyResizeElements: [],
18274			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
18275		} );
18276
18277		// Wrap the element if it cannot hold child nodes
18278		if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {
18279
18280			this.element.wrap(
18281				$( "<div class='ui-wrapper'></div>" ).css( {
18282					overflow: "hidden",
18283					position: this.element.css( "position" ),
18284					width: this.element.outerWidth(),
18285					height: this.element.outerHeight(),
18286					top: this.element.css( "top" ),
18287					left: this.element.css( "left" )
18288				} )
18289			);
18290
18291			this.element = this.element.parent().data(
18292				"ui-resizable", this.element.resizable( "instance" )
18293			);
18294
18295			this.elementIsWrapper = true;
18296
18297			margins = {
18298				marginTop: this.originalElement.css( "marginTop" ),
18299				marginRight: this.originalElement.css( "marginRight" ),
18300				marginBottom: this.originalElement.css( "marginBottom" ),
18301				marginLeft: this.originalElement.css( "marginLeft" )
18302			};
18303
18304			this.element.css( margins );
18305
18306			// Support: Safari
18307			// Prevent Safari textarea resize
18308			this.originalResizeStyle = this.originalElement.css( "resize" );
18309			this.originalElement.css( "resize", "none" );
18310
18311			this._proportionallyResizeElements.push( this.originalElement.css( {
18312				position: "static",
18313				zoom: 1,
18314				display: "block"
18315			} ) );
18316
18317			this._proportionallyResize();
18318		}
18319
18320		this._setupHandles();
18321
18322		if ( o.autoHide ) {
18323			$( this.element )
18324				.on( "mouseenter", function() {
18325					if ( o.disabled ) {
18326						return;
18327					}
18328					that._removeClass( "ui-resizable-autohide" );
18329					that._handles.show();
18330				} )
18331				.on( "mouseleave", function() {
18332					if ( o.disabled ) {
18333						return;
18334					}
18335					if ( !that.resizing ) {
18336						that._addClass( "ui-resizable-autohide" );
18337						that._handles.hide();
18338					}
18339				} );
18340		}
18341
18342		this._mouseInit();
18343	},
18344
18345	_destroy: function() {
18346
18347		this._mouseDestroy();
18348		this._addedHandles.remove();
18349
18350		var wrapper,
18351			_destroy = function( exp ) {
18352				$( exp )
18353					.removeData( "resizable" )
18354					.removeData( "ui-resizable" )
18355					.off( ".resizable" );
18356			};
18357
18358		// TODO: Unwrap at same DOM position
18359		if ( this.elementIsWrapper ) {
18360			_destroy( this.element );
18361			wrapper = this.element;
18362			this.originalElement.css( {
18363				position: wrapper.css( "position" ),
18364				width: wrapper.outerWidth(),
18365				height: wrapper.outerHeight(),
18366				top: wrapper.css( "top" ),
18367				left: wrapper.css( "left" )
18368			} ).insertAfter( wrapper );
18369			wrapper.remove();
18370		}
18371
18372		this.originalElement.css( "resize", this.originalResizeStyle );
18373		_destroy( this.originalElement );
18374
18375		return this;
18376	},
18377
18378	_setOption: function( key, value ) {
18379		this._super( key, value );
18380
18381		switch ( key ) {
18382		case "handles":
18383			this._removeHandles();
18384			this._setupHandles();
18385			break;
18386		case "aspectRatio":
18387			this._aspectRatio = !!value;
18388			break;
18389		default:
18390			break;
18391		}
18392	},
18393
18394	_setupHandles: function() {
18395		var o = this.options, handle, i, n, hname, axis, that = this;
18396		this.handles = o.handles ||
18397			( !$( ".ui-resizable-handle", this.element ).length ?
18398				"e,s,se" : {
18399					n: ".ui-resizable-n",
18400					e: ".ui-resizable-e",
18401					s: ".ui-resizable-s",
18402					w: ".ui-resizable-w",
18403					se: ".ui-resizable-se",
18404					sw: ".ui-resizable-sw",
18405					ne: ".ui-resizable-ne",
18406					nw: ".ui-resizable-nw"
18407				} );
18408
18409		this._handles = $();
18410		this._addedHandles = $();
18411		if ( this.handles.constructor === String ) {
18412
18413			if ( this.handles === "all" ) {
18414				this.handles = "n,e,s,w,se,sw,ne,nw";
18415			}
18416
18417			n = this.handles.split( "," );
18418			this.handles = {};
18419
18420			for ( i = 0; i < n.length; i++ ) {
18421
18422				handle = String.prototype.trim.call( n[ i ] );
18423				hname = "ui-resizable-" + handle;
18424				axis = $( "<div>" );
18425				this._addClass( axis, "ui-resizable-handle " + hname );
18426
18427				axis.css( { zIndex: o.zIndex } );
18428
18429				this.handles[ handle ] = ".ui-resizable-" + handle;
18430				if ( !this.element.children( this.handles[ handle ] ).length ) {
18431					this.element.append( axis );
18432					this._addedHandles = this._addedHandles.add( axis );
18433				}
18434			}
18435
18436		}
18437
18438		this._renderAxis = function( target ) {
18439
18440			var i, axis, padPos, padWrapper;
18441
18442			target = target || this.element;
18443
18444			for ( i in this.handles ) {
18445
18446				if ( this.handles[ i ].constructor === String ) {
18447					this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();
18448				} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
18449					this.handles[ i ] = $( this.handles[ i ] );
18450					this._on( this.handles[ i ], { "mousedown": that._mouseDown } );
18451				}
18452
18453				if ( this.elementIsWrapper &&
18454						this.originalElement[ 0 ]
18455							.nodeName
18456							.match( /^(textarea|input|select|button)$/i ) ) {
18457					axis = $( this.handles[ i ], this.element );
18458
18459					padWrapper = /sw|ne|nw|se|n|s/.test( i ) ?
18460						axis.outerHeight() :
18461						axis.outerWidth();
18462
18463					padPos = [ "padding",
18464						/ne|nw|n/.test( i ) ? "Top" :
18465						/se|sw|s/.test( i ) ? "Bottom" :
18466						/^e$/.test( i ) ? "Right" : "Left" ].join( "" );
18467
18468					target.css( padPos, padWrapper );
18469
18470					this._proportionallyResize();
18471				}
18472
18473				this._handles = this._handles.add( this.handles[ i ] );
18474			}
18475		};
18476
18477		// TODO: make renderAxis a prototype function
18478		this._renderAxis( this.element );
18479
18480		this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
18481		this._handles.disableSelection();
18482
18483		this._handles.on( "mouseover", function() {
18484			if ( !that.resizing ) {
18485				if ( this.className ) {
18486					axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );
18487				}
18488				that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se";
18489			}
18490		} );
18491
18492		if ( o.autoHide ) {
18493			this._handles.hide();
18494			this._addClass( "ui-resizable-autohide" );
18495		}
18496	},
18497
18498	_removeHandles: function() {
18499		this._addedHandles.remove();
18500	},
18501
18502	_mouseCapture: function( event ) {
18503		var i, handle,
18504			capture = false;
18505
18506		for ( i in this.handles ) {
18507			handle = $( this.handles[ i ] )[ 0 ];
18508			if ( handle === event.target || $.contains( handle, event.target ) ) {
18509				capture = true;
18510			}
18511		}
18512
18513		return !this.options.disabled && capture;
18514	},
18515
18516	_mouseStart: function( event ) {
18517
18518		var curleft, curtop, cursor, calculatedSize,
18519			o = this.options,
18520			el = this.element;
18521
18522		this.resizing = true;
18523
18524		this._renderProxy();
18525
18526		curleft = this._num( this.helper.css( "left" ) );
18527		curtop = this._num( this.helper.css( "top" ) );
18528
18529		if ( o.containment ) {
18530			curleft += $( o.containment ).scrollLeft() || 0;
18531			curtop += $( o.containment ).scrollTop() || 0;
18532		}
18533
18534		this.offset = this.helper.offset();
18535		this.position = { left: curleft, top: curtop };
18536
18537		if ( !this._helper ) {
18538			calculatedSize = this._calculateAdjustedElementDimensions( el );
18539		}
18540
18541		this.size = this._helper ? {
18542				width: this.helper.width(),
18543				height: this.helper.height()
18544			} : {
18545				width: calculatedSize.width,
18546				height: calculatedSize.height
18547			};
18548
18549		this.originalSize = this._helper ? {
18550				width: el.outerWidth(),
18551				height: el.outerHeight()
18552			} : {
18553				width: calculatedSize.width,
18554				height: calculatedSize.height
18555			};
18556
18557		this.sizeDiff = {
18558			width: el.outerWidth() - el.width(),
18559			height: el.outerHeight() - el.height()
18560		};
18561
18562		this.originalPosition = { left: curleft, top: curtop };
18563		this.originalMousePosition = { left: event.pageX, top: event.pageY };
18564
18565		this.aspectRatio = ( typeof o.aspectRatio === "number" ) ?
18566			o.aspectRatio :
18567			( ( this.originalSize.width / this.originalSize.height ) || 1 );
18568
18569		cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" );
18570		$( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor );
18571
18572		this._addClass( "ui-resizable-resizing" );
18573		this._propagate( "start", event );
18574		return true;
18575	},
18576
18577	_mouseDrag: function( event ) {
18578
18579		var data, props,
18580			smp = this.originalMousePosition,
18581			a = this.axis,
18582			dx = ( event.pageX - smp.left ) || 0,
18583			dy = ( event.pageY - smp.top ) || 0,
18584			trigger = this._change[ a ];
18585
18586		this._updatePrevProperties();
18587
18588		if ( !trigger ) {
18589			return false;
18590		}
18591
18592		data = trigger.apply( this, [ event, dx, dy ] );
18593
18594		this._updateVirtualBoundaries( event.shiftKey );
18595		if ( this._aspectRatio || event.shiftKey ) {
18596			data = this._updateRatio( data, event );
18597		}
18598
18599		data = this._respectSize( data, event );
18600
18601		this._updateCache( data );
18602
18603		this._propagate( "resize", event );
18604
18605		props = this._applyChanges();
18606
18607		if ( !this._helper && this._proportionallyResizeElements.length ) {
18608			this._proportionallyResize();
18609		}
18610
18611		if ( !$.isEmptyObject( props ) ) {
18612			this._updatePrevProperties();
18613			this._trigger( "resize", event, this.ui() );
18614			this._applyChanges();
18615		}
18616
18617		return false;
18618	},
18619
18620	_mouseStop: function( event ) {
18621
18622		this.resizing = false;
18623		var pr, ista, soffseth, soffsetw, s, left, top,
18624			o = this.options, that = this;
18625
18626		if ( this._helper ) {
18627
18628			pr = this._proportionallyResizeElements;
18629			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );
18630			soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height;
18631			soffsetw = ista ? 0 : that.sizeDiff.width;
18632
18633			s = {
18634				width: ( that.helper.width()  - soffsetw ),
18635				height: ( that.helper.height() - soffseth )
18636			};
18637			left = ( parseFloat( that.element.css( "left" ) ) +
18638				( that.position.left - that.originalPosition.left ) ) || null;
18639			top = ( parseFloat( that.element.css( "top" ) ) +
18640				( that.position.top - that.originalPosition.top ) ) || null;
18641
18642			if ( !o.animate ) {
18643				this.element.css( $.extend( s, { top: top, left: left } ) );
18644			}
18645
18646			that.helper.height( that.size.height );
18647			that.helper.width( that.size.width );
18648
18649			if ( this._helper && !o.animate ) {
18650				this._proportionallyResize();
18651			}
18652		}
18653
18654		$( "body" ).css( "cursor", "auto" );
18655
18656		this._removeClass( "ui-resizable-resizing" );
18657
18658		this._propagate( "stop", event );
18659
18660		if ( this._helper ) {
18661			this.helper.remove();
18662		}
18663
18664		return false;
18665
18666	},
18667
18668	_updatePrevProperties: function() {
18669		this.prevPosition = {
18670			top: this.position.top,
18671			left: this.position.left
18672		};
18673		this.prevSize = {
18674			width: this.size.width,
18675			height: this.size.height
18676		};
18677	},
18678
18679	_applyChanges: function() {
18680		var props = {};
18681
18682		if ( this.position.top !== this.prevPosition.top ) {
18683			props.top = this.position.top + "px";
18684		}
18685		if ( this.position.left !== this.prevPosition.left ) {
18686			props.left = this.position.left + "px";
18687		}
18688
18689		this.helper.css( props );
18690
18691		if ( this.size.width !== this.prevSize.width ) {
18692			props.width = this.size.width + "px";
18693			this.helper.width( props.width );
18694		}
18695		if ( this.size.height !== this.prevSize.height ) {
18696			props.height = this.size.height + "px";
18697			this.helper.height( props.height );
18698		}
18699
18700		return props;
18701	},
18702
18703	_updateVirtualBoundaries: function( forceAspectRatio ) {
18704		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
18705			o = this.options;
18706
18707		b = {
18708			minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
18709			maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
18710			minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
18711			maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
18712		};
18713
18714		if ( this._aspectRatio || forceAspectRatio ) {
18715			pMinWidth = b.minHeight * this.aspectRatio;
18716			pMinHeight = b.minWidth / this.aspectRatio;
18717			pMaxWidth = b.maxHeight * this.aspectRatio;
18718			pMaxHeight = b.maxWidth / this.aspectRatio;
18719
18720			if ( pMinWidth > b.minWidth ) {
18721				b.minWidth = pMinWidth;
18722			}
18723			if ( pMinHeight > b.minHeight ) {
18724				b.minHeight = pMinHeight;
18725			}
18726			if ( pMaxWidth < b.maxWidth ) {
18727				b.maxWidth = pMaxWidth;
18728			}
18729			if ( pMaxHeight < b.maxHeight ) {
18730				b.maxHeight = pMaxHeight;
18731			}
18732		}
18733		this._vBoundaries = b;
18734	},
18735
18736	_updateCache: function( data ) {
18737		this.offset = this.helper.offset();
18738		if ( this._isNumber( data.left ) ) {
18739			this.position.left = data.left;
18740		}
18741		if ( this._isNumber( data.top ) ) {
18742			this.position.top = data.top;
18743		}
18744		if ( this._isNumber( data.height ) ) {
18745			this.size.height = data.height;
18746		}
18747		if ( this._isNumber( data.width ) ) {
18748			this.size.width = data.width;
18749		}
18750	},
18751
18752	_updateRatio: function( data ) {
18753
18754		var cpos = this.position,
18755			csize = this.size,
18756			a = this.axis;
18757
18758		if ( this._isNumber( data.height ) ) {
18759			data.width = ( data.height * this.aspectRatio );
18760		} else if ( this._isNumber( data.width ) ) {
18761			data.height = ( data.width / this.aspectRatio );
18762		}
18763
18764		if ( a === "sw" ) {
18765			data.left = cpos.left + ( csize.width - data.width );
18766			data.top = null;
18767		}
18768		if ( a === "nw" ) {
18769			data.top = cpos.top + ( csize.height - data.height );
18770			data.left = cpos.left + ( csize.width - data.width );
18771		}
18772
18773		return data;
18774	},
18775
18776	_respectSize: function( data ) {
18777
18778		var o = this._vBoundaries,
18779			a = this.axis,
18780			ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
18781			ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
18782			isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
18783			isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
18784			dw = this.originalPosition.left + this.originalSize.width,
18785			dh = this.originalPosition.top + this.originalSize.height,
18786			cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
18787		if ( isminw ) {
18788			data.width = o.minWidth;
18789		}
18790		if ( isminh ) {
18791			data.height = o.minHeight;
18792		}
18793		if ( ismaxw ) {
18794			data.width = o.maxWidth;
18795		}
18796		if ( ismaxh ) {
18797			data.height = o.maxHeight;
18798		}
18799
18800		if ( isminw && cw ) {
18801			data.left = dw - o.minWidth;
18802		}
18803		if ( ismaxw && cw ) {
18804			data.left = dw - o.maxWidth;
18805		}
18806		if ( isminh && ch ) {
18807			data.top = dh - o.minHeight;
18808		}
18809		if ( ismaxh && ch ) {
18810			data.top = dh - o.maxHeight;
18811		}
18812
18813		// Fixing jump error on top/left - bug #2330
18814		if ( !data.width && !data.height && !data.left && data.top ) {
18815			data.top = null;
18816		} else if ( !data.width && !data.height && !data.top && data.left ) {
18817			data.left = null;
18818		}
18819
18820		return data;
18821	},
18822
18823	_getPaddingPlusBorderDimensions: function( element ) {
18824		var i = 0,
18825			widths = [],
18826			borders = [
18827				element.css( "borderTopWidth" ),
18828				element.css( "borderRightWidth" ),
18829				element.css( "borderBottomWidth" ),
18830				element.css( "borderLeftWidth" )
18831			],
18832			paddings = [
18833				element.css( "paddingTop" ),
18834				element.css( "paddingRight" ),
18835				element.css( "paddingBottom" ),
18836				element.css( "paddingLeft" )
18837			];
18838
18839		for ( ; i < 4; i++ ) {
18840			widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
18841			widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
18842		}
18843
18844		return {
18845			height: widths[ 0 ] + widths[ 2 ],
18846			width: widths[ 1 ] + widths[ 3 ]
18847		};
18848	},
18849
18850	_calculateAdjustedElementDimensions: function( element ) {
18851		var elWidth, elHeight, paddingBorder,
18852			ce = element.get( 0 );
18853
18854		if ( element.css( "box-sizing" ) !== "content-box" ||
18855			( !this._hasScroll( ce ) && !this._hasScroll( ce, "left" ) ) ) {
18856				return {
18857					height: parseFloat( element.css( "height" ) ),
18858					width: parseFloat( element.css( "width" ) )
18859				};
18860		}
18861
18862		// Check if CSS inline styles are set and use those (usually from previous resizes)
18863		elWidth = parseFloat( ce.style.width );
18864		elHeight = parseFloat( ce.style.height );
18865
18866		paddingBorder = this._getPaddingPlusBorderDimensions( element );
18867		elWidth = isNaN( elWidth ) ?
18868			this._getElementTheoreticalSize( element, paddingBorder, "width" ) :
18869			elWidth;
18870		elHeight = isNaN( elHeight ) ?
18871			this._getElementTheoreticalSize( element, paddingBorder, "height" ) :
18872			elHeight;
18873
18874		return {
18875			height: elHeight,
18876			width: elWidth
18877		};
18878	},
18879
18880	_getElementTheoreticalSize: function( element, extraSize, dimension ) {
18881
18882		// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
18883		var size = Math.max( 0, Math.ceil(
18884			element.get( 0 )[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
18885			extraSize[ dimension ] -
18886			0.5
18887
18888		// If offsetWidth/offsetHeight is unknown, then we can't determine theoretical size.
18889		// Use an explicit zero to avoid NaN.
18890		// See https://github.com/jquery/jquery/issues/3964
18891		) ) || 0;
18892
18893		return size;
18894	},
18895
18896	_proportionallyResize: function() {
18897
18898		if ( !this._proportionallyResizeElements.length ) {
18899			return;
18900		}
18901
18902		var prel,
18903			i = 0,
18904			element = this.helper || this.element;
18905
18906		for ( ; i < this._proportionallyResizeElements.length; i++ ) {
18907
18908			prel = this._proportionallyResizeElements[ i ];
18909
18910			// TODO: Seems like a bug to cache this.outerDimensions
18911			// considering that we are in a loop.
18912			if ( !this.outerDimensions ) {
18913				this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
18914			}
18915
18916			prel.css( {
18917				height: ( element.height() - this.outerDimensions.height ) || 0,
18918				width: ( element.width() - this.outerDimensions.width ) || 0
18919			} );
18920
18921		}
18922
18923	},
18924
18925	_renderProxy: function() {
18926
18927		var el = this.element, o = this.options;
18928		this.elementOffset = el.offset();
18929
18930		if ( this._helper ) {
18931
18932			this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );
18933
18934			this._addClass( this.helper, this._helper );
18935			this.helper.css( {
18936				width: this.element.outerWidth(),
18937				height: this.element.outerHeight(),
18938				position: "absolute",
18939				left: this.elementOffset.left + "px",
18940				top: this.elementOffset.top + "px",
18941				zIndex: ++o.zIndex //TODO: Don't modify option
18942			} );
18943
18944			this.helper
18945				.appendTo( "body" )
18946				.disableSelection();
18947
18948		} else {
18949			this.helper = this.element;
18950		}
18951
18952	},
18953
18954	_change: {
18955		e: function( event, dx ) {
18956			return { width: this.originalSize.width + dx };
18957		},
18958		w: function( event, dx ) {
18959			var cs = this.originalSize, sp = this.originalPosition;
18960			return { left: sp.left + dx, width: cs.width - dx };
18961		},
18962		n: function( event, dx, dy ) {
18963			var cs = this.originalSize, sp = this.originalPosition;
18964			return { top: sp.top + dy, height: cs.height - dy };
18965		},
18966		s: function( event, dx, dy ) {
18967			return { height: this.originalSize.height + dy };
18968		},
18969		se: function( event, dx, dy ) {
18970			return $.extend( this._change.s.apply( this, arguments ),
18971				this._change.e.apply( this, [ event, dx, dy ] ) );
18972		},
18973		sw: function( event, dx, dy ) {
18974			return $.extend( this._change.s.apply( this, arguments ),
18975				this._change.w.apply( this, [ event, dx, dy ] ) );
18976		},
18977		ne: function( event, dx, dy ) {
18978			return $.extend( this._change.n.apply( this, arguments ),
18979				this._change.e.apply( this, [ event, dx, dy ] ) );
18980		},
18981		nw: function( event, dx, dy ) {
18982			return $.extend( this._change.n.apply( this, arguments ),
18983				this._change.w.apply( this, [ event, dx, dy ] ) );
18984		}
18985	},
18986
18987	_propagate: function( n, event ) {
18988		$.ui.plugin.call( this, n, [ event, this.ui() ] );
18989		if ( n !== "resize" ) {
18990			this._trigger( n, event, this.ui() );
18991		}
18992	},
18993
18994	plugins: {},
18995
18996	ui: function() {
18997		return {
18998			originalElement: this.originalElement,
18999			element: this.element,
19000			helper: this.helper,
19001			position: this.position,
19002			size: this.size,
19003			originalSize: this.originalSize,
19004			originalPosition: this.originalPosition
19005		};
19006	}
19007
19008} );
19009
19010/*
19011 * Resizable Extensions
19012 */
19013
19014$.ui.plugin.add( "resizable", "animate", {
19015
19016	stop: function( event ) {
19017		var that = $( this ).resizable( "instance" ),
19018			o = that.options,
19019			pr = that._proportionallyResizeElements,
19020			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
19021			soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
19022			soffsetw = ista ? 0 : that.sizeDiff.width,
19023			style = {
19024				width: ( that.size.width - soffsetw ),
19025				height: ( that.size.height - soffseth )
19026			},
19027			left = ( parseFloat( that.element.css( "left" ) ) +
19028				( that.position.left - that.originalPosition.left ) ) || null,
19029			top = ( parseFloat( that.element.css( "top" ) ) +
19030				( that.position.top - that.originalPosition.top ) ) || null;
19031
19032		that.element.animate(
19033			$.extend( style, top && left ? { top: top, left: left } : {} ), {
19034				duration: o.animateDuration,
19035				easing: o.animateEasing,
19036				step: function() {
19037
19038					var data = {
19039						width: parseFloat( that.element.css( "width" ) ),
19040						height: parseFloat( that.element.css( "height" ) ),
19041						top: parseFloat( that.element.css( "top" ) ),
19042						left: parseFloat( that.element.css( "left" ) )
19043					};
19044
19045					if ( pr && pr.length ) {
19046						$( pr[ 0 ] ).css( { width: data.width, height: data.height } );
19047					}
19048
19049					// Propagating resize, and updating values for each animation step
19050					that._updateCache( data );
19051					that._propagate( "resize", event );
19052
19053				}
19054			}
19055		);
19056	}
19057
19058} );
19059
19060$.ui.plugin.add( "resizable", "containment", {
19061
19062	start: function() {
19063		var element, p, co, ch, cw, width, height,
19064			that = $( this ).resizable( "instance" ),
19065			o = that.options,
19066			el = that.element,
19067			oc = o.containment,
19068			ce = ( oc instanceof $ ) ?
19069				oc.get( 0 ) :
19070				( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
19071
19072		if ( !ce ) {
19073			return;
19074		}
19075
19076		that.containerElement = $( ce );
19077
19078		if ( /document/.test( oc ) || oc === document ) {
19079			that.containerOffset = {
19080				left: 0,
19081				top: 0
19082			};
19083			that.containerPosition = {
19084				left: 0,
19085				top: 0
19086			};
19087
19088			that.parentData = {
19089				element: $( document ),
19090				left: 0,
19091				top: 0,
19092				width: $( document ).width(),
19093				height: $( document ).height() || document.body.parentNode.scrollHeight
19094			};
19095		} else {
19096			element = $( ce );
19097			p = [];
19098			$( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
19099				p[ i ] = that._num( element.css( "padding" + name ) );
19100			} );
19101
19102			that.containerOffset = element.offset();
19103			that.containerPosition = element.position();
19104			that.containerSize = {
19105				height: ( element.innerHeight() - p[ 3 ] ),
19106				width: ( element.innerWidth() - p[ 1 ] )
19107			};
19108
19109			co = that.containerOffset;
19110			ch = that.containerSize.height;
19111			cw = that.containerSize.width;
19112			width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw );
19113			height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );
19114
19115			that.parentData = {
19116				element: ce,
19117				left: co.left,
19118				top: co.top,
19119				width: width,
19120				height: height
19121			};
19122		}
19123	},
19124
19125	resize: function( event ) {
19126		var woset, hoset, isParent, isOffsetRelative,
19127			that = $( this ).resizable( "instance" ),
19128			o = that.options,
19129			co = that.containerOffset,
19130			cp = that.position,
19131			pRatio = that._aspectRatio || event.shiftKey,
19132			cop = {
19133				top: 0,
19134				left: 0
19135			},
19136			ce = that.containerElement,
19137			continueResize = true;
19138
19139		if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
19140			cop = co;
19141		}
19142
19143		if ( cp.left < ( that._helper ? co.left : 0 ) ) {
19144			that.size.width = that.size.width +
19145				( that._helper ?
19146					( that.position.left - co.left ) :
19147					( that.position.left - cop.left ) );
19148
19149			if ( pRatio ) {
19150				that.size.height = that.size.width / that.aspectRatio;
19151				continueResize = false;
19152			}
19153			that.position.left = o.helper ? co.left : 0;
19154		}
19155
19156		if ( cp.top < ( that._helper ? co.top : 0 ) ) {
19157			that.size.height = that.size.height +
19158				( that._helper ?
19159					( that.position.top - co.top ) :
19160					that.position.top );
19161
19162			if ( pRatio ) {
19163				that.size.width = that.size.height * that.aspectRatio;
19164				continueResize = false;
19165			}
19166			that.position.top = that._helper ? co.top : 0;
19167		}
19168
19169		isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
19170		isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
19171
19172		if ( isParent && isOffsetRelative ) {
19173			that.offset.left = that.parentData.left + that.position.left;
19174			that.offset.top = that.parentData.top + that.position.top;
19175		} else {
19176			that.offset.left = that.element.offset().left;
19177			that.offset.top = that.element.offset().top;
19178		}
19179
19180		woset = Math.abs( that.sizeDiff.width +
19181			( that._helper ?
19182				that.offset.left - cop.left :
19183				( that.offset.left - co.left ) ) );
19184
19185		hoset = Math.abs( that.sizeDiff.height +
19186			( that._helper ?
19187				that.offset.top - cop.top :
19188				( that.offset.top - co.top ) ) );
19189
19190		if ( woset + that.size.width >= that.parentData.width ) {
19191			that.size.width = that.parentData.width - woset;
19192			if ( pRatio ) {
19193				that.size.height = that.size.width / that.aspectRatio;
19194				continueResize = false;
19195			}
19196		}
19197
19198		if ( hoset + that.size.height >= that.parentData.height ) {
19199			that.size.height = that.parentData.height - hoset;
19200			if ( pRatio ) {
19201				that.size.width = that.size.height * that.aspectRatio;
19202				continueResize = false;
19203			}
19204		}
19205
19206		if ( !continueResize ) {
19207			that.position.left = that.prevPosition.left;
19208			that.position.top = that.prevPosition.top;
19209			that.size.width = that.prevSize.width;
19210			that.size.height = that.prevSize.height;
19211		}
19212	},
19213
19214	stop: function() {
19215		var that = $( this ).resizable( "instance" ),
19216			o = that.options,
19217			co = that.containerOffset,
19218			cop = that.containerPosition,
19219			ce = that.containerElement,
19220			helper = $( that.helper ),
19221			ho = helper.offset(),
19222			w = helper.outerWidth() - that.sizeDiff.width,
19223			h = helper.outerHeight() - that.sizeDiff.height;
19224
19225		if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
19226			$( this ).css( {
19227				left: ho.left - cop.left - co.left,
19228				width: w,
19229				height: h
19230			} );
19231		}
19232
19233		if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
19234			$( this ).css( {
19235				left: ho.left - cop.left - co.left,
19236				width: w,
19237				height: h
19238			} );
19239		}
19240	}
19241} );
19242
19243$.ui.plugin.add( "resizable", "alsoResize", {
19244
19245	start: function() {
19246		var that = $( this ).resizable( "instance" ),
19247			o = that.options;
19248
19249		$( o.alsoResize ).each( function() {
19250			var el = $( this ),
19251				elSize = that._calculateAdjustedElementDimensions( el );
19252
19253			el.data( "ui-resizable-alsoresize", {
19254				width: elSize.width, height: elSize.height,
19255				left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
19256			} );
19257		} );
19258	},
19259
19260	resize: function( event, ui ) {
19261		var that = $( this ).resizable( "instance" ),
19262			o = that.options,
19263			os = that.originalSize,
19264			op = that.originalPosition,
19265			delta = {
19266				height: ( that.size.height - os.height ) || 0,
19267				width: ( that.size.width - os.width ) || 0,
19268				top: ( that.position.top - op.top ) || 0,
19269				left: ( that.position.left - op.left ) || 0
19270			};
19271
19272			$( o.alsoResize ).each( function() {
19273				var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {},
19274					css = el.parents( ui.originalElement[ 0 ] ).length ?
19275							[ "width", "height" ] :
19276							[ "width", "height", "top", "left" ];
19277
19278				$.each( css, function( i, prop ) {
19279					var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );
19280					if ( sum && sum >= 0 ) {
19281						style[ prop ] = sum || null;
19282					}
19283				} );
19284
19285				el.css( style );
19286			} );
19287	},
19288
19289	stop: function() {
19290		$( this ).removeData( "ui-resizable-alsoresize" );
19291	}
19292} );
19293
19294$.ui.plugin.add( "resizable", "ghost", {
19295
19296	start: function() {
19297
19298		var that = $( this ).resizable( "instance" ), cs = that.size;
19299
19300		that.ghost = that.originalElement.clone();
19301		that.ghost.css( {
19302			opacity: 0.25,
19303			display: "block",
19304			position: "relative",
19305			height: cs.height,
19306			width: cs.width,
19307			margin: 0,
19308			left: 0,
19309			top: 0
19310		} );
19311
19312		that._addClass( that.ghost, "ui-resizable-ghost" );
19313
19314		// DEPRECATED
19315		// TODO: remove after 1.12
19316		if ( $.uiBackCompat === true && typeof that.options.ghost === "string" ) {
19317
19318			// Ghost option
19319			that.ghost.addClass( this.options.ghost );
19320		}
19321
19322		that.ghost.appendTo( that.helper );
19323
19324	},
19325
19326	resize: function() {
19327		var that = $( this ).resizable( "instance" );
19328		if ( that.ghost ) {
19329			that.ghost.css( {
19330				position: "relative",
19331				height: that.size.height,
19332				width: that.size.width
19333			} );
19334		}
19335	},
19336
19337	stop: function() {
19338		var that = $( this ).resizable( "instance" );
19339		if ( that.ghost && that.helper ) {
19340			that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );
19341		}
19342	}
19343
19344} );
19345
19346$.ui.plugin.add( "resizable", "grid", {
19347
19348	resize: function() {
19349		var outerDimensions,
19350			that = $( this ).resizable( "instance" ),
19351			o = that.options,
19352			cs = that.size,
19353			os = that.originalSize,
19354			op = that.originalPosition,
19355			a = that.axis,
19356			grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
19357			gridX = ( grid[ 0 ] || 1 ),
19358			gridY = ( grid[ 1 ] || 1 ),
19359			ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,
19360			oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,
19361			newWidth = os.width + ox,
19362			newHeight = os.height + oy,
19363			isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),
19364			isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),
19365			isMinWidth = o.minWidth && ( o.minWidth > newWidth ),
19366			isMinHeight = o.minHeight && ( o.minHeight > newHeight );
19367
19368		o.grid = grid;
19369
19370		if ( isMinWidth ) {
19371			newWidth += gridX;
19372		}
19373		if ( isMinHeight ) {
19374			newHeight += gridY;
19375		}
19376		if ( isMaxWidth ) {
19377			newWidth -= gridX;
19378		}
19379		if ( isMaxHeight ) {
19380			newHeight -= gridY;
19381		}
19382
19383		if ( /^(se|s|e)$/.test( a ) ) {
19384			that.size.width = newWidth;
19385			that.size.height = newHeight;
19386		} else if ( /^(ne)$/.test( a ) ) {
19387			that.size.width = newWidth;
19388			that.size.height = newHeight;
19389			that.position.top = op.top - oy;
19390		} else if ( /^(sw)$/.test( a ) ) {
19391			that.size.width = newWidth;
19392			that.size.height = newHeight;
19393			that.position.left = op.left - ox;
19394		} else {
19395			if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {
19396				outerDimensions = that._getPaddingPlusBorderDimensions( this );
19397			}
19398
19399			if ( newHeight - gridY > 0 ) {
19400				that.size.height = newHeight;
19401				that.position.top = op.top - oy;
19402			} else {
19403				newHeight = gridY - outerDimensions.height;
19404				that.size.height = newHeight;
19405				that.position.top = op.top + os.height - newHeight;
19406			}
19407			if ( newWidth - gridX > 0 ) {
19408				that.size.width = newWidth;
19409				that.position.left = op.left - ox;
19410			} else {
19411				newWidth = gridX - outerDimensions.width;
19412				that.size.width = newWidth;
19413				that.position.left = op.left + os.width - newWidth;
19414			}
19415		}
19416	}
19417
19418} );
19419
19420var widgetsResizable = $.ui.resizable;
19421
19422
19423/*!
19424 * jQuery UI Dialog 1.14.
194241
19425 * https://jqueryui.com
19426 *
19427 * Copyright OpenJS Foundation and other contributors
19428 * Released under the MIT license.
19429 * https://jquery.org/license
19430 */
19431
19432//>>label: Dialog
19433//>>group: Widgets
19434//>>description: Displays customizable dialog windows.
19435//>>docs: https://api.jqueryui.com/dialog/
19436//>>demos: https://jqueryui.com/dialog/
19437//>>css.structure: ../../themes/base/core.css
19438//>>css.structure: ../../themes/base/dialog.css
19439//>>css.theme: ../../themes/base/theme.css
19440
19441
19442$.widget( "ui.dialog", {
19443	version: "1.14.1
vendor: 22,384 bytes, lines 19443-20342
19443",
19444	options: {
19445		appendTo: "body",
19446		autoOpen: true,
19447		buttons: [],
19448		classes: {
19449			"ui-dialog": "ui-corner-all",
19450			"ui-dialog-titlebar": "ui-corner-all"
19451		},
19452		closeOnEscape: true,
19453		closeText: "Close",
19454		draggable: true,
19455		hide: null,
19456		height: "auto",
19457		maxHeight: null,
19458		maxWidth: null,
19459		minHeight: 150,
19460		minWidth: 150,
19461		modal: false,
19462		position: {
19463			my: "center",
19464			at: "center",
19465			of: window,
19466			collision: "fit",
19467
19468			// Ensure the titlebar is always visible
19469			using: function( pos ) {
19470				var topOffset = $( this ).css( pos ).offset().top;
19471				if ( topOffset < 0 ) {
19472					$( this ).css( "top", pos.top - topOffset );
19473				}
19474			}
19475		},
19476		resizable: true,
19477		show: null,
19478		title: null,
19479		uiDialogTitleHeadingLevel: 0,
19480		width: 300,
19481
19482		// Callbacks
19483		beforeClose: null,
19484		close: null,
19485		drag: null,
19486		dragStart: null,
19487		dragStop: null,
19488		focus: null,
19489		open: null,
19490		resize: null,
19491		resizeStart: null,
19492		resizeStop: null
19493	},
19494
19495	sizeRelatedOptions: {
19496		buttons: true,
19497		height: true,
19498		maxHeight: true,
19499		maxWidth: true,
19500		minHeight: true,
19501		minWidth: true,
19502		width: true
19503	},
19504
19505	resizableRelatedOptions: {
19506		maxHeight: true,
19507		maxWidth: true,
19508		minHeight: true,
19509		minWidth: true
19510	},
19511
19512	_create: function() {
19513		this.originalCss = {
19514			display: this.element[ 0 ].style.display,
19515			width: this.element[ 0 ].style.width,
19516			minHeight: this.element[ 0 ].style.minHeight,
19517			maxHeight: this.element[ 0 ].style.maxHeight,
19518			height: this.element[ 0 ].style.height
19519		};
19520		this.originalPosition = {
19521			parent: this.element.parent(),
19522			index: this.element.parent().children().index( this.element )
19523		};
19524		this.originalTitle = this.element.attr( "title" );
19525		if ( this.options.title == null && this.originalTitle != null ) {
19526			this.options.title = this.originalTitle;
19527		}
19528
19529		// Dialogs can't be disabled
19530		if ( this.options.disabled ) {
19531			this.options.disabled = false;
19532		}
19533
19534		this._createWrapper();
19535
19536		this.element
19537			.show()
19538			.removeAttr( "title" )
19539			.appendTo( this.uiDialog );
19540
19541		this._addClass( "ui-dialog-content", "ui-widget-content" );
19542
19543		this._createTitlebar();
19544		this._createButtonPane();
19545
19546		if ( this.options.draggable && $.fn.draggable ) {
19547			this._makeDraggable();
19548		}
19549		if ( this.options.resizable && $.fn.resizable ) {
19550			this._makeResizable();
19551		}
19552
19553		this._isOpen = false;
19554
19555		this._trackFocus();
19556	},
19557
19558	_init: function() {
19559		if ( this.options.autoOpen ) {
19560			this.open();
19561		}
19562	},
19563
19564	_appendTo: function() {
19565		var element = this.options.appendTo;
19566		if ( element && ( element.jquery || element.nodeType ) ) {
19567			return $( element );
19568		}
19569		return this.document.find( element || "body" ).eq( 0 );
19570	},
19571
19572	_destroy: function() {
19573		var next,
19574			originalPosition = this.originalPosition;
19575
19576		this._untrackInstance();
19577		this._destroyOverlay();
19578
19579		this.element
19580			.removeUniqueId()
19581			.css( this.originalCss )
19582
19583			// Without detaching first, the following becomes really slow
19584			.detach();
19585
19586		this.uiDialog.remove();
19587
19588		if ( this.originalTitle ) {
19589			this.element.attr( "title", this.originalTitle );
19590		}
19591
19592		next = originalPosition.parent.children().eq( originalPosition.index );
19593
19594		// Don't try to place the dialog next to itself (#8613)
19595		if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
19596			next.before( this.element );
19597		} else {
19598			originalPosition.parent.append( this.element );
19599		}
19600	},
19601
19602	widget: function() {
19603		return this.uiDialog;
19604	},
19605
19606	disable: $.noop,
19607	enable: $.noop,
19608
19609	close: function( event ) {
19610		var that = this;
19611
19612		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
19613			return;
19614		}
19615
19616		this._isOpen = false;
19617		this._focusedElement = null;
19618		this._destroyOverlay();
19619		this._untrackInstance();
19620
19621		if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
19622
19623			// Hiding a focused element doesn't trigger blur in WebKit
19624			// so in case we have nothing to focus on, explicitly blur the active element
19625			// https://bugs.webkit.org/show_bug.cgi?id=47182
19626			$( this.document[ 0 ].activeElement ).trigger( "blur" );
19627		}
19628
19629		this._hide( this.uiDialog, this.options.hide, function() {
19630			that._trigger( "close", event );
19631		} );
19632	},
19633
19634	isOpen: function() {
19635		return this._isOpen;
19636	},
19637
19638	moveToTop: function() {
19639		this._moveToTop();
19640	},
19641
19642	_moveToTop: function( event, silent ) {
19643		var moved = false,
19644			zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
19645				return +$( this ).css( "z-index" );
19646			} ).get(),
19647			zIndexMax = Math.max.apply( null, zIndices );
19648
19649		if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
19650			this.uiDialog.css( "z-index", zIndexMax + 1 );
19651			moved = true;
19652		}
19653
19654		if ( moved && !silent ) {
19655			this._trigger( "focus", event );
19656		}
19657		return moved;
19658	},
19659
19660	open: function() {
19661		var that = this;
19662		if ( this._isOpen ) {
19663			if ( this._moveToTop() ) {
19664				this._focusTabbable();
19665			}
19666			return;
19667		}
19668
19669		this._isOpen = true;
19670		this.opener = $( this.document[ 0 ].activeElement );
19671
19672		this._size();
19673		this._position();
19674		this._createOverlay();
19675		this._moveToTop( null, true );
19676
19677		// Ensure the overlay is moved to the top with the dialog, but only when
19678		// opening. The overlay shouldn't move after the dialog is open so that
19679		// modeless dialogs opened after the modal dialog stack properly.
19680		if ( this.overlay ) {
19681			this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
19682		}
19683
19684		this._show( this.uiDialog, this.options.show, function() {
19685			that._focusTabbable();
19686			that._trigger( "focus" );
19687		} );
19688
19689		// Track the dialog immediately upon opening in case a focus event
19690		// somehow occurs outside of the dialog before an element inside the
19691		// dialog is focused (#10152)
19692		this._makeFocusTarget();
19693
19694		this._trigger( "open" );
19695	},
19696
19697	_focusTabbable: function() {
19698
19699		// Set focus to the first match:
19700		// 1. An element that was focused previously
19701		// 2. First element inside the dialog matching [autofocus]
19702		// 3. Tabbable element inside the content element
19703		// 4. Tabbable element inside the buttonpane
19704		// 5. The close button
19705		// 6. The dialog itself
19706		var hasFocus = this._focusedElement;
19707		if ( !hasFocus ) {
19708			hasFocus = this.element.find( "[autofocus]" );
19709		}
19710		if ( !hasFocus.length ) {
19711			hasFocus = this.element.find( ":tabbable" );
19712		}
19713		if ( !hasFocus.length ) {
19714			hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
19715		}
19716		if ( !hasFocus.length ) {
19717			hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
19718		}
19719		if ( !hasFocus.length ) {
19720			hasFocus = this.uiDialog;
19721		}
19722		hasFocus.eq( 0 ).trigger( "focus" );
19723	},
19724
19725	_restoreTabbableFocus: function() {
19726		var activeElement = this.document[ 0 ].activeElement,
19727			isActive = this.uiDialog[ 0 ] === activeElement ||
19728				$.contains( this.uiDialog[ 0 ], activeElement );
19729		if ( !isActive ) {
19730			this._focusTabbable();
19731		}
19732	},
19733
19734	_keepFocus: function( event ) {
19735		event.preventDefault();
19736		this._restoreTabbableFocus();
19737	},
19738
19739	_createWrapper: function() {
19740		this.uiDialog = $( "<div>" )
19741			.hide()
19742			.attr( {
19743
19744				// Setting tabIndex makes the div focusable
19745				tabIndex: -1,
19746				role: "dialog",
19747				"aria-modal": this.options.modal ? "true" : null
19748			} )
19749			.appendTo( this._appendTo() );
19750
19751		this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
19752		this._on( this.uiDialog, {
19753			keydown: function( event ) {
19754				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
19755						event.keyCode === $.ui.keyCode.ESCAPE ) {
19756					event.preventDefault();
19757					this.close( event );
19758					return;
19759				}
19760
19761				// Prevent tabbing out of dialogs
19762				if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
19763					return;
19764				}
19765				var tabbables = this.uiDialog.find( ":tabbable" ),
19766					first = tabbables.first(),
19767					last = tabbables.last();
19768
19769				if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
19770						!event.shiftKey ) {
19771					this._delay( function() {
19772						first.trigger( "focus" );
19773					} );
19774					event.preventDefault();
19775				} else if ( ( event.target === first[ 0 ] ||
19776						event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
19777					this._delay( function() {
19778						last.trigger( "focus" );
19779					} );
19780					event.preventDefault();
19781				}
19782			},
19783			mousedown: function( event ) {
19784				if ( this._moveToTop( event ) ) {
19785					this._focusTabbable();
19786				}
19787			}
19788		} );
19789
19790		// We assume that any existing aria-describedby attribute means
19791		// that the dialog content is marked up properly
19792		// otherwise we brute force the content as the description
19793		if ( !this.element.find( "[aria-describedby]" ).length ) {
19794			this.uiDialog.attr( {
19795				"aria-describedby": this.element.uniqueId().attr( "id" )
19796			} );
19797		}
19798	},
19799
19800	_createTitlebar: function() {
19801		var uiDialogTitle;
19802
19803		this.uiDialogTitlebar = $( "<div>" );
19804		this._addClass( this.uiDialogTitlebar,
19805			"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
19806		this._on( this.uiDialogTitlebar, {
19807			mousedown: function( event ) {
19808
19809				// Don't prevent click on close button (#8838)
19810				// Focusing a dialog that is partially scrolled out of view
19811				// causes the browser to scroll it into view, preventing the click event
19812				if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
19813
19814					// Dialog isn't getting focus when dragging (#8063)
19815					this.uiDialog.trigger( "focus" );
19816				}
19817			}
19818		} );
19819
19820		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
19821			.button( {
19822				label: $( "<a>" ).text( this.options.closeText ).html(),
19823				icon: "ui-icon-closethick",
19824				showLabel: false
19825			} )
19826			.appendTo( this.uiDialogTitlebar );
19827
19828		this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
19829		this._on( this.uiDialogTitlebarClose, {
19830			click: function( event ) {
19831				event.preventDefault();
19832				this.close( event );
19833			}
19834		} );
19835
19836		var uiDialogHeadingLevel = Number.isInteger( this.options.uiDialogTitleHeadingLevel ) &&
19837			this.options.uiDialogTitleHeadingLevel > 0 &&
19838			this.options.uiDialogTitleHeadingLevel <= 6 ?
19839			"h" + this.options.uiDialogTitleHeadingLevel : "span";
19840
19841		uiDialogTitle = $( "<" + uiDialogHeadingLevel + ">" )
19842			.uniqueId().prependTo( this.uiDialogTitlebar );
19843		this._addClass( uiDialogTitle, "ui-dialog-title" );
19844		this._title( uiDialogTitle );
19845
19846		this.uiDialogTitlebar.prependTo( this.uiDialog );
19847
19848		this.uiDialog.attr( {
19849			"aria-labelledby": uiDialogTitle.attr( "id" )
19850		} );
19851	},
19852
19853	_title: function( title ) {
19854		if ( this.options.title ) {
19855			title.text( this.options.title );
19856		} else {
19857			title.html( "&#160;" );
19858		}
19859	},
19860
19861	_createButtonPane: function() {
19862		this.uiDialogButtonPane = $( "<div>" );
19863		this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
19864			"ui-widget-content ui-helper-clearfix" );
19865
19866		this.uiButtonSet = $( "<div>" )
19867			.appendTo( this.uiDialogButtonPane );
19868		this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
19869
19870		this._createButtons();
19871	},
19872
19873	_createButtons: function() {
19874		var that = this,
19875			buttons = this.options.buttons;
19876
19877		// If we already have a button pane, remove it
19878		this.uiDialogButtonPane.remove();
19879		this.uiButtonSet.empty();
19880
19881		if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
19882			this._removeClass( this.uiDialog, "ui-dialog-buttons" );
19883			return;
19884		}
19885
19886		$.each( buttons, function( name, props ) {
19887			var click, buttonOptions;
19888			props = typeof props === "function" ?
19889				{ click: props, text: name } :
19890				props;
19891
19892			// Default to a non-submitting button
19893			props = $.extend( { type: "button" }, props );
19894
19895			// Change the context for the click callback to be the main element
19896			click = props.click;
19897			buttonOptions = {
19898				icon: props.icon,
19899				iconPosition: props.iconPosition,
19900				showLabel: props.showLabel,
19901
19902				// Deprecated options
19903				icons: props.icons,
19904				text: props.text
19905			};
19906
19907			delete props.click;
19908			delete props.icon;
19909			delete props.iconPosition;
19910			delete props.showLabel;
19911
19912			// Deprecated options
19913			delete props.icons;
19914			if ( typeof props.text === "boolean" ) {
19915				delete props.text;
19916			}
19917
19918			$( "<button></button>", props )
19919				.button( buttonOptions )
19920				.appendTo( that.uiButtonSet )
19921				.on( "click", function() {
19922					click.apply( that.element[ 0 ], arguments );
19923				} );
19924		} );
19925		this._addClass( this.uiDialog, "ui-dialog-buttons" );
19926		this.uiDialogButtonPane.appendTo( this.uiDialog );
19927	},
19928
19929	_makeDraggable: function() {
19930		var that = this,
19931			options = this.options;
19932
19933		function filteredUi( ui ) {
19934			return {
19935				position: ui.position,
19936				offset: ui.offset
19937			};
19938		}
19939
19940		this.uiDialog.draggable( {
19941			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
19942			handle: ".ui-dialog-titlebar",
19943			containment: "document",
19944			start: function( event, ui ) {
19945				that._addClass( $( this ), "ui-dialog-dragging" );
19946				that._blockFrames();
19947				that._trigger( "dragStart", event, filteredUi( ui ) );
19948			},
19949			drag: function( event, ui ) {
19950				that._trigger( "drag", event, filteredUi( ui ) );
19951			},
19952			stop: function( event, ui ) {
19953				var left = ui.offset.left - that.document.scrollLeft(),
19954					top = ui.offset.top - that.document.scrollTop();
19955
19956				options.position = {
19957					my: "left top",
19958					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
19959						"top" + ( top >= 0 ? "+" : "" ) + top,
19960					of: that.window
19961				};
19962				that._removeClass( $( this ), "ui-dialog-dragging" );
19963				that._unblockFrames();
19964				that._trigger( "dragStop", event, filteredUi( ui ) );
19965			}
19966		} );
19967	},
19968
19969	_makeResizable: function() {
19970		var that = this,
19971			options = this.options,
19972			handles = options.resizable,
19973
19974			// .ui-resizable has position: relative defined in the stylesheet
19975			// but dialogs have to use absolute or fixed positioning
19976			position = this.uiDialog.css( "position" ),
19977			resizeHandles = typeof handles === "string" ?
19978				handles :
19979				"n,e,s,w,se,sw,ne,nw";
19980
19981		function filteredUi( ui ) {
19982			return {
19983				originalPosition: ui.originalPosition,
19984				originalSize: ui.originalSize,
19985				position: ui.position,
19986				size: ui.size
19987			};
19988		}
19989
19990		this.uiDialog.resizable( {
19991			cancel: ".ui-dialog-content",
19992			containment: "document",
19993			alsoResize: this.element,
19994			maxWidth: options.maxWidth,
19995			maxHeight: options.maxHeight,
19996			minWidth: options.minWidth,
19997			minHeight: this._minHeight(),
19998			handles: resizeHandles,
19999			start: function( event, ui ) {
20000				that._addClass( $( this ), "ui-dialog-resizing" );
20001				that._blockFrames();
20002				that._trigger( "resizeStart", event, filteredUi( ui ) );
20003			},
20004			resize: function( event, ui ) {
20005				that._trigger( "resize", event, filteredUi( ui ) );
20006			},
20007			stop: function( event, ui ) {
20008				var offset = that.uiDialog.offset(),
20009					left = offset.left - that.document.scrollLeft(),
20010					top = offset.top - that.document.scrollTop();
20011
20012				options.height = that.uiDialog.height();
20013				options.width = that.uiDialog.width();
20014				options.position = {
20015					my: "left top",
20016					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
20017						"top" + ( top >= 0 ? "+" : "" ) + top,
20018					of: that.window
20019				};
20020				that._removeClass( $( this ), "ui-dialog-resizing" );
20021				that._unblockFrames();
20022				that._trigger( "resizeStop", event, filteredUi( ui ) );
20023			}
20024		} )
20025			.css( "position", position );
20026	},
20027
20028	_trackFocus: function() {
20029		this._on( this.widget(), {
20030			focusin: function( event ) {
20031				this._makeFocusTarget();
20032				this._focusedElement = $( event.target );
20033			}
20034		} );
20035	},
20036
20037	_makeFocusTarget: function() {
20038		this._untrackInstance();
20039		this._trackingInstances().unshift( this );
20040	},
20041
20042	_untrackInstance: function() {
20043		var instances = this._trackingInstances(),
20044			exists = $.inArray( this, instances );
20045		if ( exists !== -1 ) {
20046			instances.splice( exists, 1 );
20047		}
20048	},
20049
20050	_trackingInstances: function() {
20051		var instances = this.document.data( "ui-dialog-instances" );
20052		if ( !instances ) {
20053			instances = [];
20054			this.document.data( "ui-dialog-instances", instances );
20055		}
20056		return instances;
20057	},
20058
20059	_minHeight: function() {
20060		var options = this.options;
20061
20062		return options.height === "auto" ?
20063			options.minHeight :
20064			Math.min( options.minHeight, options.height );
20065	},
20066
20067	_position: function() {
20068
20069		// Need to show the dialog to get the actual offset in the position plugin
20070		var isVisible = this.uiDialog.is( ":visible" );
20071		if ( !isVisible ) {
20072			this.uiDialog.show();
20073		}
20074		this.uiDialog.position( this.options.position );
20075		if ( !isVisible ) {
20076			this.uiDialog.hide();
20077		}
20078	},
20079
20080	_setOptions: function( options ) {
20081		var that = this,
20082			resize = false,
20083			resizableOptions = {};
20084
20085		$.each( options, function( key, value ) {
20086			that._setOption( key, value );
20087
20088			if ( key in that.sizeRelatedOptions ) {
20089				resize = true;
20090			}
20091			if ( key in that.resizableRelatedOptions ) {
20092				resizableOptions[ key ] = value;
20093			}
20094		} );
20095
20096		if ( resize ) {
20097			this._size();
20098			this._position();
20099		}
20100		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
20101			this.uiDialog.resizable( "option", resizableOptions );
20102		}
20103	},
20104
20105	_setOption: function( key, value ) {
20106		var isDraggable, isResizable,
20107			uiDialog = this.uiDialog;
20108
20109		if ( key === "disabled" ) {
20110			return;
20111		}
20112
20113		this._super( key, value );
20114
20115		if ( key === "appendTo" ) {
20116			this.uiDialog.appendTo( this._appendTo() );
20117		}
20118
20119		if ( key === "buttons" ) {
20120			this._createButtons();
20121		}
20122
20123		if ( key === "closeText" ) {
20124			this.uiDialogTitlebarClose.button( {
20125
20126				// Ensure that we always pass a string
20127				label: $( "<a>" ).text( "" + this.options.closeText ).html()
20128			} );
20129		}
20130
20131		if ( key === "draggable" ) {
20132			isDraggable = uiDialog.is( ":data(ui-draggable)" );
20133			if ( isDraggable && !value ) {
20134				uiDialog.draggable( "destroy" );
20135			}
20136
20137			if ( !isDraggable && value ) {
20138				this._makeDraggable();
20139			}
20140		}
20141
20142		if ( key === "position" ) {
20143			this._position();
20144		}
20145
20146		if ( key === "resizable" ) {
20147
20148			// currently resizable, becoming non-resizable
20149			isResizable = uiDialog.is( ":data(ui-resizable)" );
20150			if ( isResizable && !value ) {
20151				uiDialog.resizable( "destroy" );
20152			}
20153
20154			// Currently resizable, changing handles
20155			if ( isResizable && typeof value === "string" ) {
20156				uiDialog.resizable( "option", "handles", value );
20157			}
20158
20159			// Currently non-resizable, becoming resizable
20160			if ( !isResizable && value !== false ) {
20161				this._makeResizable();
20162			}
20163		}
20164
20165		if ( key === "title" ) {
20166			this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
20167		}
20168
20169		if ( key === "modal" ) {
20170			uiDialog.attr( "aria-modal", value ? "true" : null );
20171		}
20172	},
20173
20174	_size: function() {
20175
20176		// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
20177		// divs will both have width and height set, so we need to reset them
20178		var nonContentHeight, minContentHeight, maxContentHeight,
20179			options = this.options;
20180
20181		// Reset content sizing
20182		this.element.show().css( {
20183			width: "auto",
20184			minHeight: 0,
20185			maxHeight: "none",
20186			height: 0
20187		} );
20188
20189		if ( options.minWidth > options.width ) {
20190			options.width = options.minWidth;
20191		}
20192
20193		// Reset wrapper sizing
20194		// determine the height of all the non-content elements
20195		nonContentHeight = this.uiDialog.css( {
20196			height: "auto",
20197			width: options.width
20198		} )
20199			.outerHeight();
20200		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
20201		maxContentHeight = typeof options.maxHeight === "number" ?
20202			Math.max( 0, options.maxHeight - nonContentHeight ) :
20203			"none";
20204
20205		if ( options.height === "auto" ) {
20206			this.element.css( {
20207				minHeight: minContentHeight,
20208				maxHeight: maxContentHeight,
20209				height: "auto"
20210			} );
20211		} else {
20212			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
20213		}
20214
20215		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
20216			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
20217		}
20218	},
20219
20220	_blockFrames: function() {
20221		this.iframeBlocks = this.document.find( "iframe" ).map( function() {
20222			var iframe = $( this );
20223
20224			return $( "<div>" )
20225				.css( {
20226					position: "absolute",
20227					width: iframe.outerWidth(),
20228					height: iframe.outerHeight()
20229				} )
20230				.appendTo( iframe.parent() )
20231				.offset( iframe.offset() )[ 0 ];
20232		} );
20233	},
20234
20235	_unblockFrames: function() {
20236		if ( this.iframeBlocks ) {
20237			this.iframeBlocks.remove();
20238			delete this.iframeBlocks;
20239		}
20240	},
20241
20242	_allowInteraction: function( event ) {
20243		if ( $( event.target ).closest( ".ui-dialog" ).length ) {
20244			return true;
20245		}
20246
20247		// TODO: Remove hack when datepicker implements
20248		// the .ui-front logic (#8989)
20249		return !!$( event.target ).closest( ".ui-datepicker" ).length;
20250	},
20251
20252	_createOverlay: function() {
20253		if ( !this.options.modal ) {
20254			return;
20255		}
20256
20257		// We use a delay in case the overlay is created from an
20258		// event that we're going to be cancelling (#2804)
20259		var isOpening = true;
20260		this._delay( function() {
20261			isOpening = false;
20262		} );
20263
20264		if ( !this.document.data( "ui-dialog-overlays" ) ) {
20265
20266			// Prevent use of anchors and inputs
20267			// This doesn't use `_on()` because it is a shared event handler
20268			// across all open modal dialogs.
20269			this.document.on( "focusin.ui-dialog", function( event ) {
20270				if ( isOpening ) {
20271					return;
20272				}
20273
20274				var instance = this._trackingInstances()[ 0 ];
20275				if ( !instance._allowInteraction( event ) ) {
20276					event.preventDefault();
20277					instance._focusTabbable();
20278				}
20279			}.bind( this ) );
20280		}
20281
20282		this.overlay = $( "<div>" )
20283			.appendTo( this._appendTo() );
20284
20285		this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
20286		this._on( this.overlay, {
20287			mousedown: "_keepFocus"
20288		} );
20289		this.document.data( "ui-dialog-overlays",
20290			( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
20291	},
20292
20293	_destroyOverlay: function() {
20294		if ( !this.options.modal ) {
20295			return;
20296		}
20297
20298		if ( this.overlay ) {
20299			var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
20300
20301			if ( !overlays ) {
20302				this.document.off( "focusin.ui-dialog" );
20303				this.document.removeData( "ui-dialog-overlays" );
20304			} else {
20305				this.document.data( "ui-dialog-overlays", overlays );
20306			}
20307
20308			this.overlay.remove();
20309			this.overlay = null;
20310		}
20311	}
20312} );
20313
20314// DEPRECATED
20315// TODO: switch return back to widget declaration at top of file when this is removed
20316if ( $.uiBackCompat === true ) {
20317
20318	// Backcompat for dialogClass option
20319	$.widget( "ui.dialog", $.ui.dialog, {
20320		options: {
20321			dialogClass: ""
20322		},
20323		_createWrapper: function() {
20324			this._super();
20325			this.uiDialog.addClass( this.options.dialogClass );
20326		},
20327		_setOption: function( key, value ) {
20328			if ( key === "dialogClass" ) {
20329				this.uiDialog
20330					.removeClass( this.options.dialogClass )
20331					.addClass( value );
20332			}
20333			this._superApply( arguments );
20334		}
20335	} );
20336}
20337
20338var widgetsDialog = $.ui.dialog;
20339
20340
20341/*!
20342 * jQuery UI Droppable 1.14.
203421
20343 * https://jqueryui.com
20344 *
20345 * Copyright OpenJS Foundation and other contributors
20346 * Released under the MIT license.
20347 * https://jquery.org/license
20348 */
20349
20350//>>label: Droppable
20351//>>group: Interactions
20352//>>description: Enables drop targets for draggable elements.
20353//>>docs: https://api.jqueryui.com/droppable/
20354//>>demos: https://jqueryui.com/droppable/
20355
20356
20357$.widget( "ui.droppable", {
20358	version: "1.14.1
vendor: 11,311 bytes, lines 20358-20786
20358",
20359	widgetEventPrefix: "drop",
20360	options: {
20361		accept: "*",
20362		addClasses: true,
20363		greedy: false,
20364		scope: "default",
20365		tolerance: "intersect",
20366
20367		// Callbacks
20368		activate: null,
20369		deactivate: null,
20370		drop: null,
20371		out: null,
20372		over: null
20373	},
20374	_create: function() {
20375
20376		var proportions,
20377			o = this.options,
20378			accept = o.accept;
20379
20380		this.isover = false;
20381		this.isout = true;
20382
20383		this.accept = typeof accept === "function" ? accept : function( d ) {
20384			return d.is( accept );
20385		};
20386
20387		this.proportions = function( /* valueToWrite */ ) {
20388			if ( arguments.length ) {
20389
20390				// Store the droppable's proportions
20391				proportions = arguments[ 0 ];
20392			} else {
20393
20394				// Retrieve or derive the droppable's proportions
20395				return proportions ?
20396					proportions :
20397					proportions = {
20398						width: this.element[ 0 ].offsetWidth,
20399						height: this.element[ 0 ].offsetHeight
20400					};
20401			}
20402		};
20403
20404		this._addToManager( o.scope );
20405
20406		if ( o.addClasses ) {
20407			this._addClass( "ui-droppable" );
20408		}
20409
20410	},
20411
20412	_addToManager: function( scope ) {
20413
20414		// Add the reference and positions to the manager
20415		$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
20416		$.ui.ddmanager.droppables[ scope ].push( this );
20417	},
20418
20419	_splice: function( drop ) {
20420		var i = 0;
20421		for ( ; i < drop.length; i++ ) {
20422			if ( drop[ i ] === this ) {
20423				drop.splice( i, 1 );
20424			}
20425		}
20426	},
20427
20428	_destroy: function() {
20429		var drop = $.ui.ddmanager.droppables[ this.options.scope ];
20430
20431		this._splice( drop );
20432	},
20433
20434	_setOption: function( key, value ) {
20435
20436		if ( key === "accept" ) {
20437			this.accept = typeof value === "function" ? value : function( d ) {
20438				return d.is( value );
20439			};
20440		} else if ( key === "scope" ) {
20441			var drop = $.ui.ddmanager.droppables[ this.options.scope ];
20442
20443			this._splice( drop );
20444			this._addToManager( value );
20445		}
20446
20447		this._super( key, value );
20448	},
20449
20450	_activate: function( event ) {
20451		var draggable = $.ui.ddmanager.current;
20452
20453		this._addActiveClass();
20454		if ( draggable ) {
20455			this._trigger( "activate", event, this.ui( draggable ) );
20456		}
20457	},
20458
20459	_deactivate: function( event ) {
20460		var draggable = $.ui.ddmanager.current;
20461
20462		this._removeActiveClass();
20463		if ( draggable ) {
20464			this._trigger( "deactivate", event, this.ui( draggable ) );
20465		}
20466	},
20467
20468	_over: function( event ) {
20469
20470		var draggable = $.ui.ddmanager.current;
20471
20472		// Bail if draggable and droppable are same element
20473		if ( !draggable || ( draggable.currentItem ||
20474				draggable.element )[ 0 ] === this.element[ 0 ] ) {
20475			return;
20476		}
20477
20478		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
20479				draggable.element ) ) ) {
20480			this._addHoverClass();
20481			this._trigger( "over", event, this.ui( draggable ) );
20482		}
20483
20484	},
20485
20486	_out: function( event ) {
20487
20488		var draggable = $.ui.ddmanager.current;
20489
20490		// Bail if draggable and droppable are same element
20491		if ( !draggable || ( draggable.currentItem ||
20492				draggable.element )[ 0 ] === this.element[ 0 ] ) {
20493			return;
20494		}
20495
20496		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
20497				draggable.element ) ) ) {
20498			this._removeHoverClass();
20499			this._trigger( "out", event, this.ui( draggable ) );
20500		}
20501
20502	},
20503
20504	_drop: function( event, custom ) {
20505
20506		var draggable = custom || $.ui.ddmanager.current,
20507			childrenIntersection = false;
20508
20509		// Bail if draggable and droppable are same element
20510		if ( !draggable || ( draggable.currentItem ||
20511				draggable.element )[ 0 ] === this.element[ 0 ] ) {
20512			return false;
20513		}
20514
20515		this.element
20516			.find( ":data(ui-droppable)" )
20517			.not( ".ui-draggable-dragging" )
20518			.each( function() {
20519				var inst = $( this ).droppable( "instance" );
20520				if (
20521					inst.options.greedy &&
20522					!inst.options.disabled &&
20523					inst.options.scope === draggable.options.scope &&
20524					inst.accept.call(
20525						inst.element[ 0 ], ( draggable.currentItem || draggable.element )
20526					) &&
20527					$.ui.intersect(
20528						draggable,
20529						$.extend( inst, { offset: inst.element.offset() } ),
20530						inst.options.tolerance, event
20531					)
20532				) {
20533					childrenIntersection = true;
20534					return false;
20535				}
20536			} );
20537		if ( childrenIntersection ) {
20538			return false;
20539		}
20540
20541		if ( this.accept.call( this.element[ 0 ],
20542				( draggable.currentItem || draggable.element ) ) ) {
20543			this._removeActiveClass();
20544			this._removeHoverClass();
20545
20546			this._trigger( "drop", event, this.ui( draggable ) );
20547			return this.element;
20548		}
20549
20550		return false;
20551
20552	},
20553
20554	ui: function( c ) {
20555		return {
20556			draggable: ( c.currentItem || c.element ),
20557			helper: c.helper,
20558			position: c.position,
20559			offset: c.positionAbs
20560		};
20561	},
20562
20563	// Extension points just to make backcompat sane and avoid duplicating logic
20564	// TODO: Remove in 1.14 along with call to it below
20565	_addHoverClass: function() {
20566		this._addClass( "ui-droppable-hover" );
20567	},
20568
20569	_removeHoverClass: function() {
20570		this._removeClass( "ui-droppable-hover" );
20571	},
20572
20573	_addActiveClass: function() {
20574		this._addClass( "ui-droppable-active" );
20575	},
20576
20577	_removeActiveClass: function() {
20578		this._removeClass( "ui-droppable-active" );
20579	}
20580} );
20581
20582$.ui.intersect = ( function() {
20583	function isOverAxis( x, reference, size ) {
20584		return ( x >= reference ) && ( x < ( reference + size ) );
20585	}
20586
20587	return function( draggable, droppable, toleranceMode, event ) {
20588
20589		if ( !droppable.offset ) {
20590			return false;
20591		}
20592
20593		var x1 = ( draggable.positionAbs ||
20594				draggable.position.absolute ).left + draggable.margins.left,
20595			y1 = ( draggable.positionAbs ||
20596				draggable.position.absolute ).top + draggable.margins.top,
20597			x2 = x1 + draggable.helperProportions.width,
20598			y2 = y1 + draggable.helperProportions.height,
20599			l = droppable.offset.left,
20600			t = droppable.offset.top,
20601			r = l + droppable.proportions().width,
20602			b = t + droppable.proportions().height;
20603
20604		switch ( toleranceMode ) {
20605		case "fit":
20606			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
20607		case "intersect":
20608			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
20609				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
20610				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
20611				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
20612		case "pointer":
20613			return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
20614				isOverAxis( event.pageX, l, droppable.proportions().width );
20615		case "touch":
20616			return (
20617				( y1 >= t && y1 <= b ) || // Top edge touching
20618				( y2 >= t && y2 <= b ) || // Bottom edge touching
20619				( y1 < t && y2 > b ) // Surrounded vertically
20620			) && (
20621				( x1 >= l && x1 <= r ) || // Left edge touching
20622				( x2 >= l && x2 <= r ) || // Right edge touching
20623				( x1 < l && x2 > r ) // Surrounded horizontally
20624			);
20625		default:
20626			return false;
20627		}
20628	};
20629} )();
20630
20631/*
20632	This manager tracks offsets of draggables and droppables
20633*/
20634$.ui.ddmanager = {
20635	current: null,
20636	droppables: { "default": [] },
20637	prepareOffsets: function( t, event ) {
20638
20639		var i, j,
20640			m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
20641			type = event ? event.type : null, // workaround for #2317
20642			list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
20643
20644		droppablesLoop: for ( i = 0; i < m.length; i++ ) {
20645
20646			// No disabled and non-accepted
20647			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
20648					( t.currentItem || t.element ) ) ) ) {
20649				continue;
20650			}
20651
20652			// Filter out elements in the current dragged item
20653			for ( j = 0; j < list.length; j++ ) {
20654				if ( list[ j ] === m[ i ].element[ 0 ] ) {
20655					m[ i ].proportions().height = 0;
20656					continue droppablesLoop;
20657				}
20658			}
20659
20660			m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
20661			if ( !m[ i ].visible ) {
20662				continue;
20663			}
20664
20665			// Activate the droppable if used directly from draggables
20666			if ( type === "mousedown" ) {
20667				m[ i ]._activate.call( m[ i ], event );
20668			}
20669
20670			m[ i ].offset = m[ i ].element.offset();
20671			m[ i ].proportions( {
20672				width: m[ i ].element[ 0 ].offsetWidth,
20673				height: m[ i ].element[ 0 ].offsetHeight
20674			} );
20675
20676		}
20677
20678	},
20679	drop: function( draggable, event ) {
20680
20681		var dropped = false;
20682
20683		// Create a copy of the droppables in case the list changes during the drop (#9116)
20684		$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
20685
20686			if ( !this.options ) {
20687				return;
20688			}
20689			if ( !this.options.disabled && this.visible &&
20690					$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
20691				dropped = this._drop.call( this, event ) || dropped;
20692			}
20693
20694			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
20695					( draggable.currentItem || draggable.element ) ) ) {
20696				this.isout = true;
20697				this.isover = false;
20698				this._deactivate.call( this, event );
20699			}
20700
20701		} );
20702		return dropped;
20703
20704	},
20705	dragStart: function( draggable, event ) {
20706
20707		// Listen for scrolling so that if the dragging causes scrolling the position of the
20708		// droppables can be recalculated (see #5003)
20709		draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
20710			if ( !draggable.options.refreshPositions ) {
20711				$.ui.ddmanager.prepareOffsets( draggable, event );
20712			}
20713		} );
20714	},
20715	drag: function( draggable, event ) {
20716
20717		// If you have a highly dynamic page, you might try this option. It renders positions
20718		// every time you move the mouse.
20719		if ( draggable.options.refreshPositions ) {
20720			$.ui.ddmanager.prepareOffsets( draggable, event );
20721		}
20722
20723		// Run through all droppables and check their positions based on specific tolerance options
20724		$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
20725
20726			if ( this.options.disabled || this.greedyChild || !this.visible ) {
20727				return;
20728			}
20729
20730			var parentInstance, scope, parent,
20731				intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
20732				c = !intersects && this.isover ?
20733					"isout" :
20734					( intersects && !this.isover ? "isover" : null );
20735			if ( !c ) {
20736				return;
20737			}
20738
20739			if ( this.options.greedy ) {
20740
20741				// find droppable parents with same scope
20742				scope = this.options.scope;
20743				parent = this.element.parents( ":data(ui-droppable)" ).filter( function() {
20744					return $( this ).droppable( "instance" ).options.scope === scope;
20745				} );
20746
20747				if ( parent.length ) {
20748					parentInstance = $( parent[ 0 ] ).droppable( "instance" );
20749					parentInstance.greedyChild = ( c === "isover" );
20750				}
20751			}
20752
20753			// We just moved into a greedy child
20754			if ( parentInstance && c === "isover" ) {
20755				parentInstance.isover = false;
20756				parentInstance.isout = true;
20757				parentInstance._out.call( parentInstance, event );
20758			}
20759
20760			this[ c ] = true;
20761			this[ c === "isout" ? "isover" : "isout" ] = false;
20762			this[ c === "isover" ? "_over" : "_out" ].call( this, event );
20763
20764			// We just moved out of a greedy child
20765			if ( parentInstance && c === "isout" ) {
20766				parentInstance.isout = false;
20767				parentInstance.isover = true;
20768				parentInstance._over.call( parentInstance, event );
20769			}
20770		} );
20771
20772	},
20773	dragStop: function( draggable, event ) {
20774		draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
20775
20776		// Call prepareOffsets one final time since IE does not fire return scroll events when
20777		// overflow was caused by drag (see #5003)
20778		if ( !draggable.options.refreshPositions ) {
20779			$.ui.ddmanager.prepareOffsets( draggable, event );
20780		}
20781	}
20782};
20783
20784// DEPRECATED
20785// TODO: switch return back to widget declaration at top of file when this is removed
20786if ( $.uiBackCompat 
20786=== true ) {
20787
20788	// Backcompat for activeClass and hoverClass options
20789	$.widget( "ui.droppable", $.ui.droppable, {
20790		options: {
20791			hoverClass: false,
20792			activeClass: false
20793		},
20794		_addActiveClass: function() {
20795			this._super();
20796			if ( this.options.activeClass ) {
20797				this.element.addClass( this.options.activeClass );
20798			}
20799		},
20800		_removeActiveClass: function() {
20801			this._super();
20802			if ( this.options.activeClass ) {
20803				this.element.removeClass( this.options.activeClass );
20804			}
20805		},
20806		_addHoverClass: function() {
20807			this._super();
20808			if ( this.options.hoverClass ) {
20809				this.element.addClass( this.options.hoverClass );
20810			}
20811		},
20812		_removeHoverClass: function() {
20813			this._super();
20814			if ( this.options.hoverClass ) {
20815				this.element.removeClass( this.options.hoverClass );
20816			}
20817		}
20818	} );
20819}
20820
20821var widgetsDroppable = $.ui.droppable;
20822
20823
20824/*!
20825 * jQuery UI Progressbar 1.14.1
20826 * https://jqueryui.com
20827 *
20828 * Copyright OpenJS Foundation and other contributors
20829 * Released under the MIT license.
20830 * https://jquery.org/license
20831 */
20832
20833//>>label: Progressbar
20834//>>group: Widgets
20835/* eslint-disable max-len */
20836//>>
vendor: 4,223 bytes, lines 20836-21005
20836description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
20837/* eslint-enable max-len */
20838//>>docs: https://api.jqueryui.com/progressbar/
20839//>>demos: https://jqueryui.com/progressbar/
20840//>>css.structure: ../../themes/base/core.css
20841//>>css.structure: ../../themes/base/progressbar.css
20842//>>css.theme: ../../themes/base/theme.css
20843
20844
20845var widgetsProgressbar = $.widget( "ui.progressbar", {
20846	version: "1.14.1",
20847	options: {
20848		classes: {
20849			"ui-progressbar": "ui-corner-all",
20850			"ui-progressbar-value": "ui-corner-left",
20851			"ui-progressbar-complete": "ui-corner-right"
20852		},
20853		max: 100,
20854		value: 0,
20855
20856		change: null,
20857		complete: null
20858	},
20859
20860	min: 0,
20861
20862	_create: function() {
20863
20864		// Constrain initial value
20865		this.oldValue = this.options.value = this._constrainedValue();
20866
20867		this.element.attr( {
20868
20869			// Only set static values; aria-valuenow and aria-valuemax are
20870			// set inside _refreshValue()
20871			role: "progressbar",
20872			"aria-valuemin": this.min
20873		} );
20874		this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
20875
20876		this.valueDiv = $( "<div>" ).appendTo( this.element );
20877		this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
20878		this._refreshValue();
20879	},
20880
20881	_destroy: function() {
20882		this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );
20883
20884		this.valueDiv.remove();
20885	},
20886
20887	value: function( newValue ) {
20888		if ( newValue === undefined ) {
20889			return this.options.value;
20890		}
20891
20892		this.options.value = this._constrainedValue( newValue );
20893		this._refreshValue();
20894	},
20895
20896	_constrainedValue: function( newValue ) {
20897		if ( newValue === undefined ) {
20898			newValue = this.options.value;
20899		}
20900
20901		this.indeterminate = newValue === false;
20902
20903		// Sanitize value
20904		if ( typeof newValue !== "number" ) {
20905			newValue = 0;
20906		}
20907
20908		return this.indeterminate ? false :
20909			Math.min( this.options.max, Math.max( this.min, newValue ) );
20910	},
20911
20912	_setOptions: function( options ) {
20913
20914		// Ensure "value" option is set after other values (like max)
20915		var value = options.value;
20916		delete options.value;
20917
20918		this._super( options );
20919
20920		this.options.value = this._constrainedValue( value );
20921		this._refreshValue();
20922	},
20923
20924	_setOption: function( key, value ) {
20925		if ( key === "max" ) {
20926
20927			// Don't allow a max less than min
20928			value = Math.max( this.min, value );
20929		}
20930		this._super( key, value );
20931	},
20932
20933	_setOptionDisabled: function( value ) {
20934		this._super( value );
20935
20936		this.element.attr( "aria-disabled", value );
20937		this._toggleClass( null, "ui-state-disabled", !!value );
20938	},
20939
20940	_percentage: function() {
20941		return this.indeterminate ?
20942			100 :
20943			100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
20944	},
20945
20946	_refreshValue: function() {
20947		var value = this.options.value,
20948			percentage = this._percentage();
20949
20950		this.valueDiv
20951			.toggle( this.indeterminate || value > this.min )
20952			.width( percentage.toFixed( 0 ) + "%" );
20953
20954		this
20955			._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
20956				value === this.options.max )
20957			._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );
20958
20959		if ( this.indeterminate ) {
20960			this.element.removeAttr( "aria-valuenow" );
20961			if ( !this.overlayDiv ) {
20962				this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
20963				this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
20964			}
20965		} else {
20966			this.element.attr( {
20967				"aria-valuemax": this.options.max,
20968				"aria-valuenow": value
20969			} );
20970			if ( this.overlayDiv ) {
20971				this.overlayDiv.remove();
20972				this.overlayDiv = null;
20973			}
20974		}
20975
20976		if ( this.oldValue !== value ) {
20977			this.oldValue = value;
20978			this._trigger( "change" );
20979		}
20980		if ( value === this.options.max ) {
20981			this._trigger( "complete" );
20982		}
20983	}
20984} );
20985
20986
20987/*!
20988 * jQuery UI Selectable 1.14.1
20989 * https://jqueryui.com
20990 *
20991 * Copyright OpenJS Foundation and other contributors
20992 * Released under the MIT license.
20993 * https://jquery.org/license
20994 */
20995
20996//>>label: Selectable
20997//>>group: Interactions
20998//>>description: Allows groups of elements to be selected with the mouse.
20999//>>docs: https://api.jqueryui.com/selectable/
21000//>>demos: https://jqueryui.com/selectable/
21001//>>css.structure: ../../themes/base/selectable.css
21002
21003
21004var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
21005	version: "1.14.1
vendor: 7,325 bytes, lines 21005-21286
21005",
21006	options: {
21007		appendTo: "body",
21008		autoRefresh: true,
21009		distance: 0,
21010		filter: "*",
21011		tolerance: "touch",
21012
21013		// Callbacks
21014		selected: null,
21015		selecting: null,
21016		start: null,
21017		stop: null,
21018		unselected: null,
21019		unselecting: null
21020	},
21021	_create: function() {
21022		var that = this;
21023
21024		this._addClass( "ui-selectable" );
21025
21026		this.dragged = false;
21027
21028		// Cache selectee children based on filter
21029		this.refresh = function() {
21030			that.elementPos = $( that.element[ 0 ] ).offset();
21031			that.selectees = $( that.options.filter, that.element[ 0 ] );
21032			that._addClass( that.selectees, "ui-selectee" );
21033			that.selectees.each( function() {
21034				var $this = $( this ),
21035					selecteeOffset = $this.offset(),
21036					pos = {
21037						left: selecteeOffset.left - that.elementPos.left,
21038						top: selecteeOffset.top - that.elementPos.top
21039					};
21040				$.data( this, "selectable-item", {
21041					element: this,
21042					$element: $this,
21043					left: pos.left,
21044					top: pos.top,
21045					right: pos.left + $this.outerWidth(),
21046					bottom: pos.top + $this.outerHeight(),
21047					startselected: false,
21048					selected: $this.hasClass( "ui-selected" ),
21049					selecting: $this.hasClass( "ui-selecting" ),
21050					unselecting: $this.hasClass( "ui-unselecting" )
21051				} );
21052			} );
21053		};
21054		this.refresh();
21055
21056		this._mouseInit();
21057
21058		this.helper = $( "<div>" );
21059		this._addClass( this.helper, "ui-selectable-helper" );
21060	},
21061
21062	_destroy: function() {
21063		this.selectees.removeData( "selectable-item" );
21064		this._mouseDestroy();
21065	},
21066
21067	_mouseStart: function( event ) {
21068		var that = this,
21069			options = this.options;
21070
21071		this.opos = [ event.pageX, event.pageY ];
21072		this.elementPos = $( this.element[ 0 ] ).offset();
21073
21074		if ( this.options.disabled ) {
21075			return;
21076		}
21077
21078		this.selectees = $( options.filter, this.element[ 0 ] );
21079
21080		this._trigger( "start", event );
21081
21082		$( options.appendTo ).append( this.helper );
21083
21084		// position helper (lasso)
21085		this.helper.css( {
21086			"left": event.pageX,
21087			"top": event.pageY,
21088			"width": 0,
21089			"height": 0
21090		} );
21091
21092		if ( options.autoRefresh ) {
21093			this.refresh();
21094		}
21095
21096		this.selectees.filter( ".ui-selected" ).each( function() {
21097			var selectee = $.data( this, "selectable-item" );
21098			selectee.startselected = true;
21099			if ( !event.metaKey && !event.ctrlKey ) {
21100				that._removeClass( selectee.$element, "ui-selected" );
21101				selectee.selected = false;
21102				that._addClass( selectee.$element, "ui-unselecting" );
21103				selectee.unselecting = true;
21104
21105				// selectable UNSELECTING callback
21106				that._trigger( "unselecting", event, {
21107					unselecting: selectee.element
21108				} );
21109			}
21110		} );
21111
21112		$( event.target ).parents().addBack().each( function() {
21113			var doSelect,
21114				selectee = $.data( this, "selectable-item" );
21115			if ( selectee ) {
21116				doSelect = ( !event.metaKey && !event.ctrlKey ) ||
21117					!selectee.$element.hasClass( "ui-selected" );
21118				that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
21119					._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
21120				selectee.unselecting = !doSelect;
21121				selectee.selecting = doSelect;
21122				selectee.selected = doSelect;
21123
21124				// selectable (UN)SELECTING callback
21125				if ( doSelect ) {
21126					that._trigger( "selecting", event, {
21127						selecting: selectee.element
21128					} );
21129				} else {
21130					that._trigger( "unselecting", event, {
21131						unselecting: selectee.element
21132					} );
21133				}
21134				return false;
21135			}
21136		} );
21137
21138	},
21139
21140	_mouseDrag: function( event ) {
21141
21142		this.dragged = true;
21143
21144		if ( this.options.disabled ) {
21145			return;
21146		}
21147
21148		var tmp,
21149			that = this,
21150			options = this.options,
21151			x1 = this.opos[ 0 ],
21152			y1 = this.opos[ 1 ],
21153			x2 = event.pageX,
21154			y2 = event.pageY;
21155
21156		if ( x1 > x2 ) {
21157			tmp = x2; x2 = x1; x1 = tmp;
21158		}
21159		if ( y1 > y2 ) {
21160			tmp = y2; y2 = y1; y1 = tmp;
21161		}
21162		this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
21163
21164		this.selectees.each( function() {
21165			var selectee = $.data( this, "selectable-item" ),
21166				hit = false,
21167				offset = {};
21168
21169			//prevent helper from being selected if appendTo: selectable
21170			if ( !selectee || selectee.element === that.element[ 0 ] ) {
21171				return;
21172			}
21173
21174			offset.left   = selectee.left   + that.elementPos.left;
21175			offset.right  = selectee.right  + that.elementPos.left;
21176			offset.top    = selectee.top    + that.elementPos.top;
21177			offset.bottom = selectee.bottom + that.elementPos.top;
21178
21179			if ( options.tolerance === "touch" ) {
21180				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
21181                    offset.bottom < y1 ) );
21182			} else if ( options.tolerance === "fit" ) {
21183				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
21184                    offset.bottom < y2 );
21185			}
21186
21187			if ( hit ) {
21188
21189				// SELECT
21190				if ( selectee.selected ) {
21191					that._removeClass( selectee.$element, "ui-selected" );
21192					selectee.selected = false;
21193				}
21194				if ( selectee.unselecting ) {
21195					that._removeClass( selectee.$element, "ui-unselecting" );
21196					selectee.unselecting = false;
21197				}
21198				if ( !selectee.selecting ) {
21199					that._addClass( selectee.$element, "ui-selecting" );
21200					selectee.selecting = true;
21201
21202					// selectable SELECTING callback
21203					that._trigger( "selecting", event, {
21204						selecting: selectee.element
21205					} );
21206				}
21207			} else {
21208
21209				// UNSELECT
21210				if ( selectee.selecting ) {
21211					if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
21212						that._removeClass( selectee.$element, "ui-selecting" );
21213						selectee.selecting = false;
21214						that._addClass( selectee.$element, "ui-selected" );
21215						selectee.selected = true;
21216					} else {
21217						that._removeClass( selectee.$element, "ui-selecting" );
21218						selectee.selecting = false;
21219						if ( selectee.startselected ) {
21220							that._addClass( selectee.$element, "ui-unselecting" );
21221							selectee.unselecting = true;
21222						}
21223
21224						// selectable UNSELECTING callback
21225						that._trigger( "unselecting", event, {
21226							unselecting: selectee.element
21227						} );
21228					}
21229				}
21230				if ( selectee.selected ) {
21231					if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
21232						that._removeClass( selectee.$element, "ui-selected" );
21233						selectee.selected = false;
21234
21235						that._addClass( selectee.$element, "ui-unselecting" );
21236						selectee.unselecting = true;
21237
21238						// selectable UNSELECTING callback
21239						that._trigger( "unselecting", event, {
21240							unselecting: selectee.element
21241						} );
21242					}
21243				}
21244			}
21245		} );
21246
21247		return false;
21248	},
21249
21250	_mouseStop: function( event ) {
21251		var that = this;
21252
21253		this.dragged = false;
21254
21255		$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
21256			var selectee = $.data( this, "selectable-item" );
21257			that._removeClass( selectee.$element, "ui-unselecting" );
21258			selectee.unselecting = false;
21259			selectee.startselected = false;
21260			that._trigger( "unselected", event, {
21261				unselected: selectee.element
21262			} );
21263		} );
21264		$( ".ui-selecting", this.element[ 0 ] ).each( function() {
21265			var selectee = $.data( this, "selectable-item" );
21266			that._removeClass( selectee.$element, "ui-selecting" )
21267				._addClass( selectee.$element, "ui-selected" );
21268			selectee.selecting = false;
21269			selectee.selected = true;
21270			selectee.startselected = true;
21271			that._trigger( "selected", event, {
21272				selected: selectee.element
21273			} );
21274		} );
21275		this._trigger( "stop", event );
21276
21277		this.helper.remove();
21278
21279		return false;
21280	}
21281
21282} );
21283
21284
21285/*!
21286 * jQuery UI Selectmenu 1.1
212864.1
21287 * https://jqueryui.com
21288 *
21289 * Copyright OpenJS Foundation and other contributors
21290 * Released under the MIT license.
21291 * https://jquery.org/license
21292 */
21293
21294//>>label: Selectmenu
21295//>>group: Widgets
21296/* eslint-disable max-len */
21297//>>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.
21298/* eslint-enable max-len */
21299//>>docs: https://api.jqueryui.com/selectmenu/
21300//>>demos: https://jqueryui.com/selectmenu/
21301//>>css.structure: ../../themes/base/core.css
21302//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
21303//>>css.theme: ../../themes/base/theme.css
21304
21305
21306var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
21307	version: "1.14.1
vendor: 14,466 bytes, lines 21307-21928
21307",
21308	defaultElement: "<select>",
21309	options: {
21310		appendTo: null,
21311		classes: {
21312			"ui-selectmenu-button-open": "ui-corner-top",
21313			"ui-selectmenu-button-closed": "ui-corner-all"
21314		},
21315		disabled: null,
21316		icons: {
21317			button: "ui-icon-triangle-1-s"
21318		},
21319		position: {
21320			my: "left top",
21321			at: "left bottom",
21322			collision: "none"
21323		},
21324		width: false,
21325
21326		// Callbacks
21327		change: null,
21328		close: null,
21329		focus: null,
21330		open: null,
21331		select: null
21332	},
21333
21334	_create: function() {
21335		var selectmenuId = this.element.uniqueId().attr( "id" );
21336		this.ids = {
21337			element: selectmenuId,
21338			button: selectmenuId + "-button",
21339			menu: selectmenuId + "-menu"
21340		};
21341
21342		this._drawButton();
21343		this._drawMenu();
21344		this._bindFormResetHandler();
21345
21346		this._rendered = false;
21347		this.menuItems = $();
21348	},
21349
21350	_drawButton: function() {
21351		var icon,
21352			that = this,
21353			item = this._parseOption(
21354				this.element.find( "option:selected" ),
21355				this.element[ 0 ].selectedIndex
21356			);
21357
21358		// Associate existing label with the new button
21359		this.labels = this.element.labels().attr( "for", this.ids.button );
21360		this._on( this.labels, {
21361			click: function( event ) {
21362				this.button.trigger( "focus" );
21363				event.preventDefault();
21364			}
21365		} );
21366
21367		// Hide original select element
21368		this.element.hide();
21369
21370		// Create button
21371		this.button = $( "<span>", {
21372			tabindex: this.options.disabled ? -1 : 0,
21373			id: this.ids.button,
21374			role: "combobox",
21375			"aria-expanded": "false",
21376			"aria-autocomplete": "list",
21377			"aria-owns": this.ids.menu,
21378			"aria-haspopup": "true",
21379			title: this.element.attr( "title" )
21380		} )
21381			.insertAfter( this.element );
21382
21383		this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
21384			"ui-button ui-widget" );
21385
21386		icon = $( "<span>" ).appendTo( this.button );
21387		this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
21388		this.buttonItem = this._renderButtonItem( item )
21389			.appendTo( this.button );
21390
21391		if ( this.options.width !== false ) {
21392			this._resizeButton();
21393		}
21394
21395		this._on( this.button, this._buttonEvents );
21396		this.button.one( "focusin", function() {
21397
21398			// Delay rendering the menu items until the button receives focus.
21399			// The menu may have already been rendered via a programmatic open.
21400			if ( !that._rendered ) {
21401				that._refreshMenu();
21402			}
21403		} );
21404	},
21405
21406	_drawMenu: function() {
21407		var that = this;
21408
21409		// Create menu
21410		this.menu = $( "<ul>", {
21411			"aria-hidden": "true",
21412			"aria-labelledby": this.ids.button,
21413			id: this.ids.menu
21414		} );
21415
21416		// Wrap menu
21417		this.menuWrap = $( "<div>" ).append( this.menu );
21418		this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
21419		this.menuWrap.appendTo( this._appendTo() );
21420
21421		// Initialize menu widget
21422		this.menuInstance = this.menu
21423			.menu( {
21424				classes: {
21425					"ui-menu": "ui-corner-bottom"
21426				},
21427				role: "listbox",
21428				select: function( event, ui ) {
21429					event.preventDefault();
21430					that._select( ui.item.data( "ui-selectmenu-item" ), event );
21431				},
21432				focus: function( event, ui ) {
21433					var item = ui.item.data( "ui-selectmenu-item" );
21434
21435					// Prevent inital focus from firing and check if its a newly focused item
21436					if ( that.focusIndex != null && item.index !== that.focusIndex ) {
21437						that._trigger( "focus", event, { item: item } );
21438						if ( !that.isOpen ) {
21439							that._select( item, event );
21440						}
21441					}
21442					that.focusIndex = item.index;
21443
21444					that.button.attr( "aria-activedescendant",
21445						that.menuItems.eq( item.index ).attr( "id" ) );
21446				}
21447			} )
21448			.menu( "instance" );
21449
21450		// Don't close the menu on mouseleave
21451		this.menuInstance._off( this.menu, "mouseleave" );
21452
21453		// Cancel the menu's collapseAll on document click
21454		this.menuInstance._closeOnDocumentClick = function() {
21455			return false;
21456		};
21457
21458		// Selects often contain empty items, but never contain dividers
21459		this.menuInstance._isDivider = function() {
21460			return false;
21461		};
21462	},
21463
21464	refresh: function() {
21465		this._refreshMenu();
21466		this.buttonItem.replaceWith(
21467			this.buttonItem = this._renderButtonItem(
21468
21469				// Fall back to an empty object in case there are no options
21470				this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
21471			)
21472		);
21473		if ( this.options.width === null ) {
21474			this._resizeButton();
21475		}
21476	},
21477
21478	_refreshMenu: function() {
21479		var item,
21480			options = this.element.find( "option" );
21481
21482		this.menu.empty();
21483
21484		this._parseOptions( options );
21485		this._renderMenu( this.menu, this.items );
21486
21487		this.menuInstance.refresh();
21488		this.menuItems = this.menu.find( "li" )
21489			.not( ".ui-selectmenu-optgroup" )
21490				.find( ".ui-menu-item-wrapper" );
21491
21492		this._rendered = true;
21493
21494		if ( !options.length ) {
21495			return;
21496		}
21497
21498		item = this._getSelectedItem();
21499
21500		// Update the menu to have the correct item focused
21501		this.menuInstance.focus( null, item );
21502		this._setAria( item.data( "ui-selectmenu-item" ) );
21503
21504		// Set disabled state
21505		this._setOption( "disabled", this.element.prop( "disabled" ) );
21506	},
21507
21508	open: function( event ) {
21509		if ( this.options.disabled ) {
21510			return;
21511		}
21512
21513		// If this is the first time the menu is being opened, render the items
21514		if ( !this._rendered ) {
21515			this._refreshMenu();
21516		} else {
21517
21518			// Menu clears focus on close, reset focus to selected item
21519			this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
21520			this.menuInstance.focus( null, this._getSelectedItem() );
21521		}
21522
21523		// If there are no options, don't open the menu
21524		if ( !this.menuItems.length ) {
21525			return;
21526		}
21527
21528		this.isOpen = true;
21529		this._toggleAttr();
21530		this._resizeMenu();
21531		this._position();
21532
21533		this._on( this.document, this._documentClick );
21534
21535		this._trigger( "open", event );
21536	},
21537
21538	_position: function() {
21539		this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
21540	},
21541
21542	close: function( event ) {
21543		if ( !this.isOpen ) {
21544			return;
21545		}
21546
21547		this.isOpen = false;
21548		this._toggleAttr();
21549
21550		this.range = null;
21551		this._off( this.document );
21552
21553		this._trigger( "close", event );
21554	},
21555
21556	widget: function() {
21557		return this.button;
21558	},
21559
21560	menuWidget: function() {
21561		return this.menu;
21562	},
21563
21564	_renderButtonItem: function( item ) {
21565		var buttonItem = $( "<span>" );
21566
21567		this._setText( buttonItem, item.label );
21568		this._addClass( buttonItem, "ui-selectmenu-text" );
21569
21570		return buttonItem;
21571	},
21572
21573	_renderMenu: function( ul, items ) {
21574		var that = this,
21575			currentOptgroup = "";
21576
21577		$.each( items, function( index, item ) {
21578			var li;
21579
21580			if ( item.optgroup !== currentOptgroup ) {
21581				li = $( "<li>", {
21582					text: item.optgroup
21583				} );
21584				that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
21585					( item.element.parent( "optgroup" ).prop( "disabled" ) ?
21586						" ui-state-disabled" :
21587						"" ) );
21588
21589				li.appendTo( ul );
21590
21591				currentOptgroup = item.optgroup;
21592			}
21593
21594			that._renderItemData( ul, item );
21595		} );
21596	},
21597
21598	_renderItemData: function( ul, item ) {
21599		return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
21600	},
21601
21602	_renderItem: function( ul, item ) {
21603		var li = $( "<li>" ),
21604			wrapper = $( "<div>", {
21605				title: item.element.attr( "title" )
21606			} );
21607
21608		if ( item.disabled ) {
21609			this._addClass( li, null, "ui-state-disabled" );
21610		}
21611
21612		if ( item.hidden ) {
21613			li.prop( "hidden", true );
21614		} else {
21615			this._setText( wrapper, item.label );
21616		}
21617
21618		return li.append( wrapper ).appendTo( ul );
21619	},
21620
21621	_setText: function( element, value ) {
21622		if ( value ) {
21623			element.text( value );
21624		} else {
21625			element.html( "&#160;" );
21626		}
21627	},
21628
21629	_move: function( direction, event ) {
21630		var item, next,
21631			filter = ".ui-menu-item";
21632
21633		if ( this.isOpen ) {
21634			item = this.menuItems.eq( this.focusIndex ).parent( "li" );
21635		} else {
21636			item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
21637			filter += ":not(.ui-state-disabled)";
21638		}
21639
21640		if ( direction === "first" || direction === "last" ) {
21641			next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
21642		} else {
21643			next = item[ direction + "All" ]( filter ).eq( 0 );
21644		}
21645
21646		if ( next.length ) {
21647			this.menuInstance.focus( event, next );
21648		}
21649	},
21650
21651	_getSelectedItem: function() {
21652		return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
21653	},
21654
21655	_toggle: function( event ) {
21656		this[ this.isOpen ? "close" : "open" ]( event );
21657	},
21658
21659	_setSelection: function() {
21660		var selection;
21661
21662		if ( !this.range ) {
21663			return;
21664		}
21665
21666		selection = window.getSelection();
21667		selection.removeAllRanges();
21668		selection.addRange( this.range );
21669	},
21670
21671	_documentClick: {
21672		mousedown: function( event ) {
21673			if ( !this.isOpen ) {
21674				return;
21675			}
21676
21677			if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
21678				CSS.escape( this.ids.button ) ).length ) {
21679				this.close( event );
21680			}
21681		}
21682	},
21683
21684	_buttonEvents: {
21685
21686		// Prevent text selection from being reset when interacting with the selectmenu (#10144)
21687		mousedown: function() {
21688			var selection = window.getSelection();
21689			if ( selection.rangeCount ) {
21690				this.range = selection.getRangeAt( 0 );
21691			}
21692		},
21693
21694		click: function( event ) {
21695			this._setSelection();
21696			this._toggle( event );
21697		},
21698
21699		keydown: function( event ) {
21700			var preventDefault = true;
21701			switch ( event.keyCode ) {
21702			case $.ui.keyCode.TAB:
21703			case $.ui.keyCode.ESCAPE:
21704				this.close( event );
21705				preventDefault = false;
21706				break;
21707			case $.ui.keyCode.ENTER:
21708				if ( this.isOpen ) {
21709					this._selectFocusedItem( event );
21710				}
21711				break;
21712			case $.ui.keyCode.UP:
21713				if ( event.altKey ) {
21714					this._toggle( event );
21715				} else {
21716					this._move( "prev", event );
21717				}
21718				break;
21719			case $.ui.keyCode.DOWN:
21720				if ( event.altKey ) {
21721					this._toggle( event );
21722				} else {
21723					this._move( "next", event );
21724				}
21725				break;
21726			case $.ui.keyCode.SPACE:
21727				if ( this.isOpen ) {
21728					this._selectFocusedItem( event );
21729				} else {
21730					this._toggle( event );
21731				}
21732				break;
21733			case $.ui.keyCode.LEFT:
21734				this._move( "prev", event );
21735				break;
21736			case $.ui.keyCode.RIGHT:
21737				this._move( "next", event );
21738				break;
21739			case $.ui.keyCode.HOME:
21740			case $.ui.keyCode.PAGE_UP:
21741				this._move( "first", event );
21742				break;
21743			case $.ui.keyCode.END:
21744			case $.ui.keyCode.PAGE_DOWN:
21745				this._move( "last", event );
21746				break;
21747			default:
21748				this.menu.trigger( event );
21749				preventDefault = false;
21750			}
21751
21752			if ( preventDefault ) {
21753				event.preventDefault();
21754			}
21755		}
21756	},
21757
21758	_selectFocusedItem: function( event ) {
21759		var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
21760		if ( !item.hasClass( "ui-state-disabled" ) ) {
21761			this._select( item.data( "ui-selectmenu-item" ), event );
21762		}
21763	},
21764
21765	_select: function( item, event ) {
21766		var oldIndex = this.element[ 0 ].selectedIndex;
21767
21768		// Change native select element
21769		this.element[ 0 ].selectedIndex = item.index;
21770		this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
21771		this._setAria( item );
21772		this._trigger( "select", event, { item: item } );
21773
21774		if ( item.index !== oldIndex ) {
21775			this._trigger( "change", event, { item: item } );
21776		}
21777
21778		this.close( event );
21779	},
21780
21781	_setAria: function( item ) {
21782		var id = this.menuItems.eq( item.index ).attr( "id" );
21783
21784		this.button.attr( {
21785			"aria-labelledby": id,
21786			"aria-activedescendant": id
21787		} );
21788		this.menu.attr( "aria-activedescendant", id );
21789	},
21790
21791	_setOption: function( key, value ) {
21792		if ( key === "icons" ) {
21793			var icon = this.button.find( "span.ui-icon" );
21794			this._removeClass( icon, null, this.options.icons.button )
21795				._addClass( icon, null, value.button );
21796		}
21797
21798		this._super( key, value );
21799
21800		if ( key === "appendTo" ) {
21801			this.menuWrap.appendTo( this._appendTo() );
21802		}
21803
21804		if ( key === "width" ) {
21805			this._resizeButton();
21806		}
21807	},
21808
21809	_setOptionDisabled: function( value ) {
21810		this._super( value );
21811
21812		this.menuInstance.option( "disabled", value );
21813		this.button.attr( "aria-disabled", value );
21814		this._toggleClass( this.button, null, "ui-state-disabled", value );
21815
21816		this.element.prop( "disabled", value );
21817		if ( value ) {
21818			this.button.attr( "tabindex", -1 );
21819			this.close();
21820		} else {
21821			this.button.attr( "tabindex", 0 );
21822		}
21823	},
21824
21825	_appendTo: function() {
21826		var element = this.options.appendTo;
21827
21828		if ( element ) {
21829			element = element.jquery || element.nodeType ?
21830				$( element ) :
21831				this.document.find( element ).eq( 0 );
21832		}
21833
21834		if ( !element || !element[ 0 ] ) {
21835			element = this.element.closest( ".ui-front, dialog" );
21836		}
21837
21838		if ( !element.length ) {
21839			element = this.document[ 0 ].body;
21840		}
21841
21842		return element;
21843	},
21844
21845	_toggleAttr: function() {
21846		this.button.attr( "aria-expanded", this.isOpen );
21847
21848		// We can't use two _toggleClass() calls here, because we need to make sure
21849		// we always remove classes first and add them second, otherwise if both classes have the
21850		// same theme class, it will be removed after we add it.
21851		this._removeClass( this.button, "ui-selectmenu-button-" +
21852			( this.isOpen ? "closed" : "open" ) )
21853			._addClass( this.button, "ui-selectmenu-button-" +
21854				( this.isOpen ? "open" : "closed" ) )
21855			._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
21856
21857		this.menu.attr( "aria-hidden", !this.isOpen );
21858	},
21859
21860	_resizeButton: function() {
21861		var width = this.options.width;
21862
21863		// For `width: false`, just remove inline style and stop
21864		if ( width === false ) {
21865			this.button.css( "width", "" );
21866			return;
21867		}
21868
21869		// For `width: null`, match the width of the original element
21870		if ( width === null ) {
21871			width = this.element.show().outerWidth();
21872			this.element.hide();
21873		}
21874
21875		this.button.outerWidth( width );
21876	},
21877
21878	_resizeMenu: function() {
21879		this.menu.outerWidth( Math.max(
21880			this.button.outerWidth(),
21881			this.menu.width( "" ).outerWidth()
21882		) );
21883	},
21884
21885	_getCreateOptions: function() {
21886		var options = this._super();
21887
21888		options.disabled = this.element.prop( "disabled" );
21889
21890		return options;
21891	},
21892
21893	_parseOptions: function( options ) {
21894		var that = this,
21895			data = [];
21896		options.each( function( index, item ) {
21897			data.push( that._parseOption( $( item ), index ) );
21898		} );
21899		this.items = data;
21900	},
21901
21902	_parseOption: function( option, index ) {
21903		var optgroup = option.parent( "optgroup" );
21904
21905		return {
21906			element: option,
21907			index: index,
21908			value: option.val(),
21909			label: option.text(),
21910			hidden: optgroup.prop( "hidden" ) || option.prop( "hidden" ),
21911			optgroup: optgroup.attr( "label" ) || "",
21912			disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
21913		};
21914	},
21915
21916	_destroy: function() {
21917		this._unbindFormResetHandler();
21918		this.menuWrap.remove();
21919		this.button.remove();
21920		this.element.show();
21921		this.element.removeUniqueId();
21922		this.labels.attr( "for", this.ids.element );
21923	}
21924} ] );
21925
21926
21927/*!
21928 * jQuery UI Slider 1.14.
vendor: 2,981 bytes, lines 21928-22044
219281
21929 * https://jqueryui.com
21930 *
21931 * Copyright OpenJS Foundation and other contributors
21932 * Released under the MIT license.
21933 * https://jquery.org/license
21934 */
21935
21936//>>label: Slider
21937//>>group: Widgets
21938//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
21939//>>docs: https://api.jqueryui.com/slider/
21940//>>demos: https://jqueryui.com/slider/
21941//>>css.structure: ../../themes/base/core.css
21942//>>css.structure: ../../themes/base/slider.css
21943//>>css.theme: ../../themes/base/theme.css
21944
21945
21946var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
21947	version: "1.14.1",
21948	widgetEventPrefix: "slide",
21949
21950	options: {
21951		animate: false,
21952		classes: {
21953			"ui-slider": "ui-corner-all",
21954			"ui-slider-handle": "ui-corner-all",
21955
21956			// Note: ui-widget-header isn't the most fittingly semantic framework class for this
21957			// element, but worked best visually with a variety of themes
21958			"ui-slider-range": "ui-corner-all ui-widget-header"
21959		},
21960		distance: 0,
21961		max: 100,
21962		min: 0,
21963		orientation: "horizontal",
21964		range: false,
21965		step: 1,
21966		value: 0,
21967		values: null,
21968
21969		// Callbacks
21970		change: null,
21971		slide: null,
21972		start: null,
21973		stop: null
21974	},
21975
21976	// Number of pages in a slider
21977	// (how many times can you page up/down to go through the whole range)
21978	numPages: 5,
21979
21980	_create: function() {
21981		this._keySliding = false;
21982		this._mouseSliding = false;
21983		this._animateOff = true;
21984		this._handleIndex = null;
21985		this._detectOrientation();
21986		this._mouseInit();
21987		this._calculateNewMax();
21988
21989		this._addClass( "ui-slider ui-slider-" + this.orientation,
21990			"ui-widget ui-widget-content" );
21991
21992		this._refresh();
21993
21994		this._animateOff = false;
21995	},
21996
21997	_refresh: function() {
21998		this._createRange();
21999		this._createHandles();
22000		this._setupEvents();
22001		this._refreshValue();
22002	},
22003
22004	_createHandles: function() {
22005		var i, handleCount,
22006			options = this.options,
22007			existingHandles = this.element.find( ".ui-slider-handle" ),
22008			handle = "<span tabindex='0'></span>",
22009			handles = [];
22010
22011		handleCount = ( options.values && options.values.length ) || 1;
22012
22013		if ( existingHandles.length > handleCount ) {
22014			existingHandles.slice( handleCount ).remove();
22015			existingHandles = existingHandles.slice( 0, handleCount );
22016		}
22017
22018		for ( i = existingHandles.length; i < handleCount; i++ ) {
22019			handles.push( handle );
22020		}
22021
22022		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
22023
22024		this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
22025
22026		this.handle = this.handles.eq( 0 );
22027
22028		this.handles.each( function( i ) {
22029			$( this )
22030				.data( "ui-slider-handle-index", i )
22031				.attr( "tabIndex", 0 );
22032		} );
22033	},
22034
22035	_createRange: function() {
22036		var options = this.options;
22037
22038		if ( options.range ) {
22039			if ( options.range === true ) {
22040				if ( !options.values ) {
22041					options.values = [ this._valueMin(), this._valueMin() ];
22042				} else if ( options.values.length && options.values.length !== 2 ) {
22043					options.values = [ options.values[ 0 ], options.values[ 0 ] ];
22044				} else if ( Array
vendor: 6,343 bytes, lines 22044-22290
22044.isArray( options.values ) ) {
22045					options.values = options.values.slice( 0 );
22046				}
22047			}
22048
22049			if ( !this.range || !this.range.length ) {
22050				this.range = $( "<div>" )
22051					.appendTo( this.element );
22052
22053				this._addClass( this.range, "ui-slider-range" );
22054			} else {
22055				this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
22056
22057				// Handle range switching from true to min/max
22058				this.range.css( {
22059					"left": "",
22060					"bottom": ""
22061				} );
22062			}
22063			if ( options.range === "min" || options.range === "max" ) {
22064				this._addClass( this.range, "ui-slider-range-" + options.range );
22065			}
22066		} else {
22067			if ( this.range ) {
22068				this.range.remove();
22069			}
22070			this.range = null;
22071		}
22072	},
22073
22074	_setupEvents: function() {
22075		this._off( this.handles );
22076		this._on( this.handles, this._handleEvents );
22077		this._hoverable( this.handles );
22078		this._focusable( this.handles );
22079	},
22080
22081	_destroy: function() {
22082		this.handles.remove();
22083		if ( this.range ) {
22084			this.range.remove();
22085		}
22086
22087		this._mouseDestroy();
22088	},
22089
22090	_mouseCapture: function( event ) {
22091		var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
22092			that = this,
22093			o = this.options;
22094
22095		if ( o.disabled ) {
22096			return false;
22097		}
22098
22099		this.elementSize = {
22100			width: this.element.outerWidth(),
22101			height: this.element.outerHeight()
22102		};
22103		this.elementOffset = this.element.offset();
22104
22105		position = { x: event.pageX, y: event.pageY };
22106		normValue = this._normValueFromMouse( position );
22107		distance = this._valueMax() - this._valueMin() + 1;
22108		this.handles.each( function( i ) {
22109			var thisDistance = Math.abs( normValue - that.values( i ) );
22110			if ( ( distance > thisDistance ) ||
22111				( distance === thisDistance &&
22112					( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
22113				distance = thisDistance;
22114				closestHandle = $( this );
22115				index = i;
22116			}
22117		} );
22118
22119		allowed = this._start( event, index );
22120		if ( allowed === false ) {
22121			return false;
22122		}
22123		this._mouseSliding = true;
22124
22125		this._handleIndex = index;
22126
22127		this._addClass( closestHandle, null, "ui-state-active" );
22128		closestHandle.trigger( "focus" );
22129
22130		offset = closestHandle.offset();
22131		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
22132		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
22133			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
22134			top: event.pageY - offset.top -
22135				( closestHandle.height() / 2 ) -
22136				( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
22137				( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
22138				( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
22139		};
22140
22141		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
22142			this._slide( event, index, normValue );
22143		}
22144		this._animateOff = true;
22145		return true;
22146	},
22147
22148	_mouseStart: function() {
22149		return true;
22150	},
22151
22152	_mouseDrag: function( event ) {
22153		var position = { x: event.pageX, y: event.pageY },
22154			normValue = this._normValueFromMouse( position );
22155
22156		this._slide( event, this._handleIndex, normValue );
22157
22158		return false;
22159	},
22160
22161	_mouseStop: function( event ) {
22162		this._removeClass( this.handles, null, "ui-state-active" );
22163		this._mouseSliding = false;
22164
22165		this._stop( event, this._handleIndex );
22166		this._change( event, this._handleIndex );
22167
22168		this._handleIndex = null;
22169		this._clickOffset = null;
22170		this._animateOff = false;
22171
22172		return false;
22173	},
22174
22175	_detectOrientation: function() {
22176		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
22177	},
22178
22179	_normValueFromMouse: function( position ) {
22180		var pixelTotal,
22181			pixelMouse,
22182			percentMouse,
22183			valueTotal,
22184			valueMouse;
22185
22186		if ( this.orientation === "horizontal" ) {
22187			pixelTotal = this.elementSize.width;
22188			pixelMouse = position.x - this.elementOffset.left -
22189				( this._clickOffset ? this._clickOffset.left : 0 );
22190		} else {
22191			pixelTotal = this.elementSize.height;
22192			pixelMouse = position.y - this.elementOffset.top -
22193				( this._clickOffset ? this._clickOffset.top : 0 );
22194		}
22195
22196		percentMouse = ( pixelMouse / pixelTotal );
22197		if ( percentMouse > 1 ) {
22198			percentMouse = 1;
22199		}
22200		if ( percentMouse < 0 ) {
22201			percentMouse = 0;
22202		}
22203		if ( this.orientation === "vertical" ) {
22204			percentMouse = 1 - percentMouse;
22205		}
22206
22207		valueTotal = this._valueMax() - this._valueMin();
22208		valueMouse = this._valueMin() + percentMouse * valueTotal;
22209
22210		return this._trimAlignValue( valueMouse );
22211	},
22212
22213	_uiHash: function( index, value, values ) {
22214		var uiHash = {
22215			handle: this.handles[ index ],
22216			handleIndex: index,
22217			value: value !== undefined ? value : this.value()
22218		};
22219
22220		if ( this._hasMultipleValues() ) {
22221			uiHash.value = value !== undefined ? value : this.values( index );
22222			uiHash.values = values || this.values();
22223		}
22224
22225		return uiHash;
22226	},
22227
22228	_hasMultipleValues: function() {
22229		return this.options.values && this.options.values.length;
22230	},
22231
22232	_start: function( event, index ) {
22233		return this._trigger( "start", event, this._uiHash( index ) );
22234	},
22235
22236	_slide: function( event, index, newVal ) {
22237		var allowed, otherVal,
22238			currentValue = this.value(),
22239			newValues = this.values();
22240
22241		if ( this._hasMultipleValues() ) {
22242			otherVal = this.values( index ? 0 : 1 );
22243			currentValue = this.values( index );
22244
22245			if ( this.options.values.length === 2 && this.options.range === true ) {
22246				newVal =  index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
22247			}
22248
22249			newValues[ index ] = newVal;
22250		}
22251
22252		if ( newVal === currentValue ) {
22253			return;
22254		}
22255
22256		allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
22257
22258		// A slide can be canceled by returning false from the slide callback
22259		if ( allowed === false ) {
22260			return;
22261		}
22262
22263		if ( this._hasMultipleValues() ) {
22264			this.values( index, newVal );
22265		} else {
22266			this.value( newVal );
22267		}
22268	},
22269
22270	_stop: function( event, index ) {
22271		this._trigger( "stop", event, this._uiHash( index ) );
22272	},
22273
22274	_change: function( event, index ) {
22275		if ( !this._keySliding && !this._mouseSliding ) {
22276
22277			//store the last changed value index for reference when handles overlap
22278			this._lastChangedValue = index;
22279			this._trigger( "change", event, this._uiHash( index ) );
22280		}
22281	},
22282
22283	value: function( newValue ) {
22284		if ( arguments.length ) {
22285			this.options.value = this._trimAlignValue( newValue );
22286			this._refreshValue();
22287			this._change( null, 0 );
22288			return;
22289		}
22290
vendor: 4,358 bytes, lines 22291-22463
22291		return this._value();
22292	},
22293
22294	values: function( index, newValue ) {
22295		var vals,
22296			newValues,
22297			i;
22298
22299		if ( arguments.length > 1 ) {
22300			this.options.values[ index ] = this._trimAlignValue( newValue );
22301			this._refreshValue();
22302			this._change( null, index );
22303			return;
22304		}
22305
22306		if ( arguments.length ) {
22307			if ( Array.isArray( arguments[ 0 ] ) ) {
22308				vals = this.options.values;
22309				newValues = arguments[ 0 ];
22310				for ( i = 0; i < vals.length; i += 1 ) {
22311					vals[ i ] = this._trimAlignValue( newValues[ i ] );
22312					this._change( null, i );
22313				}
22314				this._refreshValue();
22315			} else {
22316				if ( this._hasMultipleValues() ) {
22317					return this._values( index );
22318				} else {
22319					return this.value();
22320				}
22321			}
22322		} else {
22323			return this._values();
22324		}
22325	},
22326
22327	_setOption: function( key, value ) {
22328		var i,
22329			valsLength = 0;
22330
22331		if ( key === "range" && this.options.range === true ) {
22332			if ( value === "min" ) {
22333				this.options.value = this._values( 0 );
22334				this.options.values = null;
22335			} else if ( value === "max" ) {
22336				this.options.value = this._values( this.options.values.length - 1 );
22337				this.options.values = null;
22338			}
22339		}
22340
22341		if ( Array.isArray( this.options.values ) ) {
22342			valsLength = this.options.values.length;
22343		}
22344
22345		this._super( key, value );
22346
22347		switch ( key ) {
22348			case "orientation":
22349				this._detectOrientation();
22350				this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
22351					._addClass( "ui-slider-" + this.orientation );
22352				this._refreshValue();
22353				if ( this.options.range ) {
22354					this._refreshRange( value );
22355				}
22356
22357				// Reset positioning from previous orientation
22358				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
22359				break;
22360			case "value":
22361				this._animateOff = true;
22362				this._refreshValue();
22363				this._change( null, 0 );
22364				this._animateOff = false;
22365				break;
22366			case "values":
22367				this._animateOff = true;
22368				this._refreshValue();
22369
22370				// Start from the last handle to prevent unreachable handles (#9046)
22371				for ( i = valsLength - 1; i >= 0; i-- ) {
22372					this._change( null, i );
22373				}
22374				this._animateOff = false;
22375				break;
22376			case "step":
22377			case "min":
22378			case "max":
22379				this._animateOff = true;
22380				this._calculateNewMax();
22381				this._refreshValue();
22382				this._animateOff = false;
22383				break;
22384			case "range":
22385				this._animateOff = true;
22386				this._refresh();
22387				this._animateOff = false;
22388				break;
22389		}
22390	},
22391
22392	_setOptionDisabled: function( value ) {
22393		this._super( value );
22394
22395		this._toggleClass( null, "ui-state-disabled", !!value );
22396	},
22397
22398	//internal value getter
22399	// _value() returns value trimmed by min and max, aligned by step
22400	_value: function() {
22401		var val = this.options.value;
22402		val = this._trimAlignValue( val );
22403
22404		return val;
22405	},
22406
22407	//internal values getter
22408	// _values() returns array of values trimmed by min and max, aligned by step
22409	// _values( index ) returns single value trimmed by min and max, aligned by step
22410	_values: function( index ) {
22411		var val,
22412			vals,
22413			i;
22414
22415		if ( arguments.length ) {
22416			val = this.options.values[ index ];
22417			val = this._trimAlignValue( val );
22418
22419			return val;
22420		} else if ( this._hasMultipleValues() ) {
22421
22422			// .slice() creates a copy of the array
22423			// this copy gets trimmed by min and max and then returned
22424			vals = this.options.values.slice();
22425			for ( i = 0; i < vals.length; i += 1 ) {
22426				vals[ i ] = this._trimAlignValue( vals[ i ] );
22427			}
22428
22429			return vals;
22430		} else {
22431			return [];
22432		}
22433	},
22434
22435	// Returns the step-aligned value that val is closest to, between (inclusive) min and max
22436	_trimAlignValue: function( val ) {
22437		if ( val <= this._valueMin() ) {
22438			return this._valueMin();
22439		}
22440		if ( val >= this._valueMax() ) {
22441			return this._valueMax();
22442		}
22443		var step = ( this.options.step > 0 ) ? this.options.step : 1,
22444			valModStep = ( val - this._valueMin() ) % step,
22445			alignValue = val - valModStep;
22446
22447		if ( Math.abs( valModStep ) * 2 >= step ) {
22448			alignValue += ( valModStep > 0 ) ? step : ( -step );
22449		}
22450
22451		// Since JavaScript has problems with large floats, round
22452		// the final value to 5 digits after the decimal point (see #4124)
22453		return parseFloat( alignValue.toFixed( 5 ) );
22454	},
22455
22456	_calculateNewMax: function() {
22457		var max = this.options.max,
22458			min = this._valueMin(),
22459			step = this.options.step,
22460			aboveMin = Math.round( ( max - min ) / step ) * step;
22461		max = aboveMin + min;
22462		if ( max > this.options.max ) {
22463
vendor: 5,594 bytes, lines 22464-22663
22464			//If max is not divisible by step, rounding off may increase its value
22465			max -= step;
22466		}
22467		this.max = parseFloat( max.toFixed( this._precision() ) );
22468	},
22469
22470	_precision: function() {
22471		var precision = this._precisionOf( this.options.step );
22472		if ( this.options.min !== null ) {
22473			precision = Math.max( precision, this._precisionOf( this.options.min ) );
22474		}
22475		return precision;
22476	},
22477
22478	_precisionOf: function( num ) {
22479		var str = num.toString(),
22480			decimal = str.indexOf( "." );
22481		return decimal === -1 ? 0 : str.length - decimal - 1;
22482	},
22483
22484	_valueMin: function() {
22485		return this.options.min;
22486	},
22487
22488	_valueMax: function() {
22489		return this.max;
22490	},
22491
22492	_refreshRange: function( orientation ) {
22493		if ( orientation === "vertical" ) {
22494			this.range.css( { "width": "", "left": "" } );
22495		}
22496		if ( orientation === "horizontal" ) {
22497			this.range.css( { "height": "", "bottom": "" } );
22498		}
22499	},
22500
22501	_refreshValue: function() {
22502		var lastValPercent, valPercent, value, valueMin, valueMax,
22503			oRange = this.options.range,
22504			o = this.options,
22505			that = this,
22506			animate = ( !this._animateOff ) ? o.animate : false,
22507			_set = {};
22508
22509		if ( this._hasMultipleValues() ) {
22510			this.handles.each( function( i ) {
22511				valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
22512					that._valueMin() ) * 100;
22513				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
22514				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
22515				if ( that.options.range === true ) {
22516					if ( that.orientation === "horizontal" ) {
22517						if ( i === 0 ) {
22518							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22519								left: valPercent + "%"
22520							}, o.animate );
22521						}
22522						if ( i === 1 ) {
22523							that.range[ animate ? "animate" : "css" ]( {
22524								width: ( valPercent - lastValPercent ) + "%"
22525							}, {
22526								queue: false,
22527								duration: o.animate
22528							} );
22529						}
22530					} else {
22531						if ( i === 0 ) {
22532							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22533								bottom: ( valPercent ) + "%"
22534							}, o.animate );
22535						}
22536						if ( i === 1 ) {
22537							that.range[ animate ? "animate" : "css" ]( {
22538								height: ( valPercent - lastValPercent ) + "%"
22539							}, {
22540								queue: false,
22541								duration: o.animate
22542							} );
22543						}
22544					}
22545				}
22546				lastValPercent = valPercent;
22547			} );
22548		} else {
22549			value = this.value();
22550			valueMin = this._valueMin();
22551			valueMax = this._valueMax();
22552			valPercent = ( valueMax !== valueMin ) ?
22553					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
22554					0;
22555			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
22556			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
22557
22558			if ( oRange === "min" && this.orientation === "horizontal" ) {
22559				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22560					width: valPercent + "%"
22561				}, o.animate );
22562			}
22563			if ( oRange === "max" && this.orientation === "horizontal" ) {
22564				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22565					width: ( 100 - valPercent ) + "%"
22566				}, o.animate );
22567			}
22568			if ( oRange === "min" && this.orientation === "vertical" ) {
22569				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22570					height: valPercent + "%"
22571				}, o.animate );
22572			}
22573			if ( oRange === "max" && this.orientation === "vertical" ) {
22574				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
22575					height: ( 100 - valPercent ) + "%"
22576				}, o.animate );
22577			}
22578		}
22579	},
22580
22581	_handleEvents: {
22582		keydown: function( event ) {
22583			var allowed, curVal, newVal, step,
22584				index = $( event.target ).data( "ui-slider-handle-index" );
22585
22586			switch ( event.keyCode ) {
22587				case $.ui.keyCode.HOME:
22588				case $.ui.keyCode.END:
22589				case $.ui.keyCode.PAGE_UP:
22590				case $.ui.keyCode.PAGE_DOWN:
22591				case $.ui.keyCode.UP:
22592				case $.ui.keyCode.RIGHT:
22593				case $.ui.keyCode.DOWN:
22594				case $.ui.keyCode.LEFT:
22595					event.preventDefault();
22596					if ( !this._keySliding ) {
22597						this._keySliding = true;
22598						this._addClass( $( event.target ), null, "ui-state-active" );
22599						allowed = this._start( event, index );
22600						if ( allowed === false ) {
22601							return;
22602						}
22603					}
22604					break;
22605			}
22606
22607			step = this.options.step;
22608			if ( this._hasMultipleValues() ) {
22609				curVal = newVal = this.values( index );
22610			} else {
22611				curVal = newVal = this.value();
22612			}
22613
22614			switch ( event.keyCode ) {
22615				case $.ui.keyCode.HOME:
22616					newVal = this._valueMin();
22617					break;
22618				case $.ui.keyCode.END:
22619					newVal = this._valueMax();
22620					break;
22621				case $.ui.keyCode.PAGE_UP:
22622					newVal = this._trimAlignValue(
22623						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
22624					);
22625					break;
22626				case $.ui.keyCode.PAGE_DOWN:
22627					newVal = this._trimAlignValue(
22628						curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
22629					break;
22630				case $.ui.keyCode.UP:
22631				case $.ui.keyCode.RIGHT:
22632					if ( curVal === this._valueMax() ) {
22633						return;
22634					}
22635					newVal = this._trimAlignValue( curVal + step );
22636					break;
22637				case $.ui.keyCode.DOWN:
22638				case $.ui.keyCode.LEFT:
22639					if ( curVal === this._valueMin() ) {
22640						return;
22641					}
22642					newVal = this._trimAlignValue( curVal - step );
22643					break;
22644			}
22645
22646			this._slide( event, index, newVal );
22647		},
22648		keyup: function( event ) {
22649			var index = $( event.target ).data( "ui-slider-handle-index" );
22650
22651			if ( this._keySliding ) {
22652				this._keySliding = false;
22653				this._stop( event, index );
22654				this._change( event, index );
22655				this._removeClass( $( event.target ), null, "ui-state-active" );
22656			}
22657		}
22658	}
22659} );
22660
22661
22662/*!
22663 * jQuery UI Sortable 1.1
226634.1
22664 * https://jqueryui.com
22665 *
22666 * Copyright OpenJS Foundation and other contributors
22667 * Released under the MIT license.
22668 * https://jquery.org/license
22669 */
22670
22671//>>label: Sortable
22672//>>group: Interactions
22673//>>description: Enables items in a list to be sorted using the mouse.
22674//>>docs: https://api.jqueryui.com/sortable/
22675//>>demos: https://jqueryui.com/sortable/
22676//>>css.structure: ../../themes/base/sortable.css
22677
22678
22679var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
22680	version: "1.14.1
vendor: 7,827 bytes, lines 22680-22995
22680",
22681	widgetEventPrefix: "sort",
22682	ready: false,
22683	options: {
22684		appendTo: "parent",
22685		axis: false,
22686		connectWith: false,
22687		containment: false,
22688		cursor: "auto",
22689		cursorAt: false,
22690		dropOnEmpty: true,
22691		forcePlaceholderSize: false,
22692		forceHelperSize: false,
22693		grid: false,
22694		handle: false,
22695		helper: "original",
22696		items: "> *",
22697		opacity: false,
22698		placeholder: false,
22699		revert: false,
22700		scroll: true,
22701		scrollSensitivity: 20,
22702		scrollSpeed: 20,
22703		scope: "default",
22704		tolerance: "intersect",
22705		zIndex: 1000,
22706
22707		// Callbacks
22708		activate: null,
22709		beforeStop: null,
22710		change: null,
22711		deactivate: null,
22712		out: null,
22713		over: null,
22714		receive: null,
22715		remove: null,
22716		sort: null,
22717		start: null,
22718		stop: null,
22719		update: null
22720	},
22721
22722	_isOverAxis: function( x, reference, size ) {
22723		return ( x >= reference ) && ( x < ( reference + size ) );
22724	},
22725
22726	_isFloating: function( item ) {
22727		return ( /left|right/ ).test( item.css( "float" ) ) ||
22728			( /inline|table-cell/ ).test( item.css( "display" ) );
22729	},
22730
22731	_create: function() {
22732		this.containerCache = {};
22733		this._addClass( "ui-sortable" );
22734
22735		//Get the items
22736		this.refresh();
22737
22738		//Let's determine the parent's offset
22739		this.offset = this.element.offset();
22740
22741		//Initialize mouse events for interaction
22742		this._mouseInit();
22743
22744		this._setHandleClassName();
22745
22746		//We're ready to go
22747		this.ready = true;
22748
22749	},
22750
22751	_setOption: function( key, value ) {
22752		this._super( key, value );
22753
22754		if ( key === "handle" ) {
22755			this._setHandleClassName();
22756		}
22757	},
22758
22759	_setHandleClassName: function() {
22760		var that = this;
22761		this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
22762		$.each( this.items, function() {
22763			that._addClass(
22764				this.instance.options.handle ?
22765					this.item.find( this.instance.options.handle ) :
22766					this.item,
22767				"ui-sortable-handle"
22768			);
22769		} );
22770	},
22771
22772	_destroy: function() {
22773		this._mouseDestroy();
22774
22775		for ( var i = this.items.length - 1; i >= 0; i-- ) {
22776			this.items[ i ].item.removeData( this.widgetName + "-item" );
22777		}
22778
22779		return this;
22780	},
22781
22782	_mouseCapture: function( event, overrideHandle ) {
22783		var currentItem = null,
22784			validHandle = false,
22785			that = this;
22786
22787		if ( this.reverting ) {
22788			return false;
22789		}
22790
22791		if ( this.options.disabled || this.options.type === "static" ) {
22792			return false;
22793		}
22794
22795		//We have to refresh the items data once first
22796		this._refreshItems( event );
22797
22798		//Find out if the clicked node (or one of its parents) is a actual item in this.items
22799		$( event.target ).parents().each( function() {
22800			if ( $.data( this, that.widgetName + "-item" ) === that ) {
22801				currentItem = $( this );
22802				return false;
22803			}
22804		} );
22805		if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
22806			currentItem = $( event.target );
22807		}
22808
22809		if ( !currentItem ) {
22810			return false;
22811		}
22812		if ( this.options.handle && !overrideHandle ) {
22813			$( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
22814				if ( this === event.target ) {
22815					validHandle = true;
22816				}
22817			} );
22818			if ( !validHandle ) {
22819				return false;
22820			}
22821		}
22822
22823		this.currentItem = currentItem;
22824		this._removeCurrentsFromItems();
22825		return true;
22826
22827	},
22828
22829	_mouseStart: function( event, overrideHandle, noActivation ) {
22830
22831		var i, body,
22832			o = this.options;
22833
22834		this.currentContainer = this;
22835
22836		//We only need to call refreshPositions, because the refreshItems call has been moved to
22837		// mouseCapture
22838		this.refreshPositions();
22839
22840		//Prepare the dragged items parent
22841		this.appendTo = $( o.appendTo !== "parent" ?
22842				o.appendTo :
22843				this.currentItem.parent() );
22844
22845		//Create and append the visible helper
22846		this.helper = this._createHelper( event );
22847
22848		//Cache the helper size
22849		this._cacheHelperProportions();
22850
22851		/*
22852		 * - Position generation -
22853		 * This block generates everything position related - it's the core of draggables.
22854		 */
22855
22856		//Cache the margins of the original element
22857		this._cacheMargins();
22858
22859		//The element's absolute position on the page minus margins
22860		this.offset = this.currentItem.offset();
22861		this.offset = {
22862			top: this.offset.top - this.margins.top,
22863			left: this.offset.left - this.margins.left
22864		};
22865
22866		$.extend( this.offset, {
22867			click: { //Where the click happened, relative to the element
22868				left: event.pageX - this.offset.left,
22869				top: event.pageY - this.offset.top
22870			},
22871
22872			// This is a relative to absolute position minus the actual position calculation -
22873			// only used for relative positioned helper
22874			relative: this._getRelativeOffset()
22875		} );
22876
22877		// After we get the helper offset, but before we get the parent offset we can
22878		// change the helper's position to absolute
22879		// TODO: Still need to figure out a way to make relative sorting possible
22880		this.helper.css( "position", "absolute" );
22881		this.cssPosition = this.helper.css( "position" );
22882
22883		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
22884		if ( o.cursorAt ) {
22885			this._adjustOffsetFromHelper( o.cursorAt );
22886		}
22887
22888		//Cache the former DOM position
22889		this.domPosition = {
22890			prev: this.currentItem.prev()[ 0 ],
22891			parent: this.currentItem.parent()[ 0 ]
22892		};
22893
22894		// If the helper is not the original, hide the original so it's not playing any role during
22895		// the drag, won't cause anything bad this way
22896		if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
22897			this.currentItem.hide();
22898		}
22899
22900		//Create the placeholder
22901		this._createPlaceholder();
22902
22903		//Get the next scrolling parent
22904		this.scrollParent = this.placeholder.scrollParent();
22905
22906		$.extend( this.offset, {
22907			parent: this._getParentOffset()
22908		} );
22909
22910		//Set a containment if given in the options
22911		if ( o.containment ) {
22912			this._setContainment();
22913		}
22914
22915		if ( o.cursor && o.cursor !== "auto" ) { // cursor option
22916			body = this.document.find( "body" );
22917
22918			this._storedStylesheet =
22919				$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
22920		}
22921
22922		// We need to make sure to grab the zIndex before setting the
22923		// opacity, because setting the opacity to anything lower than 1
22924		// causes the zIndex to change from "auto" to 0.
22925		if ( o.zIndex ) { // zIndex option
22926			if ( this.helper.css( "zIndex" ) ) {
22927				this._storedZIndex = this.helper.css( "zIndex" );
22928			}
22929			this.helper.css( "zIndex", o.zIndex );
22930		}
22931
22932		if ( o.opacity ) { // opacity option
22933			if ( this.helper.css( "opacity" ) ) {
22934				this._storedOpacity = this.helper.css( "opacity" );
22935			}
22936			this.helper.css( "opacity", o.opacity );
22937		}
22938
22939		//Prepare scrolling
22940		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
22941				this.scrollParent[ 0 ].tagName !== "HTML" ) {
22942			this.overflowOffset = this.scrollParent.offset();
22943		}
22944
22945		//Call callbacks
22946		this._trigger( "start", event, this._uiHash() );
22947
22948		//Recache the helper size
22949		if ( !this._preserveHelperProportions ) {
22950			this._cacheHelperProportions();
22951		}
22952
22953		//Post "activate" events to possible containers
22954		if ( !noActivation ) {
22955			for ( i = this.containers.length - 1; i >= 0; i-- ) {
22956				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
22957			}
22958		}
22959
22960		//Prepare possible droppables
22961		if ( $.ui.ddmanager ) {
22962			$.ui.ddmanager.current = this;
22963		}
22964
22965		if ( $.ui.ddmanager && !o.dropBehaviour ) {
22966			$.ui.ddmanager.prepareOffsets( this, event );
22967		}
22968
22969		this.dragging = true;
22970
22971		this._addClass( this.helper, "ui-sortable-helper" );
22972
22973		//Move the helper, if needed
22974		if ( !this.helper.parent().is( this.appendTo ) ) {
22975			this.helper.detach().appendTo( this.appendTo );
22976
22977			//Update position
22978			this.offset.parent = this._getParentOffset();
22979		}
22980
22981		//Generate the original position
22982		this.position = this.originalPosition = this._generatePosition( event );
22983		this.originalPageX = event.pageX;
22984		this.originalPageY = event.pageY;
22985		this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" );
22986
22987		this._mouseDrag( event );
22988
22989		return true;
22990
22991	},
22992
22993	_scroll: function( event ) {
22994		var o = this.options,
22995			scrolled = false;
vendor: 4,489 bytes, lines 22996-23138
22996
22997		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
22998				this.scrollParent[ 0 ].tagName !== "HTML" ) {
22999
23000			if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
23001					event.pageY < o.scrollSensitivity ) {
23002				this.scrollParent[ 0 ].scrollTop =
23003					scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
23004			} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
23005				this.scrollParent[ 0 ].scrollTop =
23006					scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
23007			}
23008
23009			if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
23010					event.pageX < o.scrollSensitivity ) {
23011				this.scrollParent[ 0 ].scrollLeft = scrolled =
23012					this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
23013			} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
23014				this.scrollParent[ 0 ].scrollLeft = scrolled =
23015					this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
23016			}
23017
23018		} else {
23019
23020			if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
23021				scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
23022			} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
23023					o.scrollSensitivity ) {
23024				scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
23025			}
23026
23027			if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
23028				scrolled = this.document.scrollLeft(
23029					this.document.scrollLeft() - o.scrollSpeed
23030				);
23031			} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
23032					o.scrollSensitivity ) {
23033				scrolled = this.document.scrollLeft(
23034					this.document.scrollLeft() + o.scrollSpeed
23035				);
23036			}
23037
23038		}
23039
23040		return scrolled;
23041	},
23042
23043	_mouseDrag: function( event ) {
23044		var i, item, itemElement, intersection,
23045			o = this.options;
23046
23047		//Compute the helpers position
23048		this.position = this._generatePosition( event );
23049		this.positionAbs = this._convertPositionTo( "absolute" );
23050
23051		//Set the helper position
23052		if ( !this.options.axis || this.options.axis !== "y" ) {
23053			this.helper[ 0 ].style.left = this.position.left + "px";
23054		}
23055		if ( !this.options.axis || this.options.axis !== "x" ) {
23056			this.helper[ 0 ].style.top = this.position.top + "px";
23057		}
23058
23059		//Do scrolling
23060		if ( o.scroll ) {
23061			if ( this._scroll( event ) !== false ) {
23062
23063				//Update item positions used in position checks
23064				this._refreshItemPositions( true );
23065
23066				if ( $.ui.ddmanager && !o.dropBehaviour ) {
23067					$.ui.ddmanager.prepareOffsets( this, event );
23068				}
23069			}
23070		}
23071
23072		this.dragDirection = {
23073			vertical: this._getDragVerticalDirection(),
23074			horizontal: this._getDragHorizontalDirection()
23075		};
23076
23077		//Rearrange
23078		for ( i = this.items.length - 1; i >= 0; i-- ) {
23079
23080			//Cache variables and intersection, continue if no intersection
23081			item = this.items[ i ];
23082			itemElement = item.item[ 0 ];
23083			intersection = this._intersectsWithPointer( item );
23084			if ( !intersection ) {
23085				continue;
23086			}
23087
23088			// Only put the placeholder inside the current Container, skip all
23089			// items from other containers. This works because when moving
23090			// an item from one container to another the
23091			// currentContainer is switched before the placeholder is moved.
23092			//
23093			// Without this, moving items in "sub-sortables" can cause
23094			// the placeholder to jitter between the outer and inner container.
23095			if ( item.instance !== this.currentContainer ) {
23096				continue;
23097			}
23098
23099			// Cannot intersect with itself
23100			// no useless actions that have been done before
23101			// no action if the item moved is the parent of the item checked
23102			if ( itemElement !== this.currentItem[ 0 ] &&
23103				this.placeholder[ intersection === 1 ?
23104				"next" : "prev" ]()[ 0 ] !== itemElement &&
23105				!$.contains( this.placeholder[ 0 ], itemElement ) &&
23106				( this.options.type === "semi-dynamic" ?
23107					!$.contains( this.element[ 0 ], itemElement ) :
23108					true
23109				)
23110			) {
23111
23112				this.direction = intersection === 1 ? "down" : "up";
23113
23114				if ( this.options.tolerance === "pointer" ||
23115						this._intersectsWithSides( item ) ) {
23116					this._rearrange( event, item );
23117				} else {
23118					break;
23119				}
23120
23121				this._trigger( "change", event, this._uiHash() );
23122				break;
23123			}
23124		}
23125
23126		//Post events to containers
23127		this._contactContainers( event );
23128
23129		//Interconnect with droppables
23130		if ( $.ui.ddmanager ) {
23131			$.ui.ddmanager.drag( this, event );
23132		}
23133
23134		//Call callbacks
23135		this._trigger( "sort", event, this._uiHash() );
23136
23137		this.lastPositionAbs = this.positionAbs;
23138		return false;
vendor: 5,063 bytes, lines 23139-23328
23139
23140	},
23141
23142	_mouseStop: function( event, noPropagation ) {
23143
23144		if ( !event ) {
23145			return;
23146		}
23147
23148		//If we are using droppables, inform the manager about the drop
23149		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
23150			$.ui.ddmanager.drop( this, event );
23151		}
23152
23153		if ( this.options.revert ) {
23154			var that = this,
23155				cur = this.placeholder.offset(),
23156				axis = this.options.axis,
23157				animation = {};
23158
23159			if ( !axis || axis === "x" ) {
23160				animation.left = cur.left - this.offset.parent.left - this.margins.left +
23161					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
23162						0 :
23163						this.offsetParent[ 0 ].scrollLeft
23164					);
23165			}
23166			if ( !axis || axis === "y" ) {
23167				animation.top = cur.top - this.offset.parent.top - this.margins.top +
23168					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
23169						0 :
23170						this.offsetParent[ 0 ].scrollTop
23171					);
23172			}
23173			this.reverting = true;
23174			$( this.helper ).animate(
23175				animation,
23176				parseInt( this.options.revert, 10 ) || 500,
23177				function() {
23178					that._clear( event );
23179				}
23180			);
23181		} else {
23182			this._clear( event, noPropagation );
23183		}
23184
23185		return false;
23186
23187	},
23188
23189	cancel: function() {
23190
23191		if ( this.dragging ) {
23192
23193			this._mouseUp( new $.Event( "mouseup", { target: null } ) );
23194
23195			if ( this.options.helper === "original" ) {
23196				this.currentItem.css( this._storedCSS );
23197				this._removeClass( this.currentItem, "ui-sortable-helper" );
23198			} else {
23199				this.currentItem.show();
23200			}
23201
23202			//Post deactivating events to containers
23203			for ( var i = this.containers.length - 1; i >= 0; i-- ) {
23204				this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
23205				if ( this.containers[ i ].containerCache.over ) {
23206					this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
23207					this.containers[ i ].containerCache.over = 0;
23208				}
23209			}
23210
23211		}
23212
23213		if ( this.placeholder ) {
23214
23215			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
23216			// it unbinds ALL events from the original node!
23217			if ( this.placeholder[ 0 ].parentNode ) {
23218				this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
23219			}
23220			if ( this.options.helper !== "original" && this.helper &&
23221					this.helper[ 0 ].parentNode ) {
23222				this.helper.remove();
23223			}
23224
23225			$.extend( this, {
23226				helper: null,
23227				dragging: false,
23228				reverting: false,
23229				_noFinalSort: null
23230			} );
23231
23232			if ( this.domPosition.prev ) {
23233				$( this.domPosition.prev ).after( this.currentItem );
23234			} else {
23235				$( this.domPosition.parent ).prepend( this.currentItem );
23236			}
23237		}
23238
23239		return this;
23240
23241	},
23242
23243	serialize: function( o ) {
23244
23245		var items = this._getItemsAsjQuery( o && o.connected ),
23246			str = [];
23247		o = o || {};
23248
23249		$( items ).each( function() {
23250			var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
23251				.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
23252			if ( res ) {
23253				str.push(
23254					( o.key || res[ 1 ] + "[]" ) +
23255					"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
23256			}
23257		} );
23258
23259		if ( !str.length && o.key ) {
23260			str.push( o.key + "=" );
23261		}
23262
23263		return str.join( "&" );
23264
23265	},
23266
23267	toArray: function( o ) {
23268
23269		var items = this._getItemsAsjQuery( o && o.connected ),
23270			ret = [];
23271
23272		o = o || {};
23273
23274		items.each( function() {
23275			ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
23276		} );
23277		return ret;
23278
23279	},
23280
23281	/* Be careful with the following core functions */
23282	_intersectsWith: function( item ) {
23283
23284		var x1 = this.positionAbs.left,
23285			x2 = x1 + this.helperProportions.width,
23286			y1 = this.positionAbs.top,
23287			y2 = y1 + this.helperProportions.height,
23288			l = item.left,
23289			r = l + item.width,
23290			t = item.top,
23291			b = t + item.height,
23292			dyClick = this.offset.click.top,
23293			dxClick = this.offset.click.left,
23294			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
23295				( y1 + dyClick ) < b ),
23296			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
23297				( x1 + dxClick ) < r ),
23298			isOverElement = isOverElementHeight && isOverElementWidth;
23299
23300		if ( this.options.tolerance === "pointer" ||
23301			this.options.forcePointerForContainers ||
23302			( this.options.tolerance !== "pointer" &&
23303				this.helperProportions[ this.floating ? "width" : "height" ] >
23304				item[ this.floating ? "width" : "height" ] )
23305		) {
23306			return isOverElement;
23307		} else {
23308
23309			return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
23310				x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
23311				t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
23312				y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
23313
23314		}
23315	},
23316
23317	_intersectsWithPointer: function( item ) {
23318		var verticalDirection, horizontalDirection,
23319			isOverElementHeight = ( this.options.axis === "x" ) ||
23320				this._isOverAxis(
23321					this.positionAbs.top + this.offset.click.top, item.top, item.height ),
23322			isOverElementWidth = ( this.options.axis === "y" ) ||
23323				this._isOverAxis(
23324					this.positionAbs.left + this.offset.click.left, item.left, item.width ),
23325			isOverElement = isOverElementHeight && isOverElementWidth;
23326
23327		if ( !isOverElement ) {
23328			return false;
vendor: 8,518 bytes, lines 23329-23603
23329		}
23330
23331		verticalDirection = this.dragDirection.vertical;
23332		horizontalDirection = this.dragDirection.horizontal;
23333
23334		return this.floating ?
23335			( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) :
23336			( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
23337
23338	},
23339
23340	_intersectsWithSides: function( item ) {
23341
23342		var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
23343				this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
23344			isOverRightHalf = this._isOverAxis( this.positionAbs.left +
23345				this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
23346			verticalDirection = this.dragDirection.vertical,
23347			horizontalDirection = this.dragDirection.horizontal;
23348
23349		if ( this.floating && horizontalDirection ) {
23350			return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
23351				( horizontalDirection === "left" && !isOverRightHalf ) );
23352		} else {
23353			return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
23354				( verticalDirection === "up" && !isOverBottomHalf ) );
23355		}
23356
23357	},
23358
23359	_getDragVerticalDirection: function() {
23360		var delta = this.positionAbs.top - this.lastPositionAbs.top;
23361		return delta !== 0 && ( delta > 0 ? "down" : "up" );
23362	},
23363
23364	_getDragHorizontalDirection: function() {
23365		var delta = this.positionAbs.left - this.lastPositionAbs.left;
23366		return delta !== 0 && ( delta > 0 ? "right" : "left" );
23367	},
23368
23369	refresh: function( event ) {
23370		this._refreshItems( event );
23371		this._setHandleClassName();
23372		this.refreshPositions();
23373		return this;
23374	},
23375
23376	_connectWith: function() {
23377		var options = this.options;
23378		return options.connectWith.constructor === String ?
23379			[ options.connectWith ] :
23380			options.connectWith;
23381	},
23382
23383	_getItemsAsjQuery: function( connected ) {
23384
23385		var i, j, cur, inst,
23386			items = [],
23387			queries = [],
23388			connectWith = this._connectWith();
23389
23390		if ( connectWith && connected ) {
23391			for ( i = connectWith.length - 1; i >= 0; i-- ) {
23392				cur = $( connectWith[ i ], this.document[ 0 ] );
23393				for ( j = cur.length - 1; j >= 0; j-- ) {
23394					inst = $.data( cur[ j ], this.widgetFullName );
23395					if ( inst && inst !== this && !inst.options.disabled ) {
23396						queries.push( [ typeof inst.options.items === "function" ?
23397							inst.options.items.call( inst.element ) :
23398							$( inst.options.items, inst.element )
23399								.not( ".ui-sortable-helper" )
23400								.not( ".ui-sortable-placeholder" ), inst ] );
23401					}
23402				}
23403			}
23404		}
23405
23406		queries.push( [ typeof this.options.items === "function" ?
23407			this.options.items
23408				.call( this.element, null, { options: this.options, item: this.currentItem } ) :
23409			$( this.options.items, this.element )
23410				.not( ".ui-sortable-helper" )
23411				.not( ".ui-sortable-placeholder" ), this ] );
23412
23413		function addItems() {
23414			items.push( this );
23415		}
23416		for ( i = queries.length - 1; i >= 0; i-- ) {
23417			queries[ i ][ 0 ].each( addItems );
23418		}
23419
23420		return $( items );
23421
23422	},
23423
23424	_removeCurrentsFromItems: function() {
23425
23426		var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
23427
23428		this.items = $.grep( this.items, function( item ) {
23429			for ( var j = 0; j < list.length; j++ ) {
23430				if ( list[ j ] === item.item[ 0 ] ) {
23431					return false;
23432				}
23433			}
23434			return true;
23435		} );
23436
23437	},
23438
23439	_refreshItems: function( event ) {
23440
23441		this.items = [];
23442		this.containers = [ this ];
23443
23444		var i, j, cur, inst, targetData, _queries, item, queriesLength,
23445			items = this.items,
23446			queries = [ [ typeof this.options.items === "function" ?
23447				this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
23448				$( this.options.items, this.element ), this ] ],
23449			connectWith = this._connectWith();
23450
23451		//Shouldn't be run the first time through due to massive slow-down
23452		if ( connectWith && this.ready ) {
23453			for ( i = connectWith.length - 1; i >= 0; i-- ) {
23454				cur = $( connectWith[ i ], this.document[ 0 ] );
23455				for ( j = cur.length - 1; j >= 0; j-- ) {
23456					inst = $.data( cur[ j ], this.widgetFullName );
23457					if ( inst && inst !== this && !inst.options.disabled ) {
23458						queries.push( [ typeof inst.options.items === "function" ?
23459							inst.options.items
23460								.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
23461							$( inst.options.items, inst.element ), inst ] );
23462						this.containers.push( inst );
23463					}
23464				}
23465			}
23466		}
23467
23468		for ( i = queries.length - 1; i >= 0; i-- ) {
23469			targetData = queries[ i ][ 1 ];
23470			_queries = queries[ i ][ 0 ];
23471
23472			for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
23473				item = $( _queries[ j ] );
23474
23475				// Data for target checking (mouse manager)
23476				item.data( this.widgetName + "-item", targetData );
23477
23478				items.push( {
23479					item: item,
23480					instance: targetData,
23481					width: 0, height: 0,
23482					left: 0, top: 0
23483				} );
23484			}
23485		}
23486
23487	},
23488
23489	_refreshItemPositions: function( fast ) {
23490		var i, item, t, p;
23491
23492		for ( i = this.items.length - 1; i >= 0; i-- ) {
23493			item = this.items[ i ];
23494
23495			//We ignore calculating positions of all connected containers when we're not over them
23496			if ( this.currentContainer && item.instance !== this.currentContainer &&
23497					item.item[ 0 ] !== this.currentItem[ 0 ] ) {
23498				continue;
23499			}
23500
23501			t = this.options.toleranceElement ?
23502				$( this.options.toleranceElement, item.item ) :
23503				item.item;
23504
23505			if ( !fast ) {
23506				item.width = t.outerWidth();
23507				item.height = t.outerHeight();
23508			}
23509
23510			p = t.offset();
23511			item.left = p.left;
23512			item.top = p.top;
23513		}
23514	},
23515
23516	refreshPositions: function( fast ) {
23517
23518		// Determine whether items are being displayed horizontally
23519		this.floating = this.items.length ?
23520			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
23521			false;
23522
23523		// This has to be redone because due to the item being moved out/into the offsetParent,
23524		// the offsetParent's position will change
23525		if ( this.offsetParent && this.helper ) {
23526			this.offset.parent = this._getParentOffset();
23527		}
23528
23529		this._refreshItemPositions( fast );
23530
23531		var i, p;
23532
23533		if ( this.options.custom && this.options.custom.refreshContainers ) {
23534			this.options.custom.refreshContainers.call( this );
23535		} else {
23536			for ( i = this.containers.length - 1; i >= 0; i-- ) {
23537				p = this.containers[ i ].element.offset();
23538				this.containers[ i ].containerCache.left = p.left;
23539				this.containers[ i ].containerCache.top = p.top;
23540				this.containers[ i ].containerCache.width =
23541					this.containers[ i ].element.outerWidth();
23542				this.containers[ i ].containerCache.height =
23543					this.containers[ i ].element.outerHeight();
23544			}
23545		}
23546
23547		return this;
23548	},
23549
23550	_createPlaceholder: function( that ) {
23551		that = that || this;
23552		var className, nodeName,
23553			o = that.options;
23554
23555		if ( !o.placeholder || o.placeholder.constructor === String ) {
23556			className = o.placeholder;
23557			nodeName = that.currentItem[ 0 ].nodeName.toLowerCase();
23558			o.placeholder = {
23559				element: function() {
23560
23561					var element = $( "<" + nodeName + ">", that.document[ 0 ] );
23562
23563					that._addClass( element, "ui-sortable-placeholder",
23564							className || that.currentItem[ 0 ].className )
23565						._removeClass( element, "ui-sortable-helper" );
23566
23567					if ( nodeName === "tbody" ) {
23568						that._createTrPlaceholder(
23569							that.currentItem.find( "tr" ).eq( 0 ),
23570							$( "<tr>", that.document[ 0 ] ).appendTo( element )
23571						);
23572					} else if ( nodeName === "tr" ) {
23573						that._createTrPlaceholder( that.currentItem, element );
23574					} else if ( nodeName === "img" ) {
23575						element.attr( "src", that.currentItem.attr( "src" ) );
23576					}
23577
23578					if ( !className ) {
23579						element.css( "visibility", "hidden" );
23580					}
23581
23582					return element;
23583				},
23584				update: function( container, p ) {
23585
23586					// 1. If a className is set as 'placeholder option, we don't force sizes -
23587					// the class is responsible for that
23588					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
23589					// class name is specified
23590					if ( className && !o.forcePlaceholderSize ) {
23591						return;
23592					}
23593
23594					// If the element doesn't have a actual height or width by itself (without
23595					// styles coming from a stylesheet), it receives the inline height and width
23596					// from the dragged item. Or, if it's a tbody or tr, it's going to have a height
23597					// anyway since we're populating them with <td>s above, but they're unlikely to
23598					// be the correct height on their own if the row heights are dynamic, so we'll
23599					// always assign the height of the dragged item given forcePlaceholderSize
23600					// is true.
23601					if ( !p.height() || ( o.forcePlaceholderSize &&
23602							( nodeName === "tbody" || nodeName === "tr" ) ) ) {
23603						p.height(
vendor: 10,010 bytes, lines 23604-23909
23604							that.currentItem.innerHeight() -
23605							parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
23606							parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
23607					}
23608					if ( !p.width() ) {
23609						p.width(
23610							that.currentItem.innerWidth() -
23611							parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
23612							parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
23613					}
23614				}
23615			};
23616		}
23617
23618		//Create the placeholder
23619		that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
23620
23621		//Append it after the actual current item
23622		that.currentItem.after( that.placeholder );
23623
23624		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
23625		o.placeholder.update( that, that.placeholder );
23626
23627	},
23628
23629	_createTrPlaceholder: function( sourceTr, targetTr ) {
23630		var that = this;
23631
23632		sourceTr.children().each( function() {
23633			$( "<td>&#160;</td>", that.document[ 0 ] )
23634				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
23635				.appendTo( targetTr );
23636		} );
23637	},
23638
23639	_contactContainers: function( event ) {
23640		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
23641			floating, axis,
23642			innermostContainer = null,
23643			innermostIndex = null;
23644
23645		// Get innermost container that intersects with item
23646		for ( i = this.containers.length - 1; i >= 0; i-- ) {
23647
23648			// Never consider a container that's located within the item itself
23649			if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
23650				continue;
23651			}
23652
23653			if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
23654
23655				// If we've already found a container and it's more "inner" than this, then continue
23656				if ( innermostContainer &&
23657						$.contains(
23658							this.containers[ i ].element[ 0 ],
23659							innermostContainer.element[ 0 ] ) ) {
23660					continue;
23661				}
23662
23663				innermostContainer = this.containers[ i ];
23664				innermostIndex = i;
23665
23666			} else {
23667
23668				// container doesn't intersect. trigger "out" event if necessary
23669				if ( this.containers[ i ].containerCache.over ) {
23670					this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
23671					this.containers[ i ].containerCache.over = 0;
23672				}
23673			}
23674
23675		}
23676
23677		// If no intersecting containers found, return
23678		if ( !innermostContainer ) {
23679			return;
23680		}
23681
23682		// Move the item into the container if it's not there already
23683		if ( this.containers.length === 1 ) {
23684			if ( !this.containers[ innermostIndex ].containerCache.over ) {
23685				this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
23686				this.containers[ innermostIndex ].containerCache.over = 1;
23687			}
23688		} else {
23689
23690			// When entering a new container, we will find the item with the least distance and
23691			// append our item near it
23692			dist = 10000;
23693			itemWithLeastDistance = null;
23694			floating = innermostContainer.floating || this._isFloating( this.currentItem );
23695			posProperty = floating ? "left" : "top";
23696			sizeProperty = floating ? "width" : "height";
23697			axis = floating ? "pageX" : "pageY";
23698
23699			for ( j = this.items.length - 1; j >= 0; j-- ) {
23700				if ( !$.contains(
23701						this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
23702				) {
23703					continue;
23704				}
23705				if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
23706					continue;
23707				}
23708
23709				cur = this.items[ j ].item.offset()[ posProperty ];
23710				nearBottom = false;
23711				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
23712					nearBottom = true;
23713				}
23714
23715				if ( Math.abs( event[ axis ] - cur ) < dist ) {
23716					dist = Math.abs( event[ axis ] - cur );
23717					itemWithLeastDistance = this.items[ j ];
23718					this.direction = nearBottom ? "up" : "down";
23719				}
23720			}
23721
23722			//Check if dropOnEmpty is enabled
23723			if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
23724				return;
23725			}
23726
23727			if ( this.currentContainer === this.containers[ innermostIndex ] ) {
23728				if ( !this.currentContainer.containerCache.over ) {
23729					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
23730					this.currentContainer.containerCache.over = 1;
23731				}
23732				return;
23733			}
23734
23735			if ( itemWithLeastDistance ) {
23736				this._rearrange( event, itemWithLeastDistance, null, true );
23737			} else {
23738				this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
23739			}
23740			this._trigger( "change", event, this._uiHash() );
23741			this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
23742			this.currentContainer = this.containers[ innermostIndex ];
23743
23744			//Update the placeholder
23745			this.options.placeholder.update( this.currentContainer, this.placeholder );
23746
23747			//Update scrollParent
23748			this.scrollParent = this.placeholder.scrollParent();
23749
23750			//Update overflowOffset
23751			if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23752					this.scrollParent[ 0 ].tagName !== "HTML" ) {
23753				this.overflowOffset = this.scrollParent.offset();
23754			}
23755
23756			this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
23757			this.containers[ innermostIndex ].containerCache.over = 1;
23758		}
23759
23760	},
23761
23762	_createHelper: function( event ) {
23763
23764		var o = this.options,
23765			helper = typeof o.helper === "function" ?
23766				$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
23767				( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
23768
23769		//Add the helper to the DOM if that didn't happen already
23770		if ( !helper.parents( "body" ).length ) {
23771			this.appendTo[ 0 ].appendChild( helper[ 0 ] );
23772		}
23773
23774		if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
23775			this._storedCSS = {
23776				width: this.currentItem[ 0 ].style.width,
23777				height: this.currentItem[ 0 ].style.height,
23778				position: this.currentItem.css( "position" ),
23779				top: this.currentItem.css( "top" ),
23780				left: this.currentItem.css( "left" )
23781			};
23782		}
23783
23784		if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
23785			helper.width( this.currentItem.width() );
23786		}
23787		if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
23788			helper.height( this.currentItem.height() );
23789		}
23790
23791		return helper;
23792
23793	},
23794
23795	_adjustOffsetFromHelper: function( obj ) {
23796		if ( typeof obj === "string" ) {
23797			obj = obj.split( " " );
23798		}
23799		if ( Array.isArray( obj ) ) {
23800			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
23801		}
23802		if ( "left" in obj ) {
23803			this.offset.click.left = obj.left + this.margins.left;
23804		}
23805		if ( "right" in obj ) {
23806			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
23807		}
23808		if ( "top" in obj ) {
23809			this.offset.click.top = obj.top + this.margins.top;
23810		}
23811		if ( "bottom" in obj ) {
23812			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
23813		}
23814	},
23815
23816	_getParentOffset: function() {
23817
23818		//Get the offsetParent and cache its position
23819		this.offsetParent = this.helper.offsetParent();
23820		var po = this.offsetParent.offset();
23821
23822		// This is a special case where we need to modify a offset calculated on start, since the
23823		// following happened:
23824		// 1. The position of the helper is absolute, so it's position is calculated based on the
23825		// next positioned parent
23826		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
23827		// the document, which means that the scroll is included in the initial calculation of the
23828		// offset of the parent, and never recalculated upon drag
23829		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23830				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
23831			po.left += this.scrollParent.scrollLeft();
23832			po.top += this.scrollParent.scrollTop();
23833		}
23834
23835		// This needs to be actually done for all browsers, since pageX/pageY includes
23836		// this information.
23837		if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ) {
23838			po = { top: 0, left: 0 };
23839		}
23840
23841		return {
23842			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
23843			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
23844		};
23845
23846	},
23847
23848	_getRelativeOffset: function() {
23849
23850		if ( this.cssPosition === "relative" ) {
23851			var p = this.currentItem.position();
23852			return {
23853				top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
23854					this.scrollParent.scrollTop(),
23855				left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
23856					this.scrollParent.scrollLeft()
23857			};
23858		} else {
23859			return { top: 0, left: 0 };
23860		}
23861
23862	},
23863
23864	_cacheMargins: function() {
23865		this.margins = {
23866			left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
23867			top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
23868		};
23869	},
23870
23871	_cacheHelperProportions: function() {
23872		this.helperProportions = {
23873			width: this.helper.outerWidth(),
23874			height: this.helper.outerHeight()
23875		};
23876	},
23877
23878	_setContainment: function() {
23879
23880		var ce, co, over,
23881			o = this.options;
23882		if ( o.containment === "parent" ) {
23883			o.containment = this.helper[ 0 ].parentNode;
23884		}
23885		if ( o.containment === "document" || o.containment === "window" ) {
23886			this.containment = [
23887				0 - this.offset.relative.left - this.offset.parent.left,
23888				0 - this.offset.relative.top - this.offset.parent.top,
23889				o.containment === "document" ?
23890					this.document.width() :
23891					this.window.width() - this.helperProportions.width - this.margins.left,
23892				( o.containment === "document" ?
23893					( this.document.height() || document.body.parentNode.scrollHeight ) :
23894					this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
23895				) - this.helperProportions.height - this.margins.top
23896			];
23897		}
23898
23899		if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
23900			ce = $( o.containment )[ 0 ];
23901			co = $( o.containment ).offset();
23902			over = ( $( ce ).css( "overflow" ) !== "hidden" );
23903
23904			this.containment = [
23905				co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
23906					( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
23907				co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
23908					( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
23909				co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) 
vendor: 1,747 bytes, lines 23909-23961
23909: ce.offsetWidth ) -
23910					( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
23911					( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
23912					this.helperProportions.width - this.margins.left,
23913				co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
23914					( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
23915					( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
23916					this.helperProportions.height - this.margins.top
23917			];
23918		}
23919
23920	},
23921
23922	_convertPositionTo: function( d, pos ) {
23923
23924		if ( !pos ) {
23925			pos = this.position;
23926		}
23927		var mod = d === "absolute" ? 1 : -1,
23928			scroll = this.cssPosition === "absolute" &&
23929				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23930				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
23931					this.offsetParent :
23932					this.scrollParent,
23933			scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
23934
23935		return {
23936			top: (
23937
23938				// The absolute mouse position
23939				pos.top	+
23940
23941				// Only for relative positioned nodes: Relative offset from element to offset parent
23942				this.offset.relative.top * mod +
23943
23944				// The offsetParent's offset without borders (offset + border)
23945				this.offset.parent.top * mod -
23946				( ( this.cssPosition === "fixed" ?
23947					-this.scrollParent.scrollTop() :
23948					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
23949			),
23950			left: (
23951
23952				// The absolute mouse position
23953				pos.left +
23954
23955				// Only for relative positioned nodes: Relative offset from element to offset parent
23956				this.offset.relative.left * mod +
23957
23958				// The offsetParent's offset without borders (offset + border)
23959				this.offset.parent.left * mod	-
23960				( ( this.cssPosition === "fixed" ?
23961					-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
vendor: 4,632 bytes, lines 23962-24105
23962					scroll.scrollLeft() ) * mod )
23963			)
23964		};
23965
23966	},
23967
23968	_generatePosition: function( event ) {
23969
23970		var top, left,
23971			o = this.options,
23972			pageX = event.pageX,
23973			pageY = event.pageY,
23974			scroll = this.cssPosition === "absolute" &&
23975				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23976				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
23977					this.offsetParent :
23978					this.scrollParent,
23979				scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
23980
23981		// This is another very weird special case that only happens for relative elements:
23982		// 1. If the css position is relative
23983		// 2. and the scroll parent is the document or similar to the offset parent
23984		// we have to refresh the relative offset during the scroll so there are no jumps
23985		if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
23986				this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
23987			this.offset.relative = this._getRelativeOffset();
23988		}
23989
23990		/*
23991		 * - Position constraining -
23992		 * Constrain the position to a mix of grid, containment.
23993		 */
23994
23995		if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
23996
23997			if ( this.containment ) {
23998				if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
23999					pageX = this.containment[ 0 ] + this.offset.click.left;
24000				}
24001				if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
24002					pageY = this.containment[ 1 ] + this.offset.click.top;
24003				}
24004				if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
24005					pageX = this.containment[ 2 ] + this.offset.click.left;
24006				}
24007				if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
24008					pageY = this.containment[ 3 ] + this.offset.click.top;
24009				}
24010			}
24011
24012			if ( o.grid ) {
24013				top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
24014					o.grid[ 1 ] ) * o.grid[ 1 ];
24015				pageY = this.containment ?
24016					( ( top - this.offset.click.top >= this.containment[ 1 ] &&
24017						top - this.offset.click.top <= this.containment[ 3 ] ) ?
24018							top :
24019							( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
24020								top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
24021								top;
24022
24023				left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
24024					o.grid[ 0 ] ) * o.grid[ 0 ];
24025				pageX = this.containment ?
24026					( ( left - this.offset.click.left >= this.containment[ 0 ] &&
24027						left - this.offset.click.left <= this.containment[ 2 ] ) ?
24028							left :
24029							( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
24030								left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
24031								left;
24032			}
24033
24034		}
24035
24036		return {
24037			top: (
24038
24039				// The absolute mouse position
24040				pageY -
24041
24042				// Click offset (relative to the element)
24043				this.offset.click.top -
24044
24045				// Only for relative positioned nodes: Relative offset from element to offset parent
24046				this.offset.relative.top -
24047
24048				// The offsetParent's offset without borders (offset + border)
24049				this.offset.parent.top +
24050				( ( this.cssPosition === "fixed" ?
24051					-this.scrollParent.scrollTop() :
24052					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
24053			),
24054			left: (
24055
24056				// The absolute mouse position
24057				pageX -
24058
24059				// Click offset (relative to the element)
24060				this.offset.click.left -
24061
24062				// Only for relative positioned nodes: Relative offset from element to offset parent
24063				this.offset.relative.left -
24064
24065				// The offsetParent's offset without borders (offset + border)
24066				this.offset.parent.left +
24067				( ( this.cssPosition === "fixed" ?
24068					-this.scrollParent.scrollLeft() :
24069					scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
24070			)
24071		};
24072
24073	},
24074
24075	_rearrange: function( event, i, a, hardRefresh ) {
24076
24077		if ( a ) {
24078			a[ 0 ].appendChild( this.placeholder[ 0 ] );
24079		} else {
24080			i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
24081				( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
24082		}
24083
24084		//Various things done here to improve the performance:
24085		// 1. we create a setTimeout, that calls refreshPositions
24086		// 2. on the instance, we have a counter variable, that get's higher after every append
24087		// 3. on the local scope, we copy the counter variable, and check in the timeout,
24088		// if it's still the same
24089		// 4. this lets only the last addition to the timeout stack through
24090		this.counter = this.counter ? ++this.counter : 1;
24091		var counter = this.counter;
24092
24093		this._delay( function() {
24094			if ( counter === this.counter ) {
24095
24096				//Precompute after each DOM insertion, NOT on mousemove
24097				this.refreshPositions( !hardRefresh );
24098			}
24099		} );
24100
24101	},
24102
24103	_clear: function( event, noPropagation ) {
24104
24105		this.reverting = false;
vendor: 4,255 bytes, lines 24106-24250
24106
24107		// We delay all events that have to be triggered to after the point where the placeholder
24108		// has been removed and everything else normalized again
24109		var i,
24110			delayedTriggers = [];
24111
24112		// We first have to update the dom position of the actual currentItem
24113		// Note: don't do it if the current item is already removed (by a user), or it gets
24114		// reappended (see #4088)
24115		if ( !this._noFinalSort && this.currentItem.parent().length ) {
24116			this.placeholder.before( this.currentItem );
24117		}
24118		this._noFinalSort = null;
24119
24120		if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
24121			for ( i in this._storedCSS ) {
24122				if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
24123					this._storedCSS[ i ] = "";
24124				}
24125			}
24126			this.currentItem.css( this._storedCSS );
24127			this._removeClass( this.currentItem, "ui-sortable-helper" );
24128		} else {
24129			this.currentItem.show();
24130		}
24131
24132		if ( this.fromOutside && !noPropagation ) {
24133			delayedTriggers.push( function( event ) {
24134				this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
24135			} );
24136		}
24137		if ( ( this.fromOutside ||
24138				this.domPosition.prev !==
24139				this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
24140				this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {
24141
24142			// Trigger update callback if the DOM position has changed
24143			delayedTriggers.push( function( event ) {
24144				this._trigger( "update", event, this._uiHash() );
24145			} );
24146		}
24147
24148		// Check if the items Container has Changed and trigger appropriate
24149		// events.
24150		if ( this !== this.currentContainer ) {
24151			if ( !noPropagation ) {
24152				delayedTriggers.push( function( event ) {
24153					this._trigger( "remove", event, this._uiHash() );
24154				} );
24155				delayedTriggers.push( ( function( c ) {
24156					return function( event ) {
24157						c._trigger( "receive", event, this._uiHash( this ) );
24158					};
24159				} ).call( this, this.currentContainer ) );
24160				delayedTriggers.push( ( function( c ) {
24161					return function( event ) {
24162						c._trigger( "update", event, this._uiHash( this ) );
24163					};
24164				} ).call( this, this.currentContainer ) );
24165			}
24166		}
24167
24168		//Post events to containers
24169		function delayEvent( type, instance, container ) {
24170			return function( event ) {
24171				container._trigger( type, event, instance._uiHash( instance ) );
24172			};
24173		}
24174		for ( i = this.containers.length - 1; i >= 0; i-- ) {
24175			if ( !noPropagation ) {
24176				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
24177			}
24178			if ( this.containers[ i ].containerCache.over ) {
24179				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
24180				this.containers[ i ].containerCache.over = 0;
24181			}
24182		}
24183
24184		//Do what was originally in plugins
24185		if ( this._storedStylesheet ) {
24186			this._storedStylesheet.remove();
24187			this._storedStylesheet = null;
24188		}
24189		if ( this._storedOpacity ) {
24190			this.helper.css( "opacity", this._storedOpacity );
24191		}
24192		if ( this._storedZIndex ) {
24193			this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
24194		}
24195
24196		this.dragging = false;
24197
24198		if ( !noPropagation ) {
24199			this._trigger( "beforeStop", event, this._uiHash() );
24200		}
24201
24202		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
24203		// it unbinds ALL events from the original node!
24204		this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
24205
24206		if ( !this.cancelHelperRemoval ) {
24207			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
24208				this.helper.remove();
24209			}
24210			this.helper = null;
24211		}
24212
24213		if ( !noPropagation ) {
24214			for ( i = 0; i < delayedTriggers.length; i++ ) {
24215
24216				// Trigger all delayed events
24217				delayedTriggers[ i ].call( this, event );
24218			}
24219			this._trigger( "stop", event, this._uiHash() );
24220		}
24221
24222		this.fromOutside = false;
24223		return !this.cancelHelperRemoval;
24224
24225	},
24226
24227	_trigger: function() {
24228		if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
24229			this.cancel();
24230		}
24231	},
24232
24233	_uiHash: function( _inst ) {
24234		var inst = _inst || this;
24235		return {
24236			helper: inst.helper,
24237			placeholder: inst.placeholder || $( [] ),
24238			position: inst.position,
24239			originalPosition: inst.originalPosition,
24240			offset: inst.positionAbs,
24241			item: inst.currentItem,
24242			sender: _inst ? _inst.element : null
24243		};
24244	}
24245
24246} );
24247
24248
24249/*!
24250 * jQuery UI Spinner 1.14.
vendor: 3,301 bytes, lines 24250-24387
242501
24251 * https://jqueryui.com
24252 *
24253 * Copyright OpenJS Foundation and other contributors
24254 * Released under the MIT license.
24255 * https://jquery.org/license
24256 */
24257
24258//>>label: Spinner
24259//>>group: Widgets
24260//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
24261//>>docs: https://api.jqueryui.com/spinner/
24262//>>demos: https://jqueryui.com/spinner/
24263//>>css.structure: ../../themes/base/core.css
24264//>>css.structure: ../../themes/base/spinner.css
24265//>>css.theme: ../../themes/base/theme.css
24266
24267
24268function spinnerModifier( fn ) {
24269	return function() {
24270		var previous = this.element.val();
24271		fn.apply( this, arguments );
24272		this._refresh();
24273		if ( previous !== this.element.val() ) {
24274			this._trigger( "change" );
24275		}
24276	};
24277}
24278
24279$.widget( "ui.spinner", {
24280	version: "1.14.1",
24281	defaultElement: "<input>",
24282	widgetEventPrefix: "spin",
24283	options: {
24284		classes: {
24285			"ui-spinner": "ui-corner-all",
24286			"ui-spinner-down": "ui-corner-br",
24287			"ui-spinner-up": "ui-corner-tr"
24288		},
24289		culture: null,
24290		icons: {
24291			down: "ui-icon-triangle-1-s",
24292			up: "ui-icon-triangle-1-n"
24293		},
24294		incremental: true,
24295		max: null,
24296		min: null,
24297		numberFormat: null,
24298		page: 10,
24299		step: 1,
24300
24301		change: null,
24302		spin: null,
24303		start: null,
24304		stop: null
24305	},
24306
24307	_create: function() {
24308
24309		// handle string values that need to be parsed
24310		this._setOption( "max", this.options.max );
24311		this._setOption( "min", this.options.min );
24312		this._setOption( "step", this.options.step );
24313
24314		// Only format if there is a value, prevents the field from being marked
24315		// as invalid in Firefox, see #9573.
24316		if ( this.value() !== "" ) {
24317
24318			// Format the value, but don't constrain.
24319			this._value( this.element.val(), true );
24320		}
24321
24322		this._draw();
24323		this._on( this._events );
24324		this._refresh();
24325
24326		// Turning off autocomplete prevents the browser from remembering the
24327		// value when navigating through history, so we re-enable autocomplete
24328		// if the page is unloaded before the widget is destroyed. #7790
24329		this._on( this.window, {
24330			beforeunload: function() {
24331				this.element.removeAttr( "autocomplete" );
24332			}
24333		} );
24334	},
24335
24336	_getCreateOptions: function() {
24337		var options = this._super();
24338		var element = this.element;
24339
24340		$.each( [ "min", "max", "step" ], function( i, option ) {
24341			var value = element.attr( option );
24342			if ( value != null && value.length ) {
24343				options[ option ] = value;
24344			}
24345		} );
24346
24347		return options;
24348	},
24349
24350	_events: {
24351		keydown: function( event ) {
24352			if ( this._start( event ) && this._keydown( event ) ) {
24353				event.preventDefault();
24354			}
24355		},
24356		keyup: "_stop",
24357		focus: function() {
24358			this.previous = this.element.val();
24359		},
24360		blur: function( event ) {
24361			this._stop();
24362			this._refresh();
24363			if ( this.previous !== this.element.val() ) {
24364				this._trigger( "change", event );
24365			}
24366		},
24367		mousewheel: function( event, delta ) {
24368			var activeElement = this.document[ 0 ].activeElement;
24369			var isActive = this.element[ 0 ] === activeElement;
24370
24371			if ( !isActive || !delta ) {
24372				return;
24373			}
24374
24375			if ( !this.spinning && !this._start( event ) ) {
24376				return false;
24377			}
24378
24379			this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
24380			clearTimeout( this.mousewheelTimer );
24381			this.mousewheelTimer = this._delay( function() {
24382				if ( this.spinning ) {
24383					this._stop( event );
24384				}
24385			}, 100 );
24386			event.preventDefault();
24387		},
vendor: 10,099 bytes, lines 24387-24789
24387
24388		"mousedown .ui-spinner-button": function( event ) {
24389			var previous;
24390
24391			// We never want the buttons to have focus; whenever the user is
24392			// interacting with the spinner, the focus should be on the input.
24393			// If the input is focused then this.previous is properly set from
24394			// when the input first received focus. If the input is not focused
24395			// then we need to set this.previous based on the value before spinning.
24396			previous = this.element[ 0 ] === this.document[ 0 ].activeElement ?
24397				this.previous : this.element.val();
24398			function checkFocus() {
24399				var isActive = this.element[ 0 ] === this.document[ 0 ].activeElement;
24400				if ( !isActive ) {
24401					this.element.trigger( "focus" );
24402					this.previous = previous;
24403				}
24404			}
24405
24406			// Ensure focus is on (or stays on) the text field
24407			event.preventDefault();
24408			checkFocus.call( this );
24409
24410			if ( this._start( event ) === false ) {
24411				return;
24412			}
24413
24414			this._repeat( null, $( event.currentTarget )
24415				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
24416		},
24417		"mouseup .ui-spinner-button": "_stop",
24418		"mouseenter .ui-spinner-button": function( event ) {
24419
24420			// button will add ui-state-active if mouse was down while mouseleave and kept down
24421			if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
24422				return;
24423			}
24424
24425			if ( this._start( event ) === false ) {
24426				return false;
24427			}
24428			this._repeat( null, $( event.currentTarget )
24429				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
24430		},
24431
24432		// TODO: do we really want to consider this a stop?
24433		// shouldn't we just stop the repeater and wait until mouseup before
24434		// we trigger the stop event?
24435		"mouseleave .ui-spinner-button": "_stop"
24436	},
24437
24438	// Support mobile enhanced option and make backcompat more sane
24439	_enhance: function() {
24440		this.uiSpinner = this.element
24441			.attr( "autocomplete", "off" )
24442			.wrap( "<span>" )
24443			.parent()
24444
24445				// Add buttons
24446				.append(
24447					"<a></a><a></a>"
24448				);
24449	},
24450
24451	_draw: function() {
24452		this._enhance();
24453
24454		this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
24455		this._addClass( "ui-spinner-input" );
24456
24457		this.element.attr( "role", "spinbutton" );
24458
24459		// Button bindings
24460		this.buttons = this.uiSpinner.children( "a" )
24461			.attr( "tabIndex", -1 )
24462			.attr( "aria-hidden", true )
24463			.button( {
24464				classes: {
24465					"ui-button": ""
24466				}
24467			} );
24468
24469		// TODO: Right now button does not support classes this is already updated in button PR
24470		this._removeClass( this.buttons, "ui-corner-all" );
24471
24472		this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
24473		this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
24474		this.buttons.first().button( {
24475			"icon": this.options.icons.up,
24476			"showLabel": false
24477		} );
24478		this.buttons.last().button( {
24479			"icon": this.options.icons.down,
24480			"showLabel": false
24481		} );
24482
24483		// IE 6 doesn't understand height: 50% for the buttons
24484		// unless the wrapper has an explicit height
24485		if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
24486				this.uiSpinner.height() > 0 ) {
24487			this.uiSpinner.height( this.uiSpinner.height() );
24488		}
24489	},
24490
24491	_keydown: function( event ) {
24492		var options = this.options,
24493			keyCode = $.ui.keyCode;
24494
24495		switch ( event.keyCode ) {
24496		case keyCode.UP:
24497			this._repeat( null, 1, event );
24498			return true;
24499		case keyCode.DOWN:
24500			this._repeat( null, -1, event );
24501			return true;
24502		case keyCode.PAGE_UP:
24503			this._repeat( null, options.page, event );
24504			return true;
24505		case keyCode.PAGE_DOWN:
24506			this._repeat( null, -options.page, event );
24507			return true;
24508		}
24509
24510		return false;
24511	},
24512
24513	_start: function( event ) {
24514		if ( !this.spinning && this._trigger( "start", event ) === false ) {
24515			return false;
24516		}
24517
24518		if ( !this.counter ) {
24519			this.counter = 1;
24520		}
24521		this.spinning = true;
24522		return true;
24523	},
24524
24525	_repeat: function( i, steps, event ) {
24526		i = i || 500;
24527
24528		clearTimeout( this.timer );
24529		this.timer = this._delay( function() {
24530			this._repeat( 40, steps, event );
24531		}, i );
24532
24533		this._spin( steps * this.options.step, event );
24534	},
24535
24536	_spin: function( step, event ) {
24537		var value = this.value() || 0;
24538
24539		if ( !this.counter ) {
24540			this.counter = 1;
24541		}
24542
24543		value = this._adjustValue( value + step * this._increment( this.counter ) );
24544
24545		if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
24546			this._value( value );
24547			this.counter++;
24548		}
24549	},
24550
24551	_increment: function( i ) {
24552		var incremental = this.options.incremental;
24553
24554		if ( incremental ) {
24555			return typeof incremental === "function" ?
24556				incremental( i ) :
24557				Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
24558		}
24559
24560		return 1;
24561	},
24562
24563	_precision: function() {
24564		var precision = this._precisionOf( this.options.step );
24565		if ( this.options.min !== null ) {
24566			precision = Math.max( precision, this._precisionOf( this.options.min ) );
24567		}
24568		return precision;
24569	},
24570
24571	_precisionOf: function( num ) {
24572		var str = num.toString(),
24573			decimal = str.indexOf( "." );
24574		return decimal === -1 ? 0 : str.length - decimal - 1;
24575	},
24576
24577	_adjustValue: function( value ) {
24578		var base, aboveMin,
24579			options = this.options;
24580
24581		// Make sure we're at a valid step
24582		// - find out where we are relative to the base (min or 0)
24583		base = options.min !== null ? options.min : 0;
24584		aboveMin = value - base;
24585
24586		// - round to the nearest step
24587		aboveMin = Math.round( aboveMin / options.step ) * options.step;
24588
24589		// - rounding is based on 0, so adjust back to our base
24590		value = base + aboveMin;
24591
24592		// Fix precision from bad JS floating point math
24593		value = parseFloat( value.toFixed( this._precision() ) );
24594
24595		// Clamp the value
24596		if ( options.max !== null && value > options.max ) {
24597			return options.max;
24598		}
24599		if ( options.min !== null && value < options.min ) {
24600			return options.min;
24601		}
24602
24603		return value;
24604	},
24605
24606	_stop: function( event ) {
24607		if ( !this.spinning ) {
24608			return;
24609		}
24610
24611		clearTimeout( this.timer );
24612		clearTimeout( this.mousewheelTimer );
24613		this.counter = 0;
24614		this.spinning = false;
24615		this._trigger( "stop", event );
24616	},
24617
24618	_setOption: function( key, value ) {
24619		var prevValue, first, last;
24620
24621		if ( key === "culture" || key === "numberFormat" ) {
24622			prevValue = this._parse( this.element.val() );
24623			this.options[ key ] = value;
24624			this.element.val( this._format( prevValue ) );
24625			return;
24626		}
24627
24628		if ( key === "max" || key === "min" || key === "step" ) {
24629			if ( typeof value === "string" ) {
24630				value = this._parse( value );
24631			}
24632		}
24633		if ( key === "icons" ) {
24634			first = this.buttons.first().find( ".ui-icon" );
24635			this._removeClass( first, null, this.options.icons.up );
24636			this._addClass( first, null, value.up );
24637			last = this.buttons.last().find( ".ui-icon" );
24638			this._removeClass( last, null, this.options.icons.down );
24639			this._addClass( last, null, value.down );
24640		}
24641
24642		this._super( key, value );
24643	},
24644
24645	_setOptionDisabled: function( value ) {
24646		this._super( value );
24647
24648		this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
24649		this.element.prop( "disabled", !!value );
24650		this.buttons.button( value ? "disable" : "enable" );
24651	},
24652
24653	_setOptions: spinnerModifier( function( options ) {
24654		this._super( options );
24655	} ),
24656
24657	_parse: function( val ) {
24658		if ( typeof val === "string" && val !== "" ) {
24659			val = window.Globalize && this.options.numberFormat ?
24660				Globalize.parseFloat( val, 10, this.options.culture ) : +val;
24661		}
24662		return val === "" || isNaN( val ) ? null : val;
24663	},
24664
24665	_format: function( value ) {
24666		if ( value === "" ) {
24667			return "";
24668		}
24669		return window.Globalize && this.options.numberFormat ?
24670			Globalize.format( value, this.options.numberFormat, this.options.culture ) :
24671			value;
24672	},
24673
24674	_refresh: function() {
24675		this.element.attr( {
24676			"aria-valuemin": this.options.min,
24677			"aria-valuemax": this.options.max,
24678
24679			// TODO: what should we do with values that can't be parsed?
24680			"aria-valuenow": this._parse( this.element.val() )
24681		} );
24682	},
24683
24684	isValid: function() {
24685		var value = this.value();
24686
24687		// Null is invalid
24688		if ( value === null ) {
24689			return false;
24690		}
24691
24692		// If value gets adjusted, it's invalid
24693		return value === this._adjustValue( value );
24694	},
24695
24696	// Update the value without triggering change
24697	_value: function( value, allowAny ) {
24698		var parsed;
24699		if ( value !== "" ) {
24700			parsed = this._parse( value );
24701			if ( parsed !== null ) {
24702				if ( !allowAny ) {
24703					parsed = this._adjustValue( parsed );
24704				}
24705				value = this._format( parsed );
24706			}
24707		}
24708		this.element.val( value );
24709		this._refresh();
24710	},
24711
24712	_destroy: function() {
24713		this.element
24714			.prop( "disabled", false )
24715			.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );
24716
24717		this.uiSpinner.replaceWith( this.element );
24718	},
24719
24720	stepUp: spinnerModifier( function( steps ) {
24721		this._stepUp( steps );
24722	} ),
24723	_stepUp: function( steps ) {
24724		if ( this._start() ) {
24725			this._spin( ( steps || 1 ) * this.options.step );
24726			this._stop();
24727		}
24728	},
24729
24730	stepDown: spinnerModifier( function( steps ) {
24731		this._stepDown( steps );
24732	} ),
24733	_stepDown: function( steps ) {
24734		if ( this._start() ) {
24735			this._spin( ( steps || 1 ) * -this.options.step );
24736			this._stop();
24737		}
24738	},
24739
24740	pageUp: spinnerModifier( function( pages ) {
24741		this._stepUp( ( pages || 1 ) * this.options.page );
24742	} ),
24743
24744	pageDown: spinnerModifier( function( pages ) {
24745		this._stepDown( ( pages || 1 ) * this.options.page );
24746	} ),
24747
24748	value: function( newVal ) {
24749		if ( !arguments.length ) {
24750			return this._parse( this.element.val() );
24751		}
24752		spinnerModifier( this._value ).call( this, newVal );
24753	},
24754
24755	widget: function() {
24756		return this.uiSpinner;
24757	}
24758} );
24759
24760// DEPRECATED
24761// TODO: switch return back to widget declaration at top of file when this is removed
24762if ( $.uiBackCompat === true ) {
24763
24764	// Backcompat for spinner html extension points
24765	$.widget( "ui.spinner", $.ui.spinner, {
24766		_enhance: function() {
24767			this.uiSpinner = this.element
24768				.attr( "autocomplete", "off" )
24769				.wrap( this._uiSpinnerHtml() )
24770				.parent()
24771
24772					// Add buttons
24773					.append( this._buttonHtml() );
24774		},
24775		_uiSpinnerHtml: function() {
24776			return "<span>";
24777		},
24778
24779		_buttonHtml: function() {
24780			return "<a></a><a></a>";
24781		}
24782	} );
24783}
24784
24785var widgetsSpinner = $.ui.spinner;
24786
24787
24788/*!
24789 * jQuery UI Tabs 1.14.
vendor: 1,533 bytes, lines 24789-24856
247891
24790 * https://jqueryui.com
24791 *
24792 * Copyright OpenJS Foundation and other contributors
24793 * Released under the MIT license.
24794 * https://jquery.org/license
24795 */
24796
24797//>>label: Tabs
24798//>>group: Widgets
24799//>>description: Transforms a set of container elements into a tab structure.
24800//>>docs: https://api.jqueryui.com/tabs/
24801//>>demos: https://jqueryui.com/tabs/
24802//>>css.structure: ../../themes/base/core.css
24803//>>css.structure: ../../themes/base/tabs.css
24804//>>css.theme: ../../themes/base/theme.css
24805
24806
24807$.widget( "ui.tabs", {
24808	version: "1.14.1",
24809	delay: 300,
24810	options: {
24811		active: null,
24812		classes: {
24813			"ui-tabs": "ui-corner-all",
24814			"ui-tabs-nav": "ui-corner-all",
24815			"ui-tabs-panel": "ui-corner-bottom",
24816			"ui-tabs-tab": "ui-corner-top"
24817		},
24818		collapsible: false,
24819		event: "click",
24820		heightStyle: "content",
24821		hide: null,
24822		show: null,
24823
24824		// Callbacks
24825		activate: null,
24826		beforeActivate: null,
24827		beforeLoad: null,
24828		load: null
24829	},
24830
24831	_isLocal: ( function() {
24832		var rhash = /#.*$/;
24833
24834		return function( anchor ) {
24835			var anchorUrl, locationUrl;
24836
24837			anchorUrl = anchor.href.replace( rhash, "" );
24838			locationUrl = location.href.replace( rhash, "" );
24839
24840			// Decoding may throw an error if the URL isn't UTF-8 (#9518)
24841			try {
24842				anchorUrl = decodeURIComponent( anchorUrl );
24843			} catch ( error ) {}
24844			try {
24845				locationUrl = decodeURIComponent( locationUrl );
24846			} catch ( error ) {}
24847
24848			return anchor.hash.length > 1 && anchorUrl === locationUrl;
24849		};
24850	} )(),
24851
24852	_create: function() {
24853		var that = this,
24854			options = this.options;
24855
24856		this.running = false;
vendor: 10,605 bytes, lines 24857-25257
24857
24858		this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
24859		this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
24860
24861		this._processTabs();
24862		options.active = this._initialActive();
24863
24864		// Take disabling tabs via class attribute from HTML
24865		// into account and update option properly.
24866		if ( Array.isArray( options.disabled ) ) {
24867			options.disabled = $.uniqueSort( options.disabled.concat(
24868				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
24869					return that.tabs.index( li );
24870				} )
24871			) ).sort();
24872		}
24873
24874		// Check for length avoids error when initializing empty list
24875		if ( this.options.active !== false && this.anchors.length ) {
24876			this.active = this._findActive( options.active );
24877		} else {
24878			this.active = $();
24879		}
24880
24881		this._refresh();
24882
24883		if ( this.active.length ) {
24884			this.load( options.active );
24885		}
24886	},
24887
24888	_initialActive: function() {
24889		var active = this.options.active,
24890			collapsible = this.options.collapsible,
24891			locationHashDecoded = decodeURIComponent( location.hash.substring( 1 ) );
24892
24893		if ( active === null ) {
24894
24895			// check the fragment identifier in the URL
24896			if ( locationHashDecoded ) {
24897				this.tabs.each( function( i, tab ) {
24898					if ( $( tab ).attr( "aria-controls" ) === locationHashDecoded ) {
24899						active = i;
24900						return false;
24901					}
24902				} );
24903			}
24904
24905			// Check for a tab marked active via a class
24906			if ( active === null ) {
24907				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
24908			}
24909
24910			// No active tab, set to false
24911			if ( active === null || active === -1 ) {
24912				active = this.tabs.length ? 0 : false;
24913			}
24914		}
24915
24916		// Handle numbers: negative, out of range
24917		if ( active !== false ) {
24918			active = this.tabs.index( this.tabs.eq( active ) );
24919			if ( active === -1 ) {
24920				active = collapsible ? false : 0;
24921			}
24922		}
24923
24924		// Don't allow collapsible: false and active: false
24925		if ( !collapsible && active === false && this.anchors.length ) {
24926			active = 0;
24927		}
24928
24929		return active;
24930	},
24931
24932	_getCreateEventData: function() {
24933		return {
24934			tab: this.active,
24935			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
24936		};
24937	},
24938
24939	_tabKeydown: function( event ) {
24940		var focusedTab = $( this.document[ 0 ].activeElement ).closest( "li" ),
24941			selectedIndex = this.tabs.index( focusedTab ),
24942			goingForward = true;
24943
24944		if ( this._handlePageNav( event ) ) {
24945			return;
24946		}
24947
24948		switch ( event.keyCode ) {
24949		case $.ui.keyCode.RIGHT:
24950		case $.ui.keyCode.DOWN:
24951			selectedIndex++;
24952			break;
24953		case $.ui.keyCode.UP:
24954		case $.ui.keyCode.LEFT:
24955			goingForward = false;
24956			selectedIndex--;
24957			break;
24958		case $.ui.keyCode.END:
24959			selectedIndex = this.anchors.length - 1;
24960			break;
24961		case $.ui.keyCode.HOME:
24962			selectedIndex = 0;
24963			break;
24964		case $.ui.keyCode.SPACE:
24965
24966			// Activate only, no collapsing
24967			event.preventDefault();
24968			clearTimeout( this.activating );
24969			this._activate( selectedIndex );
24970			return;
24971		case $.ui.keyCode.ENTER:
24972
24973			// Toggle (cancel delayed activation, allow collapsing)
24974			event.preventDefault();
24975			clearTimeout( this.activating );
24976
24977			// Determine if we should collapse or activate
24978			this._activate( selectedIndex === this.options.active ? false : selectedIndex );
24979			return;
24980		default:
24981			return;
24982		}
24983
24984		// Focus the appropriate tab, based on which key was pressed
24985		event.preventDefault();
24986		clearTimeout( this.activating );
24987		selectedIndex = this._focusNextTab( selectedIndex, goingForward );
24988
24989		// Navigating with control/command key will prevent automatic activation
24990		if ( !event.ctrlKey && !event.metaKey ) {
24991
24992			// Update aria-selected immediately so that AT think the tab is already selected.
24993			// Otherwise AT may confuse the user by stating that they need to activate the tab,
24994			// but the tab will already be activated by the time the announcement finishes.
24995			focusedTab.attr( "aria-selected", "false" );
24996			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
24997
24998			this.activating = this._delay( function() {
24999				this.option( "active", selectedIndex );
25000			}, this.delay );
25001		}
25002	},
25003
25004	_panelKeydown: function( event ) {
25005		if ( this._handlePageNav( event ) ) {
25006			return;
25007		}
25008
25009		// Ctrl+up moves focus to the current tab
25010		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
25011			event.preventDefault();
25012			this.active.trigger( "focus" );
25013		}
25014	},
25015
25016	// Alt+page up/down moves focus to the previous/next tab (and activates)
25017	_handlePageNav: function( event ) {
25018		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
25019			this._activate( this._focusNextTab( this.options.active - 1, false ) );
25020			return true;
25021		}
25022		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
25023			this._activate( this._focusNextTab( this.options.active + 1, true ) );
25024			return true;
25025		}
25026	},
25027
25028	_findNextTab: function( index, goingForward ) {
25029		var lastTabIndex = this.tabs.length - 1;
25030
25031		function constrain() {
25032			if ( index > lastTabIndex ) {
25033				index = 0;
25034			}
25035			if ( index < 0 ) {
25036				index = lastTabIndex;
25037			}
25038			return index;
25039		}
25040
25041		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
25042			index = goingForward ? index + 1 : index - 1;
25043		}
25044
25045		return index;
25046	},
25047
25048	_focusNextTab: function( index, goingForward ) {
25049		index = this._findNextTab( index, goingForward );
25050		this.tabs.eq( index ).trigger( "focus" );
25051		return index;
25052	},
25053
25054	_setOption: function( key, value ) {
25055		if ( key === "active" ) {
25056
25057			// _activate() will handle invalid values and update this.options
25058			this._activate( value );
25059			return;
25060		}
25061
25062		this._super( key, value );
25063
25064		if ( key === "collapsible" ) {
25065			this._toggleClass( "ui-tabs-collapsible", null, value );
25066
25067			// Setting collapsible: false while collapsed; open first panel
25068			if ( !value && this.options.active === false ) {
25069				this._activate( 0 );
25070			}
25071		}
25072
25073		if ( key === "event" ) {
25074			this._setupEvents( value );
25075		}
25076
25077		if ( key === "heightStyle" ) {
25078			this._setupHeightStyle( value );
25079		}
25080	},
25081
25082	refresh: function() {
25083		var options = this.options,
25084			lis = this.tablist.children( ":has(a[href])" );
25085
25086		// Get disabled tabs from class attribute from HTML
25087		// this will get converted to a boolean if needed in _refresh()
25088		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
25089			return lis.index( tab );
25090		} );
25091
25092		this._processTabs();
25093
25094		// Was collapsed or no tabs
25095		if ( options.active === false || !this.anchors.length ) {
25096			options.active = false;
25097			this.active = $();
25098
25099		// was active, but active tab is gone
25100		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
25101
25102			// all remaining tabs are disabled
25103			if ( this.tabs.length === options.disabled.length ) {
25104				options.active = false;
25105				this.active = $();
25106
25107			// activate previous tab
25108			} else {
25109				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
25110			}
25111
25112		// was active, active tab still exists
25113		} else {
25114
25115			// make sure active index is correct
25116			options.active = this.tabs.index( this.active );
25117		}
25118
25119		this._refresh();
25120	},
25121
25122	_refresh: function() {
25123		this._setOptionDisabled( this.options.disabled );
25124		this._setupEvents( this.options.event );
25125		this._setupHeightStyle( this.options.heightStyle );
25126
25127		this.tabs.not( this.active ).attr( {
25128			"aria-selected": "false",
25129			"aria-expanded": "false",
25130			tabIndex: -1
25131		} );
25132		this.panels.not( this._getPanelForTab( this.active ) )
25133			.hide()
25134			.attr( {
25135				"aria-hidden": "true"
25136			} );
25137
25138		// Make sure one tab is in the tab order
25139		if ( !this.active.length ) {
25140			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
25141		} else {
25142			this.active
25143				.attr( {
25144					"aria-selected": "true",
25145					"aria-expanded": "true",
25146					tabIndex: 0
25147				} );
25148			this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
25149			this._getPanelForTab( this.active )
25150				.show()
25151				.attr( {
25152					"aria-hidden": "false"
25153				} );
25154		}
25155	},
25156
25157	_processTabs: function() {
25158		var that = this,
25159			prevTabs = this.tabs,
25160			prevAnchors = this.anchors,
25161			prevPanels = this.panels;
25162
25163		this.tablist = this._getList().attr( "role", "tablist" );
25164		this._addClass( this.tablist, "ui-tabs-nav",
25165			"ui-helper-reset ui-helper-clearfix ui-widget-header" );
25166
25167		// Prevent users from focusing disabled tabs via click
25168		this.tablist
25169			.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
25170				if ( $( this ).is( ".ui-state-disabled" ) ) {
25171					event.preventDefault();
25172				}
25173			} );
25174
25175		this.tabs = this.tablist.find( "> li:has(a[href])" )
25176			.attr( {
25177				role: "tab",
25178				tabIndex: -1
25179			} );
25180		this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
25181
25182		this.anchors = this.tabs.map( function() {
25183			return $( "a", this )[ 0 ];
25184		} )
25185			.attr( {
25186				tabIndex: -1
25187			} );
25188		this._addClass( this.anchors, "ui-tabs-anchor" );
25189
25190		this.panels = $();
25191
25192		this.anchors.each( function( i, anchor ) {
25193			var selector, panel, panelId,
25194				anchorId = $( anchor ).uniqueId().attr( "id" ),
25195				tab = $( anchor ).closest( "li" ),
25196				originalAriaControls = tab.attr( "aria-controls" );
25197
25198			// Inline tab
25199			if ( that._isLocal( anchor ) ) {
25200				selector = decodeURIComponent( anchor.hash );
25201				panelId = selector.substring( 1 );
25202				panel = that.element.find( "#" + CSS.escape( panelId ) );
25203
25204			// remote tab
25205			} else {
25206
25207				// If the tab doesn't already have aria-controls,
25208				// generate an id by using a throw-away element
25209				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
25210				selector = "#" + panelId;
25211				panel = that.element.find( selector );
25212				if ( !panel.length ) {
25213					panel = that._createPanel( panelId );
25214					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
25215				}
25216				panel.attr( "aria-live", "polite" );
25217			}
25218
25219			if ( panel.length ) {
25220				that.panels = that.panels.add( panel );
25221			}
25222			if ( originalAriaControls ) {
25223				tab.data( "ui-tabs-aria-controls", originalAriaControls );
25224			}
25225			tab.attr( {
25226				"aria-controls": panelId,
25227				"aria-labelledby": anchorId
25228			} );
25229			panel.attr( "aria-labelledby", anchorId );
25230		} );
25231
25232		this.panels.attr( "role", "tabpanel" );
25233		this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
25234
25235		// Avoid memory leaks (#10056)
25236		if ( prevTabs ) {
25237			this._off( prevTabs.not( this.tabs ) );
25238			this._off( prevAnchors.not( this.anchors ) );
25239			this._off( prevPanels.not( this.panels ) );
25240		}
25241	},
25242
25243	// Allow overriding how to find the list for rare usage scenarios (#7715)
25244	_getList: function() {
25245		return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
25246	},
25247
25248	_createPanel: function( id ) {
25249		return $( "<div>" )
25250			.attr( "id", id )
25251			.data( "ui-tabs-destroy", true );
25252	},
25253
25254	_setOptionDisabled: function( disabled ) {
25255		var currentItem, li, i;
25256
25257		if ( Array
vendor: 6,222 bytes, lines 25257-25488
25257.isArray( disabled ) ) {
25258			if ( !disabled.length ) {
25259				disabled = false;
25260			} else if ( disabled.length === this.anchors.length ) {
25261				disabled = true;
25262			}
25263		}
25264
25265		// Disable tabs
25266		for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
25267			currentItem = $( li );
25268			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
25269				currentItem.attr( "aria-disabled", "true" );
25270				this._addClass( currentItem, null, "ui-state-disabled" );
25271			} else {
25272				currentItem.removeAttr( "aria-disabled" );
25273				this._removeClass( currentItem, null, "ui-state-disabled" );
25274			}
25275		}
25276
25277		this.options.disabled = disabled;
25278
25279		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
25280			disabled === true );
25281	},
25282
25283	_setupEvents: function( event ) {
25284		var events = {};
25285		if ( event ) {
25286			$.each( event.split( " " ), function( index, eventName ) {
25287				events[ eventName ] = "_eventHandler";
25288			} );
25289		}
25290
25291		this._off( this.anchors.add( this.tabs ).add( this.panels ) );
25292
25293		// Always prevent the default action, even when disabled
25294		this._on( true, this.anchors, {
25295			click: function( event ) {
25296				event.preventDefault();
25297			}
25298		} );
25299		this._on( this.anchors, events );
25300		this._on( this.tabs, { keydown: "_tabKeydown" } );
25301		this._on( this.panels, { keydown: "_panelKeydown" } );
25302
25303		this._focusable( this.tabs );
25304		this._hoverable( this.tabs );
25305	},
25306
25307	_setupHeightStyle: function( heightStyle ) {
25308		var maxHeight,
25309			parent = this.element.parent();
25310
25311		if ( heightStyle === "fill" ) {
25312			maxHeight = parent.height();
25313			maxHeight -= this.element.outerHeight() - this.element.height();
25314
25315			this.element.siblings( ":visible" ).each( function() {
25316				var elem = $( this ),
25317					position = elem.css( "position" );
25318
25319				if ( position === "absolute" || position === "fixed" ) {
25320					return;
25321				}
25322				maxHeight -= elem.outerHeight( true );
25323			} );
25324
25325			this.element.children().not( this.panels ).each( function() {
25326				maxHeight -= $( this ).outerHeight( true );
25327			} );
25328
25329			this.panels.each( function() {
25330				$( this ).height( Math.max( 0, maxHeight -
25331					$( this ).innerHeight() + $( this ).height() ) );
25332			} )
25333				.css( "overflow", "auto" );
25334		} else if ( heightStyle === "auto" ) {
25335			maxHeight = 0;
25336			this.panels.each( function() {
25337				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
25338			} ).height( maxHeight );
25339		}
25340	},
25341
25342	_eventHandler: function( event ) {
25343		var options = this.options,
25344			active = this.active,
25345			anchor = $( event.currentTarget ),
25346			tab = anchor.closest( "li" ),
25347			clickedIsActive = tab[ 0 ] === active[ 0 ],
25348			collapsing = clickedIsActive && options.collapsible,
25349			toShow = collapsing ? $() : this._getPanelForTab( tab ),
25350			toHide = !active.length ? $() : this._getPanelForTab( active ),
25351			eventData = {
25352				oldTab: active,
25353				oldPanel: toHide,
25354				newTab: collapsing ? $() : tab,
25355				newPanel: toShow
25356			};
25357
25358		event.preventDefault();
25359
25360		if ( tab.hasClass( "ui-state-disabled" ) ||
25361
25362				// tab is already loading
25363				tab.hasClass( "ui-tabs-loading" ) ||
25364
25365				// can't switch durning an animation
25366				this.running ||
25367
25368				// click on active header, but not collapsible
25369				( clickedIsActive && !options.collapsible ) ||
25370
25371				// allow canceling activation
25372				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
25373			return;
25374		}
25375
25376		options.active = collapsing ? false : this.tabs.index( tab );
25377
25378		this.active = clickedIsActive ? $() : tab;
25379		if ( this.xhr ) {
25380			this.xhr.abort();
25381		}
25382
25383		if ( !toHide.length && !toShow.length ) {
25384			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
25385		}
25386
25387		if ( toShow.length ) {
25388			this.load( this.tabs.index( tab ), event );
25389		}
25390		this._toggle( event, eventData );
25391	},
25392
25393	// Handles show/hide for selecting tabs
25394	_toggle: function( event, eventData ) {
25395		var that = this,
25396			toShow = eventData.newPanel,
25397			toHide = eventData.oldPanel;
25398
25399		this.running = true;
25400
25401		function complete() {
25402			that.running = false;
25403			that._trigger( "activate", event, eventData );
25404		}
25405
25406		function show() {
25407			that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
25408
25409			if ( toShow.length && that.options.show ) {
25410				that._show( toShow, that.options.show, complete );
25411			} else {
25412				toShow.show();
25413				complete();
25414			}
25415		}
25416
25417		// Start out by hiding, then showing, then completing
25418		if ( toHide.length && this.options.hide ) {
25419			this._hide( toHide, this.options.hide, function() {
25420				that._removeClass( eventData.oldTab.closest( "li" ),
25421					"ui-tabs-active", "ui-state-active" );
25422				show();
25423			} );
25424		} else {
25425			this._removeClass( eventData.oldTab.closest( "li" ),
25426				"ui-tabs-active", "ui-state-active" );
25427			toHide.hide();
25428			show();
25429		}
25430
25431		toHide.attr( "aria-hidden", "true" );
25432		eventData.oldTab.attr( {
25433			"aria-selected": "false",
25434			"aria-expanded": "false"
25435		} );
25436
25437		// If we're switching tabs, remove the old tab from the tab order.
25438		// If we're opening from collapsed state, remove the previous tab from the tab order.
25439		// If we're collapsing, then keep the collapsing tab in the tab order.
25440		if ( toShow.length && toHide.length ) {
25441			eventData.oldTab.attr( "tabIndex", -1 );
25442		} else if ( toShow.length ) {
25443			this.tabs.filter( function() {
25444				return $( this ).attr( "tabIndex" ) === 0;
25445			} )
25446				.attr( "tabIndex", -1 );
25447		}
25448
25449		toShow.attr( "aria-hidden", "false" );
25450		eventData.newTab.attr( {
25451			"aria-selected": "true",
25452			"aria-expanded": "true",
25453			tabIndex: 0
25454		} );
25455	},
25456
25457	_activate: function( index ) {
25458		var anchor,
25459			active = this._findActive( index );
25460
25461		// Trying to activate the already active panel
25462		if ( active[ 0 ] === this.active[ 0 ] ) {
25463			return;
25464		}
25465
25466		// Trying to collapse, simulate a click on the current active header
25467		if ( !active.length ) {
25468			active = this.active;
25469		}
25470
25471		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
25472		this._eventHandler( {
25473			target: anchor,
25474			currentTarget: anchor,
25475			preventDefault: $.noop
25476		} );
25477	},
25478
25479	_findActive: function( index ) {
25480		return index === false ? $() : this.tabs.eq( index );
25481	},
25482
25483	_getIndex: function( index ) {
25484
25485		// meta-function to give users option to provide a href string instead of a numerical index.
25486		if ( typeof index === "string" ) {
25487			index = this.anchors.index( this.anchors.filter( "[href$='" +
25488				
vendor: 15,478 bytes, lines 25488-26065
25488CSS.escape( index ) + "']" ) );
25489		}
25490
25491		return index;
25492	},
25493
25494	_destroy: function() {
25495		if ( this.xhr ) {
25496			this.xhr.abort();
25497		}
25498
25499		this.tablist
25500			.removeAttr( "role" )
25501			.off( this.eventNamespace );
25502
25503		this.anchors
25504			.removeAttr( "role tabIndex" )
25505			.removeUniqueId();
25506
25507		this.tabs.add( this.panels ).each( function() {
25508			if ( $.data( this, "ui-tabs-destroy" ) ) {
25509				$( this ).remove();
25510			} else {
25511				$( this ).removeAttr( "role tabIndex " +
25512					"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
25513			}
25514		} );
25515
25516		this.tabs.each( function() {
25517			var li = $( this ),
25518				prev = li.data( "ui-tabs-aria-controls" );
25519			if ( prev ) {
25520				li
25521					.attr( "aria-controls", prev )
25522					.removeData( "ui-tabs-aria-controls" );
25523			} else {
25524				li.removeAttr( "aria-controls" );
25525			}
25526		} );
25527
25528		this.panels.show();
25529
25530		if ( this.options.heightStyle !== "content" ) {
25531			this.panels.css( "height", "" );
25532		}
25533	},
25534
25535	enable: function( index ) {
25536		var disabled = this.options.disabled;
25537		if ( disabled === false ) {
25538			return;
25539		}
25540
25541		if ( index === undefined ) {
25542			disabled = false;
25543		} else {
25544			index = this._getIndex( index );
25545			if ( Array.isArray( disabled ) ) {
25546				disabled = $.map( disabled, function( num ) {
25547					return num !== index ? num : null;
25548				} );
25549			} else {
25550				disabled = $.map( this.tabs, function( li, num ) {
25551					return num !== index ? num : null;
25552				} );
25553			}
25554		}
25555		this._setOptionDisabled( disabled );
25556	},
25557
25558	disable: function( index ) {
25559		var disabled = this.options.disabled;
25560		if ( disabled === true ) {
25561			return;
25562		}
25563
25564		if ( index === undefined ) {
25565			disabled = true;
25566		} else {
25567			index = this._getIndex( index );
25568			if ( $.inArray( index, disabled ) !== -1 ) {
25569				return;
25570			}
25571			if ( Array.isArray( disabled ) ) {
25572				disabled = $.merge( [ index ], disabled ).sort();
25573			} else {
25574				disabled = [ index ];
25575			}
25576		}
25577		this._setOptionDisabled( disabled );
25578	},
25579
25580	load: function( index, event ) {
25581		index = this._getIndex( index );
25582		var that = this,
25583			tab = this.tabs.eq( index ),
25584			anchor = tab.find( ".ui-tabs-anchor" ),
25585			panel = this._getPanelForTab( tab ),
25586			eventData = {
25587				tab: tab,
25588				panel: panel
25589			},
25590			complete = function( jqXHR, status ) {
25591				if ( status === "abort" ) {
25592					that.panels.stop( false, true );
25593				}
25594
25595				that._removeClass( tab, "ui-tabs-loading" );
25596				panel.removeAttr( "aria-busy" );
25597
25598				if ( jqXHR === that.xhr ) {
25599					delete that.xhr;
25600				}
25601			};
25602
25603		// Not remote
25604		if ( this._isLocal( anchor[ 0 ] ) ) {
25605			return;
25606		}
25607
25608		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
25609
25610		if ( this.xhr.statusText !== "canceled" ) {
25611			this._addClass( tab, "ui-tabs-loading" );
25612			panel.attr( "aria-busy", "true" );
25613
25614			this.xhr
25615				.done( function( response, status, jqXHR ) {
25616					panel.html( response );
25617					that._trigger( "load", event, eventData );
25618
25619					complete( jqXHR, status );
25620				} )
25621				.fail( function( jqXHR, status ) {
25622					complete( jqXHR, status );
25623				} );
25624		}
25625	},
25626
25627	_ajaxSettings: function( anchor, event, eventData ) {
25628		var that = this;
25629		return {
25630			url: anchor.attr( "href" ),
25631			beforeSend: function( jqXHR, settings ) {
25632				return that._trigger( "beforeLoad", event,
25633					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
25634			}
25635		};
25636	},
25637
25638	_getPanelForTab: function( tab ) {
25639		var id = $( tab ).attr( "aria-controls" );
25640		return this.element.find( "#" + CSS.escape( id ) );
25641	}
25642} );
25643
25644// DEPRECATED
25645// TODO: Switch return back to widget declaration at top of file when this is removed
25646if ( $.uiBackCompat === true ) {
25647
25648	// Backcompat for ui-tab class (now ui-tabs-tab)
25649	$.widget( "ui.tabs", $.ui.tabs, {
25650		_processTabs: function() {
25651			this._superApply( arguments );
25652			this._addClass( this.tabs, "ui-tab" );
25653		}
25654	} );
25655}
25656
25657var widgetsTabs = $.ui.tabs;
25658
25659
25660/*!
25661 * jQuery UI Tooltip 1.14.1
25662 * https://jqueryui.com
25663 *
25664 * Copyright OpenJS Foundation and other contributors
25665 * Released under the MIT license.
25666 * https://jquery.org/license
25667 */
25668
25669//>>label: Tooltip
25670//>>group: Widgets
25671//>>description: Shows additional information for any element on hover or focus.
25672//>>docs: https://api.jqueryui.com/tooltip/
25673//>>demos: https://jqueryui.com/tooltip/
25674//>>css.structure: ../../themes/base/core.css
25675//>>css.structure: ../../themes/base/tooltip.css
25676//>>css.theme: ../../themes/base/theme.css
25677
25678
25679$.widget( "ui.tooltip", {
25680	version: "1.14.1",
25681	options: {
25682		classes: {
25683			"ui-tooltip": "ui-corner-all ui-widget-shadow"
25684		},
25685		content: function() {
25686			var title = $( this ).attr( "title" );
25687
25688			// Escape title, since we're going from an attribute to raw HTML
25689			return $( "<a>" ).text( title ).html();
25690		},
25691		hide: true,
25692
25693		// Disabled elements have inconsistent behavior across browsers (#8661)
25694		items: "[title]:not([disabled])",
25695		position: {
25696			my: "left top+15",
25697			at: "left bottom",
25698			collision: "flipfit flip"
25699		},
25700		show: true,
25701		track: false,
25702
25703		// Callbacks
25704		close: null,
25705		open: null
25706	},
25707
25708	_addDescribedBy: function( elem, id ) {
25709		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
25710		describedby.push( id );
25711		elem
25712			.data( "ui-tooltip-id", id )
25713			.attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) );
25714	},
25715
25716	_removeDescribedBy: function( elem ) {
25717		var id = elem.data( "ui-tooltip-id" ),
25718			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
25719			index = $.inArray( id, describedby );
25720
25721		if ( index !== -1 ) {
25722			describedby.splice( index, 1 );
25723		}
25724
25725		elem.removeData( "ui-tooltip-id" );
25726		describedby = String.prototype.trim.call( describedby.join( " " ) );
25727		if ( describedby ) {
25728			elem.attr( "aria-describedby", describedby );
25729		} else {
25730			elem.removeAttr( "aria-describedby" );
25731		}
25732	},
25733
25734	_create: function() {
25735		this._on( {
25736			mouseover: "open",
25737			focusin: "open"
25738		} );
25739
25740		// IDs of generated tooltips, needed for destroy
25741		this.tooltips = {};
25742
25743		// IDs of parent tooltips where we removed the title attribute
25744		this.parents = {};
25745
25746		// Append the aria-live region so tooltips announce correctly
25747		this.liveRegion = $( "<div>" )
25748			.attr( {
25749				role: "log",
25750				"aria-live": "assertive",
25751				"aria-relevant": "additions"
25752			} )
25753			.appendTo( this.document[ 0 ].body );
25754		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
25755
25756		this.disabledTitles = $( [] );
25757	},
25758
25759	_setOption: function( key, value ) {
25760		var that = this;
25761
25762		this._super( key, value );
25763
25764		if ( key === "content" ) {
25765			$.each( this.tooltips, function( id, tooltipData ) {
25766				that._updateContent( tooltipData.element );
25767			} );
25768		}
25769	},
25770
25771	_setOptionDisabled: function( value ) {
25772		this[ value ? "_disable" : "_enable" ]();
25773	},
25774
25775	_disable: function() {
25776		var that = this;
25777
25778		// Close open tooltips
25779		$.each( this.tooltips, function( id, tooltipData ) {
25780			var event = $.Event( "blur" );
25781			event.target = event.currentTarget = tooltipData.element[ 0 ];
25782			that.close( event, true );
25783		} );
25784
25785		// Remove title attributes to prevent native tooltips
25786		this.disabledTitles = this.disabledTitles.add(
25787			this.element.find( this.options.items ).addBack()
25788				.filter( function() {
25789					var element = $( this );
25790					if ( element.is( "[title]" ) ) {
25791						return element
25792							.data( "ui-tooltip-title", element.attr( "title" ) )
25793							.removeAttr( "title" );
25794					}
25795				} )
25796		);
25797	},
25798
25799	_enable: function() {
25800
25801		// restore title attributes
25802		this.disabledTitles.each( function() {
25803			var element = $( this );
25804			if ( element.data( "ui-tooltip-title" ) ) {
25805				element.attr( "title", element.data( "ui-tooltip-title" ) );
25806			}
25807		} );
25808		this.disabledTitles = $( [] );
25809	},
25810
25811	open: function( event ) {
25812		var that = this,
25813			target = $( event ? event.target : this.element )
25814
25815				// we need closest here due to mouseover bubbling,
25816				// but always pointing at the same event target
25817				.closest( this.options.items );
25818
25819		// No element to show a tooltip for or the tooltip is already open
25820		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
25821			return;
25822		}
25823
25824		if ( target.attr( "title" ) ) {
25825			target.data( "ui-tooltip-title", target.attr( "title" ) );
25826		}
25827
25828		target.data( "ui-tooltip-open", true );
25829
25830		// Kill parent tooltips, custom or native, for hover
25831		if ( event && event.type === "mouseover" ) {
25832			target.parents().each( function() {
25833				var parent = $( this ),
25834					blurEvent;
25835				if ( parent.data( "ui-tooltip-open" ) ) {
25836					blurEvent = $.Event( "blur" );
25837					blurEvent.target = blurEvent.currentTarget = this;
25838					that.close( blurEvent, true );
25839				}
25840				if ( parent.attr( "title" ) ) {
25841					parent.uniqueId();
25842					that.parents[ this.id ] = {
25843						element: this,
25844						title: parent.attr( "title" )
25845					};
25846					parent.attr( "title", "" );
25847				}
25848			} );
25849		}
25850
25851		this._registerCloseHandlers( event, target );
25852		this._updateContent( target, event );
25853	},
25854
25855	_updateContent: function( target, event ) {
25856		var content,
25857			contentOption = this.options.content,
25858			that = this,
25859			eventType = event ? event.type : null;
25860
25861		if ( typeof contentOption === "string" || contentOption.nodeType ||
25862				contentOption.jquery ) {
25863			return this._open( event, target, contentOption );
25864		}
25865
25866		content = contentOption.call( target[ 0 ], function( response ) {
25867
25868			// Ignore async response if tooltip was closed already
25869			if ( !target.data( "ui-tooltip-open" ) ) {
25870				return;
25871			}
25872
25873			// JQuery creates a special event for focusin when it doesn't
25874			// exist natively. To improve performance, the native event
25875			// object is reused and the type is changed. Therefore, we can't
25876			// rely on the type being correct after the event finished
25877			// bubbling, so we set it back to the previous value. (#8740)
25878			if ( event ) {
25879				event.type = eventType;
25880			}
25881			that._open( event, target, response );
25882		} );
25883		if ( content ) {
25884			this._open( event, target, content );
25885		}
25886	},
25887
25888	_open: function( event, target, content ) {
25889		var tooltipData, tooltip, delayedShow, a11yContent,
25890			positionOption = $.extend( {}, this.options.position );
25891
25892		if ( !content ) {
25893			return;
25894		}
25895
25896		// Content can be updated multiple times. If the tooltip already
25897		// exists, then just update the content and bail.
25898		tooltipData = this._find( target );
25899		if ( tooltipData ) {
25900			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
25901			return;
25902		}
25903
25904		// If we have a title, clear it to prevent the native tooltip
25905		// we have to check first to avoid defining a title if none exists
25906		// (we don't want to cause an element to start matching [title])
25907		//
25908		// We use removeAttr only for key events, to allow IE to export the correct
25909		// accessible attributes. For mouse events, set to empty string to avoid
25910		// native tooltip showing up (happens only when removing inside mouseover).
25911		if ( target.is( "[title]" ) ) {
25912			if ( event && event.type === "mouseover" ) {
25913				target.attr( "title", "" );
25914			} else {
25915				target.removeAttr( "title" );
25916			}
25917		}
25918
25919		tooltipData = this._tooltip( target );
25920		tooltip = tooltipData.tooltip;
25921		this._addDescribedBy( target, tooltip.attr( "id" ) );
25922		tooltip.find( ".ui-tooltip-content" ).html( content );
25923
25924		// Support: Voiceover on OS X, JAWS on IE <= 9
25925		// JAWS announces deletions even when aria-relevant="additions"
25926		// Voiceover will sometimes re-read the entire log region's contents from the beginning
25927		this.liveRegion.children().hide();
25928		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
25929		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
25930		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
25931		a11yContent.appendTo( this.liveRegion );
25932
25933		function position( event ) {
25934			positionOption.of = event;
25935			if ( tooltip.is( ":hidden" ) ) {
25936				return;
25937			}
25938			tooltip.position( positionOption );
25939		}
25940		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
25941			this._on( this.document, {
25942				mousemove: position
25943			} );
25944
25945			// trigger once to override element-relative positioning
25946			position( event );
25947		} else {
25948			tooltip.position( $.extend( {
25949				of: target
25950			}, this.options.position ) );
25951		}
25952
25953		tooltip.hide();
25954
25955		this._show( tooltip, this.options.show );
25956
25957		// Handle tracking tooltips that are shown with a delay (#8644). As soon
25958		// as the tooltip is visible, position the tooltip using the most recent
25959		// event.
25960		// Adds the check to add the timers only when both delay and track options are set (#14682)
25961		if ( this.options.track && this.options.show && this.options.show.delay ) {
25962			delayedShow = this.delayedShow = setInterval( function() {
25963				if ( tooltip.is( ":visible" ) ) {
25964					position( positionOption.of );
25965					clearInterval( delayedShow );
25966				}
25967			}, 13 );
25968		}
25969
25970		this._trigger( "open", event, { tooltip: tooltip } );
25971	},
25972
25973	_registerCloseHandlers: function( event, target ) {
25974		var events = {
25975			keyup: function( event ) {
25976				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
25977					var fakeEvent = $.Event( event );
25978					fakeEvent.currentTarget = target[ 0 ];
25979					this.close( fakeEvent, true );
25980				}
25981			}
25982		};
25983
25984		// Only bind remove handler for delegated targets. Non-delegated
25985		// tooltips will handle this in destroy.
25986		if ( target[ 0 ] !== this.element[ 0 ] ) {
25987			events.remove = function() {
25988				var targetElement = this._find( target );
25989				if ( targetElement ) {
25990					this._removeTooltip( targetElement.tooltip );
25991				}
25992			};
25993		}
25994
25995		if ( !event || event.type === "mouseover" ) {
25996			events.mouseleave = "close";
25997		}
25998		if ( !event || event.type === "focusin" ) {
25999			events.focusout = "close";
26000		}
26001		this._on( true, target, events );
26002	},
26003
26004	close: function( event ) {
26005		var tooltip,
26006			that = this,
26007			target = $( event ? event.currentTarget : this.element ),
26008			tooltipData = this._find( target );
26009
26010		// The tooltip may already be closed
26011		if ( !tooltipData ) {
26012
26013			// We set ui-tooltip-open immediately upon open (in open()), but only set the
26014			// additional data once there's actually content to show (in _open()). So even if the
26015			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
26016			// the period between open() and _open().
26017			target.removeData( "ui-tooltip-open" );
26018			return;
26019		}
26020
26021		tooltip = tooltipData.tooltip;
26022
26023		// Disabling closes the tooltip, so we need to track when we're closing
26024		// to avoid an infinite loop in case the tooltip becomes disabled on close
26025		if ( tooltipData.closing ) {
26026			return;
26027		}
26028
26029		// Clear the interval for delayed tracking tooltips
26030		clearInterval( this.delayedShow );
26031
26032		// Only set title if we had one before (see comment in _open())
26033		// If the title attribute has changed since open(), don't restore
26034		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
26035			target.attr( "title", target.data( "ui-tooltip-title" ) );
26036		}
26037
26038		this._removeDescribedBy( target );
26039
26040		tooltipData.hiding = true;
26041		tooltip.stop( true );
26042		this._hide( tooltip, this.options.hide, function() {
26043			that._removeTooltip( $( this ) );
26044		} );
26045
26046		target.removeData( "ui-tooltip-open" );
26047		this._off( target, "mouseleave focusout keyup" );
26048
26049		// Remove 'remove' binding only on delegated targets
26050		if ( target[ 0 ] !== this.element[ 0 ] ) {
26051			this._off( target, "remove" );
26052		}
26053		this._off( this.document, "mousemove" );
26054
26055		if ( event && event.type === "mouseleave" ) {
26056			$.each( this.parents, function( id, parent ) {
26057				$( parent.element ).attr( "title", parent.title );
26058				delete that.parents[ id ];
26059			} );
26060		}
26061
26062		tooltipData.closing = true;
26063		this._trigger( "close", event, { tooltip: tooltip } );
26064		if ( !tooltipData.hiding ) {
26065			tooltipData.closing = false;
26066		}
26067	},
26068
26069	_tooltip: function( element ) {
26070		var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
26071			content = $( "<div>" ).appendTo( tooltip ),
26072			id = tooltip.uniqueId().attr( "id" );
26073
26074		this._addClass( content, "ui-tooltip-content" );
26075		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
26076
26077		tooltip.appendTo( this._appendTo( element ) );
26078
26079		return this.tooltips[ id ] = {
26080			element: element,
26081			tooltip: tooltip
26082		};
26083	},
26084
26085	_find: function( target ) {
26086		var id = target.data( "ui-tooltip-id" );
26087		return id ? this.tooltips[ id ] : null;
26088	},
26089
26090	_removeTooltip: function( tooltip ) {
26091
26092		// Clear the interval for delayed tracking tooltips
26093		clearInterval( this.delayedShow );
26094
26095		tooltip.remove();
26096		delete this.tooltips[ tooltip.attr( "id" ) ];
26097	},
26098
26099	_appendTo: function( target ) {
26100		var element = target.closest( ".ui-front, dialog" );
26101
26102		if ( !element.length ) {
26103			element = this.document[ 0 ].body;
26104		}
26105
26106		return element;
26107	},
26108
26109	_destroy: function() {
26110		var that = this;
26111
26112		// Close open tooltips
26113		$.each( this.tooltips, function( id, tooltipData ) {
26114
26115			// Delegate to close method to handle common cleanup
26116			var event = $.Event( "blur" ),
26117				element = tooltipData.element;
26118			event.target = event.currentTarget = element[ 0 ];
26119			that.close( event, true );
26120
26121			// Remove immediately; destroying an open tooltip doesn't use the
26122			// hide animation
26123			$( "#" + id ).remove();
26124
26125			// Restore the title
26126			if ( element.data( "ui-tooltip-title" ) ) {
26127
26128				// If the title attribute has changed since open(), don't restore
26129				if ( !element.attr( "title" ) ) {
26130					element.attr( "title", element.data( "ui-tooltip-title" ) );
26131				}
26132				element.removeData( "ui-tooltip-title" );
26133			}
26134		} );
26135		this.liveRegion.remove();
26136	}
26137} );
26138
26139// DEPRECATED
26140// TODO: Switch return back to widget declaration at top of file when this is removed
26141if ( $.uiBackCompat === true ) {
26142
26143	// Backcompat for tooltipClass option
26144	$.widget( "ui.tooltip", $.ui.tooltip, {
26145		options: {
26146			tooltipClass: null
26147		},
26148		_tooltip: function() {
26149			var tooltipData = this._superApply( arguments );
26150			if ( this.options.tooltipClass ) {
26151				tooltipData.tooltip.addClass( this.options.tooltipClass );
26152			}
26153			return tooltipData;
26154		}
26155	} );
26156}
26157
26158var widgetsTooltip = $.ui.tooltip;
26159
26160
26161
26162
26163} );
26164/*!
26165 * jQuery UI Touch Punch 1.0.8 as modified by RWAP Software
26166 * based on original touchpunch v0.2.3 which has not been updated since 2014
26167 *
26168 * Updates by RWAP Software to take account of various suggested changes on the original code issues
26169 *
26170 * Original: https://github.com/furf/jquery-ui-touch-punch
26171 * Copyright 2011–2014, Dave Furfero
26172 * Dual licensed under the MIT or GPL Version 2 licenses.
26173 *
26174 * Fork: https://github.com/RWAP/jquery-ui-touch-punch
26175 *
26176 * Depends:
26177 * jquery.ui.widget.js
26178 * jquery.ui.mouse.js
26179 */
26180
26181(function( factory ) {
26182  if ( typeof define === "function" && define.amd ) {
26183
26184    // AMD. Register as an anonymous module.
26185    define([ "jquery", "jquery.ui" ], factory );
26186  } else {
26187
26188    // Browser globals
26189    factory( jQuery );
26190  }
26191}(function ($) {
26192
26193  // Detect touch support - Windows Surface devices and other touch devices
26194  $.support.mspointer = window.navigator.msPointerEnabled;
26195  $.support.touch = ( 'ontouchstart' in document
26196    || 'ontouchstart' in window
26197    || window.TouchEvent
26198    || (window.DocumentTouch && document instanceof DocumentTouch)
26199    || navigator.maxTouchPoints > 0
26200    || navigator.msMaxTouchPoints > 0
26201  );
26202
26203  // Ignore browsers without touch or mouse support
26204  if ((!$.support.touch && !$.support.mspointer) || !$.ui.mouse) {
26205    return;
26206  }
26207
26208  var mouseProto = $.ui.mouse.prototype,
26209    _mouseInit = mouseProto._mouseInit,
26210    _mouseDestroy = mouseProto._mouseDestroy,
26211    touchHandled;
26212
26213  /**
26214   * Get the x,y position of a touch event
26215   * @param {Object} event A touch event
26216   */
26217  function getTouchCoords (event) {
26218    return {
26219      x: event.originalEvent.changedTouches[0].pageX,
26220      y: event.originalEvent.changedTouches[0].pageY
26221    };
26222  }
26223
26224  /**
26225   * Simulate a mouse event based on a corresponding touch event
26226   * @param {Object} event A touch event
26227   * @param {String} simulatedType The corresponding mouse event
26228   */
26229  function simulateMouseEvent (event, simulatedType) {
26230
26231    // Ignore multi-touch events
26232    if (event.originalEvent.touches.length > 1) {
26233      return;
26234    }
26235
26236    // Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors
26237    if (event.cancelable) {
26238      event.preventDefault();
26239    }
26240
26241    var touch = event.originalEvent.changedTouches[0],
26242      simulatedEvent = document.createEvent('MouseEvents');
26243
26244    // Initialize the simulated mouse event using the touch event's co
26244ordinates
26245    simulatedEvent.initMouseEvent(
26246      simulatedType,    // type
26247      true,             // bubbles
26248      true,             // cancelable
26249      window,           // view
26250      1,                // detail
26251      touch.screenX,    // screenX
26252      touch.screenY,    // screenY
26253      touch.clientX,    // clientX
26254      touch.clientY,    // clientY
26255      false,            // ctrlKey
26256      false,            // altKey
26257      false,            // shiftKey
26258      false,            // metaKey
26259      0,                // button
26260      null              // relatedTarget
26261    );
26262
26263    // Dispatch the simulated event to the target element
26264    event.target.dispatchEvent(simulatedEvent);
26265  }
26266
26267  /**
26268   * Handle the jQuery UI widget's touchstart events
26269   * @param {Object} event The widget element's touchstart event
26270   */
26271  mouseProto._touchStart = function (event) {
26272
26273    var self = this;
26274
26275    // Interaction time
26276    this._startedMove = event.timeStamp;
26277
26278    // Track movement to determine if interaction was a click
26279    self._startPos = getTouchCoords(event);
26280
26281    // Ignore the event if another widget is already being handled
26282    if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {
26283      return;
26284    }
26285
26286    // Set the flag to prevent other widgets from inheriting the touch event
26287    touchHandled = true;
26288
26289    // Track movement to determine if interaction was a click
26290    self._touchMoved = false;
26291
26292    // Simulate the mouseover event
26293    simulateMouseEvent(event, 'mouseover');
26294
26295    // Simulate the mousemove event
26296    simulateMouseEvent(event, 'mousemove');
26297
26298    // Simulate the mousedown event
26299    simulateMouseEvent(event, 'mousedown');
26300  };
26301
26302  /**
26303   * Handle the jQuery UI widget's touchmove events
26304   * @param {Object} event The document's touchmove event
26305   */
26306  mouseProto._touchMove = function (event) {
26307
26308    // Ignore event if not handled
26309    if (!touchHandled) {
26310      return;
26311    }
26312
26313    // Interaction was moved
26314    this._touchMoved = true;
26315
26316    // Simulate the mousemove event
26317    simulateMouseEvent(event, 'mousemove');
26318  };
26319
26320  /**
26321   * Handle the jQuery UI widget's touchend events
26322   * @param {Object} event The document's touchend event
26323   */
26324  mouseProto._touchEnd = function (event) {
26325
26326    // Ignore event if not handled
26327    if (!touchHandled) {
26328      return;
26329    }
26330
26331    // Simulate the mouseup event
26332    simulateMouseEvent(event, 'mouseup');
26333
26334    // Simulate the mouseout event
26335    simulateMouseEvent(event, 'mouseout');
26336
26337    // If the touch interaction did not move, it should trigger a click
26338    // Check for this in two ways - length of time of simulation and distance moved
26339    // Allow for Apple Stylus to be used also
26340    var timeMoving = event.timeStamp - this._startedMove;
26341    if (!this._touchMoved || timeMoving < 500) {
26342      // Simulate the click event
26343      simulateMouseEvent(event, 'click');
26344    } else {
26345      var endPos = getTouchCoords(event);
26346      if ((Math.abs(endPos.x - this._startPos.x) < 10) && (Math.abs(endPos.y - this._startPos.y) < 10)) {
26347
26348        // If the touch interaction did not move, it should trigger a click
26349        if (!this._touchMoved || event.originalEvent.changedTouches[0].touchType === 'stylus') {
26350          // Simulate the click event
26351          simulateMouseEvent(event, 'click');
26352        }
26353      }
26354    }
26355
26356    // Unset the flag to determine the touch movement stopped
26357    this._touchMoved = false;
26358
26359    // Unset the flag to allow other widgets to inherit the touch event
26360    touchHandled = false;
26361  };
26362
26363  /**
26364   * A duck punch of the $.ui.mouse _mouseInit method to support touch events.
26365   * This method extends the widget with bound touch event handlers that
26366   * translate touch events to mouse events and pass them to the widget's
26367   * original mouse event handling methods.
26368   */
26369  mouseProto._mouseInit = function () {
26370
26371    var self = this;
26372
26373    // Microsoft Surface Support = remove original touch Action
26374    if ($.support.mspointer) {
26375      self.element[0].style.msTouchAction = 'none';
26376    }
26377
26378    // Delegate the touch handlers to the widget's element
26379    self.element.on({
26380      touchstart: $.proxy(self, '_touchStart'),
26381      touchmove: $.proxy(self, '_touchMove'),
26382      touchend: $.proxy(self, '_touchEnd')
26383    });
26384
26385    // Call the original $.ui.mouse init method
26386    _mouseInit.call(self);
26387  };
26388
26389  /**
26390   * Remove the touch event handlers
26391   */
26392  mouseProto._mouseDestroy = function () {
26393
26394    var self = this;
26395
26396    // Delegate the touch handlers to the widget's element
26397    self.element.off({
26398      touchstart: $.proxy(self, '_touchStart'),
26399      touchmove: $.proxy(self, '_touchMove'),
26400      touchend: $.proxy(self, '_touchEnd')
26401    });
26402
26403    // Call the original $.ui.mouse destroy method
26404    _mouseDestroy.call(self);
26405  };
26406
26407}));

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.