Current File : /home/aventura/www/site/wp-content/plugins/wp-smushit/assets/js/admin.min.js
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([,function(e,t,n){var i;
/*!
 * jQuery JavaScript Library v3.3.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2018-01-20T17:24Z
 */
/*!
 * jQuery JavaScript Library v3.3.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2018-01-20T17:24Z
 */
!function(t,n){"use strict";"object"==typeof e&&"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(n,s){"use strict";var r=[],o=n.document,a=Object.getPrototypeOf,u=r.slice,l=r.concat,c=r.push,d=r.indexOf,h={},p=h.toString,f=h.hasOwnProperty,m=f.toString,g=m.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=function(e){return null!=e&&e===e.window},w={type:!0,src:!0,noModule:!0};function b(e,t,n){var i,s=(t=t||o).createElement("script");if(s.text=e,n)for(i in w)n[i]&&(s[i]=n[i]);t.head.appendChild(s).parentNode.removeChild(s)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[p.call(e)]||"object":typeof e}var k=function(e,t){return new k.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function N(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!y(e)&&!_(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}k.fn=k.prototype={jquery:"3.3.1",constructor:k,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},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:r.sort,splice:r.splice},k.extend=k.fn.extend=function(){var e,t,n,i,s,r,o=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[a]||{},a++),"object"==typeof o||y(o)||(o={}),a===u&&(o=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)n=o[t],o!==(i=e[t])&&(l&&i&&(k.isPlainObject(i)||(s=Array.isArray(i)))?(s?(s=!1,r=n&&Array.isArray(n)?n:[]):r=n&&k.isPlainObject(n)?n:{},o[t]=k.extend(l,r,i)):void 0!==i&&(o[t]=i));return o},k.extend({expando:"jQuery"+("3.3.1"+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=f.call(t,"constructor")&&t.constructor)&&m.call(n)===g)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){b(e)},each:function(e,t){var n,i=0;if(N(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},trim:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(N(Object(e))?k.merge(n,"string"==typeof e?[e]:e):c.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:d.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,s=e.length;i<n;i++)e[s++]=t[i];return e.length=s,e},grep:function(e,t,n){for(var i=[],s=0,r=e.length,o=!n;s<r;s++)!t(e[s],s)!==o&&i.push(e[s]);return i},map:function(e,t,n){var i,s,r=0,o=[];if(N(e))for(i=e.length;r<i;r++)null!=(s=t(e[r],r,n))&&o.push(s);else for(r in e)null!=(s=t(e[r],r,n))&&o.push(s);return l.apply([],o)},guid:1,support:v}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=r[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){h["[object "+t+"]"]=t.toLowerCase()});var T=
/*!
 * Sizzle CSS Selector Engine v2.3.3
 * https://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-08-08
 */
function(e){var t,n,i,s,r,o,a,u,l,c,d,h,p,f,m,g,v,y,_,w="sizzle"+1*new Date,b=e.document,x=0,k=0,C=oe(),N=oe(),T=oe(),S=function(e,t){return e===t&&(d=!0),0},E={}.hasOwnProperty,j=[],D=j.pop,A=j.push,L=j.push,z=j.slice,I=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",O="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",q="\\["+H+"*("+O+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+H+"*\\]",F=":("+O+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+q+")*)|.*)\\)|)",M=new RegExp(H+"+","g"),R=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),W=new RegExp("^"+H+"*,"+H+"*"),$=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),B=new RegExp("="+H+"*([^\\]'\"]*?)"+H+"*\\]","g"),U=new RegExp(F),Q=new RegExp("^"+O+"$"),V={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},K=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),ee=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){h()},se=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(j=z.call(b.childNodes),b.childNodes),j[b.childNodes.length].nodeType}catch(e){L={apply:j.length?function(e,t){A.apply(e,z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function re(e,t,i,s){var r,a,l,c,d,f,v,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return i;if(!s&&((t?t.ownerDocument||t:b)!==p&&h(t),t=t||p,m)){if(11!==x&&(d=Y.exec(e)))if(r=d[1]){if(9===x){if(!(l=t.getElementById(r)))return i;if(l.id===r)return i.push(l),i}else if(y&&(l=y.getElementById(r))&&_(t,l)&&l.id===r)return i.push(l),i}else{if(d[2])return L.apply(i,t.getElementsByTagName(e)),i;if((r=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(i,t.getElementsByClassName(r)),i}if(n.qsa&&!T[e+" "]&&(!g||!g.test(e))){if(1!==x)y=t,v=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=w),a=(f=o(e)).length;a--;)f[a]="#"+c+" "+ve(f[a]);v=f.join(","),y=J.test(e)&&me(t.parentNode)||t}if(v)try{return L.apply(i,y.querySelectorAll(v)),i}catch(e){}finally{c===w&&t.removeAttribute("id")}}}return u(e.replace(R,"$1"),t,i,s)}function oe(){var e=[];return function t(n,s){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=s}}function ae(e){return e[w]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),s=n.length;s--;)i.attrHandle[n[s]]=t}function ce(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(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&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function fe(e){return ae(function(t){return t=+t,ae(function(n,i){for(var s,r=e([],n.length,t),o=r.length;o--;)n[s=r[o]]&&(n[s]=!(i[s]=n[s]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=re.support={},r=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},h=re.setDocument=function(e){var t,s,o=e?e.ownerDocument||e:b;return o!==p&&9===o.nodeType&&o.documentElement?(f=(p=o).documentElement,m=!r(p),b!==p&&(s=p.defaultView)&&s.top!==s&&(s.addEventListener?s.addEventListener("unload",ie,!1):s.attachEvent&&s.attachEvent("onunload",ie)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=ue(function(e){return f.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length}),n.getById?(i.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,i,s,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(s=t.getElementsByName(e),i=0;r=s[i++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],s=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[s++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=G.test(p.querySelectorAll))&&(ue(function(e){f.appendChild(e).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+H+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+w+"-]").length||g.push("~="),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||g.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=G.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",F)}),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=G.test(f.compareDocumentPosition),_=t||G.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e===p||e.ownerDocument===b&&_(b,e)?-1:t===p||t.ownerDocument===b&&_(b,t)?1:c?I(c,e)-I(c,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,s=e.parentNode,r=t.parentNode,o=[e],a=[t];if(!s||!r)return e===p?-1:t===p?1:s?-1:r?1:c?I(c,e)-I(c,t):0;if(s===r)return ce(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;o[i]===a[i];)i++;return i?ce(o[i],a[i]):o[i]===b?-1:a[i]===b?1:0},p):p},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&h(e),t=t.replace(B,"='$1']"),n.matchesSelector&&m&&!T[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return re(t,p,null,[e]).length>0},re.contains=function(e,t){return(e.ownerDocument||e)!==p&&h(e),_(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==p&&h(e);var s=i.attrHandle[t.toLowerCase()],r=s&&E.call(i.attrHandle,t.toLowerCase())?s(e,t,!m):void 0;return void 0!==r?r:n.attributes||!m?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},re.escape=function(e){return(e+"").replace(te,ne)},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,i=[],s=0,r=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(S),d){for(;t=e[r++];)t===e[r]&&(s=i.push(r));for(;s--;)e.splice(i[s],1)}return c=null,e},s=re.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=s(t);return n},(i=re.selectors={cacheLength:50,createPseudo:ae,match:V,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(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===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]||re.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]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=o(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(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&C(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(i){var s=re.attr(i,e);return null==s?"!="===t:!t||(s+="","="===t?s===n:"!="===t?s!==n:"^="===t?n&&0===s.indexOf(n):"*="===t?n&&s.indexOf(n)>-1:"$="===t?n&&s.slice(-n.length)===n:"~="===t?(" "+s.replace(M," ")+" ").indexOf(n)>-1:"|="===t&&(s===n||s.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,s){var r="nth"!==e.slice(0,3),o="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===s?function(e){return!!e.parentNode}:function(t,n,u){var l,c,d,h,p,f,m=r!==o?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!u&&!a,_=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===e&&!f&&"nextSibling"}return!0}if(f=[o?g.firstChild:g.lastChild],o&&y){for(_=(p=(l=(c=(d=(h=g)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===x&&l[1])&&l[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(_=p=0)||f.pop();)if(1===h.nodeType&&++_&&h===t){c[e]=[x,p,_];break}}else if(y&&(_=p=(l=(c=(d=(h=t)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===x&&l[1]),!1===_)for(;(h=++p&&h&&h[m]||(_=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++_||(y&&((c=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[x,_]),h!==t)););return(_-=s)===i||_%i==0&&_/i>=0}}},PSEUDO:function(e,t){var n,s=i.pseudos[e]||i.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return s[w]?s(t):s.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,n){for(var i,r=s(e,t),o=r.length;o--;)e[i=I(e,r[o])]=!(n[i]=r[o])}):function(e){return s(e,0,n)}):s}},pseudos:{not:ae(function(e){var t=[],n=[],i=a(e.replace(R,"$1"));return i[w]?ae(function(e,t,n,s){for(var r,o=i(e,null,s,[]),a=e.length;a--;)(r=o[a])&&(e[a]=!(t[a]=r))}):function(e,s,r){return t[0]=e,i(t,null,r,n),t[0]=null,!n.pop()}}),has:ae(function(e){return function(t){return re(e,t).length>0}}),contains:ae(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),lang:ae(function(e){return Q.test(e||"")||re.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=m?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(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:fe(function(){return[0]}),last:fe(function(e,t){return[t-1]}),eq:fe(function(e,t,n){return[n<0?n+t:n]}),even:fe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:fe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:fe(function(e,t,n){for(var i=n<0?n+t:n;--i>=0;)e.push(i);return e}),gt:fe(function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e})}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=he(t);function ge(){}function ve(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function ye(e,t,n){var i=t.dir,s=t.next,r=s||i,o=n&&"parentNode"===r,a=k++;return t.first?function(t,n,s){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,s);return!1}:function(t,n,u){var l,c,d,h=[x,a];if(u){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,u))return!0}else for(;t=t[i];)if(1===t.nodeType||o)if(c=(d=t[w]||(t[w]={}))[t.uniqueID]||(d[t.uniqueID]={}),s&&s===t.nodeName.toLowerCase())t=t[i]||t;else{if((l=c[r])&&l[0]===x&&l[1]===a)return h[2]=l[2];if(c[r]=h,h[2]=e(t,n,u))return!0}return!1}}function _e(e){return e.length>1?function(t,n,i){for(var s=e.length;s--;)if(!e[s](t,n,i))return!1;return!0}:e[0]}function we(e,t,n,i,s){for(var r,o=[],a=0,u=e.length,l=null!=t;a<u;a++)(r=e[a])&&(n&&!n(r,i,s)||(o.push(r),l&&t.push(a)));return o}function be(e,t,n,i,s,r){return i&&!i[w]&&(i=be(i)),s&&!s[w]&&(s=be(s,r)),ae(function(r,o,a,u){var l,c,d,h=[],p=[],f=o.length,m=r||function(e,t,n){for(var i=0,s=t.length;i<s;i++)re(e,t[i],n);return n}(t||"*",a.nodeType?[a]:a,[]),g=!e||!r&&t?m:we(m,h,e,a,u),v=n?s||(r?e:f||i)?[]:o:g;if(n&&n(g,v,a,u),i)for(l=we(v,p),i(l,[],a,u),c=l.length;c--;)(d=l[c])&&(v[p[c]]=!(g[p[c]]=d));if(r){if(s||e){if(s){for(l=[],c=v.length;c--;)(d=v[c])&&l.push(g[c]=d);s(null,v=[],l,u)}for(c=v.length;c--;)(d=v[c])&&(l=s?I(r,d):h[c])>-1&&(r[l]=!(o[l]=d))}}else v=we(v===o?v.splice(f,v.length):v),s?s(null,o,v,u):L.apply(o,v)})}function xe(e){for(var t,n,s,r=e.length,o=i.relative[e[0].type],a=o||i.relative[" "],u=o?1:0,c=ye(function(e){return e===t},a,!0),d=ye(function(e){return I(t,e)>-1},a,!0),h=[function(e,n,i){var s=!o&&(i||n!==l)||((t=n).nodeType?c(e,n,i):d(e,n,i));return t=null,s}];u<r;u++)if(n=i.relative[e[u].type])h=[ye(_e(h),n)];else{if((n=i.filter[e[u].type].apply(null,e[u].matches))[w]){for(s=++u;s<r&&!i.relative[e[s].type];s++);return be(u>1&&_e(h),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(R,"$1"),n,u<s&&xe(e.slice(u,s)),s<r&&xe(e=e.slice(s)),s<r&&ve(e))}h.push(n)}return _e(h)}return ge.prototype=i.filters=i.pseudos,i.setFilters=new ge,o=re.tokenize=function(e,t){var n,s,r,o,a,u,l,c=N[e+" "];if(c)return t?0:c.slice(0);for(a=e,u=[],l=i.preFilter;a;){for(o in n&&!(s=W.exec(a))||(s&&(a=a.slice(s[0].length)||a),u.push(r=[])),n=!1,(s=$.exec(a))&&(n=s.shift(),r.push({value:n,type:s[0].replace(R," ")}),a=a.slice(n.length)),i.filter)!(s=V[o].exec(a))||l[o]&&!(s=l[o](s))||(n=s.shift(),r.push({value:n,type:o,matches:s}),a=a.slice(n.length));if(!n)break}return t?a.length:a?re.error(e):N(e,u).slice(0)},a=re.compile=function(e,t){var n,s=[],r=[],a=T[e+" "];if(!a){for(t||(t=o(e)),n=t.length;n--;)(a=xe(t[n]))[w]?s.push(a):r.push(a);(a=T(e,function(e,t){var n=t.length>0,s=e.length>0,r=function(r,o,a,u,c){var d,f,g,v=0,y="0",_=r&&[],w=[],b=l,k=r||s&&i.find.TAG("*",c),C=x+=null==b?1:Math.random()||.1,N=k.length;for(c&&(l=o===p||o||c);y!==N&&null!=(d=k[y]);y++){if(s&&d){for(f=0,o||d.ownerDocument===p||(h(d),a=!m);g=e[f++];)if(g(d,o||p,a)){u.push(d);break}c&&(x=C)}n&&((d=!g&&d)&&v--,r&&_.push(d))}if(v+=y,n&&y!==v){for(f=0;g=t[f++];)g(_,w,o,a);if(r){if(v>0)for(;y--;)_[y]||w[y]||(w[y]=D.call(u));w=we(w)}L.apply(u,w),c&&!r&&w.length>0&&v+t.length>1&&re.uniqueSort(u)}return c&&(x=C,l=b),_};return n?ae(r):r}(r,s))).selector=e}return a},u=re.select=function(e,t,n,s){var r,u,l,c,d,h="function"==typeof e&&e,p=!s&&o(e=h.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&m&&i.relative[u[1].type]){if(!(t=(i.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(r=V.needsContext.test(e)?0:u.length;r--&&(l=u[r],!i.relative[c=l.type]);)if((d=i.find[c])&&(s=d(l.matches[0].replace(Z,ee),J.test(u[0].type)&&me(t.parentNode)||t))){if(u.splice(r,1),!(e=s.length&&ve(u)))return L.apply(n,s),n;break}}return(h||a(e,p))(s,t,!m,n,!t||J.test(e)&&me(t.parentNode)||t),n},n.sortStable=w.split("").sort(S).join("")===w,n.detectDuplicates=!!d,h(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),re}(n);k.find=T,k.expr=T.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=T.uniqueSort,k.text=T.getText,k.isXMLDoc=T.isXML,k.contains=T.contains,k.escapeSelector=T.escape;var S=function(e,t,n){for(var i=[],s=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(s&&k(e).is(n))break;i.push(e)}return i},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},j=k.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return y(t)?k.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?k.grep(e,function(e){return e===t!==n}):"string"!=typeof t?k.grep(e,function(e){return d.call(t,e)>-1!==n}):k.filter(t,e,n)}k.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?k.find.matchesSelector(i,e)?[i]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,i=this.length,s=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<i;t++)if(k.contains(s[t],this))return!0}));for(n=this.pushStack([]),t=0;t<i;t++)k.find(e,s[t],n);return i>1?k.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&j.test(e)?k(e):e||[],!1).length}});var z,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var i,s;if(!e)return this;if(n=n||z,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:I.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:o,!0)),A.test(i[1])&&k.isPlainObject(t))for(i in t)y(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(s=o.getElementById(i[2]))&&(this[0]=s,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,z=k(o);var P=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,i=0,s=this.length,r=[],o="string"!=typeof e&&k(e);if(!j.test(e))for(;i<s;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&k.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?k.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?d.call(k(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return S(e,"parentNode")},parentsUntil:function(e,t,n){return S(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,n){return S(e,"nextSibling",n)},prevUntil:function(e,t,n){return S(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return D(e,"iframe")?e.contentDocument:(D(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(e,t){k.fn[e]=function(n,i){var s=k.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(s=k.filter(i,s)),this.length>1&&(H[e]||k.uniqueSort(s),P.test(e)&&s.reverse()),this.pushStack(s)}});var q=/[^\x20\t\r\n\f]+/g;function F(e){return e}function M(e){throw e}function R(e,t,n,i){var s;try{e&&y(s=e.promise)?s.call(e).done(t).fail(n):e&&y(s=e.then)?s.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return k.each(e.match(q)||[],function(e,n){t[n]=!0}),t}(e):k.extend({},e);var t,n,i,s,r=[],o=[],a=-1,u=function(){for(s=s||e.once,i=t=!0;o.length;a=-1)for(n=o.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&e.stopOnFalse&&(a=r.length,n=!1);e.memory||(n=!1),t=!1,s&&(r=n?[]:"")},l={add:function(){return r&&(n&&!t&&(a=r.length-1,o.push(n)),function t(n){k.each(n,function(n,i){y(i)?e.unique&&l.has(i)||r.push(i):i&&i.length&&"string"!==x(i)&&t(i)})}(arguments),n&&!t&&u()),this},remove:function(){return k.each(arguments,function(e,t){for(var n;(n=k.inArray(t,r,n))>-1;)r.splice(n,1),n<=a&&a--}),this},has:function(e){return e?k.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return s=o=[],r=n="",this},disabled:function(){return!r},lock:function(){return s=o=[],n||t||(r=n=""),this},locked:function(){return!!s},fireWith:function(e,n){return s||(n=[e,(n=n||[]).slice?n.slice():n],o.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!i}};return l},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",s={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return s.then(null,e)},pipe:function(){var e=arguments;return k.Deferred(function(n){k.each(t,function(t,i){var s=y(e[i[4]])&&e[i[4]];r[i[1]](function(){var e=s&&s.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,s?[e]:arguments)})}),e=null}).promise()},then:function(e,i,s){var r=0;function o(e,t,i,s){return function(){var a=this,u=arguments,l=function(){var n,l;if(!(e<r)){if((n=i.apply(a,u))===t.promise())throw new TypeError("Thenable self-resolution");l=n&&("object"==typeof n||"function"==typeof n)&&n.then,y(l)?s?l.call(n,o(r,t,F,s),o(r,t,M,s)):(r++,l.call(n,o(r,t,F,s),o(r,t,M,s),o(r,t,F,t.notifyWith))):(i!==F&&(a=void 0,u=[n]),(s||t.resolveWith)(a,u))}},c=s?l:function(){try{l()}catch(n){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(n,c.stackTrace),e+1>=r&&(i!==M&&(a=void 0,u=[n]),t.rejectWith(a,u))}};e?c():(k.Deferred.getStackHook&&(c.stackTrace=k.Deferred.getStackHook()),n.setTimeout(c))}}return k.Deferred(function(n){t[0][3].add(o(0,n,y(s)?s:F,n.notifyWith)),t[1][3].add(o(0,n,y(e)?e:F)),t[2][3].add(o(0,n,y(i)?i:M))}).promise()},promise:function(e){return null!=e?k.extend(e,s):s}},r={};return k.each(t,function(e,n){var o=n[2],a=n[5];s[n[1]]=o.add,a&&o.add(function(){i=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(n[3].fire),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=o.fireWith}),s.promise(r),e&&e.call(r,r),r},when:function(e){var t=arguments.length,n=t,i=Array(n),s=u.call(arguments),r=k.Deferred(),o=function(e){return function(n){i[e]=this,s[e]=arguments.length>1?u.call(arguments):n,--t||r.resolveWith(i,s)}};if(t<=1&&(R(e,r.done(o(n)).resolve,r.reject,!t),"pending"===r.state()||y(s[n]&&s[n].then)))return r.then();for(;n--;)R(s[n],o(n),r.reject);return r.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&W.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){n.setTimeout(function(){throw e})};var $=k.Deferred();function B(){o.removeEventListener("DOMContentLoaded",B),n.removeEventListener("load",B),k.ready()}k.fn.ready=function(e){return $.then(e).catch(function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==e&&--k.readyWait>0||$.resolveWith(o,[k]))}}),k.ready.then=$.then,"complete"===o.readyState||"loading"!==o.readyState&&!o.documentElement.doScroll?n.setTimeout(k.ready):(o.addEventListener("DOMContentLoaded",B),n.addEventListener("load",B));var U=function(e,t,n,i,s,r,o){var a=0,u=e.length,l=null==n;if("object"===x(n))for(a in s=!0,n)U(e,t,a,n[a],!0,r,o);else if(void 0!==i&&(s=!0,y(i)||(o=!0),l&&(o?(t.call(e,i),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;a<u;a++)t(e[a],n,o?i:i.call(e[a],a,t(e[a],n)));return s?e:l?t.call(e):u?t(e[0],n):r},Q=/^-ms-/,V=/-([a-z])/g;function K(e,t){return t.toUpperCase()}function X(e){return e.replace(Q,"ms-").replace(V,K)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,s=this.cache(e);if("string"==typeof t)s[X(t)]=n;else for(i in t)s[X(i)]=t[i];return s},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in i?[t]:t.match(q)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||k.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var J=new Y,Z=new Y,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return Z.hasData(e)||J.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,i,s,r=this[0],o=r&&r.attributes;if(void 0===e){if(this.length&&(s=Z.get(r),1===r.nodeType&&!J.get(r,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(i=o[n].name).indexOf("data-")&&(i=X(i.slice(5)),ne(r,i,s[i]));J.set(r,"hasDataAttrs",!0)}return s}return"object"==typeof e?this.each(function(){Z.set(this,e)}):U(this,function(t){var n;if(r&&void 0===t)return void 0!==(n=Z.get(r,e))?n:void 0!==(n=ne(r,e))?n:void 0;this.each(function(){Z.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Z.remove(this,e)})}}),k.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=J.get(e,t),n&&(!i||Array.isArray(n)?i=J.access(e,t,k.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),i=n.length,s=n.shift(),r=k._queueHooks(e,t);"inprogress"===s&&(s=n.shift(),i--),s&&("fx"===t&&n.unshift("inprogress"),delete r.stop,s.call(e,function(){k.dequeue(e,t)},r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:k.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each(function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,s=k.Deferred(),r=this,o=this.length,a=function(){--i||s.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(n=J.get(r[o],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),s.promise(t)}});var ie=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,se=new RegExp("^(?:([+-])=|)("+ie+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],oe=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&k.contains(e.ownerDocument,e)&&"none"===k.css(e,"display")},ae=function(e,t,n,i){var s,r,o={};for(r in t)o[r]=e.style[r],e.style[r]=t[r];for(r in s=n.apply(e,i||[]),t)e.style[r]=o[r];return s};function ue(e,t,n,i){var s,r,o=20,a=i?function(){return i.cur()}:function(){return k.css(e,t,"")},u=a(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=(k.cssNumber[t]||"px"!==l&&+u)&&se.exec(k.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;o--;)k.style(e,t,c+l),(1-r)*(1-(r=a()/u||.5))<=0&&(o=0),c/=r;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,s=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=l,i.start=c,i.end=s)),s}var le={};function ce(e){var t,n=e.ownerDocument,i=e.nodeName,s=le[i];return s||(t=n.body.appendChild(n.createElement(i)),s=k.css(t,"display"),t.parentNode.removeChild(t),"none"===s&&(s="block"),le[i]=s,s)}function de(e,t){for(var n,i,s=[],r=0,o=e.length;r<o;r++)(i=e[r]).style&&(n=i.style.display,t?("none"===n&&(s[r]=J.get(i,"display")||null,s[r]||(i.style.display="")),""===i.style.display&&oe(i)&&(s[r]=ce(i))):"none"!==n&&(s[r]="none",J.set(i,"display",n)));for(r=0;r<o;r++)null!=s[r]&&(e[r].style.display=s[r]);return e}k.fn.extend({show:function(){return de(this,!0)},hide:function(){return de(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){oe(this)?k(this).show():k(this).hide()})}});var he=/^(?:checkbox|radio)$/i,pe=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,me={option:[1,"<select multiple='multiple'>","</select>"],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 ge(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?k.merge([e],n):n}function ve(e,t){for(var n=0,i=e.length;n<i;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}me.optgroup=me.option,me.tbody=me.tfoot=me.colgroup=me.caption=me.thead,me.th=me.td;var ye=/<|&#?\w+;/;function _e(e,t,n,i,s){for(var r,o,a,u,l,c,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p<f;p++)if((r=e[p])||0===r)if("object"===x(r))k.merge(h,r.nodeType?[r]:r);else if(ye.test(r)){for(o=o||d.appendChild(t.createElement("div")),a=(pe.exec(r)||["",""])[1].toLowerCase(),u=me[a]||me._default,o.innerHTML=u[1]+k.htmlPrefilter(r)+u[2],c=u[0];c--;)o=o.lastChild;k.merge(h,o.childNodes),(o=d.firstChild).textContent=""}else h.push(t.createTextNode(r));for(d.textContent="",p=0;r=h[p++];)if(i&&k.inArray(r,i)>-1)s&&s.push(r);else if(l=k.contains(r.ownerDocument,r),o=ge(d.appendChild(r),"script"),l&&ve(o),n)for(c=0;r=o[c++];)fe.test(r.type||"")&&n.push(r);return d}!function(){var e=o.createDocumentFragment().appendChild(o.createElement("div")),t=o.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),v.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var we=o.documentElement,be=/^key/,xe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ke=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ne(){return!1}function Te(){try{return o.activeElement}catch(e){}}function Se(e,t,n,i,s,r){var o,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Se(e,a,n,i,t[a],r);return e}if(null==i&&null==s?(s=n,i=n=void 0):null==s&&("string"==typeof n?(s=i,i=void 0):(s=i,i=n,n=void 0)),!1===s)s=Ne;else if(!s)return e;return 1===r&&(o=s,(s=function(e){return k().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=k.guid++)),e.each(function(){k.event.add(this,t,s,i,n)})}k.event={global:{},add:function(e,t,n,i,s){var r,o,a,u,l,c,d,h,p,f,m,g=J.get(e);if(g)for(n.handler&&(n=(r=n).handler,s=r.selector),s&&k.find.matchesSelector(we,s),n.guid||(n.guid=k.guid++),(u=g.events)||(u=g.events={}),(o=g.handle)||(o=g.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(q)||[""]).length;l--;)p=m=(a=ke.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=k.event.special[p]||{},p=(s?d.delegateType:d.bindType)||p,d=k.event.special[p]||{},c=k.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:s,needsContext:s&&k.expr.match.needsContext.test(s),namespace:f.join(".")},r),(h=u[p])||((h=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,f,o)||e.addEventListener&&e.addEventListener(p,o)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),s?h.splice(h.delegateCount++,0,c):h.push(c),k.event.global[p]=!0)},remove:function(e,t,n,i,s){var r,o,a,u,l,c,d,h,p,f,m,g=J.hasData(e)&&J.get(e);if(g&&(u=g.events)){for(l=(t=(t||"").match(q)||[""]).length;l--;)if(p=m=(a=ke.exec(t[l])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=k.event.special[p]||{},h=u[p=(i?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=r=h.length;r--;)c=h[r],!s&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(r,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(e,c));o&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,f,g.handle)||k.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)k.event.remove(e,p+t[l],n,i,!0);k.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,i,s,r,o,a=k.event.fix(e),u=new Array(arguments.length),l=(J.get(this,"events")||{})[a.type]||[],c=k.event.special[a.type]||{};for(u[0]=a,t=1;t<arguments.length;t++)u[t]=arguments[t];if(a.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,a)){for(o=k.event.handlers.call(this,a,l),t=0;(s=o[t++])&&!a.isPropagationStopped();)for(a.currentTarget=s.elem,n=0;(r=s.handlers[n++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(r.namespace)||(a.handleObj=r,a.data=r.data,void 0!==(i=((k.event.special[r.origType]||{}).handle||r.handler).apply(s.elem,u))&&!1===(a.result=i)&&(a.preventDefault(),a.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,a),a.result}},handlers:function(e,t){var n,i,s,r,o,a=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(r=[],o={},n=0;n<u;n++)void 0===o[s=(i=t[n]).selector+" "]&&(o[s]=i.needsContext?k(s,this).index(l)>-1:k.find(s,this,null,[l]).length),o[s]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return l=this,u<t.length&&a.push({elem:l,handlers:t.slice(u)}),a},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:y(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[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Te()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Te()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&D(this,"input"))return this.click(),!1},_default:function(e){return D(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ne,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&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Ne,isPropagationStopped:Ne,isImmediatePropagationStopped:Ne,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.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,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:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&xe.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=e.relatedTarget,s=e.handleObj;return i&&(i===this||k.contains(this,i))||(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),k.fn.extend({on:function(e,t,n,i){return Se(this,e,t,n,i)},one:function(e,t,n,i){return Se(this,e,t,n,i,1)},off:function(e,t,n){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,k(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(s in e)this.off(s,t,e[s]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ne),this.each(function(){k.event.remove(this,e,n,t)})}});var Ee=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,je=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,Ae=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function ze(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,i,s,r,o,a,u,l;if(1===t.nodeType){if(J.hasData(e)&&(r=J.access(e),o=J.set(t,r),l=r.events))for(s in delete o.handle,o.events={},l)for(n=0,i=l[s].length;n<i;n++)k.event.add(t,s,l[s][n]);Z.hasData(e)&&(a=Z.access(e),u=k.extend({},a),Z.set(t,u))}}function He(e,t){var n=t.nodeName.toLowerCase();"input"===n&&he.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Oe(e,t,n,i){t=l.apply([],t);var s,r,o,a,u,c,d=0,h=e.length,p=h-1,f=t[0],m=y(f);if(m||h>1&&"string"==typeof f&&!v.checkClone&&De.test(f))return e.each(function(s){var r=e.eq(s);m&&(t[0]=f.call(this,s,r.html())),Oe(r,t,n,i)});if(h&&(r=(s=_e(t,e[0].ownerDocument,!1,e,i)).firstChild,1===s.childNodes.length&&(s=r),r||i)){for(a=(o=k.map(ge(s,"script"),ze)).length;d<h;d++)u=s,d!==p&&(u=k.clone(u,!0,!0),a&&k.merge(o,ge(u,"script"))),n.call(e[d],u,d);if(a)for(c=o[o.length-1].ownerDocument,k.map(o,Ie),d=0;d<a;d++)u=o[d],fe.test(u.type||"")&&!J.access(u,"globalEval")&&k.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&k._evalUrl(u.src):b(u.textContent.replace(Ae,""),c,u))}return e}function qe(e,t,n){for(var i,s=t?k.filter(t,e):e,r=0;null!=(i=s[r]);r++)n||1!==i.nodeType||k.cleanData(ge(i)),i.parentNode&&(n&&k.contains(i.ownerDocument,i)&&ve(ge(i,"script")),i.parentNode.removeChild(i));return e}k.extend({htmlPrefilter:function(e){return e.replace(Ee,"<$1></$2>")},clone:function(e,t,n){var i,s,r,o,a=e.cloneNode(!0),u=k.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(o=ge(a),i=0,s=(r=ge(e)).length;i<s;i++)He(r[i],o[i]);if(t)if(n)for(r=r||ge(e),o=o||ge(a),i=0,s=r.length;i<s;i++)Pe(r[i],o[i]);else Pe(e,a);return(o=ge(a,"script")).length>0&&ve(o,!u&&ge(e,"script")),a},cleanData:function(e){for(var t,n,i,s=k.event.special,r=0;void 0!==(n=e[r]);r++)if(G(n)){if(t=n[J.expando]){if(t.events)for(i in t.events)s[i]?k.event.remove(n,i):k.removeEvent(n,i,t.handle);n[J.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),k.fn.extend({detach:function(e){return qe(this,e,!0)},remove:function(e){return qe(this,e)},text:function(e){return U(this,function(e){return void 0===e?k.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 Oe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Oe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Oe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Oe(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&&(k.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return U(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!je.test(e)&&!me[(pe.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ge(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Oe(this,arguments,function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(ge(this)),n&&n.replaceChild(t,this))},e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){k.fn[e]=function(e){for(var n,i=[],s=k(e),r=s.length-1,o=0;o<=r;o++)n=o===r?this:this.clone(!0),k(s[o])[t](n),c.apply(i,n.get());return this.pushStack(i)}});var Fe=new RegExp("^("+ie+")(?!px)[a-z%]+$","i"),Me=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},Re=new RegExp(re.join("|"),"i");function We(e,t,n){var i,s,r,o,a=e.style;return(n=n||Me(e))&&(""!==(o=n.getPropertyValue(t)||n[t])||k.contains(e.ownerDocument,e)||(o=k.style(e,t)),!v.pixelBoxStyles()&&Fe.test(o)&&Re.test(t)&&(i=a.width,s=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=o,o=n.width,a.width=i,a.minWidth=s,a.maxWidth=r)),void 0!==o?o+"":o}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",we.appendChild(l).appendChild(c);var e=n.getComputedStyle(c);i="1%"!==e.top,u=12===t(e.marginLeft),c.style.right="60%",a=36===t(e.right),s=36===t(e.width),c.style.position="absolute",r=36===c.offsetWidth||"absolute",we.removeChild(l),c=null}}function t(e){return Math.round(parseFloat(e))}var i,s,r,a,u,l=o.createElement("div"),c=o.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===c.style.backgroundClip,k.extend(v,{boxSizingReliable:function(){return e(),s},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),u},scrollboxSize:function(){return e(),r}}))}();var Be=/^(none|table(?!-c[ea]).+)/,Ue=/^--/,Qe={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ke=["Webkit","Moz","ms"],Xe=o.createElement("div").style;function Ge(e){var t=k.cssProps[e];return t||(t=k.cssProps[e]=function(e){if(e in Xe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Ke.length;n--;)if((e=Ke[n]+t)in Xe)return e}(e)||e),t}function Ye(e,t,n){var i=se.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function Je(e,t,n,i,s,r){var o="width"===t?1:0,a=0,u=0;if(n===(i?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(u+=k.css(e,n+re[o],!0,s)),i?("content"===n&&(u-=k.css(e,"padding"+re[o],!0,s)),"margin"!==n&&(u-=k.css(e,"border"+re[o]+"Width",!0,s))):(u+=k.css(e,"padding"+re[o],!0,s),"padding"!==n?u+=k.css(e,"border"+re[o]+"Width",!0,s):a+=k.css(e,"border"+re[o]+"Width",!0,s));return!i&&r>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-u-a-.5))),u}function Ze(e,t,n){var i=Me(e),s=We(e,t,i),r="border-box"===k.css(e,"boxSizing",!1,i),o=r;if(Fe.test(s)){if(!n)return s;s="auto"}return o=o&&(v.boxSizingReliable()||s===e.style[t]),("auto"===s||!parseFloat(s)&&"inline"===k.css(e,"display",!1,i))&&(s=e["offset"+t[0].toUpperCase()+t.slice(1)],o=!0),(s=parseFloat(s)||0)+Je(e,t,n||(r?"border":"content"),o,i,s)+"px"}function et(e,t,n,i,s){return new et.prototype.init(e,t,n,i,s)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,r,o,a=X(t),u=Ue.test(t),l=e.style;if(u||(t=Ge(a)),o=k.cssHooks[t]||k.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(s=o.get(e,!1,i))?s:l[t];"string"===(r=typeof n)&&(s=se.exec(n))&&s[1]&&(n=ue(e,t,s),r="number"),null!=n&&n==n&&("number"===r&&(n+=s&&s[3]||(k.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,i))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,i){var s,r,o,a=X(t);return Ue.test(t)||(t=Ge(a)),(o=k.cssHooks[t]||k.cssHooks[a])&&"get"in o&&(s=o.get(e,!0,n)),void 0===s&&(s=We(e,t,i)),"normal"===s&&t in Ve&&(s=Ve[t]),""===n||n?(r=parseFloat(s),!0===n||isFinite(r)?r||0:s):s}}),k.each(["height","width"],function(e,t){k.cssHooks[t]={get:function(e,n,i){if(n)return!Be.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,t,i):ae(e,Qe,function(){return Ze(e,t,i)})},set:function(e,n,i){var s,r=Me(e),o="border-box"===k.css(e,"boxSizing",!1,r),a=i&&Je(e,t,i,o,r);return o&&v.scrollboxSize()===r.position&&(a-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-Je(e,t,"border",!1,r)-.5)),a&&(s=se.exec(n))&&"px"!==(s[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),Ye(0,n,a)}}}),k.cssHooks.marginLeft=$e(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-ae(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(e,t){k.cssHooks[e+t]={expand:function(n){for(var i=0,s={},r="string"==typeof n?n.split(" "):[n];i<4;i++)s[e+re[i]+t]=r[i]||r[i-2]||r[0];return s}},"margin"!==e&&(k.cssHooks[e+t].set=Ye)}),k.fn.extend({css:function(e,t){return U(this,function(e,t,n){var i,s,r={},o=0;if(Array.isArray(t)){for(i=Me(e),s=t.length;o<s;o++)r[t[o]]=k.css(e,t[o],!1,i);return r}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,arguments.length>1)}}),k.Tween=et,et.prototype={constructor:et,init:function(e,t,n,i,s,r){this.elem=e,this.prop=n,this.easing=s||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(k.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}},et.prototype.init.prototype=et.prototype,et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[k.cssProps[e.prop]]&&!k.cssHooks[e.prop]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}},et.propHooks.scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=et.prototype.init,k.fx.step={};var tt,nt,it=/^(?:toggle|show|hide)$/,st=/queueHooks$/;function rt(){nt&&(!1===o.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(rt):n.setTimeout(rt,k.fx.interval),k.fx.tick())}function ot(){return n.setTimeout(function(){tt=void 0}),tt=Date.now()}function at(e,t){var n,i=0,s={height:e};for(t=t?1:0;i<4;i+=2-t)s["margin"+(n=re[i])]=s["padding"+n]=e;return t&&(s.opacity=s.width=e),s}function ut(e,t,n){for(var i,s=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),r=0,o=s.length;r<o;r++)if(i=s[r].call(n,t,e))return i}function lt(e,t,n){var i,s,r=0,o=lt.prefilters.length,a=k.Deferred().always(function(){delete u.elem}),u=function(){if(s)return!1;for(var t=tt||ot(),n=Math.max(0,l.startTime+l.duration-t),i=1-(n/l.duration||0),r=0,o=l.tweens.length;r<o;r++)l.tweens[r].run(i);return a.notifyWith(e,[l,i,n]),i<1&&o?n:(o||a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||ot(),duration:n.duration,tweens:[],createTween:function(t,n){var i=k.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){var n=0,i=t?l.tweens.length:0;if(s)return this;for(s=!0;n<i;n++)l.tweens[n].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,i,s,r,o;for(n in e)if(s=t[i=X(n)],r=e[n],Array.isArray(r)&&(s=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),(o=k.cssHooks[i])&&"expand"in o)for(n in r=o.expand(r),delete e[i],r)n in e||(e[n]=r[n],t[n]=s);else t[i]=s}(c,l.opts.specialEasing);r<o;r++)if(i=lt.prefilters[r].call(l,e,c,l.opts))return y(i.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=i.stop.bind(i)),i;return k.map(c,ut,l),y(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,se.exec(t),n),n}]},tweener:function(e,t){y(e)?(t=e,e=["*"]):e=e.match(q);for(var n,i=0,s=e.length;i<s;i++)n=e[i],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,s,r,o,a,u,l,c,d="width"in t||"height"in t,h=this,p={},f=e.style,m=e.nodeType&&oe(e),g=J.get(e,"fxshow");for(i in n.queue||(null==(o=k._queueHooks(e,"fx")).unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,h.always(function(){h.always(function(){o.unqueued--,k.queue(e,"fx").length||o.empty.fire()})})),t)if(s=t[i],it.test(s)){if(delete t[i],r=r||"toggle"===s,s===(m?"hide":"show")){if("show"!==s||!g||void 0===g[i])continue;m=!0}p[i]=g&&g[i]||k.style(e,i)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(p))for(i in d&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(l=g&&g.display)&&(l=J.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(de([e],!0),l=e.style.display||l,c=k.css(e,"display"),de([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(h.done(function(){f.display=l}),null==l&&(c=f.display,l="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",h.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]})),u=!1,p)u||(g?"hidden"in g&&(m=g.hidden):g=J.access(e,"fxshow",{display:l}),r&&(g.hidden=!m),m&&de([e],!0),h.done(function(){for(i in m||de([e]),J.remove(e,"fxshow"),p)k.style(e,i,p[i])})),u=ut(m?g[i]:0,i,h),i in g||(g[i]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),k.speed=function(e,t,n){var i=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||y(e)&&e,duration:e,easing:n&&t||t&&!y(t)&&t};return k.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in k.fx.speeds?i.duration=k.fx.speeds[i.duration]:i.duration=k.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){y(i.old)&&i.old.call(this),i.queue&&k.dequeue(this,i.queue)},i},k.fn.extend({fadeTo:function(e,t,n,i){return this.filter(oe).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var s=k.isEmptyObject(e),r=k.speed(t,n,i),o=function(){var t=lt(this,k.extend({},e),r);(s||J.get(this,"finish"))&&t.stop(!0)};return o.finish=o,s||!1===r.queue?this.each(o):this.queue(r.queue,o)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,s=null!=e&&e+"queueHooks",r=k.timers,o=J.get(this);if(s)o[s]&&o[s].stop&&i(o[s]);else for(s in o)o[s]&&o[s].stop&&st.test(s)&&i(o[s]);for(s=r.length;s--;)r[s].elem!==this||null!=e&&r[s].queue!==e||(r[s].anim.stop(n),t=!1,r.splice(s,1));!t&&n||k.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),i=n[e+"queue"],s=n[e+"queueHooks"],r=k.timers,o=i?i.length:0;for(n.finish=!0,k.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<o;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),k.each(["toggle","show","hide"],function(e,t){var n=k.fn[t];k.fn[t]=function(e,i,s){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(at(t,!0),e,i,s)}}),k.each({slideDown:at("show"),slideUp:at("hide"),slideToggle:at("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){k.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),tt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){nt||(nt=!0,rt())},k.fx.stop=function(){nt=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,t=t||"fx",this.queue(t,function(t,i){var s=n.setTimeout(t,e);i.stop=function(){n.clearTimeout(s)}})},function(){var e=o.createElement("input"),t=o.createElement("select").appendChild(o.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=o.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var ct,dt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return U(this,k.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var i,s,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?k.prop(e,t,n):(1===r&&k.isXMLDoc(e)||(s=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):s&&"set"in s&&void 0!==(i=s.set(e,n,t))?i:(e.setAttribute(t,n+""),n):s&&"get"in s&&null!==(i=s.get(e,t))?i:null==(i=k.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,s=t&&t.match(q);if(s&&1===e.nodeType)for(;n=s[i++];)e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||k.find.attr;dt[t]=function(e,t,i){var s,r,o=t.toLowerCase();return i||(r=dt[o],dt[o]=s,s=null!=n(e,t,i)?o:null,dt[o]=r),s}});var ht=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;function ft(e){return(e.match(q)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function gt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(q)||[]}k.fn.extend({prop:function(e,t){return U(this,k.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var i,s,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&k.isXMLDoc(e)||(t=k.propFix[t]||t,s=k.propHooks[t]),void 0!==n?s&&"set"in s&&void 0!==(i=s.set(e,n,t))?i:e[t]=n:s&&"get"in s&&null!==(i=s.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(k.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)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(e){var t,n,i,s,r,o,a,u=0;if(y(e))return this.each(function(t){k(this).addClass(e.call(this,t,mt(this)))});if((t=gt(e)).length)for(;n=this[u++];)if(s=mt(n),i=1===n.nodeType&&" "+ft(s)+" "){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s!==(a=ft(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,s,r,o,a,u=0;if(y(e))return this.each(function(t){k(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=gt(e)).length)for(;n=this[u++];)if(s=mt(n),i=1===n.nodeType&&" "+ft(s)+" "){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");s!==(a=ft(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):y(e)?this.each(function(n){k(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,s,r,o;if(i)for(s=0,r=k(this),o=gt(e);t=o[s++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+ft(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;k.fn.extend({val:function(e){var t,n,i,s=this[0];return arguments.length?(i=y(e),this.each(function(n){var s;1===this.nodeType&&(null==(s=i?e.call(this,n,k(this).val()):e)?s="":"number"==typeof s?s+="":Array.isArray(s)&&(s=k.map(s,function(e){return null==e?"":e+""})),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))})):s?(t=k.valHooks[s.type]||k.valHooks[s.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(s,"value"))?n:"string"==typeof(n=s.value)?n.replace(vt,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:ft(k.text(e))}},select:{get:function(e){var t,n,i,s=e.options,r=e.selectedIndex,o="select-one"===e.type,a=o?null:[],u=o?r+1:s.length;for(i=r<0?u:o?r:0;i<u;i++)if(((n=s[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(t=k(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,s=e.options,r=k.makeArray(t),o=s.length;o--;)((i=s[o]).selected=k.inArray(k.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=k.inArray(k(e).val(),t)>-1}},v.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in n;var yt=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,i,s){var r,a,u,l,c,d,h,p,m=[i||o],g=f.call(e,"type")?e.type:e,v=f.call(e,"namespace")?e.namespace.split("."):[];if(a=p=u=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!yt.test(g+k.event.triggered)&&(g.indexOf(".")>-1&&(g=(v=g.split(".")).shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[k.expando]?e:new k.Event(g,"object"==typeof e&&e)).isTrigger=s?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:k.makeArray(t,[e]),h=k.event.special[g]||{},s||!h.trigger||!1!==h.trigger.apply(i,t))){if(!s&&!h.noBubble&&!_(i)){for(l=h.delegateType||g,yt.test(l+g)||(a=a.parentNode);a;a=a.parentNode)m.push(a),u=a;u===(i.ownerDocument||o)&&m.push(u.defaultView||u.parentWindow||n)}for(r=0;(a=m[r++])&&!e.isPropagationStopped();)p=a,e.type=r>1?l:h.bindType||g,(d=(J.get(a,"events")||{})[e.type]&&J.get(a,"handle"))&&d.apply(a,t),(d=c&&a[c])&&d.apply&&G(a)&&(e.result=d.apply(a,t),!1===e.result&&e.preventDefault());return e.type=g,s||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(m.pop(),t)||!G(i)||c&&y(i[g])&&!_(i)&&((u=i[c])&&(i[c]=null),k.event.triggered=g,e.isPropagationStopped()&&p.addEventListener(g,_t),i[g](),e.isPropagationStopped()&&p.removeEventListener(g,_t),k.event.triggered=void 0,u&&(i[c]=u)),e.result}},simulate:function(e,t,n){var i=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(i,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),v.focusin||k.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){k.event.simulate(t,e.target,k.event.fix(e))};k.event.special[t]={setup:function(){var i=this.ownerDocument||this,s=J.access(i,t);s||i.addEventListener(e,n,!0),J.access(i,t,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this,s=J.access(i,t)-1;s?J.access(i,t,s):(i.removeEventListener(e,n,!0),J.remove(i,t))}}});var wt=n.location,bt=Date.now(),xt=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var kt=/\[\]$/,Ct=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Tt=/^(?:input|select|textarea|keygen)/i;function St(e,t,n,i){var s;if(Array.isArray(t))k.each(t,function(t,s){n||kt.test(e)?i(e,s):St(e+"["+("object"==typeof s&&null!=s?t:"")+"]",s,n,i)});else if(n||"object"!==x(t))i(e,t);else for(s in t)St(e+"["+s+"]",t[s],n,i)}k.param=function(e,t){var n,i=[],s=function(e,t){var n=y(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){s(this.name,this.value)});else for(n in e)St(n,e[n],t,s);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&Tt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!he.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(Ct,"\r\n")}}):{name:t.name,value:n.replace(Ct,"\r\n")}}).get()}});var Et=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,At=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,zt=/^\/\//,It={},Pt={},Ht="*/".concat("*"),Ot=o.createElement("a");function qt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,s=0,r=t.toLowerCase().match(q)||[];if(y(n))for(;i=r[s++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function Ft(e,t,n,i){var s={},r=e===Pt;function o(a){var u;return s[a]=!0,k.each(e[a]||[],function(e,a){var l=a(t,n,i);return"string"!=typeof l||r||s[l]?r?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)}),u}return o(t.dataTypes[0])||!s["*"]&&o("*")}function Mt(e,t){var n,i,s=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((s[n]?e:i||(i={}))[n]=t[n]);return i&&k.extend(!0,e,i),e}Ot.href=wt.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,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":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mt(Mt(e,k.ajaxSettings),t):Mt(k.ajaxSettings,e)},ajaxPrefilter:qt(It),ajaxTransport:qt(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,s,r,a,u,l,c,d,h,p,f=k.ajaxSetup({},t),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?k(m):k.event,v=k.Deferred(),y=k.Callbacks("once memory"),_=f.statusCode||{},w={},b={},x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=At.exec(r);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(e,t){return null==c&&(e=b[e.toLowerCase()]=b[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||x;return i&&i.abort(t),N(0,t),this}};if(v.promise(C),f.url=((e||f.url||wt.href)+"").replace(zt,wt.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(q)||[""],null==f.crossDomain){l=o.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ot.protocol+"//"+Ot.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=k.param(f.data,f.traditional)),Ft(It,f,t,C),c)return C;for(h in(d=k.event&&f.global)&&0==k.active++&&k.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Lt.test(f.type),s=f.url.replace(jt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Et,"+")):(p=f.url.slice(s.length),f.data&&(f.processData||"string"==typeof f.data)&&(s+=(xt.test(s)?"&":"?")+f.data,delete f.data),!1===f.cache&&(s=s.replace(Dt,"$1"),p=(xt.test(s)?"&":"?")+"_="+bt+++p),f.url=s+p),f.ifModified&&(k.lastModified[s]&&C.setRequestHeader("If-Modified-Since",k.lastModified[s]),k.etag[s]&&C.setRequestHeader("If-None-Match",k.etag[s])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ht+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(m,C,f)||c))return C.abort();if(x="abort",y.add(f.complete),C.done(f.success),C.fail(f.error),i=Ft(Pt,f,t,C)){if(C.readyState=1,d&&g.trigger("ajaxSend",[C,f]),c)return C;f.async&&f.timeout>0&&(u=n.setTimeout(function(){C.abort("timeout")},f.timeout));try{c=!1,i.send(w,N)}catch(e){if(c)throw e;N(-1,e)}}else N(-1,"No Transport");function N(e,t,o,a){var l,h,p,w,b,x=t;c||(c=!0,u&&n.clearTimeout(u),i=void 0,r=a||"",C.readyState=e>0?4:0,l=e>=200&&e<300||304===e,o&&(w=function(e,t,n){for(var i,s,r,o,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){u.unshift(s);break}if(u[0]in n)r=u[0];else{for(s in n){if(!u[0]||e.converters[s+" "+u[0]]){r=s;break}o||(o=s)}r=r||o}if(r)return r!==u[0]&&u.unshift(r),n[r]}(f,C,o)),w=function(e,t,n,i){var s,r,o,a,u,l={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(r=c.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!u&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=r,r=c.shift())if("*"===r)r=u;else if("*"!==u&&u!==r){if(!(o=l[u+" "+r]||l["* "+r]))for(s in l)if((a=s.split(" "))[1]===r&&(o=l[u+" "+a[0]]||l["* "+a[0]])){!0===o?o=l[s]:!0!==l[s]&&(r=a[0],c.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+u+" to "+r}}}return{state:"success",data:t}}(f,w,C,l),l?(f.ifModified&&((b=C.getResponseHeader("Last-Modified"))&&(k.lastModified[s]=b),(b=C.getResponseHeader("etag"))&&(k.etag[s]=b)),204===e||"HEAD"===f.type?x="nocontent":304===e?x="notmodified":(x=w.state,h=w.data,l=!(p=w.error))):(p=x,!e&&x||(x="error",e<0&&(e=0))),C.status=e,C.statusText=(t||x)+"",l?v.resolveWith(m,[h,x,C]):v.rejectWith(m,[C,x,p]),C.statusCode(_),_=void 0,d&&g.trigger(l?"ajaxSuccess":"ajaxError",[C,f,l?h:p]),y.fireWith(m,[C,x]),d&&(g.trigger("ajaxComplete",[C,f]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,t){k[t]=function(e,n,i,s){return y(n)&&(s=s||i,i=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:s,data:n,success:i},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=k(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 y(e)?this.each(function(t){k(this).wrapInner(e.call(this,t))}):this.each(function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=y(e);return this.each(function(n){k(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Rt={0:200,1223:204},Wt=k.ajaxSettings.xhr();v.cors=!!Wt&&"withCredentials"in Wt,v.ajax=Wt=!!Wt,k.ajaxTransport(function(e){var t,i;if(v.cors||Wt&&!e.crossDomain)return{send:function(s,r){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];for(o in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest"),s)a.setRequestHeader(o,s[o]);t=function(e){return function(){t&&(t=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Rt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),i=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.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 k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(i,s){t=k("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&s("error"===e.type?404:200,e.type)}),o.head.appendChild(t[0])},abort:function(){n&&n()}}});var $t=[],Bt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=$t.pop()||k.expando+"_"+bt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,i){var s,r,o,a=!1!==e.jsonp&&(Bt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return s=e.jsonpCallback=y(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Bt,"$1"+s):!1!==e.jsonp&&(e.url+=(xt.test(e.url)?"&":"?")+e.jsonp+"="+s),e.converters["script json"]=function(){return o||k.error(s+" was not called"),o[0]},e.dataTypes[0]="json",r=n[s],n[s]=function(){o=arguments},i.always(function(){void 0===r?k(n).removeProp(s):n[s]=r,e[s]&&(e.jsonpCallback=t.jsonpCallback,$t.push(s)),o&&y(r)&&r(o[0]),o=r=void 0}),"script"}),v.createHTMLDocument=function(){var e=o.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((i=(t=o.implementation.createHTMLDocument("")).createElement("base")).href=o.location.href,t.head.appendChild(i)):t=o),s=A.exec(e),r=!n&&[],s?[t.createElement(s[1])]:(s=_e([e],t,r),r&&r.length&&k(r).remove(),k.merge([],s.childNodes)));var i,s,r},k.fn.load=function(e,t,n){var i,s,r,o=this,a=e.indexOf(" ");return a>-1&&(i=ft(e.slice(a)),e=e.slice(0,a)),y(t)?(n=t,t=void 0):t&&"object"==typeof t&&(s="POST"),o.length>0&&k.ajax({url:e,type:s||"GET",dataType:"html",data:t}).done(function(e){r=arguments,o.html(i?k("<div>").append(k.parseHTML(e)).find(i):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(e){return k.grep(k.timers,function(t){return e===t.elem}).length},k.offset={setOffset:function(e,t,n){var i,s,r,o,a,u,l=k.css(e,"position"),c=k(e),d={};"static"===l&&(e.style.position="relative"),a=c.offset(),r=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&(r+u).indexOf("auto")>-1?(o=(i=c.position()).top,s=i.left):(o=parseFloat(r)||0,s=parseFloat(u)||0),y(t)&&(t=t.call(e,n,k.extend({},a))),null!=t.top&&(d.top=t.top-a.top+o),null!=t.left&&(d.left=t.left-a.left+s),"using"in t?t.using.call(e,d):c.css(d)}},k.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){k.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.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,i=this[0],s={top:0,left:0};if("fixed"===k.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((s=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),s.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-s.top-k.css(i,"marginTop",!0),left:t.left-s.left-k.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||we})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;k.fn[e]=function(i){return U(this,function(e,i,s){var r;if(_(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===s)return r?r[t]:e[i];r?r.scrollTo(n?r.pageXOffset:s,n?s:r.pageYOffset):e[i]=s},e,i,arguments.length)}}),k.each(["top","left"],function(e,t){k.cssHooks[t]=$e(v.pixelPosition,function(e,n){if(n)return n=We(e,t),Fe.test(n)?k(e).position()[t]+"px":n})}),k.each({Height:"height",Width:"width"},function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){k.fn[i]=function(s,r){var o=arguments.length&&(n||"boolean"!=typeof s),a=n||(!0===s||!0===r?"margin":"border");return U(this,function(t,n,s){var r;return _(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===s?k.css(t,n,a):k.style(t,n,s,a)},t,o?s:void 0,o)}})}),k.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){k.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,i,s;if("string"==typeof t&&(n=e[t],t=e,e=n),y(e))return i=u.call(arguments,2),(s=function(){return e.apply(t||this,i.concat(u.call(arguments)))}).guid=e.guid=e.guid||k.guid++,s},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=D,k.isFunction=y,k.isWindow=_,k.camelCase=X,k.type=x,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},void 0===(i=function(){return k}.apply(t,[]))||(e.exports=i);var Ut=n.jQuery,Qt=n.$;return k.noConflict=function(e){return n.$===k&&(n.$=Qt),e&&n.jQuery===k&&(n.jQuery=Ut),k},s||(n.jQuery=n.$=k),k})},,,,function(e,t,n){"use strict";n(6),n(7),n(8),n(9),n(13)},function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=s||{};if(window.WP_Smush=s,wp_smush_msgs);var r=function(e,t,n){var i=e.parents().eq(1).find(".wp-smush-progress");"show"===n?i.html(t):i.html(wp_smush_msgs.all_done),i.toggleClass("visible")},o=function(e){var t=jQuery("#wp-smush-invalid-member");void 0!==e&&void 0!==e.show_warning&&t.length>0&&(e.show_warning?t.show():t.hide())},a=function(e,t){void 0===t&&(t=100),e.fadeTo(t,0,function(){e.slideUp(t,function(){e.remove()})})};jQuery(function(e){function t(t){if(0!==t){var n=e(".attachment-info .file-size");if(n.contents().filter(function(){return 3===this.nodeType}).text()!==" "+t){var i=n.contents().filter(function(){return 1===this.nodeType}).text();n.html("<strong>"+i+"</strong> "+t)}}}e("#smush-quick-setup").size()>0&&(WDP.showOverlay("#smush-quick-setup",{title:wp_smush_msgs.quick_setup_title,class:"no-close wp-smush-overlay wp-smush-quick-setup"}),e("dialog#smush-quick-setup").remove());var n=function(t,n){return e.isEmptyObject(n)||(t+=(t.indexOf("?")>=0?"&":"?")+e.param(n)),t};s.errors=[],s.timeout=wp_smushit_data.timeout,s.geturlparam=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}},s.Smush=function(a,u,l){var c=this,d=a.data("smush");return d="undefined"!=(void 0===d?"undefined":i(d))&&0!=d,this.init=function(){this.$button=e(a[0]),this.is_bulk=!(void 0!==u&&!i(u))&&u,this.url=ajaxurl,this.$log=e(".smush-final-log"),this.deferred=jQuery.Deferred(),this.deferred.errors=[];var t=wp_smushit_data.resmush.length>0&&!d?wp_smushit_data.unsmushed.length>0?wp_smushit_data.resmush.concat(wp_smushit_data.unsmushed):wp_smushit_data.resmush:wp_smushit_data.unsmushed;"object"==(void 0===t?"undefined":i(t))?this.ids=t.filter(function(e,t,n){return t==n.indexOf(e)}):this.ids=t,this.is_bulk_resmush=wp_smushit_data.resmush.length>0&&!d,this.$status=this.$button.parent().find(".smush-status"),this.smush_type=void 0!==l?l:"media",this.single_ajax_suffix="nextgen"==this.smush_type?"smush_manual_nextgen":"wp_smushit_manual",this.bulk_ajax_suffix="nextgen"==this.smush_type?"wp_smushit_nextgen_bulk":"wp_smushit_bulk",this.url=this.is_bulk?n(this.url,{action:this.bulk_ajax_suffix}):n(this.url,{action:this.single_ajax_suffix})},s.ajax=function(t,n,i,r,o){var a={is_bulk_resmush:t,attachment_id:n,get_next:r,_nonce:o};return a=jQuery.param(a),e.ajax({type:"GET",data:a,url:i,timeout:s.timeout,dataType:"json"})},this.start=function(){this.$button.attr("disabled","disabled"),this.$button.addClass("wp-smush-started"),this.bulk_start(),this.single_start()},this.bulk_start=function(){this.is_bulk&&(e(".wp-smush-bulk-wrapper").hide(),e(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper").show(),e(".sui-notice-top").remove(),e("p.smush-error-message.limit_exceeded").remove(),e("div.smush-final-log p").length<=0&&e("div.smush-final-log").hide())},this.single_start=function(){this.is_bulk||(this.show_loader(),this.$status.removeClass("error"))},this.enable_button=function(){this.$button.prop("disabled",!1),e("button.wp-smush-all").removeAttr("disabled"),e("button.wp-smush-scan, a.wp-smush-lossy-enable, button.wp-smush-resize-enable, input#wp-smush-save-settings").removeAttr("disabled")},this.show_loader=function(){r(this.$button,wp_smush_msgs.smushing,"show")},this.hide_loader=function(){r(this.$button,wp_smush_msgs.smushing,"hide")},this.single_done=function(){this.is_bulk||(this.hide_loader(),this.request.done(function(e){if(void 0!==e.data){var n=c.$status.parent(),i=n.find(".smush-stats-wrapper");e.data.status&&(n.find(".smush-status-links").remove(),c.$status.replaceWith(e.data.status)),o(e.data),e.success&&"Not processed"!==e.data?(c.$status.removeClass("sui-hidden"),c.$button.parent().removeClass("unsmushed").addClass("smushed"),c.$button.remove()):(c.$status.addClass("error"),c.$status.html(e.data.error_msg),c.$status.show()),"undefined"!=i&&i.length?i.replaceWith(e.data.stats):n.append(e.data.stats),t(e.data.new_size)}c.enable_button()}).error(function(e){c.$status.html(e.data),c.$status.addClass("error"),c.enable_button()}))},this.sync_stats=function(){var t=e("div.wp-smush-bulk-progress-bar-wrapper div.wp-smush-count.tc"),n=t.html();t.html(wp_smush_msgs.sync_stats),e.ajax({type:"GET",url:ajaxurl,data:{action:"get_stats"},success:function(t){t&&void 0!==t&&(t=t.data,e.extend(wp_smushit_data,{count_images:t.count_images,count_smushed:t.count_smushed,count_total:t.count_total,count_resize:t.count_resize,count_supersmushed:t.count_supersmushed,savings_bytes:t.savings_bytes,savings_conversion:t.savings_conversion,savings_resize:t.savings_resize,size_before:t.size_before,size_after:t.size_after}),p(this.smush_type))}}).always(function(){t.html(n)})},this.bulk_done=function(){this.is_bulk&&(this.enable_button(),0==c.ids.length?(e(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").show(),e(".wp-smush-bulk-wrapper").hide(),e(".wp-smush-bulk-progress-bar-wrapper").hide()):e(".bulk-smush-wrapper .wp-smush-resmush-notice").length>0?e(".bulk-smush-wrapper .wp-smush-resmush-notice").show():e(".bulk-smush-wrapper .wp-smush-remaining").show(),e(".wp-resmush.wp-smush-action, .wp-smush-scan").removeAttr("disabled"),0==c.ids.length?e(".sui-summary-smush .smush-stats-icon").addClass("sui-hidden"):e(".sui-summary-smush .smush-stats-icon").removeClass("sui-icon-loader sui-loading sui-hidden").addClass("sui-icon-info sui-warning"))},this.is_resolved=function(){return"resolved"===this.deferred.state()},this.free_exceeded=function(){if(c.ids.length>0){var t=jQuery(".wp-smush-bulk-progress-bar-wrapper");t.addClass("wp-smush-exceed-limit").find(".sui-progress-close").attr("data-tooltip",wp_smush_msgs.bulk_resume).removeClass("wp-smush-cancel-bulk").addClass("wp-smush-all"),t.find(".sui-box-body.sui-hidden").removeClass("sui-hidden")}else e(".wp-smush-notice.wp-smush-all-done, .wp-smush-pagespeed-recommendation").show()},this.update_remaining_count=function(){this.is_bulk_resmush?e(".wp-smush-resmush-notice .wp-smush-remaining-count").length&&void 0!==c.ids&&e(".wp-smush-resmush-notice .wp-smush-remaining-count").html(c.ids.length):e(".bulk-smush-wrapper .wp-smush-remaining-count").length&&void 0!==c.ids&&e(".bulk-smush-wrapper .wp-smush-remaining-count").html(c.ids.length),e(".smush-sidenav .wp-smush-remaining-count").length&&void 0!==c.ids&&(c.ids.length>0?e(".smush-sidenav .wp-smush-remaining-count").html(c.ids.length):(e(".sui-summary-smush .smush-stats-icon").addClass("sui-hidden"),e(".smush-sidenav .wp-smush-remaining-count").removeClass("sui-tag sui-tag-warning").html("")))},this.update_progress=function(t){if(this.is_bulk_resmush||this.is_bulk){var n="";!t||void 0===t.data&&void 0===t.data.stats||h(t.data.stats,this.smush_type),this.is_bulk_resmush?(t.success&&(wp_smushit_data.resmush.length>0?e(".wp-smush-images-remaining").html(wp_smushit_data.resmush.length):0==wp_smushit_data.resmush.length&&0==this.ids.length&&(e(".bulk-resmush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").removeClass("sui-hidden"),e(".wp-smush-resmush-wrap, .wp-smush-bulk-progress-bar-wrapper").hide())),void 0!==c.ids&&void 0!==wp_smushit_data.count_total&&wp_smushit_data.count_total>0&&(n=wp_smushit_data.count_smushed/wp_smushit_data.count_total*100)):n=wp_smushit_data.count_smushed/wp_smushit_data.count_total*100,0==c.ids.length&&("nextgen"!=this.smush_type&&this.sync_stats(),e(".bulk-smush-wrapper .wp-smush-all-done, .wp-smush-pagespeed-recommendation").show(),e(".wp-smush-bulk-wrapper").hide()),c.update_remaining_count(),void 0!==t.data.stats&&(this._update_progress(wp_smushit_data.count_smushed,n),this._update_progress_status(wp_smushit_data.count_smushed,wp_smushit_data.count_total)),p(this.smush_type)}},this._update_progress=function(e,t){if(this.is_bulk||this.is_bulk_resmush){var n=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");n.length<1||n.css("width",t+"%")}},this._update_progress_status=function(e,t){var n=jQuery(".bulk-smush-wrapper .sui-progress-state-text");1>n.length||n.find("span").html(e+"/"+t)},this.continue=function(){var e=c.$button.attr("continue_smush");return"undefined"==(void 0===e?"undefined":i(e))&&(e=!0),"false"!=e&&e||(e=!1),e&&this.ids.length>0&&this.is_bulk},this.increment_errors=function(e){s.errors.push(e)},this.call_ajax=function(){var t="";this.current_id=this.is_bulk?this.ids.shift():this.$button.data("id"),this.update_smush_ids(this.current_id);var n=this.$button.parent().find("#_wp_smush_nonce");return n&&(t=n.val()),this.request=s.ajax(this.is_bulk_resmush,this.current_id,this.url,0,t).error(function(){c.increment_errors(c.current_id)}).done(function(t){if((void 0===t.success||void 0!==t.success&&void 0!==t.success.data&&!1===t.success&&"bulk_request_image_limit_exceeded"!==t.data.error)&&c.increment_errors(c.current_id),!(t&&t.success||void 0===t||void 0===t.data||void 0===t.data.error)){var n='<p class="'+(void 0!==t.data.error_class?"smush-error-message "+t.data.error_class:"smush-error-message")+'">'+t.data.error_message+"</p>";if(void 0!==t.data.error&&"bulk_request_image_limit_exceeded"==t.data.error){var i=e(".wp-smush-ajax-error");i.length>0?i.after(n):c.$log.prepend(n)}else if(void 0!==t.data.error_class&&""!=t.data.error_class&&e("div.smush-final-log ."+t.data.error_class).length>0){var s=e("p.smush-error-message."+t.data.error_class+" .image-error-count"),r=s.html();r=parseInt(r)+1,s.html(r)}else c.$log.append(n);c.$log.show()}o(t.data),void 0===t.data||"bulk_request_image_limit_exceeded"!=t.data.error||c.is_resolved()?c.is_bulk&&t.success?c.update_progress(t):0==c.ids.length&&c.sync_stats():(c.$button.attr("continue_smush",!1),c.free_exceeded(),wp_smushit_data.unsmushed.unshift(c.current_id),c.update_remaining_count()),c.single_done()}).complete(function(){c.continue()&&c.is_bulk?c.call_ajax():c.deferred.resolve()}),c.deferred.errors=s.errors,c.deferred},this.init(arguments),this.run=function(){this.is_bulk&&this.ids.length>0&&this.call_ajax(),this.is_bulk||this.call_ajax()},this.bind_deferred_events=function(){this.deferred.done(function(){if(c.$button.removeAttr("continue_smush"),s.errors.length){var t='<div class="wp-smush-ajax-error">'+wp_smush_msgs.error_in_bulk.replace("{{errors}}",s.errors.length)+"</div>";e(".wp-smush-ajax-error").remove(),c.$log.prepend(t)}c.bulk_done(),e(".wp-smush-button:not(.wp-smush-finished), .wp-smush-scan").removeAttr("disabled")})},this.cancel_ajax=function(){e(".wp-smush-cancel-bulk").on("click",function(){c.$button.attr("continue_smush",!1),c.sync_stats(),p(this.smush_type),c.request.abort(),c.enable_button(),c.$button.removeClass("wp-smush-started"),wp_smushit_data.unsmushed.unshift(c.current_id),e(".wp-smush-bulk-wrapper").show(),e(".wp-smush-bulk-progress-bar-wrapper").hide()})},this.update_smush_ids=function(e){if(void 0!==wp_smushit_data.unsmushed&&wp_smushit_data.unsmushed.length>0){var t=wp_smushit_data.unsmushed.indexOf(e);t>-1&&wp_smushit_data.unsmushed.splice(t,1)}if(void 0!==wp_smushit_data.resmush&&wp_smushit_data.resmush.length>0){var n=wp_smushit_data.resmush.indexOf(e);n>-1&&wp_smushit_data.resmush.splice(n,1)}},this.start(),this.run(),this.bind_deferred_events(),this.cancel_ajax(),this.deferred},e("body").on("click","button.wp-smush-all",function(t){t.preventDefault(),e(".sui-notice-top.sui-notice-success").remove();var n=e(".wp-smush-bulk-progress-bar-wrapper");if(n.removeClass("wp-smush-exceed-limit").find(".sui-progress-close").attr("data-tooltip",wp_smush_msgs.bulk_stop),n.find(".sui-box-body").addClass("sui-hidden"),e(".wp-resmush.wp-smush-action, .wp-smush-scan, .wp-smush-button, a.wp-smush-lossy-enable, button.wp-smush-resize-enable, input#wp-smush-save-settings").attr("disabled","disabled"),"undefined"==typeof wp_smushit_data||0==wp_smushit_data.unsmushed.length&&0==wp_smushit_data.resmush.length)return!1;e(".wp-smush-remaining").hide(),e(".sui-summary-smush .smush-stats-icon").removeClass("sui-icon-info sui-warning").addClass("sui-icon-loader sui-loading"),new s.Smush(e(this),!0)});var u=function(n,i,s,o){if("disabled"==i.attr("disabled"))return!1;n.preventDefault(),e(".wp-smush-error").remove(),e(".smush-stats-wrapper").hide();var a="grid";"smush_restore_image"==s&&(a=e(document).find("div.media-modal.wp-core-ui").length>0?"grid":window.location.search.indexOf("item")>-1?"grid":"list");var u={action:s,attachment_id:i.data("id"),mode:a,_nonce:i.data("nonce")};!function(e){var t=e.parent();t.css({opacity:"0.5"}),t.find("a").attr("disabled","disabled")}(i),r(i,wp_smush_msgs[o],"show"),e.post(ajaxurl,u,function(e){r(i,wp_smush_msgs[o],"hide"),function(e){var t=e.parent();t.css({opacity:"1"}),t.find("a").removeAttr("disabled")}(i),e.success&&void 0!==e.data.button?(void 0!==this.data&&this.data.indexOf("nextgen")>-1?i.parent().html(e.data.button):i.parents().eq(1).html(e.data.button),void 0!==e.data&&"restore"===o&&t(e.data.new_size)):e.data.message&&i.parent().append(e.data.message)})},l=function(e,t){if(Math.abs(e)<1024)return e+" B";var n=["KB","MB","GB","TB","PB"],i=-1;do{e/=1024,++i}while(Math.abs(e)>=1024&&i<n.length-1);return e.toFixed(t)+" "+n[i]},c=function(e,t){var n=e>=0?1:-1;return e=e>100?100:e,Math.round(e*Math.pow(10,t)+.001*n)/Math.pow(10,t)},d=function(t,n){t.text("").addClass("sui-button-onload sui-icon-loader sui-loading").blur();var i=t.data("type");i=void 0===i?"media":i,e("button.wp-smush-all").removeAttr("data-smush");var s=e(".sui-notice-top.sui-notice-success");s.slideUp(100,function(){s.remove()}),e(".wp-smush-button").attr("disabled","disabled"),e(".wp-smush-settings-changed").hide();var r={action:"scan_for_resmush",type:i,get_ui:!0,process_settings:n,wp_smush_options_nonce:jQuery("#wp_smush_options_nonce").val()};e.get(ajaxurl,r,function(t){if(void 0!==t.data){if(void 0!==t.data.resmush_ids){wp_smushit_data.resmush=t.data.resmush_ids,"undefinied"!=typeof wp_smushit_data&&(wp_smushit_data.count_smushed=void 0!==t.data.count_smushed?t.data.count_smushed:wp_smushit_data.count_smushed,wp_smushit_data.count_supersmushed=void 0!==t.data.count_supersmushed?t.data.count_supersmushed:wp_smushit_data.count_supersmushed,wp_smushit_data.count_images=void 0!==t.data.count_image?t.data.count_image:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==t.data.size_before?t.data.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==t.data.size_after?t.data.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==t.data.savings_resize?t.data.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==t.data.savings_conversion?t.data.savings_conversion:wp_smushit_data.savings_conversion,wp_smushit_data.count_resize=void 0!==t.data.count_resize?t.data.count_resize:wp_smushit_data.count_resize),"nextgen"==i&&(wp_smushit_data.bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after));var n=wp_smushit_data.count_smushed/wp_smushit_data.count_total*100;n=c(n,1),e(".wp-smush-images-percent").html(n);var s=e(".bulk-smush-wrapper .sui-notice");s.length>0&&(s.hide(),e(".wp-smush-pagespeed-recommendation").hide()),e(".wp-smush-resmush-notice").remove(),e(".wp-smush-bulk-wrapper").show(),void 0!==t.data.count&&function(e){if(void 0===e)return!1;var t=wp_smushit_data.count_total-e,n=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");if(!(n.length<1)){var i=t/wp_smushit_data.count_total*100;n.css("width",i+"%")}}(t.data.count)}if(void 0!==t.data.content&&e(".bulk-smush-wrapper .sui-box-body").prepend(t.data.content),void 0!==t.data.notice&&e(".wp-smush-page-header").after(t.data.notice),e("div.smush-final-log").hide(),void 0!==t.data.super_smush&&t.data.super_smush){var r=jQuery(".wp-smush-enable-lossy");r.length>0&&r.remove(),"undefined"!==t.data.super_smush_stats&&e(".super-smush-attachments .wp-smush-stats").html(t.data.super_smush_stats)}p(i)}}).always(function(){jQuery(".bulk-smush-wrapper .wp-smush-bulk-progress-bar-wrapper").hide(),t.text(wp_smush_msgs.resmush_complete).removeClass("sui-button-onload sui-icon-loader sui-loading").addClass("smush-button-check-success"),setTimeout(function(){t.removeClass("smush-button-check-success").text(wp_smush_msgs.resmush_check)},2e3),e(".wp-smush-button").removeAttr("disabled"),e(".wp-smush-re-check-message").length&&a(e(".wp-smush-re-check-message"))})},h=function(e,t){"undefined"!=typeof wp_smushit_data&&("media"==t?(wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+1,wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count),e.is_lossy&&(wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1),wp_smushit_data.savings_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.savings_resize)+parseInt(e.savings_resize.bytes):parseInt(wp_smushit_data.savings_resize),wp_smushit_data.count_resize=void 0!==e.savings_resize.bytes?parseInt(wp_smushit_data.count_resize)+1:wp_smushit_data.count_resize,wp_smushit_data.savings_conversion=void 0!==e.savings_conversion&&void 0!==e.savings_conversion.bytes?parseInt(wp_smushit_data.savings_conversion)+parseInt(e.savings_conversion.bytes):parseInt(wp_smushit_data.savings_conversion)):"directory_smush"==t?wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+1:"nextgen"==t&&(wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+1,wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+1,wp_smushit_data.count_images=parseInt(wp_smushit_data.count_images)+parseInt(e.count)),e.size_before>e.size_after&&(wp_smushit_data.size_before=void 0!==e.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_resize&&(wp_smushit_data.size_before=void 0!==e.savings_resize.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_resize.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_resize.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_resize.size_after):parseInt(wp_smushit_data.size_after)),void 0!==e.savings_conversion&&(wp_smushit_data.size_before=void 0!==e.savings_conversion.size_before?parseInt(wp_smushit_data.size_before)+parseInt(e.savings_conversion.size_before):parseInt(wp_smushit_data.size_before),wp_smushit_data.size_after=void 0!==e.savings_conversion.size_after?parseInt(wp_smushit_data.size_after)+parseInt(e.savings_conversion.size_after):parseInt(wp_smushit_data.size_after)))},p=function(t){var n=0,i=void 0!==t&&"nextgen"==t;wp_smushit_data.savings_bytes=parseInt(wp_smushit_data.size_before)-parseInt(wp_smushit_data.size_after);var s=l(wp_smushit_data.savings_bytes,1);i?e(".wp-smush-savings .wp-smush-stats-human").html(s):(e(".wp-smush-savings .wp-smush-stats-human").html(function(e){return e.replace(/[0-9.]/g,"").trim()}(s)),e(".sui-summary-large.wp-smush-stats-human").html(function(e){return e.replace(/[a-zA-Z]/g,"").trim()}(s))),wp_smushit_data.savings_percent=c(parseInt(wp_smushit_data.savings_bytes)/parseInt(wp_smushit_data.size_before)*100,1),isNaN(wp_smushit_data.savings_percent)||e(".wp-smush-savings .wp-smush-stats-percent").html(wp_smushit_data.savings_percent),wp_smushit_data.smush_percent=c(parseInt(wp_smushit_data.count_smushed)/parseInt(wp_smushit_data.count_total)*100,1),e("span.wp-smush-images-percent").html(wp_smushit_data.smush_percent),void 0!==wp_smushit_data.savings_bytes&&void 0!==wp_smushit_data.savings_resize&&(n=parseInt(wp_smushit_data.savings_bytes)-parseInt(wp_smushit_data.savings_resize))>0&&e("li.super-smush-attachments span.smushed-savings").html(l(n,1)),i?e(".sui-summary-details span.wp-smush-total-optimised").html(wp_smushit_data.count_images):e("span.smushed-items-count span.wp-smush-count-total span.wp-smush-total-optimised").html(wp_smushit_data.count_images),e("span.smushed-items-count span.wp-smush-count-resize-total span.wp-smush-total-optimised").html(wp_smushit_data.count_resize),e("li.super-smush-attachments .smushed-count").length&&void 0!==wp_smushit_data.count_supersmushed&&e("li.super-smush-attachments .smushed-count").html(wp_smushit_data.count_supersmushed);var r=e(".smush-conversion-savings");if(r.length>0&&void 0!==wp_smushit_data.savings_conversion&&""!=wp_smushit_data.savings_conversion){var o=r.find(".wp-smush-stats");o.length>0&&o.html(l(wp_smushit_data.savings_conversion,1))}var a=e(".smush-resize-savings");if(a.length>0&&void 0!==wp_smushit_data.savings_resize&&""!=wp_smushit_data.savings_resize){var u=parseInt(wp_smushit_data.savings_resize),d=a.find(".wp-smush-stats"),h=a.find(".wp-smush-stats-label-message");u>0&&d.length>0&&(h.length>0&&h.hide(),d.html(l(wp_smushit_data.savings_resize,1)))}if(function(){var e=wp_smushit_data.savings_percent>0?wp_smushit_data.savings_percent:0,t=wp_smushit_data.savings_bytes>0?wp_smushit_data.savings_bytes:0,n=2.22058824;e>49&&(n=1.22054412);e>0&&(e*=n,t*=n),wp_smushit_data.pro_savings={percent:c(e,1),savings_bytes:l(t,1)}}(),void 0!==wp_smushit_data.pro_savings){var p=e(".smush-avg-pro-savings");if(p.length>0){var f=p.find(".wp-smush-stats-percent"),m=p.find(".wp-smush-stats-human");f.length>0&&void 0!==wp_smushit_data.pro_savings.percent&&""!=wp_smushit_data.pro_savings.percent&&f.html(wp_smushit_data.pro_savings.percent),m.length>0&&void 0!==wp_smushit_data.pro_savings.savings_bytes&&""!=wp_smushit_data.pro_savings.savings_bytes&&m.html(wp_smushit_data.pro_savings.savings_bytes)}}};var f=function(t){e(t).length>0&&e("html, body").animate({scrollTop:e(t).offset().top-100},"slow")};e("body").on("click","a.smush-stats-details",function(t){if("disabled"==e(this).attr("disabled"))return!1;t.preventDefault();var n=e(this).find(".stats-toggle");e(this).parents().eq(1).find(".smush-stats-wrapper").slideToggle(),n.text("+"==n.text()?"-":"+")}),e("body").on("click",".wp-smush-send:not(.wp-smush-resmush)",function(t){t.preventDefault(),new s.Smush(e(this),!1)}),e("body").on("click",".wp-smush-nextgen-send",function(t){t.preventDefault(),new s.Smush(e(this),!1,"nextgen")}),e("body").on("click",".wp-smush-nextgen-bulk",function(t){if(t.preventDefault(),"undefined"==typeof wp_smushit_data||0==wp_smushit_data.unsmushed.length&&0==wp_smushit_data.resmush.length)return!1;jQuery(".wp-smush-button, .wp-smush-scan").attr("disabled","disabled"),e(".wp-smush-notice.wp-smush-remaining").hide(),new s.Smush(e(this),!0,"nextgen")}),e("body").on("click",".wp-smush-action.wp-smush-restore",function(t){var n=e(this);u(t,n,"smush_restore_image","restore");var i=n.parents().eq(1);i.hasClass("smushed")&&i.removeClass("smushed").addClass("unsmushed")}),e("body").on("click",".wp-smush-action.wp-smush-resmush",function(t){var n=e(this);u(t,n,"smush_resmush_image","smushing")}),e("body").on("click",".wp-smush-action.wp-smush-nextgen-restore",function(t){var n=e(this);u(t,n,"smush_restore_nextgen_image","restore")}),e("body").on("click",".wp-smush-action.wp-smush-nextgen-resmush",function(t){var n=e(this);u(t,n,"smush_resmush_nextgen_image","smushing")}),e("body").on("click",".wp-smush-scan",function(t){t.preventDefault(),d(e(this),!1)}),e("#wp-smush-welcome-box .smush-dismiss-welcome").on("click",function(t){t.preventDefault();var n=e(this).parents().eq(1);a(n);e.post(ajaxurl,{action:"dismiss_welcome_notice"})}),e("body").on("click",".wp-smush-notice .icon-fi-close",function(t){t.preventDefault();var n=e(this).parent();a(n)}),e("input#wp-smush-save-settings").on("click",function(t){t.preventDefault();var n="",i=e('input[name="setting-type"]');i.length>0&&(n=i.val());var s=e(this);if(s.parent().find("span.sui-icon-loader.sui-loading").removeClass("sui-hidden"),""!=n&&"network"==n){var r={action:"save_settings",nonce:e("#wp_smush_options_nonce").val()};r=jQuery.param(r)+"&"+jQuery("form#wp-smush-settings-form").serialize(),jQuery.post(ajaxurl,r).done(function(){return jQuery("form#wp-smush-settings-form").submit(),!0})}else{s.parents().eq(1);var o=document.getElementById("wp-smush-strip_exif"),a=document.getElementById("wp-smush-lossy"),u=document.getElementById("wp-smush-original"),l=document.getElementById("wp-smush-resize"),c=document.getElementById("wp-smush-png_to_jpg"),d=!0;e(".wp-smush-hex-notice").hide(),null!==o&&o.checked||null!==a&&a.checked||null!==u&&u.checked||null!==l&&l.checked||null!==c&&c.checked||(d=!1),s.attr("disabled","disabled").addClass("button-grey"),d&&s.val(wp_smush_msgs.checking);var h=s.data("type");h=void 0===h?"media":h;r={action:"scan_for_resmush",wp_smush_options_nonce:jQuery("#wp_smush_options_nonce").val(),scan_type:h};r=jQuery.param(r)+"&"+jQuery("form#wp-smush-settings-form").serialize(),jQuery.post(ajaxurl,r).done(function(){return jQuery("form#wp-smush-settings-form").submit(),!0})}}),e("body").on("click",".wp-smush-skip-resmush",function(t){t.preventDefault();var n=jQuery(this),i=n.parents().eq(1),s=n.parent();a(s),e(".sui-notice-top.sui-notice-success").remove(),i.find(".wp-smush-all").attr("data-smush","skip_resmush"),wp_smushit_data.count_smushed=parseInt(wp_smushit_data.count_smushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_supersmushed=parseInt(wp_smushit_data.count_supersmushed)+wp_smushit_data.resmush.length,wp_smushit_data.count_smushed==wp_smushit_data.count_total&&(e(".wp-smush-notice.wp-smush-all-done, .wp-smush-pagespeed-recommendation").show(),e(".wp-smush-bulk-wrapper ").hide()),e(".wp-smush-resmush-notice").remove();var r=e(".wp-smush-scan").data("type");r=void 0===r?"media":r;var o=(void 0!==wp_smushit_data.count_smushed?wp_smushit_data.count_smushed:0)/wp_smushit_data.count_total*100;o=c(o,1),e(".wp-smush-images-percent").html(o);var u=jQuery(".bulk-smush-wrapper .wp-smush-progress-inner");if(!(u.length<1)){u.css("width",o+"%"),e(".wp-smush-bulk-wrapper").show(),e(".wp-smush-bulk-wrapper .sui-notice").show();var l={action:"delete_resmush_list",type:r};e.post(ajaxurl,l,function(t){if(t.success&&void 0!==t.data.stats){var n=t.data.stats;"undefinied"!=typeof wp_smushit_data&&(wp_smushit_data.count_images=void 0!==n.count_images?parseInt(wp_smushit_data.count_images)+n.count_images:wp_smushit_data.count_images,wp_smushit_data.size_before=void 0!==n.size_before?parseInt(wp_smushit_data.size_before)+n.size_before:wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==n.size_after?parseInt(wp_smushit_data.size_after)+n.size_after:wp_smushit_data.size_after,wp_smushit_data.savings_resize=void 0!==n.savings_resize?parseInt(wp_smushit_data.savings_resize)+n.savings_resize:wp_smushit_data.savings_resize,wp_smushit_data.savings_conversion=void 0!==n.savings_conversion?parseInt(wp_smushit_data.savings_conversion)+n.savings_conversion:wp_smushit_data.savings_conversion,void 0!==wp_smushit_data.savings_dir_smush&&void 0!==wp_smushit_data.savings_dir_smush.orig_size&&(wp_smushit_data.size_before=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_before)+parseInt(wp_smushit_data.savings_dir_smush.orig_size):wp_smushit_data.size_before,wp_smushit_data.size_after=void 0!==wp_smushit_data.savings_dir_smush?parseInt(wp_smushit_data.size_after)+parseInt(wp_smushit_data.savings_dir_smush.image_size):wp_smushit_data.size_after),wp_smushit_data.count_resize=void 0!==n.count_resize?parseInt(wp_smushit_data.count_resize)+n.count_resize:wp_smushit_data.count_resize),e(".bulk-smush-wrapper .wp-smush-remaining-count").length&&void 0!==wp_smushit_data.unsmushed&&e(".bulk-smush-wrapper .wp-smush-remaining-count").html(wp_smushit_data.unsmushed.length),p()}})}});var m=function(){e("#wp-smush-resize").prop("checked",!0).focus(),e("div.wp-smush-resize-settings-wrap").show(),f("#column-wp-smush-resize")},g=function(){e("#wp-smush-lossy").prop("checked",!0).focus(),f("#column-wp-smush-lossy")};if(e("a.wp-smush-lossy-enable").on("click",function(e){e.preventDefault(),g()}),e(".wp-smush-resize-enable").on("click",function(e){e.preventDefault(),m()}),window.location.hash){var v=window.location.hash.substring(1);"enable-resize"===v?m():"enable-lossy"===v&&g()}if(e("body").on("click",".wp-smush-trigger-bulk",function(t){t.preventDefault(),e("button.wp-smush-all").click(),e("span.sui-notice-dismiss").click()}),e(".wp-smush-setting-row .toggle-checkbox").focus(function(){e(this).keypress(function(t){32==t.keyCode&&(t.preventDefault(),e(this).find(".toggle-checkbox").click())})}),e("body").on("blur",".wp-smush-resize-input",function(){!function(e,t,n){var i=e.find("#wp-smush-resize, #wp-smush-resize-quick-setup");if(!n)var s=e.find("#wp-smush-resize_width, #quick-setup-resize_width"),r=e.find(".sui-notice-info.wp-smush-update-width");if(!t)var o=e.find("#wp-smush-resize_height, #quick-setup-resize_height"),a=e.find(".sui-notice-info.wp-smush-update-height");var u=!1,l=!1;!i.is(":checked")||void 0===wp_smushit_data.resize_sizes||void 0===wp_smushit_data.resize_sizes.width||(!n&&void 0!==s&&parseInt(wp_smushit_data.resize_sizes.width)>parseInt(s.val())?(s.parent().addClass("sui-form-field-error"),r.show("slow"),u=!0):(s.parent().removeClass("sui-form-field-error"),r.hide(),o.hasClass("error")&&a.show("slow")),!t&&void 0!==o&&parseInt(wp_smushit_data.resize_sizes.height)>parseInt(o.val())?(o.parent().addClass("sui-form-field-error"),u||a.show("slow"),l=!0):(o.parent().removeClass("sui-form-field-error"),a.hide(),s.hasClass("error")&&r.show("slow")))}(e(this).parents().eq(4),!1,!1)}),e("body").on("click","#wp-smush-resize, #wp-smush-resize-quick-setup",function(){var t=e(this),n=e(".wp-smush-resize-settings-wrap");t.is(":checked")?n.show():n.hide()}),e("body").on("click","#wp-smush-auto",function(){var t=e(this),n=e(".wp-smush-image-size-list");t.is(":checked")?n.show():n.hide()}),e("body").on("click","#wp-smush-detection",function(){var t=e(this),n=e(".smush-highlighting-notice");t.is(":checked")?n.show():n.hide()}),e("#wp-smush-png_to_jpg").click(function(){var t=e(this),n=e(".wp-smush-png_to_jpg-wrap");t.is(":checked")?n.show():n.hide()}),e("#wp-smush-networkwide").on("click",function(t){e(this).is(":checked")?(e(".network-settings-wrapper").show(),e(".sui-vertical-tabs li").not(".smush-bulk").each(function(t){e(this).removeClass("sui-hidden")})):(e(".network-settings-wrapper").hide(),e(".sui-vertical-tabs li").not(".smush-bulk").each(function(t){e(this).addClass("sui-hidden")}))}),e("#wp-smush-revalidate-member").on("click",function(t){t.preventDefault();var n=e(this).parents().eq(1);n.addClass("loading-notice"),e.get(ajaxurl,{action:"smush_show_warning"},function(e){n.removeClass("loading-notice").addClass("loaded-notice"),0==e?(n.attr("data-message",wp_smush_msgs.membership_valid),a(n,1e3)):(n.attr("data-message",wp_smush_msgs.membership_invalid),setTimeout(function(){n.removeClass("loaded-notice")},1e3))})}),"undefined"!=typeof wp_smush_run_re_check&&1==wp_smush_run_re_check&&e(".wp-smush-scan").length>0&&d(e(".wp-smush-scan"),!1),e("li.smush-dir-savings").length>0){e.get(ajaxurl,{action:"get_dir_smush_stats"},function(t){e("li.smush-dir-savings .sui-icon-loader").hide(),t.success||void 0===t.data.message?void 0===t.data||void 0===t.data.dir_smush?(e("li.smush-dir-savings span.wp-smush-stats").append(wp_smush_msgs.ajax_error),e("li.smush-dir-savings span.wp-smush-stats span").hide()):function(t){if(void 0!==t.dir_smush){var n=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-human"),i=e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-percent");t.dir_smush.bytes>0&&(e("li.smush-dir-savings .wp-smush-stats-label-message").hide(),n.length>0?n.html(t.dir_smush.human):t.dir_smush.bytes,t.dir_smush.percent>0&&(e("li.smush-dir-savings span.wp-smush-stats span.wp-smush-stats-sep").removeClass("sui-hidden"),i.length>0?i.html(t.dir_smush.percent+"%"):t.dir_smush.percent))}if(void 0!==t.combined_stats&&t.combined_stats.length>0){var s=t.combined_stats,r=s.smushed/s.total_count*100;(r=c(r,1))&&e("div.wp-smush-count-total span.wp-smush-images-percent").html(r),s.total_count&&e("span.wp-smush-count-total span.wp-smush-total-optimised").html(s.total_count),s.savings&&e("span.wp-smush-savings span.wp-smush-stats-human").html(s.savings),s.percent&&e("span.wp-smush-savings span.wp-smush-stats-percent").html(s.percent)}}(t.data):e("div.wp-smush-scan-result div.content").prepend(t.data.message)})}e(document).keyup(function(t){if(27===t.keyCode){var n=e("div.dev-overlay.wp-smush-list-dialog, div.dev-overlay.wp-smush-get-pro");if(!n.is(":visible"))return;n.find("div.close").click()}}),e("span.dismiss-recommendation").on("click",function(t){t.preventDefault();var n=e(this).parent();n.hide("slow",function(){n.remove()}),e.ajax({type:"POST",url:ajaxurl,data:{action:"hide_pagespeed_suggestion"}})}),e("div.wp-smush-api-message i.icon-fi-close").on("click",function(t){t.preventDefault();var n=e(this).parent();n.hide("slow",function(){n.remove()}),e.ajax({type:"POST",url:ajaxurl,data:{action:"hide_api_message"}})})}),function(e){e.fn.wpsmush=function(t){return this.each(function(){var n=e(this);if(!n.data("wpsmush")){var i=new function(t,n){e(t)}(this,t);n.data("wpsmush",i)}})}}(jQuery)},function(e,t,n){"use strict";jQuery(function(e){e(".sui-wrap").on("click",".sui-notice-dismiss",function(t){t.preventDefault(),e(this).parent().stop().slideUp("slow")}),e(window).on("load",function(){e("#smush-quick-setup-dialog").length>0&&window.SUI.dialogs["smush-quick-setup-dialog"].show()})})},function(e,t,n){"use strict";!function(e){e("#smush-quick-setup-submit").on("click",function(){var t=e(this);e.ajax({type:"POST",url:ajaxurl,data:e("#smush-quick-setup-form").serialize(),beforeSend:function(){t.attr("disabled","disabled"),e('<span class="sui-icon-loader sui-loading"></span>').insertAfter(t)},success:function(e){t.removeAttr("disabled"),t.parent().find("span.spinner").remove(),location.reload()}})}),e(".smush-skip-setup").on("click",function(){var t=e("form#smush-quick-setup-form");e.ajax({type:"POST",url:ajaxurl,data:t.serialize(),beforeSend:function(){t.find(".button").attr("disabled","disabled")}})})}(jQuery)},function(e,t,n){"use strict";var i=n(10),s=function(e){return e&&e.__esModule?e:{default:e}}(n(12));!function(e){WP_Smush.directory={selected:[],tree:[],wp_smush_msgs:[],init:function(){var t=this,n=e("#wp-smush-progress-dialog");this.scanner=new s.default(wp_smushit_data.dir_smush.totalSteps,wp_smushit_data.dir_smush.currentScanStep),wp_smush_msgs&&(this.wp_smush_msgs=wp_smush_msgs),e("div.sui-wrap").on("click","button.wp-smush-browse",function(n){n.preventDefault(),e("div.wp-smush-scan-result div.wp-smush-notice").hide(),e(this).attr("disabled")||(e(this).attr("disabled","disabled"),e("div.wp-smush-info").remove(),t.showSmushDialog(),t.initFileTree())}),e("body").on("click","a.wp-smush-dir-link",function(n){e("div.sui-wrap button.wp-smush-browse").length>0&&(n.preventDefault(),SUI.dialogs["wp-smush-list-dialog"].show(),t.initFileTree())}),e(".wp-smush-select-dir").on("click",function(n){if(n.preventDefault(),!e(this).attr("disabled")){var i=e(this);e("div.wp-smush-list-dialog div.sui-box-body").css({opacity:"0.8"}),e("div.wp-smush-list-dialog div.sui-box-body a").unbind("click"),i.attr("disabled","disabled"),i.parent().find(".add-dir-loader").addClass("sui-icon-loader sui-loading");var r=t.tree.getSelectedNodes(),o=e('input[name="wp-smush-base-path"]').val(),a=[];r.forEach(function(e){a.push(o+"/"+e.key)});var u={action:"image_list",smush_path:a,image_list_nonce:e('input[name="image_list_nonce"]').val()};e.get(ajaxurl,u,function(e){SUI.dialogs["wp-smush-list-dialog"].hide(),t.scanner=new s.default(e.data,0),t.showProgressDialog(e.data),t.scanner.scan()})}}),e("#wp-smush-list-dialog").on("click",".sui-dialog-close",function(){e(".wp-smush-browse").removeAttr("disabled"),SUI.dialogs["wp-smush-list-dialog"].hide(),e(".wp-smush-select-dir, button.wp-smush-browse, a.wp-smush-dir-link").removeAttr("disabled"),e(".wp-smush-select-dir, .wp-smush-list-dialog .sui-box-body").css({opacity:"1"})}),n.on("click",".sui-icon-close, .sui-dialog-close, .wp-smush-cancel-dir",function(n){n.preventDefault(),e(this).parent().find(".add-dir-loader").addClass("sui-icon-loader sui-loading"),t.scanner.cancel().done(function(){return window.location.href=t.wp_smush_msgs.directory_url})}),n.on("click",".sui-icon-play, .wp-smush-resume-scan",function(e){e.preventDefault(),t.scanner.resume()})},getDirectoryList:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n="";return e.ajax({type:"GET",url:ajaxurl,data:{action:"smush_get_directory_list",list_nonce:jQuery('input[name="list_nonce"]').val(),dir:t},success:function(e){n=e.data},async:!1}),e("button.wp-smush-select-dir").html(self.wp_smush_msgs.add_dir),n},initFileTree:function(){var t=this,n=e("button.wp-smush-select-dir");t.tree=(0,i.createTree)(".wp-smush-list-dialog .content",{autoCollapse:!0,clickFolderMode:3,checkbox:!0,debugLevel:0,selectMode:3,tabindex:"0",source:t.getDirectoryList,lazyLoad:function(e,n){return n.result=t.getDirectoryList(n.node.key)},loadChildren:function(e,t){return t.node.fixSelection3AfterClick()},select:function(){return n.attr("disabled",!+t.tree.getSelectedNodes().length)},init:function(){return n.attr("disabled",!0)}})},showSmushDialog:function(){SUI.dialogs["wp-smush-list-dialog"].show(),e(".wp-smush-list-dialog div.close").focus()},showProgressDialog:function(t){e(".wp-smush-progress-dialog .sui-progress-state-text").html("0/"+t+" "+self.wp_smush_msgs.progress_smushed),SUI.dialogs["wp-smush-progress-dialog"].show(),e(".wp-smush-progress-dialog div.close").focus()},updateProgressBar:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t>100&&(t=100),e(".sui-progress-block .sui-progress-text span").text(t+"%"),e(".sui-progress-block .sui-progress-bar span").width(t+"%"),t>=90&&e(".sui-progress-state .sui-progress-state-text").text("Finalizing..."),n&&e(".sui-progress-state .sui-progress-state-text").text("Cancelling...")}},WP_Smush.directory.init()}(jQuery)},function(e,t,n){var i,s,r;
/*!
 * jquery.fancytree.js
 * Tree view control with support for lazy loading and much more.
 * https://github.com/mar10/fancytree/
 *
 * Copyright (c) 2008-2018, Martin Wendt (http://wwWendt.de)
 * Released under the MIT license
 * https://github.com/mar10/fancytree/wiki/LicenseInfo
 *
 * @version 2.29.1
 * @date 2018-06-27T18:51:43Z
 */s=[n(1),n(11)],void 0===(r="function"==typeof(i=function(e){"use strict";if(!e.ui||!e.ui.fancytree){var t,n,i=null,s=new RegExp(/\.|\//),r=/[&<>"'\/]/g,o=/[<>"'\/]/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},u={16:!0,17:!0,18:!0},l={8:"backspace",9:"tab",10:"return",13:"return",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},c={0:"",1:"left",2:"middle",3:"right"},d="active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore".split(" "),h={},p="columns types".split(" "),f="checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus".split(" "),m={},g={},v={active:!0,children:!0,data:!0,focus:!0};for(t=0;t<d.length;t++)h[d[t]]=!0;for(t=0;t<f.length;t++)n=f[t],m[n]=!0,n!==n.toLowerCase()&&(g[n.toLowerCase()]=n);return y(e.ui,"Fancytree requires jQuery UI (http://jqueryui.com)"),Date.now||(Date.now=function(){return(new Date).getTime()}),j.prototype={_findDirectChild:function(e){var t,n,i=this.children;if(i)if("string"==typeof e){for(t=0,n=i.length;t<n;t++)if(i[t].key===e)return i[t]}else{if("number"==typeof e)return this.children[e];if(e.parent===this)return e}return null},_setChildren:function(e){y(e&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var t=0,n=e.length;t<n;t++)this.children.push(new j(this,e[t]))},addChildren:function(t,n){var i,s,r,o,a=this.getFirstChild(),u=this.getLastChild(),l=[];for(e.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),i=0,s=t.length;i<s;i++)l.push(new j(this,t[i]));if(o=l[0],null==n?this.children=this.children.concat(l):(n=this._findDirectChild(n),y((r=e.inArray(n,this.children))>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[r,0].concat(l))),a&&!n){for(i=0,s=l.length;i<s;i++)l[i].render();a!==this.getFirstChild()&&a.renderStatus(),u!==this.getLastChild()&&u.renderStatus()}else(!this.parent||this.parent.ul||this.tr)&&this.render();return 3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),this.triggerModifyChild("add",1===l.length?l[0]:null),o},addClass:function(e){return this.toggleClass(e,!0)},addNode:function(e,t){switch(void 0!==t&&"over"!==t||(t="child"),t){case"after":return this.getParent().addChildren(e,this.getNextSibling());case"before":return this.getParent().addChildren(e,this);case"firstChild":var n=this.children?this.children[0]:null;return this.addChildren(e,n);case"child":case"over":return this.addChildren(e)}y(!1,"Invalid mode: "+t)},addPagingNode:function(t,n){var i,s;if(n=n||"child",!1!==t)return t=e.extend({title:this.tree.options.strings.moreData,statusNodeType:"paging",icon:!1},t),this.partload=!0,this.addNode(t,n);for(i=this.children.length-1;i>=0;i--)"paging"===(s=this.children[i]).statusNodeType&&this.removeChild(s);this.partload=!1},appendSibling:function(e){return this.addNode(e,"after")},applyPatch:function(t){if(null===t)return this.remove(),k(this);var n,i,s={children:!0,expanded:!0,parent:!0};for(n in t)i=t[n],s[n]||e.isFunction(i)||(m[n]?this[n]=i:this.data[n]=i);return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):k(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,n){return e.addNode(this.toDict(!0,n),t)},countChildren:function(e){var t,n,i,s=this.children;if(!s)return 0;if(i=s.length,!1!==e)for(t=0,n=i;t<n;t++)i+=s[t].countChildren();return i},debug:function(e){this.tree.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),_("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},discardMarkup:function(e){var t=e?"nodeRemoveMarkup":"nodeRemoveChildMarkup";this.tree._callHook(t,this)},error:function(e){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),_("error",arguments))},findAll:function(t){t=e.isFunction(t)?t:E(t);var n=[];return this.visit(function(e){t(e)&&n.push(e)}),n},findFirst:function(t){t=e.isFunction(t)?t:E(t);var n=null;return this.visit(function(e){if(t(e))return n=e,!1}),n},_changeSelectStatusAttrs:function(e){var t=!1,n=this.tree.options,s=i.evalOption("unselectable",this,this,n,!1),r=i.evalOption("unselectableStatus",this,this,n,void 0);switch(s&&null!=r&&(e=r),e){case!1:t=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:t=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case void 0:t=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:y(!1,"invalid state: "+e)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(e){var t=this.isSelected();this.visit(function(e){e._changeSelectStatusAttrs(t)}),this.fixSelection3FromEndNodes(e)},fixSelection3FromEndNodes:function(e){var t=this.tree.options;y(3===t.selectMode,"expected selectMode 3"),function e(n){var s,r,o,a,u,l,c,d,h=n.children;if(h&&h.length){for(l=!0,c=!1,s=0,r=h.length;s<r;s++)a=e(o=h[s]),i.evalOption("unselectableIgnore",o,o,t,!1)||(!1!==a&&(c=!0),!0!==a&&(l=!1));u=!!l||!!c&&void 0}else u=null==(d=i.evalOption("unselectableStatus",n,n,t,void 0))?!!n.selected:!!d;return n._changeSelectStatusAttrs(u),u}(this),this.visitParents(function(e){var n,s,r,o,a,u=e.children,l=!0,c=!1;for(n=0,s=u.length;n<s;n++)r=u[n],i.evalOption("unselectableIgnore",r,r,t,!1)||(((o=null==(a=i.evalOption("unselectableStatus",r,r,t,void 0))?!!r.selected:!!a)||r.partsel)&&(c=!0),o||(l=!1));o=!!l||!!c&&void 0,e._changeSelectStatusAttrs(o)})},fromDict:function(t){for(var n in t)m[n]?this[n]=t[n]:"data"===n?e.extend(this.data,t.data):e.isFunction(t[n])||v[n]||(this.data[n]=t[n]);t.children&&(this.removeChildren(),this.addChildren(t.children)),this.renderTitle()},getChildren:function(){if(void 0!==this.hasChildren())return this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return e.inArray(this,this.parent.children)},getIndexHier:function(t,n){t=t||".";var i,s=[];return e.each(this.getParentList(!1,!0),function(e,t){i=""+(t.getIndex()+1),n&&(i=("0000000"+i).substr(-n)),s.push(i)}),s.join(t)},getKeyPath:function(e){var t=[],n=this.tree.options.keyPathSeparator;return this.visitParents(function(e){e.parent&&t.unshift(e.key)},!e),n+t.join(n)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},getNextSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=0,t=n.length-1;e<t;e++)if(n[e]===this)return n[e+1]}return null},getParent:function(){return this.parent},getParentList:function(e,t){for(var n=[],i=t?this:this.parent;i;)(e||i.parent)&&n.unshift(i),i=i.parent;return n},getPrevSibling:function(){if(this.parent){var e,t,n=this.parent.children;for(e=1,t=n.length;e<t;e++)if(n[e]===this)return n[e-1]}return null},getSelectedNodes:function(e){var t=[];return this.visit(function(n){if(n.selected&&(t.push(n),!0===e))return"skip"}),t},hasChildren:function(){if(this.lazy){if(null==this.children)return;if(0===this.children.length)return!1;if(1===this.children.length&&this.children[0].isStatusNode())return;return!0}return!(!this.children||!this.children.length)},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(e){this.tree.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),_("info",arguments))},isActive:function(){return this.tree.activeNode===this},isBelowOf:function(e){return this.getIndexHier(".",5)>e.getIndexHier(".",5)},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(t){if(!t||t.tree!==this.tree)return!1;for(var n=this.parent;n;){if(n===t)return!0;n===n.parent&&e.error("Recursive parent link: "+n),n=n.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||void 0!==this.hasChildren()},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isPartsel:function(){return!this.selected&&!!this.partsel},isPartload:function(){return!!this.partload},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isPagingNode:function(){return"paging"===this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return void 0===this.hasChildren()},isVisible:function(){var e,t,n=this.getParentList(!1,!1);for(e=0,t=n.length;e<t;e++)if(!n[e].expanded)return!1;return!0},lazyLoad:function(e){return this.warn("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead."),this.load(e)},load:function(e){var t,n,i=this,s=this.isExpanded();return y(this.isLazy(),"load() requires a lazy node"),e||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),!1===(n=this.tree._triggerNodeEvent("lazyLoad",this))?k(this):(y("boolean"!=typeof n,"lazyLoad event must return source in data.result"),t=this.tree._callHook("nodeLoadChildren",this,n),s?(this.expanded=!0,t.always(function(){i.render()})):t.always(function(){i.renderStatus()}),t)):k(this)},makeVisible:function(t){var n,i=this,s=[],r=new e.Deferred,o=this.getParentList(!1,!1),a=o.length,u=!(t&&!0===t.noAnimation),l=!(t&&!1===t.scrollIntoView);for(n=a-1;n>=0;n--)s.push(o[n].setExpanded(!0,t));return e.when.apply(e,s).done(function(){l?i.scrollIntoView(u).done(function(){r.resolve()}):r.resolve()}),r.promise()},moveTo:function(t,n,i){void 0===n||"over"===n?n="child":"firstChild"===n&&(t.children&&t.children.length?(n="before",t=t.children[0]):n="child");var s,r=this.parent,o="child"===n?t:t.parent;if(this!==t){if(this.parent?o.isDescendantOf(this)&&e.error("Cannot move a node to its own descendant"):e.error("Cannot move system root"),o!==r&&r.triggerModifyChild("remove",this),1===this.parent.children.length){if(this.parent===o)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else y((s=e.inArray(this,this.parent.children))>=0,"invalid source parent"),this.parent.children.splice(s,1);if(this.parent=o,o.hasChildren())switch(n){case"child":o.children.push(this);break;case"before":y((s=e.inArray(t,o.children))>=0,"invalid target parent"),o.children.splice(s,0,this);break;case"after":y((s=e.inArray(t,o.children))>=0,"invalid target parent"),o.children.splice(s+1,0,this);break;default:e.error("Invalid mode "+n)}else o.children=[this];i&&t.visit(i,!0),o===r?o.triggerModifyChild("move",this):o.triggerModifyChild("add",this),this.tree!==t.tree&&(this.warn("Cross-tree moveTo is experimantal!"),this.visit(function(e){e.tree=t.tree},!0)),r.isDescendantOf(o)||r.render(),o.isDescendantOf(r)||o===r||o.render()}},navigate:function(t,n){var i,s,r,o=e.ui.keyCode,a=null;function u(i){if(i){try{i.makeVisible({scrollIntoView:!1})}catch(e){}return e(i.span).is(":visible")?!1===n?i.setFocus():i.setActive():(i.debug("Navigate: skipping hidden node"),void i.navigate(t,n))}}switch(t){case o.BACKSPACE:this.parent&&this.parent.parent&&(r=u(this.parent));break;case o.HOME:this.tree.visit(function(t){if(e(t.span).is(":visible"))return r=u(t),!1});break;case o.END:this.tree.visit(function(t){e(t.span).is(":visible")&&(r=t)}),r&&(r=u(r));break;case o.LEFT:this.expanded?(this.setExpanded(!1),r=u(this)):this.parent&&this.parent.parent&&(r=u(this.parent));break;case o.RIGHT:this.expanded||!this.children&&!this.lazy?this.children&&this.children.length&&(r=u(this.children[0])):(this.setExpanded(),r=u(this));break;case o.UP:for(a=this.getPrevSibling();a&&!e(a.span).is(":visible");)a=a.getPrevSibling();for(;a&&a.expanded&&a.children&&a.children.length;)a=a.children[a.children.length-1];!a&&this.parent&&this.parent.parent&&(a=this.parent),r=u(a);break;case o.DOWN:if(this.expanded&&this.children&&this.children.length)a=this.children[0];else for(i=(s=this.getParentList(!1,!0)).length-1;i>=0;i--){for(a=s[i].getNextSibling();a&&!e(a.span).is(":visible");)a=a.getNextSibling();if(a)break}r=u(a)}return r||k()},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},removeClass:function(e){return this.toggleClass(e,!1)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},replaceWith:function(n){var i,s=this.parent,r=e.inArray(this,s.children),o=this;return y(this.isPagingNode(),"replaceWith() currently requires a paging status node"),(i=this.tree._callHook("nodeLoadChildren",this,n)).done(function(e){var n=o.children;for(t=0;t<n.length;t++)n[t].parent=s;s.children.splice.apply(s.children,[r+1,0].concat(n)),o.children=null,o.remove(),s.render()}).fail(function(){o.setExpanded()}),i},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=void 0,this.renderStatus()},scheduleAction:function(t,n){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.debug("clearTimeout(%o)",this.tree.timer)),this.tree.timer=null;var i=this;switch(t){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger expand"),i.setExpanded(!0)},n);break;case"activate":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger activate"),i.setActive(!0)},n);break;default:e.error("Invalid mode "+t)}},scrollIntoView:function(t,n){void 0!==n&&function(e){return!(!e.tree||void 0===e.statusNodeType)}(n)&&(this.warn("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead."),n={topNode:n});var i,s,r,o=e.extend({effects:!0===t?{duration:200,queue:!1}:t,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent||this.tree.$container,topNode:null},n),a=new e.Deferred,u=this,l=e(this.span).height(),c=e(o.scrollParent),d=o.scrollOfs.top||0,h=o.scrollOfs.bottom||0,p=c.height(),f=c.scrollTop(),m=c,g=c[0]===window,v=o.topNode||null,_=null;return e(this.span).is(":visible")?(g?(s=e(this.span).offset().top,i=v&&v.span?e(v.span).offset().top:0,m=e("html,body")):(y(c[0]!==document&&c[0]!==document.body,"scrollParent should be a simple element or `window`, not document or body."),r=c.offset().top,s=e(this.span).offset().top-r+f,i=v?e(v.span).offset().top-r+f:0,p-=Math.max(0,c.innerHeight()-c[0].clientHeight)),s<f+d?_=s-d:s+l>f+p-h&&(_=s+l-p+h,v&&(y(v.isRootNode()||e(v.span).is(":visible"),"topNode must be visible"),i<_&&(_=i-d))),null!==_?o.effects?(o.effects.complete=function(){a.resolveWith(u)},m.stop(!0).animate({scrollTop:_},o.effects)):(m[0].scrollTop=_,a.resolveWith(this)):a.resolveWith(this),a.promise()):(this.warn("scrollIntoView(): node is invisible."),k())},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e,t){return this.tree._callHook("nodeSetSelected",this,e,t)},setStatus:function(e,t,n){return this.tree._callHook("nodeSetStatus",this,e,t,n)},setTitle:function(e){this.title=e,this.renderTitle(),this.triggerModify("rename")},sortChildren:function(e,t){var n,i,s=this.children;if(s){if(e=e||function(e,t){var n=e.title.toLowerCase(),i=t.title.toLowerCase();return n===i?0:n>i?1:-1},s.sort(e),t)for(n=0,i=s.length;n<i;n++)s[n].children&&s[n].sortChildren(e,"$norender$");"$norender$"!==t&&this.render(),this.triggerModifyChild("sort")}},toDict:function(t,n){var i,s,r,o={},a=this;if(e.each(f,function(e,t){(a[t]||!1===a[t])&&(o[t]=a[t])}),e.isEmptyObject(this.data)||(o.data=e.extend({},this.data),e.isEmptyObject(o.data)&&delete o.data),n&&n(o,a),t&&this.hasChildren())for(o.children=[],i=0,s=this.children.length;i<s;i++)(r=this.children[i]).isStatusNode()||o.children.push(r.toDict(!0,n));return o},toggleClass:function(t,n){var i,s,r=t.match(/\S+/g)||[],o=0,a=!1,u=this[this.tree.statusClassPropName],l=" "+(this.extraClasses||"")+" ";for(u&&e(u).toggleClass(t,n);i=r[o++];)if(s=l.indexOf(" "+i+" ")>=0,n=void 0===n?!s:!!n)s||(l+=i+" ",a=!0);else for(;l.indexOf(" "+i+" ")>-1;)l=l.replace(" "+i+" "," ");return this.extraClasses=e.trim(l),a},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"FancytreeNode@"+this.key+"[title='"+this.title+"']"},triggerModifyChild:function(t,n,i){var s,r=this.tree.options.modifyChild;r&&(n&&n.parent!==this&&e.error("childNode "+n+" is not a child of "+this),s={node:this,tree:this.tree,operation:t,childNode:n||null},i&&e.extend(s,i),r({type:"modifyChild"},s))},triggerModify:function(e,t){this.parent.triggerModifyChild(e,this,t)},visit:function(e,t){var n,i,s=!0,r=this.children;if(!0===t&&(!1===(s=e(this))||"skip"===s))return s;if(r)for(n=0,i=r.length;n<i&&!1!==(s=r[n].visit(e,!0));n++);return s},visitAndLoad:function(t,n,i){var s,r,o,a=this;return!t||!0!==n||!1!==(r=t(a))&&"skip"!==r?a.children||a.lazy?(s=new e.Deferred,o=[],a.load().done(function(){for(var n=0,i=a.children.length;n<i;n++){if(!1===(r=a.children[n].visitAndLoad(t,!0,!0))){s.reject();break}"skip"!==r&&o.push(r)}e.when.apply(this,o).then(function(){s.resolve()})}),s.promise()):k():i?r:k()},visitParents:function(e,t){if(t&&!1===e(this))return!1;for(var n=this.parent;n;){if(!1===e(n))return!1;n=n.parent}return!0},visitSiblings:function(e,t){var n,i,s,r=this.parent.children;for(n=0,i=r.length;n<i;n++)if(s=r[n],(t||s!==this)&&!1===e(s))return!1;return!0},warn:function(e){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),_("warn",arguments))}},D.prototype={_makeHookContext:function(t,n,i){var s,r;return void 0!==t.node?(n&&t.originalEvent!==n&&e.error("invalid args"),s=t):t.tree?s={node:t,tree:r=t.tree,widget:r.widget,options:r.widget.options,originalEvent:n,typeInfo:r.types[t.type]||{}}:t.widget?s={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:n}:e.error("invalid args"),i&&e.extend(s,i),s},_callHook:function(t,n,i){var s=this._makeHookContext(n),r=this[t],o=Array.prototype.slice.call(arguments,2);return e.isFunction(r)||e.error("_callHook('"+t+"') is not a function"),o.unshift(s),r.apply(this,o)},_setExpiringValue:function(e,t,n){this._tempCache[e]={value:t,expire:Date.now()+(+n||50)}},_getExpiringValue:function(e){var t=this._tempCache[e];return t&&t.expire>Date.now()?t.value:(delete this._tempCache[e],null)},_requireExtension:function(t,n,i,s){i=!!i;var r=this._local.name,o=this.options.extensions,a=e.inArray(t,o)<e.inArray(r,o),u=n&&null==this.ext[t],l=!u&&null!=i&&i!==a;return y(r&&r!==t,"invalid or same name"),!u&&!l||(s||(u||n?(s="'"+r+"' extension requires '"+t+"'",l&&(s+=" to be registered "+(i?"before":"after")+" itself")):s="If used together, `"+t+"` must be registered "+(i?"before":"after")+" `"+r+"`"),e.error(s),!1)},activateKey:function(e){var t=this.getNodeByKey(e);return t?t.setActive():this.activeNode&&this.activeNode.setActive(!1),t},addPagingNode:function(e,t){return this.rootNode.addPagingNode(e,t)},applyPatch:function(t){var n,i,s,r,o,a,u=t.length,l=[];for(i=0;i<u;i++)y(2===(s=t[i]).length,"patchList must be an array of length-2-arrays"),r=s[0],o=s[1],(a=null===r?this.rootNode:this.getNodeByKey(r))?(n=new e.Deferred,l.push(n),a.applyPatch(o).always(N(n,a))):this.warn("could not find node with key '"+r+"'");return e.when.apply(e,l).promise()},clear:function(e){this._callHook("treeClear",this)},count:function(){return this.rootNode.countChildren()},debug:function(e){this.options.debugLevel>=4&&(Array.prototype.unshift.call(arguments,this.toString()),_("log",arguments))},enableUpdate:function(e){return e=!1!==e,!!this._enableUpdate==!!e?e:(this._enableUpdate=e,e?(this.debug("enableUpdate(true): redraw "),this.render()):this.debug("enableUpdate(false)..."),!e)},findAll:function(e){return this.rootNode.findAll(e)},findFirst:function(e){return this.rootNode.findFirst(e)},findNextNode:function(t,n,i){t="string"==typeof t?function(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}(t):t;var s=null,r=(n=n||this.getFirstChild()).parent.children,o=null,a=function(e,t,n){var i,s,r=e.children,o=r.length,u=r[t];if(u&&!1===n(u))return!1;if(u&&u.children&&u.expanded&&!1===a(u,0,n))return!1;for(i=t+1;i<o;i++)if(!1===a(e,i,n))return!1;return(s=e.parent)?a(s,s.children.indexOf(e)+1,n):a(e,0,n)};return a(n.parent,r.indexOf(n),function(i){return i!==s&&(s=s||i,e(i.span).is(":visible")?(!t(i)||(o=i)===n)&&void 0:void i.debug("quicksearch: skipping hidden node"))}),o},generateFormElements:function(t,n,i){i=i||{};var s,r="string"==typeof t?t:"ft_"+this._id+"[]",o="string"==typeof n?n:"ft_"+this._id+"_active",a="fancytree_result_"+this._id,u=e("#"+a),l=3===this.options.selectMode&&!1!==i.stopOnParents;function c(t){u.append(e("<input>",{type:"checkbox",name:r,value:t.key,checked:!0}))}u.length?u.empty():u=e("<div>",{id:a}).hide().insertAfter(this.$container),!1!==n&&this.activeNode&&u.append(e("<input>",{type:"radio",name:o,value:this.activeNode.key,checked:!0})),i.filter?this.visit(function(e){var t=i.filter(e);if("skip"===t)return t;!1!==t&&c(e)}):!1!==t&&(s=this.getSelectedNodes(l),e.each(s,function(e,t){c(t)}))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getNodeByKey:function(e,t){var n,i;return!t&&(n=document.getElementById(this.options.idPrefix+e))?n.ftnode?n.ftnode:null:(t=t||this.rootNode,i=null,t.visit(function(t){if(t.key===e)return i=t,!1},!0),i)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(e){return this.rootNode.getSelectedNodes(e)},hasFocus:function(){return!!this._hasFocus},info:function(e){this.options.debugLevel>=3&&(Array.prototype.unshift.call(arguments,this.toString()),_("info",arguments))},loadKeyPath:function(t,n){var i,s,r,o=this,a=new e.Deferred,u=this.getRootNode(),l=this.options.keyPathSeparator,c=[],d=e.extend({},n);for("function"==typeof n?i=n:n&&n.callback&&(i=n.callback),d.callback=function(e,t,n){i&&i.call(e,t,n),a.notifyWith(e,[{node:t,status:n}])},null==d.matchKey&&(d.matchKey=function(e,t){return e.key===t}),e.isArray(t)||(t=[t]),s=0;s<t.length;s++)(r=t[s]).charAt(0)===l&&(r=r.substr(1)),c.push(r.split(l));return setTimeout(function(){o._loadKeyPathImpl(a,d,u,c).done(function(){a.resolve()})},0),a.promise()},_loadKeyPathImpl:function(t,n,i,s){var r,o,a,u,l,c,d,h,p=this;function f(e,t){var i,s,r=e.children;if(r)for(i=0,s=r.length;i<s;i++)if(n.matchKey(r[i],t))return r[i];return null}for(l={},o=0;o<s.length;o++)for(d=s[o],c=i;d.length;){if(a=d.shift(),!(u=f(c,a))){this.warn("loadKeyPath: key not found: "+a+" (parent: "+c+")"),n.callback(this,a,"error");break}if(0===d.length){n.callback(this,u,"ok");break}if(u.lazy&&void 0===u.hasChildren()){n.callback(this,u,"loaded"),l[a=u.key]?l[a].pathSegList.push(d):l[a]={parent:u,pathSegList:[d]};break}n.callback(this,u,"loaded"),c=u}function m(e,t,i){n.callback(p,t,"loading"),t.load().done(function(){p._loadKeyPathImpl.call(p,e,n,t,i).always(N(e,p))}).fail(function(i){p.warn("loadKeyPath: error loading lazy "+t),n.callback(p,u,"error"),e.rejectWith(p)})}for(var g in r=[],l){var v=l[g];h=new e.Deferred,r.push(h),m(h,v.parent,v.pathSegList)}return e.when.apply(e,r).promise()},reactivate:function(e){var t,n=this.activeNode;return n?(this.activeNode=null,t=n.setActive(!0,{noFocus:!0}),e&&n.setFocus(),t):k()},reload:function(e){return this._callHook("treeClear",this),this._callHook("treeLoad",this,e)},render:function(e,t){return this.rootNode.render(e,t)},selectAll:function(e){this.visit(function(t){t.setSelected(e)})},setFocus:function(e){return this._callHook("treeSetFocus",this,e)},toDict:function(e,t){var n=this.rootNode.toDict(!0,t);return e?n:n.children},toString:function(){return"Fancytree@"+this._id},_triggerNodeEvent:function(e,t,n,i){var s=this._makeHookContext(t,n,i),r=this.widget._trigger(e,n,s);return!1!==r&&void 0!==s.result?s.result:r},_triggerTreeEvent:function(e,t,n){var i=this._makeHookContext(this,t,n),s=this.widget._trigger(e,t,i);return!1!==s&&void 0!==i.result?i.result:s},visit:function(e){return this.rootNode.visit(e,!1)},visitRows:function(e,t){if(t&&t.reverse)return delete t.reverse,this._visitRowsUp(e,t);var n,i,s,r=0,o=!1===t.includeSelf,a=!!t.includeHidden,u=t.start||this.rootNode.children[0];for(i=u.parent;i;){for(n=(s=i.children).indexOf(u)+r;n<s.length;n++){if(u=s[n],!o&&!1===e(u))return!1;if(o=!1,u.children&&u.children.length&&(a||u.expanded)&&!1===u.visit(function(t){return!1!==e(t)&&(a||!t.children||t.expanded?void 0:"skip")},!1))return!1}u=i,i=i.parent,r=1}return!0},_visitRowsUp:function(t,n){for(var i,s,r=!!n.includeHidden,o=n.start||this.rootNode.children[0];;){if((i=(s=o.parent).children)[0]===o)o=s,i=s.children;else for(o=i[i.indexOf(o)-1];(r||o.expanded)&&o.children&&o.children.length;)s=o,o=(i=o.children)[i.length-1];if((r||e(o.span).is(":visible"))&&!1===t(o))return!1}},warn:function(e){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),_("warn",arguments))}},e.extend(D.prototype,{nodeClick:function(e){var t,n,i=e.targetType,s=e.node;if("expander"===i){if(s.isLoading())return void s.debug("Got 2nd click while loading: ignored");this._callHook("nodeToggleExpanded",e)}else if("checkbox"===i)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(n=!1,t=!0,s.folder)switch(e.options.clickFolderMode){case 2:n=!0,t=!1;break;case 3:t=!0,n=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),n&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var n,i,s,r=e.node;if(r.parent)for(i=0,s=(n=r.parent.children).length;i<s;i++)n[i]!==r&&n[i].expanded&&this._callHook("nodeSetExpanded",n[i],!1,t)},nodeDblclick:function(e){"title"===e.targetType&&4===e.options.clickFolderMode&&this._callHook("nodeToggleExpanded",e),"title"===e.targetType&&e.originalEvent.preventDefault()},nodeKeydown:function(t){var n,s,r,o=t.originalEvent,a=t.node,u=t.tree,c=t.options,d=o.which,h=String.fromCharCode(d),p=!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey),f=e(o.target),m=!0,g=!(o.ctrlKey||!c.autoActivate);if(a||(r=this.getActiveNode()||this.getFirstChild())&&(r.setFocus(),(a=t.node=this.focusNode).debug("Keydown force focus on active node")),c.quicksearch&&p&&/\w/.test(h)&&!l[d]&&!f.is(":input:enabled"))return(s=Date.now())-u.lastQuicksearchTime>500&&(u.lastQuicksearchTerm=""),u.lastQuicksearchTime=s,u.lastQuicksearchTerm+=h,(n=u.findNextNode(u.lastQuicksearchTerm,u.getActiveNode()))&&n.setActive(),void o.preventDefault();switch(i.eventToString(o)){case"+":case"=":u.nodeSetExpanded(t,!0);break;case"-":u.nodeSetExpanded(t,!1);break;case"space":a.isPagingNode()?u._triggerNodeEvent("clickPaging",t,o):i.evalOption("checkbox",a,a,c,!1)?u.nodeToggleSelected(t):u.nodeSetActive(t,!0);break;case"return":u.nodeSetActive(t,!0);break;case"home":case"end":case"backspace":case"left":case"right":case"up":case"down":a.navigate(o.which,g);break;default:m=!1}m&&o.preventDefault()},nodeLoadChildren:function(t,n){var i,s,r,o=t.tree,a=t.node,u=Date.now();if(e.isFunction(n)&&(n=n.call(o,{type:"source"},t),y(!e.isFunction(n),"source callback must not return another function")),n.url&&(a._requestId&&a.warn("Recursive load request #"+u+" while #"+a._requestId+" is pending."),i=e.extend({},t.options.ajax,n),a._requestId=u,i.debugDelay?(s=i.debugDelay,e.isArray(s)&&(s=s[0]+Math.random()*(s[1]-s[0])),a.warn("nodeLoadChildren waiting debugDelay "+Math.round(s)+" ms ..."),i.debugDelay=!1,r=e.Deferred(function(t){setTimeout(function(){e.ajax(i).done(function(){t.resolveWith(this,arguments)}).fail(function(){t.rejectWith(this,arguments)})},s)})):r=e.ajax(i),n=new e.Deferred,r.done(function(i,s,r){var l,c;if("json"!==this.dataType&&"jsonp"!==this.dataType||"string"!=typeof i||e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),a._requestId&&a._requestId>u)n.rejectWith(this,["$recursive_request"]);else{if(t.options.postProcess){try{c=o._triggerNodeEvent("postProcess",t,t.originalEvent,{response:i,error:null,dataType:this.dataType})}catch(e){c={error:e,message:""+e,details:"postProcess failed"}}if(c.error)return l=e.isPlainObject(c.error)?c.error:{message:c.error},l=o._makeHookContext(a,null,l),void n.rejectWith(this,[l]);i=e.isArray(c)?c:i}else i&&i.hasOwnProperty("d")&&t.options.enableAspx&&(i="string"==typeof i.d?e.parseJSON(i.d):i.d);n.resolveWith(this,[i])}}).fail(function(e,t,i){var s=o._makeHookContext(a,null,{error:e,args:Array.prototype.slice.call(arguments),message:i,details:e.status+": "+i});n.rejectWith(this,[s])})),e.isFunction(n.then)&&e.isFunction(n.catch)&&(r=n,n=new e.Deferred,r.then(function(e){n.resolve(e)},function(e){n.reject(e)})),e.isFunction(n.promise))o.nodeSetStatus(t,"loading"),n.done(function(e){o.nodeSetStatus(t,"ok"),a._requestId=null}).fail(function(e){var n;"$recursive_request"!==e?(e.node&&e.error&&e.message?n=e:"[object Object]"===(n=o._makeHookContext(a,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""})).message&&(n.message=""),a.warn("Load children failed ("+n.message+")",n),!1!==o._triggerNodeEvent("loadError",n,null)&&o.nodeSetStatus(t,"error",n.message,n.details)):a.warn("Ignored response for obsolete load request #"+u+" (expected #"+a._requestId+")")});else if(t.options.postProcess){var l=o._triggerNodeEvent("postProcess",t,t.originalEvent,{response:n,error:null,dataType:typeof n});n=e.isArray(l)?l:n}return e.when(n).done(function(t){var n;e.isPlainObject(t)&&(y(a.isRootNode(),"source may only be an object for root nodes (expecting an array of child objects otherwise)"),y(e.isArray(t.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),n=t,t=t.children,delete n.children,e.each(p,function(e,t){void 0!==n[t]&&(o[t]=n[t],delete n[t])}),e.extend(o.data,n)),y(e.isArray(t),"expected array of children"),a._setChildren(t),o._triggerNodeEvent("loadChildren",a)})},nodeLoadKeyPath:function(e,t){},nodeRemoveChild:function(t,n){var i,s=t.node,r=e.extend({},t,{node:n}),o=s.children;if(1===o.length)return y(n===o[0],"invalid single child"),this.nodeRemoveChildren(t);this.activeNode&&(n===this.activeNode||this.activeNode.isDescendantOf(n))&&this.activeNode.setActive(!1),this.focusNode&&(n===this.focusNode||this.focusNode.isDescendantOf(n))&&(this.focusNode=null),this.nodeRemoveMarkup(r),this.nodeRemoveChildren(r),y((i=e.inArray(n,o))>=0,"invalid child"),s.triggerModifyChild("remove",n),n.visit(function(e){e.parent=null},!0),this._callHook("treeRegisterNode",this,!1,n),o.splice(i,1)},nodeRemoveChildMarkup:function(t){var n=t.node;n.ul&&(n.isRootNode()?e(n.ul).empty():(e(n.ul).remove(),n.ul=null),n.visit(function(e){e.li=e.ul=null}))},nodeRemoveChildren:function(t){var n=t.tree,i=t.node;i.children&&(this.activeNode&&this.activeNode.isDescendantOf(i)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(i)&&(this.focusNode=null),this.nodeRemoveChildMarkup(t),e.extend({},t),i.triggerModifyChild("remove",null),i.visit(function(e){e.parent=null,n._callHook("treeRegisterNode",n,!1,e)}),i.lazy?i.children=[]:i.children=null,i.isRootNode()||(i.expanded=!1),this.nodeRenderStatus(t))},nodeRemoveMarkup:function(t){var n=t.node;n.li&&(e(n.li).remove(),n.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,n,i,s,r){var o,a,u,l,c,d,h,p=t.node,f=t.tree,m=t.options,g=m.aria,v=!1,_=p.parent,w=!_,b=p.children,x=null;if(!1!==f._enableUpdate&&(w||_.ul)){if(y(w||_.ul,"parent UL must exist"),w||(p.li&&(n||p.li.parentNode!==p.parent.ul)&&(p.li.parentNode===p.parent.ul?x=p.li.nextSibling:this.debug("Unlinking "+p+" (must be child of "+p.parent+")"),this.nodeRemoveMarkup(t)),p.li?this.nodeRenderStatus(t):(v=!0,p.li=document.createElement("li"),p.li.ftnode=p,p.key&&m.generateIds&&(p.li.id=m.idPrefix+p.key),p.span=document.createElement("span"),p.span.className="fancytree-node",g&&!p.tr&&e(p.li).attr("role","treeitem"),p.li.appendChild(p.span),this.nodeRenderTitle(t),m.createNode&&m.createNode.call(f,{type:"createNode"},t)),m.renderNode&&m.renderNode.call(f,{type:"renderNode"},t)),b){if(w||p.expanded||!0===i){for(p.ul||(p.ul=document.createElement("ul"),(!0!==s||r)&&p.expanded||(p.ul.style.display="none"),g&&e(p.ul).attr("role","group"),p.li?p.li.appendChild(p.ul):p.tree.$div.append(p.ul)),l=0,c=b.length;l<c;l++)h=e.extend({},t,{node:b[l]}),this.nodeRender(h,n,i,!1,!0);for(o=p.ul.firstChild;o;)(u=o.ftnode)&&u.parent!==p?(p.debug("_fixParent: remove missing "+u,o),d=o.nextSibling,o.parentNode.removeChild(o),o=d):o=o.nextSibling;for(o=p.ul.firstChild,l=0,c=b.length-1;l<c;l++)(a=b[l])!==(u=o.ftnode)?p.ul.insertBefore(a.li,u.li):o=o.nextSibling}}else p.ul&&(this.warn("remove child markup for "+p),this.nodeRemoveChildMarkup(t));w||v&&_.ul.insertBefore(p.li,x)}},nodeRenderTitle:function(t,n){var r,o,a,u,l,c,d,h=t.node,p=t.tree,f=t.options,m=f.aria,g=h.getLevel(),v=[];void 0!==n&&(h.title=n),h.span&&!1!==p._enableUpdate&&(l=m&&!1!==h.hasChildren()?" role='button'":"",g<f.minExpandLevel?(h.lazy||(h.expanded=!0),g>1&&v.push("<span "+l+" class='fancytree-expander fancytree-expander-fixed'></span>")):v.push("<span "+l+" class='fancytree-expander'></span>"),(r=i.evalOption("checkbox",h,h,f,!1))&&!h.isStatusNode()&&(l=m?" role='checkbox'":"",o="fancytree-checkbox",("radio"===r||h.parent&&h.parent.radiogroup)&&(o+=" fancytree-radio"),v.push("<span "+l+" class='"+o+"'></span>")),void 0!==h.data.iconClass&&(h.icon?e.error("'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead"):(h.warn("'iconClass' node option is deprecated since v2.14.0: use 'icon' instead"),h.icon=h.data.iconClass)),!1!==(a=i.evalOption("icon",h,h,f,!0))&&(l=m?" role='presentation'":"",d=(d=i.evalOption("iconTooltip",h,h,f,null))?" title='"+S(d)+"'":"","string"==typeof a?s.test(a)?(a="/"===a.charAt(0)?a:(f.imagePath||"")+a,v.push("<img src='"+a+"' class='fancytree-icon'"+d+" alt='' />")):v.push("<span "+l+" class='fancytree-custom-icon "+a+"'"+d+"></span>"):a.text?v.push("<span "+l+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+d+">"+i.escapeHtml(a.text)+"</span>"):a.html?v.push("<span "+l+" class='fancytree-custom-icon "+(a.addClass||"")+"'"+d+">"+a.html+"</span>"):v.push("<span "+l+" class='fancytree-icon'"+d+"></span>")),u="",f.renderTitle&&(u=f.renderTitle.call(p,{type:"renderTitle"},t)||""),u||(!0===(c=i.evalOption("tooltip",h,h,f,null))&&(c=h.title),u="<span class='fancytree-title'"+(c=c?" title='"+S(c)+"'":"")+(f.titlesTabbable?" tabindex='0'":"")+">"+(f.escapeTitles?i.escapeHtml(h.title):h.title)+"</span>"),v.push(u),h.span.innerHTML=v.join(""),this.nodeRenderStatus(t),f.enhanceTitle&&(t.$title=e(">span.fancytree-title",h.span),u=f.enhanceTitle.call(p,{type:"enhanceTitle"},t)||""))},nodeRenderStatus:function(t){var n,s=t.node,r=t.tree,o=t.options,a=s.hasChildren(),u=s.isLastSibling(),l=o.aria,c=o._classNames,d=[],h=s[r.statusClassPropName];h&&!1!==r._enableUpdate&&(l&&(n=e(s.tr||s.li)),d.push(c.node),r.activeNode===s&&d.push(c.active),r.focusNode===s&&d.push(c.focused),s.expanded&&d.push(c.expanded),l&&(!1!==a?n.attr("aria-expanded",Boolean(s.expanded)):n.removeAttr("aria-expanded")),s.folder&&d.push(c.folder),!1!==a&&d.push(c.hasChildren),u&&d.push(c.lastsib),s.lazy&&null==s.children&&d.push(c.lazy),s.partload&&d.push(c.partload),s.partsel&&d.push(c.partsel),i.evalOption("unselectable",s,s,o,!1)&&d.push(c.unselectable),s._isLoading&&d.push(c.loading),s._error&&d.push(c.error),s.statusNodeType&&d.push(c.statusNodePrefix+s.statusNodeType),s.selected?(d.push(c.selected),l&&n.attr("aria-selected",!0)):l&&n.attr("aria-selected",!1),s.extraClasses&&d.push(s.extraClasses),!1===a?d.push(c.combinedExpanderPrefix+"n"+(u?"l":"")):d.push(c.combinedExpanderPrefix+(s.expanded?"e":"c")+(s.lazy&&null==s.children?"d":"")+(u?"l":"")),d.push(c.combinedIconPrefix+(s.expanded?"e":"c")+(s.folder?"f":"")),h.className=d.join(" "),s.li&&e(s.li).toggleClass(c.lastsib,u))},nodeSetActive:function(t,n,i){i=i||{};var s,r=t.node,o=t.tree,a=t.options,u=!0===i.noEvents,l=!0===i.noFocus;return r===o.activeNode==(n=!1!==n)?k(r):n&&!u&&!1===this._triggerNodeEvent("beforeActivate",r,t.originalEvent)?C(r,["rejected"]):(n?(o.activeNode&&(y(o.activeNode!==r,"node was active (inconsistency)"),s=e.extend({},t,{node:o.activeNode}),o.nodeSetActive(s,!1),y(null===o.activeNode,"deactivate was out of sync?")),a.activeVisible&&r.makeVisible({scrollIntoView:l&&null==o.focusNode}),o.activeNode=r,o.nodeRenderStatus(t),l||o.nodeSetFocus(t),u||o._triggerNodeEvent("activate",r,t.originalEvent)):(y(o.activeNode===r,"node was not active (inconsistency)"),o.activeNode=null,this.nodeRenderStatus(t),u||t.tree._triggerNodeEvent("deactivate",r,t.originalEvent)),k(r))},nodeSetExpanded:function(t,n,i){i=i||{};var s,r,o,a,u,l,c=t.node,d=t.tree,h=t.options,p=!0===i.noAnimation,f=!0===i.noEvents;if(n=!1!==n,c.expanded&&n||!c.expanded&&!n)return k(c);if(n&&!c.lazy&&!c.hasChildren())return k(c);if(!n&&c.getLevel()<h.minExpandLevel)return C(c,["locked"]);if(!f&&!1===this._triggerNodeEvent("beforeExpand",c,t.originalEvent))return C(c,["rejected"]);if(p||c.isVisible()||(p=i.noAnimation=!0),r=new e.Deferred,n&&!c.expanded&&h.autoCollapse){u=c.getParentList(!1,!0),l=h.autoCollapse;try{for(h.autoCollapse=!1,o=0,a=u.length;o<a;o++)this._callHook("nodeCollapseSiblings",u[o],i)}finally{h.autoCollapse=l}}return r.done(function(){var e=c.getLastChild();n&&h.autoScroll&&!p&&e?e.scrollIntoView(!0,{topNode:c}).always(function(){f||t.tree._triggerNodeEvent(n?"expand":"collapse",t)}):f||t.tree._triggerNodeEvent(n?"expand":"collapse",t)}),s=function(i){var s=h._classNames,r=h.toggleEffect;if(c.expanded=n,d._callHook("nodeRender",t,!1,!1,!0),c.ul)if("none"!==c.ul.style.display==!!c.expanded)c.warn("nodeSetExpanded: UL.style.display already set");else{if(r&&!p)return e(c.li).addClass(s.animating),void(e.isFunction(e(c.ul)[r.effect])?(d.debug("use jquery."+r.effect+" method"),e(c.ul)[r.effect]({duration:r.duration,always:function(){c.info("fancytree-animating end: "+c.li.className),e(this).removeClass(s.animating),e(c.li).removeClass(s.animating),i()}})):(d.debug("use specified effect ("+r.effect+") with the jqueryui.toggle method"),e(c.ul).stop(!0,!0),e(c.ul).parent().find(".ui-effects-placeholder").remove(),e(c.ul).toggle(r.effect,r.options,r.duration,function(){c.info("fancytree-animating end: "+c.li.className),e(this).removeClass(s.animating),e(c.li).removeClass(s.animating),i()})));c.ul.style.display=c.expanded||!parent?"":"none"}i()},n&&c.lazy&&void 0===c.hasChildren()?c.load().done(function(){r.notifyWith&&r.notifyWith(c,["loaded"]),s(function(){r.resolveWith(c)})}).fail(function(e){s(function(){r.rejectWith(c,["load failed ("+e+")"])})}):s(function(){r.resolveWith(c)}),r.promise()},nodeSetFocus:function(t,n){var i,s=t.tree,r=t.node,o=s.options,a=!!t.originalEvent&&e(t.originalEvent.target).is(":input");if(n=!1!==n,s.focusNode){if(s.focusNode===r&&n)return;i=e.extend({},t,{node:s.focusNode}),s.focusNode=null,this._triggerNodeEvent("blur",i),this._callHook("nodeRenderStatus",i)}n&&(this.hasFocus()||(r.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,{calledByNode:!0})),r.makeVisible({scrollIntoView:!1}),s.focusNode=r,o.titlesTabbable?a||e(r.span).find(".fancytree-title").focus():0===e(document.activeElement).closest(".fancytree-container").length&&e(s.$container).focus(),o.aria&&e(s.$container).attr("aria-activedescendant",e(r.tr||r.li).uniqueId().attr("id")),this._triggerNodeEvent("focus",t),o.autoScroll&&r.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(e,t,n){n=n||{};var s=e.node,r=e.tree,o=e.options,a=!0===n.noEvents,u=s.parent;if(t=!1!==t,!i.evalOption("unselectable",s,s,o,!1)){if(s._lastSelectIntent=t,!!s.selected===t&&(3!==o.selectMode||!s.partsel||t))return t;if(!a&&!1===this._triggerNodeEvent("beforeSelect",s,e.originalEvent))return!!s.selected;t&&1===o.selectMode?(r.lastSelectedNode&&r.lastSelectedNode.setSelected(!1),s.selected=t):3!==o.selectMode||!u||u.radiogroup||s.radiogroup?u&&u.radiogroup?s.visitSiblings(function(e){e._changeSelectStatusAttrs(t&&e===s)},!0):s.selected=t:(s.selected=t,s.fixSelection3AfterClick(n)),this.nodeRenderStatus(e),r.lastSelectedNode=t?s:null,a||r._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,n,i,s){var r=t.node,o=t.tree;function a(t,n){var i=r.children?r.children[0]:null;return i&&i.isStatusNode()?(e.extend(i,t),i.statusNodeType=n,o._callHook("nodeRenderTitle",i)):(r._setChildren([t]),r.children[0].statusNodeType=n,o.render()),r.children[0]}switch(n){case"ok":!function(){var e=r.children?r.children[0]:null;if(e&&e.isStatusNode()){try{r.ul&&(r.ul.removeChild(e.li),e.li=null)}catch(e){}1===r.children.length?r.children=[]:r.children.shift()}}(),r._isLoading=!1,r._error=null,r.renderStatus();break;case"loading":r.parent||a({title:o.options.strings.loading+(i?" ("+i+")":""),checkbox:!1,tooltip:s},n),r._isLoading=!0,r._error=null,r.renderStatus();break;case"error":a({title:o.options.strings.loadError+(i?" ("+i+")":""),checkbox:!1,tooltip:s},n),r._isLoading=!1,r._error={message:i,details:s},r.renderStatus();break;case"nodata":a({title:o.options.strings.noData,checkbox:!1,tooltip:s},n),r._isLoading=!1,r._error=null,r.renderStatus();break;default:e.error("invalid node status "+n)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){var t=e.node,n=!t.selected;return t.partsel&&!t.selected&&!0===t._lastSelectIntent&&(n=!1,t.selected=!0),t._lastSelectIntent=n,this.nodeSetSelected(e,n)},treeClear:function(e){var t=e.tree;t.activeNode=null,t.focusNode=null,t.$div.find(">ul.fancytree-container").empty(),t.rootNode.children=null},treeCreate:function(e){},treeDestroy:function(e){this.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("fancytree-helper-hidden")},treeInit:function(t){var n=t.tree,i=n.options;n.$container.attr("tabindex",i.tabindex),e.each(p,function(e,t){void 0!==i[t]&&(n.info("Move option "+t+" to tree"),n[t]=i[t],delete i[t])}),i.rtl?n.$container.attr("DIR","RTL").addClass("fancytree-rtl"):n.$container.removeAttr("DIR").removeClass("fancytree-rtl"),i.aria&&(n.$container.attr("role","tree"),1!==i.selectMode&&n.$container.attr("aria-multiselectable",!0)),this.treeLoad(t)},treeLoad:function(t,n){var i,s,r,o=t.tree,a=t.widget.element,u=e.extend({},t,{node:this.rootNode});if(o.rootNode.children&&this.treeClear(t),n=n||this.options.source)"string"==typeof n&&e.error("Not implemented");else switch(s=a.data("type")||"html"){case"html":(r=a.find(">ul:first")).addClass("ui-fancytree-source fancytree-helper-hidden"),n=e.ui.fancytree.parseHtml(r),this.data=e.extend(this.data,T(r));break;case"json":n=e.parseJSON(a.text()),a.contents().filter(function(){return 3===this.nodeType}).remove(),e.isPlainObject(n)&&(y(e.isArray(n.children),"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')"),i=n,n=n.children,delete i.children,e.each(p,function(e,t){void 0!==i[t]&&(o[t]=i[t],delete i[t])}),e.extend(o.data,i));break;default:e.error("Invalid data-type: "+s)}return this.nodeLoadChildren(u,n).done(function(){o.render(),3===t.options.selectMode&&o.rootNode.fixSelection3FromEndNodes(),o.activeNode&&o.options.activeVisible&&o.activeNode.makeVisible(),o._triggerTreeEvent("init",null,{status:!0})}).fail(function(){o.render(),o._triggerTreeEvent("init",null,{status:!1})})},treeRegisterNode:function(e,t,n){},treeSetFocus:function(t,n,i){var s;(n=!1!==n)!==this.hasFocus()&&(this._hasFocus=n,!n&&this.focusNode?this.focusNode.setFocus(!1):!n||i&&i.calledByNode||e(this.$container).focus(),this.$container.toggleClass("fancytree-treefocus",n),this._triggerTreeEvent(n?"focusTree":"blurTree"),n&&!this.activeNode&&(s=this._lastMousedownNode||this.getFirstChild())&&s.setFocus())},treeSetOption:function(t,n,i){var s=t.tree,r=!0,o=!1,a=!1;switch(n){case"aria":case"checkbox":case"icon":case"minExpandLevel":case"tabindex":o=!0,a=!0;break;case"escapeTitles":case"tooltip":a=!0;break;case"rtl":!1===i?s.$container.removeAttr("DIR").removeClass("fancytree-rtl"):s.$container.attr("DIR","RTL").addClass("fancytree-rtl"),a=!0;break;case"source":r=!1,s._callHook("treeLoad",s,i),a=!0}s.debug("set option "+n+"="+i+" <"+typeof i+">"),r&&(this.widget._super?this.widget._super.call(this.widget,n,i):e.Widget.prototype._setOption.call(this.widget,n,i)),o&&s._callHook("treeCreate",s),a&&s.render(!0,!1)}}),e.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!0,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,debugLevel:null,disabled:!1,enableAspx:!0,escapeTitles:!1,extensions:[],toggleEffect:{effect:"slideToggle",duration:200},generateIds:!1,icon:!0,idPrefix:"ft_",focusOnSelect:!1,keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,quicksearch:!1,rtl:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading...",loadError:"Load error!",moreData:"More...",noData:"No data."},tabindex:"0",titlesTabbable:!1,tooltip:!1,_classNames:{node:"fancytree-node",folder:"fancytree-folder",animating:"fancytree-animating",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",hasChildren:"fancytree-has-children",active:"fancytree-active",selected:"fancytree-selected",expanded:"fancytree-expanded",lazy:"fancytree-lazy",focused:"fancytree-focused",partload:"fancytree-partload",partsel:"fancytree-partsel",radio:"fancytree-radio",unselectable:"fancytree-unselectable",lastsib:"fancytree-lastsib",loading:"fancytree-loading",error:"fancytree-error",statusNodePrefix:"fancytree-statusnode-"},lazyLoad:null,postProcess:null},_create:function(){this.tree=new D(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul:first");var t,n,i,s=this.options,r=s.extensions;this.tree;for(i=0;i<r.length;i++)n=r[i],(t=e.ui.fancytree._extensions[n])||e.error("Could not apply extension '"+n+"' (it is not registered, did you forget to include it?)"),this.tree.options[n]=w({},t.options,this.tree.options[n]),y(void 0===this.tree.ext[n],"Extension name must not exist as Fancytree.ext attribute: '"+n+"'"),this.tree.ext[n]={},x(this.tree,0,t,n),t;void 0!==s.icons&&(!0!==s.icon?e.error("'icons' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'icons' tree option is deprecated since v2.14.0: use 'icon' instead"),s.icon=s.icons)),void 0!==s.iconClass&&(s.icon?e.error("'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead"):(this.tree.warn("'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead"),s.icon=s.iconClass)),void 0!==s.tabbable&&(s.tabindex=s.tabbable?"0":"-1",this.tree.warn("'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='"+s.tabindex+"' instead")),this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree),this._bind()},_setOption:function(e,t){return this.tree._callHook("treeSetOption",this.tree,e,t)},destroy:function(){this._unbind(),this.tree._callHook("treeDestroy",this.tree),e.Widget.prototype.destroy.call(this)},_unbind:function(){var t=this.tree._ns;this.element.off(t),this.tree.$container.off(t),e(document).off(t)},_bind:function(){var t=this,n=this.options,s=this.tree,r=s._ns;this._unbind(),s.$container.on("focusin"+r+" focusout"+r,function(t){var n=i.getNode(t),r="focusin"===t.type;if(!r&&n&&e(t.target).is("a"))n.debug("Ignored focusout on embedded <a> element.");else{if(r){if(s._getExpiringValue("focusin"))return void s.debug("Ignored double focusin.");s._setExpiringValue("focusin",!0,50),n||(n=s._getExpiringValue("mouseDownNode"))&&s.debug("Reconstruct mouse target for focusin from recent event.")}n?s._callHook("nodeSetFocus",s._makeHookContext(n,t),r):s.tbody&&e(t.target).parents("table.fancytree-container > thead").length?s.debug("Ignore focus event outside table body.",t):s._callHook("treeSetFocus",s,r)}}).on("selectstart"+r,"span.fancytree-title",function(e){e.preventDefault()}).on("keydown"+r,function(e){if(n.disabled||!1===n.keyboard)return!0;var t,i=s.focusNode,r=s._makeHookContext(i||s,e),o=s.phase;try{return s.phase="userEvent","preventNav"===(t=i?s._triggerNodeEvent("keydown",i,e):s._triggerTreeEvent("keydown",e))?t=!0:!1!==t&&(t=s._callHook("nodeKeydown",r)),t}finally{s.phase=o}}).on("mousedown"+r,function(e){var t=i.getEventTarget(e);s._lastMousedownNode=t?t.node:null,s._setExpiringValue("mouseDownNode",s._lastMousedownNode)}).on("click"+r+" dblclick"+r,function(e){if(n.disabled)return!0;var s,r=i.getEventTarget(e),o=r.node,a=t.tree,u=a.phase;if(!o)return!0;s=a._makeHookContext(o,e);try{switch(a.phase="userEvent",e.type){case"click":return s.targetType=r.type,o.isPagingNode()?!0===a._triggerNodeEvent("clickPaging",s,e):!1!==a._triggerNodeEvent("click",s,e)&&a._callHook("nodeClick",s);case"dblclick":return s.targetType=r.type,!1!==a._triggerNodeEvent("dblclick",s,e)&&a._callHook("nodeDblclick",s)}}finally{a.phase=u}})},getActiveNode:function(){return this.tree.activeNode},getNodeByKey:function(e){return this.tree.getNodeByKey(e)},getRootNode:function(){return this.tree.rootNode},getTree:function(){return this.tree}}),i=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.29.1",buildType:"production",debugLevel:3,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:D,_FancytreeNodeClass:j,jquerySupports:{positionMyOfs:function(t,n,i,s){var r,o,a,u=e.map(e.trim(t).split("."),function(e){return parseInt(e,10)}),l=e.map(Array.prototype.slice.call(arguments,1),function(e){return parseInt(e,10)});for(r=0;r<l.length;r++)if(o=u[r]||0,a=l[r]||0,o!==a)return o>a;return!0}(e.ui.version,1,9)},assert:function(e,t){return y(e,t)},createTree:function(t,n){return e(t).fancytree(n).fancytree("getTree")},debounce:function(e,t,n,i){var s;return 3===arguments.length&&"boolean"!=typeof n&&(i=n,n=!1),function(){var r=arguments;i=i||this,n&&!s&&t.apply(i,r),clearTimeout(s),s=setTimeout(function(){n||t.apply(i,r),s=null},e)}},debug:function(t){e.ui.fancytree.debugLevel>=4&&_("log",arguments)},error:function(t){e.ui.fancytree.debugLevel>=1&&_("error",arguments)},escapeHtml:function(e){return(""+e).replace(r,function(e){return a[e]})},fixPositionOptions:function(t){if((t.offset||(""+t.my+t.at).indexOf("%")>=0)&&e.error("expected new position syntax (but '%' is not supported)"),!e.ui.fancytree.jquerySupports.positionMyOfs){var n=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.my),i=/(\w+)([+-]?\d+)?\s+(\w+)([+-]?\d+)?/.exec(t.at),s=(n[2]?+n[2]:0)+(i[2]?+i[2]:0),r=(n[4]?+n[4]:0)+(i[4]?+i[4]:0);t=e.extend({},t,{my:n[1]+" "+n[3],at:i[1]+" "+i[3]}),(s||r)&&(t.offset=s+" "+r)}return t},getEventTarget:function(t){var n,s=t&&t.target?t.target.className:"",r={node:this.getNode(t.target),type:void 0};return/\bfancytree-title\b/.test(s)?r.type="title":/\bfancytree-expander\b/.test(s)?r.type=!1===r.node.hasChildren()?"prefix":"expander":/\bfancytree-checkbox\b/.test(s)?r.type="checkbox":/\bfancytree(-custom)?-icon\b/.test(s)?r.type="icon":/\bfancytree-node\b/.test(s)?r.type="title":t&&t.target&&((n=e(t.target)).is("ul[role=group]")?((r.node&&r.node.tree||i).debug("Ignoring click on outer UL."),r.node=null):n.closest(".fancytree-title").length?r.type="title":n.closest(".fancytree-checkbox").length?r.type="checkbox":n.closest(".fancytree-expander").length&&(r.type="expander")),r},getEventTargetType:function(e){return this.getEventTarget(e).type},getNode:function(t){if(t instanceof j)return t;for(t instanceof e?t=t[0]:void 0!==t.originalEvent&&(t=t.target);t;){if(t.ftnode)return t.ftnode;t=t.parentNode}return null},getTree:function(t){var n;return t instanceof D?t:(void 0===t&&(t=0),"number"==typeof t?t=e(".fancytree-container").eq(t):"string"==typeof t?t=e(t).eq(0):void 0!==t.selector?t=t.eq(0):void 0!==t.originalEvent&&(t=e(t.target)),(n=(t=t.closest(":ui-fancytree")).data("ui-fancytree")||t.data("fancytree"))?n.tree:null)},evalOption:function(t,n,i,s,r){var o,a,u=n.tree,l=s[t],c=i[t];return e.isFunction(l)?(o={node:n,tree:u,widget:u.widget,options:u.widget.options,typeInfo:u.types[n.type]||{}},null==(a=l.call(u,{type:t},o))&&(a=c)):a=null!=c?c:l,null==a&&(a=r),a},setSpanIcon:function(t,n,i){var s=e(t);"string"==typeof i?s.attr("class",n+" "+i):(i.text?s.text(""+i.text):i.html&&(t.innerHTML=i.html),s.attr("class",n+" "+(i.addClass||"")))},eventToString:function(e){var t=e.which,n=e.type,i=[];return e.altKey&&i.push("alt"),e.ctrlKey&&i.push("ctrl"),e.metaKey&&i.push("meta"),e.shiftKey&&i.push("shift"),"click"===n||"dblclick"===n?i.push(c[e.button]+n):u[t]||i.push(l[t]||String.fromCharCode(t).toLowerCase()),i.join("+")},info:function(t){e.ui.fancytree.debugLevel>=3&&_("info",arguments)},keyEventToString:function(e){return this.warn("keyEventToString() is deprecated: use eventToString()"),this.eventToString(e)},overrideMethod:function(t,n,i){var s,r=t[n]||e.noop;t[n]=function(){try{return s=this._super,this._super=r,i.apply(this,arguments)}finally{this._super=s}}},parseHtml:function(t){var n,i,s,r,o,a,u,l,c=[];return t.find(">li").each(function(){var p,m,v=e(this),y=v.find(">span:first",this),_=y.length?null:v.find(">a:first"),w={tooltip:null,data:{}};for(y.length?w.title=y.html():_&&_.length?(w.title=_.html(),w.data.href=_.attr("href"),w.data.target=_.attr("target"),w.tooltip=_.attr("title")):(w.title=v.html(),(o=w.title.search(/<ul/i))>=0&&(w.title=w.title.substring(0,o))),w.title=e.trim(w.title),r=0,a=d.length;r<a;r++)w[d[r]]=void 0;for(n=this.className.split(" "),s=[],r=0,a=n.length;r<a;r++)i=n[r],h[i]?w[i]=!0:s.push(i);if(w.extraClasses=s.join(" "),(u=v.attr("title"))&&(w.tooltip=u),(u=v.attr("id"))&&(w.key=u),v.attr("hideCheckbox")&&(w.checkbox=!1),(p=T(v))&&!e.isEmptyObject(p)){for(m in g)p.hasOwnProperty(m)&&(p[g[m]]=p[m],delete p[m]);for(r=0,a=f.length;r<a;r++)u=f[r],null!=(l=p[u])&&(delete p[u],w[u]=l);e.extend(w.data,p)}(t=v.find(">ul:first")).length?w.children=e.ui.fancytree.parseHtml(t):w.children=w.lazy?void 0:null,c.push(w)}),c},registerExtension:function(t){y(null!=t.name,"extensions must have a `name` property."),y(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},unescapeHtml:function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue},warn:function(t){e.ui.fancytree.debugLevel>=2&&_("warn",arguments)}}),e.ui.fancytree}function y(t,n){t||(n=n?": "+n:"",e.error("Fancytree assertion failed"+n))}function _(e,t){var n,i,s=window.console?window.console[e]:null;if(s)try{s.apply(window.console,t)}catch(e){for(i="",n=0;n<t.length;n++)i+=t[n];s(i)}}function w(){var t,n,i,s,r,o=arguments[0]||{},a=1,u=arguments.length;if("object"==typeof o||e.isFunction(o)||(o={}),a===u)throw"need at least two args";for(;a<u;a++)if(null!=(t=arguments[a]))for(n in t)i=o[n],s=t[n],o!==s&&(s&&jQuery.isPlainObject(s)?(r=i&&jQuery.isPlainObject(i)?i:{},o[n]=w(r,s)):void 0!==s&&(o[n]=s));return o}function b(e,t,n,i,s){var r=function(){var n=t[e],r=i[e],o=t.ext[s],a=function(){return n.apply(t,arguments)},u=function(e){return n.apply(t,e)};return function(){var e=t._local,n=t._super,i=t._superApply;try{return t._local=o,t._super=a,t._superApply=u,r.apply(t,arguments)}finally{t._local=e,t._super=n,t._superApply=i}}}();return r}function x(t,n,i,s){for(var r in i)"function"==typeof i[r]?"function"==typeof t[r]?t[r]=b(r,t,0,i,s):"_"===r.charAt(0)?t.ext[s][r]=b(r,t,0,i,s):e.error("Could not override tree."+r+". Use prefix '_' to create tree."+s+"._"+r):"options"!==r&&(t.ext[s][r]=i[r])}function k(t,n){return void 0===t?e.Deferred(function(){this.resolve()}).promise():e.Deferred(function(){this.resolveWith(t,n)}).promise()}function C(t,n){return void 0===t?e.Deferred(function(){this.reject()}).promise():e.Deferred(function(){this.rejectWith(t,n)}).promise()}function N(e,t){return function(){e.resolveWith(t)}}function T(t){var n=e.extend({},t.data()),i=n.json;return delete n.fancytree,delete n.uiFancytree,i&&(delete n.json,n=e.extend(n,i)),n}function S(e){return(""+e).replace(o,function(e){return a[e]})}function E(e){return e=e.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(e)>=0}}function j(t,n){var s,r,o,a;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},s=0,r=f.length;s<r;s++)this[o=f[s]]=n[o];for(o in null==this.unselectableIgnore&&null==this.unselectableStatus||(this.unselectable=!0),n.hideCheckbox&&e.error("'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'"),n.data&&e.extend(this.data,n.data),n)m[o]||e.isFunction(n[o])||v[o]||(this.data[o]=n[o]);null==this.key?this.tree.options.defaultKey?(this.key=this.tree.options.defaultKey(this),y(this.key,"defaultKey() must return a unique key")):this.key="_"+i._nextNodeKey++:this.key=""+this.key,n.active&&(y(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),n.selected&&(this.tree.lastSelectedNode=this),(a=n.children)?a.length?this._setChildren(a):this.children=this.lazy?[]:null:this.children=null,this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function D(t){this.widget=t,this.$div=t.element,this.options=t.options,this.options&&(e.isFunction(this.options.lazyload)&&!e.isFunction(this.options.lazyLoad)&&(this.options.lazyLoad=function(){return i.warn("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),t.options.lazyload.apply(this,arguments)}),e.isFunction(this.options.loaderror)&&e.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),void 0!==this.options.fx&&i.warn("The 'fx' option was replaced by 'toggleEffect' since 2014-11-30."),void 0!==this.options.removeNode&&e.error("The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10).")),this.ext={},this.types={},this.columns={},this.data=T(this.$div),this._id=e.ui.fancytree._nextId++,this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this._tempCache={},this._lastMousedownNode=null,this._enableUpdate=!0,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var n,s={tree:this};this.rootNode=new j(s,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,n=e("<ul>",{class:"ui-fancytree fancytree-container fancytree-plain"}).appendTo(this.$div),this.$container=n,this.rootNode.ul=n[0],null==this.options.debugLevel&&(this.options.debugLevel=i.debugLevel)}e.ui.fancytree.warn("Fancytree: ignored duplicate include")})?i.apply(t,s):i)||(e.exports=r)},function(e,t,n){var i,s,r;
/*! jQuery UI - v1.12.1 - 2018-05-20
* http://jqueryui.com
* Includes: widget.js, position.js, keycode.js, scroll-parent.js, unique-id.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */s=[n(1)],void 0===(r="function"==typeof(i=function(e){e.ui=e.ui||{},e.ui.version="1.12.1";var t=0,n=Array.prototype.slice;
/*!
 * jQuery UI Widget 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */e.cleanData=e.cleanData||function(t){return function(n){var i,s,r;for(r=0;null!=(s=n[r]);r++)try{(i=e._data(s,"events"))&&i.remove&&e(s).triggerHandler("remove")}catch(e){}t(n)}}(e.cleanData),e.widget=e.widget||function(t,n,i){var s,r,o,a={},u=t.split(".")[0];t=t.split(".")[1];var l=u+"-"+t;return i||(i=n,n=e.Widget),e.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr[":"][l.toLowerCase()]=function(t){return!!e.data(t,l)},e[u]=e[u]||{},s=e[u][t],r=e[u][t]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,s,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(o=new n).options=e.widget.extend({},o.options),e.each(i,function(t,i){e.isFunction(i)?a[t]=function(){function e(){return n.prototype[t].apply(this,arguments)}function s(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,r=this._superApply;return this._super=e,this._superApply=s,t=i.apply(this,arguments),this._super=n,this._superApply=r,t}}():a[t]=i}),r.prototype=e.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:r,namespace:u,widgetName:t,widgetFullName:l}),s?(e.each(s._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete s._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var i,s,r=n.call(arguments,1),o=0,a=r.length;o<a;o++)for(i in r[o])s=r[o][i],r[o].hasOwnProperty(i)&&void 0!==s&&(e.isPlainObject(s)?t[i]=e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):t[i]=s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(r){var o="string"==typeof r,a=n.call(arguments,1),u=this;return o?this.length||"instance"!==r?this.each(function(){var n,i=e.data(this,s);return"instance"===r?(u=i,!1):i?e.isFunction(i[r])&&"_"!==r.charAt(0)?(n=i[r].apply(i,a))!==i&&void 0!==n?(u=n&&n.jquery?u.pushStack(n.get()):n,!1):void 0:e.error("no such method '"+r+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")}):u=void 0:(a.length&&(r=e.widget.extend.apply(null,[r].concat(a))),this.each(function(){var t=e.data(this,s);t?(t.option(r||{}),t._init&&t._init()):e.data(this,s,new i(r,this))})),u}},e.Widget=e.Widget||function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,s,r,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},i=t.split("."),t=i.shift(),i.length){for(s=o[t]=e.widget.extend({},this.options[t]),r=0;r<i.length-1;r++)s[i[r]]=s[i[r]]||{},s=s[i[r]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=n}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=n}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var n,i,s;for(n in t)s=this.classesElementLookup[n],t[n]!==this.options.classes[n]&&s&&s.length&&(i=e(s.get()),this._removeClass(s,n),i.addClass(this._classes({element:i,keys:n,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){var n=[],i=this;function s(s,r){var o,a;for(a=0;a<s.length;a++)o=i.classesElementLookup[s[a]]||e(),o=t.add?e(e.unique(o.get().concat(t.element.get()))):e(o.not(t.element).get()),i.classesElementLookup[s[a]]=o,n.push(s[a]),r&&t.classes[s[a]]&&n.push(t.classes[s[a]])}return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&s(t.keys.match(/\S+/g)||[],!0),t.extra&&s(t.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(t){var n=this;e.each(n.classesElementLookup,function(i,s){-1!==e.inArray(t.target,s)&&(n.classesElementLookup[i]=e(s.not(t.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,i){i="boolean"==typeof i?i:n;var s="string"==typeof e||null===e,r={extra:s?t:n,keys:s?e:t,element:s?this.element:e,add:i};return r.element.toggleClass(this._classes(r),i),this},_on:function(t,n,i){var s,r=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=s=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,s=this.widget()),e.each(i,function(i,o){function a(){if(t||!0!==r.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof o?r[o]:o).apply(r,arguments)}"string"!=typeof o&&(a.guid=o.guid=o.guid||a.guid||e.guid++);var u=i.match(/^([\w:-]*)\s*(.*)$/),l=u[1]+r.eventNamespace,c=u[2];c?s.on(l,c,a):n.on(l,a)})},_off:function(t,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(n).off(n),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,n,i){var s,r,o=this.options[t];if(i=i||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],r=n.originalEvent)for(s in r)s in n||(n[s]=r[s]);return this.element.trigger(n,i),!(e.isFunction(o)&&!1===o.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,n){e.Widget.prototype["_"+t]=function(i,s,r){var o;"string"==typeof s&&(s={effect:s});var a=s?!0===s||"number"==typeof s?n:s.effect||n:t;"number"==typeof(s=s||{})&&(s={duration:s}),o=!e.isEmptyObject(s),s.complete=r,s.delay&&i.delay(s.delay),o&&e.effects&&e.effects.effect[a]?i[t](s):a!==t&&i[a]?i[a](s.duration,s.easing,r):i.queue(function(n){e(this)[t](),r&&r.call(i[0]),n()})}}),e.widget,
/*!
 * jQuery UI Position 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/position/
 */
function(){var t,n=Math.max,i=Math.abs,s=/left|center|right/,r=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,a=/^\w+/,u=/%$/,l=e.fn.position;function c(e,t,n){return[parseFloat(e[0])*(u.test(e[0])?t/100:1),parseFloat(e[1])*(u.test(e[1])?n/100:1)]}function d(t,n){return parseInt(e.css(t,n),10)||0}e.position=e.position||{scrollbarWidth:function(){if(void 0!==t)return t;var n,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=s.children()[0];return e("body").append(s),n=r.offsetWidth,s.css("overflow","scroll"),i=r.offsetWidth,n===i&&(i=s[0].clientWidth),s.remove(),t=n-i},getScrollInfo:function(t){var n=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===n||"auto"===n&&t.width<t.element[0].scrollWidth,r="scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight;return{width:r?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var n=e(t||window),i=e.isWindow(n[0]),s=!!n[0]&&9===n[0].nodeType,r=!i&&!s;return{element:n,isWindow:i,isDocument:s,offset:r?e(t).offset():{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return l.apply(this,arguments);t=e.extend({},t);var u,h,p,f,m,g,v=e(t.of),y=e.position.getWithinInfo(t.within),_=e.position.getScrollInfo(y),w=(t.collision||"flip").split(" "),b={};return g=function(t){var n=t[0];return 9===n.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}(v),v[0].preventDefault&&(t.at="left top"),h=g.width,p=g.height,f=g.offset,m=e.extend({},f),e.each(["my","at"],function(){var e,n,i=(t[this]||"").split(" ");1===i.length&&(i=s.test(i[0])?i.concat(["center"]):r.test(i[0])?["center"].concat(i):["center","center"]),i[0]=s.test(i[0])?i[0]:"center",i[1]=r.test(i[1])?i[1]:"center",e=o.exec(i[0]),n=o.exec(i[1]),b[this]=[e?e[0]:0,n?n[0]:0],t[this]=[a.exec(i[0])[0],a.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===t.at[0]?m.left+=h:"center"===t.at[0]&&(m.left+=h/2),"bottom"===t.at[1]?m.top+=p:"center"===t.at[1]&&(m.top+=p/2),u=c(b.at,h,p),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,o=e(this),a=o.outerWidth(),l=o.outerHeight(),g=d(this,"marginLeft"),x=d(this,"marginTop"),k=a+g+d(this,"marginRight")+_.width,C=l+x+d(this,"marginBottom")+_.height,N=e.extend({},m),T=c(b.my,o.outerWidth(),o.outerHeight());"right"===t.my[0]?N.left-=a:"center"===t.my[0]&&(N.left-=a/2),"bottom"===t.my[1]?N.top-=l:"center"===t.my[1]&&(N.top-=l/2),N.left+=T[0],N.top+=T[1],s={marginLeft:g,marginTop:x},e.each(["left","top"],function(n,i){e.ui.position[w[n]]&&e.ui.position[w[n]][i](N,{targetWidth:h,targetHeight:p,elemWidth:a,elemHeight:l,collisionPosition:s,collisionWidth:k,collisionHeight:C,offset:[u[0]+T[0],u[1]+T[1]],my:t.my,at:t.at,within:y,elem:o})}),t.using&&(r=function(e){var s=f.left-N.left,r=s+h-a,u=f.top-N.top,c=u+p-l,d={target:{element:v,left:f.left,top:f.top,width:h,height:p},element:{element:o,left:N.left,top:N.top,width:a,height:l},horizontal:r<0?"left":s>0?"right":"center",vertical:c<0?"top":u>0?"bottom":"middle"};h<a&&i(s+r)<h&&(d.horizontal="center"),p<l&&i(u+c)<p&&(d.vertical="middle"),n(i(s),i(r))>n(i(u),i(c))?d.important="horizontal":d.important="vertical",t.using.call(this,e,d)}),o.offset(e.extend(N,{using:r}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,r=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,a=e.left-t.collisionPosition.marginLeft,u=r-a,l=a+t.collisionWidth-o-r;t.collisionWidth>o?u>0&&l<=0?(i=e.left+u+t.collisionWidth-o-r,e.left+=u-i):e.left=l>0&&u<=0?r:u>l?r+o-t.collisionWidth:r:u>0?e.left+=u:l>0?e.left-=l:e.left=n(e.left-a,e.left)},top:function(e,t){var i,s=t.within,r=s.isWindow?s.scrollTop:s.offset.top,o=t.within.height,a=e.top-t.collisionPosition.marginTop,u=r-a,l=a+t.collisionHeight-o-r;t.collisionHeight>o?u>0&&l<=0?(i=e.top+u+t.collisionHeight-o-r,e.top+=u-i):e.top=l>0&&u<=0?r:u>l?r+o-t.collisionHeight:r:u>0?e.top+=u:l>0?e.top-=l:e.top=n(e.top-a,e.top)}},flip:{left:function(e,t){var n,s,r=t.within,o=r.offset.left+r.scrollLeft,a=r.width,u=r.isWindow?r.scrollLeft:r.offset.left,l=e.left-t.collisionPosition.marginLeft,c=l-u,d=l+t.collisionWidth-a-u,h="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];c<0?((n=e.left+h+p+f+t.collisionWidth-a-o)<0||n<i(c))&&(e.left+=h+p+f):d>0&&((s=e.left-t.collisionPosition.marginLeft+h+p+f-u)>0||i(s)<d)&&(e.left+=h+p+f)},top:function(e,t){var n,s,r=t.within,o=r.offset.top+r.scrollTop,a=r.height,u=r.isWindow?r.scrollTop:r.offset.top,l=e.top-t.collisionPosition.marginTop,c=l-u,d=l+t.collisionHeight-a-u,h="top"===t.my[1],p=h?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];c<0?((s=e.top+p+f+m+t.collisionHeight-a-o)<0||s<i(c))&&(e.top+=p+f+m):d>0&&((n=e.top-t.collisionPosition.marginTop+p+f+m-u)>0||i(n)<d)&&(e.top+=p+f+m)}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}}}(),e.ui.position,e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&r.length?r:e(this[0].ownerDocument||document)},e.fn.extend({uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}})})?i.apply(t,s):i)||(e.exports=r)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){e=parseInt(e),t=parseInt(t);var n=!1,i={scan:function(){var n=e-t;0!==t?s(n):$.post(ajaxurl,{action:"directory_smush_start"},function(){return s(n)})},cancel:function(){return n=!0,$.post(ajaxurl,{action:"directory_smush_cancel"})},getProgress:function(){if(n)return 0;var i=e-t;return Math.min(Math.round(100*parseInt(e-i)/e),99)},onFinishStep:function(n){$(".wp-smush-progress-dialog .sui-progress-state-text").html(t+"/"+e+" "+wp_smush_msgs.progress_smushed),WP_Smush.directory.updateProgressBar(n)},onFinish:function(){WP_Smush.directory.updateProgressBar(100),window.location.href=wp_smush_msgs.directory_url},limitReached:function(){var e=$("#wp-smush-progress-dialog");e.addClass("wp-smush-exceed-limit"),e.find("#cancel-directory-smush").attr("data-tooltip",wp_smush_msgs.bulk_resume),e.find(".sui-icon-close").removeClass("sui-icon-close").addClass("sui-icon-play")},resume:function(){var e=$("#wp-smush-progress-dialog");e.removeClass("wp-smush-exceed-limit"),e.find("#cancel-directory-smush").attr("data-tooltip","Cancel"),e.find(".sui-icon-close").removeClass("sui-icon-play").addClass("sui-icon-close"),i.scan()}},s=function n(s){s>=0?(t=e-s,$.post(ajaxurl,{action:"directory_smush_check_step",step:t},function(e){void 0!==e.success&&e.success?(t++,s-=1,i.onFinishStep(i.getProgress()),n(s)):void 0!==e.data.error&&"dir_smush_limit_exceeded"===e.data.error&&i.limitReached()})):$.post(ajaxurl,{action:"directory_smush_finish",items:e},function(e){return i.onFinish(e)})};return i}},function(e,t,n){"use strict";jQuery(function(){var e=jQuery(".smush-notice"),t=e.find(".smush-notice-act"),n=e.find(".smush-notice-dismiss");function i(){e.fadeTo(100,0,function(){e.slideUp(100,function(){e.remove()})})}function s(t){e.attr("data-message",t),e.addClass("loading");jQuery.post(ajaxurl,{action:"dismiss_upgrade_notice"})}function r(e){var t={action:e};jQuery.post(ajaxurl,t)}e.fadeIn(500),t.click(function(e){i(),s(t.data("msg"))}),n.click(function(e){i(),s(t.data("msg"))}),jQuery(".wp-smush-update-info").on("click",".notice-dismiss",function(t){t.preventDefault(),e=jQuery(this),i(),r("dismiss_update_info")}),jQuery("div.wp-smush-s3support-alert").on("click",".icon-fi-close",function(t){e=jQuery(this),i(),r("dismiss_s3support_alert")})})}]);
//# sourceMappingURL=admin.min.js.map