[ Avaa Bypassed ]




Upload:

Command:

www-data@3.136.17.118: ~ $
/*! jQuery v3.6.3 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,u={},l=u.toString,c=u.hasOwnProperty,f=c.toString,p=f.call(Object),d={},h=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},g=function(e){return null!=e&&e===e.window},y=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||y).createElement("script");if(o.text=e,t)for(r in v)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?u[l.call(e)]||"object":typeof e}var b="3.6.3",w=function(e,t){return new w.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!h(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}w.fn=w.prototype={jquery:b,constructor:w,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(w.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||h(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+(b+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]"!==l.call(e))&&(!(t=r(e))||"function"==typeof(n=c.call(t,"constructor")&&t.constructor)&&f.call(n)===p)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(T(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(T(Object(e))?w.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:s.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,s=[];if(T(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&s.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&s.push(i);return o(s)},guid:1,support:d}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){u["[object "+t+"]"]=t.toLowerCase()});var C=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,S=ue(),E=ue(),k=ue(),A=ue(),N=function(e,t){return e===t&&(f=!0),0},j={}.hasOwnProperty,D=[],q=D.pop,L=D.push,H=D.push,O=D.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(D=O.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(t){H={apply:D.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(t),t=t||d,g)){if(11!==w&&(f=Z.exec(e)))if(o=f[1]){if(9===w){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return H.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return H.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!A[e+" "]&&(!y||!y.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,m=t,1===w&&(U.test(e)||z.test(e))){(m=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=b)),s=(h=a(e)).length;while(s--)h[s]=(c?"#"+c:":scope")+" "+xe(h[s]);v=h.join(",")}try{if(n.cssSupportsSelector&&!CSS.supports("selector(:is("+v+"))"))throw new Error;return H.apply(r,m.querySelectorAll(v)),r}catch(t){A(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ue(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function le(e){return e[b]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(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 ge(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&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ye(e){return le(function(t){return t=+t,le(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},p=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=d&&9===a.nodeType&&a.documentElement&&(h=(d=a).documentElement,g=!o(d),w!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce(function(e){return h.appendChild(e).appendChild(d.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),n.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&d.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=K.test(d.getElementsByClassName),n.getById=ce(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=K.test(d.querySelectorAll))&&(ce(function(e){var t;h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),(t=d.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=K.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",F)}),n.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=K.test(h.compareDocumentPosition),x=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==d||e.ownerDocument==w&&x(w,e)?-1:t==d||t.ownerDocument==w&&x(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==d?-1:t==d?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0}),d},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&g&&!A[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return 0<se(t,d,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=d&&p(e),x(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&j.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(N),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1<i.indexOf(n):"$="===t?n&&i.slice(-n.length)===n:"~="===t?-1<(" "+i.replace($," ")+" ").indexOf(n):"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&0<=x/r}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[b]?i(t):1<i.length?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=P(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:le(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?le(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:le(function(e){return function(t){return 0<se(e,t).length}}),contains:le(function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||i(t)).indexOf(e)}}),lang:le(function(e){return V.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?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===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye(function(){return[0]}),last:ye(function(e,t){return[t-1]}),eq:ye(function(e,t,n){return[n<0?n+t:n]}),even:ye(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ye(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ye(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ye(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=de(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=he(t);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(c=(f=t[b]||(t[b]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if((c[o]=p)[2]=e(t,n,u))return!0}return!1}}function we(e){return 1<e.length?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(e,t,n,r,i,o){return r&&!r[b]&&(r=Ce(r)),i&&!i[b]&&(i=Ce(i,o)),le(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:Te(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=Te(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&-1<(l=i?P(o,f):p[c])&&(o[l]=!(a[l]=f))}}else v=Te(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):H.apply(a,v)})}function Se(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=be(function(e){return e===t},s,!0),f=be(function(e){return-1<P(t,e)},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[be(we(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Ce(1<u&&we(p),1<u&&xe(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Se(e.slice(u,i)),i<o&&Se(e=e.slice(i)),i<o&&xe(e))}p.push(n)}return we(p)}return me.prototype=r.filters=r.pseudos,r.setFilters=new me,a=se.tokenize=function(e,t){var n,i,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){for(a in n&&!(i=_.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=z.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length)),r.filter)!(i=G[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):E(e,u).slice(0)},s=se.compile=function(e,t){var n,i,o,s,u,c,f=[],h=[],y=k[e+" "];if(!y){t||(t=a(e)),n=t.length;while(n--)(y=Se(t[n]))[b]?f.push(y):h.push(y);(y=k(e,(i=h,s=0<(o=f).length,u=0<i.length,c=function(e,t,n,a,c){var f,h,y,v=0,m="0",x=e&&[],b=[],w=l,C=e||u&&r.find.TAG("*",c),S=T+=null==w?1:Math.random()||.1,E=C.length;for(c&&(l=t==d||t||c);m!==E&&null!=(f=C[m]);m++){if(u&&f){h=0,t||f.ownerDocument==d||(p(f),n=!g);while(y=i[h++])if(y(f,t||d,n)){a.push(f);break}c&&(T=S)}s&&((f=!y&&f)&&v--,e&&x.push(f))}if(v+=m,s&&m!==v){h=0;while(y=o[h++])y(x,b,t,n);if(e){if(0<v)while(m--)x[m]||b[m]||(b[m]=q.call(a));b=Te(b)}H.apply(a,b),c&&!e&&0<b.length&&1<v+o.length&&se.uniqueSort(a)}return c&&(T=S,l=w),x},s?le(c):c))).selector=e}return y},u=se.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if(2<(u=d[0]=d[0].slice(0)).length&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=G.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(te,ne),ee.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&xe(u)))return H.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=b.split("").sort(N).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(e);w.find=C,w.expr=C.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=C.uniqueSort,w.text=C.getText,w.isXMLDoc=C.isXML,w.contains=C.contains,w.escapeSelector=C.escape;var S=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=w.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return h(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return-1<s.call(t,e)!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return 1<r?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?w(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:y,!0)),N.test(r[1])&&w.isPlainObject(t))for(r in t)h(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=y.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):h(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,D=w(y);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(w(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.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 null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),1<this.length&&(H[e]||w.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&h(i=e.promise)?i.call(e).done(t).fail(n):e&&h(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},w.each(t.match(P)||[],function(e,t){n[t]=!0}),n):w.extend({},e);var r,i,o,a,s=[],u=[],l=-1,c=function(){for(a=a||e.once,o=r=!0;u.length;l=-1){i=u.shift();while(++l<s.length)!1===s[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=s.length,i=!1)}e.memory||(i=!1),r=!1,a&&(s=i?[]:"")},f={add:function(){return s&&(i&&!r&&(l=s.length-1,u.push(i)),function t(n){w.each(n,function(n,r){h(r)?e.unique&&f.has(r)||s.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),i&&!r&&c()),this},remove:function(){return w.each(arguments,function(e,t){var n;while(-1<(n=w.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<w.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=i="",this},disabled:function(){return!s},lock:function(){return a=u=[],i||r||(s=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),r||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=h(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&h(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,h(l)?i?l.call(e,a(o,n,R,i),a(o,n,M,i)):(o++,l.call(e,a(o,n,R,i),a(o,n,M,i),a(o,n,R,n.notifyWith))):(r!==R&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),o<=t+1&&(r!==M&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,h(i)?i:R,e.notifyWith)),n[1][3].add(a(0,e,h(t)?t:R)),n[2][3].add(a(0,e,h(r)?r:M))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=1<arguments.length?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(I(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||h(o[n]&&o[n].then)))return a.then();while(n--)I(o[n],s(n),a.reject);return a.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&W.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();function $(){y.removeEventListener("DOMContentLoaded",$),e.removeEventListener("load",$),w.ready()}w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0)!==e&&0<--w.readyWait||F.resolveWith(y,[w])}}),w.ready.then=F.then,"complete"===y.readyState||"loading"!==y.readyState&&!y.documentElement.doScroll?e.setTimeout(w.ready):(y.addEventListener("DOMContentLoaded",$),e.addEventListener("load",$));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,h(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=w.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Q.set(this,e)}):B(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=Q.get(o,e))?n:void 0!==(n=Z(o,e))?n:void 0;this.each(function(){Q.set(this,e,t)})},null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){w.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:w.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=y.documentElement,ie=function(e){return w.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return w.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===w.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=e.nodeType&&(w.cssNumber[t]||"px"!==l&&+u)&&te.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=w.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}w.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=y.createDocumentFragment().appendChild(y.createElement("div")),(fe=y.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),d.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",d.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",d.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,d.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<w.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return y.activeElement}catch(e){}}()==("focus"===t)}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}function Ee(e,t,n){n?(Y.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var r,o,a=Y.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=i.call(arguments),Y.set(this,t,a),r=n(this,t),this[t](),a!==(o=Y.get(this,t))||r?Y.set(this,t,!1):o={},a!==o)return e.stopImmediatePropagation(),e.preventDefault(),o&&o.value}else a.length&&(Y.set(this,t,{value:w.event.trigger(w.extend(a[0],w.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,t)&&w.event.add(e,t,we)}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.get(e);if(V(e)){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(re,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.hasData(e)&&Y.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=w.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=w.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=w.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((w.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<w(i,this).index(l):w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:h(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[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},function(e,t){w.event.special[e]={setup:function(){return Ee(this,e,Ce),!1},trigger:function(){return Ee(this,e),!0},_default:function(t){return Y.get(t.target,e)},delegateType:t}}),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||w.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){w.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)w.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=w.extend({},o),Q.set(t,a))}}function He(e,t,n,r){t=o(t);var i,a,s,u,l,c,f=0,p=e.length,g=p-1,y=t[0],v=h(y);if(v||1<p&&"string"==typeof y&&!d.checkClone&&Ae.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),He(o,t,n,r)});if(p&&(a=(i=xe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=w.map(ye(i,"script"),De)).length;f<p;f++)l=i,f!==g&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,qe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!Y.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&!l.noModule&&w._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):m(l.textContent.replace(Ne,""),l,c))}return e}function Oe(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&ie(r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(d.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(c),r=0,i=(o=ye(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ye(e),a=a||ye(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ye(c,"script")).length&&ve(a,!f&&ye(e,"script")),c},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return B(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return He(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),w(i[s])[t](n),a.apply(r,n.get());return this.pushStack(r)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=/^--/,Me=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Ie=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},We=new RegExp(ne.join("|"),"i"),Fe="[\\x20\\t\\r\\n\\f]",$e=new RegExp("^"+Fe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Fe+"+$","g");function Be(e,t,n){var r,i,o,a,s=Re.test(t),u=e.style;return(n=n||Me(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace($e,"$1")||void 0),""!==a||ie(e)||(a=w.style(e,t)),!d.pixelBoxStyles()&&Pe.test(a)&&We.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){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%",re.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);r="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",a=36===n(t.right),i=36===n(t.width),c.style.position="absolute",o=12===n(c.offsetWidth/3),re.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u,l=y.createElement("div"),c=y.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(d,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,n,r,i;return null==s&&(t=y.createElement("table"),n=y.createElement("tr"),r=y.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",r.style.height="9px",r.style.display="block",re.appendChild(t).appendChild(n).appendChild(r),i=e.getComputedStyle(n),s=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===n.offsetHeight,re.removeChild(t)),s}}))}();var ze=["Webkit","Moz","ms"],Ue=y.createElement("div").style,Xe={};function Ve(e){var t=w.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=ze.length;while(n--)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+ne[a]+"Width",!0,i))):(u+=w.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=w.css(e,"border"+ne[a]+"Width",!0,i):s+=w.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Me(e),i=(!d.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!d.boxSizingReliable()&&i||!d.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===w.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===w.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Re.test(t),l=e.style;if(u||(t=Ve(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),d.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Re.test(t)||(t=Ve(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!Ge.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,t,r):Ie(e,Ye,function(){return Ze(e,t,r)})},set:function(e,n,r){var i,o=Me(e),a=!d.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===w.css(e,"boxSizing",!1,o),u=r?Ke(e,t,r,s,o):0;return s&&a&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ke(e,t,"border",!1,o)-.5)),u&&(i=te.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Je(0,n,u)}}}),w.cssHooks.marginLeft=_e(d.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ne[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Je)}),w.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,1<arguments.length)}}),((w.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.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=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=et.prototype.init,w.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===y.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,w.fx.interval),w.fx.tick())}function ut(){return e.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(e,t,n){var r,i,o=0,a=ft.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=tt||ut(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||ut(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);o<a;o++)if(r=ft.prefilters[o].call(l,e,c,l.opts))return h(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,ct,l),h(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),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){h(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=Y.get(e,"fxshow");for(r in n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=Y.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=w.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=Y.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)w.style(e,r,d[r])})),u=ct(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||h(e)&&e,duration:e,easing:n&&t||t&&!h(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){h(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=ft(this,w.extend({},e),o);(i||Y.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=Y.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&at.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Y.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(lt(t,!0),e,r,i)}}),w.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),tt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){nt||(nt=!0,st())},w.fx.stop=function(){nt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx&&w.fx.speeds[t]||t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},rt=y.createElement("input"),it=y.createElement("select").appendChild(y.createElement("option")),rt.type="checkbox",d.checkOn=""!==rt.value,d.optSelected=it.selected,(rt=y.createElement("input")).value="t",rt.type="radio",d.radioValue="t"===rt.value;var pt,dt=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return B(this,w.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!d.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||w.find.attr;dt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=dt[a],dt[a]=i,i=null!=n(e,t,r)?a:null,dt[a]=o),i}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(P)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}w.fn.extend({prop:function(e,t){return B(this,w.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this}),w.fn.extend({addClass:function(e){var t,n,r,i,o,a;return h(e)?this.each(function(t){w(this).addClass(e.call(this,t,vt(this)))}):(t=mt(e)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<t.length;o++)i=t[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=yt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,i,o,a;return h(e)?this.each(function(t){w(this).removeClass(e.call(this,t,vt(this)))}):arguments.length?(t=mt(e)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<t.length;o++){i=t[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=yt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,a=typeof e,s="string"===a||Array.isArray(e);return h(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,vt(this),t),t)}):"boolean"==typeof t&&s?t?this.addClass(e):this.removeClass(e):(n=mt(e),this.each(function(){if(s)for(o=w(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==e&&"boolean"!==a||((r=vt(this))&&Y.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===e?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+yt(vt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xt,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:yt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<w.inArray(w.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<w.inArray(w(e).val(),t)}},d.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),d.focusin="onfocusin"in e;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,r,i){var o,a,s,u,l,f,p,d,v=[r||y],m=c.call(t,"type")?t.type:t,x=c.call(t,"namespace")?t.namespace.split("."):[];if(a=d=s=r=r||y,3!==r.nodeType&&8!==r.nodeType&&!bt.test(m+w.event.triggered)&&(-1<m.indexOf(".")&&(m=(x=m.split(".")).shift(),x.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:w.makeArray(n,[t]),p=w.event.special[m]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!g(r)){for(u=p.delegateType||m,bt.test(u+m)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(r.ownerDocument||y)&&v.push(s.defaultView||s.parentWindow||e)}o=0;while((a=v[o++])&&!t.isPropagationStopped())d=a,t.type=1<o?u:p.bindType||m,(f=(Y.get(a,"events")||Object.create(null))[t.type]&&Y.get(a,"handle"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&V(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),n)||!V(r)||l&&h(r[m])&&!g(r)&&((s=r[l])&&(r[l]=null),w.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,wt),r[m](),t.isPropagationStopped()&&d.removeEventListener(m,wt),w.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),d.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t);i||r.addEventListener(e,n,!0),Y.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Y.access(r,t)-1;i?Y.access(r,t,i):(r.removeEventListener(e,n,!0),Y.remove(r,t))}}});var Tt=e.location,Ct={guid:Date.now()},St=/\?/;w.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){}return r=n&&n.getElementsByTagName("parsererror")[0],n&&!r||w.error("Invalid XML: "+(r?w.map(r.childNodes,function(e){return e.textContent}).join("\n"):t)),n};var Et=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||Et.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=h(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Dt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=y.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(P)||[];if(h(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function $t(e,t,n,r){var i={},o=e===Mt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Bt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}Wt.href=Tt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,w.ajaxSettings),t):Bt(w.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,u,l,c,f,p,d=w.ajaxSetup({},n),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?w(h):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=d.statusCode||{},b={},T={},C="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(l){if(!a){a={};while(t=Ht.exec(o))a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==l&&(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)S.always(e[S.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return r&&r.abort(t),E(0,t),this}};if(v.promise(S),d.url=((t||d.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(P)||[""],null==d.crossDomain){u=y.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Wt.protocol+"//"+Wt.host!=u.protocol+"//"+u.host}catch(t){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=w.param(d.data,d.traditional)),$t(Rt,d,n,S),l)return S;for(f in(c=w.event&&d.global)&&0==w.active++&&w.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ot.test(d.type),i=d.url.replace(qt,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Dt,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(St.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Lt,"$1"),p=(St.test(i)?"&":"?")+"_="+Ct.guid+++p),d.url=i+p),d.ifModified&&(w.lastModified[i]&&S.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&S.setRequestHeader("If-None-Match",w.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||n.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+It+"; q=0.01":""):d.accepts["*"]),d.headers)S.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,S,d)||l))return S.abort();if(C="abort",m.add(d.complete),S.done(d.success),S.fail(d.error),r=$t(Mt,d,n,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,d]),l)return S;d.async&&0<d.timeout&&(s=e.setTimeout(function(){S.abort("timeout")},d.timeout));try{l=!1,r.send(b,E)}catch(t){if(l)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,n,a,u){var f,p,y,b,T,C=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,o=u||"",S.readyState=0<t?4:0,f=200<=t&&t<300||304===t,a&&(b=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,S,a)),!f&&-1<w.inArray("script",d.dataTypes)&&w.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(d,b,S,f),f?(d.ifModified&&((T=S.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=T),(T=S.getResponseHeader("etag"))&&(w.etag[i]=T)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,f=!(y=b.error))):(y=C,!t&&C||(C="error",t<0&&(t=0))),S.status=t,S.statusText=(n||C)+"",f?v.resolveWith(h,[p,C,S]):v.rejectWith(h,[S,C,y]),S.statusCode(x),x=void 0,c&&g.trigger(f?"ajaxSuccess":"ajaxError",[S,d,f?p:y]),m.fireWith(h,[S,C]),c&&(g.trigger("ajaxComplete",[S,d]),--w.active||w.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return h(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(h(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return h(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=h(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=w.ajaxSettings.xhr();d.cors=!!zt&&"withCredentials"in zt,d.ajax=zt=!!zt,w.ajaxTransport(function(t){var n,r;if(d.cors||zt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(_t[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(i){if(n)throw i}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=w("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),y.head.appendChild(t[0])},abort:function(){n&&n()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||w.expando+"_"+Ct.guid++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Vt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=h(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Vt,"$1"+i):!1!==t.jsonp&&(t.url+=(St.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Xt.push(i)),a&&h(o)&&o(a[0]),a=o=void 0}),"script"}),d.createHTMLDocument=((Ut=y.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(d.createHTMLDocument?((r=(t=y.implementation.createHTMLDocument("")).createElement("base")).href=y.location.href,t.head.appendChild(r)):t=y),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&w(o).remove(),w.merge([],i.childNodes)));var r,i,o},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=yt(e.slice(s)),e=e.slice(0,s)),h(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=w.css(e,"position"),c=w(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=w.css(e,"top"),u=w.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),h(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||re})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return B(this,function(e,r,i){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(d.pixelPosition,function(e,n){if(n)return n=Be(e,t),Pe.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return B(this,function(t,n,i){var o;return g(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}});var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;w.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),h(e))return r=i.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(i.call(arguments)))}).guid=e.guid=e.guid||w.guid++,o},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=A,w.isFunction=h,w.isWindow=g,w.camelCase=X,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},w.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Yt=e.jQuery,Qt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Qt),t&&e.jQuery===w&&(e.jQuery=Yt),w},"undefined"==typeof t&&(e.jQuery=e.$=w),w});

/*!
 * Bootstrap v3.4.1 (https://getbootstrap.com/)
 * Copyright 2011-2019 Twitter, Inc.
 * Licensed under MIT
 */
if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||e[0]==1&&e[1]==9&&e[2]<1||e[0]>3){throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}}(jQuery);+function(t){"use strict";function e(){var t=document.createElement("bootstrap");var e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e){if(t.style[i]!==undefined){return{end:e[i]}}}return false}t.fn.emulateTransitionEnd=function(e){var i=false;var n=this;t(this).one("bsTransitionEnd",function(){i=true});var o=function(){if(!i)t(n).trigger(t.support.transition.end)};setTimeout(o,e);return this};t(function(){t.support.transition=e();if(!t.support.transition)return;t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function(t){"use strict";var e='[data-dismiss="alert"]';var i=function(i){t(i).on("click",e,this.close)};i.VERSION="3.4.1";i.TRANSITION_DURATION=150;i.prototype.close=function(e){var n=t(this);var o=n.attr("data-target");if(!o){o=n.attr("href");o=o&&o.replace(/.*(?=#[^\s]*$)/,"")}o=o==="#"?[]:o;var s=t(document).find(o);if(e)e.preventDefault();if(!s.length){s=n.closest(".alert")}s.trigger(e=t.Event("close.bs.alert"));if(e.isDefaultPrevented())return;s.removeClass("in");function r(){s.detach().trigger("closed.bs.alert").remove()}t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",r).emulateTransitionEnd(i.TRANSITION_DURATION):r()};function n(e){return this.each(function(){var n=t(this);var o=n.data("bs.alert");if(!o)n.data("bs.alert",o=new i(this));if(typeof e=="string")o[e].call(n)})}var o=t.fn.alert;t.fn.alert=n;t.fn.alert.Constructor=i;t.fn.alert.noConflict=function(){t.fn.alert=o;return this};t(document).on("click.bs.alert.data-api",e,i.prototype.close)}(jQuery);+function(t){"use strict";var e=function(i,n){this.$element=t(i);this.options=t.extend({},e.DEFAULTS,n);this.isLoading=false};e.VERSION="3.4.1";e.DEFAULTS={loadingText:"loading..."};e.prototype.setState=function(e){var i="disabled";var n=this.$element;var o=n.is("input")?"val":"html";var s=n.data();e+="Text";if(s.resetText==null)n.data("resetText",n[o]());setTimeout(t.proxy(function(){n[o](s[e]==null?this.options[e]:s[e]);if(e=="loadingText"){this.isLoading=true;n.addClass(i).attr(i,i).prop(i,true)}else if(this.isLoading){this.isLoading=false;n.removeClass(i).removeAttr(i).prop(i,false)}},this),0)};e.prototype.toggle=function(){var t=true;var e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");if(i.prop("type")=="radio"){if(i.prop("checked"))t=false;e.find(".active").removeClass("active");this.$element.addClass("active")}else if(i.prop("type")=="checkbox"){if(i.prop("checked")!==this.$element.hasClass("active"))t=false;this.$element.toggleClass("active")}i.prop("checked",this.$element.hasClass("active"));if(t)i.trigger("change")}else{this.$element.attr("aria-pressed",!this.$element.hasClass("active"));this.$element.toggleClass("active")}};function i(i){return this.each(function(){var n=t(this);var o=n.data("bs.button");var s=typeof i=="object"&&i;if(!o)n.data("bs.button",o=new e(this,s));if(i=="toggle")o.toggle();else if(i)o.setState(i)})}var n=t.fn.button;t.fn.button=i;t.fn.button.Constructor=e;t.fn.button.noConflict=function(){t.fn.button=n;return this};t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var n=t(e.target).closest(".btn");i.call(n,"toggle");if(!t(e.target).is('input[type="radio"], input[type="checkbox"]')){e.preventDefault();if(n.is("input,button"))n.trigger("focus");else n.find("input:visible,button:visible").first().trigger("focus")}}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery);+function(t){"use strict";var e=function(i,n){this.$element=t(i);this.options=t.extend({},e.DEFAULTS,n);this.$trigger=t('[data-toggle="collapse"][href="#'+i.id+'"],'+'[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle)this.toggle()};e.VERSION="3.4.1";e.TRANSITION_DURATION=0;e.DEFAULTS={toggle:true};e.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"};e.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var i;var o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(o&&o.length){i=o.data("bs.collapse");if(i&&i.transitioning)return}var s=t.Event("show.bs.collapse");this.$element.trigger(s);if(s.isDefaultPrevented())return;if(o&&o.length){n.call(o,"hide");i||o.data("bs.collapse",null)}var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",true);this.$trigger.removeClass("collapsed").attr("aria-expanded",true);this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[r](this.$element[0][l])};e.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var i=t.Event("hide.bs.collapse");this.$element.trigger(i);if(i.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",false);this.$trigger.addClass("collapsed").attr("aria-expanded",false);this.transitioning=1;var o=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(e.TRANSITION_DURATION)};e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};e.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(e,n){var o=t(n);this.addAriaAndCollapsedClass(i(o),o)},this)).end()};e.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i);e.toggleClass("collapsed",!i).attr("aria-expanded",i)};function i(e){var i;var n=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(n)}function n(i){return this.each(function(){var n=t(this);var o=n.data("bs.collapse");var s=t.extend({},e.DEFAULTS,n.data(),typeof i=="object"&&i);if(!o&&s.toggle&&/show|hide/.test(i))s.toggle=false;if(!o)n.data("bs.collapse",o=new e(this,s));if(typeof i=="string")o[i]()})}var o=t.fn.collapse;t.fn.collapse=n;t.fn.collapse.Constructor=e;t.fn.collapse.noConflict=function(){t.fn.collapse=o;return this};t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var o=t(this);if(!o.attr("data-target"))e.preventDefault();var s=i(o);var r=s.data("bs.collapse");var a=r?"toggle":o.data();n.call(s,a)})}(jQuery);+function(t){"use strict";var e=".dropdown-backdrop";var i='[data-toggle="dropdown"]';var n=function(e){t(e).on("click.bs.dropdown",this.toggle)};n.VERSION="3.4.1";function o(e){var i=e.attr("data-target");if(!i){i=e.attr("href");i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")}var n=i!=="#"?t(document).find(i):null;return n&&n.length?n:e.parent()}function s(n){if(n&&n.which===3)return;t(e).remove();t(i).each(function(){var e=t(this);var i=o(e);var s={relatedTarget:this};if(!i.hasClass("open"))return;if(n&&n.type=="click"&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target))return;i.trigger(n=t.Event("hide.bs.dropdown",s));if(n.isDefaultPrevented())return;e.attr("aria-expanded","false");i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s))})}n.prototype.toggle=function(e){var i=t(this);if(i.is(".disabled, :disabled"))return;var n=o(i);var r=n.hasClass("open");s();if(!r){if("ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length){t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",s)}var a={relatedTarget:this};n.trigger(e=t.Event("show.bs.dropdown",a));if(e.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true");n.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return false};n.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return;var n=t(this);e.preventDefault();e.stopPropagation();if(n.is(".disabled, :disabled"))return;var s=o(n);var r=s.hasClass("open");if(!r&&e.which!=27||r&&e.which==27){if(e.which==27)s.find(i).trigger("focus");return n.trigger("click")}var a=" li:not(.disabled):visible a";var l=s.find(".dropdown-menu"+a);if(!l.length)return;var d=l.index(e.target);if(e.which==38&&d>0)d--;if(e.which==40&&d<l.length-1)d++;if(!~d)d=0;l.eq(d).trigger("focus")};function r(e){return this.each(function(){var i=t(this);var o=i.data("bs.dropdown");if(!o)i.data("bs.dropdown",o=new n(this));if(typeof e=="string")o[e].call(i)})}var a=t.fn.dropdown;t.fn.dropdown=r;t.fn.dropdown.Constructor=n;t.fn.dropdown.noConflict=function(){t.fn.dropdown=a;return this};t(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",i,n.prototype.toggle).on("keydown.bs.dropdown.data-api",i,n.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",n.prototype.keydown)}(jQuery);+function(t){"use strict";var e=function(e,i){this.options=i;this.$body=t(document.body);this.$element=t(e);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=false;this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom";if(this.options.remote){this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))}};e.VERSION="3.4.1";e.TRANSITION_DURATION=300;e.BACKDROP_TRANSITION_DURATION=150;e.DEFAULTS={backdrop:true,keyboard:true,show:true};e.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)};e.prototype.show=function(i){var n=this;var o=t.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(o);if(this.isShown||o.isDefaultPrevented())return;this.isShown=true;this.checkScrollbar();this.setScrollbar();this.$body.addClass("modal-open");this.escape();this.resize();this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this));this.$dialog.on("mousedown.dismiss.bs.modal",function(){n.$element.one("mouseup.dismiss.bs.modal",function(e){if(t(e.target).is(n.$element))n.ignoreBackdropClick=true})});this.backdrop(function(){var o=t.support.transition&&n.$element.hasClass("fade");if(!n.$element.parent().length){n.$element.appendTo(n.$body)}n.$element.show().scrollTop(0);n.adjustDialog();if(o){n.$element[0].offsetWidth}n.$element.addClass("in");n.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:i});o?n.$dialog.one("bsTransitionEnd",function(){n.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(e.TRANSITION_DURATION):n.$element.trigger("focus").trigger(s)})};e.prototype.hide=function(i){if(i)i.preventDefault();i=t.Event("hide.bs.modal");this.$element.trigger(i);if(!this.isShown||i.isDefaultPrevented())return;this.isShown=false;this.escape();this.resize();t(document).off("focusin.bs.modal");this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal");this.$dialog.off("mousedown.dismiss.bs.modal");t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal()};e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){if(document!==t.target&&this.$element[0]!==t.target&&!this.$element.has(t.target).length){this.$element.trigger("focus")}},this))};e.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){t.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off("keydown.dismiss.bs.modal")}};e.prototype.resize=function(){if(this.isShown){t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this))}else{t(window).off("resize.bs.modal")}};e.prototype.hideModal=function(){var t=this;this.$element.hide();this.backdrop(function(){t.$body.removeClass("modal-open");t.resetAdjustments();t.resetScrollbar();t.$element.trigger("hidden.bs.modal")})};e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};e.prototype.backdrop=function(i){var n=this;var o=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&o;this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+o).appendTo(this.$body);this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false;return}if(t.target!==t.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus():this.hide()},this));if(s)this.$backdrop[0].offsetWidth;this.$backdrop.addClass("in");if(!i)return;s?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):i()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){n.removeBackdrop();i&&i()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):r()}else if(i){i()}};e.prototype.handleUpdate=function(){this.adjustDialog()};e.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})};e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};e.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t;this.scrollbarWidth=this.measureScrollbar()};e.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var i=this.scrollbarWidth;if(this.bodyIsOverflowing){this.$body.css("padding-right",e+i);t(this.fixedContent).each(function(e,n){var o=n.style.paddingRight;var s=t(n).css("padding-right");t(n).data("padding-right",o).css("padding-right",parseFloat(s)+i+"px")})}};e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad);t(this.fixedContent).each(function(e,i){var n=t(i).data("padding-right");t(i).removeData("padding-right");i.style.paddingRight=n?n:""})};e.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure";this.$body.append(t);var e=t.offsetWidth-t.clientWidth;this.$body[0].removeChild(t);return e};function i(i,n){return this.each(function(){var o=t(this);var s=o.data("bs.modal");var r=t.extend({},e.DEFAULTS,o.data(),typeof i=="object"&&i);if(!s)o.data("bs.modal",s=new e(this,r));if(typeof i=="string")s[i](n);else if(r.show)s.show(n)})}var n=t.fn.modal;t.fn.modal=i;t.fn.modal.Constructor=e;t.fn.modal.noConflict=function(){t.fn.modal=n;return this};t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var n=t(this);var o=n.attr("href");var s=n.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"");var r=t(document).find(s);var a=r.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},r.data(),n.data());if(n.is("a"))e.preventDefault();r.one("show.bs.modal",function(t){if(t.isDefaultPrevented())return;r.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})});i.call(r,a,this)})}(jQuery);+function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"];var i=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"];var n=/^aria-[\w-]*$/i;var o={"*":["class","dir","id","lang","role",n],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};var s=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;var r=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function a(e,n){var o=e.nodeName.toLowerCase();if(t.inArray(o,n)!==-1){if(t.inArray(o,i)!==-1){return Boolean(e.nodeValue.match(s)||e.nodeValue.match(r))}return true}var a=t(n).filter(function(t,e){return e instanceof RegExp});for(var l=0,d=a.length;l<d;l++){if(o.match(a[l])){return true}}return false}function l(e,i,n){if(e.length===0){return e}if(n&&typeof n==="function"){return n(e)}if(!document.implementation||!document.implementation.createHTMLDocument){return e}var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=e;var s=t.map(i,function(t,e){return e});var r=t(o.body).find("*");for(var l=0,d=r.length;l<d;l++){var h=r[l];var p=h.nodeName.toLowerCase();if(t.inArray(p,s)===-1){h.parentNode.removeChild(h);continue}var f=t.map(h.attributes,function(t){return t});var c=[].concat(i["*"]||[],i[p]||[]);for(var u=0,g=f.length;u<g;u++){if(!a(f[u],c)){h.removeAttribute(f[u].nodeName)}}}return o.body.innerHTML}var d=function(t,e){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",t,e)};d.VERSION="3.4.1";d.TRANSITION_DURATION=150;d.DEFAULTS={animation:true,placement:"top",selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:false,container:false,viewport:{selector:"body",padding:0},sanitize:true,sanitizeFn:null,whiteList:o};d.prototype.init=function(e,i,n){this.enabled=true;this.type=e;this.$element=t(i);this.options=this.getOptions(n);this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport);this.inState={click:false,hover:false,focus:false};if(this.$element[0]instanceof document.constructor&&!this.options.selector){throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!")}var o=this.options.trigger.split(" ");for(var s=o.length;s--;){var r=o[s];if(r=="click"){this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this))}else if(r!="manual"){var a=r=="hover"?"mouseenter":"focusin";var l=r=="hover"?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this));this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};d.prototype.getDefaults=function(){return d.DEFAULTS};d.prototype.getOptions=function(i){var n=this.$element.data();for(var o in n){if(n.hasOwnProperty(o)&&t.inArray(o,e)!==-1){delete n[o]}}i=t.extend({},this.getDefaults(),n,i);if(i.delay&&typeof i.delay=="number"){i.delay={show:i.delay,hide:i.delay}}if(i.sanitize){i.template=l(i.template,i.whiteList,i.sanitizeFn)}return i};d.prototype.getDelegateOptions=function(){var e={};var i=this.getDefaults();this._options&&t.each(this._options,function(t,n){if(i[t]!=n)e[t]=n});return e};d.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(!i){i=new this.constructor(e.currentTarget,this.getDelegateOptions());t(e.currentTarget).data("bs."+this.type,i)}if(e instanceof t.Event){i.inState[e.type=="focusin"?"focus":"hover"]=true}if(i.tip().hasClass("in")||i.hoverState=="in"){i.hoverState="in";return}clearTimeout(i.timeout);i.hoverState="in";if(!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){if(i.hoverState=="in")i.show()},i.options.delay.show)};d.prototype.isInStateTrue=function(){for(var t in this.inState){if(this.inState[t])return true}return false};d.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(!i){i=new this.constructor(e.currentTarget,this.getDelegateOptions());t(e.currentTarget).data("bs."+this.type,i)}if(e instanceof t.Event){i.inState[e.type=="focusout"?"focus":"hover"]=false}if(i.isInStateTrue())return;clearTimeout(i.timeout);i.hoverState="out";if(!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){if(i.hoverState=="out")i.hide()},i.options.delay.hide)};d.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var n=this;var o=this.tip();var s=this.getUID(this.type);this.setContent();o.attr("id",s);this.$element.attr("aria-describedby",s);if(this.options.animation)o.addClass("fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement;var a=/\s?auto?\s?/i;var l=a.test(r);if(l)r=r.replace(a,"")||"top";o.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this);this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition();var p=o[0].offsetWidth;var f=o[0].offsetHeight;if(l){var c=r;var u=this.getPosition(this.$viewport);r=r=="bottom"&&h.bottom+f>u.bottom?"top":r=="top"&&h.top-f<u.top?"bottom":r=="right"&&h.right+p>u.width?"left":r=="left"&&h.left-p<u.left?"right":r;o.removeClass(c).addClass(r)}var g=this.getCalculatedOffset(r,h,p,f);this.applyPlacement(g,r);var v=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type);n.hoverState=null;if(t=="out")n.leave(n)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",v).emulateTransitionEnd(d.TRANSITION_DURATION):v()}};d.prototype.applyPlacement=function(e,i){var n=this.tip();var o=n[0].offsetWidth;var s=n[0].offsetHeight;var r=parseInt(n.css("margin-top"),10);var a=parseInt(n.css("margin-left"),10);if(isNaN(r))r=0;if(isNaN(a))a=0;e.top+=r;e.left+=a;t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0);n.addClass("in");var l=n[0].offsetWidth;var d=n[0].offsetHeight;if(i=="top"&&d!=s){e.top=e.top+s-d}var h=this.getViewportAdjustedDelta(i,e,l,d);if(h.left)e.left+=h.left;else e.top+=h.top;var p=/top|bottom/.test(i);var f=p?h.left*2-o+l:h.top*2-s+d;var c=p?"offsetWidth":"offsetHeight";n.offset(e);this.replaceArrow(f,n[0][c],p)};d.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")};d.prototype.setContent=function(){var t=this.tip();var e=this.getTitle();if(this.options.html){if(this.options.sanitize){e=l(e,this.options.whiteList,this.options.sanitizeFn)}t.find(".tooltip-inner").html(e)}else{t.find(".tooltip-inner").text(e)}t.removeClass("fade in top bottom left right")};d.prototype.hide=function(e){var i=this;var n=t(this.$tip);var o=t.Event("hide.bs."+this.type);function s(){if(i.hoverState!="in")n.detach();if(i.$element){i.$element.removeAttr("aria-describedby").trigger("hidden.bs."+i.type)}e&&e()}this.$element.trigger(o);if(o.isDefaultPrevented())return;n.removeClass("in");t.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",s).emulateTransitionEnd(d.TRANSITION_DURATION):s();this.hoverState=null;return this};d.prototype.fixTitle=function(){var t=this.$element;if(t.attr("title")||typeof t.attr("data-original-title")!="string"){t.attr("data-original-title",t.attr("title")||"").attr("title","")}};d.prototype.hasContent=function(){return this.getTitle()};d.prototype.getPosition=function(e){e=e||this.$element;var i=e[0];var n=i.tagName=="BODY";var o=i.getBoundingClientRect();if(o.width==null){o=t.extend({},o,{width:o.right-o.left,height:o.bottom-o.top})}var s=window.SVGElement&&i instanceof window.SVGElement;var r=n?{top:0,left:0}:s?null:e.offset();var a={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()};var l=n?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},o,a,l,r)};d.prototype.getCalculatedOffset=function(t,e,i,n){return t=="bottom"?{top:e.top+e.height,left:e.left+e.width/2-i/2}:t=="top"?{top:e.top-n,left:e.left+e.width/2-i/2}:t=="left"?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}};d.prototype.getViewportAdjustedDelta=function(t,e,i,n){var o={top:0,left:0};if(!this.$viewport)return o;var s=this.options.viewport&&this.options.viewport.padding||0;var r=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-s-r.scroll;var l=e.top+s-r.scroll+n;if(a<r.top){o.top=r.top-a}else if(l>r.top+r.height){o.top=r.top+r.height-l}}else{var d=e.left-s;var h=e.left+s+i;if(d<r.left){o.left=r.left-d}else if(h>r.right){o.left=r.left+r.width-h}}return o};d.prototype.getTitle=function(){var t;var e=this.$element;var i=this.options;t=e.attr("data-original-title")||(typeof i.title=="function"?i.title.call(e[0]):i.title);return t};d.prototype.getUID=function(t){do{t+=~~(Math.random()*1e6)}while(document.getElementById(t));return t};d.prototype.tip=function(){if(!this.$tip){this.$tip=t(this.options.template);if(this.$tip.length!=1){throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!")}}return this.$tip};d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};d.prototype.enable=function(){this.enabled=true};d.prototype.disable=function(){this.enabled=false};d.prototype.toggleEnabled=function(){this.enabled=!this.enabled};d.prototype.toggle=function(e){var i=this;if(e){i=t(e.currentTarget).data("bs."+this.type);if(!i){i=new this.constructor(e.currentTarget,this.getDelegateOptions());t(e.currentTarget).data("bs."+this.type,i)}}if(e){i.inState.click=!i.inState.click;if(i.isInStateTrue())i.enter(i);else i.leave(i)}else{i.tip().hasClass("in")?i.leave(i):i.enter(i)}};d.prototype.destroy=function(){var t=this;clearTimeout(this.timeout);this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type);if(t.$tip){t.$tip.detach()}t.$tip=null;t.$arrow=null;t.$viewport=null;t.$element=null})};d.prototype.sanitizeHtml=function(t){return l(t,this.options.whiteList,this.options.sanitizeFn)};function h(e){return this.each(function(){var i=t(this);var n=i.data("bs.tooltip");var o=typeof e=="object"&&e;if(!n&&/destroy|hide/.test(e))return;if(!n)i.data("bs.tooltip",n=new d(this,o));if(typeof e=="string")n[e]()})}var p=t.fn.tooltip;t.fn.tooltip=h;t.fn.tooltip.Constructor=d;t.fn.tooltip.noConflict=function(){t.fn.tooltip=p;return this}}(jQuery);+function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.4.1";e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'});e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype);e.prototype.constructor=e;e.prototype.getDefaults=function(){return e.DEFAULTS};e.prototype.setContent=function(){var t=this.tip();var e=this.getTitle();var i=this.getContent();if(this.options.html){var n=typeof i;if(this.options.sanitize){e=this.sanitizeHtml(e);if(n==="string"){i=this.sanitizeHtml(i)}}t.find(".popover-title").html(e);t.find(".popover-content").children().detach().end()[n==="string"?"html":"append"](i)}else{t.find(".popover-title").text(e);t.find(".popover-content").children().detach().end().text(i)}t.removeClass("fade top bottom left right in");if(!t.find(".popover-title").html())t.find(".popover-title").hide()};e.prototype.hasContent=function(){return this.getTitle()||this.getContent()};e.prototype.getContent=function(){var t=this.$element;var e=this.options;return t.attr("data-content")||(typeof e.content=="function"?e.content.call(t[0]):e.content)};e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};function i(i){return this.each(function(){var n=t(this);var o=n.data("bs.popover");var s=typeof i=="object"&&i;if(!o&&/destroy|hide/.test(i))return;if(!o)n.data("bs.popover",o=new e(this,s));if(typeof i=="string")o[i]()})}var n=t.fn.popover;t.fn.popover=i;t.fn.popover.Constructor=e;t.fn.popover.noConflict=function(){t.fn.popover=n;return this}}(jQuery);+function(t){"use strict";var e=function(e){this.element=t(e)};e.VERSION="3.4.1";e.TRANSITION_DURATION=60;e.prototype.show=function(){var e=this.element;var i=e.closest("ul:not(.dropdown-menu)");var n=e.data("target");if(!n){n=e.attr("href");n=n&&n.replace(/.*(?=#[^\s]*$)/,"")}if(e.parent("li").hasClass("active"))return;var o=i.find(".active:last a");var s=t.Event("hide.bs.tab",{relatedTarget:e[0]});var r=t.Event("show.bs.tab",{relatedTarget:o[0]});o.trigger(s);e.trigger(r);if(r.isDefaultPrevented()||s.isDefaultPrevented())return;var a=t(document).find(n);this.activate(e.closest("li"),i);this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:e[0]});e.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})};e.prototype.activate=function(i,n,o){var s=n.find("> .active");var r=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!n.find("> .fade").length);function a(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",false);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",true);if(r){i[0].offsetWidth;i.addClass("in")}else{i.removeClass("fade")}if(i.parent(".dropdown-menu").length){i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",true)}o&&o()}s.length&&r?s.one("bsTransitionEnd",a).emulateTransitionEnd(e.TRANSITION_DURATION):a();s.removeClass("in")};function i(i){return this.each(function(){var n=t(this);var o=n.data("bs.tab");if(!o)n.data("bs.tab",o=new e(this));if(typeof i=="string")o[i]()})}var n=t.fn.tab;t.fn.tab=i;t.fn.tab.Constructor=e;t.fn.tab.noConflict=function(){t.fn.tab=n;return this};var o=function(e){e.preventDefault();i.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery);

/*!
 * Chartist.js 0.11.4
 * Copyright 2019 Gion Kunz
 * Licensed under MIT
 */
(function(e,t){if(typeof define==="function"&&define.amd){define("Chartist",[],function(){return e["Chartist"]=t()})}else if(typeof module==="object"&&module.exports){module.exports=t()}else{e["Chartist"]=t()}})(this,function(){var e={version:"0.11.4"};(function(e,t){"use strict";var i=e.window;var n=e.document;t.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"/ct/"};t.noop=function(e){return e};t.alphaNumerate=function(e){return String.fromCharCode(97+e%26)};t.extend=function(e){var i,n,s;e=e||{};for(i=1;i<arguments.length;i++){n=arguments[i];for(var r in n){s=n[r];if(typeof s==="object"&&s!==null&&!(s instanceof Array)){e[r]=t.extend(e[r],s)}else{e[r]=s}}}return e};t.replaceAll=function(e,t,i){return e.replace(new RegExp(t,"g"),i)};t.ensureUnit=function(e,t){if(typeof e==="number"){e=e+t}return e};t.quantity=function(e){if(typeof e==="string"){var t=/^(\d+)\s*(.*)$/g.exec(e);return{value:+t[1],unit:t[2]||undefined}}return{value:e}};t.querySelector=function(e){return e instanceof Node?e:n.querySelector(e)};t.times=function(e){return Array.apply(null,new Array(e))};t.sum=function(e,t){return e+(t?t:0)};t.mapMultiply=function(e){return function(t){return t*e}};t.mapAdd=function(e){return function(t){return t+e}};t.serialMap=function(e,i){var n=[],s=Math.max.apply(null,e.map(function(e){return e.length}));t.times(s).forEach(function(t,s){var r=e.map(function(e){return e[s]});n[s]=i.apply(null,r)});return n};t.roundWithPrecision=function(e,i){var n=Math.pow(10,i||t.precision);return Math.round(e*n)/n};t.precision=8;t.escapingMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};t.serialize=function(e){if(e===null||e===undefined){return e}else if(typeof e==="number"){e=""+e}else if(typeof e==="object"){e=JSON.stringify({data:e})}return Object.keys(t.escapingMap).reduce(function(e,i){return t.replaceAll(e,i,t.escapingMap[i])},e)};t.deserialize=function(e){if(typeof e!=="string"){return e}e=Object.keys(t.escapingMap).reduce(function(e,i){return t.replaceAll(e,t.escapingMap[i],i)},e);try{e=JSON.parse(e);e=e.data!==undefined?e.data:e}catch(e){}return e};t.createSvg=function(e,i,n,s){var r;i=i||"100%";n=n||"100%";Array.prototype.slice.call(e.querySelectorAll("svg")).filter(function e(i){return i.getAttributeNS(t.namespaces.xmlns,"ct")}).forEach(function t(i){e.removeChild(i)});r=new t.Svg("svg").attr({width:i,height:n}).addClass(s);r._node.style.width=i;r._node.style.height=n;e.appendChild(r._node);return r};t.normalizeData=function(e,i,n){var s;var r={raw:e,normalized:{}};r.normalized.series=t.getDataArray({series:e.series||[]},i,n);if(r.normalized.series.every(function(e){return e instanceof Array})){s=Math.max.apply(null,r.normalized.series.map(function(e){return e.length}))}else{s=r.normalized.series.length}r.normalized.labels=(e.labels||[]).slice();Array.prototype.push.apply(r.normalized.labels,t.times(Math.max(0,s-r.normalized.labels.length)).map(function(){return""}));if(i){t.reverseData(r.normalized)}return r};t.safeHasProperty=function(e,t){return e!==null&&typeof e==="object"&&e.hasOwnProperty(t)};t.isDataHoleValue=function(e){return e===null||e===undefined||typeof e==="number"&&isNaN(e)};t.reverseData=function(e){e.labels.reverse();e.series.reverse();for(var t=0;t<e.series.length;t++){if(typeof e.series[t]==="object"&&e.series[t].data!==undefined){e.series[t].data.reverse()}else if(e.series[t]instanceof Array){e.series[t].reverse()}}};t.getDataArray=function(e,i,n){function s(e){if(t.safeHasProperty(e,"value")){return s(e.value)}else if(t.safeHasProperty(e,"data")){return s(e.data)}else if(e instanceof Array){return e.map(s)}else if(t.isDataHoleValue(e)){return undefined}else{if(n){var i={};if(typeof n==="string"){i[n]=t.getNumberOrUndefined(e)}else{i.y=t.getNumberOrUndefined(e)}i.x=e.hasOwnProperty("x")?t.getNumberOrUndefined(e.x):i.x;i.y=e.hasOwnProperty("y")?t.getNumberOrUndefined(e.y):i.y;return i}else{return t.getNumberOrUndefined(e)}}}return e.series.map(s)};t.normalizePadding=function(e,t){t=t||0;return typeof e==="number"?{top:e,right:e,bottom:e,left:e}:{top:typeof e.top==="number"?e.top:t,right:typeof e.right==="number"?e.right:t,bottom:typeof e.bottom==="number"?e.bottom:t,left:typeof e.left==="number"?e.left:t}};t.getMetaData=function(e,t){var i=e.data?e.data[t]:e[t];return i?i.meta:undefined};t.orderOfMagnitude=function(e){return Math.floor(Math.log(Math.abs(e))/Math.LN10)};t.projectLength=function(e,t,i){return t/i.range*e};t.getAvailableHeight=function(e,i){return Math.max((t.quantity(i.height).value||e.height())-(i.chartPadding.top+i.chartPadding.bottom)-i.axisX.offset,0)};t.getHighLow=function(e,i,n){i=t.extend({},i,n?i["axis"+n.toUpperCase()]:{});var s={high:i.high===undefined?-Number.MAX_VALUE:+i.high,low:i.low===undefined?Number.MAX_VALUE:+i.low};var r=i.high===undefined;var a=i.low===undefined;function o(e){if(e===undefined){return undefined}else if(e instanceof Array){for(var t=0;t<e.length;t++){o(e[t])}}else{var i=n?+e[n]:+e;if(r&&i>s.high){s.high=i}if(a&&i<s.low){s.low=i}}}if(r||a){o(e)}if(i.referenceValue||i.referenceValue===0){s.high=Math.max(i.referenceValue,s.high);s.low=Math.min(i.referenceValue,s.low)}if(s.high<=s.low){if(s.low===0){s.high=1}else if(s.low<0){s.high=0}else if(s.high>0){s.low=0}else{s.high=1;s.low=0}}return s};t.isNumeric=function(e){return e===null?false:isFinite(e)};t.isFalseyButZero=function(e){return!e&&e!==0};t.getNumberOrUndefined=function(e){return t.isNumeric(e)?+e:undefined};t.isMultiValue=function(e){return typeof e==="object"&&("x"in e||"y"in e)};t.getMultiValue=function(e,i){if(t.isMultiValue(e)){return t.getNumberOrUndefined(e[i||"y"])}else{return t.getNumberOrUndefined(e)}};t.rho=function(e){if(e===1){return e}function t(e,i){if(e%i===0){return i}else{return t(i,e%i)}}function i(e){return e*e+1}var n=2,s=2,r;if(e%2===0){return 2}do{n=i(n)%e;s=i(i(s))%e;r=t(Math.abs(n-s),e)}while(r===1);return r};t.getBounds=function(e,i,n,s){var r,a=0,o,l,u={high:i.high,low:i.low};u.valueRange=u.high-u.low;u.oom=t.orderOfMagnitude(u.valueRange);u.step=Math.pow(10,u.oom);u.min=Math.floor(u.low/u.step)*u.step;u.max=Math.ceil(u.high/u.step)*u.step;u.range=u.max-u.min;u.numberOfSteps=Math.round(u.range/u.step);var h=t.projectLength(e,u.step,u);var c=h<n;var d=s?t.rho(u.range):0;if(s&&t.projectLength(e,1,u)>=n){u.step=1}else if(s&&d<u.step&&t.projectLength(e,d,u)>=n){u.step=d}else{while(true){if(c&&t.projectLength(e,u.step,u)<=n){u.step*=2}else if(!c&&t.projectLength(e,u.step/2,u)>=n){u.step/=2;if(s&&u.step%1!==0){u.step*=2;break}}else{break}if(a++>1e3){throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}}}var f=2.221e-16;u.step=Math.max(u.step,f);function p(e,t){if(e===(e+=t)){e*=1+(t>0?f:-f)}return e}o=u.min;l=u.max;while(o+u.step<=u.low){o=p(o,u.step)}while(l-u.step>=u.high){l=p(l,-u.step)}u.min=o;u.max=l;u.range=u.max-u.min;var m=[];for(r=u.min;r<=u.max;r=p(r,u.step)){var x=t.roundWithPrecision(r);if(x!==m[m.length-1]){m.push(x)}}u.values=m;return u};t.polarToCartesian=function(e,t,i,n){var s=(n-90)*Math.PI/180;return{x:e+i*Math.cos(s),y:t+i*Math.sin(s)}};t.createChartRect=function(e,i,n){var s=!!(i.axisX||i.axisY);var r=s?i.axisY.offset:0;var a=s?i.axisX.offset:0;var o=e.width()||t.quantity(i.width).value||0;var l=e.height()||t.quantity(i.height).value||0;var u=t.normalizePadding(i.chartPadding,n);o=Math.max(o,r+u.left+u.right);l=Math.max(l,a+u.top+u.bottom);var h={padding:u,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};if(s){if(i.axisX.position==="start"){h.y2=u.top+a;h.y1=Math.max(l-u.bottom,h.y2+1)}else{h.y2=u.top;h.y1=Math.max(l-u.bottom-a,h.y2+1)}if(i.axisY.position==="start"){h.x1=u.left+r;h.x2=Math.max(o-u.right,h.x1+1)}else{h.x1=u.left;h.x2=Math.max(o-u.right-r,h.x1+1)}}else{h.x1=u.left;h.x2=Math.max(o-u.right,h.x1+1);h.y2=u.top;h.y1=Math.max(l-u.bottom,h.y2+1)}return h};t.createGrid=function(e,i,n,s,r,a,o,l){var u={};u[n.units.pos+"1"]=e;u[n.units.pos+"2"]=e;u[n.counterUnits.pos+"1"]=s;u[n.counterUnits.pos+"2"]=s+r;var h=a.elem("line",u,o.join(" "));l.emit("draw",t.extend({type:"grid",axis:n,index:i,group:a,element:h},u))};t.createGridBackground=function(e,t,i,n){var s=e.elem("rect",{x:t.x1,y:t.y2,width:t.width(),height:t.height()},i,true);n.emit("draw",{type:"gridBackground",group:e,element:s})};t.createLabel=function(e,i,s,r,a,o,l,u,h,c,d){var f;var p={};p[a.units.pos]=e+l[a.units.pos];p[a.counterUnits.pos]=l[a.counterUnits.pos];p[a.units.len]=i;p[a.counterUnits.len]=Math.max(0,o-10);if(c){var m=n.createElement("span");m.className=h.join(" ");m.setAttribute("xmlns",t.namespaces.xhtml);m.innerText=r[s];m.style[a.units.len]=Math.round(p[a.units.len])+"px";m.style[a.counterUnits.len]=Math.round(p[a.counterUnits.len])+"px";f=u.foreignObject(m,t.extend({style:"overflow: visible;"},p))}else{f=u.elem("text",p,h.join(" ")).text(r[s])}d.emit("draw",t.extend({type:"label",axis:a,index:s,group:u,element:f,text:r[s]},p))};t.getSeriesOption=function(e,t,i){if(e.name&&t.series&&t.series[e.name]){var n=t.series[e.name];return n.hasOwnProperty(i)?n[i]:t[i]}else{return t[i]}};t.optionsProvider=function(e,n,s){var r=t.extend({},e),a,o=[],l;function u(e){var o=a;a=t.extend({},r);if(n){for(l=0;l<n.length;l++){var u=i.matchMedia(n[l][0]);if(u.matches){a=t.extend(a,n[l][1])}}}if(s&&e){s.emit("optionsChanged",{previousOptions:o,currentOptions:a})}}function h(){o.forEach(function(e){e.removeListener(u)})}if(!i.matchMedia){throw"window.matchMedia not found! Make sure you're using a polyfill."}else if(n){for(l=0;l<n.length;l++){var c=i.matchMedia(n[l][0]);c.addListener(u);o.push(c)}}u();return{removeMediaQueryListeners:h,getCurrentOptions:function e(){return t.extend({},a)}}};t.splitIntoSegments=function(e,i,n){var s={increasingX:false,fillHoles:false};n=t.extend({},s,n);var r=[];var a=true;for(var o=0;o<e.length;o+=2){if(t.getMultiValue(i[o/2].value)===undefined){if(!n.fillHoles){a=true}}else{if(n.increasingX&&o>=2&&e[o]<=e[o-2]){a=true}if(a){r.push({pathCoordinates:[],valueData:[]});a=false}r[r.length-1].pathCoordinates.push(e[o],e[o+1]);r[r.length-1].valueData.push(i[o/2])}}return r}})(this||global,e);(function(e,t){"use strict";t.Interpolation={};t.Interpolation.none=function(e){var i={fillHoles:false};e=t.extend({},i,e);return function i(n,s){var r=new t.Svg.Path;var a=true;for(var o=0;o<n.length;o+=2){var l=n[o];var u=n[o+1];var h=s[o/2];if(t.getMultiValue(h.value)!==undefined){if(a){r.move(l,u,false,h)}else{r.line(l,u,false,h)}a=false}else if(!e.fillHoles){a=true}}return r}};t.Interpolation.simple=function(e){var i={divisor:2,fillHoles:false};e=t.extend({},i,e);var n=1/Math.max(1,e.divisor);return function i(s,r){var a=new t.Svg.Path;var o,l,u;for(var h=0;h<s.length;h+=2){var c=s[h];var d=s[h+1];var f=(c-o)*n;var p=r[h/2];if(p.value!==undefined){if(u===undefined){a.move(c,d,false,p)}else{a.curve(o+f,l,c-f,d,c,d,false,p)}o=c;l=d;u=p}else if(!e.fillHoles){o=c=u=undefined}}return a}};t.Interpolation.cardinal=function(e){var i={tension:1,fillHoles:false};e=t.extend({},i,e);var n=Math.min(1,Math.max(0,e.tension)),s=1-n;return function i(r,a){var o=t.splitIntoSegments(r,a,{fillHoles:e.fillHoles});if(!o.length){return t.Interpolation.none()([])}else if(o.length>1){var l=[];o.forEach(function(e){l.push(i(e.pathCoordinates,e.valueData))});return t.Svg.Path.join(l)}else{r=o[0].pathCoordinates;a=o[0].valueData;if(r.length<=4){return t.Interpolation.none()(r,a)}var u=(new t.Svg.Path).move(r[0],r[1],false,a[0]),h;for(var c=0,d=r.length;d-2*!h>c;c+=2){var f=[{x:+r[c-2],y:+r[c-1]},{x:+r[c],y:+r[c+1]},{x:+r[c+2],y:+r[c+3]},{x:+r[c+4],y:+r[c+5]}];if(h){if(!c){f[0]={x:+r[d-2],y:+r[d-1]}}else if(d-4===c){f[3]={x:+r[0],y:+r[1]}}else if(d-2===c){f[2]={x:+r[0],y:+r[1]};f[3]={x:+r[2],y:+r[3]}}}else{if(d-4===c){f[3]=f[2]}else if(!c){f[0]={x:+r[c],y:+r[c+1]}}}u.curve(n*(-f[0].x+6*f[1].x+f[2].x)/6+s*f[2].x,n*(-f[0].y+6*f[1].y+f[2].y)/6+s*f[2].y,n*(f[1].x+6*f[2].x-f[3].x)/6+s*f[2].x,n*(f[1].y+6*f[2].y-f[3].y)/6+s*f[2].y,f[2].x,f[2].y,false,a[(c+2)/2])}return u}}};t.Interpolation.monotoneCubic=function(e){var i={fillHoles:false};e=t.extend({},i,e);return function i(n,s){var r=t.splitIntoSegments(n,s,{fillHoles:e.fillHoles,increasingX:true});if(!r.length){return t.Interpolation.none()([])}else if(r.length>1){var a=[];r.forEach(function(e){a.push(i(e.pathCoordinates,e.valueData))});return t.Svg.Path.join(a)}else{n=r[0].pathCoordinates;s=r[0].valueData;if(n.length<=4){return t.Interpolation.none()(n,s)}var o=[],l=[],u,h=n.length/2,c=[],d=[],f=[],p=[],m;for(u=0;u<h;u++){o[u]=n[u*2];l[u]=n[u*2+1]}for(u=0;u<h-1;u++){f[u]=l[u+1]-l[u];p[u]=o[u+1]-o[u];d[u]=f[u]/p[u]}c[0]=d[0];c[h-1]=d[h-2];for(u=1;u<h-1;u++){if(d[u]===0||d[u-1]===0||d[u-1]>0!==d[u]>0){c[u]=0}else{c[u]=3*(p[u-1]+p[u])/((2*p[u]+p[u-1])/d[u-1]+(p[u]+2*p[u-1])/d[u]);if(!isFinite(c[u])){c[u]=0}}}m=(new t.Svg.Path).move(o[0],l[0],false,s[0]);for(u=0;u<h-1;u++){m.curve(o[u]+p[u]/3,l[u]+c[u]*p[u]/3,o[u+1]-p[u]/3,l[u+1]-c[u+1]*p[u]/3,o[u+1],l[u+1],false,s[u+1])}return m}}};t.Interpolation.step=function(e){var i={postpone:true,fillHoles:false};e=t.extend({},i,e);return function i(n,s){var r=new t.Svg.Path;var a,o,l;for(var u=0;u<n.length;u+=2){var h=n[u];var c=n[u+1];var d=s[u/2];if(d.value!==undefined){if(l===undefined){r.move(h,c,false,d)}else{if(e.postpone){r.line(h,o,false,l)}else{r.line(a,c,false,d)}r.line(h,c,false,d)}a=h;o=c;l=d}else if(!e.fillHoles){a=o=l=undefined}}return r}}})(this||global,e);(function(e,t){"use strict";t.EventEmitter=function(){var e=[];function t(t,i){e[t]=e[t]||[];e[t].push(i)}function i(t,i){if(e[t]){if(i){e[t].splice(e[t].indexOf(i),1);if(e[t].length===0){delete e[t]}}else{delete e[t]}}}function n(t,i){if(e[t]){e[t].forEach(function(e){e(i)})}if(e["*"]){e["*"].forEach(function(e){e(t,i)})}}return{addEventHandler:t,removeEventHandler:i,emit:n}}})(this||global,e);(function(e,t){"use strict";function i(e){var t=[];if(e.length){for(var i=0;i<e.length;i++){t.push(e[i])}}return t}function n(e,i){var n=i||this.prototype||t.Class;var s=Object.create(n);t.Class.cloneDefinitions(s,e);var r=function(){var e=s.constructor||function(){},i;i=this===t?Object.create(s):this;e.apply(i,Array.prototype.slice.call(arguments,0));return i};r.prototype=s;r.super=n;r.extend=this.extend;return r}function s(){var e=i(arguments);var t=e[0];e.splice(1,e.length-1).forEach(function(e){Object.getOwnPropertyNames(e).forEach(function(i){delete t[i];Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})});return t}t.Class={extend:n,cloneDefinitions:s}})(this||global,e);(function(e,t){"use strict";var i=e.window;function n(e,i,n){if(e){this.data=e||{};this.data.labels=this.data.labels||[];this.data.series=this.data.series||[];this.eventEmitter.emit("data",{type:"update",data:this.data})}if(i){this.options=t.extend({},n?this.options:this.defaultOptions,i);if(!this.initializeTimeoutId){this.optionsProvider.removeMediaQueryListeners();this.optionsProvider=t.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter)}}if(!this.initializeTimeoutId){this.createChart(this.optionsProvider.getCurrentOptions())}return this}function s(){if(!this.initializeTimeoutId){i.removeEventListener("resize",this.resizeListener);this.optionsProvider.removeMediaQueryListeners()}else{i.clearTimeout(this.initializeTimeoutId)}return this}function r(e,t){this.eventEmitter.addEventHandler(e,t);return this}function a(e,t){this.eventEmitter.removeEventHandler(e,t);return this}function o(){i.addEventListener("resize",this.resizeListener);this.optionsProvider=t.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter);this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this));if(this.options.plugins){this.options.plugins.forEach(function(e){if(e instanceof Array){e[0](this,e[1])}else{e(this)}}.bind(this))}this.eventEmitter.emit("data",{type:"initial",data:this.data});this.createChart(this.optionsProvider.getCurrentOptions());this.initializeTimeoutId=undefined}function l(e,i,n,s,r){this.container=t.querySelector(e);this.data=i||{};this.data.labels=this.data.labels||[];this.data.series=this.data.series||[];this.defaultOptions=n;this.options=s;this.responsiveOptions=r;this.eventEmitter=t.EventEmitter();this.supportsForeignObject=t.Svg.isSupported("Extensibility");this.supportsAnimations=t.Svg.isSupported("AnimationEventsAttribute");this.resizeListener=function e(){this.update()}.bind(this);if(this.container){if(this.container.__chartist__){this.container.__chartist__.detach()}this.container.__chartist__=this}this.initializeTimeoutId=setTimeout(o.bind(this),0)}t.Base=t.Class.extend({constructor:l,optionsProvider:undefined,container:undefined,svg:undefined,eventEmitter:undefined,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:n,detach:s,on:r,off:a,version:t.version,supportsForeignObject:false})})(this||global,e);(function(e,t){"use strict";var i=e.document;function n(e,n,s,r,a){if(e instanceof Element){this._node=e}else{this._node=i.createElementNS(t.namespaces.svg,e);if(e==="svg"){this.attr({"xmlns:ct":t.namespaces.ct})}}if(n){this.attr(n)}if(s){this.addClass(s)}if(r){if(a&&r._node.firstChild){r._node.insertBefore(this._node,r._node.firstChild)}else{r._node.appendChild(this._node)}}}function s(e,i){if(typeof e==="string"){if(i){return this._node.getAttributeNS(i,e)}else{return this._node.getAttribute(e)}}Object.keys(e).forEach(function(i){if(e[i]===undefined){return}if(i.indexOf(":")!==-1){var n=i.split(":");this._node.setAttributeNS(t.namespaces[n[0]],i,e[i])}else{if(this._node){try{if(this._node.nodeName==="rect"&&i==="height"&&e[i]<0){}else{this._node&&this._node.setAttribute(i,e[i])}}catch(e){}}}}.bind(this));return this}function r(e,i,n,s){return new t.Svg(e,i,n,this,s)}function a(){return this._node.parentNode instanceof SVGElement?new t.Svg(this._node.parentNode):null}function o(){var e=this._node;while(e.nodeName!=="svg"){e=e.parentNode}return new t.Svg(e)}function l(e){var i=this._node.querySelector(e);return i?new t.Svg(i):null}function u(e){var i=this._node.querySelectorAll(e);return i.length?new t.Svg.List(i):null}function h(){return this._node}function c(e,n,s,r){if(typeof e==="string"){var a=i.createElement("div");a.innerHTML=e;e=a.firstChild}e.setAttribute("xmlns",t.namespaces.xmlns);var o=this.elem("foreignObject",n,s,r);o._node.appendChild(e);return o}function d(e){this._node.appendChild(i.createTextNode(e));return this}function f(){while(this._node.firstChild){this._node.removeChild(this._node.firstChild)}return this}function p(){this._node.parentNode.removeChild(this._node);return this.parent()}function m(e){this._node.parentNode.replaceChild(e._node,this._node);return e}function x(e,t){if(t&&this._node.firstChild){this._node.insertBefore(e._node,this._node.firstChild)}else{this._node.appendChild(e._node)}return this}function g(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]}function v(e){this._node.setAttribute("class",this.classes(this._node).concat(e.trim().split(/\s+/)).filter(function(e,t,i){return i.indexOf(e)===t}).join(" "));return this}function y(e){var t=e.trim().split(/\s+/);this._node.setAttribute("class",this.classes(this._node).filter(function(e){return t.indexOf(e)===-1}).join(" "));return this}function b(){this._node.setAttribute("class","");return this}function w(){return this._node.getBoundingClientRect().height}function E(){return this._node.getBoundingClientRect().width}function S(e,i,n){if(i===undefined){i=true}Object.keys(e).forEach(function s(r){function a(e,i){var s={},a,o,l;if(e.easing){l=e.easing instanceof Array?e.easing:t.Svg.Easing[e.easing];delete e.easing}e.begin=t.ensureUnit(e.begin,"ms");e.dur=t.ensureUnit(e.dur,"ms");if(l){e.calcMode="spline";e.keySplines=l.join(" ");e.keyTimes="0;1"}if(i){e.fill="freeze";s[r]=e.from;this.attr(s);o=t.quantity(e.begin||0).value;e.begin="indefinite"}a=this.elem("animate",t.extend({attributeName:r},e));if(i){setTimeout(function(){try{a._node.beginElement()}catch(t){s[r]=e.to;this.attr(s);a.remove()}}.bind(this),o)}if(n){a._node.addEventListener("beginEvent",function t(){n.emit("animationBegin",{element:this,animate:a._node,params:e})}.bind(this))}a._node.addEventListener("endEvent",function t(){if(n){n.emit("animationEnd",{element:this,animate:a._node,params:e})}if(i){s[r]=e.to;this.attr(s);a.remove()}}.bind(this))}if(e[r]instanceof Array){e[r].forEach(function(e){a.bind(this)(e,false)}.bind(this))}else{a.bind(this)(e[r],i)}}.bind(this));return this}t.Svg=t.Class.extend({constructor:n,attr:s,elem:r,parent:a,root:o,querySelector:l,querySelectorAll:u,getNode:h,foreignObject:c,text:d,empty:f,remove:p,replace:m,append:x,classes:g,addClass:v,removeClass:y,removeAllClasses:b,height:w,width:E,animate:S});t.Svg.isSupported=function(e){return i.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+e,"1.1")};var A={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]};t.Svg.Easing=A;function C(e){var i=this;this.svgElements=[];for(var n=0;n<e.length;n++){this.svgElements.push(new t.Svg(e[n]))}Object.keys(t.Svg.prototype).filter(function(e){return["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(e)===-1}).forEach(function(e){i[e]=function(){var n=Array.prototype.slice.call(arguments,0);i.svgElements.forEach(function(i){t.Svg.prototype[e].apply(i,n)});return i}})}t.Svg.List=t.Class.extend({constructor:C})})(this||global,e);(function(e,t){"use strict";var i={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]};var n={accuracy:3};function s(e,i,n,s,r,a){var o=t.extend({command:r?e.toLowerCase():e.toUpperCase()},i,a?{data:a}:{});n.splice(s,0,o)}function r(e,t){e.forEach(function(n,s){i[n.command.toLowerCase()].forEach(function(i,r){t(n,i,s,r,e)})})}function a(e,i){this.pathElements=[];this.pos=0;this.close=e;this.options=t.extend({},n,i)}function o(e){if(e!==undefined){this.pos=Math.max(0,Math.min(this.pathElements.length,e));return this}else{return this.pos}}function l(e){this.pathElements.splice(this.pos,e);return this}function u(e,t,i,n){s("M",{x:+e,y:+t},this.pathElements,this.pos++,i,n);return this}function h(e,t,i,n){s("L",{x:+e,y:+t},this.pathElements,this.pos++,i,n);return this}function c(e,t,i,n,r,a,o,l){s("C",{x1:+e,y1:+t,x2:+i,y2:+n,x:+r,y:+a},this.pathElements,this.pos++,o,l);return this}function d(e,t,i,n,r,a,o,l,u){s("A",{rx:+e,ry:+t,xAr:+i,lAf:+n,sf:+r,x:+a,y:+o},this.pathElements,this.pos++,l,u);return this}function f(e){var n=e.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(function(e,t){if(t.match(/[A-Za-z]/)){e.push([])}e[e.length-1].push(t);return e},[]);if(n[n.length-1][0].toUpperCase()==="Z"){n.pop()}var s=n.map(function(e){var n=e.shift(),s=i[n.toLowerCase()];return t.extend({command:n},s.reduce(function(t,i,n){t[i]=+e[n];return t},{}))});var r=[this.pos,0];Array.prototype.push.apply(r,s);Array.prototype.splice.apply(this.pathElements,r);this.pos+=s.length;return this}function p(){var e=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(t,n){var s=i[n.command.toLowerCase()].map(function(t){return this.options.accuracy?Math.round(n[t]*e)/e:n[t]}.bind(this));return t+n.command+s.join(",")}.bind(this),"")+(this.close?"Z":"")}function m(e,t){r(this.pathElements,function(i,n){i[n]*=n[0]==="x"?e:t});return this}function x(e,t){r(this.pathElements,function(i,n){i[n]+=n[0]==="x"?e:t});return this}function g(e){r(this.pathElements,function(t,i,n,s,r){var a=e(t,i,n,s,r);if(a||a===0){t[i]=a}});return this}function v(e){var i=new t.Svg.Path(e||this.close);i.pos=this.pos;i.pathElements=this.pathElements.slice().map(function e(i){return t.extend({},i)});i.options=t.extend({},this.options);return i}function y(e){var i=[new t.Svg.Path];this.pathElements.forEach(function(n){if(n.command===e.toUpperCase()&&i[i.length-1].pathElements.length!==0){i.push(new t.Svg.Path)}i[i.length-1].pathElements.push(n)});return i}function b(e,i,n){var s=new t.Svg.Path(i,n);for(var r=0;r<e.length;r++){var a=e[r];for(var o=0;o<a.pathElements.length;o++){s.pathElements.push(a.pathElements[o])}}return s}t.Svg.Path=t.Class.extend({constructor:a,position:o,remove:l,move:u,line:h,curve:c,arc:d,scale:m,translate:x,transform:g,parse:f,stringify:p,clone:v,splitByCommand:y});t.Svg.Path.elementDescriptions=i;t.Svg.Path.join=b})(this||global,e);(function(e,t){"use strict";var i=e.window;var n=e.document;var s={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};function r(e,t,i,n){this.units=e;this.counterUnits=e===s.x?s.y:s.x;this.chartRect=t;this.axisLength=t[e.rectEnd]-t[e.rectStart];this.gridOffset=t[e.rectOffset];this.ticks=i;this.options=n}function a(e,i,n,s,r){var a=s["axis"+this.units.pos.toUpperCase()];var o=this.ticks.map(this.projectValue.bind(this));var l=this.ticks.map(a.labelInterpolationFnc);o.forEach(function(u,h){var c={x:0,y:0};var d;if(o[h+1]){d=o[h+1]-u}else{d=Math.max(this.axisLength-u,30)}if(t.isFalseyButZero(l[h])&&l[h]!==""){return}if(this.units.pos==="x"){u=this.chartRect.x1+u;c.x=s.axisX.labelOffset.x;if(s.axisX.position==="start"){c.y=this.chartRect.padding.top+s.axisX.labelOffset.y+(n?5:20)}else{c.y=this.chartRect.y1+s.axisX.labelOffset.y+(n?5:20)}}else{u=this.chartRect.y1-u;c.y=s.axisY.labelOffset.y-(n?d:0);if(s.axisY.position==="start"){c.x=n?this.chartRect.padding.left+s.axisY.labelOffset.x:this.chartRect.x1-10}else{c.x=this.chartRect.x2+s.axisY.labelOffset.x+10}}if(a.showGrid){t.createGrid(u,h,this,this.gridOffset,this.chartRect[this.counterUnits.len](),e,[s.classNames.grid,s.classNames[this.units.dir]],r)}if(a.showLabel){t.createLabel(u,d,h,l,this,a.offset,c,i,[s.classNames.label,s.classNames[this.units.dir],a.position==="start"?s.classNames[a.position]:s.classNames["end"]],n,r)}}.bind(this))}t.Axis=t.Class.extend({constructor:r,createGridAndLabels:a,projectValue:function(e,t,i){throw new Error("Base axis can't be instantiated!")}});t.Axis.units=s})(this||global,e);(function(e,t){"use strict";var i=e.window;var n=e.document;function s(e,i,n,s){var r=s.highLow||t.getHighLow(i,s,e.pos);this.bounds=t.getBounds(n[e.rectEnd]-n[e.rectStart],r,s.scaleMinSpace||20,s.onlyInteger);this.range={min:this.bounds.min,max:this.bounds.max};t.AutoScaleAxis.super.constructor.call(this,e,n,this.bounds.values,s)}function r(e){return this.axisLength*(+t.getMultiValue(e,this.units.pos)-this.bounds.min)/this.bounds.range}t.AutoScaleAxis=t.Axis.extend({constructor:s,projectValue:r})})(this||global,e);(function(e,t){"use strict";var i=e.window;var n=e.document;function s(e,i,n,s){var r=s.highLow||t.getHighLow(i,s,e.pos);this.divisor=s.divisor||1;this.ticks=s.ticks||t.times(this.divisor).map(function(e,t){return r.low+(r.high-r.low)/this.divisor*t}.bind(this));this.ticks.sort(function(e,t){return e-t});this.range={min:r.low,max:r.high};t.FixedScaleAxis.super.constructor.call(this,e,n,this.ticks,s);this.stepLength=this.axisLength/this.divisor}function r(e){return this.axisLength*(+t.getMultiValue(e,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}t.FixedScaleAxis=t.Axis.extend({constructor:s,projectValue:r})})(this||global,e);(function(e,t){"use strict";var i=e.window;var n=e.document;function s(e,i,n,s){t.StepAxis.super.constructor.call(this,e,n,s.ticks,s);var r=Math.max(1,s.ticks.length-(s.stretch?1:0));this.stepLength=this.axisLength/r}function r(e,t){return this.stepLength*t}t.StepAxis=t.Axis.extend({constructor:s,projectValue:r})})(this||global,e);(function(e,t){"use strict";var i=e.window;var n=e.document;var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:true,showGrid:true,labelInterpolationFnc:t.noop,type:undefined},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:true,showGrid:true,labelInterpolationFnc:t.noop,type:undefined,scaleMinSpace:20,onlyInteger:false},width:undefined,height:undefined,showLine:true,showPoint:true,showArea:false,areaBase:0,lineSmooth:true,showGridBackground:false,low:undefined,high:undefined,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:false,reverseData:false,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};function r(e){var i=t.normalizeData(this.data,e.reverseData,true);this.svg=t.createSvg(this.container,e.width,e.height,e.classNames.chart);var n=this.svg.elem("g").addClass(e.classNames.gridGroup);var r=this.svg.elem("g");var a=this.svg.elem("g").addClass(e.classNames.labelGroup);var o=t.createChartRect(this.svg,e,s.padding);var l,u;if(e.axisX.type===undefined){l=new t.StepAxis(t.Axis.units.x,i.normalized.series,o,t.extend({},e.axisX,{ticks:i.normalized.labels,stretch:e.fullWidth}))}else{l=e.axisX.type.call(t,t.Axis.units.x,i.normalized.series,o,e.axisX)}if(e.axisY.type===undefined){u=new t.AutoScaleAxis(t.Axis.units.y,i.normalized.series,o,t.extend({},e.axisY,{high:t.isNumeric(e.high)?e.high:e.axisY.high,low:t.isNumeric(e.low)?e.low:e.axisY.low}))}else{u=e.axisY.type.call(t,t.Axis.units.y,i.normalized.series,o,e.axisY)}l.createGridAndLabels(n,a,this.supportsForeignObject,e,this.eventEmitter);u.createGridAndLabels(n,a,this.supportsForeignObject,e,this.eventEmitter);if(e.showGridBackground){t.createGridBackground(n,o,e.classNames.gridBackground,this.eventEmitter)}i.raw.series.forEach(function(n,s){var a=r.elem("g");a.attr({"ct:series-name":n.name,"ct:meta":t.serialize(n.meta)});a.addClass([e.classNames.series,n.className||e.classNames.series+"-"+t.alphaNumerate(s)].join(" "));var h=[],c=[];i.normalized.series[s].forEach(function(e,r){var a={x:o.x1+l.projectValue(e,r,i.normalized.series[s]),y:o.y1-u.projectValue(e,r,i.normalized.series[s])};h.push(a.x,a.y);c.push({value:e,valueIndex:r,meta:t.getMetaData(n,r)})}.bind(this));var d={lineSmooth:t.getSeriesOption(n,e,"lineSmooth"),showPoint:t.getSeriesOption(n,e,"showPoint"),showLine:t.getSeriesOption(n,e,"showLine"),showArea:t.getSeriesOption(n,e,"showArea"),areaBase:t.getSeriesOption(n,e,"areaBase")};var f=typeof d.lineSmooth==="function"?d.lineSmooth:d.lineSmooth?t.Interpolation.monotoneCubic():t.Interpolation.none();var p=f(h,c);if(d.showPoint){p.pathElements.forEach(function(i){var r=a.elem("line",{x1:i.x,y1:i.y,x2:i.x+.01,y2:i.y},e.classNames.point).attr({"ct:value":[i.data.value.x,i.data.value.y].filter(t.isNumeric).join(","),"ct:meta":t.serialize(i.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:i.data.value,index:i.data.valueIndex,meta:i.data.meta,series:n,seriesIndex:s,axisX:l,axisY:u,group:a,element:r,x:i.x,y:i.y})}.bind(this))}if(d.showLine){var m=a.elem("path",{d:p.stringify()},e.classNames.line,true);this.eventEmitter.emit("draw",{type:"line",values:i.normalized.series[s],path:p.clone(),chartRect:o,index:s,series:n,seriesIndex:s,seriesMeta:n.meta,axisX:l,axisY:u,group:a,element:m})}if(d.showArea&&u.range){var x=Math.max(Math.min(d.areaBase,u.range.max),u.range.min);var g=o.y1-u.projectValue(x);p.splitByCommand("M").filter(function e(t){return t.pathElements.length>1}).map(function e(t){var i=t.pathElements[0];var n=t.pathElements[t.pathElements.length-1];return t.clone(true).position(0).remove(1).move(i.x,g).line(i.x,i.y).position(t.pathElements.length+1).line(n.x,g)}).forEach(function t(r){var h=a.elem("path",{d:r.stringify()},e.classNames.area,true);this.eventEmitter.emit("draw",{type:"area",values:i.normalized.series[s],path:r.clone(),series:n,seriesIndex:s,axisX:l,axisY:u,chartRect:o,index:s,group:a,element:h})}.bind(this))}}.bind(this));this.eventEmitter.emit("created",{bounds:u.bounds,chartRect:o,axisX:l,axisY:u,svg:this.svg,options:e})}function a(e,i,n,r){t.Line.super.constructor.call(this,e,i,s,t.extend({},s,n),r)}t.Line=t.Base.extend({constructor:a,createChart:r})})(this||global,e);(function(e,t){"use strict";var i=e.window;var n=e.document;var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:true,showGrid:true,labelInterpolationFnc:t.noop,scaleMinSpace:30,onlyInteger:false},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:true,showGrid:true,labelInterpolationFnc:t.noop,scaleMinSpace:20,onlyInteger:false},width:undefined,height:undefined,high:undefined,low:undefined,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:false,stackMode:"accumulate",horizontalBars:false,distributeSeries:false,reverseData:false,showGridBackground:false,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};function r(e){var i;var n;if(e.distributeSeries){i=t.normalizeData(this.data,e.reverseData,e.horizontalBars?"x":"y");i.normalized.series=i.normalized.series.map(function(e){return[e]})}else{i=t.normalizeData(this.data,e.reverseData,e.horizontalBars?"x":"y")}this.svg=t.createSvg(this.container,e.width,e.height,e.classNames.chart+(e.horizontalBars?" "+e.classNames.horizontalBars:""));var r=this.svg.elem("g").addClass(e.classNames.gridGroup);var a=this.svg.elem("g");var o=this.svg.elem("g").addClass(e.classNames.labelGroup);if(e.stackBars&&i.normalized.series.length!==0){var l=t.serialMap(i.normalized.series,function e(){return Array.prototype.slice.call(arguments).map(function(e){return e}).reduce(function(e,t){return{x:e.x+(t&&t.x)||0,y:e.y+(t&&t.y)||0}},{x:0,y:0})});n=t.getHighLow([l],e,e.horizontalBars?"x":"y")}else{n=t.getHighLow(i.normalized.series,e,e.horizontalBars?"x":"y")}n.high=+e.high||(e.high===0?0:n.high);n.low=+e.low||(e.low===0?0:n.low);var u=t.createChartRect(this.svg,e,s.padding);var h,c,d,f,p;if(e.distributeSeries&&e.stackBars){c=i.normalized.labels.slice(0,1)}else{c=i.normalized.labels}if(e.horizontalBars){if(e.axisX.type===undefined){h=f=new t.AutoScaleAxis(t.Axis.units.x,i.normalized.series,u,t.extend({},e.axisX,{highLow:n,referenceValue:0}))}else{h=f=e.axisX.type.call(t,t.Axis.units.x,i.normalized.series,u,t.extend({},e.axisX,{highLow:n,referenceValue:0}))}if(e.axisY.type===undefined){d=p=new t.StepAxis(t.Axis.units.y,i.normalized.series,u,{ticks:c})}else{d=p=e.axisY.type.call(t,t.Axis.units.y,i.normalized.series,u,e.axisY)}}else{if(e.axisX.type===undefined){d=f=new t.StepAxis(t.Axis.units.x,i.normalized.series,u,{ticks:c})}else{d=f=e.axisX.type.call(t,t.Axis.units.x,i.normalized.series,u,e.axisX)}if(e.axisY.type===undefined){h=p=new t.AutoScaleAxis(t.Axis.units.y,i.normalized.series,u,t.extend({},e.axisY,{highLow:n,referenceValue:0}))}else{h=p=e.axisY.type.call(t,t.Axis.units.y,i.normalized.series,u,t.extend({},e.axisY,{highLow:n,referenceValue:0}))}}var m=e.horizontalBars?u.x1+h.projectValue(0):u.y1-h.projectValue(0);var x=[];d.createGridAndLabels(r,o,this.supportsForeignObject,e,this.eventEmitter);h.createGridAndLabels(r,o,this.supportsForeignObject,e,this.eventEmitter);if(e.showGridBackground){t.createGridBackground(r,u,e.classNames.gridBackground,this.eventEmitter)}i.raw.series.forEach(function(n,s){var r=s-(i.raw.series.length-1)/2;var o;var l;if(e.distributeSeries&&!e.stackBars){o=d.axisLength/i.normalized.series.length/2}else if(e.distributeSeries&&e.stackBars){o=d.axisLength/2}else{o=d.axisLength/i.normalized.series[s].length/2}l=a.elem("g");l.attr({"ct:series-name":n.name,"ct:meta":t.serialize(n.meta)});l.addClass([e.classNames.series,n.className||e.classNames.series+"-"+t.alphaNumerate(s)].join(" "));i.normalized.series[s].forEach(function(a,c){var g,v,y,b;if(e.distributeSeries&&!e.stackBars){b=s}else if(e.distributeSeries&&e.stackBars){b=0}else{b=c}if(e.horizontalBars){g={x:u.x1+h.projectValue(a&&a.x?a.x:0,c,i.normalized.series[s]),y:u.y1-d.projectValue(a&&a.y?a.y:0,b,i.normalized.series[s])}}else{g={x:u.x1+d.projectValue(a&&a.x?a.x:0,b,i.normalized.series[s]),y:u.y1-h.projectValue(a&&a.y?a.y:0,c,i.normalized.series[s])}}if(d instanceof t.StepAxis){if(!d.options.stretch){g[d.units.pos]+=o*(e.horizontalBars?-1:1)}g[d.units.pos]+=e.stackBars||e.distributeSeries?0:r*e.seriesBarDistance*(e.horizontalBars?-1:1)}y=x[c]||m;x[c]=y-(m-g[d.counterUnits.pos]);if(a===undefined){return}var w={};w[d.units.pos+"1"]=g[d.units.pos];w[d.units.pos+"2"]=g[d.units.pos];if(e.stackBars&&(e.stackMode==="accumulate"||!e.stackMode)){w[d.counterUnits.pos+"1"]=y;w[d.counterUnits.pos+"2"]=x[c]}else{w[d.counterUnits.pos+"1"]=m;w[d.counterUnits.pos+"2"]=g[d.counterUnits.pos]}w.x1=Math.min(Math.max(w.x1,u.x1),u.x2);w.x2=Math.min(Math.max(w.x2,u.x1),u.x2);w.y1=Math.min(Math.max(w.y1,u.y2),u.y1);w.y2=Math.min(Math.max(w.y2,u.y2),u.y1);var E=t.getMetaData(n,c);v=l.elem("line",w,e.classNames.bar).attr({"ct:value":[a.x,a.y].filter(t.isNumeric).join(","),"ct:meta":t.serialize(E)});this.eventEmitter.emit("draw",t.extend({type:"bar",value:a,index:c,meta:E,series:n,seriesIndex:s,axisX:f,axisY:p,chartRect:u,group:l,element:v},w))}.bind(this))}.bind(this));this.eventEmitter.emit("created",{bounds:h.bounds,chartRect:u,axisX:f,axisY:p,svg:this.svg,options:e})}function a(e,i,n,r){t.Bar.super.constructor.call(this,e,i,s,t.extend({},s,n),r)}t.Bar=t.Base.extend({constructor:a,createChart:r})})(this||global,e);(function(e,t){"use strict";var i=e.window;var n=e.document;var s={width:undefined,height:undefined,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:undefined,donut:false,donutSolid:false,donutWidth:60,showLabel:true,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:t.noop,labelDirection:"neutral",reverseData:false,ignoreEmptyValues:false};function r(e,t,i){var n=t.x>e.x;if(n&&i==="explode"||!n&&i==="implode"){return"start"}else if(n&&i==="implode"||!n&&i==="explode"){return"end"}else{return"middle"}}function a(e){var i=t.normalizeData(this.data);var n=[],a,o,l,u,h,c=e.startAngle;this.svg=t.createSvg(this.container,e.width,e.height,e.donut?e.classNames.chartDonut:e.classNames.chartPie);o=t.createChartRect(this.svg,e,s.padding);l=Math.min(o.width()/2,o.height()/2);h=e.total||i.normalized.series.reduce(function(e,t){return e+t},0);var d=t.quantity(e.donutWidth);if(d.unit==="%"){d.value*=l/100}l-=e.donut&&!e.donutSolid?d.value/2:0;if(e.labelPosition==="outside"||e.donut&&!e.donutSolid){u=l}else if(e.labelPosition==="center"){u=0}else if(e.donutSolid){u=l-d.value/2}else{u=l/2}u+=e.labelOffset;var f={x:o.x1+o.width()/2,y:o.y2+o.height()/2};var p=i.raw.series.filter(function(e){return e.hasOwnProperty("value")?e.value!==0:e!==0}).length===1;i.raw.series.forEach(function(e,t){n[t]=this.svg.elem("g",null,null)}.bind(this));if(e.showLabel){a=this.svg.elem("g",null,null)}i.raw.series.forEach(function(s,o){if(i.normalized.series[o]===0&&e.ignoreEmptyValues)return;n[o].attr({"ct:series-name":s.name});n[o].addClass([e.classNames.series,s.className||e.classNames.series+"-"+t.alphaNumerate(o)].join(" "));var m=h>0?c+i.normalized.series[o]/h*360:0;var x=Math.max(0,c-(o===0||p?0:.2));if(m-x>=359.99){m=x+359.99}var g=t.polarToCartesian(f.x,f.y,l,x),v=t.polarToCartesian(f.x,f.y,l,m);var y,b,w;var E=new t.Svg.Path(!e.donut||e.donutSolid).move(v.x,v.y).arc(l,l,0,m-c>180,0,g.x,g.y);if(!e.donut){E.line(f.x,f.y)}else if(e.donutSolid){w=l-d.value;y=t.polarToCartesian(f.x,f.y,w,c-(o===0||p?0:.2));b=t.polarToCartesian(f.x,f.y,w,m);E.line(y.x,y.y);E.arc(w,w,0,m-c>180,1,b.x,b.y)}var S=e.classNames.slicePie;if(e.donut){S=e.classNames.sliceDonut;if(e.donutSolid){S=e.classNames.sliceDonutSolid}}var A=n[o].elem("path",{d:E.stringify()},S);A.attr({"ct:value":i.normalized.series[o],"ct:meta":t.serialize(s.meta)});if(e.donut&&!e.donutSolid){A._node.style.strokeWidth=d.value+"px"}this.eventEmitter.emit("draw",{type:"slice",value:i.normalized.series[o],totalDataSum:h,index:o,meta:s.meta,series:s,group:n[o],element:A,path:E.clone(),center:f,radius:l,startAngle:c,endAngle:m});if(e.showLabel){var C;if(i.raw.series.length===1){C={x:f.x,y:f.y}}else{C=t.polarToCartesian(f.x,f.y,u,c+(m-c)/2)}var z;if(i.normalized.labels&&!t.isFalseyButZero(i.normalized.labels[o])){z=i.normalized.labels[o]}else{z=i.normalized.series[o]}var M=e.labelInterpolationFnc(z,o);if(M||M===0){var O=a.elem("text",{dx:C.x,dy:C.y,"text-anchor":r(f,C,e.labelDirection)},e.classNames.label).text(""+M);this.eventEmitter.emit("draw",{type:"label",index:o,group:a,element:O,text:""+M,x:C.x,y:C.y})}}c=m}.bind(this));this.eventEmitter.emit("created",{chartRect:o,svg:this.svg,options:e})}function o(e,i,n,r){t.Pie.super.constructor.call(this,e,i,s,t.extend({},s,n),r)}t.Pie=t.Base.extend({constructor:o,createChart:a,determineAnchorPosition:r})})(this||global,e);return e});(function(e,t){if(typeof define==="function"&&define.amd){define(["chartist"],function(i){return e.returnExportsGlobal=t(i)})}else if(typeof exports==="object"){module.exports=t(require("chartist"))}else{e["Chartist.plugins.ctAxisTitle"]=t(Chartist)}})(this,function(e){(function(e,t,i){"use strict";var n={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipTitle:false};var s={axisX:n,axisY:n};var r=function(e){if(e instanceof Function){return e()}return e};var a=function(e){if(e instanceof Function){return e()}return e};i.plugins=i.plugins||{};i.plugins.ctAxisTitle=function(e){e=i.extend({},s,e);return function t(n){n.on("created",function(t){if(!e.axisX.axisTitle&&!e.axisY.axisTitle){throw new Error("ctAxisTitle plugin - You must provide at least one axis title")}else if(!t.axisX&&!t.axisY){throw new Error("ctAxisTitle plugin can only be used on charts that have at least one axis")}var n,s,o,l=i.normalizePadding(t.options.chartPadding);if(e.axisX.axisTitle&&t.axisX){n=t.axisX.axisLength/2+t.options.axisY.offset+l.left;s=l.top;if(t.options.axisY.position==="end"){n-=t.options.axisY.offset}if(t.options.axisX.position==="end"){s+=t.axisY.axisLength}o=new i.Svg("text");o.addClass(a(e.axisX.axisClass));o.text(r(e.axisX.axisTitle));o.attr({x:n+e.axisX.offset.x,y:s+e.axisX.offset.y,"text-anchor":e.axisX.textAnchor});t.svg.append(o,true)}if(e.axisY.axisTitle&&t.axisY){n=0;s=t.axisY.axisLength/2+l.top;if(t.options.axisX.position==="start"){s+=t.options.axisX.offset}if(t.options.axisY.position==="end"){n=t.axisX.axisLength}var u="rotate("+(e.axisY.flipTitle?-90:90)+", "+n+", "+s+")";o=new i.Svg("text");o.addClass(a(e.axisY.axisClass));o.text(r(e.axisY.axisTitle));o.attr({x:n+e.axisY.offset.x,y:s+e.axisY.offset.y,transform:u,"text-anchor":e.axisY.textAnchor});t.svg.append(o,true)}})}}})(window,document,e);return e.plugins.ctAxisTitle});(function(e,t){if(e===undefined&&window!==undefined)e=window;if(typeof define==="function"&&define.amd){define(["chartist"],function(i){return e["Chartist.plugins.ctThreshold"]=t(i)})}else if(typeof module==="object"&&module.exports){module.exports=t(require("chartist"))}else{e["Chartist.plugins.ctThreshold"]=t(e["Chartist"])}})(this,function(e){(function(e,t,i){"use strict";var n={threshold:0,classNames:{aboveThreshold:"ct-threshold-above",belowThreshold:"ct-threshold-below"},maskNames:{aboveThreshold:"ct-threshold-mask-above",belowThreshold:"ct-threshold-mask-below"}};function s(e,t){var i=e.svg.querySelector("defs")||e.svg.elem("defs");var n=e.chartRect.height()-e.axisY.projectValue(t.threshold)+e.chartRect.y2;var s=e.svg.width();var r=e.svg.height();i.elem("mask",{x:0,y:0,width:s,height:r,id:t.maskNames.aboveThreshold}).elem("rect",{x:0,y:0,width:s,height:n,fill:"white"});i.elem("mask",{x:0,y:0,width:s,height:r,id:t.maskNames.belowThreshold}).elem("rect",{x:0,y:n,width:s,height:r-n,fill:"white"});return i}i.plugins=i.plugins||{};i.plugins.ctThreshold=function(e){e=i.extend({},n,e);if(e.threshold===-1){return function e(){}}return function t(n){if(n instanceof i.Line||n instanceof i.Bar){n.on("draw",function(t){if(t.type==="point"){t.element.addClass(t.value.y>=e.threshold?e.classNames.aboveThreshold:e.classNames.belowThreshold)}else if(t.type==="line"||t.type==="bar"||t.type==="area"){t.element.parent().elem(t.element._node.cloneNode(true)).attr({mask:"url(#"+e.maskNames.aboveThreshold+")"}).addClass(e.classNames.aboveThreshold);t.element.attr({mask:"url(#"+e.maskNames.belowThreshold+")"}).addClass(e.classNames.belowThreshold)}});n.on("created",function(t){s(t,e)})}}}})(window,document,e);return e.plugins.ctThreshold});

/*!
 * $.fn.scrollIntoView 0.3
 * Copyright 2013 Arwid Bancewicz (http://arwid.ca)
 * Licensed under MIT
 */
(function(e){e.fn.scrollIntoView=function(t,o,l){var n=e.extend({},e.fn.scrollIntoView.defaults);if(e.type(t)=="object"){e.extend(n,t)}else if(e.type(t)=="number"){e.extend(n,{duration:t,easing:o,complete:l})}else if(t==false){n.smooth=false}var i=Infinity,s=0;if(this.length==1)(i=this.get(0).offsetTop)==null||(s=i+this.get(0).offsetHeight);else this.each(function(e,t){t.offsetTop<i?i=t.offsetTop:t.offsetTop+t.offsetHeight>s?s=t.offsetTop+t.offsetHeight:null});s-=i;var f=this.commonAncestor().get(0);var r=e(window).height();while(f){var c=f.scrollTop,a=f.clientHeight;if(a>r)a=r;if(a==0&&f.tagName=="BODY")a=r;if(f.scrollTop!=((f.scrollTop+=1)==null||f.scrollTop)&&(f.scrollTop-=1)!=null||f.scrollTop!=((f.scrollTop-=1)==null||f.scrollTop)&&(f.scrollTop+=1)!=null){if(i<=c)u(f,i);else if(i+s>c+a)u(f,i+s-a);else u(f,undefined);return}f=f.parentNode}function u(t,o){if(o===undefined){if(e.isFunction(n.complete))n.complete.call(t)}else if(n.smooth){e(t).stop().animate({scrollTop:o},n)}else{t.scrollTop=o;if(e.isFunction(n.complete))n.complete.call(t)}}return this};e.fn.scrollIntoView.defaults={smooth:true,duration:null,easing:e.easing&&e.easing.easeOutExpo?"easeOutExpo":null,complete:e.noop(),step:null,specialEasing:{}};e.fn.isOutOfView=function(e){var t=true;this.each(function(){var o=this.parentNode,l=o.scrollTop,n=o.clientHeight,i=this.offsetTop,s=this.offsetHeight;if(e?i>l+n:i+s>l+n){}else if(e?i+s<l:i<l){}else t=false});return t};e.fn.commonAncestor=function(){var t=[];var o=Infinity;e(this).each(function(){var l=e(this).parents();t.push(l);o=Math.min(o,l.length)});for(var l=0;l<t.length;l++){t[l]=t[l].slice(t[l].length-o)}for(var l=0;l<t[0].length;l++){var n=true;for(var i in t){if(t[i][l]!=t[0][l]){n=false;break}}if(n)return e(t[0][l])}return e([])}})(jQuery);

/*!
 * bootbox.js v4.4.0 (https://github.com/makeusabrew/bootbox)
 * Copyright 2011-2020 Nick Payne <nick@kurai.co.uk>
 * Licensed under MIT (https://github.com/makeusabrew/bootbox/blob/master/LICENSE.md)
 */
(function(t,e){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e(require("jquery"))}else{t.bootbox=e(t.jQuery)}})(this,function t(e,o){"use strict";var a={dialog:"<div class='bootbox modal' tabindex='-1' role='dialog'>"+"<div class='modal-dialog'>"+"<div class='modal-content'>"+"<div class='modal-body'><div class='bootbox-body'></div></div>"+"</div>"+"</div>"+"</div>",header:"<div class='modal-header'>"+"<h4 class='modal-title'></h4>"+"</div>",footer:"<div class='modal-footer'></div>",closeButton:"<button type='button' class='bootbox-close-button close' data-dismiss='modal' aria-hidden='true'>&times;</button>",form:"<form class='bootbox-form'></form>",inputs:{text:"<input class='bootbox-input bootbox-input-text form-control' autocomplete=off autocorrect=off type=text />",textarea:"<textarea class='bootbox-input bootbox-input-textarea form-control'></textarea>",email:"<input class='bootbox-input bootbox-input-email form-control' autocomplete='off' autocorrect='off' type='email' />",select:"<select class='bootbox-input bootbox-input-select form-control'></select>",checkbox:"<div class='checkbox'><label><input class='bootbox-input bootbox-input-checkbox' type='checkbox' /></label></div>",date:"<input class='bootbox-input bootbox-input-date form-control' autocomplete=off autocorrect=off type='date' />",time:"<input class='bootbox-input bootbox-input-time form-control' autocomplete=off autocorrect=off type='time' />",number:"<input class='bootbox-input bootbox-input-number form-control' autocomplete=off autocorrect=off type='number' />",password:"<input class='bootbox-input bootbox-input-password form-control' autocomplete='off' autocorrect='off' type='password' />"}};var n={locale:"en",backdrop:"static",animate:true,className:null,closeButton:true,show:true,container:"body"};var r={};function i(t){var e=C[n.locale];return e?e[t]:C.en[t]}function l(t,o,a){t.stopPropagation();t.preventDefault();var n=e.isFunction(a)&&a.call(o,t)===false;if(!n){o.modal("hide")}}function c(t){var e,o=0;for(e in t){o++}return o}function s(t,o){var a=0;e.each(t,function(t,e){o(t,e,a++)})}function u(t){var o;var a;if(typeof t!=="object"){throw new Error("Please supply an object of options")}if(!t.message){throw new Error("Please specify a message")}t=e.extend({},n,t);if(!t.buttons){t.buttons={}}o=t.buttons;a=c(o);s(o,function(t,n,r){if(e.isFunction(n)){n=o[t]={callback:n}}if(e.type(n)!=="object"){throw new Error("button with key "+t+" must be an object")}if(!n.label){n.label=t}if(!n.className){if(a<=2&&r===a-1){n.className="btn-primary"}else{n.className="btn-default"}}});return t}function f(t,e){var o=t.length;var a={};if(o<1||o>2){throw new Error("Invalid argument length")}if(o===2||typeof t[0]==="string"){a[e[0]]=t[0];a[e[1]]=t[1]}else{a=t[0]}return a}function p(t,o,a){return e.extend(true,{},t,f(o,a))}function b(t,e,o,a){var n={className:"bootbox-"+t,buttons:d.apply(null,e)};return m(p(n,a,o),e)}function d(){var t={};for(var e=0,o=arguments.length;e<o;e++){var a=arguments[e];var n=a.toLowerCase();var r=a.toUpperCase();t[n]={label:i(r)}}return t}function m(t,e){var a={};s(e,function(t,e){a[e]=true});s(t.buttons,function(t){if(a[t]===o){throw new Error("button key "+t+" is not allowed (options are "+e.join("\n")+")")}});return t}r.alert=function(){var t;t=b("alert",["ok"],["message","callback"],arguments);if(t.callback&&!e.isFunction(t.callback)){throw new Error("alert requires callback property to be a function when provided")}t.buttons.ok.callback=t.onEscape=function(){if(e.isFunction(t.callback)){return t.callback.call(this)}return true};return r.dialog(t)};r.confirm=function(){var t;t=b("confirm",["cancel","confirm"],["message","callback"],arguments);t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,false)};t.buttons.confirm.callback=function(){return t.callback.call(this,true)};if(!e.isFunction(t.callback)){throw new Error("confirm requires a callback")}return r.dialog(t)};r.prompt=function(){var t;var n;var i;var l;var c;var u;var f;l=e(a.form);n={className:"bootbox-prompt",buttons:d("cancel","confirm"),value:"",inputType:"text"};t=m(p(n,arguments,["title","callback"]),["cancel","confirm"]);u=t.show===o?true:t.show;t.message=l;t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,null)};t.buttons.confirm.callback=function(){var o;switch(t.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":o=c.val();break;case"checkbox":var a=c.find("input:checked");o=[];s(a,function(t,a){o.push(e(a).val())});break}return t.callback.call(this,o)};t.show=false;if(!t.title){throw new Error("prompt requires a title")}if(!e.isFunction(t.callback)){throw new Error("prompt requires a callback")}if(!a.inputs[t.inputType]){throw new Error("invalid prompt type")}c=e(a.inputs[t.inputType]);switch(t.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":c.val(t.value);break;case"select":var b={};f=t.inputOptions||[];if(!e.isArray(f)){throw new Error("Please pass an array of input options")}if(!f.length){throw new Error("prompt with select requires options")}s(f,function(t,a){var n=c;if(a.value===o||a.text===o){throw new Error("given options in wrong format")}if(a.group){if(!b[a.group]){b[a.group]=e("<optgroup/>").attr("label",a.group)}n=b[a.group]}n.append("<option value='"+a.value+"'>"+a.text+"</option>")});s(b,function(t,e){c.append(e)});c.val(t.value);break;case"checkbox":var C=e.isArray(t.value)?t.value:[t.value];f=t.inputOptions||[];if(!f.length){throw new Error("prompt with checkbox requires options")}if(!f[0].value||!f[0].text){throw new Error("given options in wrong format")}c=e("<div/>");s(f,function(o,n){var r=e(a.inputs[t.inputType]);r.find("input").attr("value",n.value);r.find("label").append(n.text);s(C,function(t,e){if(e===n.value){r.find("input").prop("checked",true)}});c.append(r)});break}if(t.placeholder){c.attr("placeholder",t.placeholder)}if(t.pattern){c.attr("pattern",t.pattern)}if(t.maxlength){c.attr("maxlength",t.maxlength)}l.append(c);l.on("submit",function(t){t.preventDefault();t.stopPropagation();i.find(".btn-primary").click()});i=r.dialog(t);i.off("shown.bs.modal");i.on("shown.bs.modal",function(){c.focus()});if(u===true){i.modal("show")}return i};r.dialog=function(t){t=u(t);var n=e(a.dialog);var r=n.find(".modal-dialog");var i=n.find(".modal-body");var c=t.buttons;var f="";var p={onEscape:t.onEscape};if(e.fn.modal===o){throw new Error("$.fn.modal is not defined; please double check you have included "+"the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ "+"for more details.")}s(c,function(t,e){f+="<button data-bb-handler='"+t+"' type='button' class='btn "+e.className+"'>"+e.label+"</button>";p[t]=e.callback});i.find(".bootbox-body").html(t.message);if(t.animate===true){n.addClass("fade")}if(t.className){n.addClass(t.className)}if(t.size==="large"){r.addClass("modal-lg")}else if(t.size==="small"){r.addClass("modal-sm")}if(t.title){i.before(a.header)}if(t.closeButton){var b=e(a.closeButton);if(t.title){n.find(".modal-header").prepend(b)}else{b.css("margin-top","-10px").prependTo(i)}}if(t.title){n.find(".modal-title").html(t.title)}if(f.length){i.after(a.footer);n.find(".modal-footer").html(f)}n.on("hidden.bs.modal",function(t){if(t.target===this){n.remove()}});n.on("shown.bs.modal",function(){n.find(".btn-primary:first").focus()});if(t.backdrop!=="static"){n.on("click.dismiss.bs.modal",function(t){if(n.children(".modal-backdrop").length){t.currentTarget=n.children(".modal-backdrop").get(0)}if(t.target!==t.currentTarget){return}n.trigger("escape.close.bb")})}n.on("escape.close.bb",function(t){if(p.onEscape){l(t,n,p.onEscape)}});n.on("click",".modal-footer button",function(t){var o=e(this).data("bb-handler");l(t,n,p[o])});n.on("click",".bootbox-close-button",function(t){l(t,n,p.onEscape)});n.on("keyup",function(t){if(t.which===27){n.trigger("escape.close.bb")}});e(t.container).append(n);n.modal({backdrop:t.backdrop?"static":false,keyboard:false,show:false});if(t.show){n.modal("show")}return n};r.setDefaults=function(){var t={};if(arguments.length===2){t[arguments[0]]=arguments[1]}else{t=arguments[0]}e.extend(n,t)};r.hideAll=function(){e(".bootbox").modal("hide");return r};var C={bg_BG:{OK:"Ок",CANCEL:"Отказ",CONFIRM:"Потвърждавам"},br:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Sim"},cs:{OK:"OK",CANCEL:"Zrušit",CONFIRM:"Potvrdit"},da:{OK:"OK",CANCEL:"Annuller",CONFIRM:"Accepter"},de:{OK:"OK",CANCEL:"Abbrechen",CONFIRM:"Akzeptieren"},el:{OK:"Εντάξει",CANCEL:"Ακύρωση",CONFIRM:"Επιβεβαίωση"},en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},es:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Aceptar"},et:{OK:"OK",CANCEL:"Katkesta",CONFIRM:"OK"},fa:{OK:"قبول",CANCEL:"لغو",CONFIRM:"تایید"},fi:{OK:"OK",CANCEL:"Peruuta",CONFIRM:"OK"},fr:{OK:"OK",CANCEL:"Annuler",CONFIRM:"D'accord"},he:{OK:"אישור",CANCEL:"ביטול",CONFIRM:"אישור"},hu:{OK:"OK",CANCEL:"Mégsem",CONFIRM:"Megerősít"},hr:{OK:"OK",CANCEL:"Odustani",CONFIRM:"Potvrdi"},id:{OK:"OK",CANCEL:"Batal",CONFIRM:"OK"},it:{OK:"OK",CANCEL:"Annulla",CONFIRM:"Conferma"},ja:{OK:"OK",CANCEL:"キャンセル",CONFIRM:"確認"},lt:{OK:"Gerai",CANCEL:"Atšaukti",CONFIRM:"Patvirtinti"},lv:{OK:"Labi",CANCEL:"Atcelt",CONFIRM:"Apstiprināt"},nl:{OK:"OK",CANCEL:"Annuleren",CONFIRM:"Accepteren"},no:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},pl:{OK:"OK",CANCEL:"Anuluj",CONFIRM:"Potwierdź"},pt:{OK:"OK",CANCEL:"Cancelar",CONFIRM:"Confirmar"},ru:{OK:"OK",CANCEL:"Отмена",CONFIRM:"Применить"},sq:{OK:"OK",CANCEL:"Anulo",CONFIRM:"Prano"},sv:{OK:"OK",CANCEL:"Avbryt",CONFIRM:"OK"},th:{OK:"ตกลง",CANCEL:"ยกเลิก",CONFIRM:"ยืนยัน"},tr:{OK:"Tamam",CANCEL:"İptal",CONFIRM:"Onayla"},zh_CN:{OK:"OK",CANCEL:"取消",CONFIRM:"确认"},zh_TW:{OK:"OK",CANCEL:"取消",CONFIRM:"確認"}};r.addLocale=function(t,o){e.each(["OK","CANCEL","CONFIRM"],function(t,e){if(!o[e]){throw new Error("Please supply a translation for '"+e+"'")}});C[t]={OK:o.OK,CANCEL:o.CANCEL,CONFIRM:o.CONFIRM};return r};r.removeLocale=function(t){delete C[t];return r};r.setLocale=function(t){return r.setDefaults("locale",t)};r.init=function(o){return t(o||e)};return r});

/*!
 * Bootstrap Tags Input v0.8.0 (https://github.com/bootstrap-tagsinput/bootstrap-tagsinput)
 * Copyright 2013 Tim Schlechter
 * Licensed under MIT (https://github.com/bootstrap-tagsinput/bootstrap-tagsinput/blob/master/LICENSE)
 */
(function(e){"use strict";var t={tagClass:function(e){return"label label-info"},itemValue:function(e){return e?e.toString():e},itemText:function(e){return this.itemValue(e)},itemTitle:function(e){return null},freeInput:true,addOnBlur:true,maxTags:undefined,maxChars:undefined,confirmKeys:[13,44],delimiter:",",delimiterRegex:null,cancelConfirmKeysOnEmpty:true,onTagExists:function(e,t){t.hide().fadeIn()},trimValue:false,allowDuplicates:false};function i(t,i){this.itemsArray=[];this.$element=e(t);this.$element.hide();this.isSelect=t.tagName==="SELECT";this.multiple=this.isSelect&&t.hasAttribute("multiple");this.objectItems=i&&i.itemValue;this.placeholderText=t.hasAttribute("placeholder")?this.$element.attr("placeholder"):"";this.inputSize=Math.max(1,this.placeholderText.length);this.$container=e('<div class="bootstrap-tagsinput"></div>');this.$input=e('<input type="text" placeholder="'+this.placeholderText+'"/>').appendTo(this.$container);this.$element.before(this.$container);this.build(i)}i.prototype={constructor:i,add:function(t,i,n){var a=this;var r=t;if(typeof t==="string"){t=t.replace(/\[em\]/g,"").replace(/\[\/em\]/g,"").replace(/\[i.*\]/g,"").replace(/\[\/i\]/g,"")}if(a.options.maxTags&&a.itemsArray.length>=a.options.maxTags)return;if(t!==false&&!t)return;if(typeof t==="string"&&a.options.trimValue){t=e.trim(t)}if(typeof t==="object"&&!a.objectItems)throw"Can't add objects when itemValue option is not set";if(t.toString().match(/^\s*$/))return;if(a.isSelect&&!a.multiple&&a.itemsArray.length>0)a.remove(a.itemsArray[0]);if(typeof t==="string"&&this.$element[0].tagName==="INPUT"){var s=a.options.delimiterRegex?a.options.delimiterRegex:a.options.delimiter;var l=t.split(s);if(l.length>1){for(var u=0;u<l.length;u++){this.add(l[u],true)}if(!i)a.pushVal();return}}var p=a.options.itemValue(t),c=a.options.itemText(r),f=a.options.tagClass(t),m=a.options.itemTitle(t);var h=e.grep(a.itemsArray,function(e){return a.options.itemValue(e)===p})[0];if(h&&!a.options.allowDuplicates){if(a.options.onTagExists){var d=e(".tag",a.$container).filter(function(){return e(this).data("item")===h});a.options.onTagExists(t,d)}return}if(a.items().toString().length+t.length+1>a.options.maxInputLength)return;var g=e.Event("beforeItemAdd",{item:t,cancel:false,options:n});a.$element.trigger(g);if(g.cancel)return;a.itemsArray.push(t);var v=/^\S+@\S+\.\S+$/,y=a.$element.attr("id");if(v.test(c)&&y&&y.match(/c-(.*?)-\d+/)){c=" <"+c+">"}var $="";if(c.match(/^\s+<.*?>$/)){$='<span class="invisible">i</span>'}var x=e('<span class="tag '+o(f)+(m!==null?'" title="'+m:"")+'">'+$+""+o(c)+'<span data-role="remove"></span></span>');x.data("item",t);a.findInputWrapper().before(x);x.after(" ");if(a.isSelect&&!e('option[value="'+encodeURIComponent(p)+'"]',a.$element)[0]){var b=e("<option selected>"+o(c)+"</option>");b.data("item",t);b.attr("value",p);a.$element.append(b)}if(!i)a.pushVal();if(a.options.maxTags===a.itemsArray.length||a.items().toString().length===a.options.maxInputLength)a.$container.addClass("bootstrap-tagsinput-max");a.$element.trigger(e.Event("itemAdded",{item:t,options:n}))},remove:function(t,i,n){var a=this;if(a.objectItems){if(typeof t==="object")t=e.grep(a.itemsArray,function(e){return a.options.itemValue(e)==a.options.itemValue(t)});else t=e.grep(a.itemsArray,function(e){return a.options.itemValue(e)==t});t=t[t.length-1]}if(t){var r=a.recentlyDeleted?[t,a.recentlyDeleted]:t;var o=e.Event("beforeItemRemove",{item:r,cancel:false,options:n});a.$element.trigger(o);if(o.cancel)return;if(a.recentlyDeleted){e(".tag",a.$container).filter(function(){return e(this).data("item")===t&&e(this).attr("data-reference")===a.recentlyDeleted}).remove()}else{e(".tag",a.$container).filter(function(){return e(this).data("item")===t}).remove()}e("option",a.$element).filter(function(){return e(this).data("item")===t}).remove();if(e.inArray(t,a.itemsArray)!==-1)a.itemsArray.splice(e.inArray(t,a.itemsArray),1)}if(!i)a.pushVal();if(a.options.maxTags>a.itemsArray.length)a.$container.removeClass("bootstrap-tagsinput-max");var s=a.recentlyDeleted?[t,a.recentlyDeleted]:t;a.$element.trigger(e.Event("itemRemoved",{item:s,options:n}))},removeAll:function(){var t=this;e(".tag",t.$container).remove();e("option",t.$element).remove();while(t.itemsArray.length>0)t.itemsArray.pop();t.pushVal()},refresh:function(){var t=this;e(".tag",t.$container).each(function(){var i=e(this),n=i.data("item"),a=t.options.itemValue(n),r=t.options.itemText(n),s=t.options.tagClass(n);i.attr("class",null);i.addClass("tag "+o(s));i.contents().filter(function(){return this.nodeType==3})[0].nodeValue=o(r);if(t.isSelect){var l=e("option",t.$element).filter(function(){return e(this).data("item")===n});l.attr("value",a)}})},items:function(){return this.itemsArray},pushVal:function(){var t=this,i=e.map(t.items(),function(e){return t.options.itemValue(e).toString()});t.$element.val(i,true).trigger("change")},build:function(i){var r=this;r.options=e.extend({},t,i);if(r.objectItems)r.options.freeInput=false;n(r.options,"itemValue");n(r.options,"itemText");a(r.options,"tagClass");if(r.options.typeahead){var o=r.options.typeahead||{};a(o,"source");r.$input.typeahead(e.extend({},o,{source:function(t,i){function n(e){var t=[];for(var n=0;n<e.length;n++){var o=r.options.itemText(e[n]);a[o]=e[n];t.push(o)}i(t)}this.map={};var a=this.map,s=o.source(t);if(e.isFunction(s.success)){s.success(n)}else if(e.isFunction(s.then)){s.then(n)}else{e.when(s).then(n)}},updater:function(e){r.add(this.map[e]);return this.map[e]},matcher:function(e){return e.toLowerCase().indexOf(this.query.trim().toLowerCase())!==-1},sorter:function(e){return e.sort()},highlighter:function(e){var t=new RegExp("("+this.query+")","gi");return e.replace(t,"<strong>$1</strong>")}}))}if(r.options.typeaheadjs){var u=null;var p={};var c=r.options.typeaheadjs;if(e.isArray(c)){u=c[0];p=c[1]}else{p=c}r.$input.typeahead(u,p).on("typeahead:selected",e.proxy(function(e,t){if(p.valueKey)r.add(t[p.valueKey]);else r.add(t);r.$input.typeahead("val","")},r))}r.$container.on("click",e.proxy(function(e){if(!r.$element.attr("disabled")){r.$input.removeAttr("disabled")}r.$input.focus()},r));if(r.options.addOnBlur&&r.options.freeInput){r.$input.on("focusout",e.proxy(function(t){if(e(".typeahead, .twitter-typeahead",r.$container).length===0){r.add(r.$input.val());r.$input.val("")}},r))}r.$container.on("keydown","input",e.proxy(function(t){var i=e(t.target),n=r.findInputWrapper();if(r.$element.attr("disabled")){r.$input.attr("disabled","disabled");return}switch(t.which){case 8:if(s(i[0])===0){var a=n.prev();if(a.length){r.remove(a.data("item"))}}break;case 46:if(s(i[0])===0){var o=n.next();if(o.length){r.remove(o.data("item"))}}break;case 37:var l=n.prev();if(i.val().length===0&&l[0]){l.before(n);i.focus()}break;case 39:var u=n.next();if(i.val().length===0&&u[0]){u.after(n);i.focus()}break;default:}var p=i.val().length,c=Math.ceil(p/5),f=p+c+1;i.attr("size",Math.max(this.inputSize,i.val().length))},r));r.$container.on("keypress","input",e.proxy(function(t){var i=e(t.target);if(r.$element.attr("disabled")){r.$input.attr("disabled","disabled");return}var n=i.val(),a=r.options.maxChars&&n.length>=r.options.maxChars;if(r.options.freeInput&&(l(t,r.options.confirmKeys)||a)){if(n.length!==0){r.add(a?n.substr(0,r.options.maxChars):n);i.val("")}if(r.options.cancelConfirmKeysOnEmpty===false){t.preventDefault()}}var o=i.val().length,s=Math.ceil(o/5),u=o+s+1;i.attr("size",Math.max(this.inputSize,i.val().length))},r));r.$container.on("click","[data-role=remove]",e.proxy(function(t){if(r.$element.attr("disabled")){return}r.recentlyDeleted=e(t.target).closest(".tag").attr("data-reference")||0;r.remove(e(t.target).closest(".tag").data("item"))},r));if(r.options.itemValue===t.itemValue){if(r.$element[0].tagName==="INPUT"){r.add(r.$element.val())}else{e("option",r.$element).each(function(){r.add(e(this).attr("value"),true)})}}},destroy:function(){var e=this;e.$container.off("keypress","input");e.$container.off("click","[role=remove]");e.$container.remove();e.$element.removeData("tagsinput");e.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){var t=this.$input[0],i=this.$container[0];while(t&&t.parentNode!==i)t=t.parentNode;return e(t)}};e.fn.tagsinput=function(t,n,a){var r=[];this.each(function(){var o=e(this).data("tagsinput");if(!o){o=new i(this,t);e(this).data("tagsinput",o);r.push(o);if(this.tagName==="SELECT"){e("option",e(this)).attr("selected","selected")}e(this).val(e(this).val())}else if(!t&&!n){r.push(o)}else if(o[t]!==undefined){if(o[t].length===3&&a!==undefined){var s=o[t](n,null,a)}else{var s=o[t](n)}if(s!==undefined)r.push(s)}});if(typeof t=="string"){return r.length>1?r:r[0]}else{return r}};e.fn.tagsinput.Constructor=i;function n(e,t){if(typeof e[t]!=="function"){var i=e[t];e[t]=function(e){return e[i]}}}function a(e,t){if(typeof e[t]!=="function"){var i=e[t];e[t]=function(){return i}}}var r=e("<div />");function o(e){if(e){var t=r.text(e).html();t=t.replace(/\[em\]/g,"<em>").replace(/\[\/em\]/g,"</em>").replace(/\[i/g,"<i").replace(/\"\]/g,'">').replace(/\[\/i\]/g,"</i>");return t}else{return""}}function s(e){var t=0;if(document.selection){e.focus();var i=document.selection.createRange();i.moveStart("character",-e.value.length);t=i.text.length}else if(e.selectionStart||e.selectionStart=="0"){t=e.selectionStart}return t}function l(t,i){var n=false;e.each(i,function(e,i){if(typeof i==="number"&&t.which===i){n=true;return false}if(t.which===i.which){var a=!i.hasOwnProperty("altKey")||t.altKey===i.altKey,r=!i.hasOwnProperty("shiftKey")||t.shiftKey===i.shiftKey,o=!i.hasOwnProperty("ctrlKey")||t.ctrlKey===i.ctrlKey;if(a&&r&&o){n=true;return false}}});return n}e(function(){e("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput()})})(window.jQuery);

/*!
 * Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker)
 * Copyright 2019 Andrew Rowls
 * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
 */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e,t){function a(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return a(e.getFullYear(),e.getMonth(),e.getDate())}function s(e,t){return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCDate()===t.getUTCDate()}function n(a,i){return function(){return i!==t&&e.fn.datepicker.deprecated(i),this[a].apply(this,arguments)}}function r(e){return e&&!isNaN(e.getTime())}function o(t,a){function i(e,t){return t.toLowerCase()}var s,n=e(t).data(),r={},o=new RegExp("^"+a.toLowerCase()+"([A-Z])");a=new RegExp("^"+a.toLowerCase());for(var h in n)a.test(h)&&(s=h.replace(o,i),r[s]=n[h]);return r}function h(t){var a={};if(m[t]||(t=t.split("-")[0],m[t])){var i=m[t];return e.each(g,function(e,t){t in i&&(a[t]=i[t])}),a}}var d=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){for(var t=e&&e.valueOf(),a=0,i=this.length;a<i;a++)if(0<=this[a].valueOf()-t&&this[a].valueOf()-t<864e5)return a;return-1},remove:function(e){this.splice(e,1)},replace:function(t){t&&(e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var e=new d;return e.replace(this),e}};return function(){var a=[];return a.push.apply(a,arguments),e.extend(a,t),a}}(),l=function(t,a){e.data(t,"datepicker",this),this._events=[],this._secondaryEvents=[],this._process_options(a),this.dates=new d,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=e(t),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=e(y.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(e,t){return Number(t)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};l.prototype={constructor:l,_resolveViewName:function(t){return e.each(y.viewModes,function(a,i){if(t===a||-1!==e.inArray(t,i.names))return t=a,!1}),t},_resolveDaysOfWeek:function(t){return e.isArray(t)||(t=t.split(/[,\s]*/)),e.map(t,Number)},_check_template:function(a){try{if(a===t||""===a)return!1;if((a.match(/[<>]/g)||[]).length<=0)return!0;return e(a).length>0}catch(e){return!1}},_process_options:function(t){this._o=e.extend({},this._o,t);var s=this.o=e.extend({},this._o),n=s.language;m[n]||(n=n.split("-")[0],m[n]||(n=f.language)),s.language=n,s.startView=this._resolveViewName(s.startView),s.minViewMode=this._resolveViewName(s.minViewMode),s.maxViewMode=this._resolveViewName(s.maxViewMode),s.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,s.startView)),!0!==s.multidate&&(s.multidate=Number(s.multidate)||!1,!1!==s.multidate&&(s.multidate=Math.max(0,s.multidate))),s.multidateSeparator=String(s.multidateSeparator),s.weekStart%=7,s.weekEnd=(s.weekStart+6)%7;var r=y.parseFormat(s.format);s.startDate!==-1/0&&(s.startDate?s.startDate instanceof Date?s.startDate=this._local_to_utc(this._zero_time(s.startDate)):s.startDate=y.parseDate(s.startDate,r,s.language,s.assumeNearbyYear):s.startDate=-1/0),s.endDate!==1/0&&(s.endDate?s.endDate instanceof Date?s.endDate=this._local_to_utc(this._zero_time(s.endDate)):s.endDate=y.parseDate(s.endDate,r,s.language,s.assumeNearbyYear):s.endDate=1/0),s.daysOfWeekDisabled=this._resolveDaysOfWeek(s.daysOfWeekDisabled||[]),s.daysOfWeekHighlighted=this._resolveDaysOfWeek(s.daysOfWeekHighlighted||[]),s.datesDisabled=s.datesDisabled||[],e.isArray(s.datesDisabled)||(s.datesDisabled=s.datesDisabled.split(",")),s.datesDisabled=e.map(s.datesDisabled,function(e){return y.parseDate(e,r,s.language,s.assumeNearbyYear)});var o=String(s.orientation).toLowerCase().split(/\s+/g),h=s.orientation.toLowerCase();if(o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),s.orientation={x:"auto",y:"auto"},h&&"auto"!==h)if(1===o.length)switch(o[0]){case"top":case"bottom":s.orientation.y=o[0];break;case"left":case"right":s.orientation.x=o[0]}else h=e.grep(o,function(e){return/^left|right$/.test(e)}),s.orientation.x=h[0]||"auto",h=e.grep(o,function(e){return/^top|bottom$/.test(e)}),s.orientation.y=h[0]||"auto";else;if(s.defaultViewDate instanceof Date||"string"==typeof s.defaultViewDate)s.defaultViewDate=y.parseDate(s.defaultViewDate,r,s.language,s.assumeNearbyYear);else if(s.defaultViewDate){var d=s.defaultViewDate.year||(new Date).getFullYear(),l=s.defaultViewDate.month||0,u=s.defaultViewDate.day||1;s.defaultViewDate=a(d,l,u)}else s.defaultViewDate=i()},_applyEvents:function(e){for(var a,i,s,n=0;n<e.length;n++)a=e[n][0],2===e[n].length?(i=t,s=e[n][1]):3===e[n].length&&(i=e[n][1],s=e[n][2]),a.on(s,i)},_unapplyEvents:function(e){for(var a,i,s,n=0;n<e.length;n++)a=e[n][0],2===e[n].length?(s=t,i=e[n][1]):3===e[n].length&&(s=e[n][1],i=e[n][2]),a.off(i,s)},_buildEvents:function(){var t={keyup:e.proxy(function(t){-1===e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:e.proxy(this.keydown,this),paste:e.proxy(this.paste,this)};!0===this.o.showOnFocus&&(t.focus=e.proxy(this.show,this)),this.isInput?this._events=[[this.element,t]]:this.component&&this.inputField.length?this._events=[[this.inputField,t],[this.component,{click:e.proxy(this.show,this)}]]:this._events=[[this.element,{click:e.proxy(this.show,this),keydown:e.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":e.proxy(function(e){this.update(e.date)},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[this.picker,".prev, .next",{click:e.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:e.proxy(this.dayCellClick,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,a){var i=a||this.dates.get(-1),s=this._utc_to_local(i);this.element.trigger({type:t,date:s,viewMode:this.viewMode,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){0===arguments.length?(e=this.dates.length-1,t=this.o.format):"string"==typeof e&&(t=e,e=this.dates.length-1),t=t||this.o.format;var a=this.dates.get(e);return y.formatDate(a,t,this.o.language)},this)})},show:function(){if(!(this.inputField.is(":disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&e(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var a;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==e.inArray("text/plain",t.originalEvent.clipboardData.types))a=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;a=window.clipboardData.getData("Text")}this.setDate(a),this.update(),t.preventDefault()},_utc_to_local:function(e){if(!e)return e;var t=new Date(e.getTime()+6e4*e.getTimezoneOffset());return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(t=new Date(e.getTime()+6e4*t.getTimezoneOffset())),t},_local_to_utc:function(e){return e&&new Date(e.getTime()-6e4*e.getTimezoneOffset())},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&a(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var e=this.dates.get(-1);return e!==t?new Date(e):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,e.map(t,this._utc_to_local)),this},setDate:n("setDates"),setUTCDate:n("setUTCDates"),remove:n("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var e=this.getFormattedDate();return this.inputField.val(e),this},getFormattedDate:function(a){a===t&&(a=this.o.format);var i=this.o.language;return e.map(this.dates,function(e){return y.formatDate(e,a,i)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(e){return this._process_options({startDate:e}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(e){return this._process_options({endDate:e}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(e){return this._process_options({daysOfWeekDisabled:e}),this.update(),this},setDaysOfWeekHighlighted:function(e){return this._process_options({daysOfWeekHighlighted:e}),this.update(),this},setDatesDisabled:function(e){return this._process_options({datesDisabled:e}),this.update(),this},place:function(){if(this.isInline)return this;var t=this.picker.outerWidth(),a=this.picker.outerHeight(),i=e(this.o.container),s=i.width(),n="body"===this.o.container?e(document).scrollTop():i.scrollTop(),r=i.offset(),o=[0];this.element.parents().each(function(){var t=e(this).css("z-index");"auto"!==t&&0!==Number(t)&&o.push(Number(t))});var h=Math.max.apply(Math,o)+this.o.zIndexOffset,d=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),u=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),c=d.left-r.left,p=d.top-r.top;"body"!==this.o.container&&(p+=n),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(c-=t-u)):d.left<0?(this.picker.addClass("datepicker-orient-left"),c-=d.left-10):c+t>s?(this.picker.addClass("datepicker-orient-right"),c+=u-t):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var f,g=this.o.orientation.y;if("auto"===g&&(f=-n+p-a,g=f<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+g),"top"===g?p-=a+parseInt(this.picker.css("padding-top")):p+=l,this.o.rtl){var m=s-(c+u);this.picker.css({top:p,right:m,zIndex:h})}else this.picker.css({top:p,left:c,zIndex:h});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),a=[],i=!1;return arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),a.push(t)},this)),i=!0):(a=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),a=a&&this.o.multidate?a.split(this.o.multidateSeparator):[a],delete this.element.data().date),a=e.map(a,e.proxy(function(e){return y.parseDate(e,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),a=e.grep(a,e.proxy(function(e){return!this.dateWithinRange(e)||!e},this),!0),this.dates.replace(a),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),i?(this.setValue(),this.element.change()):this.dates.length&&String(t)!==String(this.dates)&&i&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&t.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var t=this.o.weekStart,a="<tr>";for(this.o.calendarWeeks&&(a+='<th class="cw">&#160;</th>');t<this.o.weekStart+7;)a+='<th class="dow',-1!==e.inArray(t,this.o.daysOfWeekDisabled)&&(a+=" disabled"),a+='">'+m[this.o.language].daysMin[t++%7]+"</th>";a+="</tr>",this.picker.find(".datepicker-days thead").append(a)}},fillMonths:function(){for(var e,t=this._utc_to_local(this.viewDate),a="",i=0;i<12;i++)e=t&&t.getMonth()===i?" focused":"",a+='<span class="month'+e+'">'+m[this.o.language].monthsShort[i]+"</span>";this.picker.find(".datepicker-months td").html(a)},setRange:function(t){t&&t.length?this.range=e.map(t,function(e){return e.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var a=[],n=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),o=i();return t.getUTCFullYear()<n||t.getUTCFullYear()===n&&t.getUTCMonth()<r?a.push("old"):(t.getUTCFullYear()>n||t.getUTCFullYear()===n&&t.getUTCMonth()>r)&&a.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&a.push("focused"),this.o.todayHighlight&&s(t,o)&&a.push("today"),-1!==this.dates.contains(t)&&a.push("active"),this.dateWithinRange(t)||a.push("disabled"),this.dateIsDisabled(t)&&a.push("disabled","disabled-date"),-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&a.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&a.push("range"),-1!==e.inArray(t.valueOf(),this.range)&&a.push("selected"),t.valueOf()===this.range[0]&&a.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&a.push("range-end")),a},_fill_yearsView:function(a,i,s,n,r,o,h){for(var d,l,u,c="",p=s/10,f=this.picker.find(a),g=Math.floor(n/s)*s,m=g+9*p,y=Math.floor(this.viewDate.getFullYear()/p)*p,D=e.map(this.dates,function(e){return Math.floor(e.getUTCFullYear()/p)*p}),v=g-p;v<=m+p;v+=p)d=[i],l=null,v===g-p?d.push("old"):v===m+p&&d.push("new"),-1!==e.inArray(v,D)&&d.push("active"),(v<r||v>o)&&d.push("disabled"),v===y&&d.push("focused"),h!==e.noop&&(u=h(new Date(v,0,1)),u===t?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&d.push("disabled"),u.classes&&(d=d.concat(u.classes.split(/\s+/))),u.tooltip&&(l=u.tooltip)),c+='<span class="'+d.join(" ")+'"'+(l?' title="'+l+'"':"")+">"+v+"</span>";f.find(".datepicker-switch").text(g+"-"+m),f.find("td").html(c)},fill:function(){var s,n,r=new Date(this.viewDate),o=r.getUTCFullYear(),h=r.getUTCMonth(),d=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,l=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,p=m[this.o.language].today||m.en.today||"",f=m[this.o.language].clear||m.en.clear||"",g=m[this.o.language].titleFormat||m.en.titleFormat,D=i(),v=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&D>=this.o.startDate&&D<=this.o.endDate&&!this.weekOfDateIsDisabled(D);if(!isNaN(o)&&!isNaN(h)){this.picker.find(".datepicker-days .datepicker-switch").text(y.formatDate(r,g,this.o.language)),this.picker.find("tfoot .today").text(p).css("display",v?"table-cell":"none"),this.picker.find("tfoot .clear").text(f).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var w=a(o,h,0),k=w.getUTCDate();w.setUTCDate(k-(w.getUTCDay()-this.o.weekStart+7)%7);var b=new Date(w);w.getUTCFullYear()<100&&b.setUTCFullYear(w.getUTCFullYear()),b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var M,C,_=[];w.valueOf()<b;){if((M=w.getUTCDay())===this.o.weekStart&&(_.push("<tr>"),this.o.calendarWeeks)){var T=new Date(+w+(this.o.weekStart-M-7)%7*864e5),S=new Date(Number(T)+(11-T.getUTCDay())%7*864e5),U=new Date(Number(U=a(S.getUTCFullYear(),0,1))+(11-U.getUTCDay())%7*864e5),F=(S-U)/864e5/7+1;_.push('<td class="cw">'+F+"</td>")}C=this.getClassNames(w),C.push("day");var A=w.getUTCDate();this.o.beforeShowDay!==e.noop&&(n=this.o.beforeShowDay(this._utc_to_local(w)),n===t?n={}:"boolean"==typeof n?n={enabled:n}:"string"==typeof n&&(n={classes:n}),!1===n.enabled&&C.push("disabled"),n.classes&&(C=C.concat(n.classes.split(/\s+/))),n.tooltip&&(s=n.tooltip),n.content&&(A=n.content)),C=e.isFunction(e.uniqueSort)?e.uniqueSort(C):e.unique(C),_.push('<td class="'+C.join(" ")+'"'+(s?' title="'+s+'"':"")+' data-date="'+w.getTime().toString()+'">'+A+"</td>"),s=null,M===this.o.weekEnd&&_.push("</tr>"),w.setUTCDate(w.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(_.join(""));var V=m[this.o.language].monthsTitle||m.en.monthsTitle||"Months",N=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?V:o).end().find("tbody span").removeClass("active");if(e.each(this.dates,function(e,t){t.getUTCFullYear()===o&&N.eq(t.getUTCMonth()).addClass("active")}),(o<d||o>u)&&N.addClass("disabled"),o===d&&N.slice(0,l).addClass("disabled"),o===u&&N.slice(c+1).addClass("disabled"),this.o.beforeShowMonth!==e.noop){var O=this;e.each(N,function(a,i){var s=new Date(o,a,1),n=O.o.beforeShowMonth(s);n===t?n={}:"boolean"==typeof n?n={enabled:n}:"string"==typeof n&&(n={classes:n}),!1!==n.enabled||e(i).hasClass("disabled")||e(i).addClass("disabled"),n.classes&&e(i).addClass(n.classes),n.tooltip&&e(i).prop("title",n.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,o,d,u,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,o,d,u,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,o,d,u,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var e,t,a=new Date(this.viewDate),i=a.getUTCFullYear(),s=a.getUTCMonth(),n=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,r=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,d=1;switch(this.viewMode){case 4:d*=10;case 3:d*=10;case 2:d*=10;case 1:e=Math.floor(i/d)*d<=n,t=Math.floor(i/d)*d+d>o;break;case 0:e=i<=n&&s<=r,t=i>=o&&s>=h}this.picker.find(".prev").toggleClass("disabled",e),this.picker.find(".next").toggleClass("disabled",t)}},click:function(t){t.preventDefault(),t.stopPropagation();var s,n,r,o;s=e(t.target),s.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),s.hasClass("today")&&!s.hasClass("day")&&(this.setViewMode(0),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),s.hasClass("clear")&&this.clearDates(),s.hasClass("disabled")||(s.hasClass("month")||s.hasClass("year")||s.hasClass("decade")||s.hasClass("century"))&&(this.viewDate.setUTCDate(1),n=1,1===this.viewMode?(o=s.parent().find("span").index(s),r=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(o)):(o=0,r=Number(s.text()),this.viewDate.setUTCFullYear(r)),this._trigger(y.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(a(r,o,n)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(t){var a=e(t.currentTarget),i=a.data("date"),s=new Date(i);this.o.updateViewDate&&(s.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),s.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(s)},navArrowsClick:function(t){var a=e(t.currentTarget),i=a.hasClass("prev")?-1:1;0!==this.viewMode&&(i*=12*y.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,i),this._trigger(y.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(e){var t=this.dates.contains(e);if(e||this.dates.clear(),-1!==t?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):!1===this.o.multidate?(this.dates.clear(),this.dates.push(e)):this.dates.push(e),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(e,t){t&&"date"!==t||this._toggle_multidate(e&&new Date(e)),(!t&&this.o.updateViewDate||"view"===t)&&(this.viewDate=e&&new Date(e)),this.fill(),this.setValue(),t&&"view"===t||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(e,t){var a=new Date(e);return a.setUTCDate(e.getUTCDate()+t),a},moveWeek:function(e,t){return this.moveDay(e,7*t)},moveMonth:function(e,t){if(!r(e))return this.o.defaultViewDate;if(!t)return e;var a,i,s=new Date(e.valueOf()),n=s.getUTCDate(),o=s.getUTCMonth(),h=Math.abs(t);if(t=t>0?1:-1,1===h)i=-1===t?function(){return s.getUTCMonth()===o}:function(){return s.getUTCMonth()!==a},a=o+t,s.setUTCMonth(a),a=(a+12)%12;else{for(var d=0;d<h;d++)s=this.moveMonth(s,t);a=s.getUTCMonth(),s.setUTCDate(n),i=function(){return a!==s.getUTCMonth()}}for(;i();)s.setUTCDate(--n),s.setUTCMonth(a);return s},moveYear:function(e,t){return this.moveMonth(e,12*t)},moveAvailableDate:function(e,t,a){do{if(e=this[a](e,t),!this.dateWithinRange(e))return!1;a="moveDay"}while(this.dateIsDisabled(e));return e},weekOfDateIsDisabled:function(t){return-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||e.grep(this.o.datesDisabled,function(e){return s(t,e)}).length>0},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(!this.picker.is(":visible"))return void(40!==e.keyCode&&27!==e.keyCode||(this.show(),e.stopPropagation()));var t,a,i=!1,s=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault(),e.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;t=37===e.keyCode||38===e.keyCode?-1:1,0===this.viewMode?e.ctrlKey?(a=this.moveAvailableDate(s,t,"moveYear"))&&this._trigger("changeYear",this.viewDate):e.shiftKey?(a=this.moveAvailableDate(s,t,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===e.keyCode||39===e.keyCode?a=this.moveAvailableDate(s,t,"moveDay"):this.weekOfDateIsDisabled(s)||(a=this.moveAvailableDate(s,t,"moveWeek")):1===this.viewMode?(38!==e.keyCode&&40!==e.keyCode||(t*=4),a=this.moveAvailableDate(s,t,"moveMonth")):2===this.viewMode&&(38!==e.keyCode&&40!==e.keyCode||(t*=4),a=this.moveAvailableDate(s,t,"moveYear")),a&&(this.focusDate=this.viewDate=a,this.setValue(),this.fill(),e.preventDefault());break;case 13:if(!this.o.forceParse)break;s=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(s),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),e.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(e){this.viewMode=e,this.picker.children("div").hide().filter(".datepicker-"+y.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var u=function(t,a){e.data(t,"datepicker",this),this.element=e(t),this.inputs=e.map(a.inputs,function(e){return e.jquery?e[0]:e}),delete a.inputs,this.keepEmptyValues=a.keepEmptyValues,delete a.keepEmptyValues,p.call(e(this.inputs),a).on("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e.data(t,"datepicker")}),this.updateDates()};u.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,a){a.setRange(t)})},clearDates:function(){e.each(this.pickers,function(e,t){t.clearDates()})},dateUpdated:function(a){if(!this.updating){this.updating=!0;var i=e.data(a.target,"datepicker");if(i!==t){var s=i.getUTCDate(),n=this.keepEmptyValues,r=e.inArray(a.target,this.inputs),o=r-1,h=r+1,d=this.inputs.length;if(-1!==r){if(e.each(this.pickers,function(e,t){t.getUTCDate()||t!==i&&n||t.setUTCDate(s)}),s<this.dates[o])for(;o>=0&&s<this.dates[o];)this.pickers[o--].setUTCDate(s);else if(s>this.dates[h])for(;h<d&&s>this.dates[h];)this.pickers[h++].setUTCDate(s);this.updateDates(),delete this.updating}}}},destroy:function(){e.map(this.pickers,function(e){e.destroy()}),e(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:n("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var c=e.fn.datepicker,p=function(a){var i=Array.apply(null,arguments);i.shift();var s;if(this.each(function(){var t=e(this),n=t.data("datepicker"),r="object"==typeof a&&a;if(!n){var d=o(this,"date"),c=e.extend({},f,d,r),p=h(c.language),g=e.extend({},f,p,d,r);t.hasClass("input-daterange")||g.inputs?(e.extend(g,{inputs:g.inputs||t.find("input").toArray()}),n=new u(this,g)):n=new l(this,g),t.data("datepicker",n)}"string"==typeof a&&"function"==typeof n[a]&&(s=n[a].apply(n,i))}),s===t||s instanceof l||s instanceof u)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+a+" function)");return s};e.fn.datepicker=p;var f=e.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:e.noop,beforeShowMonth:e.noop,beforeShowYear:e.noop,beforeShowDecade:e.noop,beforeShowCentury:e.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0},g=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=l;var m=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},y={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(e){if("function"==typeof e.toValue&&"function"==typeof e.toDisplay)return e;var t=e.replace(this.validParts,"\0").split("\0"),a=e.match(this.validParts);if(!t||!t.length||!a||0===a.length)throw new Error("Invalid date format.");return{separators:t,parts:a}},parseDate:function(a,s,n,r){function o(e,t){return!0===t&&(t=10),e<100&&(e+=2e3)>(new Date).getFullYear()+t&&(e-=100),e}function h(){var e=this.slice(0,d[p].length),t=d[p].slice(0,e.length);return e.toLowerCase()===t.toLowerCase()}if(!a)return t;if(a instanceof Date)return a;if("string"==typeof s&&(s=y.parseFormat(s)),s.toValue)return s.toValue(a,s,n);var d,u,c,p,f,g={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},D={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(a in D&&(a=D[a]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(a)){for(d=a.match(/([\-+]\d+)([dmwy])/gi),a=new Date,p=0;p<d.length;p++)u=d[p].match(/([\-+]\d+)([dmwy])/i),c=Number(u[1]),f=g[u[2].toLowerCase()],a=l.prototype[f](a,c);return l.prototype._zero_utc_time(a)}d=a&&a.match(this.nonpunctuation)||[];var v,w,k={},b=["yyyy","yy","M","MM","m","mm","d","dd"],M={yyyy:function(e,t){return e.setUTCFullYear(r?o(t,r):t)},m:function(e,t){if(isNaN(e))return e;for(t-=1;t<0;)t+=12;for(t%=12,e.setUTCMonth(t);e.getUTCMonth()!==t;)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}};M.yy=M.yyyy,M.M=M.MM=M.mm=M.m,M.dd=M.d,a=i();var C=s.parts.slice();if(d.length!==C.length&&(C=e(C).filter(function(t,a){return-1!==e.inArray(a,b)}).toArray()),d.length===C.length){var _;for(p=0,_=C.length;p<_;p++){if(v=parseInt(d[p],10),u=C[p],isNaN(v))switch(u){case"MM":w=e(m[n].months).filter(h),v=e.inArray(w[0],m[n].months)+1;break;case"M":w=e(m[n].monthsShort).filter(h),v=e.inArray(w[0],m[n].monthsShort)+1}k[u]=v}var T,S;for(p=0;p<b.length;p++)(S=b[p])in k&&!isNaN(k[S])&&(T=new Date(a),M[S](T,k[S]),isNaN(T)||(a=T))}return a},formatDate:function(t,a,i){if(!t)return"";if("string"==typeof a&&(a=y.parseFormat(a)),a.toDisplay)return a.toDisplay(t,a,i);var s={d:t.getUTCDate(),D:m[i].daysShort[t.getUTCDay()],DD:m[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:m[i].monthsShort[t.getUTCMonth()],MM:m[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m,t=[];for(var n=e.extend([],a.separators),r=0,o=a.parts.length;r<=o;r++)n.length&&t.push(n.shift()),t.push(s[a.parts[r]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+f.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+f.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};y.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+y.headTemplate+"<tbody></tbody>"+y.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+y.headTemplate+y.contTemplate+y.footTemplate+"</table></div></div>",e.fn.datepicker.DPGlobal=y,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e.fn.datepicker.version="1.9.0",e.fn.datepicker.deprecated=function(e){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+e)},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var a=e(this);a.data("datepicker")||(t.preventDefault(),p.call(a,"show"))}),e(function(){p.call(e('[data-provide="datepicker-inline"]'))})});!function(e){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}(jQuery);!function(e){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);!function(e){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy",clear:"Borrar",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);!function(e){e.fn.datepicker.dates.fr={days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche"],daysShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam.","dim."],daysMin:["d","l","ma","me","j","v","s","d"],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthsShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);!function(e){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}(jQuery);!function(e){e.fn.datepicker.dates.nl={days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag","zondag"],daysShort:["zo","ma","di","wo","do","vr","za","zo"],daysMin:["zo","ma","di","wo","do","vr","za","zo"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthsShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],today:"Vandaag",clear:"Wissen",weekStart:1,format:"dd-mm-yyyy"}}(jQuery);!function(e){e.fn.datepicker.dates.no={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I dag",clear:"Nullstill",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);!function(e){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1,clear:"Wyczyść"}}(jQuery);!function(e){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}(jQuery);!function(e){e.fn.datepicker.dates.ro={days:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă","Duminică"],daysShort:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm","Dum"],daysMin:["Du","Lu","Ma","Mi","Jo","Vi","Sâ","Du"],months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],monthsShort:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],today:"Astăzi",clear:"Șterge",weekStart:1}}(jQuery);!function(e){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",format:"dd.mm.yyyy",weekStart:1}}(jQuery);!function(e){e.fn.datepicker.dates.zh={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1,clear:"清空"}}(jQuery);

/*!
 * Bootstrap File Input (https://github.com/grevory/bootstrap-file-input)
 * Copyright 2013 Gregory Pike
 * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
 */
(function(t){var e='<i class="fa fa-1_50x fa-fw fa-upload-cloud vertical-align-middle"></i>&nbsp;&nbsp;&nbsp;';t.fn.bootstrapFileInput=function(i){this.each(function(n,a){var l=t(a);if(typeof l.attr("data-bfi-disabled")!="undefined"){return}var s="Browse";if(typeof l.attr("title")!="undefined"){s=l.attr("title")}var f="";if(!!l.attr("class")){f=" "+l.attr("class")}var p=i?e+theme_language("upload_initial_info"):'<i class="fa fa-fw fa-paperclip -cs"></i>';l.wrap('<a class="file-input-wrapper '+(i?" "+i[0]+" ":String())+" btn "+(i?" btn-transparent-link ":" btn-default ")+" "+f+'"></a>').parent().prepend(t("<span></span>").html(p))}).promise().done(function(){t(".file-input-wrapper").mousemove(function(e){var i,n,a,l,s,f,p,r;n=t(this);i=n.find("input");a=n.offset().left;l=n.offset().top;s=i.width();f=i.height();p=e.pageX;r=e.pageY;moveInputX=p-a-s+20;moveInputY=r-l-f/2;i.css({left:moveInputX,top:moveInputY})});var e="change.fiw";t("body").off(e);t("body").on(e,".file-input-wrapper input[type=file]",function(){var e,n;e=Convert.htmlEscape(t(this).val());n=e;t(this).parent().next(".file-input-name").remove();if(!!t(this).prop("files")&&t(this).prop("files").length>1){e=t(this)[0].files.length+" files"}else{e=e.substring(e.lastIndexOf("\\")+1,e.length)}if(!e){return}var a=theme_language("global_file_selected"),l=theme_language("global_files_selected"),s=$(this.files).map(function(t,e){return e.name}).get(),f=s.join("\n");if(i){var p=this,r=(p?p.files.length>0?p.files.length:"":"")+" "+(p&&p.files.length>0?p.files.length===1?a:l:theme_language("upload_initial_info"));t(this).siblings("span").html(r);t(this).attr("title",f);var o=i[1];if(!p||p.files.length===0){o.addClass("disabled")}else{o.removeClass("disabled")}}else{var u;if(!$(this).attr("multiple")){u="1 "+a;t(this).attr("title",e)}else{var h=this.files.length;u=h+" "+(h>1?l:a);t(this).attr("title",f)}t(this).parent().after('<span class="file-input-name">'+u+"</span>")}})})};t.fn.bootstrapFileInputReset=function(t){$.each(t.find(".file-input-wrapper"),function(){$(this).find("span").html(e+theme_language("upload_initial_info"));$(this).find('input[type="file"]').attr("title",String())})}})(jQuery);

/*!
 * DataTables 1.13.1 (http://datatables.net)
 * Copyright 2008-2022 SpryMedia Ltd.
 * Licensed under MIT (http://datatables.net/license)
 */
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e=e||window,n=n||("undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(n,e,e.document)}:window.DataTable=t(jQuery,window,document)}(function(t,e,n,a){"use strict";function r(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null}function o(t,e,n){var a="string"==typeof t;return!!D(t)||(e&&a&&(t=_(t,e)),n&&a&&(t=t.replace(y,"")),!isNaN(parseFloat(t))&&isFinite(t))}function i(t,e,n){var a;return!!D(t)||(D(a=t)||"string"==typeof a)&&!!o(t.replace(m,""),e,n)||null}function l(t,e,n,r){var o=[],i=0,l=e.length;if(r!==a)for(;i<l;i++)t[e[i]][n]&&o.push(t[e[i]][n][r]);else for(;i<l;i++)o.push(t[e[i]][n]);return o}function s(t,e){var n,r=[];e===a?(e=0,n=t):(n=e,e=t);for(var o=e;o<n;o++)r.push(o);return r}function u(t){for(var e=[],n=0,a=t.length;n<a;n++)t[n]&&e.push(t[n]);return e}function c(t,e){return-1!==this.indexOf(t,e=e===a?0:e)}var d,f,h,p=function(e,n){if(this instanceof p)return t(e).DataTable(n);n=e,this.$=function(t,e){return this.api(!0).$(t,e)},this._=function(t,e){return this.api(!0).rows(t,e).data()},this.api=function(t){return new Ae(t?le(this[d.iApiIndex]):this)},this.fnAddData=function(e,n){var r=this.api(!0),e=(Array.isArray(e)&&(Array.isArray(e[0])||t.isPlainObject(e[0]))?r.rows:r.row).add(e);return n!==a&&!n||r.draw(),e.flatten().toArray()},this.fnAdjustColumnSizing=function(t){var e=this.api(!0).columns.adjust(),n=e.settings()[0],r=n.oScroll;t===a||t?e.draw(!1):""===r.sX&&""===r.sY||Ut(n)},this.fnClearTable=function(t){var e=this.api(!0).clear();t!==a&&!t||e.draw()},this.fnClose=function(t){this.api(!0).row(t).child.hide()},this.fnDeleteRow=function(t,e,n){var r=this.api(!0),t=r.rows(t),o=t.settings()[0],i=o.aoData[t[0][0]];return t.remove(),e&&e.call(this,o,i),n!==a&&!n||r.draw(),i},this.fnDestroy=function(t){this.api(!0).destroy(t)},this.fnDraw=function(t){this.api(!0).draw(t)},this.fnFilter=function(t,e,n,r,o,i){var l=this.api(!0);(null===e||e===a?l:l.column(e)).search(t,n,r,i),l.draw()},this.fnGetData=function(t,e){var n,r=this.api(!0);return t!==a?(n=t.nodeName?t.nodeName.toLowerCase():"",e!==a||"td"==n||"th"==n?r.cell(t,e).data():r.row(t).data()||null):r.data().toArray()},this.fnGetNodes=function(t){var e=this.api(!0);return t!==a?e.row(t).node():e.rows().nodes().flatten().toArray()},this.fnGetPosition=function(t){var e=this.api(!0),n=t.nodeName.toUpperCase();return"TR"==n?e.row(t).index():"TD"==n||"TH"==n?[(n=e.cell(t).index()).row,n.columnVisible,n.column]:null},this.fnIsOpen=function(t){return this.api(!0).row(t).child.isShown()},this.fnOpen=function(t,e,n){return this.api(!0).row(t).child(e,n).show().child()[0]},this.fnPageChange=function(t,e){t=this.api(!0).page(t);e!==a&&!e||t.draw(!1)},this.fnSetColumnVis=function(t,e,n){t=this.api(!0).column(t).visible(e);n!==a&&!n||t.columns.adjust().draw()},this.fnSettings=function(){return le(this[d.iApiIndex])},this.fnSort=function(t){this.api(!0).order(t).draw()},this.fnSortListener=function(t,e,n){this.api(!0).order.listener(t,e,n)},this.fnUpdate=function(t,e,n,r,o){var i=this.api(!0);return(n===a||null===n?i.row(e):i.cell(e,n)).data(t),o!==a&&!o||i.columns.adjust(),r!==a&&!r||i.draw(),0},this.fnVersionCheck=d.fnVersionCheck;var r,o=this,i=n===a,l=this.length;for(r in i&&(n={}),this.oApi=this.internal=d.internal,p.ext.internal)r&&(this[r]=Ge(r));return this.each(function(){var e=1<l?ce({},n,!0):n,r=0,s=this.getAttribute("id"),u=!1,c=p.defaults,d=t(this);if("table"!=this.nodeName.toLowerCase())se(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{R(c),P(c.column),I(c,c,!0),I(c.column,c.column,!0),I(c,t.extend(e,d.data()),!0);for(var f=p.settings,r=0,h=f.length;r<h;r++){var g=f[r];if(g.nTable==this||g.nTHead&&g.nTHead.parentNode==this||g.nTFoot&&g.nTFoot.parentNode==this){var b=(e.bRetrieve!==a?e:c).bRetrieve,m=(e.bDestroy!==a?e:c).bDestroy;if(i||b)return g.oInstance;if(m){g.oInstance.fnDestroy();break}return void se(g,0,"Cannot reinitialise DataTable",3)}if(g.sTableId==this.id){f.splice(r,1);break}}null!==s&&""!==s||(s="DataTables_Table_"+p.ext._unique++,this.id=s);var S,v,y=t.extend(!0,{},p.models.oSettings,{sDestroyWidth:d[0].style.width,sInstance:s,sTableId:s}),D=(y.nTable=this,y.oApi=o.internal,y.oInit=e,f.push(y),y.oInstance=1===o.length?o:d.dataTable(),R(e),F(e.oLanguage),e.aLengthMenu&&!e.iDisplayLength&&(e.iDisplayLength=(Array.isArray(e.aLengthMenu[0])?e.aLengthMenu[0]:e.aLengthMenu)[0]),e=ce(t.extend(!0,{},c),e),ue(y.oFeatures,e,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),ue(y,e,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),ue(y.oScroll,e,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),ue(y.oLanguage,e,"fnInfoCallback"),fe(y,"aoDrawCallback",e.fnDrawCallback,"user"),fe(y,"aoServerParams",e.fnServerParams,"user"),fe(y,"aoStateSaveParams",e.fnStateSaveParams,"user"),fe(y,"aoStateLoadParams",e.fnStateLoadParams,"user"),fe(y,"aoStateLoaded",e.fnStateLoaded,"user"),fe(y,"aoRowCallback",e.fnRowCallback,"user"),fe(y,"aoRowCreatedCallback",e.fnCreatedRow,"user"),fe(y,"aoHeaderCallback",e.fnHeaderCallback,"user"),fe(y,"aoFooterCallback",e.fnFooterCallback,"user"),fe(y,"aoInitComplete",e.fnInitComplete,"user"),fe(y,"aoPreDrawCallback",e.fnPreDrawCallback,"user"),y.rowIdFn=Z(e.rowId),j(y),y.oClasses),_=(t.extend(D,p.ext.classes,e.oClasses),d.addClass(D.sTable),y.iInitDisplayStart===a&&(y.iInitDisplayStart=e.iDisplayStart,y._iDisplayStart=e.iDisplayStart),null!==e.iDeferLoading&&(y.bDeferLoading=!0,s=Array.isArray(e.iDeferLoading),y._iRecordsDisplay=s?e.iDeferLoading[0]:e.iDeferLoading,y._iRecordsTotal=s?e.iDeferLoading[1]:e.iDeferLoading),y.oLanguage),s=(t.extend(!0,_,e.oLanguage),_.sUrl?(t.ajax({dataType:"json",url:_.sUrl,success:function(e){I(c.oLanguage,e),F(e),t.extend(!0,_,e,y.oInit.oLanguage),he(y,null,"i18n",[y]),jt(y)},error:function(){jt(y)}}),u=!0):he(y,null,"i18n",[y]),null===e.asStripeClasses&&(y.asStripeClasses=[D.sStripeOdd,D.sStripeEven]),y.asStripeClasses),w=d.children("tbody").find("tr").eq(0),C=(-1!==t.inArray(!0,t.map(s,function(t,e){return w.hasClass(t)}))&&(t("tbody tr",this).removeClass(s.join(" ")),y.asDestroyStripes=s.slice()),[]),s=this.getElementsByTagName("thead");if(0!==s.length&&(dt(y.aoHeader,s[0]),C=ft(y)),null===e.aoColumns)for(S=[],r=0,h=C.length;r<h;r++)S.push(null);else S=e.aoColumns;for(r=0,h=S.length;r<h;r++)H(y,C?C[r]:null);V(y,e.aoColumnDefs,S,function(t,e){O(y,t,e)}),w.length&&(v=function(t,e){return null!==t.getAttribute("data-"+e)?e:null},t(w[0]).children("th, td").each(function(t,e){var n,r=y.aoColumns[t];r||se(y,0,"Incorrect column count",18),r.mData===t&&(n=v(e,"sort")||v(e,"order"),e=v(e,"filter")||v(e,"search"),null===n&&null===e||(r.mData={_:t+".display",sort:null!==n?t+".@data-"+n:a,type:null!==n?t+".@data-"+n:a,filter:null!==e?t+".@data-"+e:a},O(y,t)))}));var T=y.oFeatures,s=function(){if(e.aaSorting===a){var n=y.aaSorting;for(r=0,h=n.length;r<h;r++)n[r][1]=y.aoColumns[r].asSorting[0]}ne(y),T.bSort&&fe(y,"aoDrawCallback",function(){var e,n;y.bSorted&&(e=Zt(y),n={},t.each(e,function(t,e){n[e.src]=e.dir}),he(y,null,"order",[y,e,n]),Kt(y))}),fe(y,"aoDrawCallback",function(){(y.bSorted||"ssp"===be(y)||T.bDeferRender)&&ne(y)},"sc");var o=d.children("caption").each(function(){this._captionSide=t(this).css("caption-side")}),i=d.children("thead"),l=(0===i.length&&(i=t("<thead/>").appendTo(d)),y.nTHead=i[0],d.children("tbody")),i=(0===l.length&&(l=t("<tbody/>").insertAfter(i)),y.nTBody=l[0],d.children("tfoot"));if(0===(i=0===i.length&&0<o.length&&(""!==y.oScroll.sX||""!==y.oScroll.sY)?t("<tfoot/>").appendTo(d):i).length||0===i.children().length?d.addClass(D.sNoFooter):0<i.length&&(y.nTFoot=i[0],dt(y.aoFooter,y.nTFoot)),e.aaData)for(r=0;r<e.aaData.length;r++)q(y,e.aaData[r]);else!y.bDeferLoading&&"dom"!=be(y)||X(y,t(y.nTBody).children("tr"));y.aiDisplay=y.aiDisplayMaster.slice(),!(y.bInitialised=!0)===u&&jt(y)};fe(y,"aoDrawCallback",re,"state_save"),e.bStateSave?(T.bStateSave=!0,oe(y,0,s)):s()}}),o=null,this},g={},b=/[\r\n\u2028]/g,m=/<.*?>/g,S=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,v=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),y=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,D=function(t){return!t||!0===t||"-"===t},_=function(t,e){return g[e]||(g[e]=new RegExp(Ct(e),"g")),"string"==typeof t&&"."!==e?t.replace(/\./g,"").replace(g[e],"."):t},w=function(t,e,n){var r=[],o=0,i=t.length;if(n!==a)for(;o<i;o++)t[o]&&t[o][e]&&r.push(t[o][e][n]);else for(;o<i;o++)t[o]&&r.push(t[o][e]);return r},C=function(t){if(!(t.length<2))for(var e=t.slice().sort(),n=e[0],a=1,r=e.length;a<r;a++){if(e[a]===n)return!1;n=e[a]}return!0},T=function(t){if(C(t))return t.slice();var e,n,a,r=[],o=t.length,i=0;t:for(n=0;n<o;n++){for(e=t[n],a=0;a<i;a++)if(r[a]===e)continue t;r.push(e),i++}return r},x=function(t,e){if(Array.isArray(e))for(var n=0;n<e.length;n++)x(t,e[n]);else t.push(e);return t};function A(e){var n,a,r={};t.each(e,function(t,o){(n=t.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(n[1]+" ")&&(a=t.replace(n[0],n[2].toLowerCase()),r[a]=t,"o"===n[1])&&A(e[t])}),e._hungarianMap=r}function I(e,n,r){var o;e._hungarianMap||A(e),t.each(n,function(i,l){(o=e._hungarianMap[i])===a||!r&&n[o]!==a||("o"===o.charAt(0)?(n[o]||(n[o]={}),t.extend(!0,n[o],n[i]),I(e[o],n[o],r)):n[o]=n[i])})}function F(t){var e,n=p.defaults.oLanguage,a=n.sDecimal;a&&ke(a),t&&(e=t.sZeroRecords,!t.sEmptyTable&&e&&"No data available in table"===n.sEmptyTable&&ue(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&e&&"Loading..."===n.sLoadingRecords&&ue(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sInfoThousands),e=t.sDecimal)&&a!==e&&ke(e)}Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.includes||(Array.prototype.includes=c),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),String.prototype.includes||(String.prototype.includes=c),p.util={throttle:function(t,e){var n,r,o=e!==a?e:200;return function(){var e=this,i=+new Date,l=arguments;n&&i<n+o?(clearTimeout(r),r=setTimeout(function(){n=a,t.apply(e,l)},o)):(n=i,t.apply(e,l))}},escapeRegex:function(t){return t.replace(v,"\\$1")},set:function(e){var n;return t.isPlainObject(e)?p.util.set(e._):null===e?function(){}:"function"==typeof e?function(t,n,a){e(t,"set",n,a)}:"string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("(")?function(t,n){t[e]=n}:(n=function(t,e,r){for(var o,i,l,s,u=Y(r),r=u[u.length-1],c=0,d=u.length-1;c<d;c++){if("__proto__"===u[c]||"constructor"===u[c])throw new Error("Cannot set prototype values");if(o=u[c].match($),i=u[c].match(z),o){if(u[c]=u[c].replace($,""),t[u[c]]=[],(o=u.slice()).splice(0,c+1),s=o.join("."),Array.isArray(e))for(var f=0,h=e.length;f<h;f++)n(l={},e[f],s),t[u[c]].push(l);else t[u[c]]=e;return}i&&(u[c]=u[c].replace(z,""),t=t[u[c]](e)),null!==t[u[c]]&&t[u[c]]!==a||(t[u[c]]={}),t=t[u[c]]}r.match(z)?t[r.replace(z,"")](e):t[r.replace($,"")]=e},function(t,a){return n(t,a,e)})},get:function(e){var n,r;return t.isPlainObject(e)?(n={},t.each(e,function(t,e){e&&(n[t]=p.util.get(e))}),function(t,e,r,o){var i=n[e]||n._;return i!==a?i(t,e,r,o):t}):null===e?function(t){return t}:"function"==typeof e?function(t,n,a,r){return e(t,n,a,r)}:"string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("(")?function(t,n){return t[e]}:(r=function(t,e,n){var o,i,l;if(""!==n)for(var s=Y(n),u=0,c=s.length;u<c;u++){if(h=s[u].match($),o=s[u].match(z),h){if(s[u]=s[u].replace($,""),""!==s[u]&&(t=t[s[u]]),i=[],s.splice(0,u+1),l=s.join("."),Array.isArray(t))for(var d=0,f=t.length;d<f;d++)i.push(r(t[d],e,l));var h=h[0].substring(1,h[0].length-1);t=""===h?i:i.join(h);break}if(o)s[u]=s[u].replace(z,""),t=t[s[u]]();else{if(null===t||t[s[u]]===a)return a;t=t[s[u]]}}return t},function(t,n){return r(t,n,e)})}};var L=function(t,e,n){t[e]!==a&&(t[n]=t[e])};function R(t){L(t,"ordering","bSort"),L(t,"orderMulti","bSortMulti"),L(t,"orderClasses","bSortClasses"),L(t,"orderCellsTop","bSortCellsTop"),L(t,"order","aaSorting"),L(t,"orderFixed","aaSortingFixed"),L(t,"paging","bPaginate"),L(t,"pagingType","sPaginationType"),L(t,"pageLength","iDisplayLength"),L(t,"searching","bFilter"),"boolean"==typeof t.sScrollX&&(t.sScrollX=t.sScrollX?"100%":""),"boolean"==typeof t.scrollX&&(t.scrollX=t.scrollX?"100%":"");var e=t.aoSearchCols;if(e)for(var n=0,a=e.length;n<a;n++)e[n]&&I(p.models.oSearch,e[n])}function P(t){L(t,"orderable","bSortable"),L(t,"orderData","aDataSort"),L(t,"orderSequence","asSorting"),L(t,"orderDataType","sortDataType");var e=t.aDataSort;"number"!=typeof e||Array.isArray(e)||(t.aDataSort=[e])}function j(n){var a,r,o,i;p.__browser||(p.__browser=a={},i=(o=(r=t("<div/>").css({position:"fixed",top:0,left:-1*t(e).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(t("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(t("<div/>").css({width:"100%",height:10}))).appendTo("body")).children()).children(),a.barWidth=o[0].offsetWidth-o[0].clientWidth,a.bScrollOversize=100===i[0].offsetWidth&&100!==o[0].clientWidth,a.bScrollbarLeft=1!==Math.round(i.offset().left),a.bBounding=!!r[0].getBoundingClientRect().width,r.remove()),t.extend(n.oBrowser,p.__browser),n.oScroll.iBarWidth=p.__browser.barWidth}function N(t,e,n,r,o,i){var l,s=r,u=!1;for(n!==a&&(l=n,u=!0);s!==o;)t.hasOwnProperty(s)&&(l=u?e(l,t[s],s,t):t[s],u=!0,s+=i);return l}function H(e,a){var r=p.defaults.column,o=e.aoColumns.length,r=t.extend({},p.models.oColumn,r,{nTh:a||n.createElement("th"),sTitle:r.sTitle||(a?a.innerHTML:""),aDataSort:r.aDataSort||[o],mData:r.mData||o,idx:o}),r=(e.aoColumns.push(r),e.aoPreSearchCols);r[o]=t.extend({},p.models.oSearch,r[o]),O(e,o,t(a).data())}function O(e,n,r){function o(t){return"string"==typeof t&&-1!==t.indexOf("@")}var n=e.aoColumns[n],i=e.oClasses,l=t(n.nTh),s=(!n.sWidthOrig&&(n.sWidthOrig=l.attr("width")||null,d=(l.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/))&&(n.sWidthOrig=d[1]),r!==a&&null!==r&&(P(r),I(p.defaults.column,r,!0),r.mDataProp===a||r.mData||(r.mData=r.mDataProp),r.sType&&(n._sManualType=r.sType),r.className&&!r.sClass&&(r.sClass=r.className),r.sClass&&l.addClass(r.sClass),d=n.sClass,t.extend(n,r),ue(n,r,"sWidth","sWidthOrig"),d!==n.sClass&&(n.sClass=d+" "+n.sClass),r.iDataSort!==a&&(n.aDataSort=[r.iDataSort]),ue(n,r,"aDataSort")),n.mData),u=Z(s),c=n.mRender?Z(n.mRender):null,d=(n._bAttrSrc=t.isPlainObject(s)&&(o(s.sort)||o(s.type)||o(s.filter)),n._setter=null,n.fnGetData=function(t,e,n){var r=u(t,e,a,n);return c&&e?c(r,e,t,n):r},n.fnSetData=function(t,e,n){return Q(s)(t,e,n)},"number"!=typeof s&&(e._rowReadObject=!0),e.oFeatures.bSort||(n.bSortable=!1,l.addClass(i.sSortableNone)),-1!==t.inArray("asc",n.asSorting)),r=-1!==t.inArray("desc",n.asSorting);n.bSortable&&(d||r)?d&&!r?(n.sSortingClass=i.sSortableAsc,n.sSortingClassJUI=i.sSortJUIAscAllowed):!d&&r?(n.sSortingClass=i.sSortableDesc,n.sSortingClassJUI=i.sSortJUIDescAllowed):(n.sSortingClass=i.sSortable,n.sSortingClassJUI=i.sSortJUI):(n.sSortingClass=i.sSortableNone,n.sSortingClassJUI="")}function k(t){if(!1!==t.oFeatures.bAutoWidth){var e=t.aoColumns;Xt(t);for(var n=0,a=e.length;n<a;n++)e[n].nTh.style.width=e[n].sWidth}var r=t.oScroll;""===r.sY&&""===r.sX||Ut(t),he(t,null,"column-sizing",[t])}function M(t,e){t=B(t,"bVisible");return"number"==typeof t[e]?t[e]:null}function W(e,n){e=B(e,"bVisible"),n=t.inArray(n,e);return-1!==n?n:null}function E(e){var n=0;return t.each(e.aoColumns,function(e,a){a.bVisible&&"none"!==t(a.nTh).css("display")&&n++}),n}function B(e,n){var a=[];return t.map(e.aoColumns,function(t,e){t[n]&&a.push(e)}),a}function U(t){for(var e,n,r,o,i,l,s,u=t.aoColumns,c=t.aoData,d=p.ext.type.detect,f=0,h=u.length;f<h;f++)if(s=[],!(i=u[f]).sType&&i._sManualType)i.sType=i._sManualType;else if(!i.sType){for(e=0,n=d.length;e<n;e++){for(r=0,o=c.length;r<o&&(s[r]===a&&(s[r]=J(t,r,f,"type")),(l=d[e](s[r],t))||e===d.length-1)&&("html"!==l||D(s[r]));r++);if(l){i.sType=l;break}}i.sType||(i.sType="string")}}function V(e,n,r,o){var i,l,s,u,c=e.aoColumns;if(n)for(i=n.length-1;0<=i;i--)for(var d,f=(d=n[i]).target!==a?d.target:d.targets!==a?d.targets:d.aTargets,h=0,p=(f=Array.isArray(f)?f:[f]).length;h<p;h++)if("number"==typeof f[h]&&0<=f[h]){for(;c.length<=f[h];)H(e);o(f[h],d)}else if("number"==typeof f[h]&&f[h]<0)o(c.length+f[h],d);else if("string"==typeof f[h])for(s=0,u=c.length;s<u;s++)"_all"!=f[h]&&!t(c[s].nTh).hasClass(f[h])||o(s,d);if(r)for(i=0,l=r.length;i<l;i++)o(i,r[i])}function q(e,n,r,o){for(var i=e.aoData.length,l=t.extend(!0,{},p.models.oRow,{src:r?"dom":"data",idx:i}),s=(l._aData=n,e.aoData.push(l),e.aoColumns),u=0,c=s.length;u<c;u++)s[u].sType=null;e.aiDisplayMaster.push(i);n=e.rowIdFn(n);return n!==a&&(e.aIds[n]=l),!r&&e.oFeatures.bDeferRender||rt(e,i,r,o),i}function X(e,n){var a;return(n=n instanceof t?n:t(n)).map(function(t,n){return a=at(e,n),q(e,a.data,n,a.cells)})}function J(t,e,n,r){"search"===r?r="filter":"order"===r&&(r="sort");var o=t.iDraw,i=t.aoColumns[n],l=t.aoData[e]._aData,s=i.sDefaultContent,u=i.fnGetData(l,r,{settings:t,row:e,col:n});if(u===a)return t.iDrawError!=o&&null===s&&(se(t,0,"Requested unknown parameter "+("function"==typeof i.mData?"{function}":"'"+i.mData+"'")+" for row "+e+", column "+n,4),t.iDrawError=o),s;if(u!==l&&null!==u||null===s||r===a){if("function"==typeof u)return u.call(l)}else u=s;return null===u&&"display"===r?"":"filter"===r&&(e=p.ext.type.search)[i.sType]?e[i.sType](u):u}function G(t,e,n,a){var r=t.aoColumns[n],o=t.aoData[e]._aData;r.fnSetData(o,a,{settings:t,row:e,col:n})}var $=/\[.*?\]$/,z=/\(\)$/;function Y(e){return t.map(e.match(/(\\.|[^\.])+/g)||[""],function(t){return t.replace(/\\\./g,".")})}var Z=p.util.get,Q=p.util.set;function K(t){return w(t.aoData,"_aData")}function tt(t){t.aoData.length=0,t.aiDisplayMaster.length=0,t.aiDisplay.length=0,t.aIds={}}function et(t,e,n){for(var r=-1,o=0,i=t.length;o<i;o++)t[o]==e?r=o:t[o]>e&&t[o]--;-1!=r&&n===a&&t.splice(r,1)}function nt(t,e,n,r){function o(n,a){for(;n.childNodes.length;)n.removeChild(n.firstChild);n.innerHTML=J(t,e,a,"display")}var i,l,s=t.aoData[e];if("dom"!==n&&(n&&"auto"!==n||"dom"!==s.src)){var u=s.anCells;if(u)if(r!==a)o(u[r],r);else for(i=0,l=u.length;i<l;i++)o(u[i],i)}else s._aData=at(t,s,r,r===a?a:s._aData).data;s._aSortData=null,s._aFilterData=null;var c=t.aoColumns;if(r!==a)c[r].sType=null;else{for(i=0,l=c.length;i<l;i++)c[i].sType=null;ot(t,s)}}function at(t,e,n,r){function o(t,e){var n;"string"==typeof t&&-1!==(n=t.indexOf("@"))&&(n=t.substring(n+1),Q(t)(r,e.getAttribute(n)))}function i(t){n!==a&&n!==f||(s=h[f],u=t.innerHTML.trim(),s&&s._bAttrSrc?(Q(s.mData._)(r,u),o(s.mData.sort,t),o(s.mData.type,t),o(s.mData.filter,t)):p?(s._setter||(s._setter=Q(s.mData)),s._setter(r,u)):r[f]=u),f++}var l,s,u,c=[],d=e.firstChild,f=0,h=t.aoColumns,p=t._rowReadObject;r=r!==a?r:p?{}:[];if(d)for(;d;)"TD"!=(l=d.nodeName.toUpperCase())&&"TH"!=l||(i(d),c.push(d)),d=d.nextSibling;else for(var g=0,b=(c=e.anCells).length;g<b;g++)i(c[g]);var e=e.firstChild?e:e.nTr;return e&&(e=e.getAttribute("id"))&&Q(t.rowId)(r,e),{data:r,cells:c}}function rt(e,a,r,o){var i,l,s,u,c,d,f=e.aoData[a],h=f._aData,p=[];if(null===f.nTr){for(i=r||n.createElement("tr"),f.nTr=i,f.anCells=p,i._DT_RowIndex=a,ot(e,f),u=0,c=e.aoColumns.length;u<c;u++)s=e.aoColumns[u],(l=(d=!r)?n.createElement(s.sCellType):o[u])||se(e,0,"Incorrect column count",18),l._DT_CellIndex={row:a,column:u},p.push(l),!d&&(!s.mRender&&s.mData===u||t.isPlainObject(s.mData)&&s.mData._===u+".display")||(l.innerHTML=J(e,a,u,"display")),s.sClass&&(l.className+=" "+s.sClass),s.bVisible&&!r?i.appendChild(l):!s.bVisible&&r&&l.parentNode.removeChild(l),s.fnCreatedCell&&s.fnCreatedCell.call(e.oInstance,l,J(e,a,u),h,a,u);he(e,"aoRowCreatedCallback",null,[i,h,a,p])}}function ot(e,n){var a=n.nTr,r=n._aData;a&&((e=e.rowIdFn(r))&&(a.id=e),r.DT_RowClass&&(e=r.DT_RowClass.split(" "),n.__rowc=n.__rowc?T(n.__rowc.concat(e)):e,t(a).removeClass(n.__rowc.join(" ")).addClass(r.DT_RowClass)),r.DT_RowAttr&&t(a).attr(r.DT_RowAttr),r.DT_RowData)&&t(a).data(r.DT_RowData)}function it(e){var n,a,r,o=e.nTHead,i=e.nTFoot,l=0===t("th, td",o).length,s=e.oClasses,u=e.aoColumns;for(l&&(a=t("<tr/>").appendTo(o)),d=0,f=u.length;d<f;d++)r=u[d],n=t(r.nTh).addClass(r.sClass),l&&n.appendTo(a),e.oFeatures.bSort&&(n.addClass(r.sSortingClass),!1!==r.bSortable)&&(n.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),ee(e,r.nTh,d)),r.sTitle!=n[0].innerHTML&&n.html(r.sTitle),ge(e,"header")(e,n,r,s);if(l&&dt(e.aoHeader,o),t(o).children("tr").children("th, td").addClass(s.sHeaderTH),t(i).children("tr").children("th, td").addClass(s.sFooterTH),null!==i)for(var c=e.aoFooter[0],d=0,f=c.length;d<f;d++)(r=u[d])?(r.nTf=c[d].cell,r.sClass&&t(r.nTf).addClass(r.sClass)):se(e,0,"Incorrect column count",18)}function lt(e,n,r){var o,i,l,s,u,c,d,f,h,p=[],g=[],b=e.aoColumns.length;if(n){for(r===a&&(r=!1),o=0,i=n.length;o<i;o++){for(p[o]=n[o].slice(),p[o].nTr=n[o].nTr,l=b-1;0<=l;l--)e.aoColumns[l].bVisible||r||p[o].splice(l,1);g.push([])}for(o=0,i=p.length;o<i;o++){if(d=p[o].nTr)for(;c=d.firstChild;)d.removeChild(c);for(l=0,s=p[o].length;l<s;l++)if(h=f=1,g[o][l]===a){for(d.appendChild(p[o][l].cell),g[o][l]=1;p[o+f]!==a&&p[o][l].cell==p[o+f][l].cell;)g[o+f][l]=1,f++;for(;p[o][l+h]!==a&&p[o][l].cell==p[o][l+h].cell;){for(u=0;u<f;u++)g[o+u][l+h]=1;h++}t(p[o][l].cell).attr("rowspan",f).attr("colspan",h)}}}}function st(e,n){r="ssp"==be(c=e),(u=c.iInitDisplayStart)!==a&&-1!==u&&(c._iDisplayStart=!r&&u>=c.fnRecordsDisplay()?0:u,c.iInitDisplayStart=-1);var r=he(e,"aoPreDrawCallback","preDraw",[e]);if(-1!==t.inArray(!1,r))Et(e,!1);else{var o=[],i=0,l=e.asStripeClasses,s=l.length,u=e.oLanguage,c="ssp"==be(e),d=e.aiDisplay,r=e._iDisplayStart,f=e.fnDisplayEnd();if(e.bDrawing=!0,e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,Et(e,!1);else if(c){if(!e.bDestroying&&!n)return void pt(e)}else e.iDraw++;if(0!==d.length)for(var h=c?e.aoData.length:f,p=c?0:r;p<h;p++){var g,b=d[p],m=e.aoData[b],S=(null===m.nTr&&rt(e,b),m.nTr);0!==s&&(g=l[i%s],m._sRowStripe!=g)&&(t(S).removeClass(m._sRowStripe).addClass(g),m._sRowStripe=g),he(e,"aoRowCallback",null,[S,m._aData,i,p,b]),o.push(S),i++}else{n=u.sZeroRecords;1==e.iDraw&&"ajax"==be(e)?n=u.sLoadingRecords:u.sEmptyTable&&0===e.fnRecordsTotal()&&(n=u.sEmptyTable),o[0]=t("<tr/>",{class:s?l[0]:""}).append(t("<td />",{valign:"top",colSpan:E(e),class:e.oClasses.sRowEmpty}).html(n))[0]}he(e,"aoHeaderCallback","header",[t(e.nTHead).children("tr")[0],K(e),r,f,d]),he(e,"aoFooterCallback","footer",[t(e.nTFoot).children("tr")[0],K(e),r,f,d]);c=t(e.nTBody);c.children().detach(),c.append(t(o)),he(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}}function ut(t,e){var n=t.oFeatures,a=n.bSort,n=n.bFilter;a&&Qt(t),n?vt(t,t.oPreviousSearch):t.aiDisplay=t.aiDisplayMaster.slice(),!0!==e&&(t._iDisplayStart=0),t._drawHold=e,st(t),t._drawHold=!1}function ct(e){for(var n,a,r,o,i,l,s,u=e.oClasses,c=t(e.nTable),c=t("<div/>").insertBefore(c),d=e.oFeatures,f=t("<div/>",{id:e.sTableId+"_wrapper",class:u.sWrapper+(e.nTFoot?"":" "+u.sNoFooter)}),h=(e.nHolding=c[0],e.nTableWrapper=f[0],e.nTableReinsertBefore=e.nTable.nextSibling,e.sDom.split("")),g=0;g<h.length;g++){if(n=null,"<"==(a=h[g])){if(r=t("<div/>")[0],"'"==(o=h[g+1])||'"'==o){for(i="",l=2;h[g+l]!=o;)i+=h[g+l],l++;"H"==i?i=u.sJUIHeader:"F"==i&&(i=u.sJUIFooter),-1!=i.indexOf(".")?(s=i.split("."),r.id=s[0].substr(1,s[0].length-1),r.className=s[1]):"#"==i.charAt(0)?r.id=i.substr(1,i.length-1):r.className=i,g+=l}f.append(r),f=t(r)}else if(">"==a)f=f.parent();else if("l"==a&&d.bPaginate&&d.bLengthChange)n=Ot(e);else if("f"==a&&d.bFilter)n=St(e);else if("r"==a&&d.bProcessing)n=Wt(e);else if("t"==a)n=Bt(e);else if("i"==a&&d.bInfo)n=Lt(e);else if("p"==a&&d.bPaginate)n=kt(e);else if(0!==p.ext.feature.length)for(var b=p.ext.feature,m=0,S=b.length;m<S;m++)if(a==b[m].cFeature){n=b[m].fnInit(e);break}n&&((s=e.aanFeatures)[a]||(s[a]=[]),s[a].push(n),f.append(n))}c.replaceWith(f),e.nHolding=null}function dt(e,n){var a,r,o,i,l,s,u,c,d,f,h=t(n).children("tr");for(e.splice(0,e.length),o=0,s=h.length;o<s;o++)e.push([]);for(o=0,s=h.length;o<s;o++)for(r=(a=h[o]).firstChild;r;){if("TD"==r.nodeName.toUpperCase()||"TH"==r.nodeName.toUpperCase())for(c=(c=+r.getAttribute("colspan"))&&0!=c&&1!=c?c:1,d=(d=+r.getAttribute("rowspan"))&&0!=d&&1!=d?d:1,u=function(t,e,n){for(var a=t[e];a[n];)n++;return n}(e,o,0),f=1==c,l=0;l<c;l++)for(i=0;i<d;i++)e[o+i][u+l]={cell:r,unique:f},e[o+i].nTr=a;r=r.nextSibling}}function ft(t,e,n){var a=[];n||(n=t.aoHeader,e&&dt(n=[],e));for(var r=0,o=n.length;r<o;r++)for(var i=0,l=n[r].length;i<l;i++)!n[r][i].unique||a[i]&&t.bSortCellsTop||(a[i]=n[r][i].cell);return a}function ht(e,n,a){function r(t){var n=e.jqXHR?e.jqXHR.status:null;(null===t||"number"==typeof n&&204==n)&&mt(e,t={},[]),(n=t.error||t.sError)&&se(e,0,n),e.json=t,he(e,null,"xhr",[e,t,e.jqXHR]),a(t)}he(e,"aoServerParams","serverParams",[n]),n&&Array.isArray(n)&&(o={},i=/(.*?)\[\]$/,t.each(n,function(t,e){var n=e.name.match(i);n?(n=n[0],o[n]||(o[n]=[]),o[n].push(e.value)):o[e.name]=e.value}),n=o);var o,i,l,s=e.ajax,u=e.oInstance,c=(t.isPlainObject(s)&&s.data&&(c="function"==typeof(l=s.data)?l(n,e):l,n="function"==typeof l&&c?c:t.extend(!0,n,c),delete s.data),{data:n,success:r,dataType:"json",cache:!1,type:e.sServerMethod,error:function(n,a,r){var o=he(e,null,"xhr",[e,null,e.jqXHR]);-1===t.inArray(!0,o)&&("parsererror"==a?se(e,0,"Invalid JSON response",1):4===n.readyState&&se(e,0,"Ajax error",7)),Et(e,!1)}});e.oAjaxData=n,he(e,null,"preXhr",[e,n]),e.fnServerData?e.fnServerData.call(u,e.sAjaxSource,t.map(n,function(t,e){return{name:e,value:t}}),r,e):e.sAjaxSource||"string"==typeof s?e.jqXHR=t.ajax(t.extend(c,{url:s||e.sAjaxSource})):"function"==typeof s?e.jqXHR=s.call(u,n,r,e):(e.jqXHR=t.ajax(t.extend(c,s)),s.data=l)}function pt(t){t.iDraw++,Et(t,!0),ht(t,gt(t),function(e){bt(t,e)})}function gt(e){for(var n,a,r,o=e.aoColumns,i=o.length,l=e.oFeatures,s=e.oPreviousSearch,u=e.aoPreSearchCols,c=[],d=Zt(e),f=e._iDisplayStart,h=!1!==l.bPaginate?e._iDisplayLength:-1,g=function(t,e){c.push({name:t,value:e})},b=(g("sEcho",e.iDraw),g("iColumns",i),g("sColumns",w(o,"sName").join(",")),g("iDisplayStart",f),g("iDisplayLength",h),{draw:e.iDraw,columns:[],order:[],start:f,length:h,search:{value:s.sSearch,regex:s.bRegex}}),m=0;m<i;m++)a=o[m],r=u[m],n="function"==typeof a.mData?"function":a.mData,b.columns.push({data:n,name:a.sName,searchable:a.bSearchable,orderable:a.bSortable,search:{value:r.sSearch,regex:r.bRegex}}),g("mDataProp_"+m,n),l.bFilter&&(g("sSearch_"+m,r.sSearch),g("bRegex_"+m,r.bRegex),g("bSearchable_"+m,a.bSearchable)),l.bSort&&g("bSortable_"+m,a.bSortable);l.bFilter&&(g("sSearch",s.sSearch),g("bRegex",s.bRegex)),l.bSort&&(t.each(d,function(t,e){b.order.push({column:e.col,dir:e.dir}),g("iSortCol_"+t,e.col),g("sSortDir_"+t,e.dir)}),g("iSortingCols",d.length));f=p.ext.legacy.ajax;return null===f?e.sAjaxSource?c:b:f?c:b}function bt(t,e){function n(t,n){return e[t]!==a?e[t]:e[n]}var r=mt(t,e),o=n("sEcho","draw"),i=n("iTotalRecords","recordsTotal"),l=n("iTotalDisplayRecords","recordsFiltered");if(o!==a){if(+o<t.iDraw)return;t.iDraw=+o}r=r||[],tt(t),t._iRecordsTotal=parseInt(i,10),t._iRecordsDisplay=parseInt(l,10);for(var s=0,u=r.length;s<u;s++)q(t,r[s]);t.aiDisplay=t.aiDisplayMaster.slice(),st(t,!0),t._bInitComplete||Nt(t,e),Et(t,!1)}function mt(e,n,r){e=t.isPlainObject(e.ajax)&&e.ajax.dataSrc!==a?e.ajax.dataSrc:e.sAjaxDataProp;if(!r)return"data"===e?n.aaData||n[e]:""!==e?Z(e)(n):n;Q(e)(n,r)}function St(e){function a(t){s.f;var n=this.value||"";l.return&&"Enter"!==t.key||n!=l.sSearch&&(vt(e,{sSearch:n,bRegex:l.bRegex,bSmart:l.bSmart,bCaseInsensitive:l.bCaseInsensitive,return:l.return}),e._iDisplayStart=0,st(e))}var r=e.oClasses,o=e.sTableId,i=e.oLanguage,l=e.oPreviousSearch,s=e.aanFeatures,u='<input type="search" class="'+r.sFilterInput+'"/>',c=(c=i.sSearch).match(/_INPUT_/)?c.replace("_INPUT_",u):c+u,u=t("<div/>",{id:s.f?null:o+"_filter",class:r.sFilter}).append(t("<label/>").append(c)),r=null!==e.searchDelay?e.searchDelay:"ssp"===be(e)?400:0,d=t("input",u).val(l.sSearch).attr("placeholder",i.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",r?Jt(a,r):a).on("mouseup",function(t){setTimeout(function(){a.call(d[0],t)},10)}).on("keypress.DT",function(t){if(13==t.keyCode)return!1}).attr("aria-controls",o);return t(e.nTable).on("search.dt.DT",function(t,a){if(e===a)try{d[0]!==n.activeElement&&d.val(l.sSearch)}catch(t){}}),u[0]}function vt(t,e,n){function r(t){i.sSearch=t.sSearch,i.bRegex=t.bRegex,i.bSmart=t.bSmart,i.bCaseInsensitive=t.bCaseInsensitive,i.return=t.return}function o(t){return t.bEscapeRegex!==a?!t.bEscapeRegex:t.bRegex}var i=t.oPreviousSearch,l=t.aoPreSearchCols;if(U(t),"ssp"!=be(t)){_t(t,e.sSearch,n,o(e),e.bSmart,e.bCaseInsensitive,e.return),r(e);for(var s=0;s<l.length;s++)Dt(t,l[s].sSearch,s,o(l[s]),l[s].bSmart,l[s].bCaseInsensitive);yt(t)}else r(e);t.bFiltered=!0,he(t,null,"search",[t])}function yt(e){for(var n,a,r=p.ext.search,o=e.aiDisplay,i=0,l=r.length;i<l;i++){for(var s=[],u=0,c=o.length;u<c;u++)a=o[u],n=e.aoData[a],r[i](e,n._aFilterData,a,n._aData,u)&&s.push(a);o.length=0,t.merge(o,s)}}function Dt(t,e,n,a,r,o){if(""!==e){for(var i,l=[],s=t.aiDisplay,u=wt(e,a,r,o),c=0;c<s.length;c++)i=t.aoData[s[c]]._aFilterData[n],u.test(i)&&l.push(s[c]);t.aiDisplay=l}}function _t(t,e,n,a,r,o){var i,l,s,u=wt(e,a,r,o),r=t.oPreviousSearch.sSearch,o=t.aiDisplayMaster,c=[];if(0!==p.ext.search.length&&(n=!0),l=At(t),e.length<=0)t.aiDisplay=o.slice();else{for((l||n||a||r.length>e.length||0!==e.indexOf(r)||t.bSorted)&&(t.aiDisplay=o.slice()),i=t.aiDisplay,s=0;s<i.length;s++)u.test(t.aoData[i[s]]._sFilterRow)&&c.push(i[s]);t.aiDisplay=c}}function wt(e,n,a,r){return e=n?e:Ct(e),a&&(e="^(?=.*?"+t.map(e.match(/"[^"]+"|[^ ]+/g)||[""],function(t){var e;return(t='"'===t.charAt(0)?(e=t.match(/^"(.*)"$/))?e[1]:t:t).replace('"',"")}).join(")(?=.*?")+").*$"),new RegExp(e,r?"i":"")}var Ct=p.util.escapeRegex,Tt=t("<div>")[0],xt=Tt.textContent!==a;function At(t){for(var e,n,a,r,o,i=t.aoColumns,l=!1,s=0,u=t.aoData.length;s<u;s++)if(!(o=t.aoData[s])._aFilterData){for(a=[],e=0,n=i.length;e<n;e++)i[e].bSearchable?"string"!=typeof(r=null===(r=J(t,s,e,"filter"))?"":r)&&r.toString&&(r=r.toString()):r="",r.indexOf&&-1!==r.indexOf("&")&&(Tt.innerHTML=r,r=xt?Tt.textContent:Tt.innerText),r.replace&&(r=r.replace(/[\r\n\u2028]/g,"")),a.push(r);o._aFilterData=a,o._sFilterRow=a.join("  "),l=!0}return l}function It(t){return{search:t.sSearch,smart:t.bSmart,regex:t.bRegex,caseInsensitive:t.bCaseInsensitive}}function Ft(t){return{sSearch:t.search,bSmart:t.smart,bRegex:t.regex,bCaseInsensitive:t.caseInsensitive}}function Lt(e){var n=e.sTableId,a=e.aanFeatures.i,r=t("<div/>",{class:e.oClasses.sInfo,id:a?null:n+"_info"});return a||(e.aoDrawCallback.push({fn:Rt,sName:"information"}),r.attr("role","status").attr("aria-live","polite"),t(e.nTable).attr("aria-describedby",n+"_info")),r[0]}function Rt(e){var n,a,r,o,i,l,s=e.aanFeatures.i;0!==s.length&&(l=e.oLanguage,n=e._iDisplayStart+1,a=e.fnDisplayEnd(),r=e.fnRecordsTotal(),i=(o=e.fnRecordsDisplay())?l.sInfo:l.sInfoEmpty,o!==r&&(i+=" "+l.sInfoFiltered),i=Pt(e,i+=l.sInfoPostFix),null!==(l=l.fnInfoCallback)&&(i=l.call(e.oInstance,e,n,a,r,o,i)),t(s).html(i))}function Pt(t,e){var n=t.fnFormatNumber,a=t._iDisplayStart+1,r=t._iDisplayLength,o=t.fnRecordsDisplay(),i=-1===r;return e.replace(/_START_/g,n.call(t,a)).replace(/_END_/g,n.call(t,t.fnDisplayEnd())).replace(/_MAX_/g,n.call(t,t.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(t,o)).replace(/_PAGE_/g,n.call(t,i?1:Math.ceil(a/r))).replace(/_PAGES_/g,n.call(t,i?1:Math.ceil(o/r)))}function jt(t){var e,n,a,r=t.iInitDisplayStart,o=t.aoColumns,i=t.oFeatures,l=t.bDeferLoading;if(t.bInitialised){for(ct(t),it(t),lt(t,t.aoHeader),lt(t,t.aoFooter),Et(t,!0),i.bAutoWidth&&Xt(t),e=0,n=o.length;e<n;e++)(a=o[e]).sWidth&&(a.nTh.style.width=Yt(a.sWidth));he(t,null,"preInit",[t]),ut(t);i=be(t);"ssp"==i&&!l||("ajax"==i?ht(t,[],function(n){var a=mt(t,n);for(e=0;e<a.length;e++)q(t,a[e]);t.iInitDisplayStart=r,ut(t),Et(t,!1),Nt(t,n)}):(Et(t,!1),Nt(t)))}else setTimeout(function(){jt(t)},200)}function Nt(t,e){t._bInitComplete=!0,(e||t.oInit.aaData)&&k(t),he(t,null,"plugin-init",[t,e]),he(t,"aoInitComplete","init",[t,e])}function Ht(t,e){e=parseInt(e,10);t._iDisplayLength=e,pe(t),he(t,null,"length",[t,e])}function Ot(e){for(var n=e.oClasses,a=e.sTableId,r=e.aLengthMenu,o=Array.isArray(r[0]),i=o?r[0]:r,l=o?r[1]:r,s=t("<select/>",{name:a+"_length","aria-controls":a,class:n.sLengthSelect}),u=0,c=i.length;u<c;u++)s[0][u]=new Option("number"==typeof l[u]?e.fnFormatNumber(l[u]):l[u],i[u]);var d=t("<div><label/></div>").addClass(n.sLength);return e.aanFeatures.l||(d[0].id=a+"_length"),d.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",s[0].outerHTML)),t("select",d).val(e._iDisplayLength).on("change.DT",function(n){Ht(e,t(this).val()),st(e)}),t(e.nTable).on("length.dt.DT",function(n,a,r){e===a&&t("select",d).val(r)}),d[0]}function kt(e){function n(t){st(t)}var a=e.sPaginationType,r=p.ext.pager[a],o="function"==typeof r,a=t("<div/>").addClass(e.oClasses.sPaging+a)[0],i=e.aanFeatures;return o||r.fnInit(e,a,n),i.p||(a.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(t){if(o)for(var e=t._iDisplayStart,a=t._iDisplayLength,l=t.fnRecordsDisplay(),s=-1===a,u=s?0:Math.ceil(e/a),c=s?1:Math.ceil(l/a),d=r(u,c),f=0,h=i.p.length;f<h;f++)ge(t,"pageButton")(t,i.p[f],f,d,u,c);else r.fnUpdate(t,n)},sName:"pagination"})),a}function Mt(t,e,n){var a=t._iDisplayStart,r=t._iDisplayLength,o=t.fnRecordsDisplay(),o=(0===o||-1===r?a=0:"number"==typeof e?o<(a=e*r)&&(a=0):"first"==e?a=0:"previous"==e?(a=0<=r?a-r:0)<0&&(a=0):"next"==e?a+r<o&&(a+=r):"last"==e?a=Math.floor((o-1)/r)*r:se(t,0,"Unknown paging action: "+e,5),t._iDisplayStart!==a);return t._iDisplayStart=a,o?(he(t,null,"page",[t]),n&&st(t)):he(t,null,"page-nc",[t]),o}function Wt(e){return t("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).append("<div><div></div><div></div><div></div><div></div></div>").insertBefore(e.nTable)[0]}function Et(e,n){e.oFeatures.bProcessing&&t(e.aanFeatures.r).css("display",n?"block":"none"),he(e,null,"processing",[e,n])}function Bt(e){var n,a,r,o,i,l,s,u,c,d,f,h,p=t(e.nTable),g=e.oScroll;return""===g.sX&&""===g.sY?e.nTable:(n=g.sX,a=g.sY,r=e.oClasses,i=(o=p.children("caption")).length?o[0]._captionSide:null,u=t(p[0].cloneNode(!1)),l=t(p[0].cloneNode(!1)),c=function(t){return t?Yt(t):null},(s=p.children("tfoot")).length||(s=null),u=t(f="<div/>",{class:r.sScrollWrapper}).append(t(f,{class:r.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:n?c(n):"100%"}).append(t(f,{class:r.sScrollHeadInner}).css({"box-sizing":"content-box",width:g.sXInner||"100%"}).append(u.removeAttr("id").css("margin-left",0).append("top"===i?o:null).append(p.children("thead"))))).append(t(f,{class:r.sScrollBody}).css({position:"relative",overflow:"auto",width:c(n)}).append(p)),s&&u.append(t(f,{class:r.sScrollFoot}).css({overflow:"hidden",border:0,width:n?c(n):"100%"}).append(t(f,{class:r.sScrollFootInner}).append(l.removeAttr("id").css("margin-left",0).append("bottom"===i?o:null).append(p.children("tfoot"))))),c=u.children(),d=c[0],f=c[1],h=s?c[2]:null,n&&t(f).on("scroll.DT",function(t){var e=this.scrollLeft;d.scrollLeft=e,s&&(h.scrollLeft=e)}),t(f).css("max-height",a),g.bCollapse||t(f).css("height",a),e.nScrollHead=d,e.nScrollBody=f,e.nScrollFoot=h,e.aoDrawCallback.push({fn:Ut,sName:"scrolling"}),u[0])}function Ut(n){function r(t){(t=t.style).paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0}var o,i,l,s,u,c=n.oScroll,d=c.sX,f=c.sXInner,h=c.sY,c=c.iBarWidth,p=t(n.nScrollHead),g=p[0].style,b=p.children("div"),m=b[0].style,b=b.children("table"),S=n.nScrollBody,v=t(S),y=S.style,D=t(n.nScrollFoot).children("div"),_=D.children("table"),C=t(n.nTHead),T=t(n.nTable),x=T[0],A=x.style,I=n.nTFoot?t(n.nTFoot):null,F=n.oBrowser,L=F.bScrollOversize,R=(w(n.aoColumns,"nTh"),[]),P=[],j=[],N=[],H=S.scrollHeight>S.clientHeight;n.scrollBarVis!==H&&n.scrollBarVis!==a?(n.scrollBarVis=H,k(n)):(n.scrollBarVis=H,T.children("thead, tfoot").remove(),I&&(H=I.clone().prependTo(T),u=I.find("tr"),i=H.find("tr"),H.find("[id]").removeAttr("id")),H=C.clone().prependTo(T),C=C.find("tr"),o=H.find("tr"),H.find("th, td").removeAttr("tabindex"),H.find("[id]").removeAttr("id"),d||(y.width="100%",p[0].style.width="100%"),t.each(ft(n,H),function(t,e){l=M(n,t),e.style.width=n.aoColumns[l].sWidth}),I&&Vt(function(t){t.style.width=""},i),p=T.outerWidth(),""===d?(A.width="100%",L&&(T.find("tbody").height()>S.offsetHeight||"scroll"==v.css("overflow-y"))&&(A.width=Yt(T.outerWidth()-c)),p=T.outerWidth()):""!==f&&(A.width=Yt(f),p=T.outerWidth()),Vt(r,o),Vt(function(n){var a=e.getComputedStyle?e.getComputedStyle(n).width:Yt(t(n).width());j.push(n.innerHTML),R.push(a)},o),Vt(function(t,e){t.style.width=R[e]},C),t(o).css("height",0),I&&(Vt(r,i),Vt(function(e){N.push(e.innerHTML),P.push(Yt(t(e).css("width")))},i),Vt(function(t,e){t.style.width=P[e]},u),t(i).height(0)),Vt(function(t,e){t.innerHTML='<div class="dataTables_sizing">'+j[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=R[e]},o),I&&Vt(function(t,e){t.innerHTML='<div class="dataTables_sizing">'+N[e]+"</div>",t.childNodes[0].style.height="0",t.childNodes[0].style.overflow="hidden",t.style.width=P[e]},i),Math.round(T.outerWidth())<Math.round(p)?(s=S.scrollHeight>S.offsetHeight||"scroll"==v.css("overflow-y")?p+c:p,L&&(S.scrollHeight>S.offsetHeight||"scroll"==v.css("overflow-y"))&&(A.width=Yt(s-c)),""!==d&&""===f||se(n,1,"Possible column misalignment",6)):s="100%",y.width=Yt(s),g.width=Yt(s),I&&(n.nScrollFoot.style.width=Yt(s)),h||L&&(y.height=Yt(x.offsetHeight+c)),H=T.outerWidth(),b[0].style.width=Yt(H),m.width=Yt(H),C=T.height()>S.clientHeight||"scroll"==v.css("overflow-y"),m[u="padding"+(F.bScrollbarLeft?"Left":"Right")]=C?c+"px":"0px",I&&(_[0].style.width=Yt(H),D[0].style.width=Yt(H),D[0].style[u]=C?c+"px":"0px"),T.children("colgroup").insertBefore(T.children("thead")),v.trigger("scroll"),!n.bSorted&&!n.bFiltered||n._drawHold||(S.scrollTop=0))}function Vt(t,e,n){for(var a,r,o=0,i=0,l=e.length;i<l;){for(a=e[i].firstChild,r=n?n[i].firstChild:null;a;)1===a.nodeType&&(n?t(a,r,o):t(a,o),o++),a=a.nextSibling,r=n?r.nextSibling:null;i++}}var qt=/<.*?>/g;function Xt(n){var a,r,o=n.nTable,i=n.aoColumns,l=n.oScroll,s=l.sY,u=l.sX,l=l.sXInner,c=i.length,d=B(n,"bVisible"),f=t("th",n.nTHead),h=o.getAttribute("width"),p=o.parentNode,g=!1,b=n.oBrowser,m=b.bScrollOversize,S=o.style.width;for(S&&-1!==S.indexOf("%")&&(h=S),w=0;w<d.length;w++)null!==(a=i[d[w]]).sWidth&&(a.sWidth=Gt(a.sWidthOrig,p),g=!0);if(m||!g&&!u&&!s&&c==E(n)&&c==f.length)for(w=0;w<c;w++){var v=M(n,w);null!==v&&(i[v].sWidth=Yt(f.eq(w).width()))}else{var S=t(o).clone().css("visibility","hidden").removeAttr("id"),y=(S.find("tbody tr").remove(),t("<tr/>").appendTo(S.find("tbody")));for(S.find("thead, tfoot").remove(),S.append(t(n.nTHead).clone()).append(t(n.nTFoot).clone()),S.find("tfoot th, tfoot td").css("width",""),f=ft(n,S.find("thead")[0]),w=0;w<d.length;w++)a=i[d[w]],f[w].style.width=null!==a.sWidthOrig&&""!==a.sWidthOrig?Yt(a.sWidthOrig):"",a.sWidthOrig&&u&&t(f[w]).append(t("<div/>").css({width:a.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(n.aoData.length)for(w=0;w<d.length;w++)a=i[r=d[w]],t($t(n,r)).clone(!1).append(a.sContentPadding).appendTo(y);t("[name]",S).removeAttr("name");for(var D=t("<div/>").css(u||s?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(S).appendTo(p),_=(u&&l?S.width(l):u?(S.css("width","auto"),S.removeAttr("width"),S.width()<p.clientWidth&&h&&S.width(p.clientWidth)):s?S.width(p.clientWidth):h&&S.width(h),0),w=0;w<d.length;w++){var C=t(f[w]),T=C.outerWidth()-C.width(),C=b.bBounding?Math.ceil(f[w].getBoundingClientRect().width):C.outerWidth();_+=C,i[d[w]].sWidth=Yt(C-T)}o.style.width=Yt(_),D.remove()}h&&(o.style.width=Yt(h)),!h&&!u||n._reszEvt||(l=function(){t(e).on("resize.DT-"+n.sInstance,Jt(function(){k(n)}))},m?setTimeout(l,1e3):l(),n._reszEvt=!0)}var Jt=p.util.throttle;function Gt(e,a){return e?(a=(e=t("<div/>").css("width",Yt(e)).appendTo(a||n.body))[0].offsetWidth,e.remove(),a):0}function $t(e,n){var a,r=zt(e,n);return r<0?null:(a=e.aoData[r]).nTr?a.anCells[n]:t("<td/>").html(J(e,r,n,"display"))[0]}function zt(t,e){for(var n,a=-1,r=-1,o=0,i=t.aoData.length;o<i;o++)(n=(n=(n=J(t,o,e,"display")+"").replace(qt,"")).replace(/&nbsp;/g," ")).length>a&&(a=n.length,r=o);return r}function Yt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function Zt(e){function n(e){e.length&&!Array.isArray(e[0])?b.push(e):t.merge(b,e)}var r,o,i,l,s,u,c,d=[],f=e.aoColumns,h=e.aaSortingFixed,g=t.isPlainObject(h),b=[];for(Array.isArray(h)&&n(h),g&&h.pre&&n(h.pre),n(e.aaSorting),g&&h.post&&n(h.post),r=0;r<b.length;r++)for(i=(l=f[c=b[r][o=0]].aDataSort).length;o<i;o++)u=f[s=l[o]].sType||"string",b[r]._idx===a&&(b[r]._idx=t.inArray(b[r][1],f[s].asSorting)),d.push({src:c,col:s,dir:b[r][1],index:b[r]._idx,type:u,formatter:p.ext.type.order[u+"-pre"]});return d}function Qt(t){var e,n,a,r,o,i=[],l=p.ext.type.order,s=t.aoData,u=(t.aoColumns,0),c=t.aiDisplayMaster;for(U(t),e=0,n=(o=Zt(t)).length;e<n;e++)(r=o[e]).formatter&&u++,ae(t,r.col);if("ssp"!=be(t)&&0!==o.length){for(e=0,a=c.length;e<a;e++)i[c[e]]=e;u===o.length?c.sort(function(t,e){for(var n,a,r,l,u=o.length,c=s[t]._aSortData,d=s[e]._aSortData,f=0;f<u;f++)if(0!=(r=(n=c[(l=o[f]).col])<(a=d[l.col])?-1:a<n?1:0))return"asc"===l.dir?r:-r;return(n=i[t])<(a=i[e])?-1:a<n?1:0}):c.sort(function(t,e){for(var n,a,r,u=o.length,c=s[t]._aSortData,d=s[e]._aSortData,f=0;f<u;f++)if(n=c[(r=o[f]).col],a=d[r.col],0!==(r=(l[r.type+"-"+r.dir]||l["string-"+r.dir])(n,a)))return r;return(n=i[t])<(a=i[e])?-1:a<n?1:0})}t.bSorted=!0}function Kt(t){for(var e=t.aoColumns,n=Zt(t),a=t.oLanguage.oAria,r=0,o=e.length;r<o;r++){var i=e[r],l=i.asSorting,s=i.ariaTitle||i.sTitle.replace(/<.*?>/g,""),u=i.nTh;u.removeAttribute("aria-sort"),i=i.bSortable?s+("asc"===(0<n.length&&n[0].col==r&&(u.setAttribute("aria-sort","asc"==n[0].dir?"ascending":"descending"),l[n[0].index+1])||l[0])?a.sSortAscending:a.sSortDescending):s,u.setAttribute("aria-label",i)}}function te(e,n,r,o){function i(e,n){var r=e._idx;return(r=r===a?t.inArray(e[1],c):r)+1<c.length?r+1:n?null:0}var l,s=e.aoColumns[n],u=e.aaSorting,c=s.asSorting;"number"==typeof u[0]&&(u=e.aaSorting=[u]),r&&e.oFeatures.bSortMulti?-1!==(s=t.inArray(n,w(u,"0")))?null===(l=null===(l=i(u[s],!0))&&1===u.length?0:l)?u.splice(s,1):(u[s][1]=c[l],u[s]._idx=l):(u.push([n,c[0],0]),u[u.length-1]._idx=0):u.length&&u[0][0]==n?(l=i(u[0]),u.length=1,u[0][1]=c[l],u[0]._idx=l):(u.length=0,u.push([n,c[0]]),u[0]._idx=0),ut(e),"function"==typeof o&&o(e)}function ee(t,e,n,a){var r=t.aoColumns[n];de(e,{},function(e){!1!==r.bSortable&&(t.oFeatures.bProcessing?(Et(t,!0),setTimeout(function(){te(t,n,e.shiftKey,a),"ssp"!==be(t)&&Et(t,!1)},0)):te(t,n,e.shiftKey,a))})}function ne(e){var n,a,r,o=e.aLastSort,i=e.oClasses.sSortColumn,l=Zt(e),s=e.oFeatures;if(s.bSort&&s.bSortClasses){for(n=0,a=o.length;n<a;n++)r=o[n].src,t(w(e.aoData,"anCells",r)).removeClass(i+(n<2?n+1:3));for(n=0,a=l.length;n<a;n++)r=l[n].src,t(w(e.aoData,"anCells",r)).addClass(i+(n<2?n+1:3))}e.aLastSort=l}function ae(t,e){for(var n,a,r,o=t.aoColumns[e],i=p.ext.order[o.sSortDataType],l=(i&&(n=i.call(t.oInstance,t,e,W(t,e))),p.ext.type.order[o.sType+"-pre"]),s=0,u=t.aoData.length;s<u;s++)(a=t.aoData[s])._aSortData||(a._aSortData=[]),a._aSortData[e]&&!i||(r=i?n[s]:J(t,s,e,"sort"),a._aSortData[e]=l?l(r):r)}function re(e){var n;e._bLoadingState||(n={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:t.extend(!0,[],e.aaSorting),search:It(e.oPreviousSearch),columns:t.map(e.aoColumns,function(t,n){return{visible:t.bVisible,search:It(e.aoPreSearchCols[n])}})},e.oSavedState=n,he(e,"aoStateSaveParams","stateSaveParams",[e,n]),e.oFeatures.bStateSave&&!e.bDestroying&&e.fnStateSaveCallback.call(e.oInstance,e,n))}function oe(t,e,n){var r;if(t.oFeatures.bStateSave)return(r=t.fnStateLoadCallback.call(t.oInstance,t,function(e){ie(t,e,n)}))!==a&&ie(t,r,n),!0;n()}function ie(e,n,r){var o,i,l=e.aoColumns,s=(e._bLoadingState=!0,e._bInitComplete?new p.Api(e):null);if(n&&n.time){var u=he(e,"aoStateLoadParams","stateLoadParams",[e,n]);if(-1!==t.inArray(!1,u))e._bLoadingState=!1;else{u=e.iStateDuration;if(0<u&&n.time<+new Date-1e3*u)e._bLoadingState=!1;else if(n.columns&&l.length!==n.columns.length)e._bLoadingState=!1;else{if(e.oLoadedState=t.extend(!0,{},n),n.length!==a&&(s?s.page.len(n.length):e._iDisplayLength=n.length),n.start!==a&&(null===s?(e._iDisplayStart=n.start,e.iInitDisplayStart=n.start):Mt(e,n.start/e._iDisplayLength)),n.order!==a&&(e.aaSorting=[],t.each(n.order,function(t,n){e.aaSorting.push(n[0]>=l.length?[0,n[1]]:n)})),n.search!==a&&t.extend(e.oPreviousSearch,Ft(n.search)),n.columns){for(o=0,i=n.columns.length;o<i;o++){var c=n.columns[o];c.visible!==a&&(s?s.column(o).visible(c.visible,!1):l[o].bVisible=c.visible),c.search!==a&&t.extend(e.aoPreSearchCols[o],Ft(c.search))}s&&s.columns.adjust()}e._bLoadingState=!1,he(e,"aoStateLoaded","stateLoaded",[e,n])}}}else e._bLoadingState=!1;r()}function le(e){var n=p.settings,e=t.inArray(e,w(n,"nTable"));return-1!==e?n[e]:null}function se(t,n,a,r){if(a="DataTables warning: "+(t?"table id="+t.sTableId+" - ":"")+a,r&&(a+=". For more information about this error, please see http://datatables.net/tn/"+r),n)e.console&&console.log&&console.log(a);else{n=p.ext,n=n.sErrMode||n.errMode;if(t&&he(t,null,"error",[t,r,a]),"alert"==n)alert(a);else{if("throw"==n)throw new Error(a);"function"==typeof n&&n(t,r,a)}}}function ue(e,n,r,o){Array.isArray(r)?t.each(r,function(t,a){Array.isArray(a)?ue(e,n,a[0],a[1]):ue(e,n,a)}):(o===a&&(o=r),n[r]!==a&&(e[o]=n[r]))}function ce(e,n,a){var r,o;for(o in n)n.hasOwnProperty(o)&&(r=n[o],t.isPlainObject(r)?(t.isPlainObject(e[o])||(e[o]={}),t.extend(!0,e[o],r)):a&&"data"!==o&&"aaData"!==o&&Array.isArray(r)?e[o]=r.slice():e[o]=r);return e}function de(e,n,a){t(e).on("click.DT",n,function(n){t(e).trigger("blur"),a(n)}).on("keypress.DT",n,function(t){13===t.which&&(t.preventDefault(),a(t))}).on("selectstart.DT",function(){return!1})}function fe(t,e,n,a){n&&t[e].push({fn:n,sName:a})}function he(e,n,a,r){var o=[];return n&&(o=t.map(e[n].slice().reverse(),function(t,n){return t.fn.apply(e.oInstance,r)})),null!==a&&(n=t.Event(a+".dt"),t(e.nTable).trigger(n,r),o.push(n.result)),o}function pe(t){var e=t._iDisplayStart,n=t.fnDisplayEnd(),a=t._iDisplayLength;n<=e&&(e=n-a),e-=e%a,t._iDisplayStart=e=-1===a||e<0?0:e}function ge(e,n){var e=e.renderer,a=p.ext.renderer[n];return t.isPlainObject(e)&&e[n]?a[e[n]]||a._:"string"==typeof e&&a[e]||a._}function be(t){return t.oFeatures.bServerSide?"ssp":t.ajax||t.sAjaxSource?"ajax":"dom"}function me(e,n){var a;return Array.isArray(e)?t.map(e,function(t){return me(t,n)}):"number"==typeof e?[n[e]]:(a=t.map(n,function(t,e){return t.nTable}),t(a).filter(e).map(function(e){var r=t.inArray(this,a);return n[r]}).toArray())}function Se(t,e,n){var a,r;n&&(a=new Ae(t)).one("draw",function(){n(a.ajax.json())}),"ssp"==be(t)?ut(t,e):(Et(t,!0),(r=t.jqXHR)&&4!==r.readyState&&r.abort(),ht(t,[],function(n){tt(t);for(var a=mt(t,n),r=0,o=a.length;r<o;r++)q(t,a[r]);ut(t,e),Et(t,!1)}))}function ve(t,e,n,r,o){for(var i,l,s,u,c=[],f=typeof e,h=0,p=(e=e&&"string"!=f&&"function"!=f&&e.length!==a?e:[e]).length;h<p;h++)for(s=0,u=(l=e[h]&&e[h].split&&!e[h].match(/[\[\(:]/)?e[h].split(","):[e[h]]).length;s<u;s++)(i=n("string"==typeof l[s]?l[s].trim():l[s]))&&i.length&&(c=c.concat(i));var g=d.selector[t];if(g.length)for(h=0,p=g.length;h<p;h++)c=g[h](r,o,c);return T(c)}function ye(e){return(e=e||{}).filter&&e.search===a&&(e.search=e.filter),t.extend({search:"none",order:"current",page:"all"},e)}function De(t){for(var e=0,n=t.length;e<n;e++)if(0<t[e].length)return t[0]=t[e],t[0].length=1,t.length=1,t.context=[t.context[e]],t;return t.length=0,t}function _e(e,n,a,r){function o(n,a){var r;if(Array.isArray(n)||n instanceof t)for(var l=0,s=n.length;l<s;l++)o(n[l],a);else n.nodeName&&"tr"===n.nodeName.toLowerCase()?i.push(n):(r=t("<tr><td></td></tr>").addClass(a),t("td",r).addClass(a).html(n)[0].colSpan=E(e),i.push(r[0]))}var i=[];o(a,r),n._details&&n._details.detach(),n._details=t(i),n._detailsShow&&n._details.insertAfter(n.nTr)}function we(e,n){var a=e.context;if(a.length&&e.length){var r=a[0].aoData[e[0]];if(r._details){(r._detailsShow=n)?(r._details.insertAfter(r.nTr),t(r.nTr).addClass("dt-hasChild")):(r._details.detach(),t(r.nTr).removeClass("dt-hasChild")),he(a[0],null,"childRow",[n,e.row(e[0])]);var o=a[0],i=new Ae(o),r=".dt.DT_details",n="draw"+r,e="column-sizing"+r,r="destroy"+r,l=o.aoData;if(i.off(n+" "+e+" "+r),w(l,"_details").length>0){i.on(n,function(t,e){if(o!==e)return;i.rows({page:"current"}).eq(0).each(function(t){var e=l[t];if(e._detailsShow)e._details.insertAfter(e.nTr)})});i.on(e,function(t,e,n,a){if(o!==e)return;var r,i=E(e);for(var s=0,u=l.length;s<u;s++){r=l[s];if(r._details)r._details.children("td[colspan]").attr("colspan",i)}});i.on(r,function(t,e){if(o!==e)return;for(var n=0,a=l.length;n<a;n++)if(l[n]._details)Le(i,n)})}Fe(a)}}}function Ce(t,e,n,a,r){for(var o=[],i=0,l=r.length;i<l;i++)o.push(J(t,r[i],e));return o}var Te=[],xe=Array.prototype,Ae=function(e,n){if(!(this instanceof Ae))return new Ae(e,n);function a(e){var n,a,o,i;e=e,o=p.settings,i=t.map(o,function(t,e){return t.nTable}),(e=e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?-1!==(n=t.inArray(e,i))?[o[n]]:null:e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?a=t(e):e instanceof t&&(a=e),a?a.map(function(e){return-1!==(n=t.inArray(this,i))?o[n]:null}).toArray():void 0):[])&&r.push.apply(r,e)}var r=[];if(Array.isArray(e))for(var o=0,i=e.length;o<i;o++)a(e[o]);else a(e);this.context=T(r),n&&t.merge(this,n),this.selector={rows:null,cols:null,opts:null},Ae.extend(this,this,Te)},Ie=(p.Api=Ae,t.extend(Ae.prototype,{any:function(){return 0!==this.count()},concat:xe.concat,context:[],count:function(){return this.flatten().length},each:function(t){for(var e=0,n=this.length;e<n;e++)t.call(this,this[e],e,this);return this},eq:function(t){var e=this.context;return e.length>t?new Ae(e[t],this[t]):null},filter:function(t){var e=[];if(xe.filter)e=xe.filter.call(this,t,this);else for(var n=0,a=this.length;n<a;n++)t.call(this,this[n],n,this)&&e.push(this[n]);return new Ae(this.context,e)},flatten:function(){var t=[];return new Ae(this.context,t.concat.apply(t,this.toArray()))},join:xe.join,indexOf:xe.indexOf||function(t,e){for(var n=e||0,a=this.length;n<a;n++)if(this[n]===t)return n;return-1},iterator:function(t,e,n,r){var o,i,l,s,u,c,d,f,h=[],p=this.context,g=this.selector;for("string"==typeof t&&(r=n,n=e,e=t,t=!1),i=0,l=p.length;i<l;i++){var b=new Ae(p[i]);if("table"===e)(o=n.call(b,p[i],i))!==a&&h.push(o);else if("columns"===e||"rows"===e)(o=n.call(b,p[i],this[i],i))!==a&&h.push(o);else if("column"===e||"column-rows"===e||"row"===e||"cell"===e)for(d=this[i],"column-rows"===e&&(c=Ie(p[i],g.opts)),s=0,u=d.length;s<u;s++)f=d[s],(o="cell"===e?n.call(b,p[i],f.row,f.column,i,s):n.call(b,p[i],f,i,s,c))!==a&&h.push(o)}return h.length||r?((t=(r=new Ae(p,t?h.concat.apply([],h):h)).selector).rows=g.rows,t.cols=g.cols,t.opts=g.opts,r):this},lastIndexOf:xe.lastIndexOf||function(t,e){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(t){var e=[];if(xe.map)e=xe.map.call(this,t,this);else for(var n=0,a=this.length;n<a;n++)e.push(t.call(this,this[n],n));return new Ae(this.context,e)},pluck:function(t){let e=p.util.get(t);return this.map(function(t){return e(t)})},pop:xe.pop,push:xe.push,reduce:xe.reduce||function(t,e){return N(this,t,e,0,this.length,1)},reduceRight:xe.reduceRight||function(t,e){return N(this,t,e,this.length-1,-1,-1)},reverse:xe.reverse,selector:null,shift:xe.shift,slice:function(){return new Ae(this.context,this)},sort:xe.sort,splice:xe.splice,toArray:function(){return xe.slice.call(this)},to$:function(){return t(this)},toJQuery:function(){return t(this)},unique:function(){return new Ae(this.context,T(this))},unshift:xe.unshift}),Ae.extend=function(t,e,n){if(n.length&&e&&(e instanceof Ae||e.__dt_wrapper))for(var a,r=0,o=n.length;r<o;r++)e[(a=n[r]).name]="function"===a.type?function(t,e,n){return function(){var a=e.apply(t,arguments);return Ae.extend(a,a,n.methodExt),a}}(t,a.val,a):"object"===a.type?{}:a.val,e[a.name].__dt_wrapper=!0,Ae.extend(t,e[a.name],a.propExt)},Ae.register=f=function(e,n){if(Array.isArray(e))for(var a=0,r=e.length;a<r;a++)Ae.register(e[a],n);else for(var o=e.split("."),i=Te,l=0,s=o.length;l<s;l++){var u,c,d=function(t,e){for(var n=0,a=t.length;n<a;n++)if(t[n].name===e)return t[n];return null}(i,c=(u=-1!==o[l].indexOf("()"))?o[l].replace("()",""):o[l]);d||i.push(d={name:c,val:{},methodExt:[],propExt:[],type:"object"}),l===s-1?(d.val=n,d.type="function"==typeof n?"function":t.isPlainObject(n)?"object":"other"):i=u?d.methodExt:d.propExt}},Ae.registerPlural=h=function(t,e,n){Ae.register(t,n),Ae.register(e,function(){var t=n.apply(this,arguments);return t===this?this:t instanceof Ae?t.length?Array.isArray(t[0])?new Ae(t.context,t[0]):t[0]:a:t})},f("tables()",function(t){return t!==a&&null!==t?new Ae(me(t,this.context)):this}),f("table()",function(t){var t=this.tables(t),e=t.context;return e.length?new Ae(e[0]):t}),h("tables().nodes()","table().node()",function(){return this.iterator("table",function(t){return t.nTable},1)}),h("tables().body()","table().body()",function(){return this.iterator("table",function(t){return t.nTBody},1)}),h("tables().header()","table().header()",function(){return this.iterator("table",function(t){return t.nTHead},1)}),h("tables().footer()","table().footer()",function(){return this.iterator("table",function(t){return t.nTFoot},1)}),h("tables().containers()","table().container()",function(){return this.iterator("table",function(t){return t.nTableWrapper},1)}),f("draw()",function(t){return this.iterator("table",function(e){"page"===t?st(e):ut(e,!1===(t="string"==typeof t?"full-hold"!==t:t))})}),f("page()",function(t){return t===a?this.page.info().page:this.iterator("table",function(e){Mt(e,t)})}),f("page.info()",function(t){var e,n,r,o,i;return 0===this.context.length?a:(n=(e=this.context[0])._iDisplayStart,r=e.oFeatures.bPaginate?e._iDisplayLength:-1,o=e.fnRecordsDisplay(),{page:(i=-1===r)?0:Math.floor(n/r),pages:i?1:Math.ceil(o/r),start:n,end:e.fnDisplayEnd(),length:r,recordsTotal:e.fnRecordsTotal(),recordsDisplay:o,serverSide:"ssp"===be(e)})}),f("page.len()",function(t){return t===a?0!==this.context.length?this.context[0]._iDisplayLength:a:this.iterator("table",function(e){Ht(e,t)})}),f("ajax.json()",function(){var t=this.context;if(0<t.length)return t[0].json}),f("ajax.params()",function(){var t=this.context;if(0<t.length)return t[0].oAjaxData}),f("ajax.reload()",function(t,e){return this.iterator("table",function(n){Se(n,!1===e,t)})}),f("ajax.url()",function(e){var n=this.context;return e===a?0===n.length?a:(n=n[0]).ajax?t.isPlainObject(n.ajax)?n.ajax.url:n.ajax:n.sAjaxSource:this.iterator("table",function(n){t.isPlainObject(n.ajax)?n.ajax.url=e:n.ajax=e})}),f("ajax.url().load()",function(t,e){return this.iterator("table",function(n){Se(n,!1===e,t)})}),function(e,n){var a,r=[],o=e.aiDisplay,i=e.aiDisplayMaster,l=n.search,u=n.order,n=n.page;if("ssp"==be(e))return"removed"===l?[]:s(0,i.length);if("current"==n)for(d=e._iDisplayStart,f=e.fnDisplayEnd();d<f;d++)r.push(o[d]);else if("current"==u||"applied"==u){if("none"==l)r=i.slice();else if("applied"==l)r=o.slice();else if("removed"==l){for(var c={},d=0,f=o.length;d<f;d++)c[o[d]]=null;r=t.map(i,function(t){return c.hasOwnProperty(t)?null:t})}}else if("index"==u||"original"==u)for(d=0,f=e.aoData.length;d<f;d++)("none"==l||-1===(a=t.inArray(d,o))&&"removed"==l||0<=a&&"applied"==l)&&r.push(d);return r}),Fe=(f("rows()",function(e,n){e===a?e="":t.isPlainObject(e)&&(n=e,e=""),n=ye(n);var o=this.iterator("table",function(o){return ve("row",e,function(e){var n=r(e),o=i.aoData;if(null!==n&&!s)return[n];if(c=c||Ie(i,s),null!==n&&-1!==t.inArray(n,c))return[n];if(null===e||e===a||""===e)return c;if("function"==typeof e)return t.map(c,function(t){var n=o[t];return e(t,n._aData,n.nTr)?t:null});if(e.nodeName)return n=e._DT_RowIndex,d=e._DT_CellIndex,n!==a?o[n]&&o[n].nTr===e?[n]:[]:d?o[d.row]&&o[d.row].nTr===e.parentNode?[d.row]:[]:(n=t(e).closest("*[data-dt-row]")).length?[n.data("dt-row")]:[];if("string"==typeof e&&"#"===e.charAt(0)){var d=i.aIds[e.replace(/^#/,"")];if(d!==a)return[d.idx]}n=u(l(i.aoData,c,"nTr"));return t(n).filter(e).map(function(){return this._DT_RowIndex}).toArray()},i=o,s=n);var i,s,c},1);return o.selector.rows=e,o.selector.opts=n,o}),f("rows().nodes()",function(){return this.iterator("row",function(t,e){return t.aoData[e].nTr||a},1)}),f("rows().data()",function(){return this.iterator(!0,"rows",function(t,e){return l(t.aoData,e,"_aData")},1)}),h("rows().cache()","row().cache()",function(t){return this.iterator("row",function(e,n){e=e.aoData[n];return"search"===t?e._aFilterData:e._aSortData},1)}),h("rows().invalidate()","row().invalidate()",function(t){return this.iterator("row",function(e,n){nt(e,n,t)})}),h("rows().indexes()","row().index()",function(){return this.iterator("row",function(t,e){return e},1)}),h("rows().ids()","row().id()",function(t){for(var e=[],n=this.context,a=0,r=n.length;a<r;a++)for(var o=0,i=this[a].length;o<i;o++){var l=n[a].rowIdFn(n[a].aoData[this[a][o]]._aData);e.push((!0===t?"#":"")+l)}return new Ae(n,e)}),h("rows().remove()","row().remove()",function(){var t=this;return this.iterator("row",function(e,n,r){var o,i,l,s,u,c,d=e.aoData,f=d[n];for(d.splice(n,1),o=0,i=d.length;o<i;o++)if(c=(u=d[o]).anCells,null!==u.nTr&&(u.nTr._DT_RowIndex=o),null!==c)for(l=0,s=c.length;l<s;l++)c[l]._DT_CellIndex.row=o;et(e.aiDisplayMaster,n),et(e.aiDisplay,n),et(t[r],n,!1),0<e._iRecordsDisplay&&e._iRecordsDisplay--,pe(e);r=e.rowIdFn(f._aData);r!==a&&delete e.aIds[r]}),this.iterator("table",function(t){for(var e=0,n=t.aoData.length;e<n;e++)t.aoData[e].idx=e}),this}),f("rows.add()",function(e){var n=this.iterator("table",function(t){for(var n,a=[],r=0,o=e.length;r<o;r++)(n=e[r]).nodeName&&"TR"===n.nodeName.toUpperCase()?a.push(X(t,n)[0]):a.push(q(t,n));return a},1),a=this.rows(-1);return a.pop(),t.merge(a,n),a}),f("row()",function(t,e){return De(this.rows(t,e))}),f("row().data()",function(t){var e,n=this.context;return t===a?n.length&&this.length?n[0].aoData[this[0]]._aData:a:((e=n[0].aoData[this[0]])._aData=t,Array.isArray(t)&&e.nTr&&e.nTr.id&&Q(n[0].rowId)(t,e.nTr.id),nt(n[0],this[0],"data"),this)}),f("row().node()",function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]].nTr||null}),f("row.add()",function(e){e instanceof t&&e.length&&(e=e[0]);var n=this.iterator("table",function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?X(t,e)[0]:q(t,e)});return this.row(n[0])}),t(n).on("plugin-init.dt",function(e,n){var a=new Ae(n),r="on-plugin-init";const o="stateSaveParams."+r,i="destroy."+r;a.on(o,function(t,e,n){for(var a=e.rowIdFn,r=e.aoData,o=[],i=0;i<r.length;i++)r[i]._detailsShow&&o.push("#"+a(r[i]._aData));n.childRows=o}),a.on(i,function(){a.off(o+" "+i)});r=a.state.loaded();r&&r.childRows&&a.rows(t.map(r.childRows,function(t){return t.replace(/:/g,"\\:")})).every(function(){he(n,null,"requestChild",[this])})}),p.util.throttle(function(t){re(t[0])},500)),Le=function(e,n){var r=e.context;r.length&&(n=r[0].aoData[n!==a?n:e[0]])&&n._details&&(n._details.remove(),n._detailsShow=a,n._details=a,t(n.nTr).removeClass("dt-hasChild"),Fe(r))},Re="row().child",Pe=Re+"()",je=(f(Pe,function(t,e){var n=this.context;return t===a?n.length&&this.length?n[0].aoData[this[0]]._details:a:(!0===t?this.child.show():!1===t?Le(this):n.length&&this.length&&_e(n[0],n[0].aoData[this[0]],t,e),this)}),f([Re+".show()",Pe+".show()"],function(t){return we(this,!0),this}),f([Re+".hide()",Pe+".hide()"],function(){return we(this,!1),this}),f([Re+".remove()",Pe+".remove()"],function(){return Le(this),this}),f(Re+".isShown()",function(){var t=this.context;return t.length&&this.length&&t[0].aoData[this[0]]._detailsShow||!1}),/^([^:]+):(name|visIdx|visible)$/),Ne=(f("columns()",function(e,n){e===a?e="":t.isPlainObject(e)&&(n=e,e=""),n=ye(n);var o=this.iterator("table",function(a){return i=e,l=n,u=(o=a).aoColumns,c=w(u,"sName"),d=w(u,"nTh"),ve("column",i,function(e){var n,a=r(e);if(""===e)return s(u.length);if(null!==a)return[0<=a?a:u.length+a];if("function"==typeof e)return n=Ie(o,l),t.map(u,function(t,a){return e(a,Ce(o,a,0,0,n),d[a])?a:null});var i="string"==typeof e?e.match(je):"";if(i)switch(i[2]){case"visIdx":case"visible":var f,h=parseInt(i[1],10);return h<0?[(f=t.map(u,function(t,e){return t.bVisible?e:null}))[f.length+h]]:[M(o,h)];case"name":return t.map(c,function(t,e){return t===i[1]?e:null});default:return[]}return e.nodeName&&e._DT_CellIndex?[e._DT_CellIndex.column]:(a=t(d).filter(e).map(function(){return t.inArray(this,d)}).toArray()).length||!e.nodeName?a:(a=t(e).closest("*[data-dt-column]")).length?[a.data("dt-column")]:[]},o,l);var o,i,l,u,c,d},1);return o.selector.cols=e,o.selector.opts=n,o}),h("columns().header()","column().header()",function(t,e){return this.iterator("column",function(t,e){return t.aoColumns[e].nTh},1)}),h("columns().footer()","column().footer()",function(t,e){return this.iterator("column",function(t,e){return t.aoColumns[e].nTf},1)}),h("columns().data()","column().data()",function(){return this.iterator("column-rows",Ce,1)}),h("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(t,e){return t.aoColumns[e].mData},1)}),h("columns().cache()","column().cache()",function(t){return this.iterator("column-rows",function(e,n,a,r,o){return l(e.aoData,o,"search"===t?"_aFilterData":"_aSortData",n)},1)}),h("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(t,e,n,a,r){return l(t.aoData,r,"anCells",e)},1)}),h("columns().visible()","column().visible()",function(e,n){var r=this,o=this.iterator("column",function(n,r){if(e===a)return n.aoColumns[r].bVisible;var o,i,l=r,r=e,s=n.aoColumns,u=s[l],c=n.aoData;if(r===a)u.bVisible;else if(u.bVisible!==r){if(r)for(var d=t.inArray(!0,w(s,"bVisible"),l+1),f=0,h=c.length;f<h;f++)i=c[f].nTr,o=c[f].anCells,i&&i.insertBefore(o[l],o[d]||null);else t(w(n.aoData,"anCells",l)).detach();u.bVisible=r}});return e!==a&&this.iterator("table",function(o){lt(o,o.aoHeader),lt(o,o.aoFooter),o.aiDisplay.length||t(o.nTBody).find("td[colspan]").attr("colspan",E(o)),re(o),r.iterator("column",function(t,a){he(t,null,"column-visibility",[t,a,e,n])}),n!==a&&!n||r.columns.adjust()}),o}),h("columns().indexes()","column().index()",function(t){return this.iterator("column",function(e,n){return"visible"===t?W(e,n):n},1)}),f("columns.adjust()",function(){return this.iterator("table",function(t){k(t)},1)}),f("column.index()",function(t,e){var n;if(0!==this.context.length)return n=this.context[0],"fromVisible"===t||"toData"===t?M(n,e):"fromData"===t||"toVisible"===t?W(n,e):void 0}),f("column()",function(t,e){return De(this.columns(t,e))}),f("cells()",function(e,n,r){var o,i,s,c,d,f,h;return t.isPlainObject(e)&&(e.row===a?(r=e,e=null):(r=n,n=null)),t.isPlainObject(n)&&(r=n,n=null),null===n||n===a?this.iterator("table",function(n){return o=n,n=e,i=ye(r),b=o.aoData,m=Ie(o,i),S=u(l(b,m,"anCells")),v=t(x([],S)),y=o.aoColumns.length,ve("cell",n,function(e){var n,r="function"==typeof e;if(null===e||e===a||r){for(c=[],d=0,f=m.length;d<f;d++)for(s=m[d],h=0;h<y;h++)p={row:s,column:h},(!r||(g=b[s],e(p,J(o,s,h),g.anCells?g.anCells[h]:null)))&&c.push(p);return c}return t.isPlainObject(e)?e.column!==a&&e.row!==a&&-1!==t.inArray(e.row,m)?[e]:[]:(n=v.filter(e).map(function(t,e){return{row:e._DT_CellIndex.row,column:e._DT_CellIndex.column}}).toArray()).length||!e.nodeName?n:(g=t(e).closest("*[data-dt-row]")).length?[{row:g.data("dt-row"),column:g.data("dt-column")}]:[]},o,i);var o,i,s,c,d,f,h,p,g,b,m,S,v,y}):(h=r?{page:r.page,order:r.order,search:r.search}:{},o=this.columns(n,h),i=this.rows(e,h),h=this.iterator("table",function(t,e){var n=[];for(s=0,c=i[e].length;s<c;s++)for(d=0,f=o[e].length;d<f;d++)n.push({row:i[e][s],column:o[e][d]});return n},1),h=r&&r.selected?this.cells(h,r):h,t.extend(h.selector,{cols:n,rows:e,opts:r}),h)}),h("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(t,e,n){t=t.aoData[e];return t&&t.anCells?t.anCells[n]:a},1)}),f("cells().data()",function(){return this.iterator("cell",function(t,e,n){return J(t,e,n)},1)}),h("cells().cache()","cell().cache()",function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",function(e,n,a){return e.aoData[n][t][a]},1)}),h("cells().render()","cell().render()",function(t){return this.iterator("cell",function(e,n,a){return J(e,n,a,t)},1)}),h("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(t,e,n){return{row:e,column:n,columnVisible:W(t,n)}},1)}),h("cells().invalidate()","cell().invalidate()",function(t){return this.iterator("cell",function(e,n,a){nt(e,n,t,a)})}),f("cell()",function(t,e,n){return De(this.cells(t,e,n))}),f("cell().data()",function(t){var e=this.context,n=this[0];return t===a?e.length&&n.length?J(e[0],n[0].row,n[0].column):a:(G(e[0],n[0].row,n[0].column,t),nt(e[0],n[0].row,"data",n[0].column),this)}),f("order()",function(t,e){var n=this.context;return t===a?0!==n.length?n[0].aaSorting:a:("number"==typeof t?t=[[t,e]]:t.length&&!Array.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),f("order.listener()",function(t,e,n){return this.iterator("table",function(a){ee(a,t,e,n)})}),f("order.fixed()",function(e){var n;return e?this.iterator("table",function(n){n.aaSortingFixed=t.extend(!0,{},e)}):(n=(n=this.context).length?n[0].aaSortingFixed:a,Array.isArray(n)?{pre:n}:n)}),f(["columns().order()","column().order()"],function(e){var n=this;return this.iterator("table",function(a,r){var o=[];t.each(n[r],function(t,n){o.push([n,e])}),a.aaSorting=o})}),f("search()",function(e,n,r,o){var i=this.context;return e===a?0!==i.length?i[0].oPreviousSearch.sSearch:a:this.iterator("table",function(a){a.oFeatures.bFilter&&vt(a,t.extend({},a.oPreviousSearch,{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===o||o}),1)})}),h("columns().search()","column().search()",function(e,n,r,o){return this.iterator("column",function(i,l){var s=i.aoPreSearchCols;if(e===a)return s[l].sSearch;i.oFeatures.bFilter&&(t.extend(s[l],{sSearch:e+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===o||o}),vt(i,i.oPreviousSearch,1))})}),f("state()",function(){return this.context.length?this.context[0].oSavedState:null}),f("state.clear()",function(){return this.iterator("table",function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})})}),f("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),f("state.save()",function(){return this.iterator("table",function(t){re(t)})}),p.versionCheck=p.fnVersionCheck=function(t){for(var e,n,a=p.version.split("."),r=t.split("."),o=0,i=r.length;o<i;o++)if((e=parseInt(a[o],10)||0)!==(n=parseInt(r[o],10)||0))return n<e;return!0},p.isDataTable=p.fnIsDataTable=function(e){var n=t(e).get(0),a=!1;return e instanceof p.Api||(t.each(p.settings,function(e,r){var o=r.nScrollHead?t("table",r.nScrollHead)[0]:null,i=r.nScrollFoot?t("table",r.nScrollFoot)[0]:null;r.nTable!==n&&o!==n&&i!==n||(a=!0)}),a)},p.tables=p.fnTables=function(e){var n=!1,a=(t.isPlainObject(e)&&(n=e.api,e=e.visible),t.map(p.settings,function(n){if(!e||t(n.nTable).is(":visible"))return n.nTable}));return n?new Ae(a):a},p.camelToHungarian=I,f("$()",function(e,n){n=this.rows(n).nodes(),n=t(n);return t([].concat(n.filter(e).toArray(),n.find(e).toArray()))}),t.each(["on","one","off"],function(e,n){f(n+"()",function(){var e=Array.prototype.slice.call(arguments),a=(e[0]=t.map(e[0].split(/\s/),function(t){return t.match(/\.dt\b/)?t:t+".dt"}).join(" "),t(this.tables().nodes()));return a[n].apply(a,e),this})}),f("clear()",function(){return this.iterator("table",function(t){tt(t)})}),f("settings()",function(){return new Ae(this.context,this.context)}),f("init()",function(){var t=this.context;return t.length?t[0].oInit:null}),f("data()",function(){return this.iterator("table",function(t){return w(t.aoData,"_aData")}).flatten()}),f("destroy()",function(n){return n=n||!1,this.iterator("table",function(a){var r,o=a.oClasses,i=a.nTable,l=a.nTBody,s=a.nTHead,u=a.nTFoot,c=t(i),l=t(l),d=t(a.nTableWrapper),f=t.map(a.aoData,function(t){return t.nTr}),u=(a.bDestroying=!0,he(a,"aoDestroyCallback","destroy",[a]),n||new Ae(a).columns().visible(!0),d.off(".DT").find(":not(tbody *)").off(".DT"),t(e).off(".DT-"+a.sInstance),i!=s.parentNode&&(c.children("thead").detach(),c.append(s)),u&&i!=u.parentNode&&(c.children("tfoot").detach(),c.append(u)),a.aaSorting=[],a.aaSortingFixed=[],ne(a),t(f).removeClass(a.asStripeClasses.join(" ")),t("th, td",s).removeClass(o.sSortable+" "+o.sSortableAsc+" "+o.sSortableDesc+" "+o.sSortableNone),l.children().detach(),l.append(f),a.nTableWrapper.parentNode),s=n?"remove":"detach",f=(c[s](),d[s](),!n&&u&&(u.insertBefore(i,a.nTableReinsertBefore),c.css("width",a.sDestroyWidth).removeClass(o.sTable),r=a.asDestroyStripes.length)&&l.children().each(function(e){t(this).addClass(a.asDestroyStripes[e%r])}),t.inArray(a,p.settings));-1!==f&&p.settings.splice(f,1)})}),t.each(["column","row","cell"],function(t,e){f(e+"s().every()",function(t){var n=this.selector.opts,r=this;return this.iterator(e,function(o,i,l,s,u){t.call(r[e](i,"cell"===e?l:n,"cell"===e?n:a),i,l,s,u)})})}),f("i18n()",function(e,n,r){var o=this.context[0],e=Z(e)(o.oLanguage);return e===a&&(e=n),(e=r!==a&&t.isPlainObject(e)?e[r]!==a?e[r]:e._:e).replace("%d",r)}),p.version="1.13.1",p.settings=[],p.models={},p.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0,return:!1},p.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},p.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},p.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(t){try{return JSON.parse((-1===t.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+t.sInstance+"_"+location.pathname))}catch(t){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(t,e){try{(-1===t.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+t.sInstance+"_"+location.pathname,JSON.stringify(e))}catch(t){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:t.extend({},p.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},A(p.defaults),p.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},A(p.defaults.column),p.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,jqXHR:null,json:a,oAjaxData:a,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==be(this)?+this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==be(this)?+this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var t=this._iDisplayLength,e=this._iDisplayStart,n=e+t,a=this.aiDisplay.length,r=this.oFeatures,o=r.bPaginate;return r.bServerSide?!1===o||-1===t?e+a:Math.min(e+t,this._iRecordsDisplay):!o||a<n||-1===t?a:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},p.ext=d={buttons:{},classes:{},build:"bs/jq-3.6.0/dt-1.13.1",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:p.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:p.version},t.extend(d,{afnFiltering:d.search,aTypes:d.type.detect,ofnSearch:d.type.search,oSort:d.type.order,afnSortData:d.order,aoFeatures:d.feature,oApi:d.internal,oStdClasses:d.classes,oPagination:d.pager}),t.extend(p.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_desc_disabled",sSortableDesc:"sorting_asc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""}),p.ext.pager);function He(t,e){var n=[],a=Ne.numbers_length,r=Math.floor(a/2);return e<=a?n=s(0,e):t<=r?((n=s(0,a-2)).push("ellipsis"),n.push(e-1)):((e-1-r<=t?n=s(e-(a-2),e):((n=s(t-r+2,t+r-1)).push("ellipsis"),n.push(e-1),n)).splice(0,0,"ellipsis"),n.splice(0,0,0)),n.DT_el="span",n}t.extend(Ne,{simple:function(t,e){return["previous","next"]},full:function(t,e){return["first","previous","next","last"]},numbers:function(t,e){return[He(t,e)]},simple_numbers:function(t,e){return["previous",He(t,e),"next"]},full_numbers:function(t,e){return["first","previous",He(t,e),"next","last"]},first_last_numbers:function(t,e){return["first",He(t,e),"last"]},_numbers:He,numbers_length:7}),t.extend(!0,p.ext.renderer,{pageButton:{_:function(e,r,o,i,l,s){function u(n,a){for(var r,i,f=h.sPageButtonDisabled,b=function(t){Mt(e,t.data.action,!0)},m=0,S=a.length;m<S;m++)if(r=a[m],Array.isArray(r)){var v=t("<"+(r.DT_el||"div")+"/>").appendTo(n);u(v,r)}else{switch(c=null,d=r,i=e.iTabIndex,r){case"ellipsis":n.append('<span class="ellipsis">&#x2026;</span>');break;case"first":c=p.sFirst,0===l&&(i=-1,d+=" "+f);break;case"previous":c=p.sPrevious,0===l&&(i=-1,d+=" "+f);break;case"next":c=p.sNext,0!==s&&l!==s-1||(i=-1,d+=" "+f);break;case"last":c=p.sLast,0!==s&&l!==s-1||(i=-1,d+=" "+f);break;default:c=e.fnFormatNumber(r+1),d=l===r?h.sPageButtonActive:""}null!==c&&de(t("<a>",{class:h.sPageButton+" "+d,"aria-controls":e.sTableId,"aria-label":g[r],"data-dt-idx":r,tabindex:i,id:0===o&&"string"==typeof r?e.sTableId+"_"+r:null}).html(c).appendTo(n),{action:r},b)}}var c,d,f,h=e.oClasses,p=e.oLanguage.oPaginate,g=e.oLanguage.oAria.paginate||{};try{f=t(r).find(n.activeElement).data("dt-idx")}catch(r){}u(t(r).empty(),i),f!==a&&t(r).find("[data-dt-idx="+f+"]").trigger("focus")}}}),t.extend(p.ext.type.detect,[function(t,e){e=e.oLanguage.sDecimal;return o(t,e)?"num"+e:null},function(t,e){var n;return(!t||t instanceof Date||S.test(t))&&(null!==(n=Date.parse(t))&&!isNaN(n)||D(t))?"date":null},function(t,e){e=e.oLanguage.sDecimal;return o(t,e,!0)?"num-fmt"+e:null},function(t,e){e=e.oLanguage.sDecimal;return i(t,e)?"html-num"+e:null},function(t,e){e=e.oLanguage.sDecimal;return i(t,e,!0)?"html-num-fmt"+e:null},function(t,e){return D(t)||"string"==typeof t&&-1!==t.indexOf("<")?"html":null}]),t.extend(p.ext.type.search,{html:function(t){return D(t)?t:"string"==typeof t?t.replace(b," ").replace(m,""):""},string:function(t){return!D(t)&&"string"==typeof t?t.replace(b," "):t}});function Oe(t,e,n,a){return 0===t||t&&"-"!==t?+(t=(t=e?_(t,e):t).replace&&(n&&(t=t.replace(n,"")),a)?t.replace(a,""):t):-1/0}function ke(e){t.each({num:function(t){return Oe(t,e)},"num-fmt":function(t){return Oe(t,e,y)},"html-num":function(t){return Oe(t,e,m)},"html-num-fmt":function(t){return Oe(t,e,m,y)}},function(t,n){d.type.order[t+e+"-pre"]=n,t.match(/^html\-/)&&(d.type.search[t+e]=d.type.search.html)})}t.extend(d.type.order,{"date-pre":function(t){t=Date.parse(t);return isNaN(t)?-1/0:t},"html-pre":function(t){return D(t)?"":t.replace?t.replace(/<.*?>/g,"").toLowerCase():t+""},"string-pre":function(t){return D(t)?"":"string"==typeof t?t.toLowerCase():t.toString?t.toString():""},"string-asc":function(t,e){return t<e?-1:e<t?1:0},"string-desc":function(t,e){return t<e?1:e<t?-1:0}}),ke(""),t.extend(!0,p.ext.renderer,{header:{_:function(e,n,a,r){t(e.nTable).on("order.dt.DT",function(t,o,i,l){e===o&&(o=a.idx,n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==l[o]?r.sSortAsc:"desc"==l[o]?r.sSortDesc:a.sSortingClass))})},jqueryui:function(e,n,a,r){t("<div/>").addClass(r.sSortJUIWrapper).append(n.contents()).append(t("<span/>").addClass(r.sSortIcon+" "+a.sSortingClassJUI)).appendTo(n),t(e.nTable).on("order.dt.DT",function(t,o,i,l){e===o&&(o=a.idx,n.removeClass(r.sSortAsc+" "+r.sSortDesc).addClass("asc"==l[o]?r.sSortAsc:"desc"==l[o]?r.sSortDesc:a.sSortingClass),n.find("span."+r.sSortIcon).removeClass(r.sSortJUIAsc+" "+r.sSortJUIDesc+" "+r.sSortJUI+" "+r.sSortJUIAscAllowed+" "+r.sSortJUIDescAllowed).addClass("asc"==l[o]?r.sSortJUIAsc:"desc"==l[o]?r.sSortJUIDesc:a.sSortingClassJUI))})}}});function Me(t){return"string"==typeof(t=Array.isArray(t)?t.join(","):t)?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):t}function We(t,n,a,r,o){return e.moment?t[n](o):e.luxon?t[a](o):r?t[r](o):t}var Ee=!1;function Be(t,n,a){var r;if(e.moment){if(!(r=e.moment.utc(t,n,a,!0)).isValid())return null}else if(e.luxon){if(!(r=n&&"string"==typeof t?e.luxon.DateTime.fromFormat(t,n):e.luxon.DateTime.fromISO(t)).isValid)return null;r.setLocale(a)}else n?(Ee||alert("DataTables warning: Formatted date without Moment.js or Luxon - https://datatables.net/tn/17"),Ee=!0):r=new Date(t);return r}function Ue(t){return function(e,n,r,o){0===arguments.length?(r="en",e=n=null):1===arguments.length?(r="en",n=e,e=null):2===arguments.length&&(r=n,n=e,e=null);var i="datetime-"+n;return p.ext.type.order[i]||(p.ext.type.detect.unshift(function(t){return t===i&&i}),p.ext.type.order[i+"-asc"]=function(t,e){t=t.valueOf(),e=e.valueOf();return t===e?0:t<e?-1:1},p.ext.type.order[i+"-desc"]=function(t,e){t=t.valueOf(),e=e.valueOf();return t===e?0:e<t?-1:1}),function(l,s){var u;return null!==l&&l!==a||(l="--now"===o?(u=new Date,new Date(Date.UTC(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds()))):""),"type"===s?i:""===l?"sort"!==s?"":Be("0000-01-01 00:00:00",null,r):!(null===n||e!==n||"sort"===s||"type"===s||l instanceof Date)||null===(u=Be(l,e,r))?l:"sort"===s?u:(l=null===n?We(u,"toDate","toJSDate","")[t]():We(u,"format","toFormat","toISOString",n),"display"===s?Me(l):l)}}}var Ve=",",qe=".";if(Intl)try{for(var Xe=(new Intl.NumberFormat).formatToParts(100000.1),Je=0;Je<Xe.length;Je++)"group"===Xe[Je].type?Ve=Xe[Je].value:"decimal"===Xe[Je].type&&(qe=Xe[Je].value)}catch(h){}function Ge(t){return function(){var e=[le(this[p.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return p.ext.internal[t].apply(this,e)}}return p.datetime=function(t,e){var n="datetime-detect-"+t;e=e||"en",p.ext.type.order[n]||(p.ext.type.detect.unshift(function(a){var r=Be(a,t,e);return!(""!==a&&!r)&&n}),p.ext.type.order[n+"-pre"]=function(n){return Be(n,t,e)||0})},p.render={date:Ue("toLocaleDateString"),datetime:Ue("toLocaleString"),time:Ue("toLocaleTimeString"),number:function(t,e,n,r,o){return null!==t&&t!==a||(t=Ve),null!==e&&e!==a||(e=qe),{display:function(a){if("number"!=typeof a&&"string"!=typeof a)return a;if(""===a||null===a)return a;var i=a<0?"-":"",l=parseFloat(a);if(isNaN(l))return Me(a);l=l.toFixed(n),a=Math.abs(l);l=parseInt(a,10),a=n?e+(a-l).toFixed(n).substring(2):"";return(i=0===l&&0===parseFloat(a)?"":i)+(r||"")+l.toString().replace(/\B(?=(\d{3})+(?!\d))/g,t)+a+(o||"")}}},text:function(){return{display:Me,filter:Me}}},t.extend(p.ext.internal,{_fnExternApiFunc:Ge,_fnBuildAjax:ht,_fnAjaxUpdate:pt,_fnAjaxParameters:gt,_fnAjaxUpdateDraw:bt,_fnAjaxDataSrc:mt,_fnAddColumn:H,_fnColumnOptions:O,_fnAdjustColumnSizing:k,_fnVisibleToColumnIndex:M,_fnColumnIndexToVisible:W,_fnVisbleColumns:E,_fnGetColumns:B,_fnColumnTypes:U,_fnApplyColumnDefs:V,_fnHungarianMap:A,_fnCamelToHungarian:I,_fnLanguageCompat:F,_fnBrowserDetect:j,_fnAddData:q,_fnAddTr:X,_fnNodeToDataIndex:function(t,e){return e._DT_RowIndex!==a?e._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,n,a){return t.inArray(a,e.aoData[n].anCells)},_fnGetCellData:J,_fnSetCellData:G,_fnSplitObjNotation:Y,_fnGetObjectDataFn:Z,_fnSetObjectDataFn:Q,_fnGetDataMaster:K,_fnClearTable:tt,_fnDeleteIndex:et,_fnInvalidate:nt,_fnGetRowElements:at,_fnCreateTr:rt,_fnBuildHead:it,_fnDrawHead:lt,_fnDraw:st,_fnReDraw:ut,_fnAddOptionsHtml:ct,_fnDetectHeader:dt,_fnGetUniqueThs:ft,_fnFeatureHtmlFilter:St,_fnFilterComplete:vt,_fnFilterCustom:yt,_fnFilterColumn:Dt,_fnFilter:_t,_fnFilterCreateSearch:wt,_fnEscapeRegex:Ct,_fnFilterData:At,_fnFeatureHtmlInfo:Lt,_fnUpdateInfo:Rt,_fnInfoMacros:Pt,_fnInitialise:jt,_fnInitComplete:Nt,_fnLengthChange:Ht,_fnFeatureHtmlLength:Ot,_fnFeatureHtmlPaginate:kt,_fnPageChange:Mt,_fnFeatureHtmlProcessing:Wt,_fnProcessingDisplay:Et,_fnFeatureHtmlTable:Bt,_fnScrollDraw:Ut,_fnApplyToChildren:Vt,_fnCalculateColumnWidths:Xt,_fnThrottle:Jt,_fnConvertToWidth:Gt,_fnGetWidestNode:$t,_fnGetMaxLenString:zt,_fnStringToCss:Yt,_fnSortFlatten:Zt,_fnSort:Qt,_fnSortAria:Kt,_fnSortListener:te,_fnSortAttachListener:ee,_fnSortingClasses:ne,_fnSortData:ae,_fnSaveState:re,_fnLoadState:oe,_fnImplementState:ie,_fnSettingsFromNode:le,_fnLog:se,_fnMap:ue,_fnBindAction:de,_fnCallbackReg:fe,_fnCallbackFire:he,_fnLengthOverflow:pe,_fnRenderer:ge,_fnDataSource:be,_fnRowAttributes:ot,_fnExtend:ce,_fnCalculateEnd:function(){}}),((t.fn.dataTable=p).$=t).fn.dataTableSettings=p.settings,t.fn.dataTableExt=p.ext,t.fn.DataTable=function(e){return t(this).dataTable(e).api()},t.each(p,function(e,n){t.fn.DataTable[e]=n}),p});!function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e=e||window,(n=n||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net")(e,n),t(n,0,e.document)}:t(jQuery,window,document)}(function(t,e,n,a){"use strict";var r=t.fn.dataTable;return t.extend(!0,r.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"}),t.extend(r.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"}),r.ext.renderer.pageButton.bootstrap=function(e,o,i,l,s,u){function c(n,a){for(var r,o,l=function(e){e.preventDefault(),t(e.currentTarget).hasClass("disabled")||p.page()==e.data.action||p.page(e.data.action).draw("page")},h=0,S=a.length;h<S;h++)if(o=a[h],Array.isArray(o))c(n,o);else{switch(f=d="",o){case"ellipsis":d="&#x2026;",f="disabled";break;case"first":d=b.sFirst,f=o+(0<s?"":" disabled");break;case"previous":d=b.sPrevious,f=o+(0<s?"":" disabled");break;case"next":d=b.sNext,f=o+(s<u-1?"":" disabled");break;case"last":d=b.sLast,f=o+(s<u-1?"":" disabled");break;default:d=o+1,f=s===o?"active":""}d&&(r=t("<li>",{class:g.sPageButton+" "+f,id:0===i&&"string"==typeof o?e.sTableId+"_"+o:null}).append(t("<a>",{href:"#","aria-controls":e.sTableId,"aria-label":m[o],"data-dt-idx":o,tabindex:e.iTabIndex}).html(d)).appendTo(n),e.oApi._fnBindAction(r,{action:o},l))}}var d,f,h,p=new r.Api(e),g=e.oClasses,b=e.oLanguage.oPaginate,m=e.oLanguage.oAria.paginate||{};try{h=t(o).find(n.activeElement).data("dt-idx")}catch(o){}c(t(o).empty().html('<ul class="pagination"/>').children("ul"),l),h!==a&&t(o).find("[data-dt-idx="+h+"]").trigger("focus")},r});$.fn.dataTableExt.aTypes.unshift(function(t){if(/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(t)){return"ip-address"}return null});$.fn.dataTable.Api.register("order.neutral()",function(){return this.iterator("table",function(t){t.aaSorting.length=0;t.aiDisplay.sort(function(t,n){return t-n});t.aiDisplayMaster.sort(function(t,n){return t-n})})});

/*!
 * easy-pie-chart
 * Lightweight plugin to render simple, animated and retina optimized pie charts
 *
 * @license
 * @author Robert Fleischmann <rendro87@gmail.com> (https://rendro.github.io/easy-pie-chart/)
 * @version 2.1.7
 **/
(function(e,t){if(typeof define==="function"&&define.amd){define(["jquery"],function(e){return t(e)})}else if(typeof exports==="object"){module.exports=t(require("jquery"))}else{t(jQuery)}})(this,function(e){var t=function(e,t){var i;var n=document.createElement("canvas");e.appendChild(n);if(typeof G_vmlCanvasManager==="object"){G_vmlCanvasManager.initElement(n)}var a=n.getContext("2d");n.width=n.height=t.size;var r=1;if(window.devicePixelRatio>1){r=window.devicePixelRatio;n.style.width=n.style.height=[t.size,"px"].join("");n.width=n.height=t.size*r;a.scale(r,r)}a.translate(t.size/2,t.size/2);a.rotate((-1/2+t.rotate/180)*Math.PI);var o=(t.size-t.lineWidth)/2;if(t.scaleColor&&t.scaleLength){o-=t.scaleLength+2}Date.now=Date.now||function(){return+new Date};var s=function(e,t,i){i=Math.min(Math.max(-1,i||0),1);var n=i<=0?true:false;a.beginPath();a.arc(0,0,o,0,Math.PI*2*i,n);a.strokeStyle=e;a.lineWidth=t;a.stroke()};var f=function(){var e;var i;a.lineWidth=1;a.fillStyle=t.scaleColor;a.save();for(var n=24;n>0;--n){if(n%6===0){i=t.scaleLength;e=0}else{i=t.scaleLength*.6;e=t.scaleLength-i}a.fillRect(-t.size/2+e,0,i,1);a.rotate(Math.PI/12)}a.restore()};var d=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();var l=function(){if(t.scaleColor)f();if(t.trackColor)s(t.trackColor,t.trackWidth||t.lineWidth,1)};this.getCanvas=function(){return n};this.getCtx=function(){return a};this.clear=function(){a.clearRect(t.size/-2,t.size/-2,t.size,t.size)};this.draw=function(e){if(!!t.scaleColor||!!t.trackColor){if(a.getImageData&&a.putImageData){if(!i){l();i=a.getImageData(0,0,t.size*r,t.size*r)}else{a.putImageData(i,0,0)}}else{this.clear();l()}}else{this.clear()}a.lineCap=t.lineCap;var n;if(typeof t.barColor==="function"){n=t.barColor(e)}else{n=t.barColor}s(n,t.lineWidth,e/100)}.bind(this);this.animate=function(e,i){var n=Date.now();t.onStart(e,i);var a=function(){var r=Math.min(Date.now()-n,t.animate.duration);var o=t.easing(this,r,e,i-e,t.animate.duration);this.draw(o);t.onStep(e,i,o);if(r>=t.animate.duration){t.onStop(e,i)}else{d(a)}}.bind(this);d(a)}.bind(this)};var i=function(e,i){var n={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:undefined,size:110,rotate:0,animate:{duration:1e3,enabled:true},easing:function(e,t,i,n,a){t=t/(a/2);if(t<1){return n/2*t*t+i}return-n/2*(--t*(t-2)-1)+i},onStart:function(e,t){return},onStep:function(e,t,i){return},onStop:function(e,t){return}};if(typeof t!=="undefined"){n.renderer=t}else if(typeof SVGRenderer!=="undefined"){n.renderer=SVGRenderer}else{throw new Error("Please load either the SVG- or the CanvasRenderer")}var a={};var r=0;var o=function(){this.el=e;this.options=a;for(var t in n){if(n.hasOwnProperty(t)){a[t]=i&&typeof i[t]!=="undefined"?i[t]:n[t];if(typeof a[t]==="function"){a[t]=a[t].bind(this)}}}if(typeof a.easing==="string"&&typeof jQuery!=="undefined"&&jQuery.isFunction(jQuery.easing[a.easing])){a.easing=jQuery.easing[a.easing]}else{a.easing=n.easing}if(typeof a.animate==="number"){a.animate={duration:a.animate,enabled:true}}if(typeof a.animate==="boolean"&&!a.animate){a.animate={duration:1e3,enabled:a.animate}}this.renderer=new a.renderer(e,a);this.renderer.draw(r);if(e.dataset&&e.dataset.percent){this.update(parseFloat(e.dataset.percent))}else if(e.getAttribute&&e.getAttribute("data-percent")){this.update(parseFloat(e.getAttribute("data-percent")))}}.bind(this);this.update=function(e){e=parseFloat(e);if(a.animate.enabled){this.renderer.animate(r,e)}else{this.renderer.draw(e)}r=e;return this}.bind(this);this.disableAnimation=function(){a.animate.enabled=false;return this};this.enableAnimation=function(){a.animate.enabled=true;return this};o()};e.fn.easyPieChart=function(t){return this.each(function(){var n;if(!e.data(this,"easyPieChart")){n=e.extend({},t,e(this).data());e.data(this,"easyPieChart",new i(this,n))}})}});

/*!
 * clipboard.js 2.0.11 (https://clipboardjs.com/)
 * Copyright 2022 by Zeno Rocha
 * Licensed under MIT (https://github.com/zenorocha/clipboard.js/blob/master/LICENSE)
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof t?n=o(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=o(t.value,e):(n=r()(t),c("copy")),n};function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==l(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?f(t,{container:o}):e?"cut"===n?a(e):f(e,{container:o}):void 0};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=v(n);return t=o?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var b=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:"cut",value:function(t){return a(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){t=m("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&d(t.prototype,e),n&&d(t,n),r}()},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a)}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i)})}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a}},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r});

/*!
 * Bootstrap Contextmenu 0.3.3 (https://github.com/sydcanem/bootstrap-contextmenu)
 * Copyright 2015 James Santos
 * Licensed under MIT
 */
(function(e,t){e.fn.contextMenu=function(n){var r=e("#content"),i=".dropdown-submenu";return this.each(function(){e(this).on("contextmenu",function(r){e(n.menuSelector).find(i).removeClass("right");if(e(r.target).parents("tr").hasClass("directory_go_up")||e(r.target).parents("tr").find("td.dataTables_empty").length){r.preventDefault();return}if(r.ctrlKey||r.altKey||r.shiftKey){r.preventDefault();r.stopPropagation();typeof t.getSelection==="function"&&t.getSelection().removeAllRanges();e(r.target).parents("tr").find('td.ui_checked_checkbox input[type="checkbox"]').trigger("click");return}___contextmenu__triggered___=1;e(n.menuSelector).data("invokedOn",e(r.target)).show(0,false,function(){n.menuSelectorTriggered.call(this,e(this).data("invokedOn"),e(r.target));delete ___contextmenu__triggered___}).css({position:"absolute",left:a(e("body").data("mousePageX"),"width","scrollLeft",r),top:a(e("body").data("mousePageY"),"height","scrollTop",r)}).off("click").on("click",function(t){if(e(t.target).parent().hasClass("disabled")||e(t.target).parents("[data-go_up-target]").hasClass("disabled")||e(t.target).is("[data-prevent-default]")||e(t.target).is(".dropdown-menu")||e(t.target).is(".divider")){t.preventDefault();return}e(this).hide();var r=e(this).data("invokedOn");var i=e(t.target);n.menuSelected.call(this,r,i,t);t.preventDefault()});e("body").off("click.fmcmenu");e("body").on("click.fmcmenu",function(t){if(!e(t.target).closest(e(n.menuSelector)).length){e(n.menuSelector).hide();delete ___contextmenu__triggered___}});return false})});function a(a,o,c,l){var s=e(t)[c](),d=r.scrollTop(),u=parseInt(r.css("margin-left")),f=content_page_calc_width(),_=t.innerHeight,g=a-(o==="width"?u:0)+s,h=e(n.menuSelector).outerWidth(),p=e(n.menuSelector).outerHeight(),m=e($v__fm__container_fluid).offset().top,v=e($v__fm__container_fluid).offset().left;if(o==="height"){g-=m;if(p>_-a&&p/1.6<_-a){g-=p/2}else if(_<a+p){var y=0;if(a<p){y=parseInt(p-a)+m+d}g-=p-m-d-y}}var b=h*1.8;if(o==="width"&&f<a+b&&b<a-v){g-=h;e(n.menuSelector).find(i).addClass("right")}return g}}})(jQuery,window);

/*!
 * PJAX (https://github.com/defunkt/jquery-pjax)
 * Copyright 2012 Chris Wanstrath
 * Licensed under MIT
 */
(function(e){function t(t,a,n){n=x(a,n);return this.on("click.pjax",t,function(t){var a=n;if(!a.container){a=e.extend({},n);a.container=e(this).attr("data-pjax")}r(t,a)})}function r(t,r,a){a=x(r,a);var i=t.currentTarget;var o=e(i);if(i.tagName.toUpperCase()!=="A")throw"$.fn.pjax or $.pjax.click requires an anchor element";if(t.which>1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;if(location.protocol!==i.protocol||location.hostname!==i.hostname)return;if(i.href.indexOf("#")>-1&&g(i)==g(location))return;if(t.isDefaultPrevented())return;var s={url:i.href,container:o.attr("data-pjax"),target:i};var c=e.extend({},s,a);var u=e.Event("pjax:click");o.trigger(u,[c]);if(!u.isDefaultPrevented()){n(c);t.preventDefault();o.trigger("pjax:clicked",[c])}}function a(t,r,a){a=x(r,a);var i=t.currentTarget,o=e(i);if(i.tagName.toUpperCase()!=="FORM")throw"$.pjax.submit requires a form element";var s={type:(o.attr("method")||"GET").toUpperCase(),url:o.attr("action"),container:o.attr("data-pjax"),target:i};if(s.type!=="GET"&&window.FormData!==undefined){var c=o.attr("enctype")&&o.attr("enctype").indexOf("form-data")>-1?0:1;s.data=c?o.serialize():new FormData(o[0]);s.processData=false;s.contentType=false}else{if(o.find(":file").length){return}s.data=o.serializeArray()}n(e.extend({},s,a));t.preventDefault()}function n(t){t=e.extend(true,{},e.ajaxSettings,n.defaults,t);if(e.isFunction(t.url)){t.url=t.url()}var r=m(t.url).hash;var a=e.type(t.container);if(a!=="string"){throw"expected string value for 'container' option; got "+a}var i=t.context=e(t.container);if(!i.length){throw"the container selector '"+t.container+"' did not match anything"}if(!t.data)t.data={};function s(r,a,n){if(!n)n={};n.relatedTarget=t.target;var o=e.Event(r,n);i.trigger(o,a);return!o.isDefaultPrevented()}var c;t.beforeSend=function(a,n){if(n.type!=="GET"){n.timeout=0}var i=plugins.pjax.headers.send.get();if(!e.isEmptyObject(i)){for(const e in i){a.setRequestHeader("X-agent-"+e+"",i[e])}}a.setRequestHeader("X-no-links","1");a.setRequestHeader("X-PJAX","true");a.setRequestHeader("X-PJAX-Container",t.container);a.setRequestHeader("X-PJAX-URL",t.url);if(!s("pjax:beforeSend",[a,n]))return false;if(n.timeout>0){c=setTimeout(function(){if(s("pjax:timeout",[a,t]))a.abort("timeout")},n.timeout);n.timeout=0}var o=m(n.url);if(r)o.hash=r;t.requestUrl=v(o)};t.complete=function(e,r){if(c)clearTimeout(c);s("pjax:complete",[e,r,t]);s("pjax:end",[e,t])};t.error=function(e,r,a){var n=y("",e,t);var i=s("pjax:error",[e,r,a,t]);if(t.type=="GET"&&r!=="abort"&&i){o(n.url)}};t.success=function(a,o,c){if(!session.status(a)){return}if(v___theme_reload){return}if(snippets.pjaxHooks(a,"csf")){return}var u=n.state;var l=typeof e.pjax.defaults.version==="function"?e.pjax.defaults.version():e.pjax.defaults.version;var f=c.getResponseHeader("X-PJAX-Version");var p=y(a,c,t);var h=m(p.url);if(r){h.hash=r;p.url=h.href}if(l&&f&&l!==f){theme_open_new_tab(p.url);page_remove_progress();return}if(!p.contents){var v=XHR.headers(c)[1],g=c.getResponseHeader("Content-Disposition");if(g&&g.toLowerCase()==="attachment"){g=1}else{g=0}if(vars.previous_request&&g){var x=e(vars.previous_request.currentTarget).serialize();window.location.href=vars.previous_request.currentTarget.action+"?"+x;get_pjax_content(location.href);vars.previous_request=String();return}if(!a.includes("data-predownload")&&(Test.strContains(v,"text/html")||Test.strContains(v,"text/plain"))){if(core.curModule("theme")||core.curModule("change-user")||core.curModuleFile("webmin","change_theme.cgi")){window.location.href=location.origin+v___location_prefix}else{theme_open_new_tab(p.url)}}else{theme_open_new_tab(h.href);setTimeout(function(){page_remove_progress()},300)}page_remove_progress();return}n.state={id:t.id||d(),url:p.url,title:p.title,container:t.container,fragment:t.fragment,timeout:t.timeout};if(t.push||t.replace){var _=(!p.url.endsWith("/")&&!Test.strContains(p.url,".cgi")?p.url+"/":p.url)+(!Test.strContains(p.url,$__theme_navigation)?(Test.strContains(p.url,"?")?"&":"?")+$__theme_navigation:"");if(v___theme_pjax_call===1){if(p.url==="/"){var j=String();try{var b=URI(v___location_previous),T=b.path();if(T&&T!=="/"){j=T}}catch(e){}_=link_type_convert(j||v___location_prefix+"/sysinfo.cgi",2)}window.history.replaceState(n.state,p.title,_)}else{if(link_type_convert(location.href,1)===n.state.url&&vars.pjax.cache.disabled(n.state.url)){}else{if(!vars.ajax.progressing){window.history.pushState(n.state,p.title,_)}}}}var E=e.contains(t.container,document.activeElement);if(E){try{document.activeElement.blur()}catch(e){}}s("pjax:beforeReplace",[p.contents,t],{state:n.state,previousState:u});if(vars.pjax.status.replace_contents()===1&&vars.pjax.status.replace_contents()!==-1){i.html(p.contents)}var S=i.find("input[autofocus], textarea[autofocus]").last()[0];if(S&&document.activeElement!==S){S.focus()}w(p.scripts);var C=t.scrollTo;if(r){var R=decodeURIComponent(r.slice(1));var P=document.getElementById(R)||document.getElementsByName(R)[0];if(P)C=e(P).offset().top}if(typeof C=="number")e(window).scrollTop(C);s("pjax:success",[a,o,c,t])};if(!n.state){n.state={id:d(),url:window.location.href,title:document.title,container:t.container,fragment:t.fragment,timeout:t.timeout};window.history.replaceState(n.state,document.title)}p(n.xhr);n.options=t;var u=n.xhr=e.ajax(t);if(u.readyState>0&&!v___theme_ajax_error){if(t.push&&!t.replace){if(v___theme_pjax_call!==1){S(n.state.id,[t.container,h(i)])}v___location_previous=location.href;v___module_previous=v___module}s("pjax:start",[u,t]);s("pjax:send",[u,t])}return n.xhr}function i(t,r){var a={url:window.location.href,push:false,replace:true,scrollTo:false};return n(e.extend(a,x(t,r)))}function o(e){window.history.replaceState(null,"",n.state.url);window.location.replace(e)}var s=true;var c=window.location.href;var u=window.history.state;if(u&&u.container){n.state=u}if("state"in window.history){s=false}function l(t){var r=t&&t.state&&t.state.url&&vars.pjax.cache.disabled(t.state.url);if(vars.h.selector.content.get().hasClass("progressing")||r){if(r){get_pjax_content(t.state.url);return}if(!unbuffered_header_processor_allow_popstate()){window.history.go(1);return}}if(page.handle.content.preloader.processing()){theme.veiled(1);theme_reload(1);return}if(!s){p(n.xhr)}var a=n.state;var i=t.state;var u;if(i&&i.container){if(s&&c==i.url)return;if(a){if(a.id===i.id)return;u=a.id<i.id?"forward":"back"}var l=b[i.id]||[];var f=l[0]||i.container;var d=e(f),v=l[1];if(d.length){if(a){C(u,a.id,[f,h(d)])}var m=e.Event("pjax:popstate",{state:i,hasContents:v?1:0,direction:u});d.trigger(m);var g={id:i.id,url:i.url,container:f,push:false,fragment:i.fragment,timeout:i.timeout,scrollTo:false};if(v){d.trigger("pjax:start",[null,g]);n.state=i;if(i.title)document.title=i.title;var x=e.Event("pjax:beforeReplace",{state:i,previousState:a});d.trigger(x,[v,g]);d.html(v);d.trigger("pjax:end",[null,g])}else{n(g)}d[0].offsetHeight;theme_title_generate()}else{o(location.href)}}s=false}function f(t){var r=e.isFunction(t.url)?t.url():t.url,a=t.type?t.type.toUpperCase():"GET";var n=e("<form>",{method:a==="GET"?"GET":"POST",action:r,style:"display:none"});if(a!=="GET"&&a!=="POST"){n.append(e("<input>",{type:"hidden",name:"_method",value:a.toLowerCase()}))}var i=t.data;if(typeof i==="string"){e.each(i.split("&"),function(t,r){var a=r.split("=");n.append(e("<input>",{type:"hidden",name:a[0],value:a[1]}))})}else if(e.isArray(i)){e.each(i,function(t,r){n.append(e("<input>",{type:"hidden",name:r.name,value:r.value}))})}else if(typeof i==="object"){var o;for(o in i)n.append(e("<input>",{type:"hidden",name:o,value:i[o]}))}e(document.body).append(n);n.submit()}function p(t){if(t&&t.readyState<4){t.onreadystatechange=e.noop;t.abort()}}function d(){return(new Date).getTime()}function h(e){var t=e.clone();t.find("script").each(function(){if(!this.src)jQuery._data(this,"globalEval",false)});return t.contents()}function v(e){e.search=e.search.replace(/([?&])(_pjax|_)=[^&]*/g,"");return e.href.replace(/\?($|#)/,"$1")}function m(e){var t=document.createElement("a");t.href=e;return t}function g(e){return e.href.replace(/#.*/,"")}function x(t,r){if(t&&r){r=e.extend({},r);r.container=t;return r}else if(e.isPlainObject(t)){return t}else{return{container:t}}}function _(e,t){return e.filter(t).add(e.find(t))}function j(t){return e.parseHTML(t,document,true)}function y(t,r,a){var n={},i=/<html/i.test(t),o=t.match(/<html\s+data-redirect="(.*?)"/),s=String();if(o&&o[1]){s=o[1]}var c=r.getResponseHeader("X-PJAX-URL");n.url=c?v(m(c)):a.requestUrl;if(s){n.url=s}var u,l;if(i){l=e(j(t.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0]));var f=t.match(/<body[^>]*>([\s\S.]*)<\/body>/i);if(f&&f.length){u=e(j(f[0]))}else{u=e(j(extract_content(t,"<body","</body>",0)))}}else{l=u=e(j(t))}if(u.length===0)return n;n.title=_(l,"title").last().text();if(a.fragment){var p=String();if(a.fragment==="body"){p=u}else{p=_(u,a.fragment).first()}if(p.length){n.contents=a.fragment==="body"?p:p.contents();if(!n.title)n.title=p.attr("title")||p.data("title")}}else if(!i){n.contents=u}if(n.contents){n.contents=n.contents.not(function(){return e(this).is("title")});n.contents.find("title").remove();n.scripts=_(n.contents,"script[src]").remove();n.contents=n.contents.not(n.scripts)}if(n.title)n.title=e.trim(n.title);return n}function w(t){if(!t)return;var r=e("script[src]");t.each(function(){var t=this.src;var a=r.filter(function(){return this.src===t});if(a.length)return;var n=document.createElement("script");var i=e(this).attr("type");if(i)n.type=i;n.src=e(this).attr("src");document.head.appendChild(n)})}var b={};var T=[];var E=[];function S(t,r,a){if(vars.pjax.cache.disabled()){if(!a){return}}if(a){t=e.pjax.state.id;r=[e.pjax.options.container,h(a[0])];e.pjax.state={id:d(),url:a[1],title:a[2],container:e.pjax.options.container,fragment:e.pjax.options.fragment,timeout:e.pjax.options.timeout};window.history.pushState(e.pjax.state,a[2],a[1])}b[t]=r;E.push(t);R(T,0);R(E,n.defaults.maxCacheLength)}n.cache=S;function C(e,t,r){var a,i;b[t]=r;if(e==="forward"){a=E;i=T}else{a=T;i=E}a.push(t);if(t=i.pop())delete b[t];R(a,n.defaults.maxCacheLength)}function R(e,t){while(e.length>t)delete b[e.shift()]}function P(){return e("meta").filter(function(){var t=e(this).attr("http-equiv");return t&&t.toUpperCase()==="X-PJAX-VERSION"}).attr("content")}function X(){e.fn.pjax=t;e.pjax=n;e.pjax.enable=e.noop;e.pjax.disable=q;e.pjax.click=r;e.pjax.submit=a;e.pjax.reload=i;e.pjax.defaults={timeout:650,push:true,replace:false,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:10,version:P};e(window).on("popstate.pjax",l)}function q(){e.fn.pjax=function(){return this};e.pjax=f;e.pjax.enable=X;e.pjax.disable=e.noop;e.pjax.click=e.noop;e.pjax.submit=e.noop;e.pjax.reload=function(){window.location.reload()};e(window).off("popstate.pjax",l)}if(e.event.props&&e.inArray("state",e.event.props)<0){e.event.props.push("state")}else if(!("state"in e.Event.prototype)){e.event.addProp("state")}e.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/);e.support.pjax?X():q()})(jQuery);

/*!
 * Malihu Scrollbar Plugin 3.1.5 (https://github.com/malihu/malihu-custom-scrollbar-plugin)
 * Copyright 2014 Manos Malihutsakis
 * Licensed under MIT
 */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r=t||window.event,l=s.call(arguments,1),c=0,f=0,u=0,h=0,m=0,p=0;if(t=e.event.fix(r),t.type="mousewheel","detail"in r&&(u=-1*r.detail),"wheelDelta"in r&&(u=r.wheelDelta),"wheelDeltaY"in r&&(u=r.wheelDeltaY),"wheelDeltaX"in r&&(f=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(f=-1*u,u=0),c=0===u?f:u,"deltaY"in r&&(u=-1*r.deltaY,c=u),"deltaX"in r&&(f=r.deltaX,0===u&&(c=-1*f)),0!==u||0!==f){if(1===r.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,u*=g,f*=g}else if(2===r.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,u*=v,f*=v}if(h=Math.max(Math.abs(u),Math.abs(f)),(!n||n>h)&&(n=h,a(r,h)&&(n/=40)),a(r,h)&&(c/=40,f/=40,u/=40),c=Math[c>=1?"floor":"ceil"](c/n),f=Math[f>=1?"floor":"ceil"](f/n),u=Math[u>=1?"floor":"ceil"](u/n),d.settings.normalizeOffset&&this.getBoundingClientRect){var x=this.getBoundingClientRect();m=t.clientX-x.left,p=t.clientY-x.top}return t.deltaX=f,t.deltaY=u,t.deltaFactor=n,t.offsetX=m,t.offsetY=p,t.deltaMode=0,l.unshift(t,c,f,u),o&&clearTimeout(o),o=setTimeout(i,200),(e.event.dispatch||e.event.handle).apply(this,l)}}function i(){n=null}function a(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var o,n,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],l="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],s=Array.prototype.slice;if(e.event.fixHooks)for(var c=r.length;c;)e.event.fixHooks[r[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=l.length;i;)this.addEventListener(l[--i],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=l.length;i;)this.removeEventListener(l[--i],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var i=e(t),a=i["offsetParent"in e.fn?"offsetParent":"parent"]();return a.length||(a=e("body")),parseInt(a.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof module!=="undefined"&&module.exports){module.exports=e}else{e(jQuery,window,document)}})(function(e){(function(t){var i=typeof define==="function"&&define.amd,a=typeof module!=="undefined"&&module.exports,o="https:"==document.location.protocol?"https:":"http:",n="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";if(!i){if(a){require("jquery-mousewheel")(e)}else{e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+o+"//"+n+"%3E%3C/script%3E"))}}t()})(function(){var t="mCustomScrollbar",i="mCS",a=".mCustomScrollbar",o={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:true,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:true,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:true,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:true,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:true,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:true}},n=0,r={},s=window.attachEvent&&!window.addEventListener?1:0,c=false,d,f=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(true,{},o,t),l=m.call(this);if(t.live){var s=t.liveSelector||this.selector||a,c=e(s);if(t.live==="off"){g(s);return}r[s]=setTimeout(function(){c.mCustomScrollbar(t);if(t.live==="once"&&c.length){g(s)}},500)}else{g(s)}t.setWidth=t.set_width?t.set_width:t.setWidth;t.setHeight=t.set_height?t.set_height:t.setHeight;t.axis=t.horizontalScroll?"x":v(t.axis);t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia;if(typeof t.mouseWheel!=="object"&&t.mouseWheel==true){t.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",normalizeDelta:false,invert:false}}t.mouseWheel.scrollAmount=!t.mouseWheelPixels?t.mouseWheel.scrollAmount:t.mouseWheelPixels;t.mouseWheel.normalizeDelta=!t.advanced.normalizeMouseWheelDelta?t.mouseWheel.normalizeDelta:t.advanced.normalizeMouseWheelDelta;t.scrollButtons.scrollType=x(t.scrollButtons.scrollType);p(t);return e(l).each(function(){var a=e(this);if(!a.data(i)){a.data(i,{idx:++n,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:false,tweenRunning:false,sequential:{},langDir:a.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var o=a.data(i),r=o.opt,l=a.data("mcs-axis"),s=a.data("mcs-scrollbar-position"),c=a.data("mcs-theme");if(l){r.axis=l}if(s){r.scrollbarPosition=s}if(c){r.theme=c;p(r)}_.call(this);if(o&&r.callbacks.onCreate&&typeof r.callbacks.onCreate==="function"){r.callbacks.onCreate.call(this)}e("#mCSB_"+o.idx+"_container img:not(."+f[2]+")").addClass(f[2]);u.update.call(null,a)}})},update:function(t,a){var o=t||m.call(this);return e(o).each(function(){var t=e(this);if(t.data(i)){var o=t.data(i),n=o.opt,r=e("#mCSB_"+o.idx+"_container"),l=e("#mCSB_"+o.idx),s=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(!r.length){return}if(o.tweenRunning){J(t)}if(a&&o&&n.callbacks.onBeforeUpdate&&typeof n.callbacks.onBeforeUpdate==="function"){n.callbacks.onBeforeUpdate.call(this)}if(t.hasClass(f[3])){t.removeClass(f[3])}if(t.hasClass(f[4])){t.removeClass(f[4])}l.css("max-height","none");if(l.height()!==t.height()){l.css("max-height",t.height())}b.call(this);if(n.axis!=="y"&&!n.advanced.autoExpandHorizontalScroll){r.css("width",S(r))}o.overflowed=k.call(this);I.call(this);if(n.autoDraggerLength){y.call(this)}B.call(this);O.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];if(n.axis!=="x"){if(!o.overflowed[0]){M.call(this);if(n.axis==="y"){D.call(this)}else if(n.axis==="yx"&&o.overflowed[1]){K(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"})}}else if(s[0].height()>s[0].parent().height()){M.call(this)}else{K(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"});o.contentReset.y=null}}if(n.axis!=="y"){if(!o.overflowed[1]){M.call(this);if(n.axis==="x"){D.call(this)}else if(n.axis==="yx"&&o.overflowed[0]){K(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"})}}else if(s[1].width()>s[1].parent().width()){M.call(this)}else{K(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"});o.contentReset.x=null}}if(a&&o){if(a===2&&n.callbacks.onImageLoad&&typeof n.callbacks.onImageLoad==="function"){n.callbacks.onImageLoad.call(this)}else if(a===3&&n.callbacks.onSelectorChange&&typeof n.callbacks.onSelectorChange==="function"){n.callbacks.onSelectorChange.call(this)}else if(n.callbacks.onUpdate&&typeof n.callbacks.onUpdate==="function"){n.callbacks.onUpdate.call(this)}}Z.call(this)}})},scrollTo:function(t,a){if(typeof t=="undefined"||t==null){return}var o=m.call(this);return e(o).each(function(){var o=e(this);if(o.data(i)){var n=o.data(i),r=n.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollOffset:0,scrollOffsetEdge:true,scrollEasing:"mcsEaseInOut",moveDragger:false,timeout:60,callbacks:true,onStart:true,onUpdate:true,onComplete:true},s=e.extend(true,{},l,a),c=V.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=Q.call(this,c[0],"y");c[1]=Q.call(this,c[1],"x");if(s.moveDragger){c[0]*=n.scrollRatio.y;c[1]*=n.scrollRatio.x}s.dur=le()?0:d;setTimeout(function(){if(c[0]!==null&&typeof c[0]!=="undefined"&&r.axis!=="x"&&n.overflowed[0]){s.dir="y";s.overwrite="all";var i=c[0];if(s.scrollOffset!==0&&typeof s.scrollOffset=="object"){var a=s.scrollOffset[0],l=parseInt(a.height()),d=s.scrollOffset[1],f=s.scrollOffset[2],u=parseInt(l/d),h=parseInt(l/f);i=i-u;var m=t.offset().top-a.offset().top;function p(t,i){var a=e(t),o=i,n=o.scrollTop()+50,r=n+o.height(),l=a.offset().top,s=l+a.height();return s<=r&&l>=n}if(p(t,a)&&l-m>h){s.scrollOffsetEdge=false}}s.scrollOffsetEdge&&K(o,i.toString(),s)}if(c[1]!==null&&typeof c[1]!=="undefined"&&r.axis!=="y"&&n.overflowed[1]){s.dir="x";s.overwrite="none";K(o,c[1].toString(),s)}},s.timeout)}})},stop:function(){var t=m.call(this);return e(t).each(function(){var t=e(this);if(t.data(i)){J(t)}})},disable:function(t){var a=m.call(this);return e(a).each(function(){var a=e(this);if(a.data(i)){var o=a.data(i);Z.call(this,"remove");D.call(this);if(t){M.call(this)}I.call(this,true);a.addClass(f[3])}})},destroy:function(){var a=m.call(this);return e(a).each(function(){var o=e(this);if(o.data(i)){var n=o.data(i),r=n.opt,l=e("#mCSB_"+n.idx),s=e("#mCSB_"+n.idx+"_container"),c=e(".mCSB_"+n.idx+"_scrollbar");if(r.live){g(r.liveSelector||e(a).selector)}Z.call(this,"remove");D.call(this);M.call(this);o.removeData(i);ie(this,"mcs");c.remove();s.find("img."+f[2]).removeClass(f[2]);l.replaceWith(s.contents());o.removeClass(t+" _"+i+"_"+n.idx+" "+f[6]+" "+f[7]+" "+f[5]+" "+f[3]).addClass(f[4])}})}},m=function(){return typeof e(this)!=="object"||e(this).length<1?a:this},p=function(t){var i=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],o=["minimal","minimal-dark"],n=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,i)>-1?false:t.autoDraggerLength;t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?false:t.autoExpandScrollbar;t.scrollButtons.enable=e.inArray(t.theme,o)>-1?false:t.scrollButtons.enable;t.autoHideScrollbar=e.inArray(t.theme,n)>-1?true:t.autoHideScrollbar;t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},g=function(e){if(r[e]){clearTimeout(r[e]);ie(r,e)}},v=function(e){return e==="yx"||e==="xy"||e==="auto"?"yx":e==="x"||e==="horizontal"?"x":"y"},x=function(e){return e==="stepped"||e==="pixels"||e==="step"||e==="click"?"stepped":"stepless"},_=function(){var a=e(this),o=a.data(i),n=o.opt,r=n.autoExpandScrollbar?" "+f[1]+"_expand":"",l=["<div id='mCSB_"+o.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+f[12]+"'><div id='mCSB_"+o.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar'></div></div><div class='mCSB_draggerRail'></div></div></div>","<div id='mCSB_"+o.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+f[12]+"'><div id='mCSB_"+o.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar'></div></div><div class='mCSB_draggerRail'></div></div></div>"],s=n.axis==="yx"?"mCSB_vertical_horizontal":n.axis==="x"?"mCSB_horizontal":"mCSB_vertical",c=n.axis==="yx"?l[0]+l[1]:n.axis==="x"?l[1]:l[0],d=n.axis==="yx"?"<div id='mCSB_"+o.idx+"_container_wrapper' class='mCSB_container_wrapper'></div>":"",u=n.autoHideScrollbar?" "+f[6]:"",h=n.axis!=="x"&&o.langDir==="rtl"?" "+f[7]:"";if(n.setWidth){a.css("width",n.setWidth)}if(n.setHeight){a.css("height",n.setHeight)}n.setLeft=n.axis!=="y"&&o.langDir==="rtl"?"989999px":n.setLeft;a.addClass(t+" _"+i+"_"+o.idx+u+h).wrapInner("<div id='mCSB_"+o.idx+"' class='mCustomScrollBox mCS-"+n.theme+" "+s+"'><div id='mCSB_"+o.idx+"_container' class='mCSB_container' style='position:relative; top:"+n.setTop+"; left:"+n.setLeft+";' dir='"+o.langDir+"'></div></div>");var m=e("#mCSB_"+o.idx),p=e("#mCSB_"+o.idx+"_container");if(n.axis!=="y"&&!n.advanced.autoExpandHorizontalScroll){p.css("width",S(p))}if(n.scrollbarPosition==="outside"){if(a.css("position")==="static"){a.css("position","relative")}a.css("overflow","visible");m.addClass("mCSB_outside").after(c)}else{m.addClass("mCSB_inside").append(c);p.wrap(d)}C.call(this);var g=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height());g[1].css("min-width",g[1].width())},S=function(t){var i=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(true)}).get())],a=t.parent().width();return i[0]>a?i[0]:i[1]>a?i[1]:"100%"},b=function(){var t=e(this),a=t.data(i),o=a.opt,n=e("#mCSB_"+a.idx+"_container");if(o.advanced.autoExpandHorizontalScroll&&o.axis!=="y"){n.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(n[0].scrollWidth);if(o.advanced.autoExpandHorizontalScroll===3||o.advanced.autoExpandHorizontalScroll!==2&&r>n.parent().width()){n.css({width:r,"min-width":"100%","overflow-x":"inherit"})}else{n.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;'></div>").css({width:Math.ceil(n[0].getBoundingClientRect().right+.4)-Math.floor(n[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}}},C=function(){var t=e(this),a=t.data(i),o=a.opt,n=e(".mCSB_"+a.idx+"_scrollbar:first"),r=!ne(o.scrollButtons.tabindex)?"":"tabindex='"+o.scrollButtons.tabindex+"'",l=["<a href='#' class='"+f[13]+"' "+r+"></a>","<a href='#' class='"+f[14]+"' "+r+"></a>","<a href='#' class='"+f[15]+"' "+r+"></a>","<a href='#' class='"+f[16]+"' "+r+"></a>"],s=[o.axis==="x"?l[2]:l[0],o.axis==="x"?l[3]:l[1],l[2],l[3]];if(o.scrollButtons.enable){n.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])}},y=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),n=e("#mCSB_"+a.idx+"_container"),r=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],c=o.height()/n.outerHeight(false),d=o.width()/n.outerWidth(false);ratio=[Math.min(c,1),Math.min(d,1)],l=[parseInt(r[0].css("min-height")),Math.round(ratio[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(ratio[1]*r[1].parent().width())],h=s&&l[1]<l[0]?l[0]:l[1],w=s&&l[3]<l[2]?l[2]:l[3];r[0].css({height:h,"max-height":r[0].parent().height()-(ratio[0]!=1?10:0)}).find(".mCSB_dragger_bar").css({"line-height":l[0]+"px"});r[1].css({width:w,"max-width":r[1].parent().width()-(ratio[1]!=1?10:0)})},B=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),n=e("#mCSB_"+a.idx+"_container"),r=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],l=[n.outerHeight(false)-o.height(),n.outerWidth(false)-o.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];a.scrollRatio={y:s[0],x:s[1]}},T=function(e,t,i){var a=i?f[0]+"_expanded":"",o=e.closest(".mCSB_scrollTools");if(t==="active"){e.toggleClass(f[0]+" "+a);o.toggleClass(f[1]);e[0]._draggable=e[0]._draggable?0:1}else{if(!e[0]._draggable){if(t==="hide"){e.removeClass(f[0]);o.removeClass(f[1])}else{e.addClass(f[0]);o.addClass(f[1])}}}},k=function(){var t=e(this),a=t.data(i),o=e("#mCSB_"+a.idx),n=e("#mCSB_"+a.idx+"_container"),r=a.overflowed==null?n.height():n.outerHeight(false),l=a.overflowed==null?n.width():n.outerWidth(false),s=n[0].scrollHeight,c=n[0].scrollWidth;if(s>r){r=s}if(c>l){l=c}return[r>o.height(),l>o.width()]},M=function(){var t=e(this),a=t.data(i),o=a.opt,n=e("#mCSB_"+a.idx),r=e("#mCSB_"+a.idx+"_container"),l=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")];J(t);if(o.axis!=="x"&&!a.overflowed[0]||o.axis==="y"&&a.overflowed[0]){l[0].add(r).css("top",0);K(t,"_resetY")}if(o.axis!=="y"&&!a.overflowed[1]||o.axis==="x"&&a.overflowed[1]){var s=dx=0;if(a.langDir==="rtl"){s=n.width()-r.outerWidth(false);dx=Math.abs(s/a.scrollRatio.x)}r.css("left",s);l[1].css("left",dx);K(t,"_resetX")}},O=function(){var t=e(this),a=t.data(i),o=a.opt;if(!a.bindEvents){W.call(this);if(o.contentTouchScroll){R.call(this)}L.call(this);if(o.mouseWheel.enable){function n(){r=setTimeout(function(){if(!e.event.special.mousewheel){n()}else{clearTimeout(r);A.call(t[0])}},100)}var r;n()}Y.call(this);j.call(this);if(o.advanced.autoScrollOnFocus){X.call(this)}if(o.scrollButtons.enable){F.call(this)}if(o.keyboard.enable){q.call(this)}a.bindEvents=true}},D=function(){var t=e(this),a=t.data(i),o=a.opt,n=i+"_"+a.idx,r=".mCSB_"+a.idx+"_scrollbar",l=e("#mCSB_"+a.idx+",#mCSB_"+a.idx+"_container,#mCSB_"+a.idx+"_container_wrapper,"+r+" ."+f[12]+",#mCSB_"+a.idx+"_dragger_vertical,#mCSB_"+a.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+a.idx+"_container");if(o.advanced.releaseDraggableSelectors){l.add(e(o.advanced.releaseDraggableSelectors))}if(o.advanced.extraDraggableSelectors){l.add(e(o.advanced.extraDraggableSelectors))}if(a.bindEvents){var c=H()?top.document:document;e(document).add(e(c)).unbind("."+n);l.each(function(){e(this).unbind("."+n)});clearTimeout(t[0]._focusTimeout);ie(t[0],"_focusTimeout");clearTimeout(a.sequential.step);ie(a.sequential,"step");clearTimeout(s[0].onCompleteTimeout);ie(s[0],"onCompleteTimeout");a.bindEvents=false}},I=function(t){var a=e(this),o=a.data(i),n=o.opt,r=e("#mCSB_"+o.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+o.idx+"_container"),s=[e("#mCSB_"+o.idx+"_scrollbar_vertical"),e("#mCSB_"+o.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];if(n.axis!=="x"){if(o.overflowed[0]&&!t){s[0].add(c[0]).add(s[0].children("a")).css("display","block");l.removeClass(f[8]+" "+f[10])}else{if(n.alwaysShowScrollbar){if(n.alwaysShowScrollbar!==2){c[0].css("display","none")}l.removeClass(f[10])}else{s[0].css("display","none");l.addClass(f[10])}l.addClass(f[8])}}if(n.axis!=="y"){if(o.overflowed[1]&&!t){s[1].add(c[1]).add(s[1].children("a")).css("display","block");l.removeClass(f[9]+" "+f[11])}else{if(n.alwaysShowScrollbar){if(n.alwaysShowScrollbar!==2){c[1].css("display","none")}l.removeClass(f[11])}else{s[1].css("display","none");l.addClass(f[11])}l.addClass(f[9])}}if(!o.overflowed[0]&&!o.overflowed[1]){a.addClass(f[5])}else{a.removeClass(f[5])}},E=function(t){var i=t.type,a=t.target.ownerDocument!==document&&frameElement!==null?[e(frameElement).offset().top,e(frameElement).offset().left]:null,o=H()&&t.target.ownerDocument!==top.document&&frameElement!==null?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(i){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+o[0],t.originalEvent.pageX-a[1]+o[1],false]:[t.originalEvent.pageY,t.originalEvent.pageX,false];break;case"touchstart":case"touchmove":case"touchend":var n=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[n.screenY,n.screenX,r>1]:[n.pageY,n.pageX,r>1];break;default:return a?[t.pageY-a[0]+o[0],t.pageX-a[1]+o[1],false]:[t.pageY,t.pageX,false]}},W=function(){var t=e(this),a=t.data(i),o=a.opt,n=i+"_"+a.idx,r=["mCSB_"+a.idx+"_dragger_vertical","mCSB_"+a.idx+"_dragger_horizontal"],l=e("#mCSB_"+a.idx+"_container"),d=e("#"+r[0]+",#"+r[1]),f,u,h,m=o.advanced.releaseDraggableSelectors?d.add(e(o.advanced.releaseDraggableSelectors)):d,p=H()?top.document:document,g=o.advanced.extraDraggableSelectors?e(p).add(e(o.advanced.extraDraggableSelectors)):e(p);d.bind("contextmenu."+n,function(e){e.preventDefault()}).bind("mousedown."+n+" touchstart."+n+" pointerdown."+n+" MSPointerDown."+n,function(i){i.stopImmediatePropagation();i.preventDefault();if(!ae(i)){return}c=true;if(s){document.onselectstart=function(){return false}}P.call(l,false);J(t);f=e(this);var a=f.offset(),n=E(i)[0]-a.top,r=E(i)[1]-a.left,d=f.height()+a.top,m=f.width()+a.left;if(n<d&&n>0&&r<m&&r>0){u=n;h=r}T(f,"active",o.autoExpandScrollbar)}).bind("touchmove."+n,function(e){e.stopImmediatePropagation();e.preventDefault();var t=f.offset(),i=E(e)[0]-t.top,a=E(e)[1]-t.left;v(u,h,i,a)});e(document).add(g).bind("mousemove."+n+" pointermove."+n+" MSPointerMove."+n,function(e){if(f){var t=f.offset(),i=E(e)[0]-t.top,a=E(e)[1]-t.left;if(u===i&&h===a){return}v(u,h,i,a)}}).add(m).bind("mouseup."+n+" touchend."+n+" pointerup."+n+" MSPointerUp."+n,function(e){if(f){T(f,"active",o.autoExpandScrollbar);f=null}c=false;if(s){document.onselectstart=null}P.call(l,true)});function v(e,i,n,s){l[0].idleTimer=o.scrollInertia<233?250:0;if(f.attr("id")===r[1]){var c="x",d=(f[0].offsetLeft-i+s)*a.scrollRatio.x}else{var c="y",d=(f[0].offsetTop-e+n)*a.scrollRatio.y}K(t,d.toString(),{dir:c,drag:true})}},R=function(){var t=e(this),a=t.data(i),o=a.opt,n=i+"_"+a.idx,r=e("#mCSB_"+a.idx),l=e("#mCSB_"+a.idx+"_container"),s=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],f,u,h,m,p,g=[],v=[],x,w,_,S,b,C,y=0,B,T=o.axis==="yx"?"none":"all",k=[],M,O,D=l.find("iframe"),I=["touchstart."+n+" pointerdown."+n+" MSPointerDown."+n,"touchmove."+n+" pointermove."+n+" MSPointerMove."+n,"touchend."+n+" pointerup."+n+" MSPointerUp."+n],W=document.body.style.touchAction!==undefined&&document.body.style.touchAction!=="";l.bind(I[0],function(e){R(e)}).bind(I[1],function(e){L(e)});r.bind(I[0],function(e){A(e)}).bind(I[2],function(e){z(e)});if(D.length){D.each(function(){e(this).bind("load",function(){if(H(this)){e(this.contentDocument||this.contentWindow.document).bind(I[0],function(e){R(e);A(e)}).bind(I[1],function(e){L(e)}).bind(I[2],function(e){z(e)})}})})}function R(e){if(!oe(e)||c||E(e)[2]){d=0;return}d=1;M=0;O=0;f=1;t.removeClass("mCS_touch_action");var i=l.offset();u=E(e)[0]-i.top;h=E(e)[1]-i.left;k=[E(e)[0],E(e)[1]]}function L(e){if(!oe(e)||c||E(e)[2]){return}if(!o.documentTouchScroll){e.preventDefault()}e.stopImmediatePropagation();if(O&&!M){return}if(f){w=ee();var i=r.offset(),n=E(e)[0]-i.top,d=E(e)[1]-i.left,m="mcsLinearOut";g.push(n);v.push(d);k[2]=Math.abs(E(e)[0]-k[0]);k[3]=Math.abs(E(e)[1]-k[1]);if(a.overflowed[0]){var p=s[0].parent().height()-s[0].height(),x=u-n>0&&n-u>-(p*a.scrollRatio.y)&&(k[3]*2<k[2]||o.axis==="yx")}if(a.overflowed[1]){var _=s[1].parent().width()-s[1].width(),S=h-d>0&&d-h>-(_*a.scrollRatio.x)&&(k[2]*2<k[3]||o.axis==="yx")}if(x||S){if(!W){e.preventDefault()}M=1}else{O=1;t.addClass("mCS_touch_action")}if(W){e.preventDefault()}C=o.axis==="yx"?[u-n,h-d]:o.axis==="x"?[null,h-d]:[u-n,null];l[0].idleTimer=250;if(a.overflowed[0]){U(C[0],y,m,"y","all",true)}if(a.overflowed[1]){U(C[1],y,m,"x",T,true)}}}function A(e){if(!oe(e)||c||E(e)[2]){d=0;return}d=1;e.stopImmediatePropagation();J(t);x=ee();var i=r.offset();m=E(e)[0]-i.top;p=E(e)[1]-i.left;g=[];v=[]}function z(e){if(!oe(e)||c||E(e)[2]){return}f=0;e.stopImmediatePropagation();M=0;O=0;_=ee();var t=r.offset(),i=E(e)[0]-t.top,n=E(e)[1]-t.left;if(_-w>30){return}b=1e3/(_-x);var s="mcsEaseOut",d=b<2.5,u=d?[g[g.length-2],v[v.length-2]]:[0,0];S=d?[i-u[0],n-u[1]]:[i-m,n-p];var h=[Math.abs(S[0]),Math.abs(S[1])];b=d?[Math.abs(S[0]/4),Math.abs(S[1]/4)]:[b,b];var y=[Math.abs(l[0].offsetTop)-S[0]*P(h[0]/b[0],b[0]),Math.abs(l[0].offsetLeft)-S[1]*P(h[1]/b[1],b[1])];C=o.axis==="yx"?[y[0],y[1]]:o.axis==="x"?[null,y[1]]:[y[0],null];B=[h[0]*4+o.scrollInertia,h[1]*4+o.scrollInertia];var k=parseInt(o.contentTouchScroll)||0;C[0]=h[0]>k?C[0]:0;C[1]=h[1]>k?C[1]:0;if(a.overflowed[0]){U(C[0],B[0],s,"y",T,false)}if(a.overflowed[1]){U(C[1],B[1],s,"x",T,false)}}function P(e,t){var i=[t*1.5,t*2,t/1.5,t/2];if(e>90){return t>4?i[0]:i[3]}else if(e>60){return t>3?i[3]:i[2]}else if(e>30){return t>8?i[1]:t>6?i[0]:t>4?t:i[2]}else{return t>8?t:i[3]}}function U(e,i,a,o,n,r){if(!e){return}K(t,e.toString(),{dur:i,scrollEasing:a,dir:o,overwrite:n,drag:r})}},L=function(){var t=e(this),a=t.data(i),o=a.opt,n=a.sequential,r=i+"_"+a.idx,l=e("#mCSB_"+a.idx+"_container"),s=l.parent(),f;l.bind("mousedown."+r,function(e){if(d){return}if(!f){f=1;c=true}}).add(document).bind("mousemove."+r,function(e){if(!d&&f&&u()){var t=l.offset(),i=E(e)[0]-t.top+l[0].offsetTop,r=E(e)[1]-t.left+l[0].offsetLeft;if(i>0&&i<s.height()&&r>0&&r<s.width()){if(n.step){h("off",null,"stepped")}}else{if(o.axis!=="x"&&a.overflowed[0]){if(i<0){h("on",38)}else if(i>s.height()){h("on",40)}}if(o.axis!=="y"&&a.overflowed[1]){if(r<0){h("on",37)}else if(r>s.width()){h("on",39)}}}}}).bind("mouseup."+r+" dragend."+r,function(e){if(d){return}if(f){f=0;h("off",null)}c=false});function u(){return window.getSelection?window.getSelection().toString():document.selection&&document.selection.type!="Control"?document.selection.createRange().text:0}function h(e,i,a){n.type=a&&f?"stepped":"stepless";n.scrollAmount=10;N(t,e,i,"mcsLinearOut",a?60:null)}},A=function(){if(!e(this).data(i)){return}var t=e(this),a=t.data(i),o=a.opt,n=i+"_"+a.idx,r=e("#mCSB_"+a.idx),l=[e("#mCSB_"+a.idx+"_dragger_vertical"),e("#mCSB_"+a.idx+"_dragger_horizontal")],c=e("#mCSB_"+a.idx+"_container").find("iframe");if(c.length){c.each(function(){e(this).bind("load",function(){if(H(this)){e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+n,function(e,t){d(e,t)})}})})}r.bind("mousewheel."+n,function(e,t){d(e,t)});function d(i,n){e(i.target).closest(".mCustomScrollbar").trigger("mcswheel",n);J(t);if(!o.mouseWheel||!o.mouseWheel.enable){return}if(U(t,i.target)){return}var c=o.mouseWheel.deltaFactor!=="auto"?parseInt(o.mouseWheel.deltaFactor):s&&i.deltaFactor<100?100:i.deltaFactor||100,d=o.scrollInertia;if(o.axis==="yx"){if(i.deltaX!==0){o.mouseWheel.axis="x"}else if(i.deltaY!==0){o.mouseWheel.axis="y"}}if(o.axis==="x"||o.mouseWheel.axis==="x"){var f="x",u=[Math.ceil(c*a.scrollRatio.x),parseInt(o.mouseWheel.scrollAmount)],h=o.mouseWheel.scrollAmount!=="auto"?u[1]:u[0]>=r.width()?r.width()*.9:u[0],m=Math.abs(e("#mCSB_"+a.idx+"_container")[0].offsetLeft),p=l[1][0].offsetLeft,g=l[1].parent().width()-l[1].width(),v=i.deltaY||n}else{var f="y",u=[Math.ceil(c*a.scrollRatio.y),parseInt(o.mouseWheel.scrollAmount)],h=o.mouseWheel.scrollAmount!=="auto"?u[1]:u[0]>=r.height()?r.height()*.9:u[0],m=Math.abs(e("#mCSB_"+a.idx+"_container")[0].offsetTop),p=l[0][0].offsetTop,g=l[0].parent().height()-l[0].height(),v=i.deltaY||n}if(f==="y"&&!a.overflowed[0]||f==="x"&&!a.overflowed[1]){return}if(o.mouseWheel.invert||i.webkitDirectionInvertedFromDevice){v=-v}if(o.mouseWheel.normalizeDelta){v=v<0?-1:1}if(v>0&&p!==0||v<0&&p!==g||o.mouseWheel.preventDefault){i.stopImmediatePropagation();i.preventDefault()}if(i.deltaFactor<5&&!o.mouseWheel.normalizeDelta){h=i.deltaFactor;d=17}K(t,(m-v*h).toString(),{dir:f,dur:d})}},z=new Object,H=function(t){var i=false,a=false,o=null;if(t===undefined){a="#empty"}else if(e(t).attr("id")!==undefined){a=e(t).attr("id")}if(a!==false&&z[a]!==undefined){return z[a]}if(!t){try{var n=top.document;o=n.body.innerHTML}catch(e){}i=o!==null}else{try{var n=t.contentDocument||t.contentWindow.document;o=n.body.innerHTML}catch(e){}i=o!==null}if(a!==false){z[a]=i}return i},P=function(e){var t=this.find("iframe");if(!t.length){return}var i=!e?"none":"auto";t.css("pointer-events",i)},U=function(t,a){var o=a.nodeName.toLowerCase(),n=t.data(i).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(o,n)>-1&&!(e.inArray(o,r)>-1&&!e(a).is(":focus"))},Y=function(){var t=e(this),a=t.data(i),o=i+"_"+a.idx,n=e("#mCSB_"+a.idx+"_container"),r=n.parent(),l=e(".mCSB_"+a.idx+"_scrollbar ."+f[12]),s;l.bind("mousedown."+o+" touchstart."+o+" pointerdown."+o+" MSPointerDown."+o,function(t){c=true;if(!e(t.target).hasClass("mCSB_dragger")){s=1}}).bind("touchend."+o+" pointerup."+o+" MSPointerUp."+o,function(e){c=false}).bind("click."+o,function(i){if(!s){return}s=0;if(e(i.target).hasClass(f[12])||e(i.target).hasClass("mCSB_draggerRail")){J(t);var o=e(this),l=o.find(".mCSB_dragger");if(o.parent(".mCSB_scrollTools_horizontal").length>0){if(!a.overflowed[1]){return}var c="x",d=i.pageX>l.offset().left?-1:1,u=Math.abs(n[0].offsetLeft)-d*(r.width()*.9)}else{if(!a.overflowed[0]){return}var c="y",d=i.pageY>l.offset().top?-1:1,u=Math.abs(n[0].offsetTop)-d*(r.height()*.9)}K(t,u.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},X=function(){var t=e(this),a=t.data(i),o=a.opt,n=i+"_"+a.idx,r=e("#mCSB_"+a.idx+"_container"),l=r.parent();r.bind("focusin."+n,function(i){var a=e(document.activeElement),n=r.find(".mCustomScrollBox").length,s=0;if(!a.is(o.advanced.autoScrollOnFocus)){return}J(t);clearTimeout(t[0]._focusTimeout);t[0]._focusTimer=n?(s+17)*n:0;t[0]._focusTimeout=setTimeout(function(){var e=[re(a)[0],re(a)[1]],i=[r[0].offsetTop,r[0].offsetLeft],n=[i[0]+e[0]>=0&&i[0]+e[0]<l.height()-a.outerHeight(false),i[1]+e[1]>=0&&i[0]+e[1]<l.width()-a.outerWidth(false)],c=o.axis==="yx"&&!n[0]&&!n[1]?"none":"all";if(o.axis!=="x"&&!n[0]){K(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s})}if(o.axis!=="y"&&!n[1]){K(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:s})}},t[0]._focusTimer)})},j=function(){var t=e(this),a=t.data(i),o=i+"_"+a.idx,n=e("#mCSB_"+a.idx+"_container").parent();n.bind("scroll."+o,function(t){if(n.scrollTop()!==0||n.scrollLeft()!==0){e(".mCSB_"+a.idx+"_scrollbar").css("visibility","hidden")}})},F=function(){var t=e(this),a=t.data(i),o=a.opt,n=a.sequential,r=i+"_"+a.idx,l=".mCSB_"+a.idx+"_scrollbar",s=e(l+">a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(i){i.preventDefault();if(!ae(i)){return}var r=e(this).attr("class");n.type=o.scrollButtons.scrollType;switch(i.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if(n.type==="stepped"){return}c=true;a.tweenRunning=false;l("on",r);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if(n.type==="stepped"){return}c=false;if(n.dir){l("off",r)}break;case"click":if(n.type!=="stepped"||a.tweenRunning){return}l("on",r);break}function l(e,i){n.scrollAmount=o.scrollButtons.scrollAmount;N(t,e,i)}})},q=function(){var t=e(this),a=t.data(i),o=a.opt,n=a.sequential,r=i+"_"+a.idx,l=e("#mCSB_"+a.idx),s=e("#mCSB_"+a.idx+"_container"),c=s.parent(),d="input,textarea,select,datalist,keygen,[contenteditable='true']",f=s.find("iframe"),u=["blur."+r+" keydown."+r+" keyup."+r];if(f.length){f.each(function(){e(this).bind("load",function(){if(H(this)){e(this.contentDocument||this.contentWindow.document).bind(u[0],function(e){h(e)})}})})}l.attr("tabindex","0").bind(u[0],function(e){h(e)});function h(i){switch(i.type){case"blur":if(a.tweenRunning&&n.dir){m("off",null)}break;case"keydown":case"keyup":var r=i.keyCode?i.keyCode:i.which,l="on";if(o.axis!=="x"&&(r===38||r===40)||o.axis!=="y"&&(r===37||r===39)){if((r===38||r===40)&&!a.overflowed[0]||(r===37||r===39)&&!a.overflowed[1]){return}if(i.type==="keyup"){l="off"}if(!e(document.activeElement).is(d)){i.preventDefault();i.stopImmediatePropagation();m(l,r)}}else if(r===33||r===34){if(a.overflowed[0]||a.overflowed[1]){i.preventDefault();i.stopImmediatePropagation()}if(i.type==="keyup"){J(t);var f=r===34?-1:1;if(o.axis==="x"||o.axis==="yx"&&a.overflowed[1]&&!a.overflowed[0]){var u="x",h=Math.abs(s[0].offsetLeft)-f*(c.width()*.9)}else{var u="y",h=Math.abs(s[0].offsetTop)-f*(c.height()*.9)}K(t,h.toString(),{dir:u,scrollEasing:"mcsEaseInOut"})}}else if(r===35||r===36){if(!e(document.activeElement).is(d)){if(a.overflowed[0]||a.overflowed[1]){i.preventDefault();i.stopImmediatePropagation()}if(i.type==="keyup"){if(o.axis==="x"||o.axis==="yx"&&a.overflowed[1]&&!a.overflowed[0]){var u="x",h=r===35?Math.abs(c.width()-s.outerWidth(false)):0}else{var u="y",h=r===35?Math.abs(c.height()-s.outerHeight(false)):0}K(t,h.toString(),{dir:u,scrollEasing:"mcsEaseInOut"})}}}break}function m(e,i){n.type=o.keyboard.scrollType;n.scrollAmount=o.keyboard.scrollAmount;if(n.type==="stepped"&&a.tweenRunning){return}N(t,e,i)}}},N=function(t,a,o,n,r){var l=t.data(i),s=l.opt,c=l.sequential,d=e("#mCSB_"+l.idx+"_container"),u=c.type==="stepped"?true:false,h=s.scrollInertia<26?26:s.scrollInertia,m=s.scrollInertia<1?17:s.scrollInertia;switch(a){case"on":c.dir=[o===f[16]||o===f[15]||o===39||o===37?"x":"y",o===f[13]||o===f[15]||o===38||o===37?-1:1];J(t);if(ne(o)&&c.type==="stepped"){return}p(u);break;case"off":g();if(u||l.tweenRunning&&c.dir){p(true)}break}function p(e){if(s.snapAmount){c.scrollAmount=!(s.snapAmount instanceof Array)?s.snapAmount:c.dir[0]==="x"?s.snapAmount[1]:s.snapAmount[0]}var i=c.type!=="stepped",a=r?r:!e?1e3/60:i?h/1.5:m,o=!e?2.5:i?7.5:40,f=[Math.abs(d[0].offsetTop),Math.abs(d[0].offsetLeft)],u=[l.scrollRatio.y>10?10:l.scrollRatio.y,l.scrollRatio.x>10?10:l.scrollRatio.x],g=c.dir[0]==="x"?f[1]+c.dir[1]*(u[1]*o):f[0]+c.dir[1]*(u[0]*o),v=c.dir[0]==="x"?f[1]+c.dir[1]*parseInt(c.scrollAmount):f[0]+c.dir[1]*parseInt(c.scrollAmount),x=c.scrollAmount!=="auto"?v:g,w=n?n:!e?"mcsLinear":i?"mcsLinearOut":"mcsEaseInOut",_=!e?false:true;if(e&&a<17){x=c.dir[0]==="x"?f[1]:f[0]}K(t,x.toString(),{dir:c.dir[0],scrollEasing:w,dur:a,onComplete:_});if(e){c.dir=false;return}clearTimeout(c.step);c.step=setTimeout(function(){p()},a)}function g(){clearTimeout(c.step);ie(c,"step");J(t)}},V=function(t){var a=e(this).data(i).opt,o=[];if(typeof t==="function"){t=t()}if(!(t instanceof Array)){o[0]=t.y?t.y:t.x||a.axis==="x"?null:t;o[1]=t.x?t.x:t.y||a.axis==="y"?null:t}else{o=t.length>1?[t[0],t[1]]:a.axis==="x"?[null,t[0]]:[t[0],null]}if(typeof o[0]==="function"){o[0]=o[0]()}if(typeof o[1]==="function"){o[1]=o[1]()}return o},Q=function(t,a){if(t==null||typeof t=="undefined"){return}var o=e(this),n=o.data(i),r=n.opt,l=e("#mCSB_"+n.idx+"_container"),s=l.parent(),c=typeof t;if(!a){a=r.axis==="x"?"x":"y"}var d=a==="x"?l.outerWidth(false)-s.width():l.outerHeight(false)-s.height(),f=a==="x"?l[0].offsetLeft:l[0].offsetTop,h=a==="x"?"left":"top";switch(c){case"function":return t();break;case"object":var m=t.jquery?t:e(t);if(!m.length){return}return a==="x"?re(m)[1]:re(m)[0];break;case"string":case"number":if(ne(t)){return Math.abs(t)}else if(t.indexOf("%")!==-1){return Math.abs(d*parseInt(t)/100)}else if(t.indexOf("-=")!==-1){return Math.abs(f-parseInt(t.split("-=")[1]))}else if(t.indexOf("+=")!==-1){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}else if(t.indexOf("px")!==-1&&ne(t.split("px")[0])){return Math.abs(t.split("px")[0])}else{if(t==="top"||t==="left"){return 0}else if(t==="bottom"){return Math.abs(s.height()-l.outerHeight(false))}else if(t==="right"){return Math.abs(s.width()-l.outerWidth(false))}else if(t==="first"||t==="last"){var m=l.find(":"+t);return a==="x"?re(m)[1]:re(m)[0]}else{if(e(t).length){return a==="x"?re(e(t))[1]:re(e(t))[0]}else{l.css(h,t);u.update.call(null,o[0]);return}}}break}},Z=function(t){var a=e(this),o=a.data(i),n=o.opt,r=e("#mCSB_"+o.idx+"_container");if(t){clearTimeout(r[0].autoUpdate);ie(r[0],"autoUpdate");return}l();function l(){clearTimeout(r[0].autoUpdate);if(a.parents("html").length===0){a=null;return}r[0].autoUpdate=setTimeout(function(){if(n.advanced.updateOnSelectorChange){o.poll.change.n=c();if(o.poll.change.n!==o.poll.change.o){o.poll.change.o=o.poll.change.n;d(3);return}}if(n.advanced.updateOnContentResize){o.poll.size.n=a[0].scrollHeight+a[0].scrollWidth+r[0].offsetHeight+a[0].offsetHeight+a[0].offsetWidth;if(o.poll.size.n!==o.poll.size.o){o.poll.size.o=o.poll.size.n;d(1);return}}if(n.advanced.updateOnImageLoad){if(!(n.advanced.updateOnImageLoad==="auto"&&n.axis==="y")){o.poll.img.n=r.find("img").length;if(o.poll.img.n!==o.poll.img.o){o.poll.img.o=o.poll.img.n;r.find("img").each(function(){s(this)});return}}}if(n.advanced.updateOnSelectorChange||n.advanced.updateOnContentResize||n.advanced.updateOnImageLoad){l()}},n.advanced.autoUpdateTimeout)}function s(t){if(e(t).hasClass(f[2])){d();return}var i=new Image;function a(e,t){return function(){return t.apply(e,arguments)}}function o(){this.onload=null;e(t).addClass(f[2]);d(2)}i.onload=a(i,o);i.src=t.src}function c(){if(n.advanced.updateOnSelectorChange===true){n.advanced.updateOnSelectorChange="*"}var e=0,t=r.find(n.advanced.updateOnSelectorChange);if(n.advanced.updateOnSelectorChange&&t.length>0){t.each(function(){e+=this.offsetHeight+this.offsetWidth})}return e}function d(e){clearTimeout(r[0].autoUpdate);u.update.call(null,a[0],e)}},G=function(e,t,i){return Math.round(e/t)*t-i},J=function(t){var a=t.data(i),o=e("#mCSB_"+a.idx+"_container,#mCSB_"+a.idx+"_container_wrapper,#mCSB_"+a.idx+"_dragger_vertical,#mCSB_"+a.idx+"_dragger_horizontal");o.each(function(){te.call(this)})},K=function(t,a,o){var n=t.data(i),r=n.opt,l={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:false,dur:r.scrollInertia,overwrite:"all",callbacks:true,onStart:true,onUpdate:true,onComplete:true},o=e.extend(l,o),s=[o.dur,o.drag?0:o.dur],c=e("#mCSB_"+n.idx),d=e("#mCSB_"+n.idx+"_container"),f=d.parent(),u=r.callbacks.onTotalScrollOffset?V.call(t,r.callbacks.onTotalScrollOffset):[0,0],h=r.callbacks.onTotalScrollBackOffset?V.call(t,r.callbacks.onTotalScrollBackOffset):[0,0];n.trigger=o.trigger;if(f.scrollTop()!==0||f.scrollLeft()!==0){e(".mCSB_"+n.idx+"_scrollbar").css("visibility","visible");f.scrollTop(0).scrollLeft(0)}if(a==="_resetY"&&!n.contentReset.y){if(y("onOverflowYNone")){r.callbacks.onOverflowYNone.call(t[0])}n.contentReset.y=1}if(a==="_resetX"&&!n.contentReset.x){if(y("onOverflowXNone")){r.callbacks.onOverflowXNone.call(t[0])}n.contentReset.x=1}if(a==="_resetY"||a==="_resetX"){return}if((n.contentReset.y||!t[0].mcs)&&n.overflowed[0]){if(y("onOverflowY")){r.callbacks.onOverflowY.call(t[0])}n.contentReset.x=null}if((n.contentReset.x||!t[0].mcs)&&n.overflowed[1]){if(y("onOverflowX")){r.callbacks.onOverflowX.call(t[0])}n.contentReset.x=null}if(r.snapAmount){var m=!(r.snapAmount instanceof Array)?r.snapAmount:o.dir==="x"?r.snapAmount[1]:r.snapAmount[0];a=G(a,m,r.snapOffset)}switch(o.dir){case"x":var p=e("#mCSB_"+n.idx+"_dragger_horizontal"),g="left",v=d[0].offsetLeft,x=[c.width()-d.outerWidth(false),p.parent().width()-p.width()],w=[a,a===0?0:a/n.scrollRatio.x],_=u[1],S=h[1],b=_>0?_/n.scrollRatio.x:0,C=S>0?S/n.scrollRatio.x:0;break;case"y":var p=e("#mCSB_"+n.idx+"_dragger_vertical"),g="top",v=d[0].offsetTop,x=[c.height()-d.outerHeight(false),p.parent().height()-p.height()],w=[a,a===0?0:a/n.scrollRatio.y],_=u[0],S=h[0],b=_>0?_/n.scrollRatio.y:0,C=S>0?S/n.scrollRatio.y:0;break}if(w[1]<0||w[0]===0&&w[1]===0){w=[0,0]}else if(w[1]>=x[1]){w=[x[0],x[1]]}else{w[0]=-w[0]}if(!t[0].mcs){k();if(y("onInit")){r.callbacks.onInit.call(t[0])}}clearTimeout(d[0].onCompleteTimeout);$(p[0],g,Math.round(w[1]),s[1],o.scrollEasing);if(!n.tweenRunning&&(v===0&&w[0]>=0||v===x[0]&&w[0]<=x[0])){return}$(d[0],g,Math.round(w[0]),s[0],o.scrollEasing,o.overwrite,{onStart:function(){if(o.callbacks&&o.onStart&&!n.tweenRunning){if(y("onScrollStart")){k();r.callbacks.onScrollStart.call(t[0])}n.tweenRunning=true;T(p);n.cbOffsets=B()}},onUpdate:function(){if(o.callbacks&&o.onUpdate){if(y("whileScrolling")){k();r.callbacks.whileScrolling.apply(t[0],[{options:o,delta:v-w[0]}])}}},onComplete:function(){if(o.callbacks&&o.onComplete){if(r.axis==="yx"){clearTimeout(d[0].onCompleteTimeout)}var e=d[0].idleTimer||0;d[0].onCompleteTimeout=setTimeout(function(){if(y("onScroll")){k();r.callbacks.onScroll.call(t[0])}if(y("onTotalScroll")&&w[1]>=x[1]-b&&n.cbOffsets[0]){k();r.callbacks.onTotalScroll.call(t[0])}if(y("onTotalScrollBack")&&w[1]<=C&&n.cbOffsets[1]){k();r.callbacks.onTotalScrollBack.call(t[0])}n.tweenRunning=false;d[0].idleTimer=0;T(p,"hide")},e)}}});function y(e){return n&&r.callbacks[e]&&typeof r.callbacks[e]==="function"}function B(){return[r.callbacks.alwaysTriggerOffsets||v>=x[0]+_,r.callbacks.alwaysTriggerOffsets||v<=-S]}function k(){var e=[d[0].offsetTop,d[0].offsetLeft],i=[p[0].offsetTop,p[0].offsetLeft],a=[d.outerHeight(false),d.outerWidth(false)],n=[c.height(),c.width()];t[0].mcs={content:d,top:e[0],left:e[1],draggerTop:i[0],draggerLeft:i[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-n[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-n[1])),direction:o.dir}}},$=function(e,t,i,a,o,n,r){if(!e._mTween){e._mTween={top:{},left:{}}}var r=r||{},l=r.onStart||function(){},s=r.onUpdate||function(){},c=r.onComplete||function(){},d=ee(),f,u=0,h=e.offsetTop,m=e.style,p,g=e._mTween[t];if(t==="left"){h=e.offsetLeft}var v=i-h;g.stop=0;if(n!=="none"){S()}_();function x(){if(g.stop){return}if(!u){l.call()}u=ee()-d;w();if(u>=g.time){g.time=u>g.time?u+f-(u-g.time):u+f-1;if(g.time<u+1){g.time=u+1}}if(g.time<a){g.id=p(x)}else{c.call()}}function w(){if(a>0){g.currVal=b(g.time,h,v,a,o);m[t]=Math.round(g.currVal)+"px"}else{m[t]=i+"px"}s.call()}function _(){f=1e3/60;g.time=u+f;p=!window.requestAnimationFrame?function(e){w();return setTimeout(e,.01)}:window.requestAnimationFrame;g.id=p(x)}function S(){if(g.id==null){return}if(!window.requestAnimationFrame){clearTimeout(g.id)}else{window.cancelAnimationFrame(g.id)}g.id=null}function b(e,t,i,a,o){switch(o){case"linear":case"mcsLinear":return i*e/a+t;break;case"mcsLinearOut":e/=a;e--;return i*Math.sqrt(1-e*e)+t;break;case"easeInOutSmooth":e/=a/2;if(e<1)return i/2*e*e+t;e--;return-i/2*(e*(e-2)-1)+t;break;case"easeInOutStrong":e/=a/2;if(e<1)return i/2*Math.pow(2,10*(e-1))+t;e--;return i/2*(-Math.pow(2,-10*e)+2)+t;break;case"easeInOut":case"mcsEaseInOut":e/=a/2;if(e<1)return i/2*e*e*e+t;e-=2;return i/2*(e*e*e+2)+t;break;case"easeOutSmooth":e/=a;e--;return-i*(e*e*e*e-1)+t;break;case"easeOutStrong":return i*(-Math.pow(2,-10*e/a)+1)+t;break;case"easeOut":case"mcsEaseOut":default:var n=(e/=a)*e,r=n*e;return t+i*(.499999999999997*r*n+-2.5*n*n+5.5*r+-6.5*n+4*e)}}},ee=function(){if(window.performance&&window.performance.now){return window.performance.now()}else{if(window.performance&&window.performance.webkitNow){return window.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return(new Date).getTime()}}}},te=function(){var e=this;if(!e._mTween){e._mTween={top:{},left:{}}}var t=["top","left"];for(var i=0;i<t.length;i++){var a=t[i];if(e._mTween[a].id){if(!window.requestAnimationFrame){clearTimeout(e._mTween[a].id)}else{window.cancelAnimationFrame(e._mTween[a].id)}e._mTween[a].id=null;e._mTween[a].stop=1}}},ie=function(e,t){try{delete e[t]}catch(i){e[t]=null}},ae=function(e){return!(e.which&&e.which!==1)},oe=function(e){var t=e.originalEvent.pointerType;return!(t&&t!=="touch"&&t!==2)},ne=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},re=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},le=function(){var e=t();if(!e)return false;return document[e];function t(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++){if(e[t]+"Hidden"in document)return e[t]+"Hidden"}return null}};e.fn[t]=function(t){if(u[t]){return u[t].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof t==="object"||!t){return u.init.apply(this,arguments)}else{e.error("Method "+t+" does not exist")}};e[t]=function(t){if(u[t]){return u[t].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof t==="object"||!t){return u.init.apply(this,arguments)}else{e.error("Method "+t+" does not exist")}};e[t].defaults=o;window[t]=true;e(window).bind("load",function(){e(a)[t]();e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var i=e(t),a=i.parents(".mCSB_container"),o,n;if(!a.length){return}o=a.parent();n=[a[0].offsetTop,a[0].offsetLeft];return n[0]+re(i)[0]>=0&&n[0]+re(i)[0]<o.height()-i.outerHeight(false)&&n[1]+re(i)[1]>=0&&n[1]+re(i)[1]<o.width()-i.outerWidth(false)},mcsInSight:e.expr[":"].mcsInSight||function(t,i,a){var o=e(t),n,r=o.parents(".mCSB_container"),l,s,c,d=a[3]==="exact"?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(!r.length){return}n=[o.outerHeight(false),o.outerWidth(false)];s=[r[0].offsetTop+re(o)[0],r[0].offsetLeft+re(o)[1]];l=[r.parent()[0].offsetHeight,r.parent()[0].offsetWidth];c=[n[0]<l[0]?d[0]:d[1],n[1]<l[1]?d[0]:d[1]];return s[0]-l[0]*c[0][0]<0&&s[0]+n[0]-l[0]*c[0][1]>=0&&s[1]-l[1]*c[1][0]<0&&s[1]+n[1]-l[1]*c[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var a=e(t).data(i);if(!a){return}return a.overflowed[0]||a.overflowed[1]}})})})});

/*!
 * jQuery Autocomplete v1.3.0
 * https://github.com/devbridge/jQuery-Autocomplete
 * Licensed under MIT (https://github.com/devbridge/jQuery-Autocomplete/blob/master/license.txt)
 */
(function(e){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"&&typeof require==="function"){e(require("jquery"))}else{e(jQuery)}})(function(e){"use strict";var t=function(){return{escapeRegExChars:function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(e){var t=document.createElement("div");t.className=e;t.style.position="absolute";t.style.display="none";return t}}}(),n={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};function i(t,n){var s=e.noop,o=this,r={ajaxSettings:{},autoSelectFirst:false,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},externalEvent:i.externalEvent,formatResult:i.formatResult,formatGroup:i.formatGroup,delimiter:null,zIndex:11001,type:"GET",noCache:false,onSearchStart:s,onSearchComplete:s,onSearchError:s,preserveInput:false,containerClass:"autocomplete-suggestions",tabDisabled:false,dataType:"text",currentRequest:null,triggerSelectOnValidInput:true,preventBadQueries:true,lookupFilter:function(e,t,n){return e.value.toLowerCase().indexOf(n)!==-1},paramName:"query",transformResult:function(t){return typeof t==="string"?e.parseJSON(t):t},showNoSuggestionNotice:false,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:false};o.element=t;o.el=e(t);o.suggestions=[];o.badQueries=[];o.selectedIndex=-1;o.currentValue=o.element.value;o.intervalId=0;o.cachedResponse={};o.onChangeInterval=null;o.onChange=null;o.isLocal=false;o.suggestionsContainer=null;o.noSuggestionsContainer=null;o.options=e.extend({},r,n);o.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"};o.hint=null;o.hintValue="";o.selection=null;o.initialize();o.setOptions(n)}i.utils=t;e.Autocomplete=i;i.formatResult=function(e,n){if(!n){return e.value}var i="("+t.escapeRegExChars(n)+")";return e.value.replace(new RegExp(i,"gi"),"<strong>$1</strong>").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/&lt;(\/?strong)&gt;/g,"<$1>").replace(/&lt;(\/?x-hidden)&gt;/g,"<$1>")};i.formatGroup=function(e,t){return'<div class="autocomplete-group"><strong>'+t+"</strong></div>"};i.prototype={killerFn:null,initialize:function(){var t=this,n="."+t.classes.suggestion,s=t.classes.selected,o=t.options,r;t.element.setAttribute("autocomplete","off");t.killerFn=function(n){if(!e(n.target).closest("."+t.options.containerClass).length){t.killSuggestions();t.disableKillerFn()}};t.noSuggestionsContainer=e('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0);t.suggestionsContainer=i.utils.createNode(o.containerClass);r=e(t.suggestionsContainer);r.appendTo(o.appendTo);if(o.width!=="auto"){r.css("width",o.width)}r.on("mouseover.autocomplete",n,function(){t.activate(e(this).data("index"))});r.on("mouseout.autocomplete",function(){t.selectedIndex=-1;r.children("."+s).removeClass(s)});r.on("click.autocomplete",n,function(){t.select(e(this).data("index"));return false});t.fixPositionCapture=function(){if(t.visible){t.fixPosition()}};e(window).on("resize.autocomplete",t.fixPositionCapture);t.el.on("keydown.autocomplete",function(e){t.onKeyPress(e)});t.el.on("keyup.autocomplete",function(e){t.onKeyUp(e)});t.el.on("blur.autocomplete",function(){t.onBlur()});t.el.on("focus.autocomplete",function(){t.onFocus()});t.el.on("change.autocomplete",function(e){t.onKeyUp(e)});t.el.on("input.autocomplete",function(e){t.onKeyUp(e)})},onFocus:function(){var e=this;e.fixPosition();if(e.el.val().length>=e.options.minChars){e.onValueChange()}},onBlur:function(){this.enableKillerFn()},abortAjax:function(){var e=this;if(e.currentRequest){e.currentRequest.abort();e.currentRequest=null}},setOptions:function(t){var n=this,i=n.options;e.extend(i,t);n.isLocal=e.isArray(i.lookup);if(n.isLocal){i.lookup=n.verifySuggestionsFormat(i.lookup)}i.orientation=n.validateOrientation(i.orientation,"bottom");e(n.suggestionsContainer).css({"max-height":i.maxHeight+"px",width:i.width+"px","z-index":i.zIndex})},clearCache:function(){this.cachedResponse={};this.badQueries=[]},clear:function(){this.clearCache();this.currentValue="";this.suggestions=[]},disable:function(){var e=this;e.disabled=true;clearInterval(e.onChangeInterval);e.abortAjax()},enable:function(){this.disabled=false},fixPosition:function(){var t=this,n=e(t.suggestionsContainer),i=n.parent().get(0);if(i!==document.body&&!t.options.forceFixPosition){return}var s=t.options.orientation,o=n.outerHeight(),r=t.el.outerHeight(),a=t.el.offset(),l={top:a.top,left:a.left};if(s==="auto"){var u=e(window).height(),c=e(window).scrollTop(),g=-c+a.top-o,f=c+u-(a.top+r+o);s=Math.max(g,f)===g?"top":"bottom"}if(s==="top"){l.top+=-o}else{l.top+=r}if(i!==document.body){var d=n.css("opacity"),p;if(!t.visible){n.css("opacity",0).show()}p=n.offsetParent().offset();l.top-=p.top;l.left-=p.left;if(!t.visible){n.css("opacity",d).hide()}}if(t.options.width==="auto"){l.width=t.el.outerWidth()+"px"}n.css(l)},enableKillerFn:function(){var t=this;e(document).on("click.autocomplete",t.killerFn)},disableKillerFn:function(){var t=this;e(document).off("click.autocomplete",t.killerFn)},killSuggestions:function(){var e=this;e.stopKillSuggestions();e.intervalId=window.setInterval(function(){if(e.visible){if(!e.options.preserveInput){e.el.val(e.currentValue)}e.hide()}e.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var e=this,t=e.el.val().length,n=e.element.selectionStart,i;if(typeof n==="number"){return n===t}if(document.selection){i=document.selection.createRange();i.moveStart("character",-t);return t===i.text.length}return true},onKeyPress:function(e){var t=this;if(!t.disabled&&!t.visible&&e.which===n.DOWN&&t.currentValue){t.suggest();return}if(t.disabled||!t.visible){return}i.externalEvent=e;switch(e.which){case n.ESC:t.el.val(t.currentValue);t.hide();break;case n.RIGHT:if(t.hint&&t.options.onHint&&t.isCursorAtEnd()){t.selectHint();break}return;case n.TAB:if(t.hint&&t.options.onHint){t.selectHint();return}if(t.selectedIndex===-1){t.hide();return}t.select(t.selectedIndex);if(t.options.tabDisabled===false){return}break;case n.RETURN:if(t.selectedIndex===-1){t.hide();return}t.select(t.selectedIndex);break;case n.UP:t.moveUp();break;case n.DOWN:t.moveDown();break;default:return}e.stopImmediatePropagation();e.preventDefault()},onKeyUp:function(e){var t=this;if(t.disabled){return}switch(e.which){case n.UP:case n.DOWN:return}clearInterval(t.onChangeInterval);if(t.currentValue!==t.el.val()){t.findBestHint();if(t.options.deferRequestBy>0){t.onChangeInterval=setInterval(function(){t.onValueChange()},t.options.deferRequestBy)}else{t.onValueChange()}}},onValueChange:function(){var t=this,n=t.options,i=t.el.val(),s=t.getQuery(i);if(t.selection&&t.currentValue!==s){t.selection=null;(n.onInvalidateSelection||e.noop).call(t.element)}clearInterval(t.onChangeInterval);t.currentValue=i;t.selectedIndex=-1;if(n.triggerSelectOnValidInput&&t.isExactMatch(s)){t.select(0);return}if(s.length<n.minChars){t.hide()}else{t.getSuggestions(s)}},isExactMatch:function(e){var t=this.suggestions;return t.length===1&&t[0].value.toLowerCase()===e.toLowerCase()},getQuery:function(t){var n=this.options.delimiter,i;if(!n){return t}i=t.split(n);return e.trim(i[i.length-1])},getSuggestionsLocal:function(t){var n=this,i=n.options,s=t.toLowerCase(),o=i.lookupFilter,r=parseInt(i.lookupLimit,10),a;a={suggestions:e.grep(i.lookup,function(e){return o(e,t,s)})};if(r&&a.suggestions.length>r){a.suggestions=a.suggestions.slice(0,r)}return a},getSuggestions:function(t){var n,i=this,s=i.options,o=s.serviceUrl,r,a,l;s.params[s.paramName]=t;r=s.ignoreParams?null:s.params;if(s.onSearchStart.call(i.element,s.params)===false){return}if(e.isFunction(s.lookup)){s.lookup(t,function(e){i.suggestions=e.suggestions;i.suggest();s.onSearchComplete.call(i.element,t,e.suggestions)});return}if(i.isLocal){n=i.getSuggestionsLocal(t)}else{if(e.isFunction(o)){o=o.call(i.element,t)}a=o+"?"+e.param(r||{});n=i.cachedResponse[a]}if(n&&e.isArray(n.suggestions)){i.suggestions=n.suggestions;i.suggest();s.onSearchComplete.call(i.element,t,n.suggestions)}else if(!i.isBadQuery(t)){i.abortAjax();l={url:o,data:r,type:s.type,dataType:s.dataType};e.extend(l,s.ajaxSettings);i.currentRequest=e.ajax(l).done(function(e){var n;i.currentRequest=null;n=s.transformResult(e,t);i.processResponse(n,t,a);s.onSearchComplete.call(i.element,t,n.suggestions)}).fail(function(e,n,o){s.onSearchError.call(i.element,t,e,n,o)})}else{s.onSearchComplete.call(i.element,t,[])}},isBadQuery:function(e){if(!this.options.preventBadQueries){return false}var t=this.badQueries,n=t.length;while(n--){if(e.indexOf(t[n])===0){return true}}return false},hide:function(){var t=this,n=e(t.suggestionsContainer);if(e.isFunction(t.options.onHide)&&t.visible){t.options.onHide.call(t.element,n)}t.visible=false;t.selectedIndex=-1;clearInterval(t.onChangeInterval);e(t.suggestionsContainer).hide();t.signalHint(null)},suggest:function(){if(!this.suggestions.length){if(this.options.showNoSuggestionNotice){this.noSuggestions()}else{this.hide()}return}var t=this,n=t.options,i=n.groupBy,s=n.formatResult,o=t.getQuery(t.currentValue),r=t.classes.suggestion,a=t.classes.selected,l=e(t.suggestionsContainer),u=e(t.noSuggestionsContainer),c=n.beforeRender,g="",f,d=function(e,t){var s=e.data[i];if(f===s){return""}f=s;return n.formatGroup(e,f)};if(n.triggerSelectOnValidInput&&t.isExactMatch(o)){t.select(0);return}e.each(t.suggestions,function(e,t){if(i){g+=d(t,o,e)}t.value=t.value.replace(/(<x-hidden>(.*?)<\/x-hidden>)/g,"[[$2]]");g+='<div class="'+r+'" data-index="'+e+'">'+s(t,o,e)+"</div>"});this.adjustContainerWidth();u.detach();g=g.replace(/\[\[.*?\]\]/g,"");l.html(g);if(e.isFunction(c)){c.call(t.element,l,t.suggestions)}t.fixPosition();l.show();if(n.autoSelectFirst){t.selectedIndex=0;l.scrollTop(0);l.children("."+r).first().addClass(a)}t.visible=true;t.findBestHint()},noSuggestions:function(){var t=this,n=e(t.suggestionsContainer),i=e(t.noSuggestionsContainer);this.adjustContainerWidth();i.detach();n.empty();n.append(i);t.fixPosition();n.show();t.visible=true},adjustContainerWidth:function(){var t=this,n=t.options,i,s=e(t.suggestionsContainer);if(n.width==="auto"){i=t.el.outerWidth();s.css("width",i>0?i:300)}else if(n.width==="flex"){s.css("width","")}},findBestHint:function(){var t=this,n=t.el.val().toLowerCase(),i=null;if(!n){return}e.each(t.suggestions,function(e,t){var s=t.value.toLowerCase().indexOf(n)===0;if(s){i=t}return!s});t.signalHint(i)},signalHint:function(t){var n="",i=this;if(t){n=i.currentValue+t.value.substr(i.currentValue.length)}if(i.hintValue!==n){i.hintValue=n;i.hint=t;(this.options.onHint||e.noop)(n)}},verifySuggestionsFormat:function(t){if(t.length&&typeof t[0]==="string"){return e.map(t,function(e){return{value:e,data:null}})}return t},validateOrientation:function(t,n){t=e.trim(t||"").toLowerCase();if(e.inArray(t,["auto","bottom","top"])===-1){t=n}return t},processResponse:function(e,t,n){var i=this,s=i.options;e.suggestions=i.verifySuggestionsFormat(e.suggestions);if(!s.noCache){i.cachedResponse[n]=e;if(s.preventBadQueries&&!e.suggestions.length){i.badQueries.push(t)}}if(t!==i.getQuery(i.currentValue)){return}i.suggestions=e.suggestions;i.suggest()},activate:function(t){var n=this,i,s=n.classes.selected,o=e(n.suggestionsContainer),r=o.find("."+n.classes.suggestion);o.find("."+s).removeClass(s);n.selectedIndex=t;if(n.selectedIndex!==-1&&r.length>n.selectedIndex){i=r.get(n.selectedIndex);e(i).addClass(s);return i}return null},selectHint:function(){var t=this,n=e.inArray(t.hint,t.suggestions);t.select(n)},select:function(e){var t=this;t.hide();t.onSelect(e);t.disableKillerFn()},moveUp:function(){var t=this;if(t.selectedIndex===-1){return}if(t.selectedIndex===0){e(t.suggestionsContainer).children().first().removeClass(t.classes.selected);t.selectedIndex=-1;t.el.val(t.currentValue);t.findBestHint();return}t.adjustScroll(t.selectedIndex-1)},moveDown:function(){var e=this;if(e.selectedIndex===e.suggestions.length-1){return}e.adjustScroll(e.selectedIndex+1)},adjustScroll:function(t){var n=this,i=n.activate(t);if(!i){return}var s,o,r,a=e(i).outerHeight();s=i.offsetTop;o=e(n.suggestionsContainer).scrollTop();r=o+n.options.maxHeight-a;if(s<o){e(n.suggestionsContainer).scrollTop(s)}else if(s>r){e(n.suggestionsContainer).scrollTop(s-n.options.maxHeight+a)}if(!n.options.preserveInput){var l=n.getValue(n.suggestions[t].value);if(l){l=l.replace(/\[\[.*?\]\]/g,"")}n.el.val(l)}n.signalHint(null)},onSelect:function(t){var n=this,i=n.options.onSelect,s=n.suggestions[t];n.currentValue=n.getValue(s.value);if(n.currentValue!==n.el.val()&&!n.options.preserveInput){n.el.val(n.currentValue)}n.signalHint(null);n.suggestions=[];n.selection=s;if(e.isFunction(i)){i.call(n.element,s)}},getValue:function(e){var t=this,n=t.options.delimiter,i,s;if(!n){return e}i=t.currentValue;s=i.split(n);if(s.length===1){return e}return i.substr(0,i.length-s[s.length-1].length)+e},dispose:function(){var t=this;t.el.off(".autocomplete").removeData("autocomplete");t.disableKillerFn();e(window).off("resize.autocomplete",t.fixPositionCapture);e(t.suggestionsContainer).remove()}};e.fn.autocomplete=e.fn.devbridgeAutocomplete=function(t,n){var s="autocomplete";if(!arguments.length){return this.first().data(s)}return this.each(function(){var o=e(this),r=o.data(s);if(typeof t==="string"){if(r&&typeof r[t]==="function"){r[t](n)}}else{if(r&&r.dispose){r.dispose()}r=new i(this,t);o.data(s,r)}})}});

/*!
 * CodeMirror 5.65.11 (https://codemirror.net)
 * Copyright 2017 by Marijn Haverbeke <marijnh@gmail.com>
 * Licensed under MIT (https://codemirror.net/LICENSE)
 */
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(e,t){typeof exports==="object"&&typeof module!=="undefined"?module.exports=t():typeof define==="function"&&define.amd?define(t):(e=e||self,e.CodeMirror=t())})(this,function(){"use strict";var e=navigator.userAgent;var t=navigator.platform;var i=/gecko\/\d/i.test(e);var n=/MSIE \d/.test(e);var r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e);var o=/Edge\/(\d+)/.exec(e);var l=n||r||o;var a=l&&(n?document.documentMode||6:+(o||r)[1]);var s=!o&&/WebKit\//.test(e);var f=s&&/Qt\/\d+\.\d+/.test(e);var c=!o&&/Chrome\/(\d+)/.exec(e);var u=c&&+c[1];var h=/Opera\//.test(e);var d=/Apple Computer/.test(navigator.vendor);var p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e);var m=/PhantomJS/.test(e);var g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2);var v=/Android/.test(e);var y=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e);var x=g||/Mac/.test(t);var b=/\bCrOS\b/.test(e);var w=/win/i.test(t);var C=h&&e.match(/Version\/(\d*\.\d*)/);if(C){C=Number(C[1])}if(C&&C>=15){h=false;s=true}var S=x&&(f||h&&(C==null||C<12.11));var k=i||l&&a>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var M=function(e,t){var i=e.className;var n=L(t).exec(i);if(n){var r=i.slice(n.index+n[0].length);e.className=i.slice(0,n.index)+(r?n[1]+r:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t){e.removeChild(e.firstChild)}return e}function O(e,t){return T(e).appendChild(t)}function A(e,t,i,n){var r=document.createElement(e);if(i){r.className=i}if(n){r.style.cssText=n}if(typeof t=="string"){r.appendChild(document.createTextNode(t))}else if(t){for(var o=0;o<t.length;++o){r.appendChild(t[o])}}return r}function N(e,t,i,n){var r=A(e,t,i,n);r.setAttribute("role","presentation");return r}var P;if(document.createRange){P=function(e,t,i,n){var r=document.createRange();r.setEnd(n||e,i);r.setStart(e,t);return r}}else{P=function(e,t,i){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}n.collapse(true);n.moveEnd("character",i);n.moveStart("character",t);return n}}function F(e,t){if(t.nodeType==3){t=t.parentNode}if(e.contains){return e.contains(t)}do{if(t.nodeType==11){t=t.host}if(t==e){return true}}while(t=t.parentNode)}function D(e){var t;try{t=e.activeElement}catch(i){t=e.body||null}while(t&&t.shadowRoot&&t.shadowRoot.activeElement){t=t.shadowRoot.activeElement}return t}function H(e,t){var i=e.className;if(!L(t).test(i)){e.className+=(i?" ":"")+t}}function E(e,t){var i=e.split(" ");for(var n=0;n<i.length;n++){if(i[n]&&!L(i[n]).test(t)){t+=" "+i[n]}}return t}var W=function(e){e.select()};if(g){W=function(e){e.selectionStart=0;e.selectionEnd=e.value.length}}else if(l){W=function(e){try{e.select()}catch(e){}}}function I(e){return e.display.wrapper.ownerDocument}function R(e){return I(e).defaultView}function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,i){if(!t){t={}}for(var n in e){if(e.hasOwnProperty(n)&&(i!==false||!t.hasOwnProperty(n))){t[n]=e[n]}}return t}function z(e,t,i,n,r){if(t==null){t=e.search(/[^\s\u00a0]/);if(t==-1){t=e.length}}for(var o=n||0,l=r||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t){return l+(t-o)}l+=a-o;l+=i-l%i;o=a+1}}var q=function(){this.id=null;this.f=null;this.time=0;this.handler=B(this.onTimeout,this)};q.prototype.onTimeout=function(e){e.id=0;if(e.time<=+new Date){e.f()}else{setTimeout(e.handler,e.time-+new Date)}};q.prototype.set=function(e,t){this.f=t;var i=+new Date+e;if(!this.id||i<this.time){clearTimeout(this.id);this.id=setTimeout(this.handler,e);this.time=i}};function U(e,t){for(var i=0;i<e.length;++i){if(e[i]==t){return i}}return-1}var G=50;var V={toString:function(){return"CodeMirror.Pass"}};var K={scroll:false},$={origin:"*mouse"},X={origin:"+move"};function _(e,t,i){for(var n=0,r=0;;){var o=e.indexOf("\t",n);if(o==-1){o=e.length}var l=o-n;if(o==e.length||r+l>=t){return n+Math.min(l,t-r)}r+=o-n;r+=i-r%i;n=o+1;if(r>=t){return n}}}var Y=[""];function J(e){while(Y.length<=e){Y.push(Q(Y)+" ")}return Y[e]}function Q(e){return e[e.length-1]}function Z(e,t){var i=[];for(var n=0;n<e.length;n++){i[n]=t(e[n],n)}return i}function ee(e,t,i){var n=0,r=i(t);while(n<e.length&&i(e[n])<=r){n++}e.splice(n,0,t)}function te(){}function ie(e,t){var i;if(Object.create){i=Object.create(e)}else{te.prototype=e;i=new te}if(t){j(t,i)}return i}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function re(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function oe(e,t){if(!t){return re(e)}if(t.source.indexOf("\\w")>-1&&re(e)){return true}return t.test(e)}function le(e){for(var t in e){if(e.hasOwnProperty(t)&&e[t]){return false}}return true}var ae=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function se(e){return e.charCodeAt(0)>=768&&ae.test(e)}function fe(e,t,i){while((i<0?t>0:t<e.length)&&se(e.charAt(t))){t+=i}return t}function ce(e,t,i){var n=t>i?-1:1;for(;;){if(t==i){return t}var r=(t+i)/2,o=n<0?Math.ceil(r):Math.floor(r);if(o==t){return e(o)?t:i}if(e(o)){i=o}else{t=o+n}}}function ue(e,t,i,n){if(!e){return n(t,i,"ltr",0)}var r=false;for(var o=0;o<e.length;++o){var l=e[o];if(l.from<i&&l.to>t||t==i&&l.to==t){n(Math.max(l.from,t),Math.min(l.to,i),l.level==1?"rtl":"ltr",o);r=true}}if(!r){n(t,i,"ltr")}}var he=null;function de(e,t,i){var n;he=null;for(var r=0;r<e.length;++r){var o=e[r];if(o.from<t&&o.to>t){return r}if(o.to==t){if(o.from!=o.to&&i=="before"){n=r}else{he=r}}if(o.from==t){if(o.from!=o.to&&i!="before"){n=r}else{he=r}}}return n!=null?n:he}var pe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(i){if(i<=247){return e.charAt(i)}else if(1424<=i&&i<=1524){return"R"}else if(1536<=i&&i<=1785){return t.charAt(i-1536)}else if(1774<=i&&i<=2220){return"r"}else if(8192<=i&&i<=8203){return"w"}else if(i==8204){return"b"}else{return"L"}}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var r=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,i){this.level=e;this.from=t;this.to=i}return function(e,t){var f=t=="ltr"?"L":"R";if(e.length==0||t=="ltr"&&!n.test(e)){return false}var c=e.length,u=[];for(var h=0;h<c;++h){u.push(i(e.charCodeAt(h)))}for(var d=0,p=f;d<c;++d){var m=u[d];if(m=="m"){u[d]=p}else{p=m}}for(var g=0,v=f;g<c;++g){var y=u[g];if(y=="1"&&v=="r"){u[g]="n"}else if(o.test(y)){v=y;if(y=="r"){u[g]="R"}}}for(var x=1,b=u[0];x<c-1;++x){var w=u[x];if(w=="+"&&b=="1"&&u[x+1]=="1"){u[x]="1"}else if(w==","&&b==u[x+1]&&(b=="1"||b=="n")){u[x]=b}b=w}for(var C=0;C<c;++C){var S=u[C];if(S==","){u[C]="N"}else if(S=="%"){var k=void 0;for(k=C+1;k<c&&u[k]=="%";++k){}var L=C&&u[C-1]=="!"||k<c&&u[k]=="1"?"1":"N";for(var M=C;M<k;++M){u[M]=L}C=k-1}}for(var T=0,O=f;T<c;++T){var A=u[T];if(O=="L"&&A=="1"){u[T]="L"}else if(o.test(A)){O=A}}for(var N=0;N<c;++N){if(r.test(u[N])){var P=void 0;for(P=N+1;P<c&&r.test(u[P]);++P){}var F=(N?u[N-1]:f)=="L";var D=(P<c?u[P]:f)=="L";var H=F==D?F?"L":"R":f;for(var E=N;E<P;++E){u[E]=H}N=P-1}}var W=[],I;for(var R=0;R<c;){if(l.test(u[R])){var B=R;for(++R;R<c&&l.test(u[R]);++R){}W.push(new s(0,B,R))}else{var j=R,z=W.length,q=t=="rtl"?1:0;for(++R;R<c&&u[R]!="L";++R){}for(var U=j;U<R;){if(a.test(u[U])){if(j<U){W.splice(z,0,new s(1,j,U));z+=q}var G=U;for(++U;U<R&&a.test(u[U]);++U){}W.splice(z,0,new s(2,G,U));z+=q;j=U}else{++U}}if(j<R){W.splice(z,0,new s(1,j,R))}}}if(t=="ltr"){if(W[0].level==1&&(I=e.match(/^\s+/))){W[0].from=I[0].length;W.unshift(new s(0,0,I[0].length))}if(Q(W).level==1&&(I=e.match(/\s+$/))){Q(W).to-=I[0].length;W.push(new s(0,c-I[0].length,c))}}return t=="rtl"?W.reverse():W}}();function me(e,t){var i=e.order;if(i==null){i=e.order=pe(e.text,t)}return i}var ge=[];var ve=function(e,t,i){if(e.addEventListener){e.addEventListener(t,i,false)}else if(e.attachEvent){e.attachEvent("on"+t,i)}else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||ge).concat(i)}};function ye(e,t){return e._handlers&&e._handlers[t]||ge}function xe(e,t,i){if(e.removeEventListener){e.removeEventListener(t,i,false)}else if(e.detachEvent){e.detachEvent("on"+t,i)}else{var n=e._handlers,r=n&&n[t];if(r){var o=U(r,i);if(o>-1){n[t]=r.slice(0,o).concat(r.slice(o+1))}}}}function be(e,t){var i=ye(e,t);if(!i.length){return}var n=Array.prototype.slice.call(arguments,2);for(var r=0;r<i.length;++r){i[r].apply(null,n)}}function we(e,t,i){if(typeof t=="string"){t={type:t,preventDefault:function(){this.defaultPrevented=true}}}be(e,i||t.type,e,t);return Te(t)||t.codemirrorIgnore}function Ce(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t){return}var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]);for(var n=0;n<t.length;++n){if(U(i,t[n])==-1){i.push(t[n])}}}function Se(e,t){return ye(e,t).length>0}function ke(e){e.prototype.on=function(e,t){ve(this,e,t)};e.prototype.off=function(e,t){xe(this,e,t)}}function Le(e){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false}}function Me(e){if(e.stopPropagation){e.stopPropagation()}else{e.cancelBubble=true}}function Te(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==false}function Oe(e){Le(e);Me(e)}function Ae(e){return e.target||e.srcElement}function Ne(e){var t=e.which;if(t==null){if(e.button&1){t=1}else if(e.button&2){t=3}else if(e.button&4){t=2}}if(x&&e.ctrlKey&&t==1){t=3}return t}var Pe=function(){if(l&&a<9){return false}var e=A("div");return"draggable"in e||"dragDrop"in e}();var Fe;function De(e){if(Fe==null){var t=A("span","​");O(e,A("span",[t,document.createTextNode("x")]));if(e.firstChild.offsetHeight!=0){Fe=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8)}}var i=Fe?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");i.setAttribute("cm-text","");return i}var He;function Ee(e){if(He!=null){return He}var t=O(e,document.createTextNode("AخA"));var i=P(t,0,1).getBoundingClientRect();var n=P(t,1,2).getBoundingClientRect();T(e);if(!i||i.left==i.right){return false}return He=n.right-i.right<3}var We="\n\nb".split(/\n/).length!=3?function(e){var t=0,i=[],n=e.length;while(t<=n){var r=e.indexOf("\n",t);if(r==-1){r=e.length}var o=e.slice(t,e.charAt(r-1)=="\r"?r-1:r);var l=o.indexOf("\r");if(l!=-1){i.push(o.slice(0,l));t+=l+1}else{i.push(o);t=r+1}}return i}:function(e){return e.split(/\r\n?|\n/)};var Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return false}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}if(!t||t.parentElement()!=e){return false}return t.compareEndPoints("StartToEnd",t)!=0};var Re=function(){var e=A("div");if("oncopy"in e){return true}e.setAttribute("oncopy","return;");return typeof e.oncopy=="function"}();var Be=null;function je(e){if(Be!=null){return Be}var t=O(e,A("span","x"));var i=t.getBoundingClientRect();var n=P(t,0,1).getBoundingClientRect();return Be=Math.abs(i.left-n.left)>1}var ze={},qe={};function Ue(e,t){if(arguments.length>2){t.dependencies=Array.prototype.slice.call(arguments,2)}ze[e]=t}function Ge(e,t){qe[e]=t}function Ve(e){if(typeof e=="string"&&qe.hasOwnProperty(e)){e=qe[e]}else if(e&&typeof e.name=="string"&&qe.hasOwnProperty(e.name)){var t=qe[e.name];if(typeof t=="string"){t={name:t}}e=ie(t,e);e.name=t.name}else if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e)){return Ve("application/xml")}else if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e)){return Ve("application/json")}if(typeof e=="string"){return{name:e}}else{return e||{name:"null"}}}function Ke(e,t){t=Ve(t);var i=ze[t.name];if(!i){return Ke(e,"text/plain")}var n=i(e,t);if($e.hasOwnProperty(t.name)){var r=$e[t.name];for(var o in r){if(!r.hasOwnProperty(o)){continue}if(n.hasOwnProperty(o)){n["_"+o]=n[o]}n[o]=r[o]}}n.name=t.name;if(t.helperType){n.helperType=t.helperType}if(t.modeProps){for(var l in t.modeProps){n[l]=t.modeProps[l]}}return n}var $e={};function Xe(e,t){var i=$e.hasOwnProperty(e)?$e[e]:$e[e]={};j(t,i)}function _e(e,t){if(t===true){return t}if(e.copyState){return e.copyState(t)}var i={};for(var n in t){var r=t[n];if(r instanceof Array){r=r.concat([])}i[n]=r}return i}function Ye(e,t){var i;while(e.innerMode){i=e.innerMode(t);if(!i||i.mode==e){break}t=i.state;e=i.mode}return i||{mode:e,state:t}}function Je(e,t,i){return e.startState?e.startState(t,i):true}var Qe=function(e,t,i){this.pos=this.start=0;this.string=e;this.tabSize=t||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0;this.lineOracle=i};Qe.prototype.eol=function(){return this.pos>=this.string.length};Qe.prototype.sol=function(){return this.pos==this.lineStart};Qe.prototype.peek=function(){return this.string.charAt(this.pos)||undefined};Qe.prototype.next=function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}};Qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);var i;if(typeof e=="string"){i=t==e}else{i=t&&(e.test?e.test(t):e(t))}if(i){++this.pos;return t}};Qe.prototype.eatWhile=function(e){var t=this.pos;while(this.eat(e)){}return this.pos>t};Qe.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>e};Qe.prototype.skipToEnd=function(){this.pos=this.string.length};Qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1){this.pos=t;return true}};Qe.prototype.backUp=function(e){this.pos-=e};Qe.prototype.column=function(){if(this.lastColumnPos<this.start){this.lastColumnValue=z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)};Qe.prototype.indentation=function(){return z(this.string,null,this.tabSize)-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)};Qe.prototype.match=function(e,t,i){if(typeof e=="string"){var n=function(e){return i?e.toLowerCase():e};var r=this.string.substr(this.pos,e.length);if(n(r)==n(e)){if(t!==false){this.pos+=e.length}return true}}else{var o=this.string.slice(this.pos).match(e);if(o&&o.index>0){return null}if(o&&t!==false){this.pos+=o[0].length}return o}};Qe.prototype.current=function(){return this.string.slice(this.start,this.pos)};Qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};Qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)};Qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ze(e,t){t-=e.first;if(t<0||t>=e.size){throw new Error("There is no line "+(t+e.first)+" in the document.")}var i=e;while(!i.lines){for(var n=0;;++n){var r=i.children[n],o=r.chunkSize();if(t<o){i=r;break}t-=o}}return i.lines[t]}function et(e,t,i){var n=[],r=t.line;e.iter(t.line,i.line+1,function(e){var o=e.text;if(r==i.line){o=o.slice(0,i.ch)}if(r==t.line){o=o.slice(t.ch)}n.push(o);++r});return n}function tt(e,t,i){var n=[];e.iter(t,i,function(e){n.push(e.text)});return n}function it(e,t){var i=t-e.height;if(i){for(var n=e;n;n=n.parent){n.height+=i}}}function nt(e){if(e.parent==null){return null}var t=e.parent,i=U(t.lines,e);for(var n=t.parent;n;t=n,n=n.parent){for(var r=0;;++r){if(n.children[r]==t){break}i+=n.children[r].chunkSize()}}return i+t.first}function rt(e,t){var i=e.first;e:do{for(var n=0;n<e.children.length;++n){var r=e.children[n],o=r.height;if(t<o){e=r;continue e}t-=o;i+=r.chunkSize()}return i}while(!e.lines);var l=0;for(;l<e.lines.length;++l){var a=e.lines[l],s=a.height;if(t<s){break}t-=s}return i+l}function ot(e,t){return t>=e.first&&t<e.first+e.size}function lt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function at(e,t,i){if(i===void 0)i=null;if(!(this instanceof at)){return new at(e,t,i)}this.line=e;this.ch=t;this.sticky=i}function st(e,t){return e.line-t.line||e.ch-t.ch}function ft(e,t){return e.sticky==t.sticky&&st(e,t)==0}function ct(e){return at(e.line,e.ch)}function ut(e,t){return st(e,t)<0?t:e}function ht(e,t){return st(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function pt(e,t){if(t.line<e.first){return at(e.first,0)}var i=e.first+e.size-1;if(t.line>i){return at(i,Ze(e,i).text.length)}return mt(t,Ze(e,t.line).text.length)}function mt(e,t){var i=e.ch;if(i==null||i>t){return at(e.line,t)}else if(i<0){return at(e.line,0)}else{return e}}function gt(e,t){var i=[];for(var n=0;n<t.length;n++){i[n]=pt(e,t[n])}return i}var vt=function(e,t){this.state=e;this.lookAhead=t};var yt=function(e,t,i,n){this.state=t;this.doc=e;this.line=i;this.maxLookAhead=n||0;this.baseTokens=null;this.baseTokenPos=1};yt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);if(t!=null&&e>this.maxLookAhead){this.maxLookAhead=e}return t};yt.prototype.baseToken=function(e){if(!this.baseTokens){return null}while(this.baseTokens[this.baseTokenPos]<=e){this.baseTokenPos+=2}var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}};yt.prototype.nextLine=function(){this.line++;if(this.maxLookAhead>0){this.maxLookAhead--}};yt.fromSaved=function(e,t,i){if(t instanceof vt){return new yt(e,_e(e.mode,t.state),i,t.lookAhead)}else{return new yt(e,_e(e.mode,t),i)}};yt.prototype.save=function(e){var t=e!==false?_e(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vt(t,this.maxLookAhead):t};function xt(e,t,i,n){var r=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,i,function(e,t){return r.push(e,t)},o,n);var l=i.state;var a=function(n){i.baseTokens=r;var a=e.state.overlays[n],s=1,f=0;i.state=true;Ot(e,t.text,a.mode,i,function(e,t){var i=s;while(f<e){var n=r[s];if(n>e){r.splice(s,1,e,r[s+1],n)}s+=2;f=Math.min(e,n)}if(!t){return}if(a.opaque){r.splice(i,s-i,e,"overlay "+t);s=i+2}else{for(;i<s;i+=2){var o=r[i+1];r[i+1]=(o?o+" ":"")+"overlay "+t}}},o);i.state=l;i.baseTokens=null;i.baseTokenPos=1};for(var s=0;s<e.state.overlays.length;++s)a(s);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function bt(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=wt(e,nt(t));var r=t.text.length>e.options.maxHighlightLength&&_e(e.doc.mode,n.state);var o=xt(e,t,n);if(r){n.state=r}t.stateAfter=n.save(!r);t.styles=o.styles;if(o.classes){t.styleClasses=o.classes}else if(t.styleClasses){t.styleClasses=null}if(i===e.doc.highlightFrontier){e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier)}}return t.styles}function wt(e,t,i){var n=e.doc,r=e.display;if(!n.mode.startState){return new yt(n,true,t)}var o=At(e,t,i);var l=o>n.first&&Ze(n,o-1).stateAfter;var a=l?yt.fromSaved(n,l,o):new yt(n,Je(n.mode),o);n.iter(o,t,function(i){Ct(e,i.text,a);var n=a.line;i.stateAfter=n==t-1||n%5==0||n>=r.viewFrom&&n<r.viewTo?a.save():null;a.nextLine()});if(i){n.modeFrontier=a.line}return a}function Ct(e,t,i,n){var r=e.doc.mode;var o=new Qe(t,e.options.tabSize,i);o.start=o.pos=n||0;if(t==""){St(r,i.state)}while(!o.eol()){kt(r,o,i.state);o.start=o.pos}}function St(e,t){if(e.blankLine){return e.blankLine(t)}if(!e.innerMode){return}var i=Ye(e,t);if(i.mode.blankLine){return i.mode.blankLine(i.state)}}function kt(e,t,i,n){for(var r=0;r<10;r++){if(n){n[0]=Ye(e,i).mode}var o=e.token(t,i);if(t.pos>t.start){return o}}throw new Error("Mode "+e.name+" failed to advance stream.")}var Lt=function(e,t,i){this.start=e.start;this.end=e.pos;this.string=e.current();this.type=t||null;this.state=i};function Mt(e,t,i,n){var r=e.doc,o=r.mode,l;t=pt(r,t);var a=Ze(r,t.line),s=wt(e,t.line,i);var f=new Qe(a.text,e.options.tabSize,s),c;if(n){c=[]}while((n||f.pos<t.ch)&&!f.eol()){f.start=f.pos;l=kt(o,f,s.state);if(n){c.push(new Lt(f,l,_e(r.mode,s.state)))}}return n?c:new Lt(f,l,s.state)}function Tt(e,t){if(e){for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i){break}e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var n=i[1]?"bgClass":"textClass";if(t[n]==null){t[n]=i[2]}else if(!new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[n])){t[n]+=" "+i[2]}}}return e}function Ot(e,t,i,n,r,o,l){var a=i.flattenSpans;if(a==null){a=e.options.flattenSpans}var s=0,f=null;var c=new Qe(t,e.options.tabSize,n),u;var h=e.options.addModeClass&&[null];if(t==""){Tt(St(i,n.state),o)}while(!c.eol()){if(c.pos>e.options.maxHighlightLength){a=false;if(l){Ct(e,t,n,c.pos)}c.pos=t.length;u=null}else{u=Tt(kt(i,c,n.state,h),o)}if(h){var d=h[0].name;if(d){u="m-"+(u?d+" "+u:d)}}if(!a||f!=u){while(s<c.start){s=Math.min(c.start,s+5e3);r(s,f)}f=u}c.start=c.pos}while(s<c.pos){var p=Math.min(c.pos,s+5e3);r(p,f);s=p}}function At(e,t,i){var n,r,o=e.doc;var l=i?-1:t-(e.doc.mode.innerMode?1e3:100);for(var a=t;a>l;--a){if(a<=o.first){return o.first}var s=Ze(o,a-1),f=s.stateAfter;if(f&&(!i||a+(f instanceof vt?f.lookAhead:0)<=o.modeFrontier)){return a}var c=z(s.text,null,e.options.tabSize);if(r==null||n>c){r=a-1;n=c}}return r}function Nt(e,t){e.modeFrontier=Math.min(e.modeFrontier,t);if(e.highlightFrontier<t-10){return}var i=e.first;for(var n=t-1;n>i;n--){var r=Ze(e,n).stateAfter;if(r&&(!(r instanceof vt)||n+r.lookAhead<t)){i=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}var Pt=false,Ft=false;function Dt(){Pt=true}function Ht(){Ft=true}function Et(e,t,i){this.marker=e;this.from=t;this.to=i}function Wt(e,t){if(e){for(var i=0;i<e.length;++i){var n=e[i];if(n.marker==t){return n}}}}function It(e,t){var i;for(var n=0;n<e.length;++n){if(e[n]!=t){(i||(i=[])).push(e[n])}}return i}function Rt(e,t,i){var n=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));if(n&&e.markedSpans&&n.has(e.markedSpans)){e.markedSpans.push(t)}else{e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t];if(n){n.add(e.markedSpans)}}t.marker.attachLine(e)}function Bt(e,t,i){var n;if(e){for(var r=0;r<e.length;++r){var o=e[r],l=o.marker;var a=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&l.type=="bookmark"&&(!i||!o.marker.insertLeft)){var s=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Et(l,o.from,s?null:o.to))}}}return n}function jt(e,t,i){var n;if(e){for(var r=0;r<e.length;++r){var o=e[r],l=o.marker;var a=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!i||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Et(l,s?null:o.from-t,o.to==null?null:o.to-t))}}}return n}function zt(e,t){if(t.full){return null}var i=ot(e,t.from.line)&&Ze(e,t.from.line).markedSpans;var n=ot(e,t.to.line)&&Ze(e,t.to.line).markedSpans;if(!i&&!n){return null}var r=t.from.ch,o=t.to.ch,l=st(t.from,t.to)==0;var a=Bt(i,r,l);var s=jt(n,o,l);var f=t.text.length==1,c=Q(t.text).length+(f?r:0);if(a){for(var u=0;u<a.length;++u){var h=a[u];if(h.to==null){var d=Wt(s,h.marker);if(!d){h.to=r}else if(f){h.to=d.to==null?null:d.to+c}}}}if(s){for(var p=0;p<s.length;++p){var m=s[p];if(m.to!=null){m.to+=c}if(m.from==null){var g=Wt(a,m.marker);if(!g){m.from=c;if(f){(a||(a=[])).push(m)}}}else{m.from+=c;if(f){(a||(a=[])).push(m)}}}}if(a){a=qt(a)}if(s&&s!=a){s=qt(s)}var v=[a];if(!f){var y=t.text.length-2,x;if(y>0&&a){for(var b=0;b<a.length;++b){if(a[b].to==null){(x||(x=[])).push(new Et(a[b].marker,null,null))}}}for(var w=0;w<y;++w){v.push(x)}v.push(s)}return v}function qt(e){for(var t=0;t<e.length;++t){var i=e[t];if(i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==false){e.splice(t--,1)}}if(!e.length){return null}return e}function Ut(e,t,i){var n=null;e.iter(t.line,i.line+1,function(e){if(e.markedSpans){for(var t=0;t<e.markedSpans.length;++t){var i=e.markedSpans[t].marker;if(i.readOnly&&(!n||U(n,i)==-1)){(n||(n=[])).push(i)}}}});if(!n){return null}var r=[{from:t,to:i}];for(var o=0;o<n.length;++o){var l=n[o],a=l.find(0);for(var s=0;s<r.length;++s){var f=r[s];if(st(f.to,a.from)<0||st(f.from,a.to)>0){continue}var c=[s,1],u=st(f.from,a.from),h=st(f.to,a.to);if(u<0||!l.inclusiveLeft&&!u){c.push({from:f.from,to:a.from})}if(h>0||!l.inclusiveRight&&!h){c.push({from:a.to,to:f.to})}r.splice.apply(r,c);s+=c.length-3}}return r}function Gt(e){var t=e.markedSpans;if(!t){return}for(var i=0;i<t.length;++i){t[i].marker.detachLine(e)}e.markedSpans=null}function Vt(e,t){if(!t){return}for(var i=0;i<t.length;++i){t[i].marker.attachLine(e)}e.markedSpans=t}function Kt(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function Xt(e,t){var i=e.lines.length-t.lines.length;if(i!=0){return i}var n=e.find(),r=t.find();var o=st(n.from,r.from)||Kt(e)-Kt(t);if(o){return-o}var l=st(n.to,r.to)||$t(e)-$t(t);if(l){return l}return t.id-e.id}function _t(e,t){var i=Ft&&e.markedSpans,n;if(i){for(var r=void 0,o=0;o<i.length;++o){r=i[o];if(r.marker.collapsed&&(t?r.from:r.to)==null&&(!n||Xt(n,r.marker)<0)){n=r.marker}}}return n}function Yt(e){return _t(e,true)}function Jt(e){return _t(e,false)}function Qt(e,t){var i=Ft&&e.markedSpans,n;if(i){for(var r=0;r<i.length;++r){var o=i[r];if(o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!n||Xt(n,o.marker)<0)){n=o.marker}}}return n}function Zt(e,t,i,n,r){var o=Ze(e,t);var l=Ft&&o.markedSpans;if(l){for(var a=0;a<l.length;++a){var s=l[a];if(!s.marker.collapsed){continue}var f=s.marker.find(0);var c=st(f.from,i)||Kt(s.marker)-Kt(r);var u=st(f.to,n)||$t(s.marker)-$t(r);if(c>=0&&u<=0||c<=0&&u>=0){continue}if(c<=0&&(s.marker.inclusiveRight&&r.inclusiveLeft?st(f.to,i)>=0:st(f.to,i)>0)||c>=0&&(s.marker.inclusiveRight&&r.inclusiveLeft?st(f.from,n)<=0:st(f.from,n)<0)){return true}}}}function ei(e){var t;while(t=Yt(e)){e=t.find(-1,true).line}return e}function ti(e){var t;while(t=Jt(e)){e=t.find(1,true).line}return e}function ii(e){var t,i;while(t=Jt(e)){e=t.find(1,true).line;(i||(i=[])).push(e)}return i}function ni(e,t){var i=Ze(e,t),n=ei(i);if(i==n){return t}return nt(n)}function ri(e,t){if(t>e.lastLine()){return t}var i=Ze(e,t),n;if(!oi(e,i)){return t}while(n=Jt(i)){i=n.find(1,true).line}return nt(i)+1}function oi(e,t){var i=Ft&&t.markedSpans;if(i){for(var n=void 0,r=0;r<i.length;++r){n=i[r];if(!n.marker.collapsed){continue}if(n.from==null){return true}if(n.marker.widgetNode){continue}if(n.from==0&&n.marker.inclusiveLeft&&li(e,t,n)){return true}}}}function li(e,t,i){if(i.to==null){var n=i.marker.find(1,true);return li(e,n.line,Wt(n.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length){return true}for(var r=void 0,o=0;o<t.markedSpans.length;++o){r=t.markedSpans[o];if(r.marker.collapsed&&!r.marker.widgetNode&&r.from==i.to&&(r.to==null||r.to!=i.from)&&(r.marker.inclusiveLeft||i.marker.inclusiveRight)&&li(e,t,r)){return true}}}function ai(e){e=ei(e);var t=0,i=e.parent;for(var n=0;n<i.lines.length;++n){var r=i.lines[n];if(r==e){break}else{t+=r.height}}for(var o=i.parent;o;i=o,o=i.parent){for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==i){break}else{t+=a.height}}}return t}function si(e){if(e.height==0){return 0}var t=e.text.length,i,n=e;while(i=Yt(n)){var r=i.find(0,true);n=r.from.line;t+=r.from.ch-r.to.ch}n=e;while(i=Jt(n)){var o=i.find(0,true);t-=n.text.length-o.from.ch;n=o.to.line;t+=n.text.length-o.to.ch}return t}function fi(e){var t=e.display,i=e.doc;t.maxLine=Ze(i,i.first);t.maxLineLength=si(t.maxLine);t.maxLineChanged=true;i.iter(function(e){var i=si(e);if(i>t.maxLineLength){t.maxLineLength=i;t.maxLine=e}})}var ci=function(e,t,i){this.text=e;Vt(this,t);this.height=i?i(this):1};ci.prototype.lineNo=function(){return nt(this)};ke(ci);function ui(e,t,i,n){e.text=t;if(e.stateAfter){e.stateAfter=null}if(e.styles){e.styles=null}if(e.order!=null){e.order=null}Gt(e);Vt(e,i);var r=n?n(e):1;if(r!=e.height){it(e,r)}}function hi(e){e.parent=null;Gt(e)}var di={},pi={};function mi(e,t){if(!e||/^\s*$/.test(e)){return null}var i=t.addModeClass?pi:di;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function gi(e,t){var i=N("span",null,null,s?"padding-right: .1px":null);var n={pre:N("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:false,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o=r?t.rest[r-1]:t.line,l=void 0;n.pos=0;n.addToken=yi;if(Ee(e.display.measure)&&(l=me(o,e.doc.direction))){n.addToken=bi(n.addToken,l)}n.map=[];var a=t!=e.display.externalMeasured&&nt(o);Ci(o,n,bt(e,o,a));if(o.styleClasses){if(o.styleClasses.bgClass){n.bgClass=E(o.styleClasses.bgClass,n.bgClass||"")}if(o.styleClasses.textClass){n.textClass=E(o.styleClasses.textClass,n.textClass||"")}}if(n.map.length==0){n.map.push(0,0,n.content.appendChild(De(e.display.measure)))}if(r==0){t.measure.map=n.map;t.measure.cache={}}else{(t.measure.maps||(t.measure.maps=[])).push(n.map);(t.measure.caches||(t.measure.caches=[])).push({})}}if(s){var f=n.content.lastChild;if(/\bcm-tab\b/.test(f.className)||f.querySelector&&f.querySelector(".cm-tab")){n.content.className="cm-tab-wrap-hack"}}be(e,"renderLine",e,t.line,n.pre);if(n.pre.className){n.textClass=E(n.pre.className,n.textClass||"")}return n}function vi(e){var t=A("span","•","cm-invalidchar");t.title="\\u"+e.charCodeAt(0).toString(16);t.setAttribute("aria-label",t.title);return t}function yi(e,t,i,n,r,o,s){if(!t){return}var f=e.splitSpaces?xi(t,e.trailingSpace):t;var c=e.cm.state.specialChars,u=false;var h;if(!c.test(t)){e.col+=t.length;h=document.createTextNode(f);e.map.push(e.pos,e.pos+t.length,h);if(l&&a<9){u=true}e.pos+=t.length}else{h=document.createDocumentFragment();var d=0;while(true){c.lastIndex=d;var p=c.exec(t);var m=p?p.index-d:t.length-d;if(m){var g=document.createTextNode(f.slice(d,d+m));if(l&&a<9){h.appendChild(A("span",[g]))}else{h.appendChild(g)}e.map.push(e.pos,e.pos+m,g);e.col+=m;e.pos+=m}if(!p){break}d+=m+1;var v=void 0;if(p[0]=="\t"){var y=e.cm.options.tabSize,x=y-e.col%y;v=h.appendChild(A("span",J(x),"cm-tab"));v.setAttribute("role","presentation");v.setAttribute("cm-text","\t");e.col+=x}else if(p[0]=="\r"||p[0]=="\n"){v=h.appendChild(A("span",p[0]=="\r"?"␍":"␤","cm-invalidchar"));v.setAttribute("cm-text",p[0]);e.col+=1}else{v=e.cm.options.specialCharPlaceholder(p[0]);v.setAttribute("cm-text",p[0]);if(l&&a<9){h.appendChild(A("span",[v]))}else{h.appendChild(v)}e.col+=1}e.map.push(e.pos,e.pos+1,v);e.pos++}}e.trailingSpace=f.charCodeAt(t.length-1)==32;if(i||n||r||u||o||s){var b=i||"";if(n){b+=n}if(r){b+=r}var w=A("span",[h],b,o);if(s){for(var C in s){if(s.hasOwnProperty(C)&&C!="style"&&C!="class"){w.setAttribute(C,s[C])}}}return e.content.appendChild(w)}e.content.appendChild(h)}function xi(e,t){if(e.length>1&&!/  /.test(e)){return e}var i=t,n="";for(var r=0;r<e.length;r++){var o=e.charAt(r);if(o==" "&&i&&(r==e.length-1||e.charCodeAt(r+1)==32)){o=" "}n+=o;i=o==" "}return n}function bi(e,t){return function(i,n,r,o,l,a,s){r=r?r+" cm-force-border":"cm-force-border";var f=i.pos,c=f+n.length;for(;;){var u=void 0;for(var h=0;h<t.length;h++){u=t[h];if(u.to>f&&u.from<=f){break}}if(u.to>=c){return e(i,n,r,o,l,a,s)}e(i,n.slice(0,u.to-f),r,o,null,a,s);o=null;n=n.slice(u.to-f);f=u.to}}}function wi(e,t,i,n){var r=!n&&i.widgetNode;if(r){e.map.push(e.pos,e.pos+t,r)}if(!n&&e.cm.display.input.needsContentAttribute){if(!r){r=e.content.appendChild(document.createElement("span"))}r.setAttribute("cm-marker",i.id)}if(r){e.cm.display.input.setUneditable(r);e.content.appendChild(r)}e.pos+=t;e.trailingSpace=false}function Ci(e,t,i){var n=e.markedSpans,r=e.text,o=0;if(!n){for(var l=1;l<i.length;l+=2){t.addToken(t,r.slice(o,o=i[l]),mi(i[l+1],t.cm.options))}return}var a=r.length,s=0,f=1,c="",u,h;var d=0,p,m,g,v,y;for(;;){if(d==s){p=m=g=h="";y=null;v=null;d=Infinity;var x=[],b=void 0;for(var w=0;w<n.length;++w){var C=n[w],S=C.marker;if(S.type=="bookmark"&&C.from==s&&S.widgetNode){x.push(S)}else if(C.from<=s&&(C.to==null||C.to>s||S.collapsed&&C.to==s&&C.from==s)){if(C.to!=null&&C.to!=s&&d>C.to){d=C.to;m=""}if(S.className){p+=" "+S.className}if(S.css){h=(h?h+";":"")+S.css}if(S.startStyle&&C.from==s){g+=" "+S.startStyle}if(S.endStyle&&C.to==d){(b||(b=[])).push(S.endStyle,C.to)}if(S.title){(y||(y={})).title=S.title}if(S.attributes){for(var k in S.attributes){(y||(y={}))[k]=S.attributes[k]}}if(S.collapsed&&(!v||Xt(v.marker,S)<0)){v=C}}else if(C.from>s&&d>C.from){d=C.from}}if(b){for(var L=0;L<b.length;L+=2){if(b[L+1]==d){m+=" "+b[L]}}}if(!v||v.from==s){for(var M=0;M<x.length;++M){wi(t,0,x[M])}}if(v&&(v.from||0)==s){wi(t,(v.to==null?a+1:v.to)-s,v.marker,v.from==null);if(v.to==null){return}if(v.to==s){v=false}}}if(s>=a){break}var T=Math.min(a,d);while(true){if(c){var O=s+c.length;if(!v){var A=O>T?c.slice(0,T-s):c;t.addToken(t,A,u?u+p:p,g,s+A.length==d?m:"",h,y)}if(O>=T){c=c.slice(T-s);s=T;break}s=O;g=""}c=r.slice(o,o=i[f++]);u=mi(i[f++],t.cm.options)}}}function Si(e,t,i){this.line=t;this.rest=ii(t);this.size=this.rest?nt(Q(this.rest))-i+1:1;this.node=this.text=null;this.hidden=oi(e,t)}function ki(e,t,i){var n=[],r;for(var o=t;o<i;o=r){var l=new Si(e.doc,Ze(e.doc,o),o);r=o+l.size;n.push(l)}return n}var Li=null;function Mi(e){if(Li){Li.ops.push(e)}else{e.ownsGroup=Li={ops:[e],delayedCallbacks:[]}}}function Ti(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++){t[i].call(null)}for(var n=0;n<e.ops.length;n++){var r=e.ops[n];if(r.cursorActivityHandlers){while(r.cursorActivityCalled<r.cursorActivityHandlers.length){r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}}}while(i<t.length)}function Oi(e,t){var i=e.ownsGroup;if(!i){return}try{Ti(i)}finally{Li=null;t(i)}}var Ai=null;function Ni(e,t){var i=ye(e,t);if(!i.length){return}var n=Array.prototype.slice.call(arguments,2),r;if(Li){r=Li.delayedCallbacks}else if(Ai){r=Ai}else{r=Ai=[];setTimeout(Pi,0)}var o=function(e){r.push(function(){return i[e].apply(null,n)})};for(var l=0;l<i.length;++l)o(l)}function Pi(){var e=Ai;Ai=null;for(var t=0;t<e.length;++t){e[t]()}}function Fi(e,t,i,n){for(var r=0;r<t.changes.length;r++){var o=t.changes[r];if(o=="text"){Wi(e,t)}else if(o=="gutter"){Ri(e,t,i,n)}else if(o=="class"){Ii(e,t)}else if(o=="widget"){Bi(e,t,n)}}t.changes=null}function Di(e){if(e.node==e.text){e.node=A("div",null,null,"position: relative");if(e.text.parentNode){e.text.parentNode.replaceChild(e.node,e.text)}e.node.appendChild(e.text);if(l&&a<8){e.node.style.zIndex=2}}return e.node}function Hi(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i){i+=" CodeMirror-linebackground"}if(t.background){if(i){t.background.className=i}else{t.background.parentNode.removeChild(t.background);t.background=null}}else if(i){var n=Di(t);t.background=n.insertBefore(A("div",null,i),n.firstChild);e.display.input.setUneditable(t.background)}}function Ei(e,t){var i=e.display.externalMeasured;if(i&&i.line==t.line){e.display.externalMeasured=null;t.measure=i.measure;return i.built}return gi(e,t)}function Wi(e,t){var i=t.text.className;var n=Ei(e,t);if(t.text==t.node){t.node=n.pre}t.text.parentNode.replaceChild(n.pre,t.text);t.text=n.pre;if(n.bgClass!=t.bgClass||n.textClass!=t.textClass){t.bgClass=n.bgClass;t.textClass=n.textClass;Ii(e,t)}else if(i){t.text.className=i}}function Ii(e,t){Hi(e,t);if(t.line.wrapClass){Di(t).className=t.line.wrapClass}else if(t.node!=t.text){t.node.className=""}var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function Ri(e,t,i,n){if(t.gutter){t.node.removeChild(t.gutter);t.gutter=null}if(t.gutterBackground){t.node.removeChild(t.gutterBackground);t.gutterBackground=null}if(t.line.gutterClass){var r=Di(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px");e.display.input.setUneditable(t.gutterBackground);r.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=Di(t);var a=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");a.setAttribute("aria-hidden","true");e.display.input.setUneditable(a);l.insertBefore(a,t.text);if(t.line.gutterClass){a.className+=" "+t.line.gutterClass}if(e.options.lineNumbers&&(!o||!o["CodeMirror-linenumbers"])){t.lineNumber=a.appendChild(A("div",lt(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))}if(o){for(var s=0;s<e.display.gutterSpecs.length;++s){var f=e.display.gutterSpecs[s].className,c=o.hasOwnProperty(f)&&o[f];if(c){a.appendChild(A("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[f]+"px; width: "+n.gutterWidth[f]+"px"))}}}}}function Bi(e,t,i){if(t.alignable){t.alignable=null}var n=L("CodeMirror-linewidget");for(var r=t.node.firstChild,o=void 0;r;r=o){o=r.nextSibling;if(n.test(r.className)){t.node.removeChild(r)}}zi(e,t,i)}function ji(e,t,i,n){var r=Ei(e,t);t.text=t.node=r.pre;if(r.bgClass){t.bgClass=r.bgClass}if(r.textClass){t.textClass=r.textClass}Ii(e,t);Ri(e,t,i,n);zi(e,t,n);return t.node}function zi(e,t,i){qi(e,t.line,t,i,true);if(t.rest){for(var n=0;n<t.rest.length;n++){qi(e,t.rest[n],t,i,false)}}}function qi(e,t,i,n,r){if(!t.widgets){return}var o=Di(i);for(var l=0,a=t.widgets;l<a.length;++l){var s=a[l],f=A("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));if(!s.handleMouseEvents){f.setAttribute("cm-ignore-events","true")}Ui(s,f,i,n);e.display.input.setUneditable(f);if(r&&s.above){o.insertBefore(f,i.gutter||i.text)}else{o.appendChild(f)}Ni(s,"redraw")}}function Ui(e,t,i,n){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var r=n.wrapperWidth;t.style.left=n.fixedPos+"px";if(!e.coverGutter){r-=n.gutterTotalWidth;t.style.paddingLeft=n.gutterTotalWidth+"px"}t.style.width=r+"px"}if(e.coverGutter){t.style.zIndex=5;t.style.position="relative";if(!e.noHScroll){t.style.marginLeft=-n.gutterTotalWidth+"px"}}}function Gi(e){if(e.height!=null){return e.height}var t=e.doc.cm;if(!t){return 0}if(!F(document.body,e.node)){var i="position: relative;";if(e.coverGutter){i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"}if(e.noHScroll){i+="width: "+t.display.wrapper.clientWidth+"px;"}O(t.display.measure,A("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function Vi(e,t){for(var i=Ae(t);i!=e.wrapper;i=i.parentNode){if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover){return true}}}function Ki(e){return e.lineSpace.offsetTop}function $i(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Xi(e){if(e.cachedPaddingH){return e.cachedPaddingH}var t=O(e.measure,A("pre","x","CodeMirror-line-like"));var i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle;var n={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};if(!isNaN(n.left)&&!isNaN(n.right)){e.cachedPaddingH=n}return n}function _i(e){return G-e.display.nativeBarWidth}function Yi(e){return e.display.scroller.clientWidth-_i(e)-e.display.barWidth}function Ji(e){return e.display.scroller.clientHeight-_i(e)-e.display.barHeight}function Qi(e,t,i){var n=e.options.lineWrapping;var r=n&&Yi(e);if(!t.measure.heights||n&&t.measure.width!=r){var o=t.measure.heights=[];if(n){t.measure.width=r;var l=t.text.firstChild.getClientRects();for(var a=0;a<l.length-1;a++){var s=l[a],f=l[a+1];if(Math.abs(s.bottom-f.bottom)>2){o.push((s.bottom+f.top)/2-i.top)}}}o.push(i.bottom-i.top)}}function Zi(e,t,i){if(e.line==t){return{map:e.measure.map,cache:e.measure.cache}}if(e.rest){for(var n=0;n<e.rest.length;n++){if(e.rest[n]==t){return{map:e.measure.maps[n],cache:e.measure.caches[n]}}}for(var r=0;r<e.rest.length;r++){if(nt(e.rest[r])>i){return{map:e.measure.maps[r],cache:e.measure.caches[r],before:true}}}}}function en(e,t){t=ei(t);var i=nt(t);var n=e.display.externalMeasured=new Si(e.doc,t,i);n.lineN=i;var r=n.built=gi(e,n);n.text=r.pre;O(e.display.lineMeasure,r.pre);return n}function tn(e,t,i,n){return on(e,rn(e,t),i,n)}function nn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo){return e.display.view[Rn(e,t)]}var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size){return i}}function rn(e,t){var i=nt(t);var n=nn(e,i);if(n&&!n.text){n=null}else if(n&&n.changes){Fi(e,n,i,Dn(e));e.curOp.forceUpdate=true}if(!n){n=en(e,t)}var r=Zi(n,t,i);return{line:t,view:n,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:false}}function on(e,t,i,n,r){if(t.before){i=-1}var o=i+(n||""),l;if(t.cache.hasOwnProperty(o)){l=t.cache[o]}else{if(!t.rect){t.rect=t.view.text.getBoundingClientRect()}if(!t.hasHeights){Qi(e,t.view,t.rect);t.hasHeights=true}l=fn(e,t,i,n);if(!l.bogus){t.cache[o]=l}}return{left:l.left,right:l.right,top:r?l.rtop:l.top,bottom:r?l.rbottom:l.bottom}}var ln={left:0,right:0,top:0,bottom:0};function an(e,t,i){var n,r,o,l,a,s;for(var f=0;f<e.length;f+=3){a=e[f];s=e[f+1];if(t<a){r=0;o=1;l="left"}else if(t<s){r=t-a;o=r+1}else if(f==e.length-3||t==s&&e[f+3]>t){o=s-a;r=o-1;if(t>=s){l="right"}}if(r!=null){n=e[f+2];if(a==s&&i==(n.insertLeft?"left":"right")){l=i}if(i=="left"&&r==0){while(f&&e[f-2]==e[f-3]&&e[f-1].insertLeft){n=e[(f-=3)+2];l="left"}}if(i=="right"&&r==s-a){while(f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft){n=e[(f+=3)+2];l="right"}}break}}return{node:n,start:r,end:o,collapse:l,coverStart:a,coverEnd:s}}function sn(e,t){var i=ln;if(t=="left"){for(var n=0;n<e.length;n++){if((i=e[n]).left!=i.right){break}}}else{for(var r=e.length-1;r>=0;r--){if((i=e[r]).left!=i.right){break}}}return i}function fn(e,t,i,n){var r=an(t.map,i,n);var o=r.node,s=r.start,f=r.end,c=r.collapse;var u;if(o.nodeType==3){for(var h=0;h<4;h++){while(s&&se(t.line.text.charAt(r.coverStart+s))){--s}while(r.coverStart+f<r.coverEnd&&se(t.line.text.charAt(r.coverStart+f))){++f}if(l&&a<9&&s==0&&f==r.coverEnd-r.coverStart){u=o.parentNode.getBoundingClientRect()}else{u=sn(P(o,s,f).getClientRects(),n)}if(u.left||u.right||s==0){break}f=s;s=s-1;c="right"}if(l&&a<11){u=cn(e.display.measure,u)}}else{if(s>0){c=n="right"}var d;if(e.options.lineWrapping&&(d=o.getClientRects()).length>1){u=d[n=="right"?d.length-1:0]}else{u=o.getBoundingClientRect()}}if(l&&a<9&&!s&&(!u||!u.left&&!u.right)){var p=o.parentNode.getClientRects()[0];if(p){u={left:p.left,right:p.left+Fn(e.display),top:p.top,bottom:p.bottom}}else{u=ln}}var m=u.top-t.rect.top,g=u.bottom-t.rect.top;var v=(m+g)/2;var y=t.view.measure.heights;var x=0;for(;x<y.length-1;x++){if(v<y[x]){break}}var b=x?y[x-1]:0,w=y[x];var C={left:(c=="right"?u.right:u.left)-t.rect.left,right:(c=="left"?u.left:u.right)-t.rect.left,top:b,bottom:w};if(!u.left&&!u.right){C.bogus=true}if(!e.options.singleCursorHeightPerLine){C.rtop=m;C.rbottom=g}return C}function cn(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!je(e)){return t}var i=screen.logicalXDPI/screen.deviceXDPI;var n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*n,bottom:t.bottom*n}}function un(e){if(e.measure){e.measure.cache={};e.measure.heights=null;if(e.rest){for(var t=0;t<e.rest.length;t++){e.measure.caches[t]={}}}}}function hn(e){e.display.externalMeasure=null;T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++){un(e.display.view[t])}}function dn(e){hn(e);e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null;if(!e.options.lineWrapping){e.display.maxLineChanged=true}e.display.lineNumChars=null}function pn(e){if(c&&v){return-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft))}return e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function mn(e){if(c&&v){return-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop))}return e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function gn(e){var t=ei(e);var i=t.widgets;var n=0;if(i){for(var r=0;r<i.length;++r){if(i[r].above){n+=Gi(i[r])}}}return n}function vn(e,t,i,n,r){if(!r){var o=gn(t);i.top+=o;i.bottom+=o}if(n=="line"){return i}if(!n){n="local"}var l=ai(t);if(n=="local"){l+=Ki(e.display)}else{l-=e.display.viewOffset}if(n=="page"||n=="window"){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+(n=="window"?0:mn(I(e)));var s=a.left+(n=="window"?0:pn(I(e)));i.left+=s;i.right+=s}i.top+=l;i.bottom+=l;return i}function yn(e,t,i){if(i=="div"){return t}var n=t.left,r=t.top;if(i=="page"){n-=pn(I(e));r-=mn(I(e))}else if(i=="local"||!i){var o=e.display.sizer.getBoundingClientRect();n+=o.left;r+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:r-l.top}}function xn(e,t,i,n,r){if(!n){n=Ze(e.doc,t.line)}return vn(e,n,tn(e,n,t.ch,r),i)}function bn(e,t,i,n,r,o){n=n||Ze(e.doc,t.line);if(!r){r=rn(e,n)}function l(t,l){var a=on(e,r,t,l?"right":"left",o);if(l){a.left=a.right}else{a.right=a.left}return vn(e,n,a,i)}var a=me(n,e.doc.direction),s=t.ch,f=t.sticky;if(s>=n.text.length){s=n.text.length;f="before"}else if(s<=0){s=0;f="after"}if(!a){return l(f=="before"?s-1:s,f=="before")}function c(e,t,i){var n=a[t],r=n.level==1;return l(i?e-1:e,r!=i)}var u=de(a,s,f);var h=he;var d=c(s,u,f=="before");if(h!=null){d.other=c(s,h,f!="before")}return d}function wn(e,t){var i=0;t=pt(e.doc,t);if(!e.options.lineWrapping){i=Fn(e.display)*t.ch}var n=Ze(e.doc,t.line);var r=ai(n)+Ki(e.display);return{left:i,right:i,top:r,bottom:r+n.height}}function Cn(e,t,i,n,r){var o=at(e,t,i);o.xRel=r;if(n){o.outside=n}return o}function Sn(e,t,i){var n=e.doc;i+=e.display.viewOffset;if(i<0){return Cn(n.first,0,null,-1,-1)}var r=rt(n,i),o=n.first+n.size-1;if(r>o){return Cn(n.first+n.size-1,Ze(n,o).text.length,null,1,1)}if(t<0){t=0}var l=Ze(n,r);for(;;){var a=Tn(e,l,r,t,i);var s=Qt(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s){return a}var f=s.find(1);if(f.line==r){return f}l=Ze(n,r=f.line)}}function kn(e,t,i,n){n-=gn(t);var r=t.text.length;var o=ce(function(t){return on(e,i,t-1).bottom<=n},r,0);r=ce(function(t){return on(e,i,t).top>n},o,r);return{begin:o,end:r}}function Ln(e,t,i,n){if(!i){i=rn(e,t)}var r=vn(e,t,on(e,i,n),"line").top;return kn(e,t,i,r)}function Mn(e,t,i,n){return e.bottom<=i?false:e.top>i?true:(n?e.left:e.right)>t}function Tn(e,t,i,n,r){r-=ai(t);var o=rn(e,t);var l=gn(t);var a=0,s=t.text.length,f=true;var c=me(t,e.doc.direction);if(c){var u=(e.options.lineWrapping?An:On)(e,t,i,o,c,n,r);f=u.level!=1;a=f?u.from:u.to-1;s=f?u.to:u.from-1}var h=null,d=null;var p=ce(function(t){var i=on(e,o,t);i.top+=l;i.bottom+=l;if(!Mn(i,n,r,false)){return false}if(i.top<=r&&i.left<=n){h=t;d=i}return true},a,s);var m,g,v=false;if(d){var y=n-d.left<d.right-n,x=y==f;p=h+(x?0:1);g=x?"after":"before";m=y?d.left:d.right}else{if(!f&&(p==s||p==a)){p++}g=p==0?"after":p==t.text.length?"before":on(e,o,p-(f?1:0)).bottom+l<=r==f?"after":"before";var b=bn(e,at(i,p,g),"line",t,o);m=b.left;v=r<b.top?-1:r>=b.bottom?1:0}p=fe(t.text,p,1);return Cn(i,p,g,v,n-m)}function On(e,t,i,n,r,o,l){var a=ce(function(a){var s=r[a],f=s.level!=1;return Mn(bn(e,at(i,f?s.to:s.from,f?"before":"after"),"line",t,n),o,l,true)},0,r.length-1);var s=r[a];if(a>0){var f=s.level!=1;var c=bn(e,at(i,f?s.from:s.to,f?"after":"before"),"line",t,n);if(Mn(c,o,l,true)&&c.top>l){s=r[a-1]}}return s}function An(e,t,i,n,r,o,l){var a=kn(e,t,n,l);var s=a.begin;var f=a.end;if(/\s/.test(t.text.charAt(f-1))){f--}var c=null,u=null;for(var h=0;h<r.length;h++){var d=r[h];if(d.from>=f||d.to<=s){continue}var p=d.level!=1;var m=on(e,n,p?Math.min(f,d.to)-1:Math.max(s,d.from)).right;var g=m<o?o-m+1e9:m-o;if(!c||u>g){c=d;u=g}}if(!c){c=r[r.length-1]}if(c.from<s){c={from:s,to:c.to,level:c.level}}if(c.to>f){c={from:c.from,to:f,level:c.level}}return c}var Nn;function Pn(e){if(e.cachedTextHeight!=null){return e.cachedTextHeight}if(Nn==null){Nn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t){Nn.appendChild(document.createTextNode("x"));Nn.appendChild(A("br"))}Nn.appendChild(document.createTextNode("x"))}O(e.measure,Nn);var i=Nn.offsetHeight/50;if(i>3){e.cachedTextHeight=i}T(e.measure);return i||1}function Fn(e){if(e.cachedCharWidth!=null){return e.cachedCharWidth}var t=A("span","xxxxxxxxxx");var i=A("pre",[t],"CodeMirror-line-like");O(e.measure,i);var n=t.getBoundingClientRect(),r=(n.right-n.left)/10;if(r>2){e.cachedCharWidth=r}return r||10}function Dn(e){var t=e.display,i={},n={};var r=t.gutters.clientLeft;for(var o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;i[a]=o.offsetLeft+o.clientLeft+r;n[a]=o.clientWidth}return{fixedPos:Hn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Hn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function En(e){var t=Pn(e.display),i=e.options.lineWrapping;var n=i&&Math.max(5,e.display.scroller.clientWidth/Fn(e.display)-3);return function(r){if(oi(e.doc,r)){return 0}var o=0;if(r.widgets){for(var l=0;l<r.widgets.length;l++){if(r.widgets[l].height){o+=r.widgets[l].height}}}if(i){return o+(Math.ceil(r.text.length/n)||1)*t}else{return o+t}}}function Wn(e){var t=e.doc,i=En(e);t.iter(function(e){var t=i(e);if(t!=e.height){it(e,t)}})}function In(e,t,i,n){var r=e.display;if(!i&&Ae(t).getAttribute("cm-not-content")=="true"){return null}var o,l,a=r.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left;l=t.clientY-a.top}catch(e){return null}var s=Sn(e,o,l),f;if(n&&s.xRel>0&&(f=Ze(e.doc,s.line).text).length==s.ch){var c=z(f,f.length,e.options.tabSize)-f.length;s=at(s.line,Math.max(0,Math.round((o-Xi(e.display).left)/Fn(e.display))-c))}return s}function Rn(e,t){if(t>=e.display.viewTo){return null}t-=e.display.viewFrom;if(t<0){return null}var i=e.display.view;for(var n=0;n<i.length;n++){t-=i[n].size;if(t<0){return n}}}function Bn(e,t,i,n){if(t==null){t=e.doc.first}if(i==null){i=e.doc.first+e.doc.size}if(!n){n=0}var r=e.display;if(n&&i<r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>t)){r.updateLineNumbers=t}e.curOp.viewChanged=true;if(t>=r.viewTo){if(Ft&&ni(e.doc,t)<r.viewTo){zn(e)}}else if(i<=r.viewFrom){if(Ft&&ri(e.doc,i+n)>r.viewFrom){zn(e)}else{r.viewFrom+=n;r.viewTo+=n}}else if(t<=r.viewFrom&&i>=r.viewTo){zn(e)}else if(t<=r.viewFrom){var o=qn(e,i,i+n,1);if(o){r.view=r.view.slice(o.index);r.viewFrom=o.lineN;r.viewTo+=n}else{zn(e)}}else if(i>=r.viewTo){var l=qn(e,t,t,-1);if(l){r.view=r.view.slice(0,l.index);r.viewTo=l.lineN}else{zn(e)}}else{var a=qn(e,t,t,-1);var s=qn(e,i,i+n,1);if(a&&s){r.view=r.view.slice(0,a.index).concat(ki(e,a.lineN,s.lineN)).concat(r.view.slice(s.index));r.viewTo+=n}else{zn(e)}}var f=r.externalMeasured;if(f){if(i<f.lineN){f.lineN+=n}else if(t<f.lineN+f.size){r.externalMeasured=null}}}function jn(e,t,i){e.curOp.viewChanged=true;var n=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size){n.externalMeasured=null}if(t<n.viewFrom||t>=n.viewTo){return}var o=n.view[Rn(e,t)];if(o.node==null){return}var l=o.changes||(o.changes=[]);if(U(l,i)==-1){l.push(i)}}function zn(e){e.display.viewFrom=e.display.viewTo=e.doc.first;e.display.view=[];e.display.viewOffset=0}function qn(e,t,i,n){var r=Rn(e,t),o,l=e.display.view;if(!Ft||i==e.doc.first+e.doc.size){return{index:r,lineN:i}}var a=e.display.viewFrom;for(var s=0;s<r;s++){a+=l[s].size}if(a!=t){if(n>0){if(r==l.length-1){return null}o=a+l[r].size-t;r++}else{o=a-t}t+=o;i+=o}while(ni(e.doc,i)!=i){if(r==(n<0?0:l.length-1)){return null}i+=n*l[r-(n<0?1:0)].size;r+=n}return{index:r,lineN:i}}function Un(e,t,i){var n=e.display,r=n.view;if(r.length==0||t>=n.viewTo||i<=n.viewFrom){n.view=ki(e,t,i);n.viewFrom=t}else{if(n.viewFrom>t){n.view=ki(e,t,n.viewFrom).concat(n.view)}else if(n.viewFrom<t){n.view=n.view.slice(Rn(e,t))}n.viewFrom=t;if(n.viewTo<i){n.view=n.view.concat(ki(e,n.viewTo,i))}else if(n.viewTo>i){n.view=n.view.slice(0,Rn(e,i))}}n.viewTo=i}function Gn(e){var t=e.display.view,i=0;for(var n=0;n<t.length;n++){var r=t[n];if(!r.hidden&&(!r.node||r.changes)){++i}}return i}function Vn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Kn(e,t){if(t===void 0)t=true;var i=e.doc,n={};var r=n.cursors=document.createDocumentFragment();var o=n.selection=document.createDocumentFragment();var l=e.options.$customCursor;if(l){t=true}for(var a=0;a<i.sel.ranges.length;a++){if(!t&&a==i.sel.primIndex){continue}var s=i.sel.ranges[a];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom){continue}var f=s.empty();if(l){var c=l(e,s);if(c){$n(e,c,r)}}else if(f||e.options.showCursorWhenSelecting){$n(e,s.head,r)}if(!f){_n(e,s,o)}}return n}function $n(e,t,i){var n=bn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine);var r=i.appendChild(A("div"," ","CodeMirror-cursor"));r.style.left=n.left+"px";r.style.top=n.top+"px";r.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px";if(/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=xn(e,t,"div",null,null);var l=o.right-o.left;r.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(n.other){var a=i.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="";a.style.left=n.other.left+"px";a.style.top=n.other.top+"px";a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Xn(e,t){return e.top-t.top||e.left-t.left}function _n(e,t,i){var n=e.display,r=e.doc;var o=document.createDocumentFragment();var l=Xi(e.display),a=l.left;var s=Math.max(n.sizerWidth,Yi(e)-n.sizer.offsetLeft)-l.right;var f=r.direction=="ltr";function c(e,t,i,n){if(t<0){t=0}t=Math.round(t);n=Math.round(n);o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(i==null?s-e:i)+"px;\n                             height: "+(n-t)+"px"))}function u(t,i,n){var o=Ze(r,t);var l=o.text.length;var u,h;function d(i,n){return xn(e,at(t,i),"div",o,n)}function p(t,i,n){var r=Ln(e,o,null,t);var l=i=="ltr"==(n=="after")?"left":"right";var a=n=="after"?r.begin:r.end-(/\s/.test(o.text.charAt(r.end-1))?2:1);return d(a,l)[l]}var m=me(o,r.direction);ue(m,i||0,n==null?l:n,function(e,t,r,o){var g=r=="ltr";var v=d(e,g?"left":"right");var y=d(t-1,g?"right":"left");var x=i==null&&e==0,b=n==null&&t==l;var w=o==0,C=!m||o==m.length-1;if(y.top-v.top<=3){var S=(f?x:b)&&w;var k=(f?b:x)&&C;var L=S?a:(g?v:y).left;var M=k?s:(g?y:v).right;c(L,v.top,M-L,v.bottom)}else{var T,O,A,N;if(g){T=f&&x&&w?a:v.left;O=f?s:p(e,r,"before");A=f?a:p(t,r,"after");N=f&&b&&C?s:y.right}else{T=!f?a:p(e,r,"before");O=!f&&x&&w?s:v.right;A=!f&&b&&C?a:y.left;N=!f?s:p(t,r,"after")}c(T,v.top,O-T,v.bottom);if(v.bottom<y.top){c(a,v.bottom,null,y.top)}c(A,y.top,N-A,y.bottom)}if(!u||Xn(v,u)<0){u=v}if(Xn(y,u)<0){u=y}if(!h||Xn(v,h)<0){h=v}if(Xn(y,h)<0){h=y}});return{start:u,end:h}}var h=t.from(),d=t.to();if(h.line==d.line){u(h.line,h.ch,d.ch)}else{var p=Ze(r,h.line),m=Ze(r,d.line);var g=ei(p)==ei(m);var v=u(h.line,h.ch,g?p.text.length+1:null).end;var y=u(d.line,g?0:null,d.ch).start;if(g){if(v.top<y.top-2){c(v.right,v.top,null,v.bottom);c(a,y.top,y.left,y.bottom)}else{c(v.right,v.top,y.left-v.right,v.bottom)}}if(v.bottom<y.top){c(a,v.bottom,null,y.top)}}i.appendChild(o)}function Yn(e){if(!e.state.focused){return}var t=e.display;clearInterval(t.blinker);var i=true;t.cursorDiv.style.visibility="";if(e.options.cursorBlinkRate>0){t.blinker=setInterval(function(){if(!e.hasFocus()){er(e)}t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate)}else if(e.options.cursorBlinkRate<0){t.cursorDiv.style.visibility="hidden"}}function Jn(e){if(!e.hasFocus()){e.display.input.focus();if(!e.state.focused){Zn(e)}}}function Qn(e){e.state.delayingBlurEvent=true;setTimeout(function(){if(e.state.delayingBlurEvent){e.state.delayingBlurEvent=false;if(e.state.focused){er(e)}}},100)}function Zn(e,t){if(e.state.delayingBlurEvent&&!e.state.draggingText){e.state.delayingBlurEvent=false}if(e.options.readOnly=="nocursor"){return}if(!e.state.focused){be(e,"focus",e,t);e.state.focused=true;H(e.display.wrapper,"CodeMirror-focused");if(!e.curOp&&e.display.selForContextMenu!=e.doc.sel){e.display.input.reset();if(s){setTimeout(function(){return e.display.input.reset(true)},20)}}e.display.input.receivedFocus()}Yn(e)}function er(e,t){if(e.state.delayingBlurEvent){return}if(e.state.focused){be(e,"blur",e,t);e.state.focused=false;M(e.display.wrapper,"CodeMirror-focused")}clearInterval(e.display.blinker);setTimeout(function(){if(!e.state.focused){e.display.shift=false}},150)}function tr(e){var t=e.display;var i=t.lineDiv.offsetTop;var n=Math.max(0,t.scroller.getBoundingClientRect().top);var r=t.lineDiv.getBoundingClientRect().top;var o=0;for(var s=0;s<t.view.length;s++){var f=t.view[s],c=e.options.lineWrapping;var u=void 0,h=0;if(f.hidden){continue}r+=f.line.height;if(l&&a<8){var d=f.node.offsetTop+f.node.offsetHeight;u=d-i;i=d}else{var p=f.node.getBoundingClientRect();u=p.bottom-p.top;if(!c&&f.text.firstChild){h=f.text.firstChild.getBoundingClientRect().right-p.left-1}}var m=f.line.height-u;if(m>.005||m<-.005){if(r<n){o-=m}it(f.line,u);ir(f.line);if(f.rest){for(var g=0;g<f.rest.length;g++){ir(f.rest[g])}}}if(h>e.display.sizerWidth){var v=Math.ceil(h/Fn(e.display));if(v>e.display.maxLineLength){e.display.maxLineLength=v;e.display.maxLine=f.line;e.display.maxLineChanged=true}}}if(Math.abs(o)>2){t.scroller.scrollTop+=o}}function ir(e){if(e.widgets){for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],n=i.node.parentNode;if(n){i.height=n.offsetHeight}}}}function nr(e,t,i){var n=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;n=Math.floor(n-Ki(e));var r=i&&i.bottom!=null?i.bottom:n+e.wrapper.clientHeight;var o=rt(t,n),l=rt(t,r);if(i&&i.ensure){var a=i.ensure.from.line,s=i.ensure.to.line;if(a<o){o=a;l=rt(t,ai(Ze(t,a))+e.wrapper.clientHeight)}else if(Math.min(s,t.lastLine())>=l){o=rt(t,ai(Ze(t,s))-e.wrapper.clientHeight);l=s}}return{from:o,to:Math.max(l,o+1)}}function rr(e,t){if(we(e,"scrollCursorIntoView")){return}var i=e.display,n=i.sizer.getBoundingClientRect(),r=null;var o=i.wrapper.ownerDocument;if(t.top+n.top<0){r=true}else if(t.bottom+n.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)){r=false}if(r!=null&&!m){var l=A("div","​",null,"position: absolute;\n                         top: "+(t.top-i.viewOffset-Ki(e.display))+"px;\n                         height: "+(t.bottom-t.top+_i(e)+i.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l);l.scrollIntoView(r);e.display.lineSpace.removeChild(l)}}function or(e,t,i,n){if(n==null){n=0}var r;if(!e.options.lineWrapping&&t==i){i=t.sticky=="before"?at(t.line,t.ch+1,"before"):t;t=t.ch?at(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t}for(var o=0;o<5;o++){var l=false;var a=bn(e,t);var s=!i||i==t?a:bn(e,i);r={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-n,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+n};var f=ar(e,r);var c=e.doc.scrollTop,u=e.doc.scrollLeft;if(f.scrollTop!=null){pr(e,f.scrollTop);if(Math.abs(e.doc.scrollTop-c)>1){l=true}}if(f.scrollLeft!=null){gr(e,f.scrollLeft);if(Math.abs(e.doc.scrollLeft-u)>1){l=true}}if(!l){break}}return r}function lr(e,t){var i=ar(e,t);if(i.scrollTop!=null){pr(e,i.scrollTop)}if(i.scrollLeft!=null){gr(e,i.scrollLeft)}}function ar(e,t){var i=e.display,n=Pn(e.display);if(t.top<0){t.top=0}var r=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop;var o=Ji(e),l={};if(t.bottom-t.top>o){t.bottom=t.top+o}var a=e.doc.height+$i(i);var s=t.top<n,f=t.bottom>a-n;if(t.top<r){l.scrollTop=s?0:t.top}else if(t.bottom>r+o){var c=Math.min(t.top,(f?a:t.bottom)-o);if(c!=r){l.scrollTop=c}}var u=e.options.fixedGutter?0:i.gutters.offsetWidth;var h=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-u;var d=Yi(e)-i.gutters.offsetWidth;var p=t.right-t.left>d;if(p){t.right=t.left+d}if(t.left<10){l.scrollLeft=0}else if(t.left<h){l.scrollLeft=Math.max(0,t.left+u-(p?0:10))}else if(t.right>d+h-3){l.scrollLeft=t.right+(p?0:10)-d}return l}function sr(e,t){if(t==null){return}hr(e);e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function fr(e){hr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function cr(e,t,i){if(t!=null||i!=null){hr(e)}if(t!=null){e.curOp.scrollLeft=t}if(i!=null){e.curOp.scrollTop=i}}function ur(e,t){hr(e);e.curOp.scrollToPos=t}function hr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=wn(e,t.from),n=wn(e,t.to);dr(e,i,n,t.margin)}}function dr(e,t,i,n){var r=ar(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-n,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+n});cr(e,r.scrollLeft,r.scrollTop)}function pr(e,t){if(Math.abs(e.doc.scrollTop-t)<2){return}if(!i){Vr(e,{top:t})}mr(e,t,true);if(i){Vr(e)}Ir(e,100)}function mr(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t));if(e.display.scroller.scrollTop==t&&!i){return}e.doc.scrollTop=t;e.display.scrollbars.setScrollTop(t);if(e.display.scroller.scrollTop!=t){e.display.scroller.scrollTop=t}}function gr(e,t,i,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth));if((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n){return}e.doc.scrollLeft=t;_r(e);if(e.display.scroller.scrollLeft!=t){e.display.scroller.scrollLeft=t}e.display.scrollbars.setScrollLeft(t)}function vr(e){var t=e.display,i=t.gutters.offsetWidth;var n=Math.round(e.doc.height+$i(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:n,scrollHeight:n+_i(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var yr=function(e,t,i){this.cm=i;var n=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var r=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=r.tabIndex=-1;e(n);e(r);ve(n,"scroll",function(){if(n.clientHeight){t(n.scrollTop,"vertical")}});ve(r,"scroll",function(){if(r.clientWidth){t(r.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(l&&a<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}};yr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1;var i=e.scrollHeight>e.clientHeight+1;var n=e.nativeBarWidth;if(i){this.vert.style.display="block";this.vert.style.bottom=t?n+"px":"0";var r=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else{this.vert.scrollTop=0;this.vert.style.display="";this.vert.firstChild.style.height="0"}if(t){this.horiz.style.display="block";this.horiz.style.right=i?n+"px":"0";this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(i?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&e.clientHeight>0){if(n==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:i?n:0,bottom:t?n:0}};yr.prototype.setScrollLeft=function(e){if(this.horiz.scrollLeft!=e){this.horiz.scrollLeft=e}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")}};yr.prototype.setScrollTop=function(e){if(this.vert.scrollTop!=e){this.vert.scrollTop=e}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert,"vert")}};yr.prototype.zeroWidthHack=function(){var e=x&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e;this.horiz.style.visibility=this.vert.style.visibility="hidden";this.disableHoriz=new q;this.disableVert=new q};yr.prototype.enableZeroWidthBar=function(e,t,i){e.style.visibility="";function n(){var r=e.getBoundingClientRect();var o=i=="vert"?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);if(o!=e){e.style.visibility="hidden"}else{t.set(1e3,n)}}t.set(1e3,n)};yr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz);e.removeChild(this.vert)};var xr=function(){};xr.prototype.update=function(){return{bottom:0,right:0}};xr.prototype.setScrollLeft=function(){};xr.prototype.setScrollTop=function(){};xr.prototype.clear=function(){};function br(e,t){if(!t){t=vr(e)}var i=e.display.barWidth,n=e.display.barHeight;wr(e,t);for(var r=0;r<4&&i!=e.display.barWidth||n!=e.display.barHeight;r++){if(i!=e.display.barWidth&&e.options.lineWrapping){tr(e)}wr(e,vr(e));i=e.display.barWidth;n=e.display.barHeight}}function wr(e,t){var i=e.display;var n=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=n.right)+"px";i.sizer.style.paddingBottom=(i.barHeight=n.bottom)+"px";i.heightForcer.style.borderBottom=n.bottom+"px solid transparent";if(n.right&&n.bottom){i.scrollbarFiller.style.display="block";i.scrollbarFiller.style.height=n.bottom+"px";i.scrollbarFiller.style.width=n.right+"px"}else{i.scrollbarFiller.style.display=""}if(n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter){i.gutterFiller.style.display="block";i.gutterFiller.style.height=n.bottom+"px";i.gutterFiller.style.width=t.gutterWidth+"px"}else{i.gutterFiller.style.display=""}}var Cr={native:yr,null:xr};function Sr(e){if(e.display.scrollbars){e.display.scrollbars.clear();if(e.display.scrollbars.addClass){M(e.display.wrapper,e.display.scrollbars.addClass)}}e.display.scrollbars=new Cr[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller);ve(t,"mousedown",function(){if(e.state.focused){setTimeout(function(){return e.display.input.focus()},0)}});t.setAttribute("cm-not-content","true")},function(t,i){if(i=="horizontal"){gr(e,t)}else{pr(e,t)}},e);if(e.display.scrollbars.addClass){H(e.display.wrapper,e.display.scrollbars.addClass)}}var kr=0;function Lr(e){e.curOp={cm:e,viewChanged:false,startHeight:e.doc.height,forceUpdate:false,updateInput:0,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++kr,markArrays:null};Mi(e.curOp)}function Mr(e){var t=e.curOp;if(t){Oi(t,function(e){for(var t=0;t<e.ops.length;t++){e.ops[t].cm.curOp=null}Tr(e)})}}function Tr(e){var t=e.ops;for(var i=0;i<t.length;i++){Or(t[i])}for(var n=0;n<t.length;n++){Ar(t[n])}for(var r=0;r<t.length;r++){Nr(t[r])}for(var o=0;o<t.length;o++){Pr(t[o])}for(var l=0;l<t.length;l++){Fr(t[l])}}function Or(e){var t=e.cm,i=t.display;jr(t);if(e.updateMaxLine){fi(t)}e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping;e.update=e.mustUpdate&&new Br(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ar(e){e.updatedDisplay=e.mustUpdate&&Ur(e.cm,e.update)}function Nr(e){var t=e.cm,i=t.display;if(e.updatedDisplay){tr(t)}e.barMeasure=vr(t);if(i.maxLineChanged&&!t.options.lineWrapping){e.adjustWidthTo=tn(t,i.maxLine,i.maxLine.text.length).left+3;t.display.sizerWidth=e.adjustWidthTo;e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+_i(t)+t.display.barWidth);e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Yi(t))}if(e.updatedDisplay||e.selectionChanged){e.preparedSelection=i.input.prepareSelection()}}function Pr(e){var t=e.cm;if(e.adjustWidthTo!=null){t.display.sizer.style.minWidth=e.adjustWidthTo+"px";if(e.maxScrollLeft<t.doc.scrollLeft){gr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),true)}t.display.maxLineChanged=false}var i=e.focus&&e.focus==D(I(t));if(e.preparedSelection){t.display.input.showSelection(e.preparedSelection,i)}if(e.updatedDisplay||e.startHeight!=t.doc.height){br(t,e.barMeasure)}if(e.updatedDisplay){Xr(t,e.barMeasure)}if(e.selectionChanged){Yn(t)}if(t.state.focused&&e.updateInput){t.display.input.reset(e.typing)}if(i){Jn(e.cm)}}function Fr(e){var t=e.cm,i=t.display,n=t.doc;if(e.updatedDisplay){Gr(t,e.update)}if(i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)){i.wheelStartX=i.wheelStartY=null}if(e.scrollTop!=null){mr(t,e.scrollTop,e.forceScroll)}if(e.scrollLeft!=null){gr(t,e.scrollLeft,true,true)}if(e.scrollToPos){var r=or(t,pt(n,e.scrollToPos.from),pt(n,e.scrollToPos.to),e.scrollToPos.margin);rr(t,r)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o){for(var a=0;a<o.length;++a){if(!o[a].lines.length){be(o[a],"hide")}}}if(l){for(var s=0;s<l.length;++s){if(l[s].lines.length){be(l[s],"unhide")}}}if(i.wrapper.offsetHeight){n.scrollTop=t.display.scroller.scrollTop}if(e.changeObjs){be(t,"changes",t,e.changeObjs)}if(e.update){e.update.finish()}}function Dr(e,t){if(e.curOp){return t()}Lr(e);try{return t()}finally{Mr(e)}}function Hr(e,t){return function(){if(e.curOp){return t.apply(e,arguments)}Lr(e);try{return t.apply(e,arguments)}finally{Mr(e)}}}function Er(e){return function(){if(this.curOp){return e.apply(this,arguments)}Lr(this);try{return e.apply(this,arguments)}finally{Mr(this)}}}function Wr(e){return function(){var t=this.cm;if(!t||t.curOp){return e.apply(this,arguments)}Lr(t);try{return e.apply(this,arguments)}finally{Mr(t)}}}function Ir(e,t){if(e.doc.highlightFrontier<e.display.viewTo){e.state.highlight.set(t,B(Rr,e))}}function Rr(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo){return}var i=+new Date+e.options.workTime;var n=wt(e,t.highlightFrontier);var r=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles;var a=o.text.length>e.options.maxHighlightLength?_e(t.mode,n.state):null;var s=xt(e,o,n,true);if(a){n.state=a}o.styles=s.styles;var f=o.styleClasses,c=s.classes;if(c){o.styleClasses=c}else if(f){o.styleClasses=null}var u=!l||l.length!=o.styles.length||f!=c&&(!f||!c||f.bgClass!=c.bgClass||f.textClass!=c.textClass);for(var h=0;!u&&h<l.length;++h){u=l[h]!=o.styles[h]}if(u){r.push(n.line)}o.stateAfter=n.save();n.nextLine()}else{if(o.text.length<=e.options.maxHighlightLength){Ct(e,o.text,n)}o.stateAfter=n.line%5==0?n.save():null;n.nextLine()}if(+new Date>i){Ir(e,e.options.workDelay);return true}});t.highlightFrontier=n.line;t.modeFrontier=Math.max(t.modeFrontier,n.line);if(r.length){Dr(e,function(){for(var t=0;t<r.length;t++){jn(e,r[t],"text")}})}}var Br=function(e,t,i){var n=e.display;this.viewport=t;this.visible=nr(n,e.doc,t);this.editorIsHidden=!n.wrapper.offsetWidth;this.wrapperHeight=n.wrapper.clientHeight;this.wrapperWidth=n.wrapper.clientWidth;this.oldDisplayWidth=Yi(e);this.force=i;this.dims=Dn(e);this.events=[]};Br.prototype.signal=function(e,t){if(Se(e,t)){this.events.push(arguments)}};Br.prototype.finish=function(){for(var e=0;e<this.events.length;e++){be.apply(null,this.events[e])}};function jr(e){var t=e.display;if(!t.scrollbarsClipped&&t.scroller.offsetWidth){t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth;t.heightForcer.style.height=_i(e)+"px";t.sizer.style.marginBottom=-t.nativeBarWidth+"px";t.sizer.style.borderRightWidth=_i(e)+"px";t.scrollbarsClipped=true}}function zr(e){if(e.hasFocus()){return null}var t=D(I(e));if(!t||!F(e.display.lineDiv,t)){return null}var i={activeElt:t};if(window.getSelection){var n=R(e).getSelection();if(n.anchorNode&&n.extend&&F(e.display.lineDiv,n.anchorNode)){i.anchorNode=n.anchorNode;i.anchorOffset=n.anchorOffset;i.focusNode=n.focusNode;i.focusOffset=n.focusOffset}}return i}function qr(e){if(!e||!e.activeElt||e.activeElt==D(e.activeElt.ownerDocument)){return}e.activeElt.focus();if(!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode)){var t=e.activeElt.ownerDocument;var i=t.defaultView.getSelection(),n=t.createRange();n.setEnd(e.anchorNode,e.anchorOffset);n.collapse(false);i.removeAllRanges();i.addRange(n);i.extend(e.focusNode,e.focusOffset)}}function Ur(e,t){var i=e.display,n=e.doc;if(t.editorIsHidden){zn(e);return false}if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&Gn(e)==0){return false}if(Yr(e)){zn(e);t.dims=Dn(e)}var r=n.first+n.size;var o=Math.max(t.visible.from-e.options.viewportMargin,n.first);var l=Math.min(r,t.visible.to+e.options.viewportMargin);if(i.viewFrom<o&&o-i.viewFrom<20){o=Math.max(n.first,i.viewFrom)}if(i.viewTo>l&&i.viewTo-l<20){l=Math.min(r,i.viewTo)}if(Ft){o=ni(e.doc,o);l=ri(e.doc,l)}var a=o!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Un(e,o,l);i.viewOffset=ai(Ze(e.doc,i.viewFrom));e.display.mover.style.top=i.viewOffset+"px";var s=Gn(e);if(!a&&s==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)){return false}var f=zr(e);if(s>4){i.lineDiv.style.display="none"}Kr(e,i.updateLineNumbers,t.dims);if(s>4){i.lineDiv.style.display=""}i.renderedView=i.view;qr(f);T(i.cursorDiv);T(i.selectionDiv);i.gutters.style.height=i.sizer.style.minHeight=0;if(a){i.lastWrapHeight=t.wrapperHeight;i.lastWrapWidth=t.wrapperWidth;Ir(e,400)}i.updateLineNumbers=null;return true}function Gr(e,t){var i=t.viewport;for(var n=true;;n=false){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==Yi(e)){if(i&&i.top!=null){i={top:Math.min(e.doc.height+$i(e.display)-Ji(e),i.top)}}t.visible=nr(e.display,e.doc,i);if(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo){break}}else if(n){t.visible=nr(e.display,e.doc,i)}if(!Ur(e,t)){break}tr(e);var r=vr(e);Vn(e);br(e,r);Xr(e,r);t.force=false}t.signal(e,"update",e);if(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo){t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo);e.display.reportedViewFrom=e.display.viewFrom;e.display.reportedViewTo=e.display.viewTo}}function Vr(e,t){var i=new Br(e,t);if(Ur(e,i)){tr(e);Gr(e,i);var n=vr(e);Vn(e);br(e,n);Xr(e,n);i.finish()}}function Kr(e,t,i){var n=e.display,r=e.options.lineNumbers;var o=n.lineDiv,l=o.firstChild;function a(t){var i=t.nextSibling;if(s&&x&&e.display.currentWheelTarget==t){t.style.display="none"}else{t.parentNode.removeChild(t)}return i}var f=n.view,c=n.viewFrom;for(var u=0;u<f.length;u++){var h=f[u];if(h.hidden);else if(!h.node||h.node.parentNode!=o){var d=ji(e,h,c,i);o.insertBefore(d,l)}else{while(l!=h.node){l=a(l)}var p=r&&t!=null&&t<=c&&h.lineNumber;if(h.changes){if(U(h.changes,"gutter")>-1){p=false}Fi(e,h,c,i)}if(p){T(h.lineNumber);h.lineNumber.appendChild(document.createTextNode(lt(e.options,c)))}l=h.node.nextSibling}c+=h.size}while(l){l=a(l)}}function $r(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px";Ni(e,"gutterChanged",e)}function Xr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";e.display.heightForcer.style.top=t.docHeight+"px";e.display.gutters.style.height=t.docHeight+e.display.barHeight+_i(e)+"px"}function _r(e){var t=e.display,i=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter)){return}var n=Hn(t)-t.scroller.scrollLeft+e.doc.scrollLeft;var r=t.gutters.offsetWidth,o=n+"px";for(var l=0;l<i.length;l++){if(!i[l].hidden){if(e.options.fixedGutter){if(i[l].gutter){i[l].gutter.style.left=o}if(i[l].gutterBackground){i[l].gutterBackground.style.left=o}}var a=i[l].alignable;if(a){for(var s=0;s<a.length;s++){a[s].style.left=o}}}}if(e.options.fixedGutter){t.gutters.style.left=n+r+"px"}}function Yr(e){if(!e.options.lineNumbers){return false}var t=e.doc,i=lt(e.options,t.first+t.size-1),n=e.display;if(i.length!=n.lineNumChars){var r=n.measure.appendChild(A("div",[A("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var o=r.firstChild.offsetWidth,l=r.offsetWidth-o;n.lineGutter.style.width="";n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1;n.lineNumWidth=n.lineNumInnerWidth+l;n.lineNumChars=n.lineNumInnerWidth?i.length:-1;n.lineGutter.style.width=n.lineNumWidth+"px";$r(e.display);return true}return false}function Jr(e,t){var i=[],n=false;for(var r=0;r<e.length;r++){var o=e[r],l=null;if(typeof o!="string"){l=o.style;o=o.className}if(o=="CodeMirror-linenumbers"){if(!t){continue}else{n=true}}i.push({className:o,style:l})}if(t&&!n){i.push({className:"CodeMirror-linenumbers",style:null})}return i}function Qr(e){var t=e.gutters,i=e.gutterSpecs;T(t);e.lineGutter=null;for(var n=0;n<i.length;++n){var r=i[n];var o=r.className;var l=r.style;var a=t.appendChild(A("div",null,"CodeMirror-gutter "+o));if(l){a.style.cssText=l}if(o=="CodeMirror-linenumbers"){e.lineGutter=a;a.style.width=(e.lineNumWidth||1)+"px"}}t.style.display=i.length?"":"none";$r(e)}function Zr(e){Qr(e.display);Bn(e);_r(e)}function eo(e,t,n,r){var o=this;this.input=n;o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler");o.scrollbarFiller.setAttribute("cm-not-content","true");o.gutterFiller=A("div",null,"CodeMirror-gutter-filler");o.gutterFiller.setAttribute("cm-not-content","true");o.lineDiv=N("div",null,"CodeMirror-code");o.selectionDiv=A("div",null,null,"position: relative; z-index: 1");o.cursorDiv=A("div",null,"CodeMirror-cursors");o.measure=A("div",null,"CodeMirror-measure");o.lineMeasure=A("div",null,"CodeMirror-measure");o.lineSpace=N("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var f=N("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[f],null,"position: relative");o.sizer=A("div",[o.mover],"CodeMirror-sizer");o.sizerWidth=null;o.heightForcer=A("div",null,null,"position: absolute; height: "+G+"px; width: 1px;");o.gutters=A("div",null,"CodeMirror-gutters");o.lineGutter=null;o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll");o.scroller.setAttribute("tabIndex","-1");o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror");if(c&&u>=105){o.wrapper.style.clipPath="inset(0px)"}o.wrapper.setAttribute("translate","no");if(l&&a<8){o.gutters.style.zIndex=-1;o.scroller.style.paddingRight=0}if(!s&&!(i&&y)){o.scroller.draggable=true}if(e){if(e.appendChild){e.appendChild(o.wrapper)}else{e(o.wrapper)}}o.viewFrom=o.viewTo=t.first;o.reportedViewFrom=o.reportedViewTo=t.first;o.view=[];o.renderedView=null;o.externalMeasured=null;o.viewOffset=0;o.lastWrapHeight=o.lastWrapWidth=0;o.updateLineNumbers=null;o.nativeBarWidth=o.barHeight=o.barWidth=0;o.scrollbarsClipped=false;o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null;o.alignWidgets=false;o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null;o.maxLine=null;o.maxLineLength=0;o.maxLineChanged=false;o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null;o.shift=false;o.selForContextMenu=null;o.activeTouch=null;o.gutterSpecs=Jr(r.gutters,r.lineNumbers);Qr(o);n.init(o)}var to=0,io=null;if(l){io=-.53}else if(i){io=15}else if(c){io=-.7}else if(d){io=-1/3}function no(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;if(t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS){t=e.detail}if(i==null&&e.detail&&e.axis==e.VERTICAL_AXIS){i=e.detail}else if(i==null){i=e.wheelDelta}return{x:t,y:i}}function ro(e){var t=no(e);t.x*=io;t.y*=io;return t}function oo(e,t){if(c&&u==102){if(e.display.chromeScrollHack==null){e.display.sizer.style.pointerEvents="none"}else{clearTimeout(e.display.chromeScrollHack)}e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null;e.display.sizer.style.pointerEvents=""},100)}var n=no(t),r=n.x,o=n.y;var l=io;if(t.deltaMode===0){r=t.deltaX;o=t.deltaY;l=1}var a=e.display,f=a.scroller;var d=f.scrollWidth>f.clientWidth;var p=f.scrollHeight>f.clientHeight;if(!(r&&d||o&&p)){return}if(o&&x&&s){e:for(var m=t.target,g=a.view;m!=f;m=m.parentNode){for(var v=0;v<g.length;v++){if(g[v].node==m){e.display.currentWheelTarget=m;break e}}}}if(r&&!i&&!h&&l!=null){if(o&&p){pr(e,Math.max(0,f.scrollTop+o*l))}gr(e,Math.max(0,f.scrollLeft+r*l));if(!o||o&&p){Le(t)}a.wheelStartX=null;return}if(o&&l!=null){var y=o*l;var b=e.doc.scrollTop,w=b+a.wrapper.clientHeight;if(y<0){b=Math.max(0,b+y-50)}else{w=Math.min(e.doc.height,w+y+50)}Vr(e,{top:b,bottom:w})}if(to<20&&t.deltaMode!==0){if(a.wheelStartX==null){a.wheelStartX=f.scrollLeft;a.wheelStartY=f.scrollTop;a.wheelDX=r;a.wheelDY=o;setTimeout(function(){if(a.wheelStartX==null){return}var e=f.scrollLeft-a.wheelStartX;var t=f.scrollTop-a.wheelStartY;var i=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null;if(!i){return}io=(io*to+i)/(to+1);++to},200)}else{a.wheelDX+=r;a.wheelDY+=o}}}var lo=function(e,t){this.ranges=e;this.primIndex=t};lo.prototype.primary=function(){return this.ranges[this.primIndex]};lo.prototype.equals=function(e){if(e==this){return true}if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length){return false}for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],n=e.ranges[t];if(!ft(i.anchor,n.anchor)||!ft(i.head,n.head)){return false}}return true};lo.prototype.deepCopy=function(){var e=[];for(var t=0;t<this.ranges.length;t++){e[t]=new ao(ct(this.ranges[t].anchor),ct(this.ranges[t].head))}return new lo(e,this.primIndex)};lo.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++){if(!this.ranges[e].empty()){return true}}return false};lo.prototype.contains=function(e,t){if(!t){t=e}for(var i=0;i<this.ranges.length;i++){var n=this.ranges[i];if(st(t,n.from())>=0&&st(e,n.to())<=0){return i}}return-1};var ao=function(e,t){this.anchor=e;this.head=t};ao.prototype.from=function(){return ht(this.anchor,this.head)};ao.prototype.to=function(){return ut(this.anchor,this.head)};ao.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function so(e,t,i){var n=e&&e.options.selectionsMayTouch;var r=t[i];t.sort(function(e,t){return st(e.from(),t.from())});i=U(t,r);for(var o=1;o<t.length;o++){var l=t[o],a=t[o-1];var s=st(a.to(),l.from());if(n&&!l.empty()?s>0:s>=0){var f=ht(a.from(),l.from()),c=ut(a.to(),l.to());var u=a.empty()?l.from()==l.head:a.from()==a.head;if(o<=i){--i}t.splice(--o,2,new ao(u?c:f,u?f:c))}}return new lo(t,i)}function fo(e,t){return new lo([new ao(e,t||e)],0)}function co(e){if(!e.text){return e.to}return at(e.from.line+e.text.length-1,Q(e.text).length+(e.text.length==1?e.from.ch:0))}function uo(e,t){if(st(e,t.from)<0){return e}if(st(e,t.to)<=0){return co(t)}var i=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;if(e.line==t.to.line){n+=co(t).ch-t.to.ch}return at(i,n)}function ho(e,t){var i=[];for(var n=0;n<e.sel.ranges.length;n++){var r=e.sel.ranges[n];i.push(new ao(uo(r.anchor,t),uo(r.head,t)))}return so(e.cm,i,e.sel.primIndex)}function po(e,t,i){if(e.line==t.line){return at(i.line,e.ch-t.ch+i.ch)}else{return at(i.line+(e.line-t.line),e.ch)}}function mo(e,t,i){var n=[];var r=at(e.first,0),o=r;for(var l=0;l<t.length;l++){var a=t[l];var s=po(a.from,r,o);var f=po(co(a),r,o);r=a.to;o=f;if(i=="around"){var c=e.sel.ranges[l],u=st(c.head,c.anchor)<0;n[l]=new ao(u?f:s,u?s:f)}else{n[l]=new ao(s,s)}}return new lo(n,e.sel.primIndex)}function go(e){e.doc.mode=Ke(e.options,e.doc.modeOption);vo(e)}function vo(e){e.doc.iter(function(e){if(e.stateAfter){e.stateAfter=null}if(e.styles){e.styles=null}});e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first;Ir(e,100);e.state.modeGen++;if(e.curOp){Bn(e)}}function yo(e,t){return t.from.ch==0&&t.to.ch==0&&Q(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function xo(e,t,i,n){function r(e){return i?i[e]:null}function o(e,i,r){ui(e,i,r,n);Ni(e,"change",e,t)}function l(e,t){var i=[];for(var o=e;o<t;++o){i.push(new ci(f[o],r(o),n))}return i}var a=t.from,s=t.to,f=t.text;var c=Ze(e,a.line),u=Ze(e,s.line);var h=Q(f),d=r(f.length-1),p=s.line-a.line;if(t.full){e.insert(0,l(0,f.length));e.remove(f.length,e.size-f.length)}else if(yo(e,t)){var m=l(0,f.length-1);o(u,u.text,d);if(p){e.remove(a.line,p)}if(m.length){e.insert(a.line,m)}}else if(c==u){if(f.length==1){o(c,c.text.slice(0,a.ch)+h+c.text.slice(s.ch),d)}else{var g=l(1,f.length-1);g.push(new ci(h+c.text.slice(s.ch),d,n));o(c,c.text.slice(0,a.ch)+f[0],r(0));e.insert(a.line+1,g)}}else if(f.length==1){o(c,c.text.slice(0,a.ch)+f[0]+u.text.slice(s.ch),r(0));e.remove(a.line+1,p)}else{o(c,c.text.slice(0,a.ch)+f[0],r(0));o(u,h+u.text.slice(s.ch),d);var v=l(1,f.length-1);if(p>1){e.remove(a.line+1,p-1)}e.insert(a.line+1,v)}Ni(e,"change",e,t)}function bo(e,t,i){function n(e,r,o){if(e.linked){for(var l=0;l<e.linked.length;++l){var a=e.linked[l];if(a.doc==r){continue}var s=o&&a.sharedHist;if(i&&!s){continue}t(a.doc,s);n(a.doc,e,s)}}}n(e,null,true)}function wo(e,t){if(t.cm){throw new Error("This document is already in use.")}e.doc=t;t.cm=e;Wn(e);go(e);Co(e);e.options.direction=t.direction;if(!e.options.lineWrapping){fi(e)}e.options.mode=t.modeOption;Bn(e)}function Co(e){(e.doc.direction=="rtl"?H:M)(e.display.lineDiv,"CodeMirror-rtl")}function So(e){Dr(e,function(){Co(e);Bn(e)})}function ko(e){this.done=[];this.undone=[];this.undoDepth=e?e.undoDepth:Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=e?e.maxGeneration:1}function Lo(e,t){var i={from:ct(t.from),to:co(t),text:et(e,t.from,t.to)};Fo(e,i,t.from.line,t.to.line+1);bo(e,function(e){return Fo(e,i,t.from.line,t.to.line+1)},true);return i}function Mo(e){while(e.length){var t=Q(e);if(t.ranges){e.pop()}else{break}}}function To(e,t){if(t){Mo(e.done);return Q(e.done)}else if(e.done.length&&!Q(e.done).ranges){return Q(e.done)}else if(e.done.length>1&&!e.done[e.done.length-2].ranges){e.done.pop();return Q(e.done)}}function Oo(e,t,i,n){var r=e.history;r.undone.length=0;var o=+new Date,l;var a;if((r.lastOp==n||r.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&r.lastModTime>o-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(l=To(r,r.lastOp==n))){a=Q(l.changes);if(st(t.from,t.to)==0&&st(t.from,a.to)==0){a.to=co(t)}else{l.changes.push(Lo(e,t))}}else{var s=Q(r.done);if(!s||!s.ranges){Po(e.sel,r.done)}l={changes:[Lo(e,t)],generation:r.generation};r.done.push(l);while(r.done.length>r.undoDepth){r.done.shift();if(!r.done[0].ranges){r.done.shift()}}}r.done.push(i);r.generation=++r.maxGeneration;r.lastModTime=r.lastSelTime=o;r.lastOp=r.lastSelOp=n;r.lastOrigin=r.lastSelOrigin=t.origin;if(!a){be(e,"historyAdded")}}function Ao(e,t,i,n){var r=t.charAt(0);return r=="*"||r=="+"&&i.ranges.length==n.ranges.length&&i.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function No(e,t,i,n){var r=e.history,o=n&&n.origin;if(i==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||Ao(e,o,Q(r.done),t))){r.done[r.done.length-1]=t}else{Po(t,r.done)}r.lastSelTime=+new Date;r.lastSelOrigin=o;r.lastSelOp=i;if(n&&n.clearRedo!==false){Mo(r.undone)}}function Po(e,t){var i=Q(t);if(!(i&&i.ranges&&i.equals(e))){t.push(e)}}function Fo(e,t,i,n){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,n),function(i){if(i.markedSpans){(r||(r=t["spans_"+e.id]={}))[o]=i.markedSpans}++o})}function Do(e){if(!e){return null}var t;for(var i=0;i<e.length;++i){if(e[i].marker.explicitlyCleared){if(!t){t=e.slice(0,i)}}else if(t){t.push(e[i])}}return!t?e:t.length?t:null}function Ho(e,t){var i=t["spans_"+e.id];if(!i){return null}var n=[];for(var r=0;r<t.text.length;++r){n.push(Do(i[r]))}return n}function Eo(e,t){var i=Ho(e,t);var n=zt(e,t);if(!i){return n}if(!n){return i}for(var r=0;r<i.length;++r){var o=i[r],l=n[r];if(o&&l){e:for(var a=0;a<l.length;++a){var s=l[a];for(var f=0;f<o.length;++f){if(o[f].marker==s.marker){continue e}}o.push(s)}}else if(l){i[r]=l}}return i}function Wo(e,t,i){var n=[];for(var r=0;r<e.length;++r){var o=e[r];if(o.ranges){n.push(i?lo.prototype.deepCopy.call(o):o);continue}var l=o.changes,a=[];n.push({changes:a});for(var s=0;s<l.length;++s){var f=l[s],c=void 0;a.push({from:f.from,to:f.to,text:f.text});if(t){for(var u in f){if(c=u.match(/^spans_(\d+)$/)){if(U(t,Number(c[1]))>-1){Q(a)[u]=f[u];delete f[u]}}}}}}return n}function Io(e,t,i,n){if(n){var r=e.anchor;if(i){var o=st(t,r)<0;if(o!=st(i,r)<0){r=t;t=i}else if(o!=st(t,i)<0){t=i}}return new ao(r,t)}else{return new ao(i||t,t)}}function Ro(e,t,i,n,r){if(r==null){r=e.cm&&(e.cm.display.shift||e.extend)}Go(e,new lo([Io(e.sel.primary(),t,i,r)],0),n)}function Bo(e,t,i){var n=[];var r=e.cm&&(e.cm.display.shift||e.extend);for(var o=0;o<e.sel.ranges.length;o++){n[o]=Io(e.sel.ranges[o],t[o],null,r)}var l=so(e.cm,n,e.sel.primIndex);Go(e,l,i)}function jo(e,t,i,n){var r=e.sel.ranges.slice(0);r[t]=i;Go(e,so(e.cm,r,e.sel.primIndex),n)}function zo(e,t,i,n){Go(e,fo(t,i),n)}function qo(e,t,i){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var i=0;i<t.length;i++){this.ranges[i]=new ao(pt(e,t[i].anchor),pt(e,t[i].head))}},origin:i&&i.origin};be(e,"beforeSelectionChange",e,n);if(e.cm){be(e.cm,"beforeSelectionChange",e.cm,n)}if(n.ranges!=t.ranges){return so(e.cm,n.ranges,n.ranges.length-1)}else{return t}}function Uo(e,t,i){var n=e.history.done,r=Q(n);if(r&&r.ranges){n[n.length-1]=t;Vo(e,t,i)}else{Go(e,t,i)}}function Go(e,t,i){Vo(e,t,i);No(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Vo(e,t,i){if(Se(e,"beforeSelectionChange")||e.cm&&Se(e.cm,"beforeSelectionChange")){t=qo(e,t,i)}var n=i&&i.bias||(st(t.primary().head,e.sel.primary().head)<0?-1:1);Ko(e,Xo(e,t,n,true));if(!(i&&i.scroll===false)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"){fr(e.cm)}}function Ko(e,t){if(t.equals(e.sel)){return}e.sel=t;if(e.cm){e.cm.curOp.updateInput=1;e.cm.curOp.selectionChanged=true;Ce(e.cm)}Ni(e,"cursorActivity",e)}function $o(e){Ko(e,Xo(e,e.sel,null,false))}function Xo(e,t,i,n){var r;for(var o=0;o<t.ranges.length;o++){var l=t.ranges[o];var a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o];var s=Yo(e,l.anchor,a&&a.anchor,i,n);var f=l.head==l.anchor?s:Yo(e,l.head,a&&a.head,i,n);if(r||s!=l.anchor||f!=l.head){if(!r){r=t.ranges.slice(0,o)}r[o]=new ao(s,f)}}return r?so(e.cm,r,t.primIndex):t}function _o(e,t,i,n,r){var o=Ze(e,t.line);if(o.markedSpans){for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker;var f="selectLeft"in s?!s.selectLeft:s.inclusiveLeft;var c="selectRight"in s?!s.selectRight:s.inclusiveRight;if((a.from==null||(f?a.from<=t.ch:a.from<t.ch))&&(a.to==null||(c?a.to>=t.ch:a.to>t.ch))){if(r){be(s,"beforeCursorEnter");if(s.explicitlyCleared){if(!o.markedSpans){break}else{--l;continue}}}if(!s.atomic){continue}if(i){var u=s.find(n<0?1:-1),h=void 0;if(n<0?c:f){u=Jo(e,u,-n,u&&u.line==t.line?o:null)}if(u&&u.line==t.line&&(h=st(u,i))&&(n<0?h<0:h>0)){return _o(e,u,t,n,r)}}var d=s.find(n<0?-1:1);if(n<0?f:c){d=Jo(e,d,n,d.line==t.line?o:null)}return d?_o(e,d,t,n,r):null}}}return t}function Yo(e,t,i,n,r){var o=n||1;var l=_o(e,t,i,o,r)||!r&&_o(e,t,i,o,true)||_o(e,t,i,-o,r)||!r&&_o(e,t,i,-o,true);if(!l){e.cantEdit=true;return at(e.first,0)}return l}function Jo(e,t,i,n){if(i<0&&t.ch==0){if(t.line>e.first){return pt(e,at(t.line-1))}else{return null}}else if(i>0&&t.ch==(n||Ze(e,t.line)).text.length){if(t.line<e.first+e.size-1){return at(t.line+1,0)}else{return null}}else{return new at(t.line,t.ch+i)}}function Qo(e){e.setSelection(at(e.firstLine(),0),at(e.lastLine()),K)}function Zo(e,t,i){var n={canceled:false,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=true}};if(i){n.update=function(t,i,r,o){if(t){n.from=pt(e,t)}if(i){n.to=pt(e,i)}if(r){n.text=r}if(o!==undefined){n.origin=o}}}be(e,"beforeChange",e,n);if(e.cm){be(e.cm,"beforeChange",e.cm,n)}if(n.canceled){if(e.cm){e.cm.curOp.updateInput=2}return null}return{from:n.from,to:n.to,text:n.text,origin:n.origin}}function el(e,t,i){if(e.cm){if(!e.cm.curOp){return Hr(e.cm,el)(e,t,i)}if(e.cm.state.suppressEdits){return}}if(Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange")){t=Zo(e,t,true);if(!t){return}}var n=Pt&&!i&&Ut(e,t.from,t.to);if(n){for(var r=n.length-1;r>=0;--r){tl(e,{from:n[r].from,to:n[r].to,text:r?[""]:t.text,origin:t.origin})}}else{tl(e,t)}}function tl(e,t){if(t.text.length==1&&t.text[0]==""&&st(t.from,t.to)==0){return}var i=ho(e,t);Oo(e,t,i,e.cm?e.cm.curOp.id:NaN);rl(e,t,i,zt(e,t));var n=[];bo(e,function(e,i){if(!i&&U(n,e.history)==-1){fl(e.history,t);n.push(e.history)}rl(e,t,null,zt(e,t))})}function il(e,t,i){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!i){return}var r=e.history,o,l=e.sel;var a=t=="undo"?r.done:r.undone,s=t=="undo"?r.undone:r.done;var f=0;for(;f<a.length;f++){o=a[f];if(i?o.ranges&&!o.equals(e.sel):!o.ranges){break}}if(f==a.length){return}r.lastOrigin=r.lastSelOrigin=null;for(;;){o=a.pop();if(o.ranges){Po(o,s);if(i&&!o.equals(e.sel)){Go(e,o,{clearRedo:false});return}l=o}else if(n){a.push(o);return}else{break}}var c=[];Po(l,s);s.push({changes:c,generation:r.generation});r.generation=o.generation||++r.maxGeneration;var u=Se(e,"beforeChange")||e.cm&&Se(e.cm,"beforeChange");var h=function(i){var n=o.changes[i];n.origin=t;if(u&&!Zo(e,n,false)){a.length=0;return{}}c.push(Lo(e,n));var r=i?ho(e,n):Q(a);rl(e,n,r,Eo(e,n));if(!i&&e.cm){e.cm.scrollIntoView({from:n.from,to:co(n)})}var l=[];bo(e,function(e,t){if(!t&&U(l,e.history)==-1){fl(e.history,n);l.push(e.history)}rl(e,n,null,Eo(e,n))})};for(var d=o.changes.length-1;d>=0;--d){var p=h(d);if(p)return p.v}}function nl(e,t){if(t==0){return}e.first+=t;e.sel=new lo(Z(e.sel.ranges,function(e){return new ao(at(e.anchor.line+t,e.anchor.ch),at(e.head.line+t,e.head.ch))}),e.sel.primIndex);if(e.cm){Bn(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,n=i.viewFrom;n<i.viewTo;n++){jn(e.cm,n,"gutter")}}}function rl(e,t,i,n){if(e.cm&&!e.cm.curOp){return Hr(e.cm,rl)(e,t,i,n)}if(t.to.line<e.first){nl(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine()){return}if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);nl(e,r);t={from:at(e.first,0),to:at(t.to.line+r,t.to.ch),text:[Q(t.text)],origin:t.origin}}var o=e.lastLine();if(t.to.line>o){t={from:t.from,to:at(o,Ze(e,o).text.length),text:[t.text[0]],origin:t.origin}}t.removed=et(e,t.from,t.to);if(!i){i=ho(e,t)}if(e.cm){ol(e.cm,t,n)}else{xo(e,t,n)}Vo(e,i,K);if(e.cantEdit&&Yo(e,at(e.firstLine(),0))){e.cantEdit=false}}function ol(e,t,i){var n=e.doc,r=e.display,o=t.from,l=t.to;var a=false,s=o.line;if(!e.options.lineWrapping){s=nt(ei(Ze(n,o.line)));n.iter(s,l.line+1,function(e){if(e==r.maxLine){a=true;return true}})}if(n.sel.contains(t.from,t.to)>-1){Ce(e)}xo(n,t,i,En(e));if(!e.options.lineWrapping){n.iter(s,o.line+t.text.length,function(e){var t=si(e);if(t>r.maxLineLength){r.maxLine=e;r.maxLineLength=t;r.maxLineChanged=true;a=false}});if(a){e.curOp.updateMaxLine=true}}Nt(n,o.line);Ir(e,400);var f=t.text.length-(l.line-o.line)-1;if(t.full){Bn(e)}else if(o.line==l.line&&t.text.length==1&&!yo(e.doc,t)){jn(e,o.line,"text")}else{Bn(e,o.line,l.line+1,f)}var c=Se(e,"changes"),u=Se(e,"change");if(u||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};if(u){Ni(e,"change",e,h)}if(c){(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}}e.display.selForContextMenu=null}function ll(e,t,i,n,r){var o;if(!n){n=i}if(st(n,i)<0){o=[n,i],i=o[0],n=o[1]}if(typeof t=="string"){t=e.splitLines(t)}el(e,{from:i,to:n,text:t,origin:r})}function al(e,t,i,n){if(i<e.line){e.line+=n}else if(t<e.line){e.line=t;e.ch=0}}function sl(e,t,i,n){for(var r=0;r<e.length;++r){var o=e[r],l=true;if(o.ranges){if(!o.copied){o=e[r]=o.deepCopy();o.copied=true}for(var a=0;a<o.ranges.length;a++){al(o.ranges[a].anchor,t,i,n);al(o.ranges[a].head,t,i,n)}continue}for(var s=0;s<o.changes.length;++s){var f=o.changes[s];if(i<f.from.line){f.from=at(f.from.line+n,f.from.ch);f.to=at(f.to.line+n,f.to.ch)}else if(t<=f.to.line){l=false;break}}if(!l){e.splice(0,r+1);r=0}}}function fl(e,t){var i=t.from.line,n=t.to.line,r=t.text.length-(n-i)-1;sl(e.done,i,n,r);sl(e.undone,i,n,r)}function cl(e,t,i,n){var r=t,o=t;if(typeof t=="number"){o=Ze(e,dt(e,t))}else{r=nt(t)}if(r==null){return null}if(n(o,r)&&e.cm){jn(e.cm,r,i)}return o}function ul(e){this.lines=e;this.parent=null;var t=0;for(var i=0;i<e.length;++i){e[i].parent=this;t+=e[i].height}this.height=t}ul.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,n=e+t;i<n;++i){var r=this.lines[i];this.height-=r.height;hi(r);Ni(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i;this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n){t[n].parent=this}},iterN:function(e,t,i){for(var n=e+t;e<n;++e){if(i(this.lines[e])){return true}}}};function hl(e){this.children=e;var t=0,i=0;for(var n=0;n<e.length;++n){var r=e[n];t+=r.chunkSize();i+=r.height;r.parent=this}this.size=t;this.height=i;this.parent=null}hl.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var n=this.children[i],r=n.chunkSize();if(e<r){var o=Math.min(t,r-e),l=n.height;n.removeInner(e,o);this.height-=l-n.height;if(r==o){this.children.splice(i--,1);n.parent=null}if((t-=o)==0){break}e=0}else{e-=r}}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ul))){var a=[];this.collapse(a);this.children=[new ul(a)];this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t){this.children[t].collapse(e)}},insertInner:function(e,t,i){this.size+=t.length;this.height+=i;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<=o){r.insertInner(e,t,i);if(r.lines&&r.lines.length>50){var l=r.lines.length%25+25;for(var a=l;a<r.lines.length;){var s=new ul(r.lines.slice(a,a+=25));r.height-=s.height;this.children.splice(++n,0,s);s.parent=this}r.lines=r.lines.slice(0,l);this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(this.children.length<=10){return}var e=this;do{var t=e.children.splice(e.children.length-5,5);var i=new hl(t);if(!e.parent){var n=new hl(e.children);n.parent=e;e.children=[n,i];e=n}else{e.size-=i.size;e.height-=i.height;var r=U(e.parent.children,e);e.parent.children.splice(r+1,0,i)}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,i){for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var l=Math.min(t,o-e);if(r.iterN(e,l,i)){return true}if((t-=l)==0){break}e=0}else{e-=o}}}};var dl=function(e,t,i){if(i){for(var n in i){if(i.hasOwnProperty(n)){this[n]=i[n]}}}this.doc=e;this.node=t};dl.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,n=nt(i);if(n==null||!t){return}for(var r=0;r<t.length;++r){if(t[r]==this){t.splice(r--,1)}}if(!t.length){i.widgets=null}var o=Gi(this);it(i,Math.max(0,i.height-o));if(e){Dr(e,function(){pl(e,i,-o);jn(e,n,"widget")});Ni(e,"lineWidgetCleared",e,this,n)}};dl.prototype.changed=function(){var e=this;var t=this.height,i=this.doc.cm,n=this.line;this.height=null;var r=Gi(this)-t;if(!r){return}if(!oi(this.doc,n)){it(n,n.height+r)}if(i){Dr(i,function(){i.curOp.forceUpdate=true;pl(i,n,r);Ni(i,"lineWidgetChanged",i,e,nt(n))})}};ke(dl);function pl(e,t,i){if(ai(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)){sr(e,i)}}function ml(e,t,i,n){var r=new dl(e,i,n);var o=e.cm;if(o&&r.noHScroll){o.display.alignWidgets=true}cl(e,t,"widget",function(t){var i=t.widgets||(t.widgets=[]);if(r.insertAt==null){i.push(r)}else{i.splice(Math.min(i.length,Math.max(0,r.insertAt)),0,r)}r.line=t;if(o&&!oi(e,t)){var n=ai(t)<e.scrollTop;it(t,t.height+Gi(r));if(n){sr(o,r.height)}o.curOp.forceUpdate=true}return true});if(o){Ni(o,"lineWidgetAdded",o,r,typeof t=="number"?t:nt(t))}return r}var gl=0;var vl=function(e,t){this.lines=[];this.type=t;this.doc=e;this.id=++gl};vl.prototype.clear=function(){if(this.explicitlyCleared){return}var e=this.doc.cm,t=e&&!e.curOp;if(t){Lr(e)}if(Se(this,"clear")){var i=this.find();if(i){Ni(this,"clear",i.from,i.to)}}var n=null,r=null;for(var o=0;o<this.lines.length;++o){var l=this.lines[o];var a=Wt(l.markedSpans,this);if(e&&!this.collapsed){jn(e,nt(l),"text")}else if(e){if(a.to!=null){r=nt(l)}if(a.from!=null){n=nt(l)}}l.markedSpans=It(l.markedSpans,a);if(a.from==null&&this.collapsed&&!oi(this.doc,l)&&e){it(l,Pn(e.display))}}if(e&&this.collapsed&&!e.options.lineWrapping){for(var s=0;s<this.lines.length;++s){var f=ei(this.lines[s]),c=si(f);if(c>e.display.maxLineLength){e.display.maxLine=f;e.display.maxLineLength=c;e.display.maxLineChanged=true}}}if(n!=null&&e&&this.collapsed){Bn(e,n,r+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(e){$o(e.doc)}}if(e){Ni(e,"markerCleared",e,this,n,r)}if(t){Mr(e)}if(this.parent){this.parent.clear()}};vl.prototype.find=function(e,t){if(e==null&&this.type=="bookmark"){e=1}var i,n;for(var r=0;r<this.lines.length;++r){var o=this.lines[r];var l=Wt(o.markedSpans,this);if(l.from!=null){i=at(t?o:nt(o),l.from);if(e==-1){return i}}if(l.to!=null){n=at(t?o:nt(o),l.to);if(e==1){return n}}}return i&&{from:i,to:n}};vl.prototype.changed=function(){var e=this;var t=this.find(-1,true),i=this,n=this.doc.cm;if(!t||!n){return}Dr(n,function(){var r=t.line,o=nt(t.line);var l=nn(n,o);if(l){un(l);n.curOp.selectionChanged=n.curOp.forceUpdate=true}n.curOp.updateMaxLine=true;if(!oi(i.doc,r)&&i.height!=null){var a=i.height;i.height=null;var s=Gi(i)-a;if(s){it(r,r.height+s)}}Ni(n,"markerChanged",n,e)})};vl.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;if(!t.maybeHiddenMarkers||U(t.maybeHiddenMarkers,this)==-1){(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(e)};vl.prototype.detachLine=function(e){this.lines.splice(U(this.lines,e),1);if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};ke(vl);function yl(e,t,i,n,r){if(n&&n.shared){return bl(e,t,i,n,r)}if(e.cm&&!e.cm.curOp){return Hr(e.cm,yl)(e,t,i,n,r)}var o=new vl(e,r),l=st(t,i);if(n){j(n,o,false)}if(l>0||l==0&&o.clearWhenEmpty!==false){return o}if(o.replacedWith){o.collapsed=true;o.widgetNode=N("span",[o.replacedWith],"CodeMirror-widget");if(!n.handleMouseEvents){o.widgetNode.setAttribute("cm-ignore-events","true")}if(n.insertLeft){o.widgetNode.insertLeft=true}}if(o.collapsed){if(Zt(e,t.line,t,i,o)||t.line!=i.line&&Zt(e,i.line,t,i,o)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}Ht()}if(o.addToHistory){Oo(e,{from:t,to:i,origin:"markText"},e.sel,NaN)}var a=t.line,s=e.cm,f;e.iter(a,i.line+1,function(n){if(s&&o.collapsed&&!s.options.lineWrapping&&ei(n)==s.display.maxLine){f=true}if(o.collapsed&&a!=t.line){it(n,0)}Rt(n,new Et(o,a==t.line?t.ch:null,a==i.line?i.ch:null),e.cm&&e.cm.curOp);++a});if(o.collapsed){e.iter(t.line,i.line+1,function(t){if(oi(e,t)){it(t,0)}})}if(o.clearOnEnter){ve(o,"beforeCursorEnter",function(){return o.clear()})}if(o.readOnly){Dt();if(e.history.done.length||e.history.undone.length){e.clearHistory()}}if(o.collapsed){o.id=++gl;o.atomic=true}if(s){if(f){s.curOp.updateMaxLine=true}if(o.collapsed){Bn(s,t.line,i.line+1)}else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title){for(var c=t.line;c<=i.line;c++){jn(s,c,"text")}}if(o.atomic){$o(s.doc)}Ni(s,"markerAdded",s,o)}return o}var xl=function(e,t){this.markers=e;this.primary=t;for(var i=0;i<e.length;++i){e[i].parent=this}};xl.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var e=0;e<this.markers.length;++e){this.markers[e].clear()}Ni(this,"clear")};xl.prototype.find=function(e,t){return this.primary.find(e,t)};ke(xl);function bl(e,t,i,n,r){n=j(n);n.shared=false;var o=[yl(e,t,i,n,r)],l=o[0];var a=n.widgetNode;bo(e,function(e){if(a){n.widgetNode=a.cloneNode(true)}o.push(yl(e,pt(e,t),pt(e,i),n,r));for(var s=0;s<e.linked.length;++s){if(e.linked[s].isParent){return}}l=Q(o)});return new xl(o,l)}function wl(e){return e.findMarks(at(e.first,0),e.clipPos(at(e.lastLine())),function(e){return e.parent})}function Cl(e,t){for(var i=0;i<t.length;i++){var n=t[i],r=n.find();var o=e.clipPos(r.from),l=e.clipPos(r.to);if(st(o,l)){var a=yl(e,o,l,n.primary,n.primary.type);n.markers.push(a);a.parent=n}}}function Sl(e){var t=function(t){var i=e[t],n=[i.primary.doc];bo(i.primary.doc,function(e){return n.push(e)});for(var r=0;r<i.markers.length;r++){var o=i.markers[r];if(U(n,o.doc)==-1){o.parent=null;i.markers.splice(r--,1)}}};for(var i=0;i<e.length;i++)t(i)}var kl=0;var Ll=function(e,t,i,n,r){if(!(this instanceof Ll)){return new Ll(e,t,i,n,r)}if(i==null){i=0}hl.call(this,[new ul([new ci("",null)])]);this.first=i;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.modeFrontier=this.highlightFrontier=i;var o=at(i,0);this.sel=fo(o);this.history=new ko(null);this.id=++kl;this.modeOption=t;this.lineSep=n;this.direction=r=="rtl"?"rtl":"ltr";this.extend=false;if(typeof e=="string"){e=this.splitLines(e)}xo(this,{from:o,to:o,text:e});Go(this,fo(o),K)};Ll.prototype=ie(hl.prototype,{constructor:Ll,iter:function(e,t,i){if(i){this.iterN(e-this.first,t-e,i)}else{this.iterN(this.first,this.first+this.size,e)}},insert:function(e,t){var i=0;for(var n=0;n<t.length;++n){i+=t[n].height}this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=tt(this,this.first,this.first+this.size);if(e===false){return t}return t.join(e||this.lineSeparator())},setValue:Wr(function(e){var t=at(this.first,0),i=this.first+this.size-1;el(this,{from:t,to:at(i,Ze(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:true},true);if(this.cm){cr(this.cm,0,0)}Go(this,fo(t),K)}),replaceRange:function(e,t,i,n){t=pt(this,t);i=i?pt(this,i):t;ll(this,e,t,i,n)},getRange:function(e,t,i){var n=et(this,pt(this,e),pt(this,t));if(i===false){return n}if(i===""){return n.join("")}return n.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ot(this,e)){return Ze(this,e)}},getLineNumber:function(e){return nt(e)},getLineHandleVisualStart:function(e){if(typeof e=="number"){e=Ze(this,e)}return ei(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return pt(this,e)},getCursor:function(e){var t=this.sel.primary(),i;if(e==null||e=="head"){i=t.head}else if(e=="anchor"){i=t.anchor}else if(e=="end"||e=="to"||e===false){i=t.to()}else{i=t.from()}return i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Wr(function(e,t,i){zo(this,pt(this,typeof e=="number"?at(e,t||0):e),null,i)}),setSelection:Wr(function(e,t,i){zo(this,pt(this,e),pt(this,t||e),i)}),extendSelection:Wr(function(e,t,i){Ro(this,pt(this,e),t&&pt(this,t),i)}),extendSelections:Wr(function(e,t){Bo(this,gt(this,e),t)}),extendSelectionsBy:Wr(function(e,t){var i=Z(this.sel.ranges,e);Bo(this,gt(this,i),t)}),setSelections:Wr(function(e,t,i){if(!e.length){return}var n=[];for(var r=0;r<e.length;r++){n[r]=new ao(pt(this,e[r].anchor),pt(this,e[r].head||e[r].anchor))}if(t==null){t=Math.min(e.length-1,this.sel.primIndex)}Go(this,so(this.cm,n,t),i)}),addSelection:Wr(function(e,t,i){var n=this.sel.ranges.slice(0);n.push(new ao(pt(this,e),pt(this,t||e)));Go(this,so(this.cm,n,n.length-1),i)}),getSelection:function(e){var t=this.sel.ranges,i;for(var n=0;n<t.length;n++){var r=et(this,t[n].from(),t[n].to());i=i?i.concat(r):r}if(e===false){return i}else{return i.join(e||this.lineSeparator())}},getSelections:function(e){var t=[],i=this.sel.ranges;for(var n=0;n<i.length;n++){var r=et(this,i[n].from(),i[n].to());if(e!==false){r=r.join(e||this.lineSeparator())}t[n]=r}return t},replaceSelection:function(e,t,i){var n=[];for(var r=0;r<this.sel.ranges.length;r++){n[r]=e}this.replaceSelections(n,t,i||"+input")},replaceSelections:Wr(function(e,t,i){var n=[],r=this.sel;for(var o=0;o<r.ranges.length;o++){var l=r.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:i}}var a=t&&t!="end"&&mo(this,n,t);for(var s=n.length-1;s>=0;s--){el(this,n[s])}if(a){Uo(this,a)}else if(this.cm){fr(this.cm)}}),undo:Wr(function(){il(this,"undo")}),redo:Wr(function(){il(this,"redo")}),undoSelection:Wr(function(){il(this,"undo",true)}),redoSelection:Wr(function(){il(this,"redo",true)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){var e=this.history,t=0,i=0;for(var n=0;n<e.done.length;n++){if(!e.done[n].ranges){++t}}for(var r=0;r<e.undone.length;r++){if(!e.undone[r].ranges){++i}}return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new ko(this.history);bo(this,function(t){return t.history=e.history},true)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(e){if(e){this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Wo(this.history.done),undone:Wo(this.history.undone)}},setHistory:function(e){var t=this.history=new ko(this.history);t.done=Wo(e.done.slice(0),null,true);t.undone=Wo(e.undone.slice(0),null,true)},setGutterMarker:Wr(function(e,t,i){return cl(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});n[t]=i;if(!i&&le(n)){e.gutterMarkers=null}return true})}),clearGutter:Wr(function(e){var t=this;this.iter(function(i){if(i.gutterMarkers&&i.gutterMarkers[e]){cl(t,i,"gutter",function(){i.gutterMarkers[e]=null;if(le(i.gutterMarkers)){i.gutterMarkers=null}return true})}})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ot(this,e)){return null}t=e;e=Ze(this,e);if(!e){return null}}else{t=nt(e);if(t==null){return null}}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Wr(function(e,t,i){return cl(this,e,t=="gutter"?"gutter":"class",function(e){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!e[n]){e[n]=i}else if(L(i).test(e[n])){return false}else{e[n]+=" "+i}return true})}),removeLineClass:Wr(function(e,t,i){return cl(this,e,t=="gutter"?"gutter":"class",function(e){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";var r=e[n];if(!r){return false}else if(i==null){e[n]=null}else{var o=r.match(L(i));if(!o){return false}var l=o.index+o[0].length;e[n]=r.slice(0,o.index)+(!o.index||l==r.length?"":" ")+r.slice(l)||null}return true})}),addLineWidget:Wr(function(e,t,i){return ml(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return yl(this,pt(this,e),pt(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:false,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};e=pt(this,e);return yl(this,e,e,i,"bookmark")},findMarksAt:function(e){e=pt(this,e);var t=[],i=Ze(this,e.line).markedSpans;if(i){for(var n=0;n<i.length;++n){var r=i[n];if((r.from==null||r.from<=e.ch)&&(r.to==null||r.to>=e.ch)){t.push(r.marker.parent||r.marker)}}}return t},findMarks:function(e,t,i){e=pt(this,e);t=pt(this,t);var n=[],r=e.line;this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l){for(var a=0;a<l.length;a++){var s=l[a];if(!(s.to!=null&&r==e.line&&e.ch>=s.to||s.from==null&&r!=e.line||s.from!=null&&r==t.line&&s.from>=t.ch)&&(!i||i(s.marker))){n.push(s.marker.parent||s.marker)}}}++r});return n},getAllMarks:function(){var e=[];this.iter(function(t){var i=t.markedSpans;if(i){for(var n=0;n<i.length;++n){if(i[n].from!=null){e.push(i[n].marker)}}}});return e},posFromIndex:function(e){var t,i=this.first,n=this.lineSeparator().length;this.iter(function(r){var o=r.text.length+n;if(o>e){t=e;return true}e-=o;++i});return pt(this,at(i,t))},indexFromPos:function(e){e=pt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0){return 0}var i=this.lineSeparator().length;this.iter(this.first,e.line,function(e){t+=e.text.length+i});return t},copy:function(e){var t=new Ll(tt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);t.scrollTop=this.scrollTop;t.scrollLeft=this.scrollLeft;t.sel=this.sel;t.extend=false;if(e){t.history.undoDepth=this.history.undoDepth;t.setHistory(this.getHistory())}return t},linkedDoc:function(e){if(!e){e={}}var t=this.first,i=this.first+this.size;if(e.from!=null&&e.from>t){t=e.from}if(e.to!=null&&e.to<i){i=e.to}var n=new Ll(tt(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);if(e.sharedHist){n.history=this.history}(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist});n.linked=[{doc:this,isParent:true,sharedHist:e.sharedHist}];Cl(n,wl(this));return n},unlinkDoc:function(e){if(e instanceof Ba){e=e.doc}if(this.linked){for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc!=e){continue}this.linked.splice(t,1);e.unlinkDoc(this);Sl(wl(this));break}}if(e.history==this.history){var n=[e.id];bo(e,function(e){return n.push(e.id)},true);e.history=new ko(null);e.history.done=Wo(this.history.done,n);e.history.undone=Wo(this.history.undone,n)}},iterLinkedDocs:function(e){bo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){if(this.lineSep){return e.split(this.lineSep)}return We(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Wr(function(e){if(e!="rtl"){e="ltr"}if(e==this.direction){return}this.direction=e;this.iter(function(e){return e.order=null});if(this.cm){So(this.cm)}})});Ll.prototype.eachLine=Ll.prototype.iter;var Ml=0;function Tl(e){var t=this;Nl(t);if(we(t,e)||Vi(t.display,e)){return}Le(e);if(l){Ml=+new Date}var i=In(t,e,true),n=e.dataTransfer.files;if(!i||t.isReadOnly()){return}if(n&&n.length&&window.FileReader&&window.File){var r=n.length,o=Array(r),a=0;var s=function(){if(++a==r){Hr(t,function(){i=pt(t.doc,i);var e={from:i,to:i,text:t.doc.splitLines(o.filter(function(e){return e!=null}).join(t.doc.lineSeparator())),origin:"paste"};el(t.doc,e);Uo(t.doc,fo(pt(t.doc,i),pt(t.doc,co(e))))})()}};var f=function(e,i){if(t.options.allowDropFileTypes&&U(t.options.allowDropFileTypes,e.type)==-1){s();return}var n=new FileReader;n.onerror=function(){return s()};n.onload=function(){var e=n.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)){s();return}o[i]=e;s()};n.readAsText(e)};for(var c=0;c<n.length;c++){f(n[c],c)}}else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e);setTimeout(function(){return t.display.input.focus()},20);return}try{var u=e.dataTransfer.getData("Text");if(u){var h;if(t.state.draggingText&&!t.state.draggingText.copy){h=t.listSelections()}Vo(t.doc,fo(i,i));if(h){for(var d=0;d<h.length;++d){ll(t.doc,"",h[d].anchor,h[d].head,"drag")}}t.replaceSelection(u,"around","paste");t.display.input.focus()}}catch(e){}}}function Ol(e,t){if(l&&(!e.state.draggingText||+new Date-Ml<100)){Oe(t);return}if(we(e,t)||Vi(e.display,t)){return}t.dataTransfer.setData("Text",e.getSelection());t.dataTransfer.effectAllowed="copyMove";if(t.dataTransfer.setDragImage&&!d){var i=A("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(h){i.width=i.height=1;e.display.wrapper.appendChild(i);i._top=i.offsetTop}t.dataTransfer.setDragImage(i,0,0);if(h){i.parentNode.removeChild(i)}}}function Al(e,t){var i=In(e,t);if(!i){return}var n=document.createDocumentFragment();$n(e,i,n);if(!e.display.dragCursor){e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors");e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)}O(e.display.dragCursor,n)}function Nl(e){if(e.display.dragCursor){e.display.lineSpace.removeChild(e.display.dragCursor);e.display.dragCursor=null}}function Pl(e){if(!document.getElementsByClassName){return}var t=document.getElementsByClassName("CodeMirror"),i=[];for(var n=0;n<t.length;n++){var r=t[n].CodeMirror;if(r){i.push(r)}}if(i.length){i[0].operation(function(){for(var t=0;t<i.length;t++){e(i[t])}})}}var Fl=false;function Dl(){if(Fl){return}Hl();Fl=true}function Hl(){var e;ve(window,"resize",function(){if(e==null){e=setTimeout(function(){e=null;Pl(El)},100)}});ve(window,"blur",function(){return Pl(er)})}function El(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null;t.scrollbarsClipped=false;e.setSize()}var Wl={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};for(var Il=0;Il<10;Il++){Wl[Il+48]=Wl[Il+96]=String(Il)}for(var Rl=65;Rl<=90;Rl++){Wl[Rl]=String.fromCharCode(Rl)}for(var Bl=1;Bl<=12;Bl++){Wl[Bl+111]=Wl[Bl+63235]="F"+Bl}var jl={};jl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};jl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};jl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"};jl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]};jl["default"]=x?jl.macDefault:jl.pcDefault;function zl(e){var t=e.split(/-(?!$)/);e=t[t.length-1];var i,n,r,o;for(var l=0;l<t.length-1;l++){var a=t[l];if(/^(cmd|meta|m)$/i.test(a)){o=true}else if(/^a(lt)?$/i.test(a)){i=true}else if(/^(c|ctrl|control)$/i.test(a)){n=true}else if(/^s(hift)?$/i.test(a)){r=true}else{throw new Error("Unrecognized modifier name: "+a)}}if(i){e="Alt-"+e}if(n){e="Ctrl-"+e}if(o){e="Cmd-"+e}if(r){e="Shift-"+e}return e}function ql(e){var t={};for(var i in e){if(e.hasOwnProperty(i)){var n=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i)){continue}if(n=="..."){delete e[i];continue}var r=Z(i.split(" "),zl);for(var o=0;o<r.length;o++){var l=void 0,a=void 0;if(o==r.length-1){a=r.join(" ");l=n}else{a=r.slice(0,o+1).join(" ");l="..."}var s=t[a];if(!s){t[a]=l}else if(s!=l){throw new Error("Inconsistent bindings for "+a)}}delete e[i]}}for(var f in t){e[f]=t[f]}return e}function Ul(e,t,i,n){t=$l(t);var r=t.call?t.call(e,n):t[e];if(r===false){return"nothing"}if(r==="..."){return"multi"}if(r!=null&&i(r)){return"handled"}if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]"){return Ul(e,t.fallthrough,i,n)}for(var o=0;o<t.fallthrough.length;o++){var l=Ul(e,t.fallthrough[o],i,n);if(l){return l}}}}function Gl(e){var t=typeof e=="string"?e:Wl[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Vl(e,t,i){var n=e;if(t.altKey&&n!="Alt"){e="Alt-"+e}if((S?t.metaKey:t.ctrlKey)&&n!="Ctrl"){e="Ctrl-"+e}if((S?t.ctrlKey:t.metaKey)&&n!="Mod"){e="Cmd-"+e}if(!i&&t.shiftKey&&n!="Shift"){e="Shift-"+e}return e}function Kl(e,t){if(h&&e.keyCode==34&&e["char"]){return false}var i=Wl[e.keyCode];if(i==null||e.altGraphKey){return false}if(e.keyCode==3&&e.code){i=e.code}return Vl(i,e,t)}function $l(e){return typeof e=="string"?jl[e]:e}function Xl(e,t){var i=e.doc.sel.ranges,n=[];for(var r=0;r<i.length;r++){var o=t(i[r]);while(n.length&&st(o.from,Q(n).to)<=0){var l=n.pop();if(st(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Dr(e,function(){for(var t=n.length-1;t>=0;t--){ll(e.doc,"",n[t].from,n[t].to,"+delete")}fr(e)})}function _l(e,t,i){var n=fe(e.text,t+i,i);return n<0||n>e.text.length?null:n}function Yl(e,t,i){var n=_l(e,t.ch,i);return n==null?null:new at(t.line,n,i<0?"after":"before")}function Jl(e,t,i,n,r){if(e){if(t.doc.direction=="rtl"){r=-r}var o=me(i,t.doc.direction);if(o){var l=r<0?Q(o):o[0];var a=r<0==(l.level==1);var s=a?"after":"before";var f;if(l.level>0||t.doc.direction=="rtl"){var c=rn(t,i);f=r<0?i.text.length-1:0;var u=on(t,c,f).top;f=ce(function(e){return on(t,c,e).top==u},r<0==(l.level==1)?l.from:l.to-1,f);if(s=="before"){f=_l(i,f,1)}}else{f=r<0?l.to:l.from}return new at(n,f,s)}}return new at(n,r<0?i.text.length:0,r<0?"before":"after")}function Ql(e,t,i,n){var r=me(t,e.doc.direction);if(!r){return Yl(t,i,n)}if(i.ch>=t.text.length){i.ch=t.text.length;i.sticky="before"}else if(i.ch<=0){i.ch=0;i.sticky="after"}var o=de(r,i.ch,i.sticky),l=r[o];if(e.doc.direction=="ltr"&&l.level%2==0&&(n>0?l.to>i.ch:l.from<i.ch)){return Yl(t,i,n)}var a=function(e,i){return _l(t,e instanceof at?e.ch:e,i)};var s;var f=function(i){if(!e.options.lineWrapping){return{begin:0,end:t.text.length}}s=s||rn(e,t);return Ln(e,t,s,i)};var c=f(i.sticky=="before"?a(i,-1):i.ch);if(e.doc.direction=="rtl"||l.level==1){var u=l.level==1==n<0;var h=a(i,u?1:-1);if(h!=null&&(!u?h>=l.from&&h>=c.begin:h<=l.to&&h<=c.end)){var d=u?"before":"after";return new at(i.line,h,d)}}var p=function(e,t,n){var o=function(e,t){return t?new at(i.line,a(e,1),"before"):new at(i.line,e,"after")};for(;e>=0&&e<r.length;e+=t){var l=r[e];var s=t>0==(l.level!=1);var f=s?n.begin:a(n.end,-1);if(l.from<=f&&f<l.to){return o(f,s)}f=s?l.from:a(l.to,-1);if(n.begin<=f&&f<n.end){return o(f,s)}}};var m=p(o+n,n,c);if(m){return m}var g=n>0?c.end:a(c.begin,-1);if(g!=null&&!(n>0&&g==t.text.length)){m=p(n>0?0:r.length-1,n,f(g));if(m){return m}}return null}var Zl={selectAll:Qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),K)},killLine:function(e){return Xl(e,function(t){if(t.empty()){var i=Ze(e.doc,t.head.line).text.length;if(t.head.ch==i&&t.head.line<e.lastLine()){return{from:t.head,to:at(t.head.line+1,0)}}else{return{from:t.head,to:at(t.head.line,i)}}}else{return{from:t.from(),to:t.to()}}})},deleteLine:function(e){return Xl(e,function(t){return{from:at(t.from().line,0),to:pt(e.doc,at(t.to().line+1,0))}})},delLineLeft:function(e){return Xl(e,function(e){return{from:at(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xl(e,function(t){var i=e.charCoords(t.head,"div").top+5;var n=e.coordsChar({left:0,top:i},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Xl(e,function(t){var i=e.charCoords(t.head,"div").top+5;var n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(at(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(at(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return ea(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ia(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ta(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},X)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},X)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;var n=e.coordsChar({left:0,top:i},"div");if(n.ch<e.getLine(n.line).search(/\S/)){return ia(e,t.head)}return n},X)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){var t=[],i=e.listSelections(),n=e.options.tabSize;for(var r=0;r<i.length;r++){var o=i[r].from();var l=z(e.getLine(o.line),o.ch,n);t.push(J(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){if(e.somethingSelected()){e.indentSelection("add")}else{e.execCommand("insertTab")}},transposeChars:function(e){return Dr(e,function(){var t=e.listSelections(),i=[];for(var n=0;n<t.length;n++){if(!t[n].empty()){continue}var r=t[n].head,o=Ze(e.doc,r.line).text;if(o){if(r.ch==o.length){r=new at(r.line,r.ch-1)}if(r.ch>0){r=new at(r.line,r.ch+1);e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),at(r.line,r.ch-2),r,"+transpose")}else if(r.line>e.doc.first){var l=Ze(e.doc,r.line-1).text;if(l){r=new at(r.line,1);e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),at(r.line-1,l.length-1),r,"+transpose")}}}i.push(new ao(r,r))}e.setSelections(i)})},newlineAndIndent:function(e){return Dr(e,function(){var t=e.listSelections();for(var i=t.length-1;i>=0;i--){e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input")}t=e.listSelections();for(var n=0;n<t.length;n++){e.indentLine(t[n].from().line,null,true)}fr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ea(e,t){var i=Ze(e.doc,t);var n=ei(i);if(n!=i){t=nt(n)}return Jl(true,e,n,t,1)}function ta(e,t){var i=Ze(e.doc,t);var n=ti(i);if(n!=i){t=nt(n)}return Jl(true,e,i,t,-1)}function ia(e,t){var i=ea(e,t.line);var n=Ze(e.doc,i.line);var r=me(n,e.doc.direction);if(!r||r[0].level==0){var o=Math.max(i.ch,n.text.search(/\S/));var l=t.line==i.line&&t.ch<=o&&t.ch;return at(i.line,l?0:o,i.sticky)}return i}function na(e,t,i){if(typeof t=="string"){t=Zl[t];if(!t){return false}}e.display.input.ensurePolled();var n=e.display.shift,r=false;try{if(e.isReadOnly()){e.state.suppressEdits=true}if(i){e.display.shift=false}r=t(e)!=V}finally{e.display.shift=n;e.state.suppressEdits=false}return r}function ra(e,t,i){for(var n=0;n<e.state.keyMaps.length;n++){var r=Ul(t,e.state.keyMaps[n],i,e);if(r){return r}}return e.options.extraKeys&&Ul(t,e.options.extraKeys,i,e)||Ul(t,e.options.keyMap,i,e)}var oa=new q;function la(e,t,i,n){var r=e.state.keySeq;if(r){if(Gl(t)){return"handled"}if(/\'$/.test(t)){e.state.keySeq=null}else{oa.set(50,function(){if(e.state.keySeq==r){e.state.keySeq=null;e.display.input.reset()}})}if(aa(e,r+" "+t,i,n)){return true}}return aa(e,t,i,n)}function aa(e,t,i,n){var r=ra(e,t,n);if(r=="multi"){e.state.keySeq=t}if(r=="handled"){Ni(e,"keyHandled",e,t,i)}if(r=="handled"||r=="multi"){Le(i);Yn(e)}return!!r}function sa(e,t){var i=Kl(t,true);if(!i){return false}if(t.shiftKey&&!e.state.keySeq){return la(e,"Shift-"+i,t,function(t){return na(e,t,true)})||la(e,i,t,function(t){if(typeof t=="string"?/^go[A-Z]/.test(t):t.motion){return na(e,t)}})}else{return la(e,i,t,function(t){return na(e,t)})}}function fa(e,t,i){return la(e,"'"+i+"'",t,function(t){return na(e,t,true)})}var ca=null;function ua(e){var t=this;if(e.target&&e.target!=t.display.input.getField()){return}t.curOp.focus=D(I(t));if(we(t,e)){return}if(l&&a<11&&e.keyCode==27){e.returnValue=false}var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=sa(t,e);if(h){ca=r?n:null;if(!r&&n==88&&!Re&&(x?e.metaKey:e.ctrlKey)){t.replaceSelection("",null,"cut")}}if(i&&!x&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand){document.execCommand("cut")}if(n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)){ha(t)}}function ha(e){var t=e.display.lineDiv;H(t,"CodeMirror-crosshair");function i(e){if(e.keyCode==18||!e.altKey){M(t,"CodeMirror-crosshair");xe(document,"keyup",i);xe(document,"mouseover",i)}}ve(document,"keyup",i);ve(document,"mouseover",i)}function da(e){if(e.keyCode==16){this.doc.sel.shift=false}we(this,e)}function pa(e){var t=this;if(e.target&&e.target!=t.display.input.getField()){return}if(Vi(t.display,e)||we(t,e)||e.ctrlKey&&!e.altKey||x&&e.metaKey){return}var i=e.keyCode,n=e.charCode;if(h&&i==ca){ca=null;Le(e);return}if(h&&(!e.which||e.which<10)&&sa(t,e)){return}var r=String.fromCharCode(n==null?i:n);if(r=="\b"){return}if(fa(t,e,r)){return}t.display.input.onKeyPress(e)}var ma=400;var ga=function(e,t,i){this.time=e;this.pos=t;this.button=i};ga.prototype.compare=function(e,t,i){return this.time+ma>e&&st(t,this.pos)==0&&i==this.button};var va,ya;function xa(e,t){var i=+new Date;if(ya&&ya.compare(i,e,t)){va=ya=null;return"triple"}else if(va&&va.compare(i,e,t)){ya=new ga(i,e,t);va=null;return"double"}else{va=new ga(i,e,t);ya=null;return"single"}}function ba(e){var t=this,i=t.display;if(we(t,e)||i.activeTouch&&i.input.supportsTouch()){return}i.input.ensurePolled();i.shift=e.shiftKey;if(Vi(i,e)){if(!s){i.scroller.draggable=false;setTimeout(function(){return i.scroller.draggable=true},100)}return}if(Aa(t,e)){return}var n=In(t,e),r=Ne(e),o=n?xa(n,r):"single";R(t).focus();if(r==1&&t.state.selectingText){t.state.selectingText(e)}if(n&&wa(t,r,n,o,e)){return}if(r==1){if(n){Sa(t,n,o,e)}else if(Ae(e)==i.scroller){Le(e)}}else if(r==2){if(n){Ro(t.doc,n)}setTimeout(function(){return i.input.focus()},20)}else if(r==3){if(k){t.display.input.onContextMenu(e)}else{Qn(t)}}}function wa(e,t,i,n,r){var o="Click";if(n=="double"){o="Double"+o}else if(n=="triple"){o="Triple"+o}o=(t==1?"Left":t==2?"Middle":"Right")+o;return la(e,Vl(o,r),r,function(t){if(typeof t=="string"){t=Zl[t]}if(!t){return false}var n=false;try{if(e.isReadOnly()){e.state.suppressEdits=true}n=t(e,i)!=V}finally{e.state.suppressEdits=false}return n})}function Ca(e,t,i){var n=e.getOption("configureMouse");var r=n?n(e,t,i):{};if(r.unit==null){var o=b?i.shiftKey&&i.metaKey:i.altKey;r.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}if(r.extend==null||e.doc.extend){r.extend=e.doc.extend||i.shiftKey}if(r.addNew==null){r.addNew=x?i.metaKey:i.ctrlKey}if(r.moveOnDrag==null){r.moveOnDrag=!(x?i.altKey:i.ctrlKey)}return r}function Sa(e,t,i,n){if(l){setTimeout(B(Jn,e),0)}else{e.curOp.focus=D(I(e))}var r=Ca(e,i,n);var o=e.doc.sel,a;if(e.options.dragDrop&&Pe&&!e.isReadOnly()&&i=="single"&&(a=o.contains(t))>-1&&(st((a=o.ranges[a]).from(),t)<0||t.xRel>0)&&(st(a.to(),t)>0||t.xRel<0)){ka(e,n,t,r)}else{Ma(e,n,t,r)}}function ka(e,t,i,n){var r=e.display,o=false;var f=Hr(e,function(t){if(s){r.scroller.draggable=false}e.state.draggingText=false;if(e.state.delayingBlurEvent){if(e.hasFocus()){e.state.delayingBlurEvent=false}else{Qn(e)}}xe(r.wrapper.ownerDocument,"mouseup",f);xe(r.wrapper.ownerDocument,"mousemove",c);xe(r.scroller,"dragstart",u);xe(r.scroller,"drop",f);if(!o){Le(t);if(!n.addNew){Ro(e.doc,i,null,null,n.extend)}if(s&&!d||l&&a==9){setTimeout(function(){r.wrapper.ownerDocument.body.focus({preventScroll:true});r.input.focus()},20)}else{r.input.focus()}}});var c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10};var u=function(){return o=true};if(s){r.scroller.draggable=true}e.state.draggingText=f;f.copy=!n.moveOnDrag;ve(r.wrapper.ownerDocument,"mouseup",f);ve(r.wrapper.ownerDocument,"mousemove",c);ve(r.scroller,"dragstart",u);ve(r.scroller,"drop",f);e.state.delayingBlurEvent=true;setTimeout(function(){return r.input.focus()},20);if(r.scroller.dragDrop){r.scroller.dragDrop()}}function La(e,t,i){if(i=="char"){return new ao(t,t)}if(i=="word"){return e.findWordAt(t)}if(i=="line"){return new ao(at(t.line,0),pt(e.doc,at(t.line+1,0)))}var n=i(e,t);return new ao(n.from,n.to)}function Ma(e,t,i,n){if(l){Qn(e)}var r=e.display,o=e.doc;Le(t);var a,s,f=o.sel,c=f.ranges;if(n.addNew&&!n.extend){s=o.sel.contains(i);if(s>-1){a=c[s]}else{a=new ao(i,i)}}else{a=o.sel.primary();s=o.sel.primIndex}if(n.unit=="rectangle"){if(!n.addNew){a=new ao(i,i)}i=In(e,t,true,true);s=-1}else{var u=La(e,i,n.unit);if(n.extend){a=Io(a,u.anchor,u.head,n.extend)}else{a=u}}if(!n.addNew){s=0;Go(o,new lo([a],0),$);f=o.sel}else if(s==-1){s=c.length;Go(o,so(e,c.concat([a]),s),{scroll:false,origin:"*mouse"})}else if(c.length>1&&c[s].empty()&&n.unit=="char"&&!n.extend){Go(o,so(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:false,origin:"*mouse"});f=o.sel}else{jo(o,s,a,$)}var h=i;function d(t){if(st(h,t)==0){return}h=t;if(n.unit=="rectangle"){var r=[],l=e.options.tabSize;var c=z(Ze(o,i.line).text,i.ch,l);var u=z(Ze(o,t.line).text,t.ch,l);var d=Math.min(c,u),p=Math.max(c,u);for(var m=Math.min(i.line,t.line),g=Math.min(e.lastLine(),Math.max(i.line,t.line));m<=g;m++){var v=Ze(o,m).text,y=_(v,d,l);if(d==p){r.push(new ao(at(m,y),at(m,y)))}else if(v.length>y){r.push(new ao(at(m,y),at(m,_(v,p,l))))}}if(!r.length){r.push(new ao(i,i))}Go(o,so(e,f.ranges.slice(0,s).concat(r),s),{origin:"*mouse",scroll:false});e.scrollIntoView(t)}else{var x=a;var b=La(e,t,n.unit);var w=x.anchor,C;if(st(b.anchor,w)>0){C=b.head;w=ht(x.from(),b.anchor)}else{C=b.anchor;w=ut(x.to(),b.head)}var S=f.ranges.slice(0);S[s]=Ta(e,new ao(pt(o,w),C));Go(o,so(e,S,s),$)}}var p=r.wrapper.getBoundingClientRect();var m=0;function g(t){var i=++m;var l=In(e,t,true,n.unit=="rectangle");if(!l){return}if(st(l,h)!=0){e.curOp.focus=D(I(e));d(l);var a=nr(r,o);if(l.line>=a.to||l.line<a.from){setTimeout(Hr(e,function(){if(m==i){g(t)}}),150)}}else{var s=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;if(s){setTimeout(Hr(e,function(){if(m!=i){return}r.scroller.scrollTop+=s;g(t)}),50)}}}function v(t){e.state.selectingText=false;m=Infinity;if(t){Le(t);r.input.focus()}xe(r.wrapper.ownerDocument,"mousemove",y);xe(r.wrapper.ownerDocument,"mouseup",x);o.history.lastSelOrigin=null}var y=Hr(e,function(e){if(e.buttons===0||!Ne(e)){v(e)}else{g(e)}});var x=Hr(e,v);e.state.selectingText=x;ve(r.wrapper.ownerDocument,"mousemove",y);ve(r.wrapper.ownerDocument,"mouseup",x)}function Ta(e,t){var i=t.anchor;var n=t.head;var r=Ze(e.doc,i.line);if(st(i,n)==0&&i.sticky==n.sticky){return t}var o=me(r);if(!o){return t}var l=de(o,i.ch,i.sticky),a=o[l];if(a.from!=i.ch&&a.to!=i.ch){return t}var s=l+(a.from==i.ch==(a.level!=1)?0:1);if(s==0||s==o.length){return t}var f;if(n.line!=i.line){f=(n.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0}else{var c=de(o,n.ch,n.sticky);var u=c-l||(n.ch-i.ch)*(a.level==1?-1:1);if(c==s-1||c==s){f=u<0}else{f=u>0}}var h=o[s+(f?-1:0)];var d=f==(h.level==1);var p=d?h.from:h.to,m=d?"after":"before";return i.ch==p&&i.sticky==m?t:new ao(new at(i.line,p,m),n)}function Oa(e,t,i,n){var r,o;if(t.touches){r=t.touches[0].clientX;o=t.touches[0].clientY}else{try{r=t.clientX;o=t.clientY}catch(e){return false}}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right)){return false}if(n){Le(t)}var l=e.display;var a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!Se(e,i)){return Te(t)}o-=a.top-l.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var f=l.gutters.childNodes[s];if(f&&f.getBoundingClientRect().right>=r){var c=rt(e.doc,o);var u=e.display.gutterSpecs[s];be(e,i,e,c,u.className,t);return Te(t)}}}function Aa(e,t){return Oa(e,t,"gutterClick",true)}function Na(e,t){if(Vi(e.display,t)||Pa(e,t)){return}if(we(e,t,"contextmenu")){return}if(!k){e.display.input.onContextMenu(t)}}function Pa(e,t){if(!Se(e,"gutterContextMenu")){return false}return Oa(e,t,"gutterContextMenu",false)}function Fa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-");dn(e)}var Da={toString:function(){return"CodeMirror.Init"}};var Ha={};var Ea={};function Wa(e){var t=e.optionHandlers;function i(i,n,r,o){e.defaults[i]=n;if(r){t[i]=o?function(e,t,i){if(i!=Da){r(e,t,i)}}:r}}e.defineOption=i;e.Init=Da;i("value","",function(e,t){return e.setValue(t)},true);i("mode",null,function(e,t){e.doc.modeOption=t;go(e)},true);i("indentUnit",2,go,true);i("indentWithTabs",false);i("smartIndent",true);i("tabSize",4,function(e){vo(e);dn(e);Bn(e)},true);i("lineSeparator",null,function(e,t){e.doc.lineSep=t;if(!t){return}var i=[],n=e.doc.first;e.doc.iter(function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(o==-1){break}r=o+t.length;i.push(at(n,o))}n++});for(var r=i.length-1;r>=0;r--){ll(e.doc,t,i[r],at(i[r].line,i[r].ch+t.length))}});i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,i){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g");if(i!=Da){e.refresh()}});i("specialCharPlaceholder",vi,function(e){return e.refresh()},true);i("electricChars",true);i("inputStyle",y?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},true);i("spellcheck",false,function(e,t){return e.getInputField().spellcheck=t},true);i("autocorrect",false,function(e,t){return e.getInputField().autocorrect=t},true);i("autocapitalize",false,function(e,t){return e.getInputField().autocapitalize=t},true);i("rtlMoveVisually",!w);i("wholeLineUpdateBefore",true);i("theme","default",function(e){Fa(e);Zr(e)},true);i("keyMap","default",function(e,t,i){var n=$l(t);var r=i!=Da&&$l(i);if(r&&r.detach){r.detach(e,n)}if(n.attach){n.attach(e,r||null)}});i("extraKeys",null);i("configureMouse",null);i("lineWrapping",false,Ra,true);i("gutters",[],function(e,t){e.display.gutterSpecs=Jr(t,e.options.lineNumbers);Zr(e)},true);i("fixedGutter",true,function(e,t){e.display.gutters.style.left=t?Hn(e.display)+"px":"0";e.refresh()},true);i("coverGutterNextToScrollbar",false,function(e){return br(e)},true);i("scrollbarStyle","native",function(e){Sr(e);br(e);e.display.scrollbars.setScrollTop(e.doc.scrollTop);e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},true);i("lineNumbers",false,function(e,t){e.display.gutterSpecs=Jr(e.options.gutters,t);Zr(e)},true);i("firstLineNumber",1,Zr,true);i("lineNumberFormatter",function(e){return e},Zr,true);i("showCursorWhenSelecting",false,Vn,true);i("resetSelectionOnContextMenu",true);i("lineWiseCopyCut",true);i("pasteLinesPerSelection",true);i("selectionsMayTouch",false);i("readOnly",false,function(e,t){if(t=="nocursor"){er(e);e.display.input.blur()}e.display.input.readOnlyChanged(t)});i("screenReaderLabel",null,function(e,t){t=t===""?null:t;e.display.input.screenReaderLabelChanged(t)});i("disableInput",false,function(e,t){if(!t){e.display.input.reset()}},true);i("dragDrop",true,Ia);i("allowDropFileTypes",null);i("cursorBlinkRate",530);i("cursorScrollMargin",0);i("cursorHeight",1,Vn,true);i("singleCursorHeightPerLine",true,Vn,true);i("workTime",100);i("workDelay",100);i("flattenSpans",true,vo,true);i("addModeClass",false,vo,true);i("pollInterval",100);i("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t});i("historyEventDelay",1250);i("viewportMargin",10,function(e){return e.refresh()},true);i("maxHighlightLength",1e4,vo,true);i("moveInputWithCursor",true,function(e,t){if(!t){e.display.input.resetPosition()}});i("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""});i("autofocus",null);i("direction","ltr",function(e,t){return e.doc.setDirection(t)},true);i("phrases",null)}function Ia(e,t,i){var n=i&&i!=Da;if(!t!=!n){var r=e.display.dragFunctions;var o=t?ve:xe;o(e.display.scroller,"dragstart",r.start);o(e.display.scroller,"dragenter",r.enter);o(e.display.scroller,"dragover",r.over);o(e.display.scroller,"dragleave",r.leave);o(e.display.scroller,"drop",r.drop)}}function Ra(e){if(e.options.lineWrapping){H(e.display.wrapper,"CodeMirror-wrap");e.display.sizer.style.minWidth="";e.display.sizerWidth=null}else{M(e.display.wrapper,"CodeMirror-wrap");fi(e)}Wn(e);Bn(e);dn(e);setTimeout(function(){return br(e)},100)}function Ba(e,t){var i=this;if(!(this instanceof Ba)){return new Ba(e,t)}this.options=t=t?j(t):{};j(Ha,t,false);var n=t.value;if(typeof n=="string"){n=new Ll(n,t.mode,null,t.lineSeparator,t.direction)}else if(t.mode){n.modeOption=t.mode}this.doc=n;var r=new Ba.inputStyles[t.inputStyle](this);var o=this.display=new eo(e,n,r,t);o.wrapper.CodeMirror=this;Fa(this);if(t.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}Sr(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,delayingBlurEvent:false,focused:false,suppressEdits:false,pasteIncoming:-1,cutIncoming:-1,selectingText:false,draggingText:false,highlight:new q,keySeq:null,specialChars:null};if(t.autofocus&&!y){o.input.focus()}if(l&&a<11){setTimeout(function(){return i.display.input.reset(true)},20)}ja(this);Dl();Lr(this);this.curOp.forceUpdate=true;wo(this,n);if(t.autofocus&&!y||this.hasFocus()){setTimeout(function(){if(i.hasFocus()&&!i.state.focused){Zn(i)}},20)}else{er(this)}for(var f in Ea){if(Ea.hasOwnProperty(f)){Ea[f](this,t[f],Da)}}Yr(this);if(t.finishInit){t.finishInit(this)}for(var c=0;c<za.length;++c){za[c](this)}Mr(this);if(s&&t.lineWrapping&&getComputedStyle(o.lineDiv).textRendering=="optimizelegibility"){o.lineDiv.style.textRendering="auto"}}Ba.defaults=Ha;Ba.optionHandlers=Ea;function ja(e){var t=e.display;ve(t.scroller,"mousedown",Hr(e,ba));if(l&&a<11){ve(t.scroller,"dblclick",Hr(e,function(t){if(we(e,t)){return}var i=In(e,t);if(!i||Aa(e,t)||Vi(e.display,t)){return}Le(t);var n=e.findWordAt(i);Ro(e.doc,n.anchor,n.head)}))}else{ve(t.scroller,"dblclick",function(t){return we(e,t)||Le(t)})}ve(t.scroller,"contextmenu",function(t){return Na(e,t)});ve(t.input.getField(),"contextmenu",function(i){if(!t.scroller.contains(i.target)){Na(e,i)}});var i,n={end:0};function r(){if(t.activeTouch){i=setTimeout(function(){return t.activeTouch=null},1e3);n=t.activeTouch;n.end=+new Date}}function o(e){if(e.touches.length!=1){return false}var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(t.left==null){return true}var i=t.left-e.left,n=t.top-e.top;return i*i+n*n>20*20}ve(t.scroller,"touchstart",function(r){if(!we(e,r)&&!o(r)&&!Aa(e,r)){t.input.ensurePolled();clearTimeout(i);var l=+new Date;t.activeTouch={start:l,moved:false,prev:l-n.end<=300?n:null};if(r.touches.length==1){t.activeTouch.left=r.touches[0].pageX;t.activeTouch.top=r.touches[0].pageY}}});ve(t.scroller,"touchmove",function(){if(t.activeTouch){t.activeTouch.moved=true}});ve(t.scroller,"touchend",function(i){var n=t.activeTouch;if(n&&!Vi(t,i)&&n.left!=null&&!n.moved&&new Date-n.start<300){var o=e.coordsChar(t.activeTouch,"page"),l;if(!n.prev||s(n,n.prev)){l=new ao(o,o)}else if(!n.prev.prev||s(n,n.prev.prev)){l=e.findWordAt(o)}else{l=new ao(at(o.line,0),pt(e.doc,at(o.line+1,0)))}e.setSelection(l.anchor,l.head);e.focus();Le(i)}r()});ve(t.scroller,"touchcancel",r);ve(t.scroller,"scroll",function(){if(t.scroller.clientHeight){pr(e,t.scroller.scrollTop);gr(e,t.scroller.scrollLeft,true);be(e,"scroll",e)}});ve(t.scroller,"mousewheel",function(t){return oo(e,t)});ve(t.scroller,"DOMMouseScroll",function(t){return oo(e,t)});ve(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0});t.dragFunctions={enter:function(t){if(!we(e,t)){Oe(t)}},over:function(t){if(!we(e,t)){Al(e,t);Oe(t)}},start:function(t){return Ol(e,t)},drop:Hr(e,Tl),leave:function(t){if(!we(e,t)){Nl(e)}}};var f=t.input.getField();ve(f,"keyup",function(t){return da.call(e,t)});ve(f,"keydown",Hr(e,ua));ve(f,"keypress",Hr(e,pa));ve(f,"focus",function(t){return Zn(e,t)});ve(f,"blur",function(t){return er(e,t)})}var za=[];Ba.defineInitHook=function(e){return za.push(e)};function qa(e,t,i,n){var r=e.doc,o;if(i==null){i="add"}if(i=="smart"){if(!r.mode.indent){i="prev"}else{o=wt(e,t).state}}var l=e.options.tabSize;var a=Ze(r,t),s=z(a.text,null,l);if(a.stateAfter){a.stateAfter=null}var f=a.text.match(/^\s*/)[0],c;if(!n&&!/\S/.test(a.text)){c=0;i="not"}else if(i=="smart"){c=r.mode.indent(o,a.text.slice(f.length),a.text);if(c==V||c>150){if(!n){return}i="prev"}}if(i=="prev"){if(t>r.first){c=z(Ze(r,t-1).text,null,l)}else{c=0}}else if(i=="add"){c=s+e.options.indentUnit}else if(i=="subtract"){c=s-e.options.indentUnit}else if(typeof i=="number"){c=s+i}c=Math.max(0,c);var u="",h=0;if(e.options.indentWithTabs){for(var d=Math.floor(c/l);d;--d){h+=l;u+="\t"}}if(h<c){u+=J(c-h)}if(u!=f){ll(r,u,at(t,0),at(t,f.length),"+input");a.stateAfter=null;return true}else{for(var p=0;p<r.sel.ranges.length;p++){var m=r.sel.ranges[p];if(m.head.line==t&&m.head.ch<f.length){var g=at(t,f.length);jo(r,p,new ao(g,g));break}}}}var Ua=null;function Ga(e){Ua=e}function Va(e,t,i,n,r){var o=e.doc;e.display.shift=false;if(!n){n=o.sel}var l=+new Date-200;var a=r=="paste"||e.state.pasteIncoming>l;var s=We(t),f=null;if(a&&n.ranges.length>1){if(Ua&&Ua.text.join("\n")==t){if(n.ranges.length%Ua.text.length==0){f=[];for(var c=0;c<Ua.text.length;c++){f.push(o.splitLines(Ua.text[c]))}}}else if(s.length==n.ranges.length&&e.options.pasteLinesPerSelection){f=Z(s,function(e){return[e]})}}var u=e.curOp.updateInput;for(var h=n.ranges.length-1;h>=0;h--){var d=n.ranges[h];var p=d.from(),m=d.to();if(d.empty()){if(i&&i>0){p=at(p.line,p.ch-i)}else if(e.state.overwrite&&!a){m=at(m.line,Math.min(Ze(o,m.line).text.length,m.ch+Q(s).length))}else if(a&&Ua&&Ua.lineWise&&Ua.text.join("\n")==s.join("\n")){p=m=at(p.line,0)}}var g={from:p,to:m,text:f?f[h%f.length]:s,origin:r||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};el(e.doc,g);Ni(e,"inputRead",e,g)}if(t&&!a){$a(e,t)}fr(e);if(e.curOp.updateInput<2){e.curOp.updateInput=u}e.curOp.typing=true;e.state.pasteIncoming=e.state.cutIncoming=-1}function Ka(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i){e.preventDefault();if(!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()){Dr(t,function(){return Va(t,i,0,null,"paste")})}return true}}function $a(e,t){if(!e.options.electricChars||!e.options.smartIndent){return}var i=e.doc.sel;for(var n=i.ranges.length-1;n>=0;n--){var r=i.ranges[n];if(r.head.ch>100||n&&i.ranges[n-1].head.line==r.head.line){continue}var o=e.getModeAt(r.head);var l=false;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++){if(t.indexOf(o.electricChars.charAt(a))>-1){l=qa(e,r.head.line,"smart");break}}}else if(o.electricInput){if(o.electricInput.test(Ze(e.doc,r.head.line).text.slice(0,r.head.ch))){l=qa(e,r.head.line,"smart")}}if(l){Ni(e,"electricInput",e,r.head.line)}}}function Xa(e){var t=[],i=[];for(var n=0;n<e.doc.sel.ranges.length;n++){var r=e.doc.sel.ranges[n].head.line;var o={anchor:at(r,0),head:at(r+1,0)};i.push(o);t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:i}}function _a(e,t,i,n){e.setAttribute("autocorrect",i?"on":"off");e.setAttribute("autocapitalize",n?"on":"off");e.setAttribute("spellcheck",!!t)}function Ya(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none");var t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");if(s){e.style.width="1000px"}else{e.setAttribute("wrap","off")}if(g){e.style.border="1px solid black"}return t}function Ja(e){var t=e.optionHandlers;var i=e.helpers={};e.prototype={constructor:e,focus:function(){R(this).focus();this.display.input.focus()},setOption:function(e,i){var n=this.options,r=n[e];if(n[e]==i&&e!="mode"){return}n[e]=i;if(t.hasOwnProperty(e)){Hr(this,t[e])(this,i,r)}be(this,"optionChange",this,e)},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($l(e))},removeKeyMap:function(e){var t=this.state.keyMaps;for(var i=0;i<t.length;++i){if(t[i]==e||t[i].name==e){t.splice(i,1);return true}}},addOverlay:Er(function(t,i){var n=t.token?t:e.getMode(this.options,t);if(n.startState){throw new Error("Overlays may not be stateful.")}ee(this.state.overlays,{mode:n,modeSpec:t,opaque:i&&i.opaque,priority:i&&i.priority||0},function(e){return e.priority});this.state.modeGen++;Bn(this)}),removeOverlay:Er(function(e){var t=this.state.overlays;for(var i=0;i<t.length;++i){var n=t[i].modeSpec;if(n==e||typeof e=="string"&&n.name==e){t.splice(i,1);this.state.modeGen++;Bn(this);return}}}),indentLine:Er(function(e,t,i){if(typeof t!="string"&&typeof t!="number"){if(t==null){t=this.options.smartIndent?"smart":"prev"}else{t=t?"add":"subtract"}}if(ot(this.doc,e)){qa(this,e,t,i)}}),indentSelection:Er(function(e){var t=this.doc.sel.ranges,i=-1;for(var n=0;n<t.length;n++){var r=t[n];if(!r.empty()){var o=r.from(),l=r.to();var a=Math.max(i,o.line);i=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s<i;++s){qa(this,s,e)}var f=this.doc.sel.ranges;if(o.ch==0&&t.length==f.length&&f[n].from().ch>0){jo(this.doc,n,new ao(o,f[n].to()),K)}}else if(r.head.line>i){qa(this,r.head.line,e,true);i=r.head.line;if(n==this.doc.sel.primIndex){fr(this)}}}}),getTokenAt:function(e,t){return Mt(this,e,t)},getLineTokens:function(e,t){return Mt(this,at(e),t,true)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t=bt(this,Ze(this.doc,e.line));var i=0,n=(t.length-1)/2,r=e.ch;var o;if(r==0){o=t[2]}else{for(;;){var l=i+n>>1;if((l?t[l*2-1]:0)>=r){n=l}else if(t[l*2+1]<r){i=l+1}else{o=t[l*2+2];break}}}var a=o?o.indexOf("overlay "):-1;return a<0?o:a==0?null:o.slice(0,a-1)},getModeAt:function(t){var i=this.doc.mode;if(!i.innerMode){return i}return e.innerMode(i,this.getTokenAt(t).state).mode},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!i.hasOwnProperty(t)){return n}var r=i[t],o=this.getModeAt(e);if(typeof o[t]=="string"){if(r[o[t]]){n.push(r[o[t]])}}else if(o[t]){for(var l=0;l<o[t].length;l++){var a=r[o[t][l]];if(a){n.push(a)}}}else if(o.helperType&&r[o.helperType]){n.push(r[o.helperType])}else if(r[o.name]){n.push(r[o.name])}for(var s=0;s<r._global.length;s++){var f=r._global[s];if(f.pred(o,this)&&U(n,f.val)==-1){n.push(f.val)}}return n},getStateAfter:function(e,t){var i=this.doc;e=dt(i,e==null?i.first+i.size-1:e);return wt(this,e+1,t).state},cursorCoords:function(e,t){var i,n=this.doc.sel.primary();if(e==null){i=n.head}else if(typeof e=="object"){i=pt(this.doc,e)}else{i=e?n.from():n.to()}return bn(this,i,t||"page")},charCoords:function(e,t){return xn(this,pt(this.doc,e),t||"page")},coordsChar:function(e,t){e=yn(this,e,t||"page");return Sn(this,e.left,e.top)},lineAtHeight:function(e,t){e=yn(this,{top:e,left:0},t||"page").top;return rt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,i){var n=false,r;if(typeof e=="number"){var o=this.doc.first+this.doc.size-1;if(e<this.doc.first){e=this.doc.first}else if(e>o){e=o;n=true}r=Ze(this.doc,e)}else{r=e}return vn(this,r,{top:0,left:0},t||"page",i||n).top+(n?this.doc.height-ai(r):0)},defaultTextHeight:function(){return Pn(this.display)},defaultCharWidth:function(){return Fn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,i,n,r){var o=this.display;e=bn(this,pt(this.doc,e));var l=e.bottom,a=e.left;t.style.position="absolute";t.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(t);o.sizer.appendChild(t);if(n=="over"){l=e.top}else if(n=="above"||n=="near"){var s=Math.max(o.wrapper.clientHeight,this.doc.height),f=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);if((n=="above"||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight){l=e.top-t.offsetHeight}else if(e.bottom+t.offsetHeight<=s){l=e.bottom}if(a+t.offsetWidth>f){a=f-t.offsetWidth}}t.style.top=l+"px";t.style.left=t.style.right="";if(r=="right"){a=o.sizer.clientWidth-t.offsetWidth;t.style.right="0px"}else{if(r=="left"){a=0}else if(r=="middle"){a=(o.sizer.clientWidth-t.offsetWidth)/2}t.style.left=a+"px"}if(i){lr(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})}},triggerOnKeyDown:Er(ua),triggerOnKeyPress:Er(pa),triggerOnKeyUp:da,triggerOnMouseDown:Er(ba),execCommand:function(e){if(Zl.hasOwnProperty(e)){return Zl[e].call(null,this)}},triggerElectric:Er(function(e){$a(this,e)}),findPosH:function(e,t,i,n){var r=1;if(t<0){r=-1;t=-t}var o=pt(this.doc,e);for(var l=0;l<t;++l){o=Qa(this.doc,o,r,i,n);if(o.hitSide){break}}return o},moveH:Er(function(e,t){var i=this;this.extendSelectionsBy(function(n){if(i.display.shift||i.doc.extend||n.empty()){return Qa(i.doc,n.head,e,t,i.options.rtlMoveVisually)}else{return e<0?n.from():n.to()}},X)}),deleteH:Er(function(e,t){var i=this.doc.sel,n=this.doc;if(i.somethingSelected()){n.replaceSelection("",null,"+delete")}else{Xl(this,function(i){var r=Qa(n,i.head,e,t,false);return e<0?{from:r,to:i.head}:{from:i.head,to:r}})}}),findPosV:function(e,t,i,n){var r=1,o=n;if(t<0){r=-1;t=-t}var l=pt(this.doc,e);for(var a=0;a<t;++a){var s=bn(this,l,"div");if(o==null){o=s.left}else{s.left=o}l=Za(this,s,r,i);if(l.hitSide){break}}return l},moveV:Er(function(e,t){var i=this;var n=this.doc,r=[];var o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();n.extendSelectionsBy(function(l){if(o){return e<0?l.from():l.to()}var a=bn(i,l.head,"div");if(l.goalColumn!=null){a.left=l.goalColumn}r.push(a.left);var s=Za(i,a,e,t);if(t=="page"&&l==n.sel.primary()){sr(i,xn(i,s,"div").top-a.top)}return s},X);if(r.length){for(var l=0;l<n.sel.ranges.length;l++){n.sel.ranges[l].goalColumn=r[l]}}}),findWordAt:function(e){var t=this.doc,i=Ze(t,e.line).text;var n=e.ch,r=e.ch;if(i){var o=this.getHelper(e,"wordChars");if((e.sticky=="before"||r==i.length)&&n){--n}else{++r}var l=i.charAt(n);var a=oe(l,o)?function(e){return oe(e,o)}:/\s/.test(l)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!oe(e)};while(n>0&&a(i.charAt(n-1))){--n}while(r<i.length&&a(i.charAt(r))){++r}}return new ao(at(e.line,n),at(e.line,r))},toggleOverwrite:function(e){if(e!=null&&e==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){H(this.display.cursorDiv,"CodeMirror-overwrite")}else{M(this.display.cursorDiv,"CodeMirror-overwrite")}be(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==D(I(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Er(function(e,t){cr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-_i(this)-this.display.barHeight,width:e.scrollWidth-_i(this)-this.display.barWidth,clientHeight:Ji(this),clientWidth:Yi(this)}},scrollIntoView:Er(function(e,t){if(e==null){e={from:this.doc.sel.primary().head,to:null};if(t==null){t=this.options.cursorScrollMargin}}else if(typeof e=="number"){e={from:at(e,0),to:null}}else if(e.from==null){e={from:e,to:null}}if(!e.to){e.to=e.from}e.margin=t||0;if(e.from.line!=null){ur(this,e)}else{dr(this,e.from,e.to,e.margin)}}),setSize:Er(function(e,t){var i=this;var n=function(e){return typeof e=="number"||/^\d+$/.test(String(e))?e+"px":e};if(e!=null){this.display.wrapper.style.width=n(e)}if(t!=null){this.display.wrapper.style.height=n(t)}if(this.options.lineWrapping){hn(this)}var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(e){if(e.widgets){for(var t=0;t<e.widgets.length;t++){if(e.widgets[t].noHScroll){jn(i,r,"widget");break}}}++r});this.curOp.forceUpdate=true;be(this,"refresh",this)}),operation:function(e){return Dr(this,e)},startOperation:function(){return Lr(this)},endOperation:function(){return Mr(this)},refresh:Er(function(){var e=this.display.cachedTextHeight;Bn(this);this.curOp.forceUpdate=true;dn(this);cr(this,this.doc.scrollLeft,this.doc.scrollTop);$r(this.display);if(e==null||Math.abs(e-Pn(this.display))>.5||this.options.lineWrapping){Wn(this)}be(this,"refresh",this)}),swapDoc:Er(function(e){var t=this.doc;t.cm=null;if(this.state.selectingText){this.state.selectingText()}wo(this,e);dn(this);this.display.input.reset();cr(this,e.scrollLeft,e.scrollTop);this.curOp.forceScroll=true;Ni(this,"swapDoc",this,t);return t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};ke(e);e.registerHelper=function(t,n,r){if(!i.hasOwnProperty(t)){i[t]=e[t]={_global:[]}}i[t][n]=r};e.registerGlobalHelper=function(t,n,r,o){e.registerHelper(t,n,o);i[t]._global.push({pred:r,val:o})}}function Qa(e,t,i,n,r){var o=t;var l=i;var a=Ze(e,t.line);var s=r&&e.direction=="rtl"?-i:i;function f(){var i=t.line+s;if(i<e.first||i>=e.first+e.size){return false}t=new at(i,t.ch,t.sticky);return a=Ze(e,i)}function c(o){var l;if(n=="codepoint"){var c=a.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(c)){l=null}else{var u=i>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new at(t.line,Math.max(0,Math.min(a.text.length,t.ch+i*(u?2:1))),-i)}}else if(r){l=Ql(e.cm,a,t,i)}else{l=Yl(a,t,i)}if(l==null){if(!o&&f()){t=Jl(r,e.cm,a,t.line,s)}else{return false}}else{t=l}return true}if(n=="char"||n=="codepoint"){c()}else if(n=="column"){c(true)}else if(n=="word"||n=="group"){var u=null,h=n=="group";var d=e.cm&&e.cm.getHelper(t,"wordChars");for(var p=true;;p=false){if(i<0&&!c(!p)){break}var m=a.text.charAt(t.ch)||"\n";var g=oe(m,d)?"w":h&&m=="\n"?"n":!h||/\s/.test(m)?null:"p";if(h&&!p&&!g){g="s"}if(u&&u!=g){if(i<0){i=1;c();t.sticky="after"}break}if(g){u=g}if(i>0&&!c(!p)){break}}}var v=Yo(e,t,o,l,true);if(ft(o,v)){v.hitSide=true}return v}function Za(e,t,i,n){var r=e.doc,o=t.left,l;if(n=="page"){var a=Math.min(e.display.wrapper.clientHeight,R(e).innerHeight||r(e).documentElement.clientHeight);var s=Math.max(a-.5*Pn(e.display),3);l=(i>0?t.bottom:t.top)+i*s}else if(n=="line"){l=i>0?t.bottom+3:t.top-3}var f;for(;;){f=Sn(e,o,l);if(!f.outside){break}if(i<0?l<=0:l>=r.height){f.hitSide=true;break}l+=i*5}return f}var es=function(e){this.cm=e;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new q;this.composing=null;this.gracePeriod=false;this.readDOMTimeout=null};es.prototype.init=function(e){var t=this;var i=this,n=i.cm;var r=i.div=e.lineDiv;r.contentEditable=true;_a(r,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function o(e){for(var t=e.target;t;t=t.parentNode){if(t==r){return true}if(/\bCodeMirror-(?:line)?widget\b/.test(t.className)){break}}return false}ve(r,"paste",function(e){if(!o(e)||we(n,e)||Ka(e,n)){return}if(a<=11){setTimeout(Hr(n,function(){return t.updateFromDOM()}),20)}});ve(r,"compositionstart",function(e){t.composing={data:e.data,done:false}});ve(r,"compositionupdate",function(e){if(!t.composing){t.composing={data:e.data,done:false}}});ve(r,"compositionend",function(e){if(t.composing){if(e.data!=t.composing.data){t.readFromDOMSoon()}t.composing.done=true}});ve(r,"touchstart",function(){return i.forceCompositionEnd()});ve(r,"input",function(){if(!t.composing){t.readFromDOMSoon()}});function l(e){if(!o(e)||we(n,e)){return}if(n.somethingSelected()){Ga({lineWise:false,text:n.getSelections()});if(e.type=="cut"){n.replaceSelection("",null,"cut")}}else if(!n.options.lineWiseCopyCut){return}else{var t=Xa(n);Ga({lineWise:true,text:t.text});if(e.type=="cut"){n.operation(function(){n.setSelections(t.ranges,0,K);n.replaceSelection("",null,"cut")})}}if(e.clipboardData){e.clipboardData.clearData();var l=Ua.text.join("\n");e.clipboardData.setData("Text",l);if(e.clipboardData.getData("Text")==l){e.preventDefault();return}}var a=Ya(),s=a.firstChild;_a(s);n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild);s.value=Ua.text.join("\n");var f=D(r.ownerDocument);W(s);setTimeout(function(){n.display.lineSpace.removeChild(a);f.focus();if(f==r){i.showPrimarySelection()}},50)}ve(r,"copy",l);ve(r,"cut",l)};es.prototype.screenReaderLabelChanged=function(e){if(e){this.div.setAttribute("aria-label",e)}else{this.div.removeAttribute("aria-label")}};es.prototype.prepareSelection=function(){var e=Kn(this.cm,false);e.focus=D(this.div.ownerDocument)==this.div;return e};es.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length){return}if(e.focus||t){this.showPrimarySelection()}this.showMultipleSelections(e)};es.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()};es.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary();var r=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line<t.display.viewFrom){e.removeAllRanges();return}var l=os(t,e.anchorNode,e.anchorOffset);var a=os(t,e.focusNode,e.focusOffset);if(l&&!l.bad&&a&&!a.bad&&st(ht(l,a),r)==0&&st(ut(l,a),o)==0){return}var s=t.display.view;var f=r.line>=t.display.viewFrom&&ts(t,r)||{node:s[0].measure.map[2],offset:0};var c=o.line<t.display.viewTo&&ts(t,o);if(!c){var u=s[s.length-1].measure;var h=u.maps?u.maps[u.maps.length-1]:u.map;c={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(!f||!c){e.removeAllRanges();return}var d=e.rangeCount&&e.getRangeAt(0),p;try{p=P(f.node,f.offset,c.offset,c.node)}catch(e){}if(p){if(!i&&t.state.focused){e.collapse(f.node,f.offset);if(!p.collapsed){e.removeAllRanges();e.addRange(p)}}else{e.removeAllRanges();e.addRange(p)}if(d&&e.anchorNode==null){e.addRange(d)}else if(i){this.startGracePeriod()}}this.rememberSelection()};es.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){e.gracePeriod=false;if(e.selectionChanged()){e.cm.operation(function(){return e.cm.curOp.selectionChanged=true})}},20)};es.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors);O(this.cm.display.selectionDiv,e.selection)};es.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode;this.lastAnchorOffset=e.anchorOffset;this.lastFocusNode=e.focusNode;this.lastFocusOffset=e.focusOffset};es.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount){return false}var t=e.getRangeAt(0).commonAncestorContainer;return F(this.div,t)};es.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"){if(!this.selectionInEditor()||D(this.div.ownerDocument)!=this.div){this.showSelection(this.prepareSelection(),true)}this.div.focus()}};es.prototype.blur=function(){this.div.blur()};es.prototype.getField=function(){return this.div};es.prototype.supportsTouch=function(){return true};es.prototype.receivedFocus=function(){var e=this;var t=this;if(this.selectionInEditor()){setTimeout(function(){return e.pollSelection()},20)}else{Dr(this.cm,function(){return t.cm.curOp.selectionChanged=true})}function i(){if(t.cm.state.focused){t.pollSelection();t.polling.set(t.cm.options.pollInterval,i)}}this.polling.set(this.cm.options.pollInterval,i)};es.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset};es.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged()){return}var e=this.getSelection(),t=this.cm;if(v&&c&&this.cm.display.gutterSpecs.length&&is(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs});this.blur();this.focus();return}if(this.composing){return}this.rememberSelection();var i=os(t,e.anchorNode,e.anchorOffset);var n=os(t,e.focusNode,e.focusOffset);if(i&&n){Dr(t,function(){Go(t.doc,fo(i,n),K);if(i.bad||n.bad){t.curOp.selectionChanged=true}})}};es.prototype.pollContent=function(){if(this.readDOMTimeout!=null){clearTimeout(this.readDOMTimeout);this.readDOMTimeout=null}var e=this.cm,t=e.display,i=e.doc.sel.primary();var n=i.from(),r=i.to();if(n.ch==0&&n.line>e.firstLine()){n=at(n.line-1,Ze(e.doc,n.line-1).length)}if(r.ch==Ze(e.doc,r.line).text.length&&r.line<e.lastLine()){r=at(r.line+1,0)}if(n.line<t.viewFrom||r.line>t.viewTo-1){return false}var o,l,a;if(n.line==t.viewFrom||(o=Rn(e,n.line))==0){l=nt(t.view[0].line);a=t.view[0].node}else{l=nt(t.view[o].line);a=t.view[o-1].node.nextSibling}var s=Rn(e,r.line);var f,c;if(s==t.view.length-1){f=t.viewTo-1;c=t.lineDiv.lastChild}else{f=nt(t.view[s+1].line)-1;c=t.view[s+1].node.previousSibling}if(!a){return false}var u=e.doc.splitLines(rs(e,a,c,l,f));var h=et(e.doc,at(l,0),at(f,Ze(e.doc,f).text.length));while(u.length>1&&h.length>1){if(Q(u)==Q(h)){u.pop();h.pop();f--}else if(u[0]==h[0]){u.shift();h.shift();l++}else{break}}var d=0,p=0;var m=u[0],g=h[0],v=Math.min(m.length,g.length);while(d<v&&m.charCodeAt(d)==g.charCodeAt(d)){++d}var y=Q(u),x=Q(h);var b=Math.min(y.length-(u.length==1?d:0),x.length-(h.length==1?d:0));while(p<b&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1)){++p}if(u.length==1&&h.length==1&&l==n.line){while(d&&d>n.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1)){d--;p++}}u[u.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,"");u[0]=u[0].slice(d).replace(/\u200b+$/,"");var w=at(l,d);var C=at(f,h.length?Q(h).length-p:0);if(u.length>1||u[0]||st(w,C)){ll(e.doc,u,w,C,"+input");return true}};es.prototype.ensurePolled=function(){this.forceCompositionEnd()};es.prototype.reset=function(){this.forceCompositionEnd()};es.prototype.forceCompositionEnd=function(){if(!this.composing){return}clearTimeout(this.readDOMTimeout);this.composing=null;this.updateFromDOM();this.div.blur();this.div.focus()};es.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null){return}this.readDOMTimeout=setTimeout(function(){e.readDOMTimeout=null;if(e.composing){if(e.composing.done){e.composing=null}else{return}}e.updateFromDOM()},80)};es.prototype.updateFromDOM=function(){var e=this;if(this.cm.isReadOnly()||!this.pollContent()){Dr(this.cm,function(){return Bn(e.cm)})}};es.prototype.setUneditable=function(e){e.contentEditable="false"};es.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing){return}e.preventDefault();if(!this.cm.isReadOnly()){Hr(this.cm,Va)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)}};es.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")};es.prototype.onContextMenu=function(){};es.prototype.resetPosition=function(){};es.prototype.needsContentAttribute=true;function ts(e,t){var i=nn(e,t.line);if(!i||i.hidden){return null}var n=Ze(e.doc,t.line);var r=Zi(i,n,t.line);var o=me(n,e.doc.direction),l="left";if(o){var a=de(o,t.ch);l=a%2?"right":"left"}var s=an(r.map,t.ch,l);s.offset=s.collapse=="right"?s.end:s.start;return s}function is(e){for(var t=e;t;t=t.parentNode){if(/CodeMirror-gutter-wrapper/.test(t.className)){return true}}return false}function ns(e,t){if(t){e.bad=true}return e}function rs(e,t,i,n,r){var o="",l=false,a=e.doc.lineSeparator(),s=false;function f(e){return function(t){return t.id==e}}function c(){if(l){o+=a;if(s){o+=a}l=s=false}}function u(e){if(e){c();o+=e}}function h(t){if(t.nodeType==1){var i=t.getAttribute("cm-text");if(i){u(i);return}var o=t.getAttribute("cm-marker"),d;if(o){var p=e.findMarks(at(n,0),at(r+1,0),f(+o));if(p.length&&(d=p[0].find(0))){u(et(e.doc,d.from,d.to).join(a))}return}if(t.getAttribute("contenteditable")=="false"){return}var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&t.textContent.length==0){return}if(m){c()}for(var g=0;g<t.childNodes.length;g++){h(t.childNodes[g])}if(/^(pre|p)$/i.test(t.nodeName)){s=true}if(m){l=true}}else if(t.nodeType==3){u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}}for(;;){h(t);if(t==i){break}t=t.nextSibling;s=false}return o}function os(e,t,i){var n;if(t==e.display.lineDiv){n=e.display.lineDiv.childNodes[i];if(!n){return ns(e.clipPos(at(e.display.viewTo-1)),true)}t=null;i=0}else{for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv){return null}if(n.parentNode&&n.parentNode==e.display.lineDiv){break}}}for(var r=0;r<e.display.view.length;r++){var o=e.display.view[r];if(o.node==n){return ls(o,t,i)}}}function ls(e,t,i){var n=e.text.firstChild,r=false;if(!t||!F(n,t)){return ns(at(nt(e.line),0),true)}if(t==n){r=true;t=n.childNodes[i];i=0;if(!t){var o=e.rest?Q(e.rest):e.line;return ns(at(nt(o),o.text.length),r)}}var l=t.nodeType==3?t:null,a=t;if(!l&&t.childNodes.length==1&&t.firstChild.nodeType==3){l=t.firstChild;if(i){i=l.nodeValue.length}}while(a.parentNode!=n){a=a.parentNode}var s=e.measure,f=s.maps;function c(t,i,n){for(var r=-1;r<(f?f.length:0);r++){var o=r<0?s.map:f[r];for(var l=0;l<o.length;l+=3){var a=o[l+2];if(a==t||a==i){var c=nt(r<0?e.line:e.rest[r]);var u=o[l]+n;if(n<0||a!=t){u=o[l+(n?1:0)]}return at(c,u)}}}}var u=c(l,a,i);if(u){return ns(u,r)}for(var h=a.nextSibling,d=l?l.nodeValue.length-i:0;h;h=h.nextSibling){u=c(h,h.firstChild,0);if(u){return ns(at(u.line,u.ch-d),r)}else{d+=h.textContent.length}}for(var p=a.previousSibling,m=i;p;p=p.previousSibling){u=c(p,p.firstChild,-1);if(u){return ns(at(u.line,u.ch+m),r)}else{m+=p.textContent.length}}}var as=function(e){this.cm=e;this.prevInput="";this.pollingFast=false;this.polling=new q;this.hasSelection=false;this.composing=null;this.resetting=false};as.prototype.init=function(e){var t=this;var i=this,n=this.cm;this.createField(e);var r=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild);if(g){r.style.width="0px"}ve(r,"input",function(){if(l&&a>=9&&t.hasSelection){t.hasSelection=null}i.poll()});ve(r,"paste",function(e){if(we(n,e)||Ka(e,n)){return}n.state.pasteIncoming=+new Date;i.fastPoll()});function o(e){if(we(n,e)){return}if(n.somethingSelected()){Ga({lineWise:false,text:n.getSelections()})}else if(!n.options.lineWiseCopyCut){return}else{var t=Xa(n);Ga({lineWise:true,text:t.text});if(e.type=="cut"){n.setSelections(t.ranges,null,K)}else{i.prevInput="";r.value=t.text.join("\n");W(r)}}if(e.type=="cut"){n.state.cutIncoming=+new Date}}ve(r,"cut",o);ve(r,"copy",o);ve(e.scroller,"paste",function(t){if(Vi(e,t)||we(n,t)){return}if(!r.dispatchEvent){n.state.pasteIncoming=+new Date;i.focus();return}var o=new Event("paste");o.clipboardData=t.clipboardData;r.dispatchEvent(o)});ve(e.lineSpace,"selectstart",function(t){if(!Vi(e,t)){Le(t)}});ve(r,"compositionstart",function(){var e=n.getCursor("from");if(i.composing){i.composing.range.clear()}i.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}});ve(r,"compositionend",function(){if(i.composing){i.poll();i.composing.range.clear();i.composing=null}})};as.prototype.createField=function(e){this.wrapper=Ya();this.textarea=this.wrapper.firstChild;var t=this.cm.options;_a(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)};as.prototype.screenReaderLabelChanged=function(e){if(e){this.textarea.setAttribute("aria-label",e)}else{this.textarea.removeAttribute("aria-label")}};as.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc;var n=Kn(e);if(e.options.moveInputWithCursor){var r=bn(e,i.sel.primary().head,"div");var o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+l.top-o.top));n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+l.left-o.left))}return n};as.prototype.showSelection=function(e){var t=this.cm,i=t.display;O(i.cursorDiv,e.cursors);O(i.selectionDiv,e.selection);if(e.teTop!=null){this.wrapper.style.top=e.teTop+"px";this.wrapper.style.left=e.teLeft+"px"}};as.prototype.reset=function(e){if(this.contextMenuPending||this.composing&&e){return}var t=this.cm;this.resetting=true;if(t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i;if(t.state.focused){W(this.textarea)}if(l&&a>=9){this.hasSelection=i}}else if(!e){this.prevInput=this.textarea.value="";if(l&&a>=9){this.hasSelection=null}}this.resetting=false};as.prototype.getField=function(){return this.textarea};as.prototype.supportsTouch=function(){return false};as.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!y||D(this.textarea.ownerDocument)!=this.textarea)){try{this.textarea.focus()}catch(e){}}};as.prototype.blur=function(){this.textarea.blur()};as.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0};as.prototype.receivedFocus=function(){this.slowPoll()};as.prototype.slowPoll=function(){var e=this;if(this.pollingFast){return}this.polling.set(this.cm.options.pollInterval,function(){e.poll();if(e.cm.state.focused){e.slowPoll()}})};as.prototype.fastPoll=function(){var e=false,t=this;t.pollingFast=true;function i(){var n=t.poll();if(!n&&!e){e=true;t.polling.set(60,i)}else{t.pollingFast=false;t.slowPoll()}}t.polling.set(20,i)};as.prototype.poll=function(){var e=this;var t=this.cm,i=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ie(i)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq){return false}var r=i.value;if(r==n&&!t.somethingSelected()){return false}if(l&&a>=9&&this.hasSelection===r||x&&/[\uf700-\uf7ff]/.test(r)){t.display.input.reset();return false}if(t.doc.sel==t.display.selForContextMenu){var o=r.charCodeAt(0);if(o==8203&&!n){n="​"}if(o==8666){this.reset();return this.cm.execCommand("undo")}}var s=0,f=Math.min(n.length,r.length);while(s<f&&n.charCodeAt(s)==r.charCodeAt(s)){++s}Dr(t,function(){Va(t,r.slice(s),n.length-s,null,e.composing?"*compose":null);if(r.length>1e3||r.indexOf("\n")>-1){i.value=e.prevInput=""}else{e.prevInput=r}if(e.composing){e.composing.range.clear();e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"})}});return true};as.prototype.ensurePolled=function(){if(this.pollingFast&&this.poll()){this.pollingFast=false}};as.prototype.onKeyPress=function(){if(l&&a>=9){this.hasSelection=null}this.fastPoll()};as.prototype.onContextMenu=function(e){var t=this,i=t.cm,n=i.display,r=t.textarea;if(t.contextMenuPending){t.contextMenuPending()}var o=In(i,e),f=n.scroller.scrollTop;if(!o||h){return}var c=i.options.resetSelectionOnContextMenu;if(c&&i.doc.sel.contains(o)==-1){Hr(i,Go)(i.doc,fo(o),K)}var u=r.style.cssText,d=t.wrapper.style.cssText;var p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static";r.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n      z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var m;if(s){m=r.ownerDocument.defaultView.scrollY}n.input.focus();if(s){r.ownerDocument.defaultView.scrollTo(null,m)}n.input.reset();if(!i.somethingSelected()){r.value=t.prevInput=" "}t.contextMenuPending=v;n.selForContextMenu=i.doc.sel;clearTimeout(n.detectingSelectAll);function g(){if(r.selectionStart!=null){var e=i.somethingSelected();var o="​"+(e?r.value:"");r.value="⇚";r.value=o;t.prevInput=e?"":"​";r.selectionStart=1;r.selectionEnd=o.length;n.selForContextMenu=i.doc.sel}}function v(){if(t.contextMenuPending!=v){return}t.contextMenuPending=false;t.wrapper.style.cssText=d;r.style.cssText=u;if(l&&a<9){n.scrollbars.setScrollTop(n.scroller.scrollTop=f)}if(r.selectionStart!=null){if(!l||l&&a<9){g()}var e=0,o=function(){if(n.selForContextMenu==i.doc.sel&&r.selectionStart==0&&r.selectionEnd>0&&t.prevInput=="​"){Hr(i,Qo)(i)}else if(e++<10){n.detectingSelectAll=setTimeout(o,500)}else{n.selForContextMenu=null;n.input.reset()}};n.detectingSelectAll=setTimeout(o,200)}}if(l&&a>=9){g()}if(k){Oe(e);var y=function(){xe(window,"mouseup",y);setTimeout(v,20)};ve(window,"mouseup",y)}else{setTimeout(v,50)}};as.prototype.readOnlyChanged=function(e){if(!e){this.reset()}this.textarea.disabled=e=="nocursor";this.textarea.readOnly=!!e};as.prototype.setUneditable=function(){};as.prototype.needsContentAttribute=false;function ss(e,t){t=t?j(t):{};t.value=e.value;if(!t.tabindex&&e.tabIndex){t.tabindex=e.tabIndex}if(!t.placeholder&&e.placeholder){t.placeholder=e.placeholder}if(t.autofocus==null){var i=D(e.ownerDocument);t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function n(){e.value=a.getValue()}var r;if(e.form){ve(e.form,"submit",n);if(!t.leaveSubmitMethodAlone){var o=e.form;r=o.submit;try{var l=o.submit=function(){n();o.submit=r;o.submit();o.submit=l}}catch(e){}}}t.finishInit=function(i){i.save=n;i.getTextArea=function(){return e};i.toTextArea=function(){i.toTextArea=isNaN;n();e.parentNode.removeChild(i.getWrapperElement());e.style.display="";if(e.form){xe(e.form,"submit",n);if(!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"){e.form.submit=r}}}};e.style.display="none";var a=Ba(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}function fs(e){e.off=xe;e.on=ve;e.wheelEventPixels=ro;e.Doc=Ll;e.splitLines=We;e.countColumn=z;e.findColumn=_;e.isWordChar=re;e.Pass=V;e.signal=be;e.Line=ci;e.changeEnd=co;e.scrollbarModel=Cr;e.Pos=at;e.cmpPos=st;e.modes=ze;e.mimeModes=qe;e.resolveMode=Ve;e.getMode=Ke;e.modeExtensions=$e;e.extendMode=Xe;e.copyState=_e;e.startState=Je;e.innerMode=Ye;e.commands=Zl;e.keyMap=jl;e.keyName=Kl;e.isModifierKey=Gl;e.lookupKey=Ul;e.normalizeKeyMap=ql;e.StringStream=Qe;e.SharedTextMarker=xl;e.TextMarker=vl;e.LineWidget=dl;e.e_preventDefault=Le;e.e_stopPropagation=Me;e.e_stop=Oe;e.addClass=H;e.contains=F;e.rmClass=M;e.keyNames=Wl}Wa(Ba);Ja(Ba);var cs="iter insert remove copy getEditor constructor".split(" ");for(var us in Ll.prototype){if(Ll.prototype.hasOwnProperty(us)&&U(cs,us)<0){Ba.prototype[us]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ll.prototype[us])}}ke(Ll);Ba.inputStyles={textarea:as,contenteditable:es};Ba.defineMode=function(e){if(!Ba.defaults.mode&&e!="null"){Ba.defaults.mode=e}Ue.apply(this,arguments)};Ba.defineMIME=Ge;Ba.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}});Ba.defineMIME("text/plain","null");Ba.defineExtension=function(e,t){Ba.prototype[e]=t};Ba.defineDocExtension=function(e,t){Ll.prototype[e]=t};Ba.fromTextArea=ss;fs(Ba);Ba.version="5.65.11";return Ba});!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("rpm-changes",function(){var e=/^-+$/,t=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,i=/^[\w+.-]+@[\w.-]+/;return{token:function(n){if(n.sol()){if(n.match(e))return"tag";if(n.match(t))return"tag"}return n.match(i)?"string":(n.next(),null)}}}),e.defineMIME("text/x-rpm-changes","rpm-changes"),e.defineMode("rpm-spec",function(){var e=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,t=/^[a-zA-Z0-9()]+:/,i=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,n=/^%(ifnarch|ifarch|if)/,r=/^%(else|endif)/,o=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(l,a){if(l.string.trim().startsWith("#"))return l.skipToEnd(),"comment";if(l.string.trim().match(/<VirtualHost|VirtualHost>/))return l.skipToEnd(),"header";if(l.string.trim().match(/<Directory|Directory>|<Files|Files>|<FilesMatch|FilesMatch>|<Location|Location>/))return l.skipToEnd(),"keyword";if(l.string.trim().match(/<IfModule|IfModule>|<Proxy|Proxy>/))return l.skipToEnd(),"def";if(l.sol()){if(l.match(t))return"header";if(l.match(i))return"atom"}if(l.match(/^\$\w+/))return"def";if(l.match(/^\$\{\w+\}/))return"def";if(l.match(r))return"keyword";if(l.match(n))return a.controlFlow=!0,"keyword";if(a.controlFlow){if(l.match(o))return"operator";if(l.match(/^(\d+)/))return"number";l.eol()&&(a.controlFlow=!1)}if(l.match(e))return l.eol()&&(a.controlFlow=!1),"number";if(l.match(/^%[\w]+/))return l.match(/^\(/)&&(a.macroParameters=!0),"keyword";if(a.macroParameters){if(l.match(/^\d+/))return"number";if(l.match(/^\)/))return a.macroParameters=!1,"keyword"}return l.match(/^%\{\??[\w \-\:\!]+\}/)?(l.eol()&&(a.controlFlow=!1),"def"):(l.next(),null)}}}),e.defineMIME("text/x-rpm-spec","rpm-spec")});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(t,i,n){t=t.getWrapperElement();var r=t.appendChild(document.createElement("div"));r.className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top";"string"==typeof i?r.innerHTML=i:r.appendChild(i);e.addClass(t,"dialog-opened");return r}function i(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose();e.state.currentNotificationClose=t}e.defineExtension("openDialog",function(n,r,o){function l(t){if("string"==typeof t)c.value=t;else if(!s&&(s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),f.focus(),o.onClose))o.onClose(a)}o||(o={});i(this,null);var a=t(this,n,o.bottom),s=!1,f=this,c=a.getElementsByTagName("input")[0];if(c){c.focus();o.value&&(c.value=o.value,!1!==o.selectValueOnOpen&&c.select());if(o.onInput)e.on(c,"input",function(e){o.onInput(e,c.value,l)});if(o.onKeyUp)e.on(c,"keyup",function(e){o.onKeyUp(e,c.value,l)});e.on(c,"keydown",function(t){if(!(o&&o.onKeyDown&&o.onKeyDown(t,c.value,l))){if(27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)c.blur(),e.e_stop(t),l();13==t.keyCode&&r(c.value,t)}});if(!1!==o.closeOnBlur)e.on(a,"focusout",function(e){null!==e.relatedTarget&&l()})}else if(n=a.getElementsByTagName("button")[0]){e.on(n,"click",function(){l();f.focus()});if(!1!==o.closeOnBlur)e.on(n,"blur",l);n.focus()}return l});e.defineExtension("openConfirm",function(n,r,o){function l(){s||(s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),f.focus())}i(this,null);var a=t(this,n,o&&o.bottom);n=a.getElementsByTagName("button");var s=!1,f=this,c=1;n[0].focus();for(o=0;o<n.length;++o){var u=n[o];(function(t){e.on(u,"click",function(i){e.e_preventDefault(i);l();t&&t(f)})})(r[o]);e.on(u,"blur",function(){--c;setTimeout(function(){0>=c&&l()},200)});e.on(u,"focus",function(){++c})}});e.defineExtension("openNotification",function(n,r){function o(){a||(a=!0,clearTimeout(s),e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l))}i(this,o);var l=t(this,n,r&&r.bottom),a=!1,s,f=r&&"undefined"!==typeof r.duration?r.duration:5e3;e.on(l,"click",function(t){e.e_preventDefault(t);o()});f&&(s=setTimeout(o,f));return o})});(function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e);else e(CodeMirror)})(function(e){"use strict";e.defineOption("search",{bottom:false});function t(e,t){if(typeof e=="string")e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g");else if(!e.global)e=new RegExp(e.source,e.ignoreCase?"gi":"g");return{token:function(t){e.lastIndex=t.pos;var i=e.exec(t.string);if(i&&i.index==t.pos){t.pos+=i[0].length||1;return"searching"}else if(i){t.pos=i.index}else{t.skipToEnd()}}}}function i(){this.posFrom=this.posTo=this.lastQuery=this.query=null;this.overlay=null}function n(e){return e.state.search||(e.state.search=new i)}function r(e){return typeof e=="string"&&e==e.toLowerCase()}function o(e,t,i){return e.getSearchCursor(t,i,{caseFold:r(t),multiline:true})}function l(e,t,i,n,r){e.openDialog(t,n,{value:i,selectValueOnOpen:true,closeOnEnter:false,onClose:function(){p(e)},onKeyDown:r,bottom:e.options.search.bottom})}function a(e,t,i,n,r){if(e.openDialog)e.openDialog(t,r,{value:n,selectValueOnOpen:true,bottom:e.options.search.bottom});else r(prompt(i,n))}function s(e,t,i,n){if(e.openConfirm)e.openConfirm(t,n);else if(confirm(i))n[0]()}function f(e){return e.replace(/\\([nrt\\])/g,function(e,t){if(t=="n")return"\n";if(t=="r")return"\r";if(t=="t")return"\t";if(t=="\\")return"\\";return e})}function c(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t){try{e=new RegExp(t[1],t[2].indexOf("i")==-1?"":"i")}catch(e){}}else{e=f(e)}if(typeof e=="string"?e=="":e.test(""))e=/x^/;return e}function u(e,i,n){i.queryText=n;i.query=c(n);e.removeOverlay(i.overlay,r(i.query));i.overlay=t(i.query,r(i.query));e.addOverlay(i.overlay);if(e.showMatchesOnScrollbar){if(i.annotate){i.annotate.clear();i.annotate=null}i.annotate=e.showMatchesOnScrollbar(i.query,r(i.query))}}function h(t,i,r,o){var s=n(t);if(s.query)return d(t,i);var f=t.getSelection()||s.lastQuery;if(f instanceof RegExp&&f.source=="x^")f=null;if(r&&t.openDialog){var c=null;var h=function(i,n){e.e_stop(n);if(!i)return;if(i!=s.queryText){u(t,s,i);s.posFrom=s.posTo=t.getCursor()}if(c)c.style.opacity=1;d(t,n.shiftKey,function(e,i){var n;if(i.line<3&&document.querySelector&&(n=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&n.getBoundingClientRect().bottom-4>t.cursorCoords(i,"window").top)(c=n).style.opacity=.4})};l(t,g(t),f,h,function(i,r){var o=e.keyName(i);var l=t.getOption("extraKeys"),a=l&&l[o]||e.keyMap[t.getOption("keyMap")][o];if(a=="findNext"||a=="findPrev"||a=="findPersistentNext"||a=="findPersistentPrev"){e.e_stop(i);u(t,n(t),r);t.execCommand(a)}else if(a=="find"||a=="findPersistent"){e.e_stop(i);h(r,i)}});if(o&&f){u(t,s,f);d(t,i)}}else{a(t,g(t),"Search for:",f,function(e){if(e&&!s.query)t.operation(function(){u(t,s,e);s.posFrom=s.posTo=t.getCursor();d(t,i)})})}}function d(t,i,r){t.operation(function(){var l=n(t);var a=o(t,l.query,i?l.posFrom:l.posTo);if(!a.find(i)){a=o(t,l.query,i?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0));if(!a.find(i))return}t.setSelection(a.from(),a.to());t.scrollIntoView({from:a.from(),to:a.to()},20);l.posFrom=a.from();l.posTo=a.to();if(r)r(a.from(),a.to())})}function p(e){e.operation(function(){var t=n(e);t.lastQuery=t.query;if(!t.query)return;t.query=t.queryText=null;e.removeOverlay(t.overlay);if(t.annotate){t.annotate.clear();t.annotate=null}})}function m(e,t){var i=e?document.createElement(e):document.createDocumentFragment();for(var n in t){i[n]=t[n]}for(var r=2;r<arguments.length;r++){var o=arguments[r];i.appendChild(typeof o=="string"?document.createTextNode(o):o)}return i}function g(e){var t=m("label",{className:"CodeMirror-search-label"},e.phrase("Search:"),m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field",id:"CodeMirror-search-field"}));t.setAttribute("for","CodeMirror-search-field");return m("",null,t," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function v(e){return m("",null," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",m("span",{style:"color: #666",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}function y(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",m("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}function x(e){return m("",null,m("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",m("button",{},e.phrase("Yes"))," ",m("button",{},e.phrase("No"))," ",m("button",{},e.phrase("All"))," ",m("button",{},e.phrase("Stop")))}function b(e,t,i){e.operation(function(){for(var n=o(e,t);n.findNext();){if(typeof t!="string"){var r=e.getRange(n.from(),n.to()).match(t);n.replace(i.replace(/\$(\d)/g,function(e,t){return r[t]}))}else n.replace(i)}})}function w(e,t){if(e.getOption("readOnly"))return;var i=e.getSelection()||n(e).lastQuery;var r=t?e.phrase("Replace all:"):e.phrase("Replace:");var l=m("",null,m("span",{className:"CodeMirror-search-label"},r),v(e));a(e,l,r,i,function(i){if(!i)return;i=c(i);a(e,y(e),e.phrase("Replace with:"),"",function(n){n=f(n);if(t){b(e,i,n)}else{p(e);var r=o(e,i,e.getCursor("from"));var l=function(){var t=r.from(),f;if(!(f=r.findNext())){r=o(e,i);if(!(f=r.findNext())||t&&r.from().line==t.line&&r.from().ch==t.ch)return}e.setSelection(r.from(),r.to());e.scrollIntoView({from:r.from(),to:r.to()});s(e,x(e),e.phrase("Replace?"),[function(){a(f)},l,function(){b(e,i,n)}])};var a=function(e){r.replace(typeof i=="string"?n:n.replace(/\$(\d)/g,function(t,i){return e[i]}));l()};l()}})})}e.commands.find=function(e){p(e);h(e)};e.commands.findPersistent=function(e){p(e);h(e,false,true)};e.commands.findPersistentNext=function(e){h(e,false,true,true)};e.commands.findPersistentPrev=function(e){h(e,true,true,true)};e.commands.findNext=h;e.commands.findPrev=function(e){h(e,true)};e.commands.clearSearch=p;e.commands.replace=w;e.commands.replaceAll=function(e){w(e,true)}});(function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";var t=e.Pos;function i(e){var t=e.flags;return t!=null?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function n(e,t){var n=i(e),r=n;for(var o=0;o<t.length;o++)if(r.indexOf(t.charAt(o))==-1)r+=t.charAt(o);return n==r?e:new RegExp(e.source,r)}function r(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function o(e,i,r){i=n(i,"g");for(var o=r.line,l=r.ch,a=e.lastLine();o<=a;o++,l=0){i.lastIndex=l;var s=e.getLine(o),f=i.exec(s);if(f)return{from:t(o,f.index),to:t(o,f.index+f[0].length),match:f}}}function l(e,i,l){if(!r(i))return o(e,i,l);i=n(i,"gm");var a,s=1;for(var f=l.line,c=e.lastLine();f<=c;){for(var u=0;u<s;u++){if(f>c)break;var h=e.getLine(f++);a=a==null?h:a+"\n"+h}s=s*2;i.lastIndex=l.ch;var d=i.exec(a);if(d){var p=a.slice(0,d.index).split("\n"),m=d[0].split("\n");var g=l.line+p.length-1,v=p[p.length-1].length;return{from:t(g,v),to:t(g+m.length-1,m.length==1?v+m[0].length:m[m.length-1].length),match:d}}}}function a(e,t,i){var n,r=0;while(r<=e.length){t.lastIndex=r;var o=t.exec(e);if(!o)break;var l=o.index+o[0].length;if(l>e.length-i)break;if(!n||l>n.index+n[0].length)n=o;r=o.index+1}return n}function s(e,i,r){i=n(i,"g");for(var o=r.line,l=r.ch,s=e.firstLine();o>=s;o--,l=-1){var f=e.getLine(o);var c=a(f,i,l<0?0:f.length-l);if(c)return{from:t(o,c.index),to:t(o,c.index+c[0].length),match:c}}}function f(e,i,o){if(!r(i))return s(e,i,o);i=n(i,"gm");var l,f=1,c=e.getLine(o.line).length-o.ch;for(var u=o.line,h=e.firstLine();u>=h;){for(var d=0;d<f&&u>=h;d++){var p=e.getLine(u--);l=l==null?p:p+"\n"+l}f*=2;var m=a(l,i,c);if(m){var g=l.slice(0,m.index).split("\n"),v=m[0].split("\n");var y=u+g.length,x=g[g.length-1].length;return{from:t(y,x),to:t(y+v.length-1,v.length==1?x+v[0].length:v[v.length-1].length),match:m}}}}var c,u;if(String.prototype.normalize){c=function(e){return e.normalize("NFD").toLowerCase()};u=function(e){return e.normalize("NFD")}}else{c=function(e){return e.toLowerCase()};u=function(e){return e}}function h(e,t,i,n){if(e.length==t.length)return i;for(var r=0,o=i+Math.max(0,e.length-t.length);;){if(r==o)return r;var l=r+o>>1;var a=n(e.slice(0,l)).length;if(a==i)return l;else if(a>i)o=l;else r=l+1}}function d(e,i,n,r){if(!i.length)return null;var o=r?c:u;var l=o(i).split(/\r|\n\r?/);e:for(var a=n.line,s=n.ch,f=e.lastLine()+1-l.length;a<=f;a++,s=0){var d=e.getLine(a).slice(s),p=o(d);if(l.length==1){var m=p.indexOf(l[0]);if(m==-1)continue e;var n=h(d,p,m,o)+s;return{from:t(a,h(d,p,m,o)+s),to:t(a,h(d,p,m+l[0].length,o)+s)}}else{var g=p.length-l[0].length;if(p.slice(g)!=l[0])continue e;for(var v=1;v<l.length-1;v++)if(o(e.getLine(a+v))!=l[v])continue e;var y=e.getLine(a+l.length-1),x=o(y),b=l[l.length-1];if(x.slice(0,b.length)!=b)continue e;return{from:t(a,h(d,p,g,o)+s),to:t(a+l.length-1,h(y,x,b.length,o))}}}}function p(e,i,n,r){if(!i.length)return null;var o=r?c:u;var l=o(i).split(/\r|\n\r?/);e:for(var a=n.line,s=n.ch,f=e.firstLine()-1+l.length;a>=f;a--,s=-1){var d=e.getLine(a);if(s>-1)d=d.slice(0,s);var p=o(d);if(l.length==1){var m=p.lastIndexOf(l[0]);if(m==-1)continue e;return{from:t(a,h(d,p,m,o)),to:t(a,h(d,p,m+l[0].length,o))}}else{var g=l[l.length-1];if(p.slice(0,g.length)!=g)continue e;for(var v=1,n=a-l.length+1;v<l.length-1;v++)if(o(e.getLine(n+v))!=l[v])continue e;var y=e.getLine(a+1-l.length),x=o(y);if(x.slice(x.length-l[0].length)!=l[0])continue e;return{from:t(a+1-l.length,h(y,x,y.length-l[0].length,o)),to:t(a,h(d,p,g.length,o))}}}}function m(e,i,r,a){this.atOccurrence=false;this.afterEmptyMatch=false;this.doc=e;r=r?e.clipPos(r):t(0,0);this.pos={from:r,to:r};var c;if(typeof a=="object"){c=a.caseFold}else{c=a;a=null}if(typeof i=="string"){if(c==null)c=false;this.matches=function(t,n){return(t?p:d)(e,i,n,c)}}else{i=n(i,"gm");if(!a||a.multiline!==false)this.matches=function(t,n){return(t?f:l)(e,i,n)};else this.matches=function(t,n){return(t?s:o)(e,i,n)}}}m.prototype={findNext:function(){return this.find(false)},findPrevious:function(){return this.find(true)},find:function(i){var n=this.doc.clipPos(i?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence){n=t(n.line,n.ch);if(i){n.ch--;if(n.ch<0){n.line--;n.ch=(this.doc.getLine(n.line)||"").length}}else{n.ch++;if(n.ch>(this.doc.getLine(n.line)||"").length){n.ch=0;n.line++}}if(e.cmpPos(n,this.doc.clipPos(n))!=0){return this.atOccurrence=false}}var r=this.matches(i,n);this.afterEmptyMatch=r&&e.cmpPos(r.from,r.to)==0;if(r){this.pos=r;this.atOccurrence=true;return this.pos.match||true}else{var o=t(i?this.doc.firstLine():this.doc.lastLine()+1,0);this.pos={from:o,to:o};return this.atOccurrence=false}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(i,n){if(!this.atOccurrence)return;var r=e.splitLines(i);this.doc.replaceRange(r,this.pos.from,this.pos.to,n);this.pos.to=t(this.pos.from.line+r.length-1,r[r.length-1].length+(r.length==1?this.pos.from.ch:0))}};e.defineExtension("getSearchCursor",function(e,t,i){return new m(this.doc,e,t,i)});e.defineDocExtension("getSearchCursor",function(e,t,i){return new m(this,e,t,i)});e.defineExtension("selectMatches",function(t,i){var n=[];var r=this.getSearchCursor(t,this.getCursor("from"),i);while(r.findNext()){if(e.cmpPos(r.to(),this.getCursor("to"))>0)break;n.push({anchor:r.from(),head:r.to()})}if(n.length)this.setSelections(n,0)})});(function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"),require("../dialog/dialog"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror","../dialog/dialog"],e);else e(CodeMirror)})(function(e){"use strict";e.defineOption("search",{bottom:false});function t(e,t,i,n,r){if(e.openDialog)e.openDialog(t,r,{value:n,selectValueOnOpen:true,bottom:e.options.search.bottom});else r(prompt(i,n))}function i(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function n(e,t){var i=Number(t);if(/^[-+]/.test(t))return e.getCursor().line+i;else return i-1}e.commands.jumpToLine=function(e){var r=e.getCursor();t(e,i(e),e.phrase("Jump to line:"),r.line+1+":"+r.ch,function(t){if(!t)return;var i;if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t)){e.setCursor(n(e,i[1]),Number(i[2]))}else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var o=Math.round(e.lineCount()*Number(i[1])/100);if(/^[-+]/.test(i[1]))o=r.line+o+1;e.setCursor(o-1,r.ch)}else if(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t)){e.setCursor(n(e,i[1]),r.ch)}})};e.keyMap["default"]["Alt-G"]="jumpToLine"});(function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],e);else e(CodeMirror)})(function(e){"use strict";e.defineExtension("showMatchesOnScrollbar",function(e,i,n){if(typeof n=="string")n={className:n};if(!n)n={};return new t(this,e,i,n)});function t(e,t,i,n){this.cm=e;this.options=n;var r={listenForChanges:false};for(var o in n)r[o]=n[o];if(!r.className)r.className="CodeMirror-search-match";this.annotation=e.annotateScrollbar(r);this.query=t;this.caseFold=i;this.gap={from:e.firstLine(),to:e.lastLine()+1};this.matches=[];this.update=null;this.findMatches();this.annotation.update(this.matches);var l=this;e.on("change",this.changeHandler=function(e,t){l.onChange(t)})}var i=1e3;t.prototype.findMatches=function(){if(!this.gap)return;for(var t=0;t<this.matches.length;t++){var n=this.matches[t];if(n.from.line>=this.gap.to)break;if(n.to.line>=this.gap.from)this.matches.splice(t--,1)}var r=this.cm.getSearchCursor(this.query,e.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline});var o=this.options&&this.options.maxMatches||i;while(r.findNext()){var n={from:r.from(),to:r.to()};if(n.from.line>=this.gap.to)break;this.matches.splice(t++,0,n);if(this.matches.length>o)break}this.gap=null};function n(e,t,i){if(e<=t)return e;return Math.max(t,e+i)}t.prototype.onChange=function(t){var i=t.from.line;var r=e.changeEnd(t).line;var o=r-t.to.line;if(this.gap){this.gap.from=Math.min(n(this.gap.from,i,o),t.from.line);this.gap.to=Math.max(n(this.gap.to,i,o),t.from.line)}else{this.gap={from:t.from.line,to:r+1}}if(o)for(var l=0;l<this.matches.length;l++){var a=this.matches[l];var s=n(a.from.line,i,o);if(s!=a.from.line)a.from=e.Pos(s,a.from.ch);var f=n(a.to.line,i,o);if(f!=a.to.line)a.to=e.Pos(f,a.to.ch)}clearTimeout(this.update);var c=this;this.update=setTimeout(function(){c.updateAfterChange()},250)};t.prototype.updateAfterChange=function(){this.findMatches();this.annotation.update(this.matches)};t.prototype.clear=function(){this.cm.off("change",this.changeHandler);this.annotation.clear()}});(function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"),require("./matchesonscrollbar"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror","./matchesonscrollbar"],e);else e(CodeMirror)})(function(e){"use strict";var t={style:"matchhighlight",minChars:2,delay:100,wordsOnly:false,annotateScrollbar:false,showToken:false,trim:true};function i(e){this.options={};for(var i in t)this.options[i]=(e&&e.hasOwnProperty(i)?e:t)[i];this.overlay=this.timeout=null;this.matchesonscroll=null;this.active=false}e.defineOption("highlightSelectionMatches",false,function(t,o,l){if(l&&l!=e.Init){a(t);clearTimeout(t.state.matchHighlighter.timeout);t.state.matchHighlighter=null;t.off("cursorActivity",n);t.off("focus",r)}if(o){var f=t.state.matchHighlighter=new i(o);if(t.hasFocus()){f.active=true;s(t)}else{t.on("focus",r)}t.on("cursorActivity",n)}});function n(e){var t=e.state.matchHighlighter;if(t.active||e.hasFocus())o(e,t)}function r(e){var t=e.state.matchHighlighter;if(!t.active){t.active=true;o(e,t)}}function o(e,t){clearTimeout(t.timeout);t.timeout=setTimeout(function(){s(e)},t.options.delay)}function l(e,t,i,n){var r=e.state.matchHighlighter;e.addOverlay(r.overlay=u(t,i,n));if(r.options.annotateScrollbar&&e.showMatchesOnScrollbar){var o=i?new RegExp((/\w/.test(t.charAt(0))?"\\b":"")+t.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(t.charAt(t.length-1))?"\\b":"")):t;r.matchesonscroll=e.showMatchesOnScrollbar(o,false,{className:"CodeMirror-selection-highlight-scrollbar"})}}function a(e){var t=e.state.matchHighlighter;if(t.overlay){e.removeOverlay(t.overlay);t.overlay=null;if(t.matchesonscroll){t.matchesonscroll.clear();t.matchesonscroll=null}}}function s(e){e.operation(function(){var t=e.state.matchHighlighter;a(e);if(!e.somethingSelected()&&t.options.showToken){var i=t.options.showToken===true?/[\w$]/:t.options.showToken;var n=e.getCursor(),r=e.getLine(n.line),o=n.ch,s=o;while(o&&i.test(r.charAt(o-1)))--o;while(s<r.length&&i.test(r.charAt(s)))++s;if(o<s)l(e,r.slice(o,s),i,t.options.style);return}var c=e.getCursor("from"),u=e.getCursor("to");if(c.line!=u.line)return;if(t.options.wordsOnly&&!f(e,c,u))return;var h=e.getRange(c,u);if(t.options.trim)h=h.replace(/^\s+|\s+$/g,"");if(h.length>=t.options.minChars)l(e,h,false,t.options.style)})}function f(e,t,i){var n=e.getRange(t,i);if(n.match(/^\w+$/)!==null){if(t.ch>0){var r={line:t.line,ch:t.ch-1};var o=e.getRange(r,t);if(o.match(/\W/)===null)return false}if(i.ch<e.getLine(t.line).length){var r={line:i.line,ch:i.ch+1};var o=e.getRange(i,r);if(o.match(/\W/)===null)return false}return true}else return false}function c(e,t){return(!e.start||!t.test(e.string.charAt(e.start-1)))&&(e.pos==e.string.length||!t.test(e.string.charAt(e.pos)))}function u(e,t,i){return{token:function(n){if(n.match(e)&&(!t||c(n,t)))return i;n.next();n.skipTo(e.charAt(0))||n.skipToEnd()}}}});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){e.overlayMode=function(t,i,n){return{startState:function(){return{base:e.startState(t),overlay:e.startState(i),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(n){return{base:e.copyState(t,n.base),overlay:e.copyState(i,n.overlay),basePos:n.basePos,baseCur:null,overlayPos:n.overlayPos,overlayCur:null}},token:function(e,r){if(e!=r.streamSeen||Math.min(r.basePos,r.overlayPos)<e.start)r.streamSeen=e,r.basePos=r.overlayPos=e.start;e.start==r.basePos&&(r.baseCur=t.token(e,r.base),r.basePos=e.pos);e.start==r.overlayPos&&(e.pos=e.start,r.overlayCur=i.token(e,r.overlay),r.overlayPos=e.pos);e.pos=Math.min(r.basePos,r.overlayPos);return null==r.overlayCur?r.baseCur:null!=r.baseCur&&r.overlay.combineTokens||n&&null==r.overlay.combineTokens?r.baseCur+" "+r.overlayCur:r.overlayCur},indent:t.indent&&function(e,i,n){return t.indent(e.base,i,n)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var r,o;t.blankLine&&(r=t.blankLine(e.base));i.blankLine&&(o=i.blankLine(e.overlay));return null==o?r:n&&null!=r?r+" "+o:o}}}});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e,t){if(!e.hasOwnProperty(t))throw Error("Undefined state "+t+" in simple mode")}function i(e,t){if(!e)return/(?:)/;var i="";e instanceof RegExp?(e.ignoreCase&&(i="i"),e.unicode&&(i+="u"),e=e.source):e=String(e);return new RegExp((!1===t?"":"^")+"(?:"+e+")",i)}function n(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],i=0;i<e.length;i++)t.push(e[i]&&e[i].replace(/\./g," "));return t}function r(e,r){(e.next||e.push)&&t(r,e.next||e.push);this.regex=i(e.regex);this.token=n(e.token);this.data=e}function o(t,n){return function(r,o){if(o.pending){var a=o.pending.shift();0==o.pending.length&&(o.pending=null);r.pos+=a.text.length;return a.token}if(o.local){if(o.local.end&&r.match(o.local.end))a=o.local.endToken||null,o.local=o.localState=null;else{a=o.local.mode.token(r,o.localState);var s;o.local.endScan&&(s=o.local.endScan.exec(r.current()))&&(r.pos=r.start+s.index)}return a}for(var f=t[o.state],c=0;c<f.length;c++)if(a=f[c],s=(!a.data.sol||r.sol())&&r.match(a.regex)){a.data.next?o.state=a.data.next:a.data.push?((o.stack||(o.stack=[])).push(o.state),o.state=a.data.push):a.data.pop&&o.stack&&o.stack.length&&(o.state=o.stack.pop());if(a.data.mode){f=void 0;var u=n;c=o;var h=a.data.mode,d=a.token;if(h.persistent)for(var p=c.persistentStates;p&&!f;p=p.next)if(h.spec?l(h.spec,p.spec):h.mode==p.mode)f=p;u=f?f.mode:h.mode||e.getMode(u,h.spec);p=f?f.state:e.startState(u);h.persistent&&!f&&(c.persistentStates={mode:u,spec:h.spec,state:p,next:c.persistentStates});c.localState=p;c.local={mode:u,end:h.end&&i(h.end),endScan:h.end&&!1!==h.forceEnd&&i(h.end,!1),endToken:d&&d.join?d[d.length-1]:d}}a.data.indent&&o.indent.push(r.indentation()+n.indentUnit);a.data.dedent&&o.indent.pop();(f=a.token)&&f.apply&&(f=f(s));if(2<s.length&&a.token&&"string"!=typeof a.token){for(c=2;c<s.length;c++)s[c]&&(o.pending||(o.pending=[])).push({text:s[c],token:a.token[c-1]});r.backUp(s[0].length-(s[1]?s[1].length:0));return f[0]}return f&&f.join?f[0]:f}r.next();return null}}function l(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var i=0,n;for(n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n)||!l(e[n],t[n]))return!1;i++}for(n in t)t.hasOwnProperty(n)&&i--;return 0==i}function a(t,i){return function(n,r,o){if(n.local&&n.local.mode.indent)return n.local.mode.indent(n.localState,r,o);if(!(o=null==n.indent||n.local)&&(o=i.dontIndentStates)){e:{o=i.dontIndentStates;for(var l=0;l<o.length;l++)if(o[l]===n.state){o=!0;break e}o=void 0}o=-1<o}if(o)return e.Pass;o=n.indent.length-1;l=t[n.state];e:for(;;){for(var a=0;a<l.length;a++){var s=l[a];if(s.data.dedent&&!1!==s.data.dedentIfLineStart){var f=s.regex.exec(r);if(f&&f[0]){o--;if(s.next||s.push)l=t[s.next||s.push];r=r.slice(f[0].length);continue e}}}break}return 0>o?0:n.indent[o]}}e.defineSimpleMode=function(t,i){e.defineMode(t,function(t){return e.simpleMode(t,i)})};e.simpleMode=function(i,n){t(n,"start");var l={},s=n.meta||{},f=!1,c;for(c in n)if(c!=s&&n.hasOwnProperty(c))for(var u=l[c]=[],h=n[c],d=0;d<h.length;d++){var p=h[d];u.push(new r(p,n));if(p.indent||p.dedent)f=!0}l={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:f?[]:null}},copyState:function(t){var i={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(i.localState=e.copyState(t.local.mode,t.localState));t.stack&&(i.stack=t.stack.slice(0));for(var n=t.persistentStates;n;n=n.next)i.persistentStates={mode:n.mode,spec:n.spec,state:n.state==t.localState?i.localState:e.copyState(n.mode,n.state),next:i.persistentStates};return i},token:o(l,i),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:a(l,s)};if(s)for(var m in s)s.hasOwnProperty(m)&&(l[m]=s[m]);return l}});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){e.multiplexingMode=function(t){function i(e,t,i,n){return"string"==typeof t?(i=e.indexOf(t,i),n&&-1<i?i+t.length:i):(t=t.exec(i?e.slice(i):e))?t.index+i+(n?t[0].length:0):-1}var n=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(i){return{outer:e.copyState(t,i.outer),innerActive:i.innerActive,inner:i.innerActive&&e.copyState(i.innerActive.mode,i.inner),startingInner:i.startingInner}},token:function(r,o){if(o.innerActive){var l=o.innerActive;s=r.string;if(!l.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);c=l.close&&!o.startingInner?i(s,l.close,r.pos,l.parseDelimiters):-1;if(c==r.pos&&!l.parseDelimiters)return r.match(l.close),o.innerActive=o.inner=null,l.delimStyle&&l.delimStyle+" "+l.delimStyle+"-close";-1<c&&(r.string=s.slice(0,c));var a=l.mode.token(r,o.inner);-1<c?r.string=s:r.pos>r.start&&(o.startingInner=!1);c==r.pos&&l.parseDelimiters&&(o.innerActive=o.inner=null);l.innerStyle&&(a=a?a+" "+l.innerStyle:l.innerStyle);return a}a=Infinity;for(var s=r.string,f=0;f<n.length;++f){l=n[f];var c=i(s,l.open,r.pos);if(c==r.pos)return l.parseDelimiters||r.match(l.open),o.startingInner=!!l.parseDelimiters,o.innerActive=l,s=0,t.indent&&(c=t.indent(o.outer,"",""),c!==e.Pass&&(s=c)),o.inner=e.startState(l.mode,s),l.delimStyle&&l.delimStyle+" "+l.delimStyle+"-open";-1!=c&&c<a&&(a=c)}Infinity!=a&&(r.string=s.slice(0,a));l=t.token(r,o.outer);Infinity!=a&&(r.string=s);return l},indent:function(i,n,r){var o=i.innerActive?i.innerActive.mode:t;return o.indent?o.indent(i.innerActive?i.inner:i.outer,n,r):e.Pass},blankLine:function(i){var r=i.innerActive?i.innerActive.mode:t;r.blankLine&&r.blankLine(i.innerActive?i.inner:i.outer);if(i.innerActive)"\n"===i.innerActive.close&&(i.innerActive=i.inner=null);else for(var o=0;o<n.length;++o){var l=n[o];"\n"===l.open&&(i.innerActive=l,i.inner=e.startState(l.mode,r.indent?r.indent(i.outer,"",""):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e,t){function i(e){clearTimeout(n.doRedraw);n.doRedraw=setTimeout(function(){n.redraw()},e)}this.cm=e;this.options=t;this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight");this.annotations=[];this.doRedraw=this.doUpdate=null;this.div=e.getWrapperElement().appendChild(document.createElement("div"));this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none";this.computeScale();var n=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(n.doUpdate);n.doUpdate=setTimeout(function(){n.computeScale()&&i(20)},100)});e.on("markerAdded",this.resizeHandler);e.on("markerCleared",this.resizeHandler);if(!1!==t.listenForChanges)e.on("changes",this.changeHandler=function(){i(250)})}e.defineExtension("annotateScrollbar",function(e){"string"==typeof e&&(e={className:e});return new t(this,e)});e.defineOption("scrollButtonHeight",0);t.prototype.computeScale=function(){var e=this.cm;e=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(e!=this.hScale)return this.hScale=e,!0};t.prototype.update=function(e){this.annotations=e;this.redraw()};t.prototype.redraw=function(e){function t(e,t){if(a!=e.line){a=e.line;s=i.getLineHandle(e.line);var n=i.getLineHandleVisualStart(s);n!=s&&(a=i.getLineNumber(n),s=n)}return s.widgets&&s.widgets.length||o&&s.height>l?i.charCoords(e,"local")[t?"top":"bottom"]:i.heightAtLine(s,"local")+(t?0:s.height)}!1!==e&&this.computeScale();var i=this.cm;e=this.hScale;var n=document.createDocumentFragment(),r=this.annotations,o=i.getOption("lineWrapping"),l=o&&1.5*i.defaultTextHeight(),a=null,s=null,f=i.lastLine();if(i.display.barWidth)for(var c=0,u;c<r.length;c++){var h=r[c];if(!(h.to.line>f)){for(var d=u||t(h.from,!0)*e,p=t(h.to,!1)*e;c<r.length-1&&!(r[c+1].to.line>f);){u=t(r[c+1].from,!0)*e;if(u>p+.9)break;h=r[++c];p=t(h.to,!1)*e}if(p!=d){p=Math.max(p-d,3);var m=n.appendChild(document.createElement("div"));m.style.cssText="position: absolute; right: 0px; width: "+Math.max(i.display.barWidth-1,2)+"px; top: "+(d+this.buttonHeight)+"px; height: "+p+"px";m.className=this.options.className;h.id&&m.setAttribute("annotation-id",h.id)}}}this.div.textContent="";this.div.appendChild(n)};t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler);this.cm.off("markerAdded",this.resizeHandler);this.cm.off("markerCleared",this.resizeHandler);this.changeHandler&&this.cm.off("changes",this.changeHandler);this.div.parentNode.removeChild(this.div)}});!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}(function(e){"use strict";function t(t,i,n){if(0>n&&0==i.ch)return t.clipPos(h(i.line-1));var r=t.getLine(i.line);if(n>0&&i.ch>=r.length)return t.clipPos(h(i.line+1,0));for(var o,l="start",a=i.ch,s=0>n?0:r.length,f=0;a!=s;a+=n,f++){var c=r.charAt(0>n?a-1:a),u="_"!=c&&e.isWordChar(c)?"w":"o";if("w"==u&&c.toUpperCase()==c&&(u="W"),"start"==l)"o"!=u&&(l="in",o=u);else if("in"==l&&o!=u){if("w"==o&&"W"==u&&0>n&&a--,"W"==o&&"w"==u&&n>0){o="w";continue}break}}return h(i.line,a)}function i(e,i){e.extendSelectionsBy(function(n){return e.display.shift||e.doc.extend||n.empty()?t(e.doc,n.head,i):0>i?n.from():n.to()})}function n(t,i){for(var n=i.ch,r=n,o=t.getLine(i.line);n&&e.isWordChar(o.charAt(n-1));)--n;for(;r<o.length&&e.isWordChar(o.charAt(r));)++r;return{from:h(i.line,n),to:h(i.line,r),word:o.slice(n,r)}}function r(e,t,i){for(var n=0;n<e.length;n++)if(e[n].from()==t&&e[n].to()==i)return!0;return!1}function o(e){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){var r=t[n],o=r.head,l=e.scanForBracket(o,-1);if(!l)return!1;for(;;){var a=e.scanForBracket(o,1);if(!a)return!1;if(a.ch==v.charAt(v.indexOf(l.ch)+1)){i.push({anchor:h(l.pos.line,l.pos.ch+1),head:a.pos});break}o=h(a.pos.line,a.pos.ch+1)}}return e.setSelections(i),!0}function l(t,i){if(t.isReadOnly())return e.Pass;for(var n,r=t.listSelections(),o=[],l=0;l<r.length;l++){var a=r[l];if(!a.empty()){for(var s=a.from().line,f=a.to().line;l<r.length-1&&r[l+1].from().line==f;)f=r[++l].to().line;r[l].to().ch||f--,o.push(s,f)}}o.length?n=!0:o.push(t.firstLine(),t.lastLine()),t.operation(function(){for(var e=[],r=0;r<o.length;r+=2){var l=o[r],a=o[r+1],s=h(l,0),f=h(a),c=t.getRange(s,f,!1);i?c.sort():c.sort(function(e,t){var i=e.toUpperCase(),n=t.toUpperCase();return i!=n&&(e=i,t=n),t>e?-1:e==t?0:1}),t.replaceRange(c,s,f),n&&e.push({anchor:s,head:h(a+1,0)})}n&&t.setSelections(e,0)})}function a(t,i){t.operation(function(){for(var r=t.listSelections(),o=[],l=[],a=0;a<r.length;a++){var s=r[a];s.empty()?(o.push(a),l.push("")):l.push(i(t.getRange(s.from(),s.to())))}t.replaceSelections(l,"around","case");for(var f,a=o.length-1;a>=0;a--){var s=r[o[a]];if(!(f&&e.cmpPos(s.head,f)>0)){var c=n(t,s.head);f=c.from,t.replaceRange(i(c.word),c.from,c.to)}}})}function s(t){var i=t.getCursor("from"),r=t.getCursor("to");if(0==e.cmpPos(i,r)){var o=n(t,i);if(!o.word)return;i=o.from,r=o.to}return{from:i,to:r,query:t.getRange(i,r),word:o}}function f(e,t){var i=s(e);if(i){var n=i.query,r=e.getSearchCursor(n,t?i.to:i.from);(t?r.findNext():r.findPrevious())?e.setSelection(r.from(),r.to()):(r=e.getSearchCursor(n,t?h(e.firstLine(),0):e.clipPos(h(e.lastLine()))),(t?r.findNext():r.findPrevious())?e.setSelection(r.from(),r.to()):i.word&&e.setSelection(i.from,i.to))}}var c=e.keyMap.sublime={fallthrough:"default"},u=e.commands,h=e.Pos,d=e.keyMap["default"]==e.keyMap.macDefault,p=d?"Cmd-":"Ctrl-",m=d?"Ctrl-":"Alt-";u[c[m+"Left"]="goSubwordLeft"]=function(e){i(e,-1)},u[c[m+"Right"]="goSubwordRight"]=function(e){i(e,1)},d&&(c["Cmd-Left"]="goLineStartSmart");var g=d?"Ctrl-Alt-":"Ctrl-";u[c[g+"Up"]="scrollLineUp"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var i=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=i&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},u[c[g+"Down"]="scrollLineDown"]=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var i=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=i&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},u[c["Shift-"+p+"L"]="splitSelectionByLine"]=function(e){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++)for(var r=t[n].from(),o=t[n].to(),l=r.line;l<=o.line;++l)o.line>r.line&&l==o.line&&0==o.ch||i.push({anchor:l==r.line?r:h(l,0),head:l==o.line?o:h(l)});e.setSelections(i,0)},c["Shift-Tab"]="indentLess",u[c.Esc="singleSelectionTop"]=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},u[c[p+"L"]="selectLine"]=function(e){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){var r=t[n];i.push({anchor:h(r.from().line,0),head:h(r.to().line+1,0)})}e.setSelections(i)},c["Shift-Ctrl-K"]="deleteLine",u[c[p+"D"]="selectNextOccurrence"]=function(t){var i=t.getCursor("from"),o=t.getCursor("to"),l=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(i,o)){var a=n(t,i);if(!a.word)return;t.setSelection(a.from,a.to),l=!0}else{var s=t.getRange(i,o),f=l?new RegExp("\\b"+s+"\\b"):s,c=t.getSearchCursor(f,o),u=c.findNext();if(u||(c=t.getSearchCursor(f,h(t.firstLine(),0)),u=c.findNext()),!u||r(t.listSelections(),c.from(),c.to()))return e.Pass;t.addSelection(c.from(),c.to())}l&&(t.state.sublimeFindFullWord=t.doc.sel)};var v="(){}[]";u[c["Shift-"+p+"Space"]="selectScope"]=function(e){o(e)||e.execCommand("selectAll")},u[c["Shift-"+p+"M"]="selectBetweenBrackets"]=function(t){return o(t)?void 0:e.Pass},u[c[p+"M"]="goToBracket"]=function(t){t.extendSelectionsBy(function(i){var n=t.scanForBracket(i.head,1);if(n&&0!=e.cmpPos(n.pos,i.head))return n.pos;var r=t.scanForBracket(i.head,-1);return r&&h(r.pos.line,r.pos.ch+1)||i.head})};var y=d?"Cmd-Ctrl-":"Shift-Ctrl-";u[c[y+"Up"]="swapLineUp"]=function(t){if(t.isReadOnly())return e.Pass;for(var i=t.listSelections(),n=[],r=t.firstLine()-1,o=[],l=0;l<i.length;l++){var a=i[l],s=a.from().line-1,f=a.to().line;o.push({anchor:h(a.anchor.line-1,a.anchor.ch),head:h(a.head.line-1,a.head.ch)}),0!=a.to().ch||a.empty()||--f,s>r?n.push(s,f):n.length&&(n[n.length-1]=f),r=f}t.operation(function(){for(var e=0;e<n.length;e+=2){var i=n[e],r=n[e+1],l=t.getLine(i);t.replaceRange("",h(i,0),h(i+1,0),"+swapLine"),r>t.lastLine()?t.replaceRange("\n"+l,h(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",h(r,0),null,"+swapLine")}t.setSelections(o),t.scrollIntoView()})},u[c[y+"Down"]="swapLineDown"]=function(t){if(t.isReadOnly())return e.Pass;for(var i=t.listSelections(),n=[],r=t.lastLine()+1,o=i.length-1;o>=0;o--){var l=i[o],a=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||a--,r>a?n.push(a,s):n.length&&(n[n.length-1]=s),r=s}t.operation(function(){for(var e=n.length-2;e>=0;e-=2){var i=n[e],r=n[e+1],o=t.getLine(i);i==t.lastLine()?t.replaceRange("",h(i-1),h(i),"+swapLine"):t.replaceRange("",h(i,0),h(i+1,0),"+swapLine"),t.replaceRange(o+"\n",h(r,0),null,"+swapLine")}t.scrollIntoView()})},u[c[p+"/"]="toggleCommentIndented"]=function(e){e.toggleComment({indent:!0})},u[c[p+"J"]="joinLines"]=function(e){for(var t=e.listSelections(),i=[],n=0;n<t.length;n++){for(var r=t[n],o=r.from(),l=o.line,a=r.to().line;n<t.length-1&&t[n+1].from().line==a;)a=t[++n].to().line;i.push({start:l,end:a,anchor:!r.empty()&&o})}e.operation(function(){for(var t=0,n=[],r=0;r<i.length;r++){for(var o,l=i[r],a=l.anchor&&h(l.anchor.line-t,l.anchor.ch),s=l.start;s<=l.end;s++){var f=s-t;s==l.end&&(o=h(f,e.getLine(f).length+1)),f<e.lastLine()&&(e.replaceRange(" ",h(f),h(f+1,/^\s*/.exec(e.getLine(f+1))[0].length)),++t)}n.push({anchor:a||o,head:o})}e.setSelections(n,0)})},u[c["Shift-"+p+"D"]="duplicateLine"]=function(e){e.operation(function(){for(var t=e.listSelections().length,i=0;t>i;i++){var n=e.listSelections()[i];n.empty()?e.replaceRange(e.getLine(n.head.line)+"\n",h(n.head.line,0)):e.replaceRange(e.getRange(n.from(),n.to()),n.from())}e.scrollIntoView()})},d||(c[p+"T"]="transposeChars"),u[c.F9="sortLines"]=function(e){l(e,!0)},u[c[p+"F9"]="sortLinesInsensitive"]=function(e){l(e,!1)},u[c.F2="nextBookmark"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){var i=t.shift(),n=i.find();if(n)return t.push(i),e.setSelection(n.from,n.to)}},u[c["Shift-F2"]="prevBookmark"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(;t.length;){t.unshift(t.pop());var i=t[t.length-1].find();if(i)return e.setSelection(i.from,i.to);t.pop()}},u[c[p+"F2"]="toggleBookmark"]=function(e){for(var t=e.listSelections(),i=e.state.sublimeBookmarks||(e.state.sublimeBookmarks=[]),n=0;n<t.length;n++){for(var r=t[n].from(),o=t[n].to(),l=e.findMarks(r,o),a=0;a<l.length;a++)if(l[a].sublimeBookmark){l[a].clear();for(var s=0;s<i.length;s++)i[s]==l[a]&&i.splice(s--,1);break}a==l.length&&i.push(e.markText(r,o,{sublimeBookmark:!0,clearWhenEmpty:!1}))}},u[c["Shift-"+p+"F2"]="clearBookmarks"]=function(e){var t=e.state.sublimeBookmarks;if(t)for(var i=0;i<t.length;i++)t[i].clear();t.length=0},u[c["Alt-F2"]="selectBookmarks"]=function(e){var t=e.state.sublimeBookmarks,i=[];if(t)for(var n=0;n<t.length;n++){var r=t[n].find();r?i.push({anchor:r.from,head:r.to}):t.splice(n--,0)}i.length&&e.setSelections(i,0)},c["Alt-Q"]="wrapLines";var x=p+"K ";c[x+p+"Backspace"]="delLineLeft",u[c.Backspace="smartBackspace"]=function(t){return t.somethingSelected()?e.Pass:void t.operation(function(){for(var i=t.listSelections(),n=t.getOption("indentUnit"),r=i.length-1;r>=0;r--){var o=i[r].head,l=t.getRange({line:o.line,ch:0},o),a=e.countColumn(l,null,t.getOption("tabSize")),s=t.findPosH(o,-1,"char",!1);if(l&&!/\S/.test(l)&&a%n==0){var f=new h(o.line,e.findColumn(l,a-n,n));f.ch!=o.ch&&(s=f)}t.replaceRange("",s,o,"+delete")}})},u[c[x+p+"K"]="delLineRight"]=function(e){e.operation(function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange("",t[i].anchor,h(t[i].to().line),"+delete");e.scrollIntoView()})},u[c[x+p+"U"]="upcaseAtCursor"]=function(e){a(e,function(e){return e.toUpperCase()})},u[c[x+p+"L"]="downcaseAtCursor"]=function(e){a(e,function(e){return e.toLowerCase()})},u[c[x+p+"Space"]="setSublimeMark"]=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},u[c[x+p+"A"]="selectToSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},u[c[x+p+"W"]="deleteToSublimeMark"]=function(t){var i=t.state.sublimeMark&&t.state.sublimeMark.find();if(i){var n=t.getCursor(),r=i;if(e.cmpPos(n,r)>0){var o=r;r=n,n=o}t.state.sublimeKilled=t.getRange(n,r),t.replaceRange("",n,r)}},u[c[x+p+"X"]="swapWithSublimeMark"]=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},u[c[x+p+"Y"]="sublimeYank"]=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},c[x+p+"G"]="clearBookmarks",u[c[x+p+"C"]="showInCenter"]=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)};var b=d?"Ctrl-Shift-":"Ctrl-Alt-";u[c[b+"Up"]="selectLinesUpward"]=function(e){e.operation(function(){for(var t=e.listSelections(),i=0;i<t.length;i++){var n=t[i];n.head.line>e.firstLine()&&e.addSelection(h(n.head.line-1,n.head.ch))}})},u[c[b+"Down"]="selectLinesDownward"]=function(e){e.operation(function(){for(var t=e.listSelections(),i=0;i<t.length;i++){var n=t[i];n.head.line<e.lastLine()&&e.addSelection(h(n.head.line+1,n.head.ch))}})},u[c[p+"F3"]="findUnder"]=function(e){f(e,!0)},u[c["Shift-"+p+"F3"]="findUnderPrevious"]=function(e){f(e,!1)},u[c["Alt-F3"]="findAllUnder"]=function(e){var t=s(e);if(t){for(var i=e.getSearchCursor(t.query),n=[],r=-1;i.findNext();)n.push({anchor:i.from(),head:i.to()}),i.from().line<=t.from.line&&i.from().ch<=t.from.ch&&r++;e.setSelections(n,r)}},c["Shift-"+p+"["]="fold",c["Shift-"+p+"]"]="unfold",c[x+p+"0"]=c[x+p+"J"]="unfoldAll",c[p+"I"]="findIncremental",c["Shift-"+p+"I"]="findIncrementalReverse",c[p+"H"]="replace",c.F3="findNext",c["Shift-F3"]="findPrev",e.normalizeKeyMap(c)});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e,t,n){var r=e.getLineHandle(t.line),o=t.ch-1,l=n&&n.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var f=n&&n.bracketRegex||/[(){}[\]]/;r=!l&&0<=o&&f.test(r.text.charAt(o))&&s[r.text.charAt(o)]||f.test(r.text.charAt(o+1))&&s[r.text.charAt(++o)];if(!r)return null;l=">"==r.charAt(1)?1:-1;if(n&&n.strict&&0<l!=(o==t.ch))return null;f=e.getTokenTypeAt(a(t.line,o+1));e=i(e,a(t.line,o+(0<l?1:0)),l,f,n);return null==e?null:{from:a(t.line,o),to:e&&e.pos,match:e&&e.ch==r.charAt(0),forward:0<l}}function i(e,t,i,n,r){var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,f=[];r=r&&r.bracketRegex||/[(){}[\]]/;l=0<i?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l);for(var c=t.line;c!=l;c+=i){var u=e.getLine(c);if(u){var h=0<i?0:u.length-1,d=0<i?u.length:-1;if(!(u.length>o))for(c==t.line&&(h=t.ch-(0>i?1:0));h!=d;h+=i){var p=u.charAt(h);if(r.test(p)&&(void 0===n||(e.getTokenTypeAt(a(c,h+1))||"")==(n||""))){var m=s[p];if(m&&">"==m.charAt(1)==0<i)f.push(p);else if(f.length)f.pop();else return{pos:a(c,h),ch:p}}}}}return c-i==(0<i?e.lastLine():e.firstLine())?!1:null}function n(e,i,n){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,o=n&&n.highlightNonMatching,s=[],f=e.listSelections(),c=0;c<f.length;c++){var u=f[c].empty()&&t(e,f[c].head,n);if(u&&(u.match||!1!==o)&&e.getLine(u.from.line).length<=r){var h=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(u.from,a(u.from.line,u.from.ch+1),{className:h}));u.to&&e.getLine(u.to.line).length<=r&&s.push(e.markText(u.to,a(u.to.line,u.to.ch+1),{className:h}))}}if(s.length)if(l&&e.state.focused&&e.focus(),n=function(){e.operation(function(){for(var e=0;e<s.length;e++)s[e].clear()})},i)setTimeout(n,800);else return n}function r(e){e.operation(function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null);e.state.matchBrackets.currentlyHighlighted=n(e,!1,e.state.matchBrackets)})}function o(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}var l=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||8>document.documentMode),a=e.Pos,s={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};e.defineOption("matchBrackets",!1,function(t,i,n){n&&n!=e.Init&&(t.off("cursorActivity",r),t.off("focus",r),t.off("blur",o),o(t));i&&(t.state.matchBrackets="object"==typeof i?i:{},t.on("cursorActivity",r),t.on("focus",r),t.on("blur",o))});e.defineExtension("matchBrackets",function(){n(this,!0)});e.defineExtension("findMatchingBracket",function(e,i,n){if(n||"boolean"==typeof i)n?(n.strict=i,i=n):i=i?{strict:!0}:null;return t(this,e,i)});e.defineExtension("scanForBracket",function(e,t,n,r){return i(this,e,t,n,r)})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:f[t]}function i(e){for(var t=0;t<e.length;t++){var i=e.charAt(t),r="'"+i+"'";u[r]||(u[r]=n(i))}}function n(e){return function(t){return l(t,e)}}function r(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function o(e,t){for(var i=[],n=e.listSelections(),r=0,o=0;o<n.length;o++){var l=n[o];l.head==e.getCursor()&&(r=o);l=l.head.ch||0<t?{line:l.head.line,ch:l.head.ch+t}:{line:l.head.line-1};i.push({anchor:l,head:l})}e.setSelections(i,r)}function l(i,n){var l=r(i);if(!l||i.getOption("disableInput"))return e.Pass;var a=t(l,"pairs"),f=a.indexOf(n);if(-1==f)return e.Pass;var u=t(l,"closeBefore");l=t(l,"triples");for(var h=a.charAt(f+1)==n,d=i.listSelections(),p=0==f%2,m,g=0;g<d.length;g++){var v=d[g],y=v.head;var x=i.getRange(y,c(y.line,y.ch+1));if(p&&!v.empty())x="surround";else if(!h&&p||x!=n)if(h&&1<y.ch&&0<=l.indexOf(n)&&i.getRange(c(y.line,y.ch-2),y)==n+n){if(2<y.ch&&/\bstring/.test(i.getTokenTypeAt(c(y.line,y.ch-2))))return e.Pass;x="addFour"}else if(h){v=0==y.ch?" ":i.getRange(c(y.line,y.ch-1),y);if(e.isWordChar(x)||v==n||e.isWordChar(v))return e.Pass;x="both"}else if(p&&(0===x.length||/\s/.test(x)||-1<u.indexOf(x)))x="both";else return e.Pass;else x=h&&s(i,y)?"both":0<=l.indexOf(n)&&i.getRange(y,c(y.line,y.ch+3))==n+n+n?"skipThree":"skip";if(!m)m=x;else if(m!=x)return e.Pass}var b=f%2?a.charAt(f-1):n,w=f%2?n:a.charAt(f+1);i.operation(function(){if("skip"==m)o(i,1);else if("skipThree"==m)o(i,3);else if("surround"==m){for(var t=i.getSelections(),n=0;n<t.length;n++)t[n]=b+t[n]+w;i.replaceSelections(t,"around");t=i.listSelections().slice();for(n=0;n<t.length;n++){var r=t,l=n;var a=t[n];var s=0<e.cmpPos(a.anchor,a.head);a={anchor:new c(a.anchor.line,a.anchor.ch+(s?-1:1)),head:new c(a.head.line,a.head.ch+(s?1:-1))};r[l]=a}i.setSelections(t)}else"both"==m?(i.replaceSelection(b+w,null),i.triggerElectric(b+w),o(i,-1)):"addFour"==m&&(i.replaceSelection(b+b+b+b,"before"),o(i,1))})}function a(e,t){var i=e.getRange(c(t.line,t.ch-1),c(t.line,t.ch+1));return 2==i.length?i:null}function s(e,t){var i=e.getTokenAt(c(t.line,t.ch+1));return/\bstring/.test(i.type)&&i.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}var f={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},c=e.Pos;e.defineOption("autoCloseBrackets",!1,function(n,r,o){o&&o!=e.Init&&(n.removeKeyMap(u),n.state.closeBrackets=null);r&&(i(t(r,"pairs")),n.state.closeBrackets=r,n.addKeyMap(u))});var u={Backspace:function(i){var n=r(i);if(!n||i.getOption("disableInput"))return e.Pass;var o=t(n,"pairs");n=i.listSelections();for(var l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var s=a(i,n[l].head);if(!s||0!=o.indexOf(s)%2)return e.Pass}for(l=n.length-1;0<=l;l--)o=n[l].head,i.replaceRange("",c(o.line,o.ch-1),c(o.line,o.ch+1),"+delete")},Enter:function(i){var n=r(i);n=n&&t(n,"explode");if(!n||i.getOption("disableInput"))return e.Pass;for(var l=i.listSelections(),s=0;s<l.length;s++){if(!l[s].empty())return e.Pass;var f=a(i,l[s].head);if(!f||0!=n.indexOf(f)%2)return e.Pass}i.operation(function(){var e=i.lineSeparator()||"\n";i.replaceSelection(e+e,null);o(i,-1);l=i.listSelections();for(e=0;e<l.length;e++){var t=l[e].head.line;i.indentLine(t,null,!0);i.indentLine(t+1,null,!0)}})}};i(f.pairs+"`")});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){e.registerHelper("fold","brace",function(t,i){function n(n){for(var a=i.ch,s=0;;)if(a=0>=a?-1:o.lastIndexOf(n,a-1),-1==a){if(1==s)break;s=1;a=o.length}else{if(1==s&&a<i.ch)break;l=t.getTokenTypeAt(e.Pos(r,a+1));if(!/^(comment|string)/.test(l))return a+1;--a}}var r=i.line,o=t.getLine(r),l,a=n("{"),s=n("[");if(null!=a&&(null==s||s>a)){var f=a;a="{";s="}"}else if(null!=s)f=s,a="[",s="]";else return;var c=1,u=t.lastLine(),h=r;e:for(;h<=u;++h)for(var d=t.getLine(h),p=h==r?f:0;;){var m=d.indexOf(a,p);p=d.indexOf(s,p);0>m&&(m=d.length);0>p&&(p=d.length);p=Math.min(m,p);if(p==d.length)break;if(t.getTokenTypeAt(e.Pos(h,p+1))==l)if(p==m)++c;else if(!--c){var g=h;var v=p;break e}++p}if(null!=g&&r!=g)return{from:e.Pos(r,f),to:e.Pos(g,v)}});e.registerHelper("fold","import",function(t,i){function n(i){if(i<t.firstLine()||i>t.lastLine())return null;var n=t.getTokenAt(e.Pos(i,1));/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(i,n.end+1)));if("keyword"!=n.type||"import"!=n.string)return null;var r=i;for(i=Math.min(t.lastLine(),i+10);r<=i;++r){var o=t.getLine(r).indexOf(";");if(-1!=o)return{startCh:n.end,end:e.Pos(r,o)}}}var r=i.line,o=n(r),l;if(!o||n(r-1)||(l=n(r-2))&&l.end.line==r-1)return null;for(l=o.end;;){var a=n(l.line+1);if(null==a)break;l=a.end}return{from:t.clipPos(e.Pos(r,o.startCh+1)),to:l}});e.registerHelper("fold","include",function(t,i){function n(i){if(i<t.firstLine()||i>t.lastLine())return null;var n=t.getTokenAt(e.Pos(i,1));/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(i,n.end+1)));if("meta"==n.type&&"#include"==n.string.slice(0,8))return n.start+8}var r=i.line,o=n(r);if(null==o||null!=n(r-1))return null;for(var l=r;null!=n(l+1);)++l;return{from:e.Pos(r,o+1),to:t.clipPos(e.Pos(l))}})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){e.registerGlobalHelper("fold","comment",function(e){return e.blockCommentStart&&e.blockCommentEnd},function(t,i){var n=t.getModeAt(i),r=n.blockCommentStart;n=n.blockCommentEnd;if(r&&n){for(var o=i.line,l=t.getLine(o),a=i.ch,s=0;;)if(a=0>=a?-1:l.lastIndexOf(r,a-1),-1==a){if(1==s)return;s=1;a=l.length}else{if(1==s&&a<i.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(o,a+1)))&&(0==a||l.slice(a-n.length,a)==n||!/comment/.test(t.getTokenTypeAt(e.Pos(o,a))))){l=a+r.length;break}--a}s=1;a=t.lastLine();var f=o;e:for(;f<=a;++f)for(var c=t.getLine(f),u=f==o?l:0;;){var h=c.indexOf(r,u);u=c.indexOf(n,u);0>h&&(h=c.length);0>u&&(u=c.length);u=Math.min(h,u);if(u==c.length)break;if(u==h)++s;else if(!--s){var d=f;var p=u;break e}++u}if(null!=d&&(o!=d||p!=l))return{from:e.Pos(o,l),to:e.Pos(d,p)}}})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(t,r,o,l){function a(e){var i=s(t,r);if(!i||i.to.line-i.from.line<f)return null;if("fold"===l)return i;for(var n=t.findMarksAt(i.from),o=0;o<n.length;++o)if(n[o].__isFold){if(!e)return null;i.cleared=!0;n[o].clear()}return i}if(o&&o.call){var s=o;o=null}else s=n(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var f=n(t,o,"minFoldSize"),c=a(!0);if(n(t,o,"scanUp"))for(;!c&&r.line>t.firstLine();)r=e.Pos(r.line-1,0),c=a(!1);if(c&&!c.cleared&&"unfold"!==l){var u=i(t,o,c);e.on(u,"mousedown",function(t){h.clear();e.e_preventDefault(t)});var h=t.markText(c.from,c.to,{replacedWith:u,clearOnEnter:n(t,o,"clearOnEnter"),__isFold:!0});h.on("clear",function(i,n){e.signal(t,"unfold",t,i,n)});e.signal(t,"fold",t,c.from,c.to)}}function i(e,t,i){e=n(e,t,"widget");"function"==typeof e&&(e=e(i.from,i.to));"string"==typeof e?(i=document.createTextNode(e),e=document.createElement("span"),e.appendChild(i),e.className="CodeMirror-foldmarker"):e&&(e=e.cloneNode(!0));return e}function n(e,t,i){return t&&void 0!==t[i]?t[i]:(e=e.options.foldOptions)&&void 0!==e[i]?e[i]:r[i]}e.newFoldFunction=function(e,i){return function(n,r){t(n,r,{rangeFinder:e,widget:i})}};e.defineExtension("foldCode",function(e,i,n){t(this,e,i,n)});e.defineExtension("isFolded",function(e){e=this.findMarksAt(e);for(var t=0;t<e.length;++t)if(e[t].__isFold)return!0});e.commands.toggleFold=function(e){e.foldCode(e.getCursor())};e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")};e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")};e.commands.foldAll=function(t){t.operation(function(){for(var i=t.firstLine(),n=t.lastLine();i<=n;i++)t.foldCode(e.Pos(i,0),{scanUp:!1},"fold")})};e.commands.unfoldAll=function(t){t.operation(function(){for(var i=t.firstLine(),n=t.lastLine();i<=n;i++)t.foldCode(e.Pos(i,0),{scanUp:!1},"unfold")})};e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,i){for(var n=0;n<e.length;++n){var r=e[n](t,i);if(r)return r}}});e.registerHelper("fold","auto",function(e,t){for(var i=e.getHelpers(t,"fold"),n=0;n<i.length;n++){var r=i[n](e,t);if(r)return r}});var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption("foldOptions",null);e.defineExtension("foldOption",function(e,t){return n(this,e,t)})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],e):e(CodeMirror)})(function(e){function t(e){this.options=e;this.from=this.to=0}function i(e,t){for(var i=e.findMarks(c(t,0),c(t+1,0)),n=0;n<i.length;++n)if(i[n].__isFold){var r=i[n].find(-1);if(r&&r.line===t)return i[n]}}function n(e){if("string"==typeof e){var t=document.createElement("div");t.className=e+" CodeMirror-guttermarker-subtle";return t}return e.cloneNode(!0)}function r(e,t,r){var o=e.state.foldGutter.options,l=t-1,a=e.foldOption(o,"minFoldSize"),s=e.foldOption(o,"rangeFinder"),f="string"==typeof o.indicatorFolded&&new RegExp("(^|\\s)"+o.indicatorFolded+"(?:$|\\s)\\s*"),u="string"==typeof o.indicatorOpen&&new RegExp("(^|\\s)"+o.indicatorOpen+"(?:$|\\s)\\s*");e.eachLine(t,r,function(t){++l;var r=null,h=t.gutterMarkers;h&&(h=h[o.gutter]);if(i(e,l)){if(f&&h&&f.test(h.className))return;r=n(o.indicatorFolded)}else{var d=c(l,0);if((d=s&&s(e,d))&&d.to.line-d.from.line>=a){if(u&&h&&u.test(h.className))return;r=n(o.indicatorOpen)}}(r||h)&&e.setGutterMarker(t,o.gutter,r)})}function o(e){var t=e.getViewport(),i=e.state.foldGutter;i&&(e.operation(function(){r(e,t.from,t.to)}),i.from=t.from,i.to=t.to)}function l(e,t,n){var r=e.state.foldGutter;r&&(r=r.options,n==r.gutter&&((n=i(e,t))?n.clear():e.foldCode(c(t,0),r)))}function a(e){var t=e.state.foldGutter;if(t){var i=t.options;t.from=t.to=0;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){o(e)},i.foldOnChangeTimeSpan||600)}}function s(e){var t=e.state.foldGutter;if(t){var i=t.options;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){var i=e.getViewport();t.from==t.to||20<i.from-t.to||20<t.from-i.to?o(e):e.operation(function(){i.from<t.from&&(r(e,i.from,t.from),t.from=i.from);i.to>t.to&&(r(e,t.to,i.to),t.to=i.to)})},i.updateViewportTimeSpan||400)}}function f(e,t){var i=e.state.foldGutter;if(i){var n=t.line;n>=i.from&&n<i.to&&r(e,n,n+1)}}e.defineOption("foldGutter",!1,function(i,n,r){r&&r!=e.Init&&(i.clearGutter(i.state.foldGutter.options.gutter),i.state.foldGutter=null,i.off("gutterClick",l),i.off("changes",a),i.off("viewportChange",s),i.off("fold",f),i.off("unfold",f),i.off("swapDoc",a));n&&(r=i.state,!0===n&&(n={}),null==n.gutter&&(n.gutter="CodeMirror-foldgutter"),null==n.indicatorOpen&&(n.indicatorOpen="CodeMirror-foldgutter-open"),null==n.indicatorFolded&&(n.indicatorFolded="CodeMirror-foldgutter-folded"),r.foldGutter=new t(n),o(i),i.on("gutterClick",l),i.on("changes",a),i.on("viewportChange",s),i.on("fold",f),i.on("unfold",f),i.on("swapDoc",a))});var c=e.Pos});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(t,i){var n=t.getLine(i),r=n.search(/\S/);return-1==r||/\bcomment\b/.test(t.getTokenTypeAt(e.Pos(i,r+1)))?-1:e.countColumn(n,null,t.getOption("tabSize"))}e.registerHelper("fold","indent",function(i,n){var r=t(i,n.line);if(!(0>r)){for(var o=null,l=n.line+1,a=i.lastLine();l<=a;++l){var s=t(i,l);if(-1!=s)if(s>r)o=l;else break}if(o)return{from:e.Pos(n.line,i.getLine(n.line).length),to:e.Pos(o,i.getLine(o).length)}}})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){e.registerHelper("fold","markdown",function(t,i){function n(i){return(i=t.getTokenTypeAt(e.Pos(i,0)))&&/\bheader\b/.test(i)}function r(e,t,i){return(t=t&&t.match(/^#+/))&&n(e)?t[0].length:(t=i&&i.match(/^[=\-]+\s*$/))&&n(e+1)?"="==i[0]?1:2:100}var o=t.getLine(i.line),l=t.getLine(i.line+1),a=r(i.line,o,l);if(100!==a){for(var s=t.lastLine(),f=i.line,c=t.getLine(f+2);f<s&&!(r(f+1,l,c)<=a);)++f,l=c,c=t.getLine(f+2);return{from:e.Pos(i.line,o.length),to:e.Pos(f,t.getLine(f).length)}}})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e,t,i,n){this.line=t;this.ch=i;this.cm=e;this.text=e.getLine(t);this.min=n?Math.max(n.from,e.firstLine()):e.firstLine();this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function i(e,t){var i=e.cm.getTokenTypeAt(c(e.line,t));return i&&/\btag\b/.test(i)}function n(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function r(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function o(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t)if(n(e))continue;else break;if(i(e,t+1)){var r=e.text.lastIndexOf("/",t);r=-1<r&&!/\S/.test(e.text.slice(r+1,t));e.ch=t+1;return r?"selfClose":"regular"}e.ch=t+1}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t)if(r(e))continue;else break;if(i(e,t+1)){u.lastIndex=t;e.ch=t;var n=u.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function a(e){for(;;){u.lastIndex=e.ch;var t=u.exec(e.text);if(!t)if(n(e))continue;else break;if(i(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function s(e,t){for(var i=[];;){var n=a(e),r,l=e.line,s=e.ch-(n?n[0].length:0);if(!n||!(r=o(e)))break;if("selfClose"!=r)if(n[1]){for(var f=i.length-1;0<=f;--f)if(i[f]==n[2]){i.length=f;break}if(0>f&&(!t||t==n[2]))return{tag:n[2],from:c(l,s),to:c(e.line,e.ch)}}else i.push(n[2])}}function f(e,t){for(var n=[];;){var o;e:for(o=e;;){var a=o.ch?o.text.lastIndexOf(">",o.ch-1):-1;if(-1==a)if(r(o))continue;else{o=void 0;break e}if(i(o,a+1)){var s=o.text.lastIndexOf("/",a);s=-1<s&&!/\S/.test(o.text.slice(s+1,a));o.ch=a+1;o=s?"selfClose":"regular";break e}else o.ch=a}if(!o)break;if("selfClose"==o)l(e);else{o=e.line;a=e.ch;s=l(e);if(!s)break;if(s[1])n.push(s[2]);else{for(var f=n.length-1;0<=f;--f)if(n[f]==s[2]){n.length=f;break}if(0>f&&(!t||t==s[2]))return{tag:s[2],from:c(e.line,e.ch),to:c(o,a)}}}}}var c=e.Pos,u=RegExp("<(/?)([A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,i){for(var n=new t(e,i.line,0);;){var r=a(n);if(!r||n.line!=i.line)break;var l=o(n);if(!l)break;if(!r[1]&&"selfClose"!=l){l=c(n.line,n.ch);if(r=n=s(n,r[2]))r=n.from,r=0<(r.line-l.line||r.ch-l.ch);return r?{from:l,to:n.from}:null}}});e.findMatchingTag=function(e,i,n){var r=new t(e,i.line,i.ch,n);if(-1!=r.text.indexOf(">")||-1!=r.text.indexOf("<")){var a=o(r),u=a&&c(r.line,r.ch),h=a&&l(r);if(a&&h&&!(0<(r.line-i.line||r.ch-i.ch))){i={from:c(r.line,r.ch),to:u,tag:h[2]};if("selfClose"==a)return{open:i,close:null,at:"open"};if(h[1])return{open:f(r,h[2]),close:i,at:"close"};r=new t(e,u.line,u.ch,n);return{open:i,close:s(r,h[2]),at:"open"}}}};e.findEnclosingTag=function(e,i,n,r){for(var o=new t(e,i.line,i.ch,n);;){var l=f(o,r);if(!l)break;var a=new t(e,i.line,i.ch,n);if(a=s(a,l.tag))return{open:l,close:a}}};e.scanForClosingTag=function(e,i,n,r){e=new t(e,i.line,i.ch,r?{from:0,to:r}:null);return s(e,n)}});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e,t){this.cm=e;this.options=t;this.widget=null;this.tick=this.debounce=0;this.startPos=this.cm.getCursor("start");this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;if(this.options.updateOnCursorActivity){var i=this;e.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}function i(e,t){function i(e,i){var r="string"!=typeof i?function(e){return i(e,t)}:n.hasOwnProperty(i)?n[i]:i;o[e]=r}var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,o=r?{}:n;if(r)for(var l in r)r.hasOwnProperty(l)&&i(l,r[l]);if(r=e.options.extraKeys)for(l in r)r.hasOwnProperty(l)&&i(l,r[l]);return o}function n(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function r(t,r){this.id="cm-complete-"+Math.floor(Math.random(1e6));this.completion=t;this.data=r;this.picked=!1;var o=this,l=t.cm,a=l.getInputField().ownerDocument,s=a.defaultView||a.parentWindow,f=this.hints=a.createElement("ul");f.setAttribute("role","listbox");f.setAttribute("aria-expanded","true");f.id=this.id;f.className="CodeMirror-hints "+t.cm.options.theme;this.selectedHint=r.selectedHint||0;for(var c=r.list,u=0;u<c.length;++u){var h=f.appendChild(a.createElement("li")),d=c[u],p="CodeMirror-hint"+(u!=this.selectedHint?"":" CodeMirror-hint-active");null!=d.className&&(p=d.className+" "+p);h.className=p;u==this.selectedHint&&h.setAttribute("aria-selected","true");h.id=this.id+"-"+u;h.setAttribute("role","option");d.render?d.render(h,r,d):h.appendChild(a.createTextNode(d.displayText||("string"==typeof d?d:d.text)));h.hintId=u}var m=t.options.container||a.body;u=l.cursorCoords(t.options.alignWithWord?r.from:null);var g=u.left,v=u.bottom,y=!0;p=h=0;if(m!==a.body){d=-1!==["absolute","relative","fixed"].indexOf(s.getComputedStyle(m).position)?m:m.offsetParent;p=d.getBoundingClientRect();var x=a.body.getBoundingClientRect();h=p.left-x.left-d.scrollLeft;p=p.top-x.top-d.scrollTop}f.style.left=g-h+"px";f.style.top=v-p+"px";d=s.innerWidth||Math.max(a.body.offsetWidth,a.documentElement.offsetWidth);x=s.innerHeight||Math.max(a.body.offsetHeight,a.documentElement.offsetHeight);m.appendChild(f);l.getInputField().setAttribute("aria-autocomplete","list");l.getInputField().setAttribute("aria-owns",this.id);l.getInputField().setAttribute("aria-activedescendant",this.id+"-"+this.selectedHint);m=t.options.moveOnOverlap?f.getBoundingClientRect():new DOMRect;var b=t.options.paddingForScrollbar?f.scrollHeight>f.clientHeight+1:!1,w;setTimeout(function(){w=l.getScrollInfo()});if(0<m.bottom-x){var C=m.bottom-m.top,S=m.top-(u.bottom-u.top)-2;x-m.top<S?(C>S&&(f.style.height=(C=S)+"px"),f.style.top=(v=u.top-C)+p+"px",y=!1):f.style.height=x-m.top-2+"px"}p=m.right-d;b&&(p+=l.display.nativeBarWidth);0<p&&(m.right-m.left>d&&(f.style.width=d-5+"px",p-=m.right-m.left-d),f.style.left=(g=Math.max(u.left-p-h,0))+"px");if(b)for(u=f.firstChild;u;u=u.nextSibling)u.style.paddingRight=l.display.nativeBarWidth+"px";l.addKeyMap(this.keyMap=i(t,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:c.length,close:function(){t.close()},pick:function(){o.pick()},data:r}));if(t.options.closeOnUnfocus){var k;l.on("blur",this.onBlur=function(){k=setTimeout(function(){t.close()},100)});l.on("focus",this.onFocus=function(){clearTimeout(k)})}l.on("scroll",this.onScroll=function(){var e=l.getScrollInfo(),i=l.getWrapperElement().getBoundingClientRect();w||(w=l.getScrollInfo());var n=v+w.top-e.top,r=n-(s.pageYOffset||(a.documentElement||a.body).scrollTop);y||(r+=f.offsetHeight);if(r<=i.top||r>=i.bottom)return t.close();f.style.top=n+"px";f.style.left=g+w.left-e.left+"px"});e.on(f,"dblclick",function(e){(e=n(f,e.target||e.srcElement))&&null!=e.hintId&&(o.changeActive(e.hintId),o.pick())});e.on(f,"click",function(e){(e=n(f,e.target||e.srcElement))&&null!=e.hintId&&(o.changeActive(e.hintId),t.options.completeOnSingleClick&&o.pick())});e.on(f,"mousedown",function(){setTimeout(function(){l.focus()},20)});u=this.getSelectedHintRange();0===u.from&&0===u.to||this.scrollToActive();e.signal(r,"select",c[this.selectedHint],f.childNodes[this.selectedHint]);return!0}function o(e,t){if(!e.somethingSelected())return t;for(var i=[],n=0;n<t.length;n++)t[n].supportsSelection&&i.push(t[n]);return i}function l(e,t,i,n){e.async?e(t,n,i):(e=e(t,i))&&e.then?e.then(n):n(e)}e.showHint=function(e,t,i){if(!t)return e.showHint(i);i&&i.async&&(t.async=!0);t={hint:t};if(i)for(var n in i)t[n]=i[n];return e.showHint(t)};e.defineExtension("showHint",function(i){var n=this.getCursor("start"),r=this.options.hintOptions,o={},l;for(l in f)o[l]=f[l];if(r)for(l in r)void 0!==r[l]&&(o[l]=r[l]);if(i)for(l in i)void 0!==i[l]&&(o[l]=i[l]);o.hint.resolve&&(o.hint=o.hint.resolve(this,n));i=o;n=this.listSelections();if(!(1<n.length)){if(this.somethingSelected()){if(!i.hint.supportsSelection)return;for(l=0;l<n.length;l++)if(n[l].head.line!=n[l].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();n=this.state.completionActive=new t(this,i);n.options.hint&&(e.signal(this,"startCompletion",this),n.update(!0))}});e.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});var a=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},s=window.cancelAnimationFrame||clearTimeout;t.prototype={close:function(){this.active()&&(this.tick=this.cm.state.completionActive=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,i){var n=t.list[i],r=this;this.cm.operation(function(){n.hint?n.hint(r.cm,t,n):r.cm.replaceRange("string"==typeof n?n:n.text,n.from||t.from,n.to||t.to,"complete");e.signal(t,"pick",n);r.cm.scrollIntoView()});this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(s(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),i=this.cm.getLine(t.line);if(t.line!=this.startPos.line||i.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(i.charAt(t.ch-1)))this.close();else{var n=this;this.debounce=a(function(){n.update()});this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,i=++this.tick;l(this.options.hint,this.cm,this.options,function(n){t.tick==i&&t.finishUpdate(n,e)})}},finishUpdate:function(t,i){this.data&&e.signal(this.data,"update");var n=this.widget&&this.widget.picked||i&&this.options.completeSingle;this.widget&&this.widget.close();(this.data=t)&&t.list.length&&(n&&1==t.list.length?this.pick(t,0):(this.widget=new r(this,t),e.signal(t,"shown")))}};r.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null;this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints);this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm.getInputField();e.removeAttribute("aria-activedescendant");e.removeAttribute("aria-owns");e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus));e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}};this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,i){t>=this.data.list.length?t=i?this.data.list.length-1:0:0>t&&(t=i?0:this.data.list.length-1);if(this.selectedHint!=t){var n=this.hints.childNodes[this.selectedHint];n&&(n.className=n.className.replace(" CodeMirror-hint-active",""),n.removeAttribute("aria-selected"));n=this.hints.childNodes[this.selectedHint=t];n.className+=" CodeMirror-hint-active";n.setAttribute("aria-selected","true");this.completion.cm.getInputField().setAttribute("aria-activedescendant",n.id);this.scrollToActive();e.signal(this.data,"select",this.data.list[this.selectedHint],n)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from];e=this.hints.childNodes[e.to];var i=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-i.offsetTop:e.offsetTop+e.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=e.offsetTop+e.offsetHeight-this.hints.clientHeight+i.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}};e.registerHelper("hint","auto",{resolve:function(t,i){var n=t.getHelpers(i,"hint"),r;if(n.length){var a=function(e,t,i){function r(n){if(n==a.length)return t(null);l(a[n],e,i,function(e){e&&0<e.list.length?t(e):r(n+1)})}var a=o(e,n);r(0)};a.async=!0;a.supportsSelection=!0;return a}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,i){return e.hint.anyword(t,i)}:function(){}}});e.registerHelper("hint","fromList",function(t,i){var n=t.getCursor(),r=t.getTokenAt(n),o=e.Pos(n.line,r.start);r.start<n.ch&&/\w/.test(r.string.charAt(n.ch-r.start-1))?r=r.string.substr(0,n.ch-r.start):(r="",o=n);for(var l=[],a=0;a<i.words.length;a++){var s=i.words[a];s.slice(0,r.length)==r&&l.push(s)}if(l.length)return{list:l,from:o,to:n}});e.commands.autocomplete=e.showHint;var f={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){var t=/[\w$]+/;e.registerHelper("hint","anyword",function(i,n){for(var r=n&&n.word||t,o=n&&n.range||500,l=i.getCursor(),a=i.getLine(l.line),s=l.ch,f=s;f&&r.test(a.charAt(f-1));)--f;a=f!=s&&a.slice(f,s);var c=n&&n.list||[],u={};r=new RegExp(r.source,"g");for(var h=-1;1>=h;h+=2)for(var d=l.line,p=Math.min(Math.max(d+h*o,i.firstLine()),i.lastLine())+h;d!=p;d+=h)for(var m=i.getLine(d),g;g=r.exec(m);)d==l.line&&g[0]===a||a&&0!=g[0].lastIndexOf(a,0)||Object.prototype.hasOwnProperty.call(u,g[0])||(u[g[0]]=!0,c.push(g[0]));return{list:c,from:e.Pos(l.line,f),to:e.Pos(l.line,s)}})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap","CodeMirror-activeline"),e.removeLineClass(e.state.activeLines[t],"background","CodeMirror-activeline-background"),e.removeLineClass(e.state.activeLines[t],"gutter","CodeMirror-activeline-gutter")}function i(e,t){if(e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!=t[i])return!1;return!0}function n(e,n){for(var r=[],o=0;o<n.length;o++){var l=n[o],a=e.getOption("styleActiveLine");if("object"==typeof a&&a.nonEmpty?l.anchor.line==l.head.line:l.empty())l=e.getLineHandleVisualStart(l.head.line),r[r.length-1]!=l&&r.push(l)}i(e.state.activeLines,r)||e.operation(function(){t(e);for(var i=0;i<r.length;i++)e.addLineClass(r[i],"wrap","CodeMirror-activeline"),e.addLineClass(r[i],"background","CodeMirror-activeline-background"),e.addLineClass(r[i],"gutter","CodeMirror-activeline-gutter");e.state.activeLines=r})}function r(e,t){n(e,t.ranges)}e.defineOption("styleActiveLine",!1,function(i,o,l){l=l==e.Init?!1:l;o!=l&&(l&&(i.off("beforeSelectionChange",r),t(i),delete i.state.activeLines),o&&(i.state.activeLines=[],n(i,i.listSelections()),i.on("beforeSelectionChange",r)))})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e){e=e.search(o);return-1==e?0:e}function i(e,t,i){return/\bstring\b/.test(e.getTokenTypeAt(l(t.line,0)))&&!/^['"`]/.test(i)}function n(e,t){var i=e.getMode();return!1!==i.useInnerComments&&i.innerMode?e.getModeAt(t):i}var r={},o=/[^\s\u00a0]/,l=e.Pos,a=e.cmpPos;e.commands.toggleComment=function(e){e.toggleComment()};e.defineExtension("toggleComment",function(e){e||(e=r);for(var t=Infinity,i=this.listSelections(),n=null,o=i.length-1;0<=o;o--){var a=i[o].from(),s=i[o].to();a.line>=t||(s.line>=t&&(s=l(t,0)),t=a.line,null==n?this.uncomment(a,s,e)?n="un":(this.lineComment(a,s,e),n="line"):"un"==n?this.uncomment(a,s,e):this.lineComment(a,s,e))}});e.defineExtension("lineComment",function(e,a,s){s||(s=r);var f=this,c=n(f,e),u=f.getLine(e.line);if(null!=u&&!i(f,e,u)){var h=s.lineComment||c.lineComment;if(h){var d=Math.min(0!=a.ch||a.line==e.line?a.line+1:a.line,f.lastLine()+1),p=null==s.padding?" ":s.padding,m=s.commentBlankLines||e.line==a.line;f.operation(function(){if(s.indent){for(var i=null,n=e.line;n<d;++n){var r=f.getLine(n);r=r.slice(0,t(r));if(null==i||i.length>r.length)i=r}for(n=e.line;n<d;++n){r=f.getLine(n);var a=i.length;if(m||o.test(r))r.slice(0,a)!=i&&(a=t(r)),f.replaceRange(i+h+p,l(n,0),l(n,a))}}else for(n=e.line;n<d;++n)(m||o.test(f.getLine(n)))&&f.replaceRange(h+p,l(n,0))})}else if(s.blockCommentStart||c.blockCommentStart)s.fullLines=!0,f.blockComment(e,a,s)}});e.defineExtension("blockComment",function(e,t,i){i||(i=r);var s=this,f=n(s,e),c=i.blockCommentStart||f.blockCommentStart,u=i.blockCommentEnd||f.blockCommentEnd;if(!c||!u)(i.lineComment||f.lineComment)&&0!=i.fullLines&&s.lineComment(e,t,i);else if(!/\bcomment\b/.test(s.getTokenTypeAt(l(e.line,0)))){var h=Math.min(t.line,s.lastLine());h!=e.line&&0==t.ch&&o.test(s.getLine(h))&&--h;var d=null==i.padding?" ":i.padding;e.line>h||s.operation(function(){if(0!=i.fullLines){var n=o.test(s.getLine(h));s.replaceRange(d+u,l(h));s.replaceRange(c+d,l(e.line,0));var r=i.blockCommentLead||f.blockCommentLead;if(null!=r)for(var p=e.line+1;p<=h;++p)(p!=h||n)&&s.replaceRange(r+d,l(p,0))}else n=0==a(s.getCursor("to"),t),r=!s.somethingSelected(),s.replaceRange(u,t),n&&s.setSelection(r?t:s.getCursor("from"),t),s.replaceRange(c,e)})}});e.defineExtension("uncomment",function(e,t,i){i||(i=r);var a=this,s=n(a,e),f=Math.min(0!=t.ch||t.line==e.line?t.line:t.line-1,a.lastLine()),c=Math.min(e.line,f),u=i.lineComment||s.lineComment,h=[],d=null==i.padding?" ":i.padding,p;e:if(u){for(var m=c;m<=f;++m){var g=a.getLine(m),v=g.indexOf(u);-1<v&&!/comment/.test(a.getTokenTypeAt(l(m,v+1)))&&(v=-1);if(-1==v&&o.test(g))break e;if(-1<v&&o.test(g.slice(0,v)))break e;h.push(g)}a.operation(function(){for(var e=c;e<=f;++e){var t=h[e-c],i=t.indexOf(u),n=i+u.length;0>i||(t.slice(n,n+d.length)==d&&(n+=d.length),p=!0,a.replaceRange("",l(e,i),l(e,n)))}});if(p)return!0}var y=i.blockCommentStart||s.blockCommentStart,x=i.blockCommentEnd||s.blockCommentEnd;if(!y||!x)return!1;var b=i.blockCommentLead||s.blockCommentLead,w=a.getLine(c),C=w.indexOf(y);if(-1==C)return!1;var S=f==c?w:a.getLine(f),k=S.indexOf(x,f==c?C+y.length:0);i=l(c,C+1);s=l(f,k+1);if(-1==k||!/comment/.test(a.getTokenTypeAt(i))||!/comment/.test(a.getTokenTypeAt(s))||-1<a.getRange(i,s,"\n").indexOf(x))return!1;s=w.lastIndexOf(y,e.ch);i=-1==s?-1:w.slice(0,e.ch).indexOf(x,s+y.length);if(-1!=s&&-1!=i&&i+x.length!=e.ch)return!1;i=S.indexOf(x,t.ch);e=S.slice(t.ch).lastIndexOf(y,i-t.ch);s=-1==i||-1==e?-1:t.ch+e;if(-1!=i&&-1!=s&&s!=t.ch)return!1;a.operation(function(){a.replaceRange("",l(f,k-(d&&S.slice(k-d.length,k)==d?d.length:0)),l(f,k+x.length));var e=C+y.length;d&&w.slice(e,e+d.length)==d&&(e+=d.length);a.replaceRange("",l(c,C),l(c,e));if(b)for(e=c+1;e<=f;++e){var t=a.getLine(e),i=t.indexOf(b);if(-1!=i&&!o.test(t.slice(0,i))){var n=i+b.length;d&&t.slice(n,n+d.length)==d&&(n+=d.length);a.replaceRange("",l(e,i),l(e,n))}}});return!0})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),l,a=[],s=0;s<r.length;s++){var f=r[s].head;if(!/\bcomment\b/.test(t.getTokenTypeAt(f)))return e.Pass;var c=t.getModeAt(f);if(!l)l=c;else if(l!=c)return e.Pass;var u=null,h,d=l.blockCommentStart;c=l.lineComment;if(d&&l.blockCommentContinue){var p=t.getLine(f.line);var m=p.lastIndexOf(l.blockCommentEnd,f.ch-l.blockCommentEnd.length);if(!(-1!=m&&m==f.ch-l.blockCommentEnd.length||c&&-1<(h=p.lastIndexOf(c,f.ch-1))&&/\bcomment\b/.test(t.getTokenTypeAt({line:f.line,ch:h+1}))))if(f.ch>=d.length&&-1<(h=p.lastIndexOf(d,f.ch-d.length))&&h>m)if(i(0,p)>=h)u=p.slice(0,h);else{u=t.options.tabSize;var g;h=e.countColumn(p,h,u);u=t.options.indentWithTabs?o.call("\t",g=Math.floor(h/u))+o.call(" ",h-u*g):o.call(" ",h)}else-1<(h=p.indexOf(l.blockCommentContinue))&&h<=f.ch&&h<=i(0,p)&&(u=p.slice(0,h));null!=u&&(u+=l.blockCommentContinue)}null==u&&c&&n(t)&&((null==p&&(p=t.getLine(f.line)),h=p.indexOf(c),f.ch||h)?-1<h&&i(0,p)>=h&&(u=-1<i(f.ch,p),u||(f=t.getLine(f.line+1)||"",u=f.indexOf(c),u=-1<u&&i(0,f)>=u||null),u&&(u=p.slice(0,h)+c+p.slice(h+c.length).match(/^\s*/)[0])):u="");if(null==u)return e.Pass;a[s]="\n"+u}t.operation(function(){for(var e=r.length-1;0<=e;e--)t.replaceRange(a[e],r[e].from(),r[e].to(),"+insert")})}function i(e,t){r.lastIndex=e;var i=r.exec(t);return i?i.index:-1}function n(e){return(e=e.getOption("continueComments"))&&"object"==typeof e?!1!==e.continueLineComment:!0}var r=/\S/g,o=String.prototype.repeat||function(e){return Array(e+1).join(this)};e.defineOption("continueComments",null,function(i,n,r){r&&r!=e.Init&&i.removeKeyMap("continueComment");n&&(r="Enter","string"==typeof n?r=n:"object"==typeof n&&n.key&&(r=n.key),n={name:"continueComment"},n[r]=t,i.addKeyMap(n))})});(function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)})(function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function i(e){t(e);var i=e.state.placeholder=document.createElement("pre");i.style.cssText="height: 0; overflow: visible";i.style.direction=e.getOption("direction");i.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n));i.appendChild(n);e.display.lineSpace.insertBefore(i,e.display.lineSpace.firstChild)}function n(e){setTimeout(function(){var n=!1;1==e.lineCount()&&(n=e.getInputField(),n="TEXTAREA"==n.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(n.querySelector(".CodeMirror-line").textContent));n?i(e):t(e)},20)}function r(e){l(e)&&i(e)}function o(e){var n=e.getWrapperElement(),r=l(e);n.className=n.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":"");r?i(e):t(e)}function l(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",function(i,l,a){a=a&&a!=e.Init;l&&!a?(i.on("blur",r),i.on("change",o),i.on("swapDoc",o),e.on(i.getInputField(),"compositionupdate",i.state.placeholderCompose=function(){n(i)}),o(i)):!l&&a&&(i.off("blur",r),i.off("change",o),i.off("swapDoc",o),e.off(i.getInputField(),"compositionupdate",i.state.placeholderCompose),t(i),a=i.getWrapperElement(),a.className=a.className.replace(" CodeMirror-empty",""));l&&!i.hasFocus()&&r(i)})});(function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["cgi","pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var i=e.modeInfo[t];if(i.mimes)i.mime=i.mimes[0]}e.findModeByMIME=function(t){t=t.toLowerCase();for(var i=0;i<e.modeInfo.length;i++){var n=e.modeInfo[i];if(n.mime==t)return n;if(n.mimes)for(var r=0;r<n.mimes.length;r++)if(n.mimes[r]==t)return n}if(/\+xml$/.test(t))return e.findModeByMIME("application/xml");if(/\+json$/.test(t))return e.findModeByMIME("application/json")};e.findModeByExtension=function(t){t=t.toLowerCase();for(var i=0;i<e.modeInfo.length;i++){var n=e.modeInfo[i];if(n.ext)for(var r=0;r<n.ext.length;r++)if(n.ext[r]==t)return n}};e.findModeByFileName=function(t){for(var i=0;i<e.modeInfo.length;i++){var n=e.modeInfo[i];if(n.file&&n.file.test(t))return n}var r=t.lastIndexOf(".");var o=r>-1&&t.substring(r+1,t.length);if(o)return e.findModeByExtension(o)};e.findModeByName=function(t){t=t.toLowerCase();for(var i=0;i<e.modeInfo.length;i++){var n=e.modeInfo[i];if(n.name.toLowerCase()==t)return n;if(n.alias)for(var r=0;r<n.alias.length;r++)if(n.alias[r].toLowerCase()==t)return n}}});(function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"),"cjs");else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],function(t){e(t,"amd")});else e(CodeMirror,"plain")})(function(e,t){if(!e.modeURL)e.modeURL="../mode/%N/%N.js";var i={};function n(e,t){var i=t;return function(){if(--i==0)e()}}function r(t,i,r){var o=e.modes[t],l=o&&o.dependencies;if(!l)return i();var a=[];for(var s=0;s<l.length;++s){if(!e.modes.hasOwnProperty(l[s]))a.push(l[s])}if(!a.length)return i();var f=n(i,a.length);for(var s=0;s<a.length;++s)e.requireMode(a[s],f,r)}e.requireMode=function(n,o,l){if(typeof n!="string")n=n.name;if(e.modes.hasOwnProperty(n))return r(n,o,l);if(i.hasOwnProperty(n))return i[n].push(o);var a=l&&l.path?l.path(n):e.modeURL.replace(/%N/g,n);if(l&&l.loadMode){l.loadMode(a,function(){r(n,o,l)})}else if(t=="plain"){var s=document.createElement("script");s.src=a;var f=document.getElementsByTagName("script")[0];var c=i[n]=[o];e.on(s,"load",function(){r(n,function(){for(var e=0;e<c.length;++e)c[e]()},l)});f.parentNode.insertBefore(s,f)}else if(t=="cjs"){require(a);o()}else if(t=="amd"){requirejs([a],o)}};e.autoLoadMode=function(t,i,n){if(!e.modes.hasOwnProperty(i))e.requireMode(i,function(){t.setOption("mode",t.getOption("mode"))},n)}});

/*!
 * Day.js 1.11.7 (https://github.com/iamkun/dayjs)
 * Copyright 2018 iamkun
 * Licensed under MIT
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs=t()}(this,function(){"use strict";var e=1e3,t=6e4,n=36e5,i="millisecond",s="second",a="minute",_="hour",d="day",r="week",o="month",u="quarter",l="year",m="date",f="Invalid Date",M=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},c=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},y={s:c,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),s=n%60;return(t<=0?"+":"-")+c(i,2,"0")+":"+c(s,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),s=t.clone().add(i,o),a=n-s<0,_=t.clone().add(i+(a?-1:1),o);return+(-(i+(n-s)/(a?s-_:_-s))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:o,y:l,w:r,d:d,D:m,h:_,m:a,s:s,ms:i,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},h="en",L={};L[h]=p;var j=function(e){return e instanceof k},D=function e(t,n,i){var s;if(!t)return h;if("string"==typeof t){var a=t.toLowerCase();L[a]&&(s=a),n&&(L[a]=n,s=a);var _=t.split("-");if(!s&&_.length>1)return e(_[0])}else{var d=t.name;L[d]=t,s=d}return!i&&s&&(h=s),s||!i&&h},b=function(e,t){if(j(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new k(n)},g=y;g.l=D,g.i=j,g.w=function(e,t){return b(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var k=function(){function p(e){this.$L=D(e.locale,null,!0),this.parse(e)}var c=p.prototype;return c.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(g.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(M);if(i){var s=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],s,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],s,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},c.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},c.$utils=function(){return g},c.isValid=function(){return!(this.$d.toString()===f)},c.isSame=function(e,t){var n=b(e);return this.startOf(t)<=n&&n<=this.endOf(t)},c.isAfter=function(e,t){return b(e)<this.startOf(t)},c.isBefore=function(e,t){return this.endOf(t)<b(e)},c.$g=function(e,t,n){return g.u(e)?this[t]:this.set(n,e)},c.unix=function(){return Math.floor(this.valueOf()/1e3)},c.valueOf=function(){return this.$d.getTime()},c.startOf=function(e,t){var n=this,i=!!g.u(t)||t,u=g.p(e),f=function(e,t){var s=g.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?s:s.endOf(d)},M=function(e,t){return g.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},Y=this.$W,p=this.$M,c=this.$D,y="set"+(this.$u?"UTC":"");switch(u){case l:return i?f(1,0):f(31,11);case o:return i?f(1,p):f(0,p+1);case r:var h=this.$locale().weekStart||0,L=(Y<h?Y+7:Y)-h;return f(i?c-L:c+(6-L),p);case d:case m:return M(y+"Hours",0);case _:return M(y+"Minutes",1);case a:return M(y+"Seconds",2);case s:return M(y+"Milliseconds",3);default:return this.clone()}},c.endOf=function(e){return this.startOf(e,!1)},c.$set=function(e,t){var n,r=g.p(e),u="set"+(this.$u?"UTC":""),f=(n={},n[d]=u+"Date",n[m]=u+"Date",n[o]=u+"Month",n[l]=u+"FullYear",n[_]=u+"Hours",n[a]=u+"Minutes",n[s]=u+"Seconds",n[i]=u+"Milliseconds",n)[r],M=r===d?this.$D+(t-this.$W):t;if(r===o||r===l){var Y=this.clone().set(m,1);Y.$d[f](M),Y.init(),this.$d=Y.set(m,Math.min(this.$D,Y.daysInMonth())).$d}else f&&this.$d[f](M);return this.init(),this},c.set=function(e,t){return this.clone().$set(e,t)},c.get=function(e){return this[g.p(e)]()},c.add=function(i,u){var m,f=this;i=Number(i);var M=g.p(u),Y=function(e){var t=b(f);return g.w(t.date(t.date()+Math.round(e*i)),f)};if(M===o)return this.set(o,this.$M+i);if(M===l)return this.set(l,this.$y+i);if(M===d)return Y(1);if(M===r)return Y(7);var p=(m={},m[a]=t,m[_]=n,m[s]=e,m)[M]||1,c=this.$d.getTime()+i*p;return g.w(c,this)},c.subtract=function(e,t){return this.add(-1*e,t)},c.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=e||"YYYY-MM-DDTHH:mm:ssZ",s=g.z(this),a=this.$H,_=this.$m,d=this.$M,r=n.weekdays,o=n.months,u=function(e,n,s,a){return e&&(e[n]||e(t,i))||s[n].slice(0,a)},l=function(e){return g.s(a%12||12,e,"0")},m=n.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},M={YY:String(this.$y).slice(-2),YYYY:this.$y,M:d+1,MM:g.s(d+1,2,"0"),MMM:u(n.monthsShort,d,o,3),MMMM:u(o,d),D:this.$D,DD:g.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,r,2),ddd:u(n.weekdaysShort,this.$W,r,3),dddd:r[this.$W],H:String(a),HH:g.s(a,2,"0"),h:l(1),hh:l(2),a:m(a,_,!0),A:m(a,_,!1),m:String(_),mm:g.s(_,2,"0"),s:String(this.$s),ss:g.s(this.$s,2,"0"),SSS:g.s(this.$ms,3,"0"),Z:s};return i.replace(Y,function(e,t){return t||M[e]||s.replace(":","")})},c.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},c.diff=function(i,m,f){var M,Y=g.p(m),p=b(i),c=(p.utcOffset()-this.utcOffset())*t,y=this-p,h=g.m(this,p);return h=(M={},M[l]=h/12,M[o]=h,M[u]=h/3,M[r]=(y-c)/6048e5,M[d]=(y-c)/864e5,M[_]=y/n,M[a]=y/t,M[s]=y/e,M)[Y]||y,f?h:g.a(h)},c.daysInMonth=function(){return this.endOf(o).$D},c.$locale=function(){return L[this.$L]},c.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=D(e,t,!0);return i&&(n.$L=i),n},c.clone=function(){return g.w(this.$d,this)},c.toDate=function(){return new Date(this.valueOf())},c.toJSON=function(){return this.isValid()?this.toISOString():null},c.toISOString=function(){return this.$d.toISOString()},c.toString=function(){return this.$d.toUTCString()},p}(),H=k.prototype;return b.prototype=H,[["$ms",i],["$s",s],["$m",a],["$H",_],["$W",d],["$M",o],["$y",l],["$D",m]].forEach(function(e){H[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(e,t){return e.$i||(e(t,k,b),e.$i=!0),b},b.locale=D,b.isDayjs=j,b.unix=function(e){return b(1e3*e)},b.en=L[h],b.Ls=L,b.p={},b});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,n,i){var s=n.prototype,a=s.format;i.en.formats=e,s.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var n=this.$locale().formats,i=function(t,n){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,s){var a=s&&s.toUpperCase();return i||n[s]||e[s]||n[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,n){return t||n.slice(1)})})}(t,void 0===n?{}:n);return a.call(this,i)}}});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_utc=t()}(this,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,s,a){var _=s.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new s(t)},_.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},_.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var d=_.parse;_.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),d.call(this,e)};var r=_.init;_.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else r.call(this)};var o=_.utcOffset;_.utcOffset=function(i,s){var a=this.$utils().u;if(a(i))return this.$u?0:a(this.$offset)?o.call(this):this.$offset;if("string"==typeof i&&(i=function(e){void 0===e&&(e="");var i=e.match(t);if(!i)return null;var s=(""+i[0]).match(n)||["-",0,0],a=s[0],_=60*+s[1]+ +s[2];return 0===_?0:"+"===a?_:-_}(i),null===i))return this;var _=Math.abs(i)<=16?60*i:i,d=this;if(s)return d.$offset=_,d.$u=0===i,d;if(0!==i){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(d=this.local().add(_+r,e)).$offset=_,d.$x.$localOffset=r}else d=this.utc();return d};var u=_.format;_.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},_.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},_.isUTC=function(){return!!this.$u},_.toISOString=function(){return this.toDate().toISOString()},_.toString=function(){return this.toDate().toUTCString()};var l=_.toDate;_.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var m=_.diff;_.diff=function(e,t,n){if(e&&this.$u===e.$u)return m.call(this,e,t,n);var i=this.local(),s=a(e).local();return m.call(i,s,t,n)}}});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_relativeTime=t()}(this,function(){"use strict";return function(e,t,n){e=e||{};var i=t.prototype,s={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(e,t,n,s){return i.fromToBase(e,t,n,s)}n.en.relativeTime=s,i.fromToBase=function(t,i,a,_,d){for(var r,o,u,l=a.$locale().relativeTime||s,m=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],f=m.length,M=0;M<f;M+=1){var Y=m[M];Y.d&&(r=_?n(t).diff(a,Y.d,!0):a.diff(t,Y.d,!0));var p=(e.rounding||Math.round)(Math.abs(r));if(u=r>0,p<=Y.r||!Y.r){p<=1&&M>0&&(Y=m[M-1]);var c=l[Y.l];d&&(p=d(""+p)),o="string"==typeof c?c.replace("%d",p):c(p,i,Y.l,u);break}}if(i)return o;var y=u?l.future:l.past;return"function"==typeof y?y(o):y.replace("%s",o)},i.to=function(e,t){return a(e,t,this,!0)},i.from=function(e,t){return a(e,t,this)};var _=function(e){return e.$u?n.utc():n()};i.toNow=function(e){return this.to(_(this),e)},i.fromNow=function(e){return this.from(_(this),e)}}});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_calendar=t()}(this,function(){"use strict";return function(e,t,n){var i="h:mm A",s={lastDay:"[Yesterday at] "+i,sameDay:"[Today at] "+i,nextDay:"[Tomorrow at] "+i,nextWeek:"dddd [at] "+i,lastWeek:"[Last] dddd [at] "+i,sameElse:"MM/DD/YYYY"};t.prototype.calendar=function(e,t){var i=t||this.$locale().calendar||s,a=n(e||void 0).startOf("d"),_=this.diff(a,"d",!0),d="sameElse",r=_<-6?d:_<-1?"lastWeek":_<0?"lastDay":_<1?"sameDay":_<2?"nextDay":_<7?"nextWeek":d,o=i[r]||s[r];return"function"==typeof o?o.call(this,n()):this.format(o)}}});dayjs.extend(window.dayjs_plugin_localizedFormat);dayjs.extend(window.dayjs_plugin_utc);dayjs.extend(window.dayjs_plugin_relativeTime);dayjs.extend(window.dayjs_plugin_calendar);!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fa=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌_دو_سه‌_چه_پن_جم_شن".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_"),monthsShort:"فرو_ارد_خرد_تیر_مرد_شهر_مهر_آبا_آذر_دی_بهم_اسف".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s قبل",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en=t()}(this,function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}}});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_lv=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"lv",weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),weekStart:1,weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},relativeTime:{future:"pēc %s",past:"pirms %s",s:"dažām sekundēm",m:"minūtes",mm:"%d minūtēm",h:"stundas",hh:"%d stundām",d:"dienas",dd:"%d dienām",M:"mēneša",MM:"%d mēnešiem",y:"gada",yy:"%d gadiem"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fr=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(e){return""+e+(1===e?"er":"")}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_cs=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function i(e){return e>1&&e<5&&1!=~~(e/10)}function s(e,t,n,s){var a=e+" ";switch(n){case"s":return t||s?"pár sekund":"pár sekundami";case"m":return t?"minuta":s?"minutu":"minutou";case"mm":return t||s?a+(i(e)?"minuty":"minut"):a+"minutami";case"h":return t?"hodina":s?"hodinu":"hodinou";case"hh":return t||s?a+(i(e)?"hodiny":"hodin"):a+"hodinami";case"d":return t||s?"den":"dnem";case"dd":return t||s?a+(i(e)?"dny":"dní"):a+"dny";case"M":return t||s?"měsíc":"měsícem";case"MM":return t||s?a+(i(e)?"měsíce":"měsíců"):a+"měsíci";case"y":return t||s?"rok":"rokem";case"yy":return t||s?a+(i(e)?"roky":"let"):a+"lety"}}var a={name:"cs",weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),months:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),monthsShort:"led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"před %s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s}};return n.default.locale(a,null,!0),a});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_da=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"da",weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn._man._tirs._ons._tors._fre._lør.".split("_"),weekdaysMin:"sø._ma._ti._on._to._fr._lø.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,ordinal:function(e){return e+"."},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_it=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"º"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sv=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"sv",weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){var t=e%10;return"["+e+(1===t||2===t?"a":"e")+"]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_he=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:"%d שעות",hh2:"שעתיים",d:"יום",dd:"%d ימים",dd2:"יומיים",M:"חודש",MM:"%d חודשים",MM2:"חודשיים",y:"שנה",yy:"%d שנים",yy2:"שנתיים"};function s(e,t,n){return(i[n+(2===e?"2":"")]||i[n]).replace("%d",e)}var a={name:"he",weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א׳_ב׳_ג׳_ד׳_ה׳_ו_ש׳".split("_"),months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו_פבר_מרץ_אפר_מאי_יונ_יול_אוג_ספט_אוק_נוב_דצמ".split("_"),relativeTime:{future:"בעוד %s",past:"לפני %s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},ordinal:function(e){return e},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"}};return n.default.locale(a,null,!0),a});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i="يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),s={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},a={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},_={name:"ar",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),months:i,monthsShort:i,weekStart:6,relativeTime:{future:"بعد %s",past:"منذ %s",s:"ثانية واحدة",m:"دقيقة واحدة",mm:"%d دقائق",h:"ساعة واحدة",hh:"%d ساعات",d:"يوم واحد",dd:"%d أيام",M:"شهر واحد",MM:"%d أشهر",y:"عام واحد",yy:"%d أعوام"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return a[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return s[e]}).replace(/,/g,"،")},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return n.default.locale(_,null,!0),_});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_be=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"be",weekdays:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),months:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),weekStart:1,weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_vi=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_nl=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"nl",weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ordinal:function(e){return"["+e+(1===e||8===e||e>=20?"ste":"de")+"]"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"een minuut",mm:"%d minuten",h:"een uur",hh:"%d uur",d:"een dag",dd:"%d dagen",M:"een maand",MM:"%d maanden",y:"een jaar",yy:"%d jaar"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_de=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function s(e,t,n){var s=i[n];return Array.isArray(s)&&(s=s[t?0:1]),s.replace("%d",e)}var a={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s}};return n.default.locale(a,null,!0),a});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_el=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"el",weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),months:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαι_Ιουν_Ιουλ_Αυγ_Σεπτ_Οκτ_Νοε_Δεκ".split("_"),ordinal:function(e){return e},weekStart:1,relativeTime:{future:"σε %s",past:"πριν %s",s:"μερικά δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένα μήνα",MM:"%d μήνες",y:"ένα χρόνο",yy:"%d χρόνια"},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_mt=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"mt",weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),weekStart:1,weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ur=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"ur",weekdays:"اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ".split("_"),months:"جنوری_فروری_مارچ_اپریل_مئی_جون_جولائی_اگست_ستمبر_اکتوبر_نومبر_دسمبر".split("_"),weekStart:1,weekdaysShort:"اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ".split("_"),monthsShort:"جنوری_فروری_مارچ_اپریل_مئی_جون_جولائی_اگست_ستمبر_اکتوبر_نومبر_دسمبر".split("_"),weekdaysMin:"اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ro=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"ro",weekdays:"Duminică_Luni_Marți_Miercuri_Joi_Vineri_Sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),months:"Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),monthsShort:"Ian._Febr._Mart._Apr._Mai_Iun._Iul._Aug._Sept._Oct._Nov._Dec.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"peste %s",past:"acum %s",s:"câteva secunde",m:"un minut",mm:"%d minute",h:"o oră",hh:"%d ore",d:"o zi",dd:"%d zile",M:"o lună",MM:"%d luni",y:"un an",yy:"%d ani"},ordinal:function(e){return e}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_pt_br=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"pt-br",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(e){return e+"º"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_lt=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i="sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),s="sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),a=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,_=function(e,t){return a.test(t)?i[e.month()]:s[e.month()]};_.s=s,_.f=i;var d={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_šeš".split("_"),weekdaysMin:"s_p_a_t_k_pn_š".split("_"),months:_,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"už %s",past:"prieš %s",s:"kelias sekundes",m:"minutę",mm:"%d minutes",h:"valandą",hh:"%d valandas",d:"dieną",dd:"%d dienas",M:"mėnesį",MM:"%d mėnesius",y:"metus",yy:"%d metus"},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"}};return n.default.locale(d,null,!0),d});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_es=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_pt=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(e){return e+"º"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_eu=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"eu",weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),weekStart:1,weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_tr=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e){return e+"."}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ru=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),s="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),a="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),_="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),d=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function r(e,t,n){var i,s;return"m"===n?t?"минута":"минуту":e+" "+(i=+e,s={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),i%10==1&&i%100!=11?s[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?s[1]:s[2])}var o=function(e,t){return d.test(t)?i[e.month()]:s[e.month()]};o.s=s,o.f=i;var u=function(e,t){return d.test(t)?a[e.month()]:_[e.month()]};u.s=_,u.f=a;var l={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:o,monthsShort:u,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:r,mm:r,h:"час",hh:r,d:"день",dd:r,M:"месяц",MM:r,y:"год",yy:r},ordinal:function(e){return e},meridiem:function(e){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"}};return n.default.locale(l,null,!0),l});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_zh=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"zh",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ca=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"ca",weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Març_Abr._Maig_Juny_Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",ll:"D MMM YYYY",lll:"D MMM YYYY, H:mm",llll:"ddd D MMM YYYY, H:mm"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(e){return""+e+(1===e||3===e?"r":2===e?"n":4===e?"t":"è")}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_th=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(e){return e+"."}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_af=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"af",weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),weekStart:1,weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sk=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function i(e){return e>1&&e<5&&1!=~~(e/10)}function s(e,t,n,s){var a=e+" ";switch(n){case"s":return t||s?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":s?"minútu":"minútou";case"mm":return t||s?a+(i(e)?"minúty":"minút"):a+"minútami";case"h":return t?"hodina":s?"hodinu":"hodinou";case"hh":return t||s?a+(i(e)?"hodiny":"hodín"):a+"hodinami";case"d":return t||s?"deň":"dňom";case"dd":return t||s?a+(i(e)?"dni":"dní"):a+"dňami";case"M":return t||s?"mesiac":"mesiacom";case"MM":return t||s?a+(i(e)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return t||s?"rok":"rokom";case"yy":return t||s?a+(i(e)?"roky":"rokov"):a+"rokmi"}}var a={name:"sk",weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),months:"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),monthsShort:"jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"pred %s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s}};return n.default.locale(a,null,!0),a});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_pl=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function s(e,t,n){var s=e+" ";switch(n){case"m":return t?"minuta":"minutę";case"mm":return s+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return s+(i(e)?"godziny":"godzin");case"MM":return s+(i(e)?"miesiące":"miesięcy");case"yy":return s+(i(e)?"lata":"lat")}}var a="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),_="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),d=/D MMMM/,r=function(e,t){return d.test(t)?a[e.month()]:_[e.month()]};r.s=_,r.f=a;var o={name:"pl",weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),months:r,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:s,mm:s,h:s,hh:s,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:s,y:"rok",yy:s},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return n.default.locale(o,null,!0),o});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ms=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"ms",weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekStart:1,formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH.mm",LLLL:"dddd, D MMMM YYYY HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},ordinal:function(e){return e+"."}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bg=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"bg",weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekStart:1,ordinal:function(e){var t=e%100;if(t>10&&t<20)return e+"-ти";var n=e%10;return 1===n?e+"-ви":2===n?e+"-ри":7===n||8===n?e+"-ми":e+"-ти"},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_zh_tw=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,t){return"W"===t?e+"週":e+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(e,t){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1100?"上午":n<1300?"中午":n<1800?"下午":"晚上"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_uk=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i="січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),s="січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),a=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function _(e,t,n){var i,s;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(i=+e,s={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),i%10==1&&i%100!=11?s[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?s[1]:s[2])}var d=function(e,t){return a.test(t)?i[e.month()]:s[e.month()]};d.s=s,d.f=i;var r={name:"uk",weekdays:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),weekdaysShort:"ндл_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:d,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekStart:1,relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:_,mm:_,h:_,hh:_,d:"день",dd:_,M:"місяць",MM:_,y:"рік",yy:_},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"}};return n.default.locale(r,null,!0),r});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fi=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function i(e,t,n,i){var s={s:"muutama sekunti",m:"minuutti",mm:"%d minuuttia",h:"tunti",hh:"%d tuntia",d:"päivä",dd:"%d päivää",M:"kuukausi",MM:"%d kuukautta",y:"vuosi",yy:"%d vuotta",numbers:"nolla_yksi_kaksi_kolme_neljä_viisi_kuusi_seitsemän_kahdeksan_yhdeksän".split("_")},a={s:"muutaman sekunnin",m:"minuutin",mm:"%d minuutin",h:"tunnin",hh:"%d tunnin",d:"päivän",dd:"%d päivän",M:"kuukauden",MM:"%d kuukauden",y:"vuoden",yy:"%d vuoden",numbers:"nollan_yhden_kahden_kolmen_neljän_viiden_kuuden_seitsemän_kahdeksan_yhdeksän".split("_")},_=i&&!t?a:s,d=_[n];return e<10?d.replace("%d",_.numbers[e]):d.replace("%d",e)}var s={name:"fi",weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,relativeTime:{future:"%s päästä",past:"%s sitten",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM[ta] YYYY",LLL:"D. MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, D. MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"D. MMM YYYY",lll:"D. MMM YYYY, [klo] HH.mm",llll:"ddd, D. MMM YYYY, [klo] HH.mm"}};return n.default.locale(s,null,!0),s});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sl=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"sl",weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),weekStart:1,weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"čez %s",past:"pred %s",s:"nekaj sekund",m:"minuta",mm:"%d minut",h:"ura",hh:"%d ur",d:"dan",dd:"%d dni",M:"mesec",MM:"%d mesecev",y:"leto",yy:"%d let"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ko=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(e){return e},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(e){return e<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_hr=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),s="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),a=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,_=function(e,t){return a.test(t)?i[e.month()]:s[e.month()]};_.s=s,_.f=i;var d={name:"hr",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:_,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(e){return e+"."}};return n.default.locale(d,null,!0),d});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_hu=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"hu",weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s múlva",past:"%s",s:function(e,t,n,i){return"néhány másodperc"+(i||t?"":"e")},m:function(e,t,n,i){return"egy perc"+(i||t?"":"e")},mm:function(e,t,n,i){return e+" perc"+(i||t?"":"e")},h:function(e,t,n,i){return"egy "+(i||t?"óra":"órája")},hh:function(e,t,n,i){return e+" "+(i||t?"óra":"órája")},d:function(e,t,n,i){return"egy "+(i||t?"nap":"napja")},dd:function(e,t,n,i){return e+" "+(i||t?"nap":"napja")},M:function(e,t,n,i){return"egy "+(i||t?"hónap":"hónapja")},MM:function(e,t,n,i){return e+" "+(i||t?"hónap":"hónapja")},y:function(e,t,n,i){return"egy "+(i||t?"év":"éve")},yy:function(e,t,n,i){return e+" "+(i||t?"év":"éve")}},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"}};return n.default.locale(i,null,!0),i});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ja=t(e.dayjs)}(this,function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),i={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e){return e+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(e){return e<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return n.default.locale(i,null,!0),i});

/*!
 * Favico animations 0.3.10 (https://github.com/ejci/favico.js/)
 * Copyright 2017 by Miroslav Magda
 * Licensed under MIT
 */
(function(){var e=function(e){"use strict";e=e?e:{};var t={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:false,dataUrl:false,win:window};var n,o,r,i,a,f,s,l,u,c,h,d,y,w,g,p;y={};y.ff=typeof InstallTrigger!="undefined";y.chrome=!!window.chrome;y.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0;y.ie=false;y.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0;y.supported=y.chrome||y.ff||y.opera;var x=[];h=function(){};l=d=false;var m=function(){n=L(t,e);n.bgColor=R(n.bgColor);n.textColor=R(n.textColor);n.position=n.position.toLowerCase();n.animation=O.types[""+n.animation]?n.animation:t.animation;p=n.win.document;var l=n.position.indexOf("up")>-1;var u=n.position.indexOf("left")>-1;if(l||u){for(var c in O.types){for(var h=0;h<O.types[c].length;h++){var d=O.types[c][h];if(l){if(d.y<.6){d.y=d.y-.4}else{d.y=d.y-2*d.y+(1-d.w)}}if(u){if(d.x<.6){d.x=d.x-.4}else{d.x=d.x-2*d.x+(1-d.h)}}O.types[c][h]=d}}}n.type=v[""+n.type]?n.type:t.type;o=U.getIcon();a=document.createElement("canvas");s=document.createElement("img");if(o.hasAttribute("href")){s.setAttribute("crossOrigin","anonymous");s.onload=function(){r=s.height>0?s.height:32;i=s.width>0?s.width:32;a.height=r;a.width=i;f=a.getContext("2d");b.ready()};s.setAttribute("src",o.getAttribute("href"))}else{s.onload=function(){r=32;i=32;s.height=r;s.width=i;a.height=r;a.width=i;f=a.getContext("2d");b.ready()};s.setAttribute("src","")}};var b={};b.ready=function(){l=true;b.reset();h()};b.reset=function(){if(!l){return}x=[];u=false;c=false;f.clearRect(0,0,i,r);f.drawImage(s,0,0,i,r);U.setIcon(a);window.clearTimeout(w);window.clearTimeout(g)};b.start=function(){if(!l||c){return}var e=function(){u=x[0];c=false;if(x.length>0){x.shift();b.start()}else{}};if(x.length>0){c=true;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){if(e in x[0].options){n[e]=x[0].options[e]}});O.run(x[0].options,function(){e()},false)};if(u){O.run(u.options,function(){t()},true)}else{t()}}};var v={};var C=function(e){e.n=typeof e.n==="number"?Math.abs(e.n|0):e.n;e.x=i*e.x;e.y=r*e.y;e.w=i*e.w;e.h=r*e.h;e.len=(""+e.n).length;return e};v.circle=function(e){e=C(e);var t=false;if(e.len===2){e.x=e.x-e.w*.4;e.w=e.w*1.4;t=true}else if(e.len>=3){e.x=e.x-e.w*.65;e.w=e.w*1.65;t=true}f.clearRect(0,0,i,r);f.drawImage(s,0,0,i,r);f.beginPath();f.font=n.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+n.fontFamily;f.font=f.font?f.font.replace("10px","9px"):f.font;f.textAlign="center";if(t){f.moveTo(e.x+e.w/2,e.y);f.lineTo(e.x+e.w-e.h/2,e.y);f.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2);f.lineTo(e.x+e.w,e.y+e.h-e.h/2);f.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h);f.lineTo(e.x+e.h/2,e.y+e.h);f.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2);f.lineTo(e.x,e.y+e.h/2);f.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)}else{f.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI)}f.fillStyle="rgba("+n.bgColor.r+","+n.bgColor.g+","+n.bgColor.b+","+e.o+")";f.fill();f.closePath();f.beginPath();f.stroke();f.fillStyle="rgba("+n.textColor.r+","+n.textColor.g+","+n.textColor.b+","+e.o+")";if(typeof e.n==="number"&&e.n>999){f.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-e.h*.2))}else{f.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-e.h*.15))}f.closePath()};v.rectangle=function(e){e=C(e);var t=false;if(e.len===2){e.x=e.x-e.w*.4;e.w=e.w*1.4;t=true}else if(e.len>=3){e.x=e.x-e.w*.65;e.w=e.w*1.65;t=true}f.clearRect(0,0,i,r);f.drawImage(s,0,0,i,r);f.beginPath();f.font=n.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+n.fontFamily;f.textAlign="center";f.fillStyle="rgba("+n.bgColor.r+","+n.bgColor.g+","+n.bgColor.b+","+e.o+")";f.fillRect(e.x,e.y,e.w,e.h);f.fillStyle="rgba("+n.textColor.r+","+n.textColor.g+","+n.textColor.b+","+e.o+")";if(typeof e.n==="number"&&e.n>999){f.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-e.h*.2))}else{f.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-e.h*.15))}f.closePath()};var I=function(e,t){t=(typeof t==="string"?{animation:t}:t)||{};h=function(){try{if(typeof e==="number"?e>0:e!==""){var n={type:"badge",options:{n:e}};if("animation"in t&&O.types[""+t.animation]){n.options.animation=""+t.animation}if("type"in t&&v[""+t.type]){n.options.type=""+t.type}["bgColor","textColor"].forEach(function(e){if(e in t){n.options[e]=R(t[e])}});["fontStyle","fontFamily"].forEach(function(e){if(e in t){n.options[e]=t[e]}});x.push(n);if(x.length>100){throw new Error("Too many badges requests in queue.")}b.start()}else{b.reset()}}catch(e){throw new Error("Error setting badge. Message: "+e.message)}};if(l){h()}};var T=function(e){h=function(){try{var t=e.width;var n=e.height;var o=document.createElement("img");var s=t/i<n/r?t/i:n/r;o.setAttribute("crossOrigin","anonymous");o.onload=function(){f.clearRect(0,0,i,r);f.drawImage(o,0,0,i,r);U.setIcon(a)};o.setAttribute("src",e.getAttribute("src"));o.height=n/s;o.width=t/s}catch(e){throw new Error("Error setting image. Message: "+e.message)}};if(l){h()}};var E=function(e){h=function(){try{if(e==="stop"){d=true;b.reset();d=false;return}e.addEventListener("play",function(){M(this)},false)}catch(e){throw new Error("Error setting video. Message: "+e.message)}};if(l){h()}};var A=function(e){if(!window.URL||!window.URL.createObjectURL){window.URL=window.URL||{};window.URL.createObjectURL=function(e){return e}}if(y.supported){var t=false;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia;h=function(){try{if(e==="stop"){d=true;b.reset();d=false;return}t=document.createElement("video");t.width=i;t.height=r;navigator.getUserMedia({video:true,audio:false},function(e){t.src=URL.createObjectURL(e);t.play();M(t)},function(){})}catch(e){throw new Error("Error setting webcam. Message: "+e.message)}};if(l){h()}}};function M(e){if(e.paused||e.ended||d){return false}try{f.clearRect(0,0,i,r);f.drawImage(e,0,0,i,r)}catch(e){}g=setTimeout(function(){M(e)},O.duration);U.setIcon(a)}var U={};U.getIcon=function(){var e=false;var t=function(){var e=document.getElementsByTagName("head")[0].getElementsByTagName("link");var t=false;for(var n=e.length,o=n-1;o>=0;o--){if(/(^|\s)icon(\s|$)/i.test(e[o].getAttribute("rel"))){if(!t){t=e[o]}else{if(y.chrome){e[o].parentNode.removeChild(e[o])}}}}return t};if(n.element){e=n.element}else if(n.elementId){e=p.getElementById(n.elementId);e.setAttribute("href",e.getAttribute("src"))}else{e=t();if(e===false){e=p.createElement("link");e.setAttribute("rel","icon");p.getElementsByTagName("head")[0].appendChild(e)}}e.setAttribute("type","image/png");return e};U.setIcon=function(e){var t=e.toDataURL("image/png");if(n.dataUrl){n.dataUrl(t)}if(n.element){n.element.setAttribute("href",t);n.element.setAttribute("src",t)}else if(n.elementId){var r=p.getElementById(n.elementId);r.setAttribute("href",t);r.setAttribute("src",t)}else{if(y.ff||y.opera){var i=o;o=p.createElement("link");if(y.opera){o.setAttribute("rel","icon")}o.setAttribute("rel","icon");o.setAttribute("type","image/png");p.getElementsByTagName("head")[0].appendChild(o);o.setAttribute("href",t);if(i.parentNode){i.parentNode.removeChild(i)}}else{o.setAttribute("href",t)}}};function R(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,n,o){return t+t+n+n+o+o});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:false}function L(e,t){var n={};var o;for(o in e){n[o]=e[o]}for(o in t){n[o]=t[o]}return n}function N(){return p.hidden||p.msHidden||p.webkitHidden||p.mozHidden}var O={};O.duration=40;O.types={};O.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];O.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}];O.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];O.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];O.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];O.run=function(e,t,o,r){var i=O.types[N()?"none":n.animation];if(o===true){r=typeof r!=="undefined"?r:i.length-1}else{r=typeof r!=="undefined"?r:0}t=t?t:function(){};if(r<i.length&&r>=0){v[n.type](L(e,i[r]));w=setTimeout(function(){if(o){r=r-1}else{r=r+1}O.run(e,t,o,r)},O.duration);U.setIcon(a)}else{t();return}};m();return{badge:I,video:E,image:T,webcam:A,reset:b.reset,browser:{supported:y.supported}}};if(typeof define!=="undefined"&&define.amd){define([],function(){return e})}else if(typeof module!=="undefined"&&module.exports){module.exports=e}else{this.Favico=e}})();(function(){var e=document.getElementsByTagName("title")[0],t=0,n=Number.MAX_VALUE,o=/^\(\d*\+?\) /;function r(){if(t===0){e.text=e.text.replace(o,"");return}notificationTotalstr=t;if(t>n){notificationTotalstr=n+"+"}if(o.exec(e.text)){e.text=e.text.replace(o,"("+notificationTotalstr+") ")}else{e.text="("+notificationTotalstr+") "+e.text}}function i(e){return!isNaN(parseFloat(e))&&isFinite(e)}window.titlenotifier={add:function(e){if(typeof e==="undefined"){e=1}t+=parseInt(e,10);r()},sub:function(e){if(typeof e==="undefined"){e=1}e=parseInt(e,10);if(t===0){return}else if(e>t){t=0}else{t-=parseInt(e,10)}r()},set:function(e){if(!i(e)||e<0){return}t=parseInt(e,10);r()},reset:function(){t=0;r()},get:function(){return t},max:function(e){if(!i(e)||e<=0){return}n=parseInt(e,10);r()}}})();

/*!
 * Select2 4.0.13
 * Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors
 * Licensed under MIT (https://github.com/select2/select2/blob/master/LICENSE.md)
 */
(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof module==="object"&&module.exports){module.exports=function(t,n){if(n===undefined){if(typeof window!=="undefined"){n=require("jquery")}else{n=require("jquery")(t)}}e(n);return n}}else{e(jQuery)}})(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd){var t=e.fn.select2.amd}var t;(function(){if(!t||!t.requirejs){if(!t){t={}}else{n=t}var e,n,i;(function(t){var r,s,o,a,l={},c={},u={},d={},p=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function g(e,t){return p.call(e,t)}function v(e,t){var n,i,r,s,o,a,l,c,d,p,h,g,v=t&&t.split("/"),m=u.map,y=m&&m["*"]||{};if(e){e=e.split("/");o=e.length-1;if(u.nodeIdCompat&&f.test(e[o])){e[o]=e[o].replace(f,"")}if(e[0].charAt(0)==="."&&v){g=v.slice(0,v.length-1);e=g.concat(e)}for(d=0;d<e.length;d++){h=e[d];if(h==="."){e.splice(d,1);d-=1}else if(h===".."){if(d===0||d===1&&e[2]===".."||e[d-1]===".."){continue}else if(d>0){e.splice(d-1,2);d-=2}}}e=e.join("/")}if((v||y)&&m){n=e.split("/");for(d=n.length;d>0;d-=1){i=n.slice(0,d).join("/");if(v){for(p=v.length;p>0;p-=1){r=m[v.slice(0,p).join("/")];if(r){r=r[i];if(r){s=r;a=d;break}}}}if(s){break}if(!l&&y&&y[i]){l=y[i];c=d}}if(!s&&l){s=l;a=c}if(s){n.splice(0,a,s);e=n.join("/")}}return e}function m(e,n){return function(){var i=h.call(arguments,0);if(typeof i[0]!=="string"&&i.length===1){i.push(null)}return s.apply(t,i.concat([e,n]))}}function y(e){return function(t){return v(t,e)}}function _(e){return function(t){l[e]=t}}function w(e){if(g(c,e)){var n=c[e];delete c[e];d[e]=true;r.apply(t,n)}if(!g(l,e)&&!g(d,e)){throw new Error("No "+e)}return l[e]}function $(e){var t,n=e?e.indexOf("!"):-1;if(n>-1){t=e.substring(0,n);e=e.substring(n+1,e.length)}return[t,e]}function b(e){return e?$(e):[]}o=function(e,t){var n,i=$(e),r=i[0],s=t[1];e=i[1];if(r){r=v(r,s);n=w(r)}if(r){if(n&&n.normalize){e=n.normalize(e,y(s))}else{e=v(e,s)}}else{e=v(e,s);i=$(e);r=i[0];e=i[1];if(r){n=w(r)}}return{f:r?r+"!"+e:e,n:e,pr:r,p:n}};function A(e){return function(){return u&&u.config&&u.config[e]||{}}}a={require:function(e){return m(e)},exports:function(e){var t=l[e];if(typeof t!=="undefined"){return t}else{return l[e]={}}},module:function(e){return{id:e,uri:"",exports:l[e],config:A(e)}}};r=function(e,n,i,r){var s,u,p,h,f,v,y=[],$=typeof i,A;r=r||e;v=b(r);if($==="undefined"||$==="function"){n=!n.length&&i.length?["require","exports","module"]:n;for(f=0;f<n.length;f+=1){h=o(n[f],v);u=h.f;if(u==="require"){y[f]=a.require(e)}else if(u==="exports"){y[f]=a.exports(e);A=true}else if(u==="module"){s=y[f]=a.module(e)}else if(g(l,u)||g(c,u)||g(d,u)){y[f]=w(u)}else if(h.p){h.p.load(h.n,m(r,true),_(u),{});y[f]=l[u]}else{throw new Error(e+" missing "+u)}}p=i?i.apply(l[e],y):undefined;if(e){if(s&&s.exports!==t&&s.exports!==l[e]){l[e]=s.exports}else if(p!==t||!A){l[e]=p}}}else if(e){l[e]=i}};e=n=s=function(e,n,i,l,c){if(typeof e==="string"){if(a[e]){return a[e](n)}return w(o(e,b(n)).f)}else if(!e.splice){u=e;if(u.deps){s(u.deps,u.callback)}if(!n){return}if(n.splice){e=n;n=i;i=null}else{e=t}}n=n||function(){};if(typeof i==="function"){i=l;l=c}if(l){r(t,e,n,i)}else{setTimeout(function(){r(t,e,n,i)},4)}return s};s.config=function(e){return s(e)};e._defined=l;i=function(e,t,n){if(typeof e!=="string"){throw new Error("See almond README: incorrect module build, no module name")}if(!t.splice){n=t;t=[]}if(!g(l,e)&&!g(c,e)){c[e]=[e,t,n]}};i.amd={jQuery:true}})();t.requirejs=e;t.require=n;t.define=i}})();t.define("almond",function(){});t.define("jquery",[],function(){var t=e||$;if(t==null&&console&&console.error){console.error("Select2: An instance of jQuery or a jQuery-compatible library was not "+"found. Make sure that you are including jQuery before Select2 on your "+"web page.")}return t});t.define("select2/utils",["jquery"],function(e){var t={};t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t){if(n.call(t,r)){e[r]=t[r]}}i.prototype=t.prototype;e.prototype=new i;e.__super__=t.prototype;return e};function n(e){var t=e.prototype;var n=[];for(var i in t){var r=t[i];if(typeof r!=="function"){continue}if(i==="constructor"){continue}n.push(i)}return n}t.Decorate=function(e,t){var i=n(t);var r=n(e);function s(){var n=Array.prototype.unshift;var i=t.prototype.constructor.length;var r=e.prototype.constructor;if(i>0){n.call(arguments,e.prototype.constructor);r=t.prototype.constructor}r.apply(this,arguments)}t.displayName=e.displayName;function o(){this.constructor=s}s.prototype=new o;for(var a=0;a<r.length;a++){var l=r[a];s.prototype[l]=e.prototype[l]}var c=function(e){var n=function(){};if(e in s.prototype){n=s.prototype[e]}var i=t.prototype[e];return function(){var e=Array.prototype.unshift;e.call(arguments,n);return i.apply(this,arguments)}};for(var u=0;u<i.length;u++){var d=i[u];s.prototype[d]=c(d)}return s};var i=function(){this.listeners={}};i.prototype.on=function(e,t){this.listeners=this.listeners||{};if(e in this.listeners){this.listeners[e].push(t)}else{this.listeners[e]=[t]}};i.prototype.trigger=function(e){var t=Array.prototype.slice;var n=t.call(arguments,1);this.listeners=this.listeners||{};if(n==null){n=[]}if(n.length===0){n.push({})}n[0]._type=e;if(e in this.listeners){this.invoke(this.listeners[e],t.call(arguments,1))}if("*"in this.listeners){this.invoke(this.listeners["*"],arguments)}};i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++){e[n].apply(this,t)}};t.Observable=i;t.generateChars=function(e){var t="";for(var n=0;n<e;n++){var i=Math.floor(Math.random()*36);t+=i.toString(36)}return t};t.bind=function(e,t){return function(){e.apply(t,arguments)}};t._convertData=function(e){for(var t in e){var n=t.split("-");var i=e;if(n.length===1){continue}for(var r=0;r<n.length;r++){var s=n[r];s=s.substring(0,1).toLowerCase()+s.substring(1);if(!(s in i)){i[s]={}}if(r==n.length-1){i[s]=e[t]}i=i[s]}delete e[t]}return e};t.hasScroll=function(t,n){var i=e(n);var r=n.style.overflowX;var s=n.style.overflowY;if(r===s&&(s==="hidden"||s==="visible")){return false}if(r==="scroll"||s==="scroll"){return true}return i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth};t.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};if(typeof e!=="string"){return e}return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})};t.appendMany=function(t,n){if(e.fn.jquery.substr(0,3)==="1.7"){var i=e();e.map(n,function(e){i=i.add(e)});n=i}t.append(n)};t.__cache={};var r=0;t.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");if(t==null){if(e.id){t=e.id;e.setAttribute("data-select2-id",t)}else{e.setAttribute("data-select2-id",++r);t=r.toString()}}return t};t.StoreData=function(e,n,i){var r=t.GetUniqueElementId(e);if(!t.__cache[r]){t.__cache[r]={}}t.__cache[r][n]=i};t.GetData=function(n,i){var r=t.GetUniqueElementId(n);if(i){if(t.__cache[r]){if(t.__cache[r][i]!=null){return t.__cache[r][i]}return e(n).data(i)}return e(n).data(i)}else{return t.__cache[r]}};t.RemoveData=function(e){var n=t.GetUniqueElementId(e);if(t.__cache[n]!=null){delete t.__cache[n]}e.removeAttribute("data-select2-id")};return t});t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e;this.data=i;this.options=t;n.__super__.constructor.call(this)}t.Extend(n,t.Observable);n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="listbox"></ul>');if(this.options.get("multiple")){t.attr("aria-multiselectable","true")}this.$results=t;return t};n.prototype.clear=function(){this.$results.empty()};n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear();this.hideLoading();var i=e('<li role="alert" aria-live="assertive"'+' class="select2-results__option"></li>');var r=this.options.get("translations").get(t.message);i.append(n(r(t.args)));i[0].className+=" select2-results__message";this.$results.append(i)};n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()};n.prototype.append=function(e){this.hideLoading();var t=[];if(e.results==null||e.results.length===0){if(this.$results.children().length===0){this.trigger("results:message",{message:"noResults"})}return}e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n];var r=this.option(i);t.push(r)}this.$results.append(t)};n.prototype.position=function(e,t){var n=t.find(".select2-results");n.append(e)};n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)};n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]");var t=e.filter("[aria-selected=true]");if(t.length>0){t.first().trigger("mouseenter")}else{e.first().trigger("mouseenter")}this.ensureHighlightVisible()};n.prototype.setClasses=function(){var n=this;this.data.current(function(i){var r=e.map(i,function(e){return e.id.toString()});var s=n.$results.find(".select2-results__option[aria-selected]");s.each(function(){var n=e(this);var i=t.GetData(this,"data");var s=""+i.id;if(i.element!=null&&i.element.selected||i.element==null&&e.inArray(s,r)>-1){n.attr("aria-selected","true")}else{n.attr("aria-selected","false")}})})};n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching");var n={disabled:true,loading:true,text:t(e)};var i=this.option(n);i.className+=" loading-results";this.$results.prepend(i)};n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()};n.prototype.option=function(n){var i=document.createElement("li");i.className="select2-results__option";var r={role:"option","aria-selected":"false"};var s=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;if(n.element!=null&&s.call(n.element,":disabled")||n.element==null&&n.disabled){delete r["aria-selected"];r["aria-disabled"]="true"}if(n.id==null){delete r["aria-selected"]}if(n._resultId!=null){i.id=n._resultId}if(n.title){i.title=n.title}if(n.children){r.role="group";r["aria-label"]=n.text;delete r["aria-selected"]}for(var o in r){var a=r[o];i.setAttribute(o,a)}if(n.children){var l=e(i);var c=document.createElement("strong");c.className="select2-results__group";var u=e(c);this.template(n,c);var d=[];for(var p=0;p<n.children.length;p++){var h=n.children[p];var f=this.option(h);d.push(f)}var g=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});g.append(d);l.append(c);l.append(g)}else{this.template(n,i)}t.StoreData(i,"data",n);return i};n.prototype.bind=function(n,i){var r=this;var s=n.id+"-results";this.$results.attr("id",s);n.on("results:all",function(e){r.clear();r.append(e.data);if(n.isOpen()){r.setClasses();r.highlightFirstItem()}});n.on("results:append",function(e){r.append(e.data);if(n.isOpen()){r.setClasses()}});n.on("query",function(e){r.hideMessages();r.showLoading(e)});n.on("select",function(){if(!n.isOpen()){return}r.setClasses();if(r.options.get("scrollAfterSelect")){r.highlightFirstItem()}});n.on("unselect",function(){if(!n.isOpen()){return}r.setClasses();if(r.options.get("scrollAfterSelect")){r.highlightFirstItem()}});n.on("open",function(){r.$results.attr("aria-expanded","true");r.$results.attr("aria-hidden","false");r.setClasses();r.ensureHighlightVisible()});n.on("close",function(){r.$results.attr("aria-expanded","false");r.$results.attr("aria-hidden","true");r.$results.removeAttr("aria-activedescendant")});n.on("results:toggle",function(){var e=r.getHighlightedResults();if(e.length===0){return}e.trigger("mouseup")});n.on("results:select",function(){var e=r.getHighlightedResults();if(e.length===0){return}var n=t.GetData(e[0],"data");if(e.attr("aria-selected")=="true"){r.trigger("close",{})}else{r.trigger("select",{data:n})}});n.on("results:previous",function(){var e=r.getHighlightedResults();var t=r.$results.find("[aria-selected]");var n=t.index(e);if(n<=0){return}var i=n-1;if(e.length===0){i=0}var s=t.eq(i);s.trigger("mouseenter");var o=r.$results.offset().top;var a=s.offset().top;var l=r.$results.scrollTop()+(a-o);if(i===0){r.$results.scrollTop(0)}else if(a-o<0){r.$results.scrollTop(l)}});n.on("results:next",function(){var e=r.getHighlightedResults();var t=r.$results.find("[aria-selected]");var n=t.index(e);var i=n+1;if(i>=t.length){return}var s=t.eq(i);s.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(false);var a=s.offset().top+s.outerHeight(false);var l=r.$results.scrollTop()+a-o;if(i===0){r.$results.scrollTop(0)}else if(a>o){r.$results.scrollTop(l)}});n.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")});n.on("results:message",function(e){r.displayMessage(e)});if(e.fn.mousewheel){this.$results.on("mousewheel",function(e){var t=r.$results.scrollTop();var n=r.$results.get(0).scrollHeight-t+e.deltaY;var i=e.deltaY>0&&t-e.deltaY<=0;var s=e.deltaY<0&&n<=r.$results.height();if(i){r.$results.scrollTop(0);e.preventDefault();e.stopPropagation()}else if(s){r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height());e.preventDefault();e.stopPropagation()}})}this.$results.on("mouseup",".select2-results__option[aria-selected]",function(n){var i=e(this);var s=t.GetData(this,"data");if(i.attr("aria-selected")==="true"){if(r.options.get("multiple")){r.trigger("unselect",{originalEvent:n,data:s})}else{r.trigger("close",{})}return}r.trigger("select",{originalEvent:n,data:s})});this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(n){var i=t.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted");r.trigger("results:focus",{data:i,element:e(this)})})};n.prototype.getHighlightedResults=function(){var e=this.$results.find(".select2-results__option--highlighted");return e};n.prototype.destroy=function(){this.$results.remove()};n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(e.length===0){return}var t=this.$results.find("[aria-selected]");var n=t.index(e);var i=this.$results.offset().top;var r=e.offset().top;var s=this.$results.scrollTop()+(r-i);var o=r-i;s-=e.outerHeight(false)*2;if(n<=2){this.$results.scrollTop(0)}else if(o>this.$results.outerHeight()||o<0){this.$results.scrollTop(s)}};n.prototype.template=function(t,n){var i=this.options.get("templateResult");var r=this.options.get("escapeMarkup");var s=i(t,n);if(s==null){n.style.display="none"}else if(typeof s==="string"){n.innerHTML=r(s)}else{e(n).append(s)}};return n});t.define("select2/keys",[],function(){var e={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return e});t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e;this.options=t;i.__super__.constructor.call(this)}t.Extend(i,t.Observable);i.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox" '+' aria-haspopup="true" aria-expanded="false">'+"</span>");this._tabindex=0;if(t.GetData(this.$element[0],"old-tabindex")!=null){this._tabindex=t.GetData(this.$element[0],"old-tabindex")}else if(this.$element.attr("tabindex")!=null){this._tabindex=this.$element.attr("tabindex")}n.attr("title",this.$element.attr("title"));n.attr("tabindex",this._tabindex);n.attr("aria-disabled","false");this.$selection=n;return n};i.prototype.bind=function(e,t){var i=this;var r=e.id+"-results";this.container=e;this.$selection.on("focus",function(e){i.trigger("focus",e)});this.$selection.on("blur",function(e){i._handleBlur(e)});this.$selection.on("keydown",function(e){i.trigger("keypress",e);if(e.which===n.SPACE){e.preventDefault()}});e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)});e.on("selection:update",function(e){i.update(e.data)});e.on("open",function(){i.$selection.attr("aria-expanded","true");i.$selection.attr("aria-owns",r);i._attachCloseHandler(e)});e.on("close",function(){i.$selection.attr("aria-expanded","false");i.$selection.removeAttr("aria-activedescendant");i.$selection.removeAttr("aria-owns");i.$selection.trigger("focus");i._detachCloseHandler(e)});e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex);i.$selection.attr("aria-disabled","false")});e.on("disable",function(){i.$selection.attr("tabindex","-1");i.$selection.attr("aria-disabled","true")})};i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){if(document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)){return}n.trigger("blur",t)},1)};i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,function(n){var i=e(n.target);var r=i.closest(".select2");var s=e(".select2.select2-container--open");s.each(function(){if(this==r[0]){return}var e=t.GetData(this,"element");e.select2("close")})})};i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)};i.prototype.position=function(e,t){var n=t.find(".selection");n.append(e)};i.prototype.destroy=function(){this._detachCloseHandler(this.container)};i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")};i.prototype.isEnabled=function(){return!this.isDisabled()};i.prototype.isDisabled=function(){return this.options.get("disabled")};return i});t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}n.Extend(r,t);r.prototype.render=function(){var e=r.__super__.render.call(this);e.addClass("select2-selection--single");e.html('<span class="select2-selection__rendered"></span>'+'<span class="select2-selection__arrow" role="presentation">'+'<b role="presentation"></b>'+"</span>");return e};r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true");this.$selection.attr("aria-labelledby",i);this.$selection.on("mousedown",function(e){if(e.which!==1){return}n.trigger("toggle",{originalEvent:e})});this.$selection.on("focus",function(e){});this.$selection.on("blur",function(e){});e.on("focus",function(t){if(!e.isOpen()){n.$selection.trigger("focus")}})};r.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty();e.removeAttr("title")};r.prototype.display=function(e,t){var n=this.options.get("templateSelection");var i=this.options.get("escapeMarkup");return i(n(e,t))};r.prototype.selectionContainer=function(){return e("<span></span>")};r.prototype.update=function(e){if(e.length===0){this.clear();return}var t=e[0];var n=this.$selection.find(".select2-selection__rendered");var i=this.display(t,n);n.empty().append(i);var r=t.title||t.text;if(r){n.attr("title",r)}else{n.removeAttr("title")}};return r});t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}n.Extend(i,t);i.prototype.render=function(){var e=i.__super__.render.call(this);e.addClass("select2-selection--multiple");e.html('<ul class="select2-selection__rendered"></ul>');return e};i.prototype.bind=function(t,r){var s=this;i.__super__.bind.apply(this,arguments);this.$selection.on("click",function(e){s.trigger("toggle",{originalEvent:e})});this.$selection.on("click",".select2-selection__choice__remove",function(t){if(s.isDisabled()){return}var i=e(this);var r=i.parent();var o=n.GetData(r[0],"data");s.trigger("unselect",{originalEvent:t,data:o})})};i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty();e.removeAttr("title")};i.prototype.display=function(e,t){var n=this.options.get("templateSelection");var i=this.options.get("escapeMarkup");return i(n(e,t))};i.prototype.selectionContainer=function(){var t=e('<li class="select2-selection__choice">'+'<span class="select2-selection__choice__remove" role="presentation">'+"&times;"+"</span>"+"</li>");return t};i.prototype.update=function(e){this.clear();if(e.length===0){return}var t=[];for(var i=0;i<e.length;i++){var r=e[i];var s=this.selectionContainer();var o=this.display(r,s);s.append(o);var a=r.title||r.text;if(a){s.attr("title",a)}n.StoreData(s[0],"data",r);t.push(s)}var l=this.$selection.find(".select2-selection__rendered");n.appendMany(l,t)};return i});t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder"));e.call(this,t,n)}t.prototype.normalizePlaceholder=function(e,t){if(typeof t==="string"){t={id:"",text:t}}return t};t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();n.html(this.display(t));n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice");return n};t.prototype.update=function(e,t){var n=t.length==1&&t[0].id!=this.placeholder.id;var i=t.length>1;if(i||n){return e.call(this,t)}this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(r)};return t});t.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(e,t,n){function i(){}i.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n);if(this.placeholder==null){if(this.options.get("debug")&&window.console&&console.error){console.error("Select2: The `allowClear` option should be used in combination "+"with the `placeholder` option.")}}this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)});t.on("keypress",function(e){i._handleKeyboardClear(e,t)})};i.prototype._handleClear=function(e,t){if(this.isDisabled()){return}var i=this.$selection.find(".select2-selection__clear");if(i.length===0){return}t.stopPropagation();var r=n.GetData(i[0],"data");var s=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};this.trigger("clear",o);if(o.prevented){this.$element.val(s);return}for(var a=0;a<r.length;a++){o={data:r[a]};this.trigger("unselect",o);if(o.prevented){this.$element.val(s);return}}this.$element.trigger("input").trigger("change");this.trigger("toggle",{})};i.prototype._handleKeyboardClear=function(e,n,i){if(i.isOpen()){return}if(n.which==t.DELETE||n.which==t.BACKSPACE){this._handleClear(n)}};i.prototype.update=function(t,i){t.call(this,i);if(this.$selection.find(".select2-selection__placeholder").length>0||i.length===0){return}var r=this.options.get("translations").get("removeAllItems");var s=e('<span class="select2-selection__clear" title="'+r()+'">'+"&times;"+"</span>");n.StoreData(s[0],"data",i);this.$selection.find(".select2-selection__rendered").prepend(s)};return i});t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline">'+'<input class="select2-search__field" type="search" tabindex="-1"'+' autocomplete="off" autocorrect="off" autocapitalize="none"'+' spellcheck="false" role="searchbox" aria-autocomplete="list" />'+"</li>");this.$searchContainer=n;this.$search=n.find("input");var i=t.call(this);this._transferTabIndex();return i};i.prototype.bind=function(e,i,r){var s=this;var o=i.id+"-results";e.call(this,i,r);i.on("open",function(){s.$search.attr("aria-controls",o);s.$search.trigger("focus")});i.on("close",function(){s.$search.val("");s.$search.removeAttr("aria-controls");s.$search.removeAttr("aria-activedescendant");s.$search.trigger("focus")});i.on("enable",function(){s.$search.prop("disabled",false);s._transferTabIndex()});i.on("disable",function(){s.$search.prop("disabled",true)});i.on("focus",function(e){s.$search.trigger("focus")});i.on("results:focus",function(e){if(e.data._resultId){s.$search.attr("aria-activedescendant",e.data._resultId)}else{s.$search.removeAttr("aria-activedescendant")}});this.$selection.on("focusin",".select2-search--inline",function(e){s.trigger("focus",e)});this.$selection.on("focusout",".select2-search--inline",function(e){s._handleBlur(e)});this.$selection.on("keydown",".select2-search--inline",function(e){e.stopPropagation();s.trigger("keypress",e);s._keyUpPrevented=e.isDefaultPrevented();var i=e.which;if(i===n.BACKSPACE&&s.$search.val()===""){var r=s.$searchContainer.prev(".select2-selection__choice");if(r.length>0){var o=t.GetData(r[0],"data");s.searchRemoveChoice(o);e.preventDefault()}}});this.$selection.on("click",".select2-search--inline",function(e){if(s.$search.val()){e.stopPropagation()}});var a=document.documentMode;var l=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){if(l){s.$selection.off("input.search input.searchcheck");return}s.$selection.off("keyup.search")});this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(l&&e.type==="input"){s.$selection.off("input.search input.searchcheck");return}var t=e.which;if(t==n.SHIFT||t==n.CTRL||t==n.ALT){return}if(t==n.TAB){return}s.handleSearch(e)})};i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex"));this.$selection.attr("tabindex","-1")};i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)};i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder","");e.call(this,t);this.$selection.find(".select2-selection__rendered").append(this.$searchContainer);this.resizeSearch();if(n){this.$search.trigger("focus")}};i.prototype.handleSearch=function(){this.resizeSearch();if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=false};i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t});this.$search.val(t.text);this.handleSearch()};i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(this.$search.attr("placeholder")!==""){e=this.$selection.find(".select2-selection__rendered").width()}else{var t=this.$search.val().length+1;e=t*.75+"em"}this.$search.css("width",e)};return i});t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}t.prototype.bind=function(t,n,i){var r=this;var s=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"];var o=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,i);n.on("*",function(t,n){if(e.inArray(t,s)===-1){return}n=n||{};var i=e.Event("select2:"+t,{params:n});r.$element.trigger(i);if(e.inArray(t,o)===-1){return}n.prevented=i.isDefaultPrevented()})};return t});t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}n.prototype.all=function(){return this.dict};n.prototype.get=function(e){return this.dict[e]};n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)};n._cache={};n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])};return n});t.define("select2/diacritics",[],function(){var e={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Œ":"OE","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","œ":"oe","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"};return e});t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}e.Extend(t,e.Observable);t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")};t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")};t.prototype.bind=function(e,t){};t.prototype.destroy=function(){};t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";i+=e.generateChars(4);if(n.id!=null){i+="-"+n.id.toString()}else{i+="-"+e.generateChars(4)}return i};return t});t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e;this.options=t;i.__super__.constructor.call(this)}t.Extend(i,e);i.prototype.current=function(e){var t=[];var i=this;this.$element.find(":selected").each(function(){var e=n(this);var r=i.item(e);t.push(r)});e(t)};i.prototype.select=function(e){var t=this;e.selected=true;if(n(e.element).is("option")){e.element.selected=true;this.$element.trigger("input").trigger("change");return}if(this.$element.prop("multiple")){this.current(function(i){var r=[];e=[e];e.push.apply(e,i);for(var s=0;s<e.length;s++){var o=e[s].id;if(n.inArray(o,r)===-1){r.push(o)}}t.$element.val(r);t.$element.trigger("input").trigger("change")})}else{var i=e.id;this.$element.val(i);this.$element.trigger("input").trigger("change")}};i.prototype.unselect=function(e){var t=this;if(!this.$element.prop("multiple")){return}e.selected=false;if(n(e.element).is("option")){e.element.selected=false;this.$element.trigger("input").trigger("change");return}this.current(function(i){var r=[];for(var s=0;s<i.length;s++){var o=i[s].id;if(o!==e.id&&n.inArray(o,r)===-1){r.push(o)}}t.$element.val(r);t.$element.trigger("input").trigger("change")})};i.prototype.bind=function(e,t){var n=this;this.container=e;e.on("select",function(e){n.select(e.data)});e.on("unselect",function(e){n.unselect(e.data)})};i.prototype.destroy=function(){this.$element.find("*").each(function(){t.RemoveData(this)})};i.prototype.query=function(e,t){var i=[];var r=this;var s=this.$element.children();s.each(function(){var t=n(this);if(!t.is("option")&&!t.is("optgroup")){return}var s=r.item(t);var o=r.matches(e,s);if(o!==null){i.push(o)}});t({results:i})};i.prototype.addOptions=function(e){t.appendMany(this.$element,e)};i.prototype.option=function(e){var i;if(e.children){i=document.createElement("optgroup");i.label=e.text}else{i=document.createElement("option");if(i.textContent!==undefined){i.textContent=e.text}else{i.innerText=e.text}}if(e.id!==undefined){i.value=e.id}if(e.disabled){i.disabled=true}if(e.selected){i.selected=true}if(e.title){i.title=e.title}var r=n(i);var s=this._normalizeItem(e);s.element=i;t.StoreData(i,"data",s);return r};i.prototype.item=function(e){var i={};i=t.GetData(e[0],"data");if(i!=null){return i}if(e.is("option")){i={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")}}else if(e.is("optgroup")){i={text:e.prop("label"),children:[],title:e.prop("title")};var r=e.children("option");var s=[];for(var o=0;o<r.length;o++){var a=n(r[o]);var l=this.item(a);s.push(l)}i.children=s}i=this._normalizeItem(i);i.element=e[0];t.StoreData(e[0],"data",i);return i};i.prototype._normalizeItem=function(e){if(e!==Object(e)){e={id:e,text:e}}e=n.extend({},{text:""},e);var t={selected:false,disabled:false};if(e.id!=null){e.id=e.id.toString()}if(e.text!=null){e.text=e.text.toString()}if(e._resultId==null&&e.id&&this.container!=null){e._resultId=this.generateResultId(this.container,e)}return n.extend({},t,e)};i.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)};return i});t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){this._dataToConvert=t.get("data")||[];i.__super__.constructor.call(this,e,t)}t.Extend(i,e);i.prototype.bind=function(e,t){i.__super__.bind.call(this,e,t);this.addOptions(this.convertToOptions(this._dataToConvert))};i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});if(t.length===0){t=this.option(e);this.addOptions(t)}i.__super__.select.call(this,e)};i.prototype.convertToOptions=function(e){var i=this;var r=this.$element.find("option");var s=r.map(function(){return i.item(n(this)).id}).get();var o=[];function a(e){return function(){return n(this).val()==e.id}}for(var l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var u=r.filter(a(c));var d=this.item(u);var p=n.extend(true,{},c,d);var h=this.option(p);u.replaceWith(h);continue}var f=this.option(c);if(c.children){var g=this.convertToOptions(c.children);t.appendMany(f,g)}o.push(f)}return o};return i});t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax"));if(this.ajaxOptions.processResults!=null){this.processResults=this.ajaxOptions.processResults}i.__super__.constructor.call(this,e,t)}t.Extend(i,e);i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var r=n.ajax(e);r.then(t);r.fail(i);return r}};return n.extend({},t,e,true)};i.prototype.processResults=function(e){return e};i.prototype.query=function(e,t){var i=[];var r=this;if(this._request!=null){if(n.isFunction(this._request.abort)){this._request.abort()}this._request=null}var s=n.extend({type:"GET"},this.ajaxOptions);if(typeof s.url==="function"){s.url=s.url.call(this.$element,e)}if(typeof s.data==="function"){s.data=s.data.call(this.$element,e)}function o(){var i=s.transport(s,function(i){var s=r.processResults(i,e);if(r.options.get("debug")&&window.console&&console.error){if(!s||!s.results||!n.isArray(s.results)){console.error("Select2: The AJAX results did not return an array in the "+"`results` key of the response.")}}t(s)},function(){if("status"in i&&(i.status===0||i.status==="0")){return}r.trigger("results:message",{message:"errorLoading"})});r._request=i}if(this.ajaxOptions.delay&&e.term!=null){if(this._queryTimeout){window.clearTimeout(this._queryTimeout)}this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)}else{o()}};return i});t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var r=i.get("tags");var s=i.get("createTag");if(s!==undefined){this.createTag=s}var o=i.get("insertTag");if(o!==undefined){this.insertTag=o}t.call(this,n,i);if(e.isArray(r)){for(var a=0;a<r.length;a++){var l=r[a];var c=this._normalizeItem(l);var u=this.option(c);this.$element.append(u)}}}t.prototype.query=function(e,t,n){var i=this;this._removeOldTags();if(t.term==null||t.page!=null){e.call(this,t,n);return}function r(e,s){var o=e.results;for(var a=0;a<o.length;a++){var l=o[a];var c=l.children!=null&&!r({results:l.children},true);var u=(l.text||"").toUpperCase();var d=(t.term||"").toUpperCase();var p=u===d;if(p||c){if(s){return false}e.data=o;n(e);return}}if(s){return true}var h=i.createTag(t);if(h!=null){var f=i.option(h);f.attr("data-select2-tag",true);i.addOptions([f]);i.insertTag(o,h)}e.results=o;n(e)}e.call(this,t,r)};t.prototype.createTag=function(t,n){var i=e.trim(n.term);if(i===""){return null}return{id:i,text:i}};t.prototype.insertTag=function(e,t,n){t.unshift(n)};t.prototype._removeOldTags=function(t){var n=this.$element.find("option[data-select2-tag]");n.each(function(){if(this.selected){return}e(this).remove()})};return t});t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");if(i!==undefined){this.tokenizer=i}e.call(this,t,n)}t.prototype.bind=function(e,t,n){e.call(this,t,n);this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")};t.prototype.query=function(t,n,i){var r=this;function s(t){var n=r._normalizeItem(t);var i=r.$element.find("option").filter(function(){return e(this).val()===n.id});if(!i.length){var s=r.option(n);s.attr("data-select2-tag",true);r._removeOldTags();r.addOptions([s])}o(n)}function o(e){r.trigger("select",{data:e})}n.term=n.term||"";var a=this.tokenizer(n,this.options,s);if(a.term!==n.term){if(this.$search.length){this.$search.val(a.term);this.$search.trigger("focus")}n.term=a.term}t.call(this,n,i)};t.prototype.tokenizer=function(t,n,i,r){var s=i.get("tokenSeparators")||[];var o=n.term;var a=0;var l=this.createTag||function(e){return{id:e.term,text:e.term}};while(a<o.length){var c=o[a];if(e.inArray(c,s)===-1){a++;continue}var u=o.substr(0,a);var d=e.extend({},n,{term:u});var p=l(d);if(p==null){a++;continue}r(p);o=o.substr(a+1)||"";a=0}return{term:o}};return t});t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength");e.call(this,t,n)}e.prototype.query=function(e,t,n){t.term=t.term||"";if(t.term.length<this.minimumInputLength){this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}});return}e.call(this,t,n)};return e});t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength");e.call(this,t,n)}e.prototype.query=function(e,t,n){t.term=t.term||"";if(this.maximumInputLength>0&&t.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}});return}e.call(this,t,n)};return e});t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength");e.call(this,t,n)}e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n);t.on("select",function(){i._checkIfMaximumSelected()})};e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})};e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){var i=e!=null?e.length:0;if(n.maximumSelectionLength>0&&i>=n.maximumSelectionLength){n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}});return}if(t){t()}})};return e});t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e;this.options=t;n.__super__.constructor.call(this)}t.Extend(n,t.Observable);n.prototype.render=function(){var t=e('<span class="select2-dropdown">'+'<span class="select2-results"></span>'+"</span>");t.attr("dir",this.options.get("dir"));this.$dropdown=t;return t};n.prototype.bind=function(){};n.prototype.position=function(e,t){};n.prototype.destroy=function(){this.$dropdown.remove()};return n});t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}n.prototype.render=function(t){var n=t.call(this);var i=e('<span class="select2-search select2-search--dropdown">'+'<input class="select2-search__field" type="search" tabindex="-1"'+' autocomplete="off" autocorrect="off" autocapitalize="none"'+' spellcheck="false" role="searchbox" aria-autocomplete="list" />'+"</span>");this.$searchContainer=i;this.$search=i.find("input");n.prepend(i);return n};n.prototype.bind=function(t,n,i){var r=this;var s=n.id+"-results";t.call(this,n,i);this.$search.on("keydown",function(e){r.trigger("keypress",e);r._keyUpPrevented=e.isDefaultPrevented()});this.$search.on("input",function(t){e(this).off("keyup")});this.$search.on("keyup input",function(e){r.handleSearch(e)});n.on("open",function(){r.$search.attr("tabindex",0);r.$search.attr("aria-controls",s);r.$search.trigger("focus");window.setTimeout(function(){r.$search.trigger("focus")},0)});n.on("close",function(){r.$search.attr("tabindex",-1);r.$search.removeAttr("aria-controls");r.$search.removeAttr("aria-activedescendant");r.$search.val("");r.$search.trigger("blur")});n.on("focus",function(){if(!n.isOpen()){r.$search.trigger("focus")}});n.on("results:all",function(e){if(e.query.term==null||e.query.term===""){var t=r.showSearch(e);if(t){r.$searchContainer.removeClass("select2-search--hide")}else{r.$searchContainer.addClass("select2-search--hide")}}});n.on("results:focus",function(e){if(e.data._resultId){r.$search.attr("aria-activedescendant",e.data._resultId)}else{r.$search.removeAttr("aria-activedescendant")}})};n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=false};n.prototype.showSearch=function(e,t){return true};return n});t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder"));e.call(this,t,n,i)}e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results);e.call(this,t)};e.prototype.normalizePlaceholder=function(e,t){if(typeof t==="string"){t={id:"",text:t}}return t};e.prototype.removePlaceholder=function(e,t){var n=t.slice(0);for(var i=t.length-1;i>=0;i--){var r=t[i];if(this.placeholder.id===r.id){n.splice(i,1)}}return n};return e});t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={};e.call(this,t,n,i);this.$loadingMore=this.createLoadingMore();this.loading=false}t.prototype.append=function(e,t){this.$loadingMore.remove();this.loading=false;e.call(this,t);if(this.showLoadingMore(t)){this.$results.append(this.$loadingMore);this.loadMoreIfNeeded()}};t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n);t.on("query",function(e){i.lastParams=e;i.loading=true});t.on("query:append",function(e){i.lastParams=e;i.loading=true});this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))};t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);if(this.loading||!t){return}var n=this.$results.offset().top+this.$results.outerHeight(false);var i=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(false);if(n+50>=i){this.loadMore()}};t.prototype.loadMore=function(){this.loading=true;var t=e.extend({},{page:1},this.lastParams);t.page++;this.trigger("query:append",t)};t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more};t.prototype.createLoadingMore=function(){var t=e("<li "+'class="select2-results__option select2-results__option--load-more"'+'role="option" aria-disabled="true"></li>');var n=this.options.get("translations").get("loadingMore");t.html(n(this.lastParams));return t};return t});t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body);t.call(this,n,i)}n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n);t.on("open",function(){i._showDropdown();i._attachPositioningHandler(t);i._bindContainerResultHandlers(t)});t.on("close",function(){i._hideDropdown();i._detachPositioningHandler(t)});this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})};n.prototype.destroy=function(e){e.call(this);this.$dropdownContainer.remove()};n.prototype.position=function(e,t,n){t.attr("class",n.attr("class"));t.removeClass("select2");t.addClass("select2-container--open");t.css({position:"absolute",top:-999999});this.$container=n};n.prototype.render=function(t){var n=e("<span></span>");var i=t.call(this);n.append(i);this.$dropdownContainer=n;return n};n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()};n.prototype._bindContainerResultHandlers=function(e,t){if(this._containerResultsHandlersBound){return}var n=this;t.on("results:all",function(){n._positionDropdown();n._resizeDropdown()});t.on("results:append",function(){n._positionDropdown();n._resizeDropdown()});t.on("results:message",function(){n._positionDropdown();n._resizeDropdown()});t.on("select",function(){n._positionDropdown();n._resizeDropdown()});t.on("unselect",function(){n._positionDropdown();n._resizeDropdown()});this._containerResultsHandlersBound=true};n.prototype._attachPositioningHandler=function(n,i){var r=this;var s="scroll.select2."+i.id;var o="resize.select2."+i.id;var a="orientationchange.select2."+i.id;var l=this.$container.parents().filter(t.hasScroll);l.each(function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})});l.on(s,function(n){var i=t.GetData(this,"select2-scroll-position");e(this).scrollTop(i.y)});e(window).on(s+" "+o+" "+a,function(e){r._positionDropdown();r._resizeDropdown()})};n.prototype._detachPositioningHandler=function(n,i){var r="scroll.select2."+i.id;var s="resize.select2."+i.id;var o="orientationchange.select2."+i.id;var a=this.$container.parents().filter(t.hasScroll);a.off(r);e(window).off(r+" "+s+" "+o)};n.prototype._positionDropdown=function(){var t=e(window);var n=this.$dropdown.hasClass("select2-dropdown--above");var i=this.$dropdown.hasClass("select2-dropdown--below");var r=null;var s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(false);var o={height:this.$container.outerHeight(false)};o.top=s.top;o.bottom=s.top+o.height;var a={height:this.$dropdown.outerHeight(false)};var l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()};var c=l.top<s.top-a.height;var u=l.bottom>s.bottom+a.height;var d={left:s.left,top:o.bottom};var p=this.$dropdownParent;if(p.css("position")==="static"){p=p.offsetParent()}var h={top:0,left:0};if(e.contains(document.body,p[0])||p[0].isConnected){h=p.offset()}d.top-=h.top;d.left-=h.left;if(!n&&!i){r="below"}if(!u&&c&&!n){r="above"}else if(!c&&u&&n){r="below"}if(r=="above"||n&&r!=="below"){d.top=o.top-h.top-a.height}if(r!=null){this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r);this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)}this.$dropdownContainer.css(d)};n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(false)+"px"};if(this.options.get("dropdownAutoWidth")){e.minWidth=e.width;e.position="relative";e.width="auto"}this.$dropdown.css(e)};n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent);this._positionDropdown();this._resizeDropdown()};return n});t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){var n=0;for(var i=0;i<t.length;i++){var r=t[i];if(r.children){n+=e(r.children)}else{n++}}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch");if(this.minimumResultsForSearch<0){this.minimumResultsForSearch=Infinity}e.call(this,t,n,i)}t.prototype.showSearch=function(t,n){if(e(n.data.results)<this.minimumResultsForSearch){return false}return t.call(this,n)};return t});t.define("select2/dropdown/selectOnClose",["../utils"],function(e){function t(){}t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n);t.on("close",function(e){i._handleSelectOnClose(e)})};t.prototype._handleSelectOnClose=function(t,n){if(n&&n.originalSelect2Event!=null){var i=n.originalSelect2Event;if(i._type==="select"||i._type==="unselect"){return}}var r=this.getHighlightedResults();if(r.length<1){return}var s=e.GetData(r[0],"data");if(s.element!=null&&s.element.selected||s.element==null&&s.selected){return}this.trigger("select",{data:s})};return t});t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n);t.on("select",function(e){i._selectTriggered(e)});t.on("unselect",function(e){i._selectTriggered(e)})};e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;if(n&&(n.ctrlKey||n.metaKey)){return}this.trigger("close",{originalEvent:n,originalSelect2Event:t})};return e});t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum;var n="Please delete "+t+" character";if(t!=1){n+="s"}return n},inputTooShort:function(e){var t=e.minimum-e.input.length;var n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";if(e.maximum!=1){t+="s"}return t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}});t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,r,s,o,a,l,c,u,d,p,h,f,g,v,m,y,_,w,$,b,A,x,D,S,C,E){function O(){this.reset()}O.prototype.apply=function(u){u=e.extend(true,{},this.defaults,u);if(u.dataAdapter==null){if(u.ajax!=null){u.dataAdapter=f}else if(u.data!=null){u.dataAdapter=h}else{u.dataAdapter=p}if(u.minimumInputLength>0){u.dataAdapter=c.Decorate(u.dataAdapter,m)}if(u.maximumInputLength>0){u.dataAdapter=c.Decorate(u.dataAdapter,y)}if(u.maximumSelectionLength>0){u.dataAdapter=c.Decorate(u.dataAdapter,_)}if(u.tags){u.dataAdapter=c.Decorate(u.dataAdapter,g)}if(u.tokenSeparators!=null||u.tokenizer!=null){u.dataAdapter=c.Decorate(u.dataAdapter,v)}if(u.query!=null){var d=t(u.amdBase+"compat/query");u.dataAdapter=c.Decorate(u.dataAdapter,d)}if(u.initSelection!=null){var E=t(u.amdBase+"compat/initSelection");u.dataAdapter=c.Decorate(u.dataAdapter,E)}}if(u.resultsAdapter==null){u.resultsAdapter=n;if(u.ajax!=null){u.resultsAdapter=c.Decorate(u.resultsAdapter,A)}if(u.placeholder!=null){u.resultsAdapter=c.Decorate(u.resultsAdapter,b)}if(u.selectOnClose){u.resultsAdapter=c.Decorate(u.resultsAdapter,S)}}if(u.dropdownAdapter==null){if(u.multiple){u.dropdownAdapter=w}else{var O=c.Decorate(w,$);u.dropdownAdapter=O}if(u.minimumResultsForSearch!==0){u.dropdownAdapter=c.Decorate(u.dropdownAdapter,D)}if(u.closeOnSelect){u.dropdownAdapter=c.Decorate(u.dropdownAdapter,C)}if(u.dropdownCssClass!=null||u.dropdownCss!=null||u.adaptDropdownCssClass!=null){var T=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=c.Decorate(u.dropdownAdapter,T)}u.dropdownAdapter=c.Decorate(u.dropdownAdapter,x)}if(u.selectionAdapter==null){if(u.multiple){u.selectionAdapter=r}else{u.selectionAdapter=i}if(u.placeholder!=null){u.selectionAdapter=c.Decorate(u.selectionAdapter,s)}if(u.allowClear){u.selectionAdapter=c.Decorate(u.selectionAdapter,o)}if(u.multiple){u.selectionAdapter=c.Decorate(u.selectionAdapter,a)}if(u.containerCssClass!=null||u.containerCss!=null||u.adaptContainerCssClass!=null){var q=t(u.amdBase+"compat/containerCss");u.selectionAdapter=c.Decorate(u.selectionAdapter,q)}u.selectionAdapter=c.Decorate(u.selectionAdapter,l)}u.language=this._resolveLanguage(u.language);u.language.push("en");var j=[];for(var L=0;L<u.language.length;L++){var I=u.language[L];if(j.indexOf(I)===-1){j.push(I)}}u.language=j;u.translations=this._processTranslations(u.language,u.debug);return u};O.prototype.reset=function(){function t(e){function t(e){return d[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(i,r){if(e.trim(i.term)===""){return r}if(r.children&&r.children.length>0){var s=e.extend(true,{},r);for(var o=r.children.length-1;o>=0;o--){var a=r.children[o];var l=n(i,a);if(l==null){s.children.splice(o,1)}}if(s.children.length>0){return s}return n(i,s)}var c=t(r.text).toUpperCase();var u=t(i.term).toUpperCase();if(c.indexOf(u)>-1){return r}return null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:true,debug:false,dropdownAutoWidth:false,escapeMarkup:c.escapeMarkup,language:{},matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:false,scrollAfterSelect:false,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}};O.prototype.applyFromElement=function(e,t){var n=e.language;var i=this.defaults.language;var r=t.prop("lang");var s=t.closest("[lang]").prop("lang");var o=Array.prototype.concat.call(this._resolveLanguage(r),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(s));e.language=o;return e};O.prototype._resolveLanguage=function(t){if(!t){return[]}if(e.isEmptyObject(t)){return[]}if(e.isPlainObject(t)){return[t]}var n;if(!e.isArray(t)){n=[t]}else{n=t}var i=[];for(var r=0;r<n.length;r++){i.push(n[r]);if(typeof n[r]==="string"&&n[r].indexOf("-")>0){var s=n[r].split("-");var o=s[0];i.push(o)}}return i};O.prototype._processTranslations=function(t,n){var i=new u;for(var r=0;r<t.length;r++){var s=new u;var o=t[r];if(typeof o==="string"){try{s=u.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o;s=u.loadPath(o)}catch(e){if(n&&window.console&&console.warn){console.warn('Select2: The language file for "'+o+'" could '+"not be automatically loaded. A fallback will be used instead.")}}}}else if(e.isPlainObject(o)){s=new u(o)}else{s=o}i.extend(s)}return i};O.prototype.set=function(t,n){var i=e.camelCase(t);var r={};r[i]=n;var s=c._convertData(r);e.extend(true,this.defaults,s)};var T=new O;return T});t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function r(t,r){this.options=t;if(r!=null){this.fromElement(r)}if(r!=null){this.options=n.applyFromElement(this.options,r)}this.options=n.apply(this.options);if(r&&r.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,s)}}r.prototype.fromElement=function(e){var n=["select2"];if(this.options.multiple==null){this.options.multiple=e.prop("multiple")}if(this.options.disabled==null){this.options.disabled=e.prop("disabled")}if(this.options.dir==null){if(e.prop("dir")){this.options.dir=e.prop("dir")}else if(e.closest("[dir]").prop("dir")){this.options.dir=e.closest("[dir]").prop("dir")}else{this.options.dir="ltr"}}e.prop("disabled",this.options.disabled);e.prop("multiple",this.options.multiple);if(i.GetData(e[0],"select2Tags")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-select2-tags` attribute has been changed to "+'use the `data-data` and `data-tags="true"` attributes and will be '+"removed in future versions of Select2.")}i.StoreData(e[0],"data",i.GetData(e[0],"select2Tags"));i.StoreData(e[0],"tags",true)}if(i.GetData(e[0],"ajaxUrl")){if(this.options.debug&&window.console&&console.warn){console.warn("Select2: The `data-ajax-url` attribute has been changed to "+"`data-ajax--url` and support for the old attribute will be removed"+" in future versions of Select2.")}e.attr("ajax--url",i.GetData(e[0],"ajaxUrl"));i.StoreData(e[0],"ajax-Url",i.GetData(e[0],"ajaxUrl"))}var r={};function s(e,t){return t.toUpperCase()}for(var o=0;o<e[0].attributes.length;o++){var a=e[0].attributes[o].name;var l="data-";if(a.substr(0,l.length)==l){var c=a.substring(l.length);var u=i.GetData(e[0],c);var d=c.replace(/-([a-z])/g,s);r[d]=u}}if(t.fn.jquery&&t.fn.jquery.substr(0,2)=="1."&&e[0].dataset){r=t.extend(true,{},e[0].dataset,r)}var p=t.extend(true,{},i.GetData(e[0]),r);p=i._convertData(p);for(var h in p){if(t.inArray(h,n)>-1){continue}if(t.isPlainObject(this.options[h])){t.extend(this.options[h],p[h])}else{this.options[h]=p[h]}}return this};r.prototype.get=function(e){return this.options[e]};r.prototype.set=function(e,t){this.options[e]=t};return r});t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var r=function(e,i){if(n.GetData(e[0],"select2")!=null){n.GetData(e[0],"select2").destroy()}this.$element=e;this.id=this._generateId(e);i=i||{};this.options=new t(i,e);r.__super__.constructor.call(this);var s=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",s);e.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options);this.$selection=this.selection.render();this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options);this.$dropdown=this.dropdown.render();this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(e,this.options,this.dataAdapter);this.$results=this.results.render();this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters();this._registerDomEvents();this._registerDataEvents();this._registerSelectionEvents();this._registerDropdownEvents();this._registerResultsEvents();this._registerEvents();this.dataAdapter.current(function(e){d.trigger("selection:update",{data:e})});e.addClass("select2-hidden-accessible");e.attr("aria-hidden","true");this._syncAttributes();n.StoreData(e[0],"select2",this);e.data("select2",this)};n.Extend(r,n.Observable);r.prototype._generateId=function(e){var t="";if(e.attr("id")!=null){t=e.attr("id")}else if(e.attr("name")!=null){t=e.attr("name")+"-"+n.generateChars(2)}else{t=n.generateChars(4)}t=t.replace(/(:|\.|\[|\]|,)/g,"");t="select2-"+t;return t};r.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));if(t!=null){e.css("width",t)}};r.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(t=="resolve"){var i=this._resolveWidth(e,"style");if(i!=null){return i}return this._resolveWidth(e,"element")}if(t=="element"){var r=e.outerWidth(false);if(r<=0){return"auto"}return r+"px"}if(t=="style"){var s=e.attr("style");if(typeof s!=="string"){return null}var o=s.split(";");for(var a=0,l=o.length;a<l;a=a+1){var c=o[a].replace(/\s/g,"");var u=c.match(n);if(u!==null&&u.length>=1){return u[1]}}return null}if(t=="computedstyle"){var d=window.getComputedStyle(e[0]);return d.width}return t};r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container);this.selection.bind(this,this.$container);this.dropdown.bind(this,this.$container);this.results.bind(this,this.$container)};r.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})});this.$element.on("focus.select2",function(t){e.trigger("focus",t)});this._syncA=n.bind(this._syncAttributes,this);this._syncS=n.bind(this._syncSubtree,this);if(this.$element[0].attachEvent){this.$element[0].attachEvent("onpropertychange",this._syncA)}var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(t!=null){this._observer=new t(function(t){e._syncA();e._syncS(null,t)});this._observer.observe(this.$element[0],{attributes:true,childList:true,subtree:false})}else if(this.$element[0].addEventListener){this.$element[0].addEventListener("DOMAttrModified",e._syncA,false);this.$element[0].addEventListener("DOMNodeInserted",e._syncS,false);this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,false)}};r.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})};r.prototype._registerSelectionEvents=function(){var t=this;var n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()});this.selection.on("focus",function(e){t.focus(e)});this.selection.on("*",function(i,r){if(e.inArray(i,n)!==-1){return}t.trigger(i,r)})};r.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})};r.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})};r.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")});this.on("close",function(){e.$container.removeClass("select2-container--open")});this.on("enable",function(){e.$container.removeClass("select2-container--disabled")});this.on("disable",function(){e.$container.addClass("select2-container--disabled")});this.on("blur",function(){e.$container.removeClass("select2-container--focus")});this.on("query",function(t){if(!e.isOpen()){e.trigger("open",{})}this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})});this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})});this.on("keypress",function(t){var n=t.which;if(e.isOpen()){if(n===i.ESC||n===i.TAB||n===i.UP&&t.altKey){e.close(t);t.preventDefault()}else if(n===i.ENTER){e.trigger("results:select",{});t.preventDefault()}else if(n===i.SPACE&&t.ctrlKey){e.trigger("results:toggle",{});t.preventDefault()}else if(n===i.UP){e.trigger("results:previous",{});t.preventDefault()}else if(n===i.DOWN){e.trigger("results:next",{});t.preventDefault()}}else{if(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey){e.open();t.preventDefault()}}})};r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled"));if(this.isDisabled()){if(this.isOpen()){this.close()}this.trigger("disable",{})}else{this.trigger("enable",{})}};r.prototype._isChangeMutation=function(t,n){var i=false;var r=this;if(t&&t.target&&(t.target.nodeName!=="OPTION"&&t.target.nodeName!=="OPTGROUP")){return}if(!n){i=true}else if(n.addedNodes&&n.addedNodes.length>0){for(var s=0;s<n.addedNodes.length;s++){var o=n.addedNodes[s];if(o.selected){i=true}}}else if(n.removedNodes&&n.removedNodes.length>0){i=true}else if(e.isArray(n)){e.each(n,function(e,t){if(r._isChangeMutation(e,t)){i=true;return false}})}return i};r.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t);var i=this;if(n){this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}};r.prototype.trigger=function(e,t){var n=r.__super__.trigger;var i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(t===undefined){t={}}if(e in i){var s=i[e];var o={prevented:false,name:e,args:t};n.call(this,s,o);if(o.prevented){t.prevented=true;return}}n.call(this,e,t)};r.prototype.toggleDropdown=function(){if(this.isDisabled()){return}if(this.isOpen()){this.close()}else{this.open()}};r.prototype.open=function(){if(this.isOpen()){return}if(this.isDisabled()){return}this.trigger("query",{})};r.prototype.close=function(e){if(!this.isOpen()){return}this.trigger("close",{originalEvent:e})};r.prototype.isEnabled=function(){return!this.isDisabled()};r.prototype.isDisabled=function(){return this.options.get("disabled")};r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")};r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")};r.prototype.focus=function(e){if(this.hasFocus()){return}this.$container.addClass("select2-container--focus");this.trigger("focus",{})};r.prototype.enable=function(e){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("enable")` method has been deprecated and will'+' be removed in later Select2 versions. Use $element.prop("disabled")'+" instead.")}if(e==null||e.length===0){e=[true]}var t=!e[0];this.$element.prop("disabled",t)};r.prototype.data=function(){if(this.options.get("debug")&&arguments.length>0&&window.console&&console.warn){console.warn('Select2: Data can no longer be set using `select2("data")`. You '+"should consider setting the value instead using `$element.val()`.")}var e=[];this.dataAdapter.current(function(t){e=t});return e};r.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn){console.warn('Select2: The `select2("val")` method has been deprecated and will be'+" removed in later Select2 versions. Use $element.val() instead.")}if(t==null||t.length===0){return this.$element.val()}var n=t[0];if(e.isArray(n)){n=e.map(n,function(e){return e.toString()})}this.$element.val(n).trigger("input").trigger("change")};r.prototype.destroy=function(){this.$container.remove();if(this.$element[0].detachEvent){this.$element[0].detachEvent("onpropertychange",this._syncA)}if(this._observer!=null){this._observer.disconnect();this._observer=null}else if(this.$element[0].removeEventListener){this.$element[0].removeEventListener("DOMAttrModified",this._syncA,false);this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,false);this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,false)}this._syncA=null;this._syncS=null;this.$element.off(".select2");this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex"));this.$element.removeClass("select2-hidden-accessible");this.$element.attr("aria-hidden","false");n.RemoveData(this.$element[0]);this.$element.removeData("select2");this.dataAdapter.destroy();this.selection.destroy();this.dropdown.destroy();this.results.destroy();this.dataAdapter=null;this.selection=null;this.dropdown=null;this.results=null};r.prototype.render=function(){var t=e('<span class="select2 select2-container">'+'<span class="selection"></span>'+'<span class="dropdown-wrapper" aria-hidden="true"></span>'+"</span>");t.attr("dir",this.options.get("dir"));this.$container=t;this.$container.addClass("select2-container--"+this.options.get("theme"));n.StoreData(t[0],"element",this.$element);return t};return r});t.define("select2/compat/utils",["jquery"],function(e){function t(t,n,i){var r,s=[],o;r=e.trim(t.attr("class"));if(r){r=""+r;e(r.split(/\s+/)).each(function(){if(this.indexOf("select2-")===0){s.push(this)}})}r=e.trim(n.attr("class"));if(r){r=""+r;e(r.split(/\s+/)).each(function(){if(this.indexOf("select2-")!==0){o=i(this);if(o!=null){s.push(o)}}})}t.attr("class",s.join(" "))}return{syncCssClasses:t}});t.define("select2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}i.prototype.render=function(i){var r=i.call(this);var s=this.options.get("containerCssClass")||"";if(e.isFunction(s)){s=s(this.$element)}var o=this.options.get("adaptContainerCssClass");o=o||n;if(s.indexOf(":all:")!==-1){s=s.replace(":all:","");var a=o;o=function(e){var t=a(e);if(t!=null){return t+" "+e}return e}}var l=this.options.get("containerCss")||{};if(e.isFunction(l)){l=l(this.$element)}t.syncCssClasses(r,this.$element,o);r.css(l);r.addClass(s);return r};return i});t.define("select2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}i.prototype.render=function(i){var r=i.call(this);var s=this.options.get("dropdownCssClass")||"";if(e.isFunction(s)){s=s(this.$element)}var o=this.options.get("adaptDropdownCssClass");o=o||n;if(s.indexOf(":all:")!==-1){s=s.replace(":all:","");var a=o;o=function(e){var t=a(e);if(t!=null){return t+" "+e}return e}}var l=this.options.get("dropdownCss")||{};if(e.isFunction(l)){l=l(this.$element)}t.syncCssClasses(r,this.$element,o);r.css(l);r.addClass(s);return r};return i});t.define("select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){if(n.get("debug")&&window.console&&console.warn){console.warn("Select2: The `initSelection` option has been deprecated in favor"+" of a custom data adapter that overrides the `current` method. "+"This method is now called multiple times instead of a single "+"time when the instance is initialized. Support will be removed "+"for the `initSelection` option in future versions of Select2")}this.initSelection=n.get("initSelection");this._isInitialized=false;e.call(this,t,n)}t.prototype.current=function(t,n){var i=this;if(this._isInitialized){t.call(this,n);return}this.initSelection.call(null,this.$element,function(t){i._isInitialized=true;if(!e.isArray(t)){t=[t]}n(t)})};return t});t.define("select2/compat/inputData",["jquery","../utils"],function(e,t){function n(e,t,n){this._currentData=[];this._valueSeparator=n.get("valueSeparator")||",";if(t.prop("type")==="hidden"){if(n.get("debug")&&console&&console.warn){console.warn("Select2: Using a hidden input with Select2 is no longer "+"supported and may stop working in the future. It is recommended "+"to use a `<select>` element instead.")}}e.call(this,t,n)}n.prototype.current=function(t,n){function i(t,n){var r=[];if(t.selected||e.inArray(t.id,n)!==-1){t.selected=true;r.push(t)}else{t.selected=false}if(t.children){r.push.apply(r,i(t.children,n))}return r}var r=[];for(var s=0;s<this._currentData.length;s++){var o=this._currentData[s];r.push.apply(r,i(o,this.$element.val().split(this._valueSeparator)))}n(r)};n.prototype.select=function(t,n){if(!this.options.get("multiple")){this.current(function(t){e.map(t,function(e){e.selected=false})});this.$element.val(n.id);this.$element.trigger("input").trigger("change")}else{var i=this.$element.val();i+=this._valueSeparator+n.id;this.$element.val(i);this.$element.trigger("input").trigger("change")}};n.prototype.unselect=function(e,t){var n=this;t.selected=false;this.current(function(e){var i=[];for(var r=0;r<e.length;r++){var s=e[r];if(t.id==s.id){continue}i.push(s.id)}n.$element.val(i.join(n._valueSeparator));n.$element.trigger("input").trigger("change")})};n.prototype.query=function(e,t,n){var i=[];for(var r=0;r<this._currentData.length;r++){var s=this._currentData[r];var o=this.matches(t,s);if(o!==null){i.push(o)}}n({results:i})};n.prototype.addOptions=function(n,i){var r=e.map(i,function(e){return t.GetData(e[0],"data")});this._currentData.push.apply(this._currentData,r)};return n});t.define("select2/compat/matcher",["jquery"],function(e){function t(t){function n(n,i){var r=e.extend(true,{},i);if(n.term==null||e.trim(n.term)===""){return r}if(i.children){for(var s=i.children.length-1;s>=0;s--){var o=i.children[s];var a=t(n.term,o.text,o);if(!a){r.children.splice(s,1)}}if(r.children.length>0){return r}}if(t(n.term,i.text,i)){return r}return null}return n}return t});t.define("select2/compat/query",[],function(){function e(e,t,n){if(n.get("debug")&&window.console&&console.warn){console.warn("Select2: The `query` option has been deprecated in favor of a "+"custom data adapter that overrides the `query` method. Support "+"will be removed for the `query` option in future versions of "+"Select2.")}e.call(this,t,n)}e.prototype.query=function(e,t,n){t.callback=n;var i=this.options.get("query");i.call(null,t)};return e});t.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}e.prototype.position=function(e,t,n){var i=n.find(".dropdown-wrapper");i.append(t);t.addClass("select2-dropdown--below");n.addClass("select2-container--below")};return e});t.define("select2/dropdown/stopPropagation",[],function(){function e(){}e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(i.join(" "),function(e){e.stopPropagation()})};return e});t.define("select2/selection/stopPropagation",[],function(){function e(){}e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(i.join(" "),function(e){e.stopPropagation()})};return e});(function(n){if(typeof t.define==="function"&&t.define.amd){t.define("jquery-mousewheel",["jquery"],n)}else if(typeof exports==="object"){module.exports=n}else{n(e)}})(function(e){var t=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],n="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice,r,s;if(e.event.fixHooks){for(var o=t.length;o;){e.event.fixHooks[t[--o]]=e.event.mouseHooks}}var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener){for(var t=n.length;t;){this.addEventListener(n[--t],l,false)}}else{this.onmousewheel=l}e.data(this,"mousewheel-line-height",a.getLineHeight(this));e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener){for(var t=n.length;t;){this.removeEventListener(n[--t],l,false)}}else{this.onmousewheel=null}e.removeData(this,"mousewheel-line-height");e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();if(!i.length){i=e("body")}return parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:true,normalizeOffset:true}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}});function l(t){var n=t||window.event,o=i.call(arguments,1),l=0,d=0,p=0,h=0,f=0,g=0;t=e.event.fix(n);t.type="mousewheel";if("detail"in n){p=n.detail*-1}if("wheelDelta"in n){p=n.wheelDelta}if("wheelDeltaY"in n){p=n.wheelDeltaY}if("wheelDeltaX"in n){d=n.wheelDeltaX*-1}if("axis"in n&&n.axis===n.HORIZONTAL_AXIS){d=p*-1;p=0}l=p===0?d:p;if("deltaY"in n){p=n.deltaY*-1;l=p}if("deltaX"in n){d=n.deltaX;if(p===0){l=d*-1}}if(p===0&&d===0){return}if(n.deltaMode===1){var v=e.data(this,"mousewheel-line-height");l*=v;p*=v;d*=v}else if(n.deltaMode===2){var m=e.data(this,"mousewheel-page-height");l*=m;p*=m;d*=m}h=Math.max(Math.abs(p),Math.abs(d));if(!s||h<s){s=h;if(u(n,h)){s/=40}}if(u(n,h)){l/=40;d/=40;p/=40}l=Math[l>=1?"floor":"ceil"](l/s);d=Math[d>=1?"floor":"ceil"](d/s);p=Math[p>=1?"floor":"ceil"](p/s);if(a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left;g=t.clientY-y.top}t.deltaX=d;t.deltaY=p;t.deltaFactor=s;t.offsetX=f;t.offsetY=g;t.deltaMode=0;o.unshift(t,l,d,p);if(r){clearTimeout(r)}r=setTimeout(c,200);return(e.event.dispatch||e.event.handle).apply(this,o)}function c(){s=null}function u(e,t){return a.settings.adjustOldDeltas&&e.type==="mousewheel"&&t%120===0}});t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(e,t,n,i,r){if(e.fn.select2==null){var s=["open","close","destroy"];e.fn.select2=function(t){t=t||{};if(typeof t==="object"){this.each(function(){var i=e.extend(true,{},t);var r=new n(e(this),i)});return this}else if(typeof t==="string"){var i;var o=Array.prototype.slice.call(arguments,1);this.each(function(){var e=r.GetData(this,"select2");if(e==null&&window.console&&console.error){console.error("The select2('"+t+"') method was called on an "+"element that is not using Select2.")}i=e[t].apply(e,o)});if(e.inArray(t,s)>-1){return this}return i}else{throw new Error("Invalid arguments for Select2: "+t)}}}if(e.fn.select2.defaults==null){e.fn.select2.defaults=i}return n});return{define:t.define,require:t.require}}();var n=t.require("jquery.select2");e.fn.select2.amd=t;return n});

/*!
 * PURL.js v2.3.1 (https://github.com/allmarkedup/purl)
 * Copyright 2017 Mark Perkins
 * Licensed under MIT
 */
(function(t){if(typeof define==="function"&&define.amd){define(t)}else{window.purl=t()}})(function(){var t={a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href",embed:"src",object:"data"},e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","fragment"],r={anchor:"fragment"},n={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},a=/^[0-9]+$/;function i(t,r){var a=decodeURI(t),i=n[r||false?"strict":"loose"].exec(a),f={attr:{},param:{},seg:{}},s=14;while(s--){f.attr[e[s]]=i[s]||""}f.param.query=d(f.attr.query);f.param.fragment=d(f.attr.fragment);f.seg.path=f.attr.path.replace(/^\/+|\/+$/g,"").split("/");f.seg.fragment=f.attr.fragment.replace(/^\/+|\/+$/g,"").split("/");f.attr.base=f.attr.host?(f.attr.protocol?f.attr.protocol+"://"+f.attr.host:f.attr.host)+(f.attr.port?":"+f.attr.port:""):"";return f}function f(e){var r=e.tagName;if(typeof r!=="undefined"){return t[r.toLowerCase()]}return r}function s(t,e){if(t[e].length===0){return t[e]={}}var r={};for(var n in t[e]){r[n]=t[e][n]}t[e]=r;return r}function o(t,e,r,n){var i=t.shift();if(!i){if(p(e[r])){e[r].push(n)}else{if("object"==typeof e[r]){e[r]=n}else{if("undefined"==typeof e[r]){e[r]=n}else{e[r]=[e[r],n]}}}}else{var f=e[r]=e[r]||[];if("]"==i){if(p(f)){if(""!==n){f.push(n)}}else{if("object"==typeof f){f[g(f).length]=n}else{f=e[r]=[e[r],n]}}}else{if(~i.indexOf("]")){i=i.substr(0,i.length-1);if(!a.test(i)&&p(f)){f=s(e,r)}o(t,f,i,n)}else{if(!a.test(i)&&p(f)){f=s(e,r)}o(t,f,i,n)}}}}function u(t,e,r){if(~e.indexOf("]")){var n=e.split("[");o(n,t,"base",r)}else{if(!a.test(e)&&p(t.base)){var i={};for(var f in t.base){i[f]=t.base[f]}t.base=i}if(e!==""){l(t.base,e,r)}}return t}function d(t){return h(String(t).split(/&|;/),function(t,e){try{e=decodeURIComponent(e)}catch(t){}var r=e.indexOf("="),n=c(e),a=e.substr(0,n||r),i=e.substr(n||r,e.length);i=i.substr(i.indexOf("=")+1,i.length);if(a===""){a=e;i=""}return u(t,a,i)},{base:{}}).base}function l(t,e,r){var n=t[e];if(typeof n==="undefined"){t[e]=r}else{if(p(n)){n.push(r)}else{t[e]=[n,r]}}}function c(t){var e=t.length,r,n;for(var a=0;a<e;++a){n=t[a];if("]"==n){r=false}if("["==n){r=true}if("="==n&&!r){return a}}}function h(t,e){var r=0,n=t.length>>0,a=arguments[2];while(r<n){if(r in t){a=e.call(undefined,a,t[r],r,t)}++r}return a}function p(t){return Object.prototype.toString.call(t)==="[object Array]"}function g(t){var e=[];for(var r in t){if(t.hasOwnProperty(r)){e.push(r)}}return e}function m(t,e){if(arguments.length===1&&t===true){e=true;t=undefined}e=e||false;t=t||window.location.toString();return{data:i(t,e),attr:function(t){t=r[t]||t;return typeof t!=="undefined"?this.data.attr[t]:this.data.attr},param:function(t){return typeof t!=="undefined"?this.data.param.query[t]:this.data.param.query},fparam:function(t){return typeof t!=="undefined"?this.data.param.fragment[t]:this.data.param.fragment},segment:function(t){if(typeof t==="undefined"){return this.data.seg.path}else{t=t<0?this.data.seg.path.length+t:t-1;return this.data.seg.path[t]}},fsegment:function(t){if(typeof t==="undefined"){return this.data.seg.fragment}else{t=t<0?this.data.seg.fragment.length+t:t-1;return this.data.seg.fragment[t]}}}}m.jQuery=function(t){if(t!=null){t.fn.url=function(e){var r="";if(this.length){r=t(this).attr(f(this[0]))||""}return m(r,e)};t.url=m}};m.jQuery(window.jQuery);return m});

/*!
 * URI.js v1.19.11 (https://github.com/medialize/URI.js)
 * Copyright 2022 Rodney Rehm
 * Licensed under MIT
 */
(function(e,t){"object"===typeof module&&module.exports?module.exports=t():"function"===typeof define&&define.amd?define(t):e.IPv6=t(e)})(this,function(e){var t=e&&e.IPv6;return{best:function(e){e=e.toLowerCase().split(":");var t=e.length,r=8;""===e[0]&&""===e[1]&&""===e[2]?(e.shift(),e.shift()):""===e[0]&&""===e[1]?e.shift():""===e[t-1]&&""===e[t-2]&&e.pop();t=e.length;-1!==e[t-1].indexOf(".")&&(r=7);var n;for(n=0;n<t&&""!==e[n];n++);if(n<r)for(e.splice(n,1,"0000");e.length<r;)e.splice(n,0,"0000");for(n=0;n<r;n++){t=e[n].split("");for(var o=0;3>o;o++)if("0"===t[0]&&1<t.length)t.splice(0,1);else break;e[n]=t.join("")}t=-1;var a=o=0,i=-1,s=!1;for(n=0;n<r;n++)s?"0"===e[n]?a+=1:(s=!1,a>o&&(t=i,o=a)):"0"===e[n]&&(s=!0,i=n,a=1);a>o&&(t=i,o=a);1<o&&e.splice(t,o,"");t=e.length;r="";""===e[0]&&(r=":");for(n=0;n<t;n++){r+=e[n];if(n===t-1)break;r+=":"}""===e[t-1]&&(r+=":");return r},noConflict:function(){e.IPv6===this&&(e.IPv6=t);return this}}});(function(e){function t(e){throw new RangeError(f[e])}function r(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function n(e,t){var n=e.split("@"),o="";1<n.length&&(o=n[0]+"@",e=n[1]);e=e.replace(m,".");n=e.split(".");n=r(n,t).join(".");return o+n}function o(e){for(var t=[],r=0,n=e.length,o,a;r<n;)o=e.charCodeAt(r++),55296<=o&&56319>=o&&r<n?(a=e.charCodeAt(r++),56320==(a&64512)?t.push(((o&1023)<<10)+(a&1023)+65536):(t.push(o),r--)):t.push(o);return t}function a(e){return r(e,function(e){var t="";65535<e&&(e-=65536,t+=v(e>>>10&1023|55296),e=56320|e&1023);return t+=v(e)}).join("")}function i(e,t,r){var n=0;e=r?g(e/700):e>>1;for(e+=g(e/t);455<e;n+=36)e=g(e/35);return g(n+36*e/(e+38))}function s(e){var r=[],n=e.length,o=0,s=128,u=72,c,p;var h=e.lastIndexOf("-");0>h&&(h=0);for(c=0;c<h;++c)128<=e.charCodeAt(c)&&t("not-basic"),r.push(e.charCodeAt(c));for(h=0<h?h+1:0;h<n;){c=o;var l=1;for(p=36;;p+=36){h>=n&&t("invalid-input");var d=e.charCodeAt(h++);d=10>d-48?d-22:26>d-65?d-65:26>d-97?d-97:36;(36<=d||d>g((2147483647-o)/l))&&t("overflow");o+=d*l;var m=p<=u?1:p>=u+26?26:p-u;if(d<m)break;d=36-m;l>g(2147483647/d)&&t("overflow");l*=d}l=r.length+1;u=i(o-c,l,0==c);g(o/l)>2147483647-s&&t("overflow");s+=g(o/l);o%=l;r.splice(o++,0,s)}return a(r)}function u(e){var r,n,a,s=[];e=o(e);var u=e.length;var c=128;var p=0;var h=72;for(a=0;a<u;++a){var l=e[a];128>l&&s.push(v(l))}for((r=n=s.length)&&s.push("-");r<u;){var d=2147483647;for(a=0;a<u;++a)l=e[a],l>=c&&l<d&&(d=l);var m=r+1;d-c>g((2147483647-p)/m)&&t("overflow");p+=(d-c)*m;c=d;for(a=0;a<u;++a)if(l=e[a],l<c&&2147483647<++p&&t("overflow"),l==c){var f=p;for(d=36;;d+=36){l=d<=h?1:d>=h+26?26:d-h;if(f<l)break;var y=f-l;f=36-l;var b=s;l+=y%f;b.push.call(b,v(l+22+75*(26>l)-0));f=g(y/f)}s.push(v(f+22+75*(26>f)-0));h=i(p,m,r==n);p=0;++r}++p;++c}return s.join("")}var c="object"==typeof exports&&exports&&!exports.nodeType&&exports,p="object"==typeof module&&module&&!module.nodeType&&module,h="object"==typeof global&&global;if(h.global===h||h.window===h||h.self===h)e=h;var l=/^xn--/,d=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,v=String.fromCharCode,y;var b={version:"1.3.2",ucs2:{decode:o,encode:a},decode:s,encode:u,toASCII:function(e){return n(e,function(e){return d.test(e)?"xn--"+u(e):e})},toUnicode:function(e){return n(e,function(e){return l.test(e)?s(e.slice(4).toLowerCase()):e})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return b});else if(c&&p)if(module.exports==c)p.exports=b;else for(y in b)b.hasOwnProperty(y)&&(c[y]=b[y]);else e.punycode=b})(this);(function(e,t){"object"===typeof module&&module.exports?module.exports=t():"function"===typeof define&&define.amd?define(t):e.SecondLevelDomains=t(e)})(this,function(e){var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(0>=n||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return o?0<=o.indexOf(" "+e.slice(n+1,t)+" "):!1},is:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1||0<=e.lastIndexOf(".",t-1))return!1;var n=r.list[e.slice(t+1)];return n?0<=n.indexOf(" "+e.slice(0,t)+" "):!1},get:function(e){var t=e.lastIndexOf(".");if(0>=t||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(0>=n||n>=t-1)return null;var o=r.list[e.slice(t+1)];return!o||0>o.indexOf(" "+e.slice(n+1,t)+" ")?null:e.slice(n+1)},noConflict:function(){e.SecondLevelDomains===this&&(e.SecondLevelDomains=t);return this}};return r});(function(e,t){"object"===typeof module&&module.exports?module.exports=t(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(this,function(e,t,r,n){function o(e,t){var r=1<=arguments.length,n=2<=arguments.length;if(!(this instanceof o))return r?n?new o(e,t):new o(e):new o;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!==typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");this.href(e);return void 0!==t?this.absoluteTo(t):this}function a(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function i(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function s(e){return"Array"===i(e)}function u(e,t){var r={},n;if("RegExp"===i(t))r=null;else if(s(t)){var o=0;for(n=t.length;o<n;o++)r[t[o]]=!0}else r[t]=!0;o=0;for(n=e.length;o<n;o++)if(r&&void 0!==r[e[o]]||!r&&t.test(e[o]))e.splice(o,1),n--,o--;return e}function c(e,t){var r;if(s(t)){var n=0;for(r=t.length;n<r;n++)if(!c(e,t[n]))return!1;return!0}var o=i(t);n=0;for(r=e.length;n<r;n++)if("RegExp"===o){if("string"===typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function p(e,t){if(!s(e)||!s(t)||e.length!==t.length)return!1;e.sort();t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function h(e){return e.replace(/^\/+|\/+$/g,"")}function l(e){return escape(e)}function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,l).replace(/\*/g,"%2A")}function m(e){return function(t,r){if(void 0===t)return this._parts[e]||"";this._parts[e]=t||null;this.build(!r);return this}}function f(e,t){return function(r,n){if(void 0===r)return this._parts[e]||"";null!==r&&(r+="",r.charAt(0)===t&&(r=r.substring(1)));this._parts[e]=r;this.build(!n);return this}}var g=n&&n.URI;o.version="1.19.11";var v=o.prototype,y=Object.prototype.hasOwnProperty;o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}};o.preventInvalidHostname=!1;o.duplicateQueryParameters=!1;o.escapeQuerySpace=!0;o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;o.idn_expression=/[^a-z0-9\._-]/i;o.punycode_expression=/(xn--)/i;o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/gi;o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g};o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/;o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g;o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};o.hostProtocols=["http","https"];o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/;o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};o.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return o.domAttributes[t]}};o.encode=d;o.decode=decodeURIComponent;o.iso8859=function(){o.encode=escape;o.decode=unescape};o.unicode=function(){o.encode=d;o.decode=decodeURIComponent};o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};o.encodeQuery=function(e,t){var r=o.encode(e+"");void 0===t&&(t=o.escapeQuerySpace);return t?r.replace(/%20/g,"+"):r};o.decodeQuery=function(e,t){e+="";void 0===t&&(t=o.escapeQuerySpace);try{return o.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var b={encode:"encode",decode:"decode"},_,w=function(e,t){return function(r){try{return o[t](r+"").replace(o.characters[e][t].expression,function(r){return o.characters[e][t].map[r]})}catch(e){return r}}};for(_ in b)o[_+"PathSegment"]=w("pathname",b[_]),o[_+"UrnPathSegment"]=w("urnpath",b[_]);b=function(e,t,r){return function(n){var a=r?function(e){return o[t](o[r](e))}:o[t];n=(n+"").split(e);for(var i=0,s=n.length;i<s;i++)n[i]=a(n[i]);return n.join(e)}};o.decodePath=b("/","decodePathSegment");o.decodeUrnPath=b(":","decodeUrnPathSegment");o.recodePath=b("/","encodePathSegment","decode");o.recodeUrnPath=b(":","encodeUrnPathSegment","decode");o.encodeReserved=w("reserved","encode");o.parse=function(e,t){t||(t={preventInvalidHostname:o.preventInvalidHostname});e=e.replace(o.leading_whitespace_expression,"");e=e.replace(o.ascii_tab_whitespace,"");var r=e.indexOf("#");-1<r&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r));r=e.indexOf("?");-1<r&&(t.query=e.substring(r+1)||null,e=e.substring(0,r));e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://");e=e.replace(/^[/\\]{2,}/i,"//");"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=o.parseAuthority(e,t)):(r=e.indexOf(":"),-1<r&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(o.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=o.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)));t.path=e;return t};o.parseHost=function(e,t){e||(e="");e=e.replace(/\\/g,"/");var r=e.indexOf("/");-1===r&&(r=e.length);if("["===e.charAt(0)){var n=e.indexOf("]");t.hostname=e.substring(1,n)||null;t.port=e.substring(n+2,r)||null;"/"===t.port&&(t.port=null)}else{var a=e.indexOf(":");n=e.indexOf("/");a=e.indexOf(":",a+1);-1!==a&&(-1===n||a<n)?(t.hostname=e.substring(0,r)||null,t.port=null):(n=e.substring(0,r).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}t.hostname&&"/"!==e.substring(r).charAt(0)&&(r++,e="/"+e);t.preventInvalidHostname&&o.ensureValidHostname(t.hostname,t.protocol);t.port&&o.ensureValidPort(t.port);return e.substring(r)||"/"};o.parseAuthority=function(e,t){e=o.parseUserinfo(e,t);return o.parseHost(e,t)};o.parseUserinfo=function(e,t){var r=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var n=e.indexOf("/"),a=e.lastIndexOf("@",-1<n?n:e.length-1);-1<a&&(-1===n||a<n)?(n=e.substring(0,a).split(":"),t.username=n[0]?o.decode(n[0]):null,n.shift(),t.password=n[0]?o.decode(n.join(":")):null,e=r.substring(a+1)):(t.username=null,t.password=null);return e};o.parseQuery=function(e,t){if(!e)return{};e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!e)return{};for(var r={},n=e.split("&"),a=n.length,i,s,u=0;u<a;u++)if(i=n[u].split("="),s=o.decodeQuery(i.shift(),t),i=i.length?o.decodeQuery(i.join("="),t):null,"__proto__"!==s)if(y.call(r,s)){if("string"===typeof r[s]||null===r[s])r[s]=[r[s]];r[s].push(i)}else r[s]=i;return r};o.build=function(e){var t="",r=!1;e.protocol&&(t+=e.protocol+":");e.urn||!t&&!e.hostname||(t+="//",r=!0);t+=o.buildAuthority(e)||"";"string"===typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path);"string"===typeof e.query&&e.query&&(t+="?"+e.query);"string"===typeof e.fragment&&e.fragment&&(t+="#"+e.fragment);return t};o.buildHost=function(e){var t="";if(e.hostname)t=o.ip6_expression.test(e.hostname)?t+("["+e.hostname+"]"):t+e.hostname;else return"";e.port&&(t+=":"+e.port);return t};o.buildAuthority=function(e){return o.buildUserinfo(e)+o.buildHost(e)};o.buildUserinfo=function(e){var t="";e.username&&(t+=o.encode(e.username));e.password&&(t+=":"+o.encode(e.password));t&&(t+="@");return t};o.buildQuery=function(e,t,r){var n="",a,i;for(a in e)if("__proto__"!==a&&y.call(e,a))if(s(e[a])){var u={};var c=0;for(i=e[a].length;c<i;c++)void 0!==e[a][c]&&void 0===u[e[a][c]+""]&&(n+="&"+o.buildQueryParameter(a,e[a][c],r),!0!==t&&(u[e[a][c]+""]=!0))}else void 0!==e[a]&&(n+="&"+o.buildQueryParameter(a,e[a],r));return n.substring(1)};o.buildQueryParameter=function(e,t,r){return o.encodeQuery(e,r)+(null!==t?"="+o.encodeQuery(t,r):"")};o.addQuery=function(e,t,r){if("object"===typeof t)for(var n in t)y.call(t,n)&&o.addQuery(e,n,t[n]);else if("string"===typeof t)void 0===e[t]?e[t]=r:("string"===typeof e[t]&&(e[t]=[e[t]]),s(r)||(r=[r]),e[t]=(e[t]||[]).concat(r));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")};o.setQuery=function(e,t,r){if("object"===typeof t)for(var n in t)y.call(t,n)&&o.setQuery(e,n,t[n]);else if("string"===typeof t)e[t]=void 0===r?null:r;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")};o.removeQuery=function(e,t,r){var n;if(s(t))for(r=0,n=t.length;r<n;r++)e[t[r]]=void 0;else if("RegExp"===i(t))for(n in e)t.test(n)&&(e[n]=void 0);else if("object"===typeof t)for(n in t)y.call(t,n)&&o.removeQuery(e,n,t[n]);else if("string"===typeof t)void 0!==r?"RegExp"===i(r)?!s(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=u(e[t],r):e[t]!==String(r)||s(r)&&1!==r.length?s(e[t])&&(e[t]=u(e[t],r)):e[t]=void 0:e[t]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")};o.hasQuery=function(e,t,r,n){switch(i(t)){case"String":break;case"RegExp":for(var a in e)if(y.call(e,a)&&t.test(a)&&(void 0===r||o.hasQuery(e,a,r)))return!0;return!1;case"Object":for(var u in t)if(y.call(t,u)&&!o.hasQuery(e,u,t[u]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(i(r)){case"Undefined":return t in e;case"Boolean":return e=!(s(e[t])?!e[t].length:!e[t]),r===e;case"Function":return!!r(e[t],t,e);case"Array":return s(e[t])?(n?c:p)(e[t],r):!1;case"RegExp":return s(e[t])?n?c(e[t],r):!1:!(!e[t]||!e[t].match(r));case"Number":r=String(r);case"String":return s(e[t])?n?c(e[t],r):!1:e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}};o.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var a=new o(arguments[n]);e.push(a);a=a.segment();for(var i=0;i<a.length;i++)"string"===typeof a[i]&&t.push(a[i]),a[i]&&r++}if(!t.length||!r)return new o("");t=new o("").segment(t);""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||t.path("/"+t.path());return t.normalize()};o.commonPath=function(e,t){var r=Math.min(e.length,t.length),n;for(n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}if(1>n)return e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"";if("/"!==e.charAt(n)||"/"!==t.charAt(n))n=e.substring(0,n).lastIndexOf("/");return e.substring(0,n+1)};o.withinString=function(e,t,r){r||(r={});var n=r.start||o.findUri.start,a=r.end||o.findUri.end,i=r.trim||o.findUri.trim,s=r.parens||o.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(e);if(!c)break;var p=c.index;if(r.ignoreHtml){var h=e.slice(Math.max(p-3,0),p);if(h&&u.test(h))continue}var l=p+e.slice(p).search(a);h=e.slice(p,l);for(l=-1;;){var d=s.exec(h);if(!d)break;l=Math.max(l,d.index+d[0].length)}h=-1<l?h.slice(0,l)+h.slice(l).replace(i,""):h.replace(i,"");h.length<=c[0].length||r.ignore&&r.ignore.test(h)||(l=p+h.length,c=t(h,p,l,e),void 0===c?n.lastIndex=l:(c=String(c),e=e.slice(0,p)+c+e.slice(l),n.lastIndex=p+c.length))}n.lastIndex=0;return e};o.ensureValidHostname=function(t,r){var n=!!t,a=!1;r&&(a=c(o.hostProtocols,r));if(a&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(o.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}};o.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&0<t&&65536>t))throw new TypeError('Port "'+e+'" is not a valid port')}};o.noConflict=function(e){if(e)return e={URI:this.noConflict()},n.URITemplate&&"function"===typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"===typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"===typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e;n.URI===this&&(n.URI=g);return this};v.build=function(e){if(!0===e)this._deferred_build=!0;else if(void 0===e||this._deferred_build)this._string=o.build(this._parts),this._deferred_build=!1;return this};v.clone=function(){return new o(this)};v.valueOf=v.toString=function(){return this.build(!1)._string};v.protocol=m("protocol");v.username=m("username");v.password=m("password");v.hostname=m("hostname");v.port=m("port");v.query=f("query","?");v.fragment=f("fragment","#");v.search=function(e,t){var r=this.query(e,t);return"string"===typeof r&&r.length?"?"+r:r};v.hash=function(e,t){var r=this.fragment(e,t);return"string"===typeof r&&r.length?"#"+r:r};v.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?o.decodeUrnPath:o.decodePath)(r):r}this._parts.path=this._parts.urn?e?o.recodeUrnPath(e):"":e?o.recodePath(e):"/";this.build(!t);return this};v.path=v.pathname;v.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="";this._parts=o._parts();var n=e instanceof o,a="object"===typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(a=o.getDomAttribute(e),e=e[a]||"",a=!1);!n&&a&&void 0!==e.pathname&&(e=e.toString());if("string"===typeof e||e instanceof String)this._parts=o.parse(String(e),this._parts);else if(n||a){n=n?e._parts:e;for(r in n)"query"!==r&&y.call(this._parts,r)&&(this._parts[r]=n[r]);n.query&&this.query(n.query,!1)}else throw new TypeError("invalid input");this.build(!t);return this};v.is=function(e){var t=!1,n=!1,a=!1,i=!1,s=!1,u=!1,c=!1,p=!this._parts.urn;this._parts.hostname&&(p=!1,n=o.ip4_expression.test(this._parts.hostname),a=o.ip6_expression.test(this._parts.hostname),t=n||a,s=(i=!t)&&r&&r.has(this._parts.hostname),u=i&&o.idn_expression.test(this._parts.hostname),c=i&&o.punycode_expression.test(this._parts.hostname));switch(e.toLowerCase()){case"relative":return p;case"absolute":return!p;case"domain":case"name":return i;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return a;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var x=v.protocol,k=v.port,z=v.hostname;v.protocol=function(e,t){if(e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(o.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)};v.scheme=v.protocol;v.port=function(e,t){if(this._parts.urn)return void 0===e?"":this;void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),o.ensureValidPort(e)));return k.call(this,e,t)};v.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname;this._parts.preventInvalidHostname&&o.ensureValidHostname(e,this._parts.protocol)}return z.call(this,e,t)};v.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}r=o(e);this.protocol(r.protocol()).authority(r.authority()).build(!t);return this};v.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');this.build(!t);return this};v.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');this.build(!t);return this};v.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=o.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}"@"!==e[e.length-1]&&(e+="@");o.parseUserinfo(e,this._parts);this.build(!t);return this};v.resource=function(e,t){if(void 0===e)return this.path()+this.search()+this.hash();var r=o.parse(e);this._parts.path=r.path;this._parts.query=r.query;this._parts.fragment=r.fragment;this.build(!t);return this};v.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}r=this._parts.hostname.length-this.domain().length;r=this._parts.hostname.substring(0,r);r=new RegExp("^"+a(r));e&&"."!==e.charAt(e.length-1)&&(e+=".");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");e&&o.ensureValidHostname(e,this._parts.protocol);this._parts.hostname=this._parts.hostname.replace(r,e);this.build(!t);return this};v.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;"boolean"===typeof e&&(t=e,e=void 0);if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&2>r.length)return this._parts.hostname;r=this._parts.hostname.length-this.tld(t).length-1;r=this._parts.hostname.lastIndexOf(".",r-1)+1;return this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");o.ensureValidHostname(e,this._parts.protocol);!this._parts.hostname||this.is("IP")?this._parts.hostname=e:(r=new RegExp(a(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(r,e));this.build(!t);return this};v.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;"boolean"===typeof e&&(t=e,e=void 0);if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf(".");n=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[n.toLowerCase()]?r.get(this._parts.hostname)||n:n}if(e)if(e.match(/[^a-zA-Z0-9-]/))if(r&&r.is(e))n=new RegExp(a(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e);else throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");n=new RegExp(a(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(n,e)}else throw new TypeError("cannot set TLD empty");this.build(!t);return this};v.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1;r=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?o.decodePath(r):r}r=this._parts.path.length-this.filename().length;r=this._parts.path.substring(0,r);r=new RegExp("^"+a(r));this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e));e&&"/"!==e.charAt(e.length-1)&&(e+="/");e=o.recodePath(e);this._parts.path=this._parts.path.replace(r,e);this.build(!t);return this};v.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!==typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/");r=this._parts.path.substring(r+1);return e?o.decodePathSegment(r):r}r=!1;"/"===e.charAt(0)&&(e=e.substring(1));e.match(/\.?\//)&&(r=!0);var n=new RegExp(a(this.filename())+"$");e=o.recodePath(e);this._parts.path=this._parts.path.replace(n,e);r?this.normalizePath(t):this.build(!t);return this};v.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this.filename(),n=r.lastIndexOf(".");if(-1===n)return"";r=r.substring(n+1);r=/^[a-z0-9%]+$/i.test(r)?r:"";return e?o.decodePathSegment(r):r}"."===e.charAt(0)&&(e=e.substring(1));if(r=this.suffix())n=e?new RegExp(a(r)+"$"):new RegExp(a("."+r)+"$");else{if(!e)return this;this._parts.path+="."+o.recodePath(e)}n&&(e=o.recodePath(e),this._parts.path=this._parts.path.replace(n,e));this.build(!t);return this};v.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),a="/"===o.substring(0,1);o=o.split(n);void 0!==e&&"number"!==typeof e&&(r=t,t=e,e=void 0);if(void 0!==e&&"number"!==typeof e)throw Error('Bad segment "'+e+'", must be 0-based integer');a&&o.shift();0>e&&(e=Math.max(o.length+e,0));if(void 0===t)return void 0===e?o:o[e];if(null===e||void 0===o[e])if(s(t)){o=[];e=0;for(var i=t.length;e<i;e++)if(t[e].length||o.length&&o[o.length-1].length)o.length&&!o[o.length-1].length&&o.pop(),o.push(h(t[e]))}else{if(t||"string"===typeof t)t=h(t),""===o[o.length-1]?o[o.length-1]=t:o.push(t)}else t?o[e]=h(t):o.splice(e,1);a&&o.unshift("");return this.path(o.join(n),r)};v.segmentCoded=function(e,t,r){var n;"number"!==typeof e&&(r=t,t=e,e=void 0);if(void 0===t){e=this.segment(e,t,r);if(s(e)){var a=0;for(n=e.length;a<n;a++)e[a]=o.decode(e[a])}else e=void 0!==e?o.decode(e):void 0;return e}if(s(t))for(a=0,n=t.length;a<n;a++)t[a]=o.encode(t[a]);else t="string"===typeof t||t instanceof String?o.encode(t):t;return this.segment(e,t,r)};var A=v.query;v.query=function(e,t){if(!0===e)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof e){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);this._parts.query=o.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!t);return this}return void 0!==e&&"string"!==typeof e?(this._parts.query=o.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):A.call(this,e,t)};v.setQuery=function(e,t,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof e||e instanceof String)n[e]=void 0!==t?t:null;else if("object"===typeof e)for(var a in e)y.call(e,a)&&(n[a]=e[a]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof e&&(r=t);this.build(!r);return this};v.addQuery=function(e,t,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);o.addQuery(n,e,void 0===t?null:t);this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof e&&(r=t);this.build(!r);return this};v.removeQuery=function(e,t,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);o.removeQuery(n,e,t);this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof e&&(r=t);this.build(!r);return this};v.hasQuery=function(e,t,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(n,e,t,r)};v.setSearch=v.setQuery;v.addSearch=v.addQuery;v.removeSearch=v.removeQuery;v.hasSearch=v.hasQuery;v.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};v.normalizeProtocol=function(e){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e));return this};v.normalizeHostname=function(r){this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r));return this};v.normalizePort=function(e){"string"===typeof this._parts.protocol&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e));return this};v.normalizePath=function(e){var t=this._parts.path;if(!t)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;t=o.recodePath(t);var r="";if("/"!==t.charAt(0)){var n=!0;t="/"+t}if("/.."===t.slice(-3)||"/."===t.slice(-2))t+="/";t=t.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");n&&(r=t.substring(1).match(/^(\.\.\/)+/)||"")&&(r=r[0]);for(;;){var a=t.search(/\/\.\.(\/|$)/);if(-1===a)break;else if(0===a){t=t.substring(3);continue}var i=t.substring(0,a).lastIndexOf("/");-1===i&&(i=a);t=t.substring(0,i)+t.substring(a+3)}n&&this.is("relative")&&(t=r+t.substring(1));this._parts.path=t;this.build(!e);return this};v.normalizePathname=v.normalizePath;v.normalizeQuery=function(e){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e));return this};v.normalizeFragment=function(e){this._parts.fragment||(this._parts.fragment=null,this.build(!e));return this};v.normalizeSearch=v.normalizeQuery;v.normalizeHash=v.normalizeFragment;v.iso8859=function(){var e=o.encode,t=o.decode;o.encode=escape;o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=e,o.decode=t}return this};v.unicode=function(){var e=o.encode,t=o.decode;o.encode=d;o.decode=unescape;try{this.normalize()}finally{o.encode=e,o.decode=t}return this};v.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";t._parts.protocol&&(r+=t._parts.protocol+"://");t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host());t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/");r+=t.path(!0);if(t._parts.query){for(var n="",a=0,i=t._parts.query.split("&"),s=i.length;a<s;a++){var u=(i[a]||"").split("=");n+="&"+o.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26");void 0!==u[1]&&(n+="="+o.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=o.decodeQuery(t.hash(),!0)};v.absoluteTo=function(e){var t=this.clone(),r=["protocol","username","password","hostname","port"],n,a;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");e instanceof o||(e=new o(e));if(t._parts.protocol)return t;t._parts.protocol=e._parts.protocol;if(this._parts.hostname)return t;for(n=0;a=r[n];n++)t._parts[a]=e._parts[a];t._parts.path?(".."===t._parts.path.substring(-2)&&(t._parts.path+="/"),"/"!==t.path().charAt(0)&&(r=(r=e.directory())?r:0===e.path().indexOf("/")?"/":"",t._parts.path=(r?r+"/":"")+t._parts.path,t.normalizePath())):(t._parts.path=e._parts.path,t._parts.query||(t._parts.query=e._parts.query));t.build();return t};v.relativeTo=function(e){var t=this.clone().normalize();if(t._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");e=new o(e).normalize();var r=t._parts;var n=e._parts;var a=t.path();e=e.path();if("/"!==a.charAt(0))throw Error("URI is already relative");if("/"!==e.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");r.protocol===n.protocol&&(r.protocol=null);if(r.username===n.username&&r.password===n.password&&null===r.protocol&&null===r.username&&null===r.password&&r.hostname===n.hostname&&r.port===n.port)r.hostname=null,r.port=null;else return t.build();if(a===e)return r.path="",t.build();a=o.commonPath(a,e);if(!a)return t.build();n=n.path.substring(a.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");r.path=n+r.path.substring(a.length)||"./";return t.build()};v.equals=function(e){var t=this.clone(),r=new o(e);e={};var n;t.normalize();r.normalize();if(t.toString()===r.toString())return!0;var a=t.query();var i=r.query();t.query("");r.query("");if(t.toString()!==r.toString()||a.length!==i.length)return!1;t=o.parseQuery(a,this._parts.escapeQuerySpace);i=o.parseQuery(i,this._parts.escapeQuerySpace);for(n in t)if(y.call(t,n)){if(!s(t[n])){if(t[n]!==i[n])return!1}else if(!p(t[n],i[n]))return!1;e[n]=!0}for(n in i)if(y.call(i,n)&&!e[n])return!1;return!0};v.preventInvalidHostname=function(e){this._parts.preventInvalidHostname=!!e;return this};v.duplicateQueryParameters=function(e){this._parts.duplicateQueryParameters=!!e;return this};v.escapeQuerySpace=function(e){this._parts.escapeQuerySpace=!!e;return this};return o});(function(e,t){"object"===typeof module&&module.exports?module.exports=t(require("./URI")):"function"===typeof define&&define.amd?define(["./URI"],t):e.URITemplate=t(e.URI,e)})(this,function(e,t){function r(e){if(r._cache[e])return r._cache[e];if(!(this instanceof r))return new r(e);this.expression=e;r._cache[e]=this;return this}function n(e){this.data=e;this.cache={}}var o=t&&t.URITemplate,a=Object.prototype.hasOwnProperty,i=r.prototype,s={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};r._cache={};r.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g;r.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/;r.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/;r.LITERAL_PATTERN=/[<>{}"`^| \\]/;r.expand=function(e,t,n){var o=s[e.operator],a=o.named?"Named":"Unnamed";e=e.variables;var i=[],u,c;for(c=0;u=e[c];c++){var p=t.get(u.name);if(0===p.type&&n&&n.strict)throw Error('Missing expansion value for variable "'+u.name+'"');if(p.val.length){if(1<p.type&&u.maxlength)throw Error('Invalid expression: Prefix modifier not applicable to variable "'+u.name+'"');i.push(r["expand"+a](p,o,u.explode,u.explode&&o.separator||",",u.maxlength,u.name))}else p.type&&i.push("")}return i.length?o.prefix+i.join(o.separator):""};r.expandNamed=function(t,r,n,o,a,i){var s="",u=r.encode;r=r.empty_name_separator;var c=!t[u].length,p=2===t.type?"":e[u](i),h;var l=0;for(h=t.val.length;l<h;l++){if(a){var d=e[u](t.val[l][1].substring(0,a));2===t.type&&(p=e[u](t.val[l][0].substring(0,a)))}else c?(d=e[u](t.val[l][1]),2===t.type?(p=e[u](t.val[l][0]),t[u].push([p,d])):t[u].push([void 0,d])):(d=t[u][l][1],2===t.type&&(p=t[u][l][0]));s&&(s+=o);n?s+=p+(r||d?"=":"")+d:(l||(s+=e[u](i)+(r||d?"=":"")),2===t.type&&(s+=p+","),s+=d)}return s};r.expandUnnamed=function(t,r,n,o,a){var i="",s=r.encode;r=r.empty_name_separator;var u=!t[s].length,c;var p=0;for(c=t.val.length;p<c;p++){if(a)var h=e[s](t.val[p][1].substring(0,a));else u?(h=e[s](t.val[p][1]),t[s].push([2===t.type?e[s](t.val[p][0]):void 0,h])):h=t[s][p][1];i&&(i+=o);if(2===t.type){var l=a?e[s](t.val[p][0].substring(0,a)):t[s][p][0];i+=l;i=n?i+(r||h?"=":""):i+","}i+=h}return i};r.noConflict=function(){t.URITemplate===r&&(t.URITemplate=o);return r};i.expand=function(e,t){var o="";this.parts&&this.parts.length||this.parse();e instanceof n||(e=new n(e));for(var a=0,i=this.parts.length;a<i;a++)o+="string"===typeof this.parts[a]?this.parts[a]:r.expand(this.parts[a],e,t);return o};i.parse=function(){var e=this.expression,t=r.EXPRESSION_PATTERN,n=r.VARIABLE_PATTERN,o=r.VARIABLE_NAME_PATTERN,a=r.LITERAL_PATTERN,i=[],u=0,c=function(e){if(e.match(a))throw Error('Invalid Literal "'+e+'"');return e};for(t.lastIndex=0;;){var p=t.exec(e);if(null===p){i.push(c(e.substring(u)));break}else i.push(c(e.substring(u,p.index))),u=p.index+p[0].length;if(!s[p[1]])throw Error('Unknown Operator "'+p[1]+'" in "'+p[0]+'"');if(!p[3])throw Error('Unclosed Expression "'+p[0]+'"');var h=p[2].split(",");for(var l=0,d=h.length;l<d;l++){var m=h[l].match(n);if(null===m)throw Error('Invalid Variable "'+h[l]+'" in "'+p[0]+'"');if(m[1].match(o))throw Error('Invalid Variable Name "'+m[1]+'" in "'+p[0]+'"');h[l]={name:m[1],explode:!!m[3],maxlength:m[4]&&parseInt(m[4],10)}}if(!h.length)throw Error('Expression Missing Variable(s) "'+p[0]+'"');i.push({expression:p[0],operator:p[1],variables:h})}i.length||i.push(c(e));this.parts=i;return this};n.prototype.get=function(e){var t=this.data,r={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[e])return this.cache[e];this.cache[e]=r;t="[object Function]"===String(Object.prototype.toString.call(t))?t(e):"[object Function]"===String(Object.prototype.toString.call(t[e]))?t[e](e):t[e];if(void 0!==t&&null!==t)if("[object Array]"===String(Object.prototype.toString.call(t))){var n=0;for(e=t.length;n<e;n++)void 0!==t[n]&&null!==t[n]&&r.val.push([void 0,String(t[n])]);r.val.length&&(r.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(t))){for(n in t)a.call(t,n)&&void 0!==t[n]&&null!==t[n]&&r.val.push([n,String(t[n])]);r.val.length&&(r.type=2)}else r.type=1,r.val.push([void 0,String(t)]);return r};e.expand=function(t,n){var o=new r(t).expand(n);return new e(o)};return r});

/*!
 * jquery.injectCSS.js 0.1
 * Copyright 2013, Robert Kajic (robert@kajic.com)
 * Licensed under MIT
 */
(function(jQuery){"use strict";function toCSS(jss,options){function jsonToCSS(e,r){if(e&&!result[e]){result[e]={}}for(var t in r){var a=r[t];if(a instanceof Array){var s=a;for(var n=0;n<s.length;n++){addProperty(e,t,s[n])}}else{switch(typeof a){case"number":case"string":addProperty(e,t,a);break;case"object":var i=t.charAt(t.length-1);if(e&&(i==="_"||i==="-")){var o=a;for(var l in o){var u=l.split(/\s*,\s*/);for(var f=0;f<u.length;f++){var c=o[l];if(c instanceof Array){var v=c;for(var y=0;y<v.length;y++){addProperty(e,t+u[f],v[y])}}else{addProperty(e,t+u[f],o[l])}}}}else{jsonToCSS(makeSelectorName(e,t),a)}break}}}}function makePropertyName(e){return e.replace(/_/g,"-")}function makeSelectorName(e,r){var t=[];var a=r.split(/\s*,\s*/);var s=e.split(/\s*,\s*/);for(var n=0;n<s.length;n++){var i=s[n];for(var o=0;o<a.length;o++){var l=a[o];if(l.charAt(0)==="&"){t.push(i+l.substr(1))}else{t.push(i?i+" "+l:l)}}}return t.join(", ")}function addProperty(e,r,t){if(typeof t==="number"&&!options.useRawValues){t=t+"px"}var a=r.split(/\s*,\s*/);for(var s=0;s<a.length;s++){var n=makePropertyName(a[s]);if(result[e][n]){result[e][n].push(t)}else{result[e][n]=[t]}}}var result={};if(typeof jss==="string"){try{eval("var jss = {"+jss+"}")}catch(e){return"/*\nUnable to parse JSS: "+e+"\n*/"}}jsonToCSS("",jss);var ret="";for(var a in result){var css=result[a];ret+=a+" {\n";for(var i in css){var values=css[i];for(var j=0;j<values.length;j++){ret+="\t"+i+": "+values[j]+";\n"}}ret+="}\n"}return ret}var defaults={truncateFirst:false,container:null,containerName:"injected-css",useRawValues:false};jQuery.injectCSS=function(e,r){r=jQuery.extend({},defaults,r);r.media=r.media||"all";var t=r.container&&jQuery(r.container)||jQuery("#"+r.containerName);if(!t.length){t=jQuery("<style data-persist></style>").appendTo("head").attr({media:r.media,type:"text/css"})}var a=t[0];var s=a.styleSheet!==undefined&&a.styleSheet.cssText!==undefined;var n="";if(!r.truncateFirst){n+=s?a.styleSheet.cssText:t.text()}n+=toCSS(e,r);if(s){a.styleSheet.cssText=n}else{t.text(n)}return t}})(jQuery);

/*!
 * printThis v1.15.1
 * Copyright 2015-2019 Jason Day
 * Licensed under MIT
 */
(function(e){function t(e,t){if(!t)return;e.append(t.jquery?t.clone():t)}function n(t,n,a){var r=n.clone(a.formValues);if(a.formValues){i(n,r,"select, textarea")}if(a.removeScripts){r.find("script").remove()}if(a.printContainer){r.appendTo(t)}else{r.each(function(){e(this).children().appendTo(t)})}}function i(t,n,i){var a=t.find(i);n.find(i).each(function(t,n){e(n).val(a.eq(t).val())})}var a;e.fn.printThis=function(i){a=e.extend({},e.fn.printThis.defaults,i);var r=this instanceof jQuery?this:e(this);var o="printThis-"+(new Date).getTime();if(window.location.hostname!==document.domain&&navigator.userAgent.match(/msie/i)){var s='javascript:document.write("<head><script>document.domain=\\"'+document.domain+'\\";</s'+'cript></head><body></body>")';var f=document.createElement("iframe");f.name="printIframe";f.id=o;f.className="MSIE";document.body.appendChild(f);f.src=s}else{var c=e("<iframe id='"+o+"' name='printIframe' />");c.appendTo("body")}var l=e("#"+o);if(!a.debug)l.css({position:"absolute",width:"0px",height:"0px",left:"-600px",top:"-600px"});if(typeof a.beforePrint==="function"){a.beforePrint()}setTimeout(function(){function i(e,t){var n,i;n=e.get(0);n=n.contentWindow||n.contentDocument||n;i=n.document||n.contentDocument||n;i.open();i.write(t);i.close()}if(a.doctypeString){i(l,a.doctypeString)}var o=l.contents(),s=o.find("head"),f=o.find("body"),c=e("base"),d;if(a.base===true&&c.length>0){d=c.attr("href")}else if(typeof a.base==="string"){d=a.base}else{d=document.location.protocol+"//"+document.location.host}s.append('<base href="'+d+'">');if(a.importCSS)e("link[rel=stylesheet]").each(function(){var t=e(this).attr("href");if(t){var n=e(this).attr("media")||"all";s.append("<link type='text/css' rel='stylesheet' href='"+t+"' media='"+n+"'>")}});if(a.importStyle)e("style").each(function(){s.append(this.outerHTML)});if(a.pageTitle)s.append("<title>"+a.pageTitle+"</title>");if(a.loadCSS){if(e.isArray(a.loadCSS)){jQuery.each(a.loadCSS,function(e,t){s.append("<link type='text/css' rel='stylesheet' href='"+this+"'>")})}else{s.append("<link type='text/css' rel='stylesheet' href='"+a.loadCSS+"'>")}}var p=e("html")[0];o.find("html").prop("style",p.style.cssText);var u=a.copyTagClasses;if(u){u=u===true?"bh":u;if(u.indexOf("b")!==-1){f.addClass(e("body")[0].className)}if(u.indexOf("h")!==-1){o.find("html").addClass(p.className)}}t(f,a.header);if(a.canvas){var m=0;r.find("canvas").addBack("canvas").each(function(){e(this).attr("data-printthis",m++)})}n(f,r,a);if(a.canvas){f.find("canvas").each(function(){var t=e(this).data("printthis"),n=e('[data-printthis="'+t+'"]');this.getContext("2d").drawImage(n[0],0,0);if(e.isFunction(e.fn.removeAttr)){n.removeAttr("data-printthis")}else{e.each(n,function(e,t){t.removeAttribute("data-printthis")})}})}if(a.removeInline){var h=a.removeInlineSelector||"*";if(e.isFunction(e.removeAttr)){f.find(h).removeAttr("style")}else{f.find(h).attr("style","")}}t(f,a.footer);function v(e,t){var n=e.get(0);n=n.contentWindow||n.contentDocument||n;if(typeof t==="function"){if("matchMedia"in n){n.matchMedia("print").addListener(function(e){if(e.matches)t()})}else{n.onbeforeprint=t}}}v(l,a.beforePrintEvent);setTimeout(function(){if(l.hasClass("MSIE")){window.frames["printIframe"].focus();s.append("<script>  window.print(); </s"+"cript>")}else{if(document.queryCommandSupported("print")){l[0].contentWindow.document.execCommand("print",false,null)}else{l[0].contentWindow.focus();l[0].contentWindow.print()}}if(!a.debug){setTimeout(function(){l.remove()},1e3)}if(typeof a.afterPrint==="function"){a.afterPrint()}},a.printDelay)},333)};e.fn.printThis.defaults={debug:false,importCSS:true,importStyle:false,printContainer:true,loadCSS:"",pageTitle:"",removeInline:false,removeInlineSelector:"*",printDelay:333,header:null,footer:null,base:false,formValues:true,canvas:false,doctypeString:"<!DOCTYPE html>",removeScripts:false,copyTagClasses:false,beforePrintEvent:null,beforePrint:null,afterPrint:null}})(jQuery);

/*!
 * jQuery Transit 0.9.12 (http://github.com/rstacruz/jquery.transit)
 * Copyright 2011-2014 Rico Sta. Cruz
 * Licensed under MIT
 */
(function(t,e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){module.exports=e(require("jquery"))}else{e(t.jQuery)}})(this,function(t){t.transit={version:"0.9.12",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var e=document.createElement("div");var n={};function i(t){if(t in e.style)return t;var n=["Moz","Webkit","O","ms"];var i=t.charAt(0).toUpperCase()+t.substr(1);for(var r=0;r<n.length;++r){var s=n[r]+i;if(s in e.style){return s}}}function r(){e.style[n.transform]="";e.style[n.transform]="rotateY(90deg)";return e.style[n.transform]!==""}var s=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;n.transition=i("transition");n.transitionDelay=i("transitionDelay");n.transform=i("transform");n.transformOrigin=i("transformOrigin");n.filter=i("Filter");n.transform3d=r();var a={transition:"transitionend",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var o=n.transitionEnd=a[n.transition]||null;for(var u in n){if(n.hasOwnProperty(u)&&typeof t.support[u]==="undefined"){t.support[u]=n[u]}}e=null;t.cssEase={_default:"ease",in:"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeInCubic:"cubic-bezier(.550,.055,.675,.190)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};t.cssHooks["transit:transform"]={get:function(e){return t(e).data("transform")||new f},set:function(e,i){var r=i;if(!(r instanceof f)){r=new f(r)}if(n.transform==="WebkitTransform"&&!s){e.style[n.transform]=r.toString(true)}else{e.style[n.transform]=r.toString()}t(e).data("transform",r)}};t.cssHooks.transform={set:t.cssHooks["transit:transform"].set};t.cssHooks.filter={get:function(t){return t.style[n.filter]},set:function(t,e){t.style[n.filter]=e}};if(t.fn.jquery<"1.8"){t.cssHooks.transformOrigin={get:function(t){return t.style[n.transformOrigin]},set:function(t,e){t.style[n.transformOrigin]=e}};t.cssHooks.transition={get:function(t){return t.style[n.transition]},set:function(t,e){t.style[n.transition]=e}}}p("scale");p("scaleX");p("scaleY");p("translate");p("rotate");p("rotateX");p("rotateY");p("rotate3d");p("perspective");p("skewX");p("skewY");p("x",true);p("y",true);function f(t){if(typeof t==="string"){this.parse(t)}return this}f.prototype={setFromString:function(t,e){var n=typeof e==="string"?e.split(","):e.constructor===Array?e:[e];n.unshift(t);f.prototype.set.apply(this,n)},set:function(t){var e=Array.prototype.slice.apply(arguments,[1]);if(this.setter[t]){this.setter[t].apply(this,e)}else{this[t]=e.join(",")}},get:function(t){if(this.getter[t]){return this.getter[t].apply(this)}else{return this[t]||0}},setter:{rotate:function(t){this.rotate=b(t,"deg")},rotateX:function(t){this.rotateX=b(t,"deg")},rotateY:function(t){this.rotateY=b(t,"deg")},scale:function(t,e){if(e===undefined){e=t}this.scale=t+","+e},skewX:function(t){this.skewX=b(t,"deg")},skewY:function(t){this.skewY=b(t,"deg")},perspective:function(t){this.perspective=b(t,"px")},x:function(t){this.set("translate",t,null)},y:function(t){this.set("translate",null,t)},translate:function(t,e){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(t!==null&&t!==undefined){this._translateX=b(t,"px")}if(e!==null&&e!==undefined){this._translateY=b(e,"px")}this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var t=(this.scale||"1,1").split(",");if(t[0]){t[0]=parseFloat(t[0])}if(t[1]){t[1]=parseFloat(t[1])}return t[0]===t[1]?t[0]:t},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var e=0;e<=3;++e){if(t[e]){t[e]=parseFloat(t[e])}}if(t[3]){t[3]=b(t[3],"deg")}return t}},parse:function(t){var e=this;t.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,n,i){e.setFromString(n,i)})},toString:function(t){var e=[];for(var i in this){if(this.hasOwnProperty(i)){if(!n.transform3d&&(i==="rotateX"||i==="rotateY"||i==="perspective"||i==="transformOrigin")){continue}if(i[0]!=="_"){if(t&&i==="scale"){e.push(i+"3d("+this[i]+",1)")}else if(t&&i==="translate"){e.push(i+"3d("+this[i]+",0)")}else{e.push(i+"("+this[i]+")")}}}}return e.join(" ")}};function c(t,e,n){if(e===true){t.queue(n)}else if(e){t.queue(e,n)}else{t.each(function(){n.call(this)})}}function l(e){var i=[];t.each(e,function(e){e=t.camelCase(e);e=t.transit.propertyMap[e]||t.cssProps[e]||e;e=h(e);if(n[e])e=h(n[e]);if(t.inArray(e,i)===-1){i.push(e)}});return i}function d(e,n,i,r){var s=l(e);if(t.cssEase[i]){i=t.cssEase[i]}var a=""+y(n)+" "+i;if(parseInt(r,10)>0){a+=" "+y(r)}var o=[];t.each(s,function(t,e){o.push(e+" "+a)});return o.join(", ")}t.fn.transition=t.fn.transit=function(e,i,r,s){var a=this;var u=0;var f=true;var l=t.extend(true,{},e);if(typeof i==="function"){s=i;i=undefined}if(typeof i==="object"){r=i.easing;u=i.delay||0;f=typeof i.queue==="undefined"?true:i.queue;s=i.complete;i=i.duration}if(typeof r==="function"){s=r;r=undefined}if(typeof l.easing!=="undefined"){r=l.easing;delete l.easing}if(typeof l.duration!=="undefined"){i=l.duration;delete l.duration}if(typeof l.complete!=="undefined"){s=l.complete;delete l.complete}if(typeof l.queue!=="undefined"){f=l.queue;delete l.queue}if(typeof l.delay!=="undefined"){u=l.delay;delete l.delay}if(typeof i==="undefined"){i=t.fx.speeds._default}if(typeof r==="undefined"){r=t.cssEase._default}i=y(i);var p=d(l,i,r,u);var h=t.transit.enabled&&n.transition;var b=h?parseInt(i,10)+parseInt(u,10):0;if(b===0){var g=function(t){a.css(l);if(s){s.apply(a)}if(t){t()}};c(a,f,g);return a}var m={};var v=function(e){var i=false;var r=function(){if(i){a.unbind(o,r)}if(b>0){a.each(function(){this.style[n.transition]=m[this]||null})}if(typeof s==="function"){s.apply(a)}if(typeof e==="function"){e()}};if(b>0&&o&&t.transit.useTransitionEnd){i=true;a.bind(o,r)}else{window.setTimeout(r,b)}a.each(function(){if(b>0){this.style[n.transition]=p}t(this).css(l)})};var z=function(t){this.offsetWidth=this.offsetWidth;v(t)};c(a,f,z);return this};function p(e,i){if(!i){t.cssNumber[e]=true}t.transit.propertyMap[e]=n.transform;t.cssHooks[e]={get:function(n){var i=t(n).css("transit:transform");return i.get(e)},set:function(n,i){var r=t(n).css("transit:transform");r.setFromString(e,i);t(n).css({"transit:transform":r})}}}function h(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function b(t,e){if(typeof t==="string"&&!t.match(/^[\-0-9\.]+$/)){return t}else{return""+t+e}}function y(e){var n=e;if(typeof n==="string"&&!n.match(/^[\-0-9\.]+/)){n=t.fx.speeds[n]||t.fx.speeds._default}return b(n,"ms")}t.transit.getTransitionValue=d;return t});

/*!
 * iziToast 1.4.0
 * Copyright 2018 Marcelo Dolce
 * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
 */
(function(t,e){if(typeof define==="function"&&define.amd){define([],e(t))}else if(typeof exports==="object"){module.exports=e(t)}else{t.iziToast=e(t)}})(typeof global!=="undefined"?global:window||this.window||this.global,function(t){"use strict";var e={},i="iziToast",n=document.querySelector("body"),o=/Mobi/.test(navigator.userAgent)?true:false,s=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),a=typeof InstallTrigger!=="undefined",r="ontouchstart"in document.documentElement,l=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],d={info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},c=568,u={};e.children={};var f={id:null,class:"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",iconUrl:null,image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:false,close:true,closeOnEscape:false,closeOnClick:false,displayMode:0,position:"bottomRight",target:"",targetFirst:true,timeout:5e3,rtl:false,animateInside:true,drag:true,pauseOnHover:true,resetOnHover:false,progressBar:true,progressBarColor:"",progressBarEasing:"linear",overlay:false,overlayClose:false,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if(!("remove"in Element.prototype)){Element.prototype.remove=function(){if(this.parentNode){this.parentNode.removeChild(this)}}}if(typeof window.CustomEvent!=="function"){var p=function(t,e){e=e||{bubbles:false,cancelable:false,detail:undefined};var i=document.createEvent("CustomEvent");i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail);return i};p.prototype=window.Event.prototype;window.CustomEvent=p}var m=function(t,e,i){if(Object.prototype.toString.call(t)==="[object Object]"){for(var n in t){if(Object.prototype.hasOwnProperty.call(t,n)){e.call(i,t[n],n,t)}}}else{if(t){for(var o=0,s=t.length;o<s;o++){e.call(i,t[o],o,t)}}}};var g=function(t,e){var i={};m(t,function(e,n){i[n]=t[n]});m(e,function(t,n){i[n]=e[n]});return i};var v=function(t){var e=document.createDocumentFragment(),i=document.createElement("div");i.innerHTML=t;while(i.firstChild){e.appendChild(i.firstChild)}return e};var y=function(t){var e=btoa(encodeURIComponent(t));return e.replace(/=/g,"")};var h=function(t){if(t.substring(0,1)=="#"||t.substring(0,3)=="rgb"||t.substring(0,3)=="hsl"){return true}else{return false}};var b=function(t){try{return btoa(atob(t))==t}catch(t){return false}};var L=function(){return{move:function(t,e,n,o){var r,l=.3,d=180;if(o!==0){t.classList.add(i+"-dragged");t.style.transform="translateX("+o+"px)";if(o>0){r=(d-o)/d;if(r<l){e.hide(g(n,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag")}}else{r=(d+o)/d;if(r<l){e.hide(g(n,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag")}}t.style.opacity=r;if(r<l){if(s||a)t.style.left=o+"px";t.parentNode.style.opacity=l;this.stopMoving(t,null)}}},startMoving:function(t,e,i,n){n=n||window.event;var o=r?n.touches[0].clientX:n.clientX,s=t.style.transform.replace("px)","");s=s.replace("translateX(","");var a=o-s;if(i.transitionIn){t.classList.remove(i.transitionIn)}if(i.transitionInMobile){t.classList.remove(i.transitionInMobile)}t.style.transition="";if(r){document.ontouchmove=function(n){n.preventDefault();n=n||window.event;var o=n.touches[0].clientX,s=o-a;L.move(t,e,i,s)}}else{document.onmousemove=function(n){n.preventDefault();n=n||window.event;var o=n.clientX,s=o-a;L.move(t,e,i,s)}}},stopMoving:function(t,e){if(r){document.ontouchmove=function(){}}else{document.onmousemove=function(){}}t.style.opacity="";t.style.transform="";if(t.classList.contains(i+"-dragged")){t.classList.remove(i+"-dragged");t.style.transition="transform 0.4s ease, opacity 0.4s ease";setTimeout(function(){t.style.transition=""},400)}}}}();e.setSetting=function(t,i,n){e.children[t][i]=n};e.getSetting=function(t,i){return e.children[t][i]};e.destroy=function(){m(document.querySelectorAll("."+i+"-overlay"),function(t,e){t.remove()});m(document.querySelectorAll("."+i+"-wrapper"),function(t,e){t.remove()});m(document.querySelectorAll("."+i),function(t,e){t.remove()});this.children={};document.removeEventListener(i+"-opened",{},false);document.removeEventListener(i+"-opening",{},false);document.removeEventListener(i+"-closing",{},false);document.removeEventListener(i+"-closed",{},false);document.removeEventListener("keyup",{},false);u={}};e.settings=function(t){e.destroy();u=t;f=g(f,t||{})};m(d,function(t,i){e[i]=function(e){var i=g(u,e||{});i=g(t,i||{});this.show(i)}});e.progress=function(t,e,n){var o=this,s=e.getAttribute("data-iziToast-ref"),a=g(this.children[s],t||{}),r=e.querySelector("."+i+"-progressbar div");return{start:function(){if(typeof a.time.REMAINING=="undefined"){e.classList.remove(i+"-reseted");if(r!==null){r.style.transition="width "+a.timeout+"ms "+a.progressBarEasing;r.style.width="0%"}a.time.START=(new Date).getTime();a.time.END=a.time.START+a.timeout;a.time.TIMER=setTimeout(function(){clearTimeout(a.time.TIMER);if(!e.classList.contains(i+"-closing")){o.hide(a,e,"timeout");if(typeof n==="function"){n.apply(o)}}},a.timeout);o.setSetting(s,"time",a.time)}},pause:function(){if(typeof a.time.START!=="undefined"&&!e.classList.contains(i+"-paused")&&!e.classList.contains(i+"-reseted")){e.classList.add(i+"-paused");a.time.REMAINING=a.time.END-(new Date).getTime();clearTimeout(a.time.TIMER);o.setSetting(s,"time",a.time);if(r!==null){var t=window.getComputedStyle(r),l=t.getPropertyValue("width");r.style.transition="none";r.style.width=l}if(typeof n==="function"){setTimeout(function(){n.apply(o)},10)}}},resume:function(){if(typeof a.time.REMAINING!=="undefined"){e.classList.remove(i+"-paused");if(r!==null){r.style.transition="width "+a.time.REMAINING+"ms "+a.progressBarEasing;r.style.width="0%"}a.time.END=(new Date).getTime()+a.time.REMAINING;a.time.TIMER=setTimeout(function(){clearTimeout(a.time.TIMER);if(!e.classList.contains(i+"-closing")){o.hide(a,e,"timeout");if(typeof n==="function"){n.apply(o)}}},a.time.REMAINING);o.setSetting(s,"time",a.time)}else{this.start()}},reset:function(){clearTimeout(a.time.TIMER);delete a.time.REMAINING;o.setSetting(s,"time",a.time);e.classList.add(i+"-reseted");e.classList.remove(i+"-paused");if(r!==null){r.style.transition="none";r.style.width="100%"}if(typeof n==="function"){setTimeout(function(){n.apply(o)},10)}}}};e.hide=function(t,e,n){if(typeof e!="object"){e=document.querySelector(e)}var s=this,a=g(this.children[e.getAttribute("data-iziToast-ref")],t||{});a.closedBy=n||null;delete a.time.REMAINING;e.classList.add(i+"-closing");(function(){var t=document.querySelector("."+i+"-overlay");if(t!==null){var e=t.getAttribute("data-iziToast-ref");e=e.split(",");var n=e.indexOf(String(a.ref));if(n!==-1){e.splice(n,1)}t.setAttribute("data-iziToast-ref",e.join());if(e.length===0){t.classList.remove("fadeIn");t.classList.add("fadeOut");setTimeout(function(){t.remove()},700)}}})();if(a.transitionIn){e.classList.remove(a.transitionIn)}if(a.transitionInMobile){e.classList.remove(a.transitionInMobile)}if(o||window.innerWidth<=c){if(a.transitionOutMobile)e.classList.add(a.transitionOutMobile)}else{if(a.transitionOut)e.classList.add(a.transitionOut)}var r=e.parentNode.offsetHeight;e.parentNode.style.height=r+"px";e.style.pointerEvents="none";if(!o||window.innerWidth>c){e.parentNode.style.transitionDelay="0.2s"}try{var l=new CustomEvent(i+"-closing",{detail:a,bubbles:true,cancelable:true});document.dispatchEvent(l)}catch(t){console.warn(t)}setTimeout(function(){e.parentNode.style.height="0px";e.parentNode.style.overflow="";setTimeout(function(){delete s.children[a.ref];e.parentNode.remove();try{var t=new CustomEvent(i+"-closed",{detail:a,bubbles:true,cancelable:true});document.dispatchEvent(t)}catch(t){console.warn(t)}if(typeof a.onClosed!=="undefined"){a.onClosed.apply(null,[a,e,n])}},1e3)},200);if(typeof a.onClosing!=="undefined"){a.onClosing.apply(null,[a,e,n])}};e.show=function(t){var n=this;var s=g(u,t||{});s=g(f,s);s.time={};if(s.id===null){s.id=y(s.title+s.message+s.color)}if(s.displayMode===1||s.displayMode=="once"){try{if(document.querySelectorAll("."+i+"#"+s.id).length>0){return false}}catch(t){console.warn("["+i+"] Could not find an element with this selector: "+"#"+s.id+". Try to set an valid id.")}}if(s.displayMode===2||s.displayMode=="replace"){try{m(document.querySelectorAll("."+i+"#"+s.id),function(t,e){n.hide(s,t,"replaced")})}catch(t){console.warn("["+i+"] Could not find an element with this selector: "+"#"+s.id+". Try to set an valid id.")}}s.ref=(new Date).getTime()+Math.floor(Math.random()*1e7+1);e.children[s.ref]=s;var a={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),icon:!s.iconUrl?document.createElement("i"):document.createElement("img"),wrapper:null};a.toast.setAttribute("data-iziToast-ref",s.ref);a.toast.appendChild(a.toastBody);a.toastCapsule.appendChild(a.toast);(function(){a.toast.classList.add(i);a.toast.classList.add(i+"-opening");a.toastCapsule.classList.add(i+"-capsule");a.toastBody.classList.add(i+"-body");a.toastTexts.classList.add(i+"-texts");if(o||window.innerWidth<=c){if(s.transitionInMobile)a.toast.classList.add(s.transitionInMobile)}else{if(s.transitionIn)a.toast.classList.add(s.transitionIn)}if(s.class){var t=s.class.split(" ");m(t,function(t,e){a.toast.classList.add(t)})}if(s.id){a.toast.id=s.id}if(s.rtl){a.toast.classList.add(i+"-rtl");a.toast.setAttribute("dir","rtl")}if(s.layout>1){a.toast.classList.add(i+"-layout"+s.layout)}if(s.balloon){a.toast.classList.add(i+"-balloon")}if(s.maxWidth){if(!isNaN(s.maxWidth)){a.toast.style.maxWidth=s.maxWidth+"px"}else{a.toast.style.maxWidth=s.maxWidth}}if(s.theme!==""||s.theme!=="light"){a.toast.classList.add(i+"-theme-"+s.theme)}if(s.color){if(h(s.color)){a.toast.style.background=s.color}else{a.toast.classList.add(i+"-color-"+s.color)}}if(s.backgroundColor){a.toast.style.background=s.backgroundColor;if(s.balloon){a.toast.style.borderColor=s.backgroundColor}}})();(function(){if(s.image){a.cover.classList.add(i+"-cover");a.cover.style.width=s.imageWidth+"px";if(b(s.image.replace(/ /g,""))){a.cover.style.backgroundImage="url(data:image/png;base64,"+s.image.replace(/ /g,"")+")"}else{a.cover.style.backgroundImage="url("+s.image+")"}if(s.rtl){a.toastBody.style.marginRight=s.imageWidth+10+"px"}else{a.toastBody.style.marginLeft=s.imageWidth+10+"px"}a.toast.appendChild(a.cover)}})();(function(){if(s.close){a.buttonClose=document.createElement("button");a.buttonClose.type="button";a.buttonClose.classList.add(i+"-close");a.buttonClose.addEventListener("click",function(t){var e=t.target;n.hide(s,a.toast,"button")});a.toast.appendChild(a.buttonClose)}else{if(s.rtl){a.toast.style.paddingLeft="18px"}else{a.toast.style.paddingRight="18px"}}})();(function(){if(s.progressBar){a.progressBar=document.createElement("div");a.progressBarDiv=document.createElement("div");a.progressBar.classList.add(i+"-progressbar");a.progressBarDiv.style.background=s.progressBarColor;a.progressBar.appendChild(a.progressBarDiv);a.toast.appendChild(a.progressBar)}if(s.timeout){if(s.pauseOnHover&&!s.resetOnHover){a.toast.addEventListener("mouseenter",function(t){n.progress(s,a.toast).pause()});a.toast.addEventListener("mouseleave",function(t){n.progress(s,a.toast).resume()})}if(s.resetOnHover){a.toast.addEventListener("mouseenter",function(t){n.progress(s,a.toast).reset()});a.toast.addEventListener("mouseleave",function(t){n.progress(s,a.toast).start()})}}})();(function(){if(s.iconUrl){a.icon.setAttribute("class",i+"-icon");a.icon.setAttribute("src",s.iconUrl)}else if(s.icon){a.icon.setAttribute("class",i+"-icon "+s.icon);if(s.iconText){a.icon.appendChild(document.createTextNode(s.iconText))}if(s.iconColor){a.icon.style.color=s.iconColor}}if(s.icon||s.iconUrl){if(s.rtl){a.toastBody.style.paddingRight="33px"}else{a.toastBody.style.paddingLeft="33px"}a.toastBody.appendChild(a.icon)}})();(function(){if(s.title.length>0){a.strong=document.createElement("strong");a.strong.classList.add(i+"-title");a.strong.appendChild(v(s.title));a.toastTexts.appendChild(a.strong);if(s.titleColor){a.strong.style.color=s.titleColor}if(s.titleSize){if(!isNaN(s.titleSize)){a.strong.style.fontSize=s.titleSize+"px"}else{a.strong.style.fontSize=s.titleSize}}if(s.titleLineHeight){if(!isNaN(s.titleSize)){a.strong.style.lineHeight=s.titleLineHeight+"px"}else{a.strong.style.lineHeight=s.titleLineHeight}}}if(s.message.length>0){a.p=document.createElement("p");a.p.classList.add(i+"-message");a.p.appendChild(v(s.message));a.toastTexts.appendChild(a.p);if(s.messageColor){a.p.style.color=s.messageColor}if(s.messageSize){if(!isNaN(s.titleSize)){a.p.style.fontSize=s.messageSize+"px"}else{a.p.style.fontSize=s.messageSize}}if(s.messageLineHeight){if(!isNaN(s.titleSize)){a.p.style.lineHeight=s.messageLineHeight+"px"}else{a.p.style.lineHeight=s.messageLineHeight}}}if(s.title.length>0&&s.message.length>0){if(s.rtl){a.strong.style.marginLeft="10px"}else if(s.layout!==2&&!s.rtl){a.strong.style.marginRight="10px"}}})();a.toastBody.appendChild(a.toastTexts);var d;(function(){if(s.inputs.length>0){a.inputs.classList.add(i+"-inputs");m(s.inputs,function(t,e){a.inputs.appendChild(v(t[0]));d=a.inputs.childNodes;d[e].classList.add(i+"-inputs-child");if(t[3]){setTimeout(function(){d[e].focus()},300)}d[e].addEventListener(t[1],function(e){var i=t[2];return i(n,a.toast,this,e)})});a.toastBody.appendChild(a.inputs)}})();(function(){if(s.buttons.length>0){a.buttons.classList.add(i+"-buttons");m(s.buttons,function(t,e){a.buttons.appendChild(v(t[0]));var o=a.buttons.childNodes;o[e].classList.add(i+"-buttons-child");if(t[2]){setTimeout(function(){o[e].focus()},300)}o[e].addEventListener("click",function(e){e.preventDefault();var i=t[1];return i(n,a.toast,this,e,d)})})}a.toastBody.appendChild(a.buttons)})();if(s.message.length>0&&(s.inputs.length>0||s.buttons.length>0)){a.p.style.marginBottom="0"}if(s.inputs.length>0||s.buttons.length>0){if(s.rtl){a.toastTexts.style.marginLeft="10px"}else{a.toastTexts.style.marginRight="10px"}if(s.inputs.length>0&&s.buttons.length>0){if(s.rtl){a.inputs.style.marginLeft="8px"}else{a.inputs.style.marginRight="8px"}}}(function(){a.toastCapsule.style.visibility="hidden";setTimeout(function(){var t=a.toast.offsetHeight;var e=a.toast.currentStyle||window.getComputedStyle(a.toast);var i=e.marginTop;i=i.split("px");i=parseInt(i[0]);var o=e.marginBottom;o=o.split("px");o=parseInt(o[0]);a.toastCapsule.style.visibility="";a.toastCapsule.style.height=t+o+i+"px";setTimeout(function(){a.toastCapsule.style.height="auto";if(s.target){a.toastCapsule.style.overflow="visible"}},500);if(s.timeout){n.progress(s,a.toast).start()}},100)})();(function(){var t=s.position;if(s.target){a.wrapper=document.querySelector(s.target);a.wrapper.classList.add(i+"-target");if(s.targetFirst){a.wrapper.insertBefore(a.toastCapsule,a.wrapper.firstChild)}else{a.wrapper.appendChild(a.toastCapsule)}}else{if(l.indexOf(s.position)==-1){console.warn("["+i+"] Incorrect position.\nIt can be › "+l);return}if(o||window.innerWidth<=c){if(s.position=="bottomLeft"||s.position=="bottomRight"||s.position=="bottomCenter"){t=i+"-wrapper-bottomCenter"}else if(s.position=="topLeft"||s.position=="topRight"||s.position=="topCenter"){t=i+"-wrapper-topCenter"}else{t=i+"-wrapper-center"}}else{t=i+"-wrapper-"+t}a.wrapper=document.querySelector("."+i+"-wrapper."+t);if(!a.wrapper){a.wrapper=document.createElement("div");a.wrapper.classList.add(i+"-wrapper");a.wrapper.classList.add(t);document.body.appendChild(a.wrapper)}if(s.position=="topLeft"||s.position=="topCenter"||s.position=="topRight"){a.wrapper.insertBefore(a.toastCapsule,a.wrapper.firstChild)}else{a.wrapper.appendChild(a.toastCapsule)}}if(!isNaN(s.zindex)){a.wrapper.style.zIndex=s.zindex}else{console.warn("["+i+"] Invalid zIndex.")}})();(function(){if(s.overlay){if(document.querySelector("."+i+"-overlay.fadeIn")!==null){a.overlay=document.querySelector("."+i+"-overlay");a.overlay.setAttribute("data-iziToast-ref",a.overlay.getAttribute("data-iziToast-ref")+","+s.ref);if(!isNaN(s.zindex)&&s.zindex!==null){a.overlay.style.zIndex=s.zindex-1}}else{a.overlay.classList.add(i+"-overlay");a.overlay.classList.add("fadeIn");a.overlay.style.background=s.overlayColor;a.overlay.setAttribute("data-iziToast-ref",s.ref);if(!isNaN(s.zindex)&&s.zindex!==null){a.overlay.style.zIndex=s.zindex-1}document.querySelector("body").appendChild(a.overlay)}if(s.overlayClose){a.overlay.removeEventListener("click",{});a.overlay.addEventListener("click",function(t){n.hide(s,a.toast,"overlay")})}else{a.overlay.removeEventListener("click",{})}}})();(function(){if(s.animateInside){a.toast.classList.add(i+"-animateInside");var t=[200,100,300];if(s.transitionIn=="bounceInLeft"||s.transitionIn=="bounceInRight"){t=[400,200,400]}if(s.title.length>0){setTimeout(function(){a.strong.classList.add("slideIn")},t[0])}if(s.message.length>0){setTimeout(function(){a.p.classList.add("slideIn")},t[1])}if(s.icon||s.iconUrl){setTimeout(function(){a.icon.classList.add("revealIn")},t[2])}var e=150;if(s.buttons.length>0&&a.buttons){setTimeout(function(){m(a.buttons.childNodes,function(t,i){setTimeout(function(){t.classList.add("revealIn")},e);e=e+150})},s.inputs.length>0?150:0)}if(s.inputs.length>0&&a.inputs){e=150;m(a.inputs.childNodes,function(t,i){setTimeout(function(){t.classList.add("revealIn")},e);e=e+150})}}})();s.onOpening.apply(null,[s,a.toast]);try{var p=new CustomEvent(i+"-opening",{detail:s,bubbles:true,cancelable:true});document.dispatchEvent(p)}catch(t){console.warn(t)}setTimeout(function(){a.toast.classList.remove(i+"-opening");a.toast.classList.add(i+"-opened");try{var t=new CustomEvent(i+"-opened",{detail:s,bubbles:true,cancelable:true});document.dispatchEvent(t)}catch(t){console.warn(t)}s.onOpened.apply(null,[s,a.toast])},1e3);if(s.drag){if(r){a.toast.addEventListener("touchstart",function(t){L.startMoving(this,n,s,t)},false);a.toast.addEventListener("touchend",function(t){L.stopMoving(this,t)},false)}else{a.toast.addEventListener("mousedown",function(t){t.preventDefault();L.startMoving(this,n,s,t)},false);a.toast.addEventListener("mouseup",function(t){t.preventDefault();L.stopMoving(this,t)},false)}}if(s.closeOnEscape){document.addEventListener("keyup",function(t){t=t||window.event;if(t.keyCode==27){n.hide(s,a.toast,"esc")}})}if(s.closeOnClick){a.toast.addEventListener("click",function(t){n.hide(s,a.toast,"toast")})}n.toast=a.toast};return e});

/*!
 * HTML5Sortable (https://github.com/lukasoppermann/html5sortable)
 * Copyright 2017 Lukas Oppermann
 * Licensed under MIT
 */
!function(e,t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):e.sortable=t(e.jQuery)}(this,function(e){"use strict";var t,a,r=e(),n=[],i=function(e){e.off("dragstart.h5s"),e.off("dragend.h5s"),e.off("selectstart.h5s"),e.off("dragover.h5s"),e.off("dragenter.h5s"),e.off("drop.h5s")},o=function(e){e.off("dragover.h5s"),e.off("dragenter.h5s"),e.off("drop.h5s")},d=function(e,t){e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text",""),e.dataTransfer.setDragImage&&e.dataTransfer.setDragImage(t.item,t.x,t.y)},s=function(e,t){return t.x||(t.x=parseInt(e.pageX-t.draggedItem.offset().left)),t.y||(t.y=parseInt(e.pageY-t.draggedItem.offset().top)),t},l=function(e){return{item:e[0],draggedItem:e}},f=function(e,t){var a=l(t);a=s(e,a),d(e,a)},h=function(e,t){return"undefined"==typeof e?t:e},u=function(e){e.removeData("opts"),e.removeData("connectWith"),e.removeData("items"),e.removeAttr("aria-dropeffect")},c=function(e){e.removeAttr("aria-grabbed"),e.removeAttr("draggable"),e.removeAttr("role")},g=function(e,t){return e[0]===t[0]?!0:void 0!==e.data("connectWith")?e.data("connectWith")===t.data("connectWith"):!1},m=function(e){var t=e.data("opts")||{},a=e.children(t.items),r=t.handle?a.find(t.handle):a;o(e),u(e),r.off("mousedown.h5s"),i(a),c(a)},p=function(t){var a=t.data("opts"),r=t.children(a.items),n=a.handle?r.find(a.handle):r;t.attr("aria-dropeffect","move"),n.attr("draggable","true");var i=(document||window.document).createElement("span");"function"!=typeof i.dragDrop||a.disableIEFix||n.on("mousedown.h5s",function(){-1!==r.index(this)?this.dragDrop():e(this).parents(a.items)[0].dragDrop()})},v=function(e){var t=e.data("opts"),a=e.children(t.items),r=t.handle?a.find(t.handle):a;e.attr("aria-dropeffect","none"),r.attr("draggable",!1),r.off("mousedown.h5s")},b=function(e){var t=e.data("opts"),a=e.children(t.items),r=t.handle?a.find(t.handle):a;i(a),r.off("mousedown.h5s"),o(e)},x=function(i,o){var s=e(i),l=String(o);return o=e.extend({connectWith:!1,placeholder:null,dragImage:null,disableIEFix:!1,placeholderClass:"sortable-placeholder",draggingClass:"sortable-dragging",hoverClass:!1},o),s.each(function(){var i=e(this);if(/enable|disable|destroy/.test(l))return void x[l](i);o=h(i.data("opts"),o),i.data("opts",o),b(i);var s,u,c,m=i.children(o.items),v=null===o.placeholder?e("<"+(/^ul|ol$/i.test(this.tagName)?"li":"div")+' class="'+o.placeholderClass+'"/>'):e(o.placeholder).addClass(o.placeholderClass);if(!i.attr("data-sortable-id")){var I=n.length;n[I]=i,i.attr("data-sortable-id",I),m.attr("data-item-sortable-id",I)}if(i.data("items",o.items),r=r.add(v),o.connectWith&&i.data("connectWith",o.connectWith),p(i),m.attr("role","option"),m.attr("aria-grabbed","false"),o.hoverClass){var y="sortable-over";"string"==typeof o.hoverClass&&(y=o.hoverClass),m.hover(function(){e(this).addClass(y)},function(){e(this).removeClass(y)})}m.on("dragstart.h5s",function(r){r.stopImmediatePropagation(),o.dragImage?(d(r.originalEvent,{item:o.dragImage,x:0,y:0}),console.log("WARNING: dragImage option is deprecated and will be removed in the future!")):f(r.originalEvent,e(this),o.dragImage),t=e(this),t.addClass(o.draggingClass),t.attr("aria-grabbed","true"),s=t.index(),a=t.height(),u=e(this).parent(),t.parent().triggerHandler("sortstart",{item:t,placeholder:v,startparent:u})}),m.on("dragend.h5s",function(){t&&(t.removeClass(o.draggingClass),t.attr("aria-grabbed","false"),t.show(),r.detach(),c=e(this).parent(),t.parent().triggerHandler("sortstop",{item:t,startparent:u}),(s!==t.index()||u.get(0)!==c.get(0))&&t.parent().triggerHandler("sortupdate",{item:t,index:c.children(c.data("items")).index(t),oldindex:m.index(t),elementIndex:t.index(),oldElementIndex:s,startparent:u,endparent:c}),t=null,a=null)}),e(this).add([v]).on("drop.h5s",function(a){return g(i,e(t).parent())?(a.stopPropagation(),r.filter(":visible").after(t),t.trigger("dragend.h5s"),!1):void 0}),m.add([this]).on("dragover.h5s dragenter.h5s",function(n){if(g(i,e(t).parent())){if(n.preventDefault(),n.originalEvent.dataTransfer.dropEffect="move",m.is(this)){var d=e(this).height();if(o.forcePlaceholderSize&&v.height(a),d>a){var s=d-a,l=e(this).offset().top;if(v.index()<e(this).index()&&n.originalEvent.pageY<l+s)return!1;if(v.index()>e(this).index()&&n.originalEvent.pageY>l+d-s)return!1}t.hide(),v.index()<e(this).index()?e(this).after(v):e(this).before(v),r.not(v).detach()}else r.is(this)||e(this).children(o.items).length||(r.detach(),e(this).append(v));return!1}})})};return x.destroy=function(e){m(e)},x.enable=function(e){p(e)},x.disable=function(e){v(e)},e.fn.sortable=function(e){return x(this,e)},x});(function(e){function t(t){var a=e(this);a.data("mouseheld_timeout",setTimeout(function(){a.trigger("mouseheld")},t.data))}function a(){var t=e(this);clearTimeout(t.data("mouseheld_timeout"))}var r=e.event.special.mouseheld={setup:function(n){var i=e(this);i.bind("mousedown",+n||r.time,t);i.bind("mouseleave mouseup",a)},teardown:function(){var r=e(this);r.unbind("mousedown",t);r.unbind("mouseleave mouseup",a)},time:750}})(jQuery);

/*!
 * Authentic Theme (https://github.com/authentic-theme/authentic-theme)
 * Copyright Ilia Rostovtsev <ilia@virtualmin.com>
 * Licensed under MIT (https://github.com/authentic-theme/authentic-theme/blob/master/LICENSE)
 */
if(!Array.prototype.includes){Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(this==null){throw new TypeError('"this" is null or not defined')}var n=Object(this);var a=n.length>>>0;if(a===0){return false}var i=t|0;var s=Math.max(i>=0?i:a-Math.abs(i),0);function r(e,t){return e===t||typeof e==="number"&&typeof t==="number"&&isNaN(e)&&isNaN(t)}while(s<a){if(r(n[s],e)){return true}s++}return false}})}if(!Object.values){Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}}if(!Object.entries){Object.entries=function(e){var t=Object.keys(e),n=t.length,a=new Array(n);while(n--)a[n]=[t[n],e[t[n]]];return a}}if(!Array.prototype.some){Array.prototype.some=function(e,t){"use strict";if(this==null){throw new TypeError("Array.prototype.some called on null or undefined")}if(typeof e!=="function"){throw new TypeError}var n=Object(this);var a=n.length>>>0;for(var i=0;i<a;i++){if(i in n&&e.call(t,n[i],i,n)){return true}}return false}}if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector}if(!Element.prototype.closest){Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}}const vars={page_user_inactive:1,page_interaction:-1,page:{shown:0,locked:0,funcs:{render:1}},available_modules:0,navigation:{select:{back:false,obj:false},servers_index_control:false,width_initial:false,pinned:-1},previous_request:String(),source_request:String(),previous_request_progressive:String(),requested_page:String(),allow_ui_features:1,slider:{pinned:-1},jspanels_reversed:0,event:{stopped_typing_delay:200,double_click_delay:400},local_storage:1,shell:{history:0,processing:0},events:{keypressed:{meta:false,ctrl:false,shift:false,alt:false},blocked:false,scrolled:0},plugins:{tooltip:{delay:{show:600,hide:30}}},pjax:{cancel:0,post_reboot:false,post_page_fetch:false,page_cache:true,initial_load:0,replace_contents:1,progressing:0,status:{replace_contents:function(){return vars.pjax.replace_contents}},cache:{set:function(e){if(e==="disable"){vars.pjax.page_cache=false}else{vars.pjax.page_cache=true}},disabled:function(e,t){return!vars.pjax.page_cache&&!t||(e?e.includes("/mailbox")&&!e.includes("/mailboxes")||e.includes("/csf")||e.includes("/"+v___module_file_manager+"")||e.includes("/tconfig.cgi"):core.curModule("mailbox",1)||core.curModule("csf")||core.curModule(v___module_file_manager)||v___location_file==="tconfig.cgi")}},event:{end:1},events:{run:{end:1}}},ajax:{post_success:false,progressing:0},sockets:{xterm:{instances:{},clean:{}}},h:{class:{button:{tableHeader:"btn btn-link text-lighter text-decoration-none"}},selector:{body:{data:{loadInitial:"data-load-initial"}},content:{get:function(){return $(".__page")}},input:{customTogglers:".awobject > input"}},event:{page:{end:"ready pjax:end"}}},level:-1,cache:{}};const browser={detect:{internet_explorer:function e(){var t=0,n=/MSIE (\d+\.\d+);/.test(navigator.userAgent),a=!!navigator.userAgent.match(/Trident\/7.0/),i=navigator.userAgent.indexOf("rv:11.0");return n&&(t=new Number(RegExp.$1)),-1!=navigator.appVersion.indexOf("MSIE 10")&&(t=10),a&&-1!=i&&(t=11),t},safari:function e(t){var n=window.navigator.userAgent,a=(!!n.match(/iPad/i)||!!n.match(/iPhone/i))&&!!n.match(/WebKit/i)&&!n.match(/CriOS/i)&&!n.match(/OPiOS/i),i=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&!navigator.userAgent.match("CriOS");return t?a:i},firefox:function(){return/firefox/i.test(navigator.userAgent)}},storage:{size:function e(t){var n=String(),a=t?"MB":"KB";for(var i in window.localStorage){window.localStorage.hasOwnProperty(i)&&(n+=window.localStorage[i])}return n?((3+16*n.length/8192)/(t?1024:1)).toFixed(2)+" "+a:"Empty (0 "+a+")"}},set:function(){if(browser.detect.safari()){$(document.body).attr("data-browser","safari")}else if(browser.detect.firefox()){$(document.body).attr("data-browser","firefox")}}};const platform={detect:function(){var e=window.navigator.userAgent,t=window.navigator.platform,n=["Macintosh","MacIntel","MacPPC","Mac68K"],a=["Win32","Win64","Windows","WinCE"],i=["iPhone","iPad","iPod"],s=null;if(n.indexOf(t)!==-1){s="mac"}else if(i.indexOf(t)!==-1){s="ios"}else if(a.indexOf(t)!==-1){s="windows"}else if(/Android/.test(e)){s="android"}else if(!s&&/Linux/.test(t)){s="linux"}return s},set:function(){var e=this.detect();if(e){$(document.body).attr("data-platform",e)}}};const Convert={arrFlip:function(e){var t,n={};for(t in e){if(e.hasOwnProperty(t)){n[e[t]]=t}}return n},uriDecodeComponent:function(e,t){var n=String(),a,i=0,s,r;typeof t==="undefined"?t=0:0;a=e?e.split(/(%(?:d0|d1)%.{2})/):[];if($.isEmptyObject(a)){return e}for(s=a.length;i<s;i++){try{r=decodeURIComponent(a[i])}catch(e){r=t?a[i].replace(/%(?!\d+)/g,"%25"):a[i]}n+=r}return n},uriEncodeComponent:function(e,t){if(this.uriDecodeComponent(e)===e){e=encodeURIComponent(e)}if(t){e=e.replace(/%20/g," ").replace(/%26/g,"&").replace(/%2F/g,"/").replace(/%3A/g,":").replace(/%5B/g,"[").replace(/%5D/g,"]")}return e},encodeURIComponentConsistent:function(e){e=encodeURIComponent(e);if(e&&(e.includes("-")||e.includes("!")||e.includes("'")||e.includes("(")||e.includes(")")||e.includes("*")||e.includes("_"))){e=e.replace(/[-!'()*_]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}return e},quoteEscape:function(e,t){if(!t){t='"'}var n="&quot;";if(t==="'"){n="&#39;"}if(e){e=e.replace(new RegExp(t,"g"),n)}return e},htmlEscape:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","=":"&#61;"};return String(e).replace(/[&<>"'=]/g,function(e){return t[e]})},htmlUnEscape:function(e){var t=[["amp","&"],["apos","'"],["#x27","'"],["#x2F","/"],["#39","'"],["#47","/"],["#61","="],["lt","<"],["gt",">"],["nbsp"," "],["quot",'"']];if(!!e){for(var n=0,a=t.length;n<a;++n)e=String(e).replace(new RegExp("&"+t[n][0]+";","g"),t[n][1])}return!!e?e:""},htmlUnEscapeSafe:function(e){var t=["&amp;nbsp;","&lt;br&gt;","&lt;tt&gt;","&lt;/tt&gt;","&lt;i&gt;","&lt;/i&gt;","&lt;em&gt;","&lt;/em&gt;","&lt;strong&gt;","&lt;/strong&gt;","&lt;code&gt;","&lt;/code&gt;","&lt;kbd&gt;","&lt;/kbd&gt;"];t.forEach(function(t){var n=t.replaceAll("&lt;","<");n=n.replaceAll("&gt;",">");n=n.replaceAll("&amp;","&");e=e.replaceAll(t,n)});return e},htmlDecode:function(e){return e.replace(/\\x([0-9A-Fa-f]{2})/g,function(){return String.fromCharCode(parseInt(arguments[1],16))})},textTruncate:function(e,t,n){if(e.length<=t)return e;n=n||"...";var a=n.length,i=t-a,s=Math.ceil(i/2),r=Math.floor(i/2);return e.substr(0,s)+n+e.substr(e.length-r)},htmlStrip:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return t.body.textContent||""},pathnamePopLast:function(e){var t=!!~e.indexOf("%2F")?"%2F":"/",n=e.split(t),a;n.pop();a=n.join(t);return a?a:"/"},strUpFirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},strUpFirstEach:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})},strUpInitial:function(e){return e.length?this.strUpFirst(e.toLowerCase()):e},json_to_query:function(e){if(typeof e!=="object"){return String()}return""+Object.entries(e).map(function(e){var t=e[0],n=e[1];return t+"="+encodeURIComponent(n)}).join("&")},json_to_string:function(e,t){var n="";for(var a in e){if(e.hasOwnProperty(a)){n+=a+":&nbsp;"+e[a]+(t?"<br>":"")}}return n},serialized_to_json:function(e){if(e.startsWith('"')||e.endsWith('"')){e=e.replace(/^"|"$/g,String())}var t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(var a=0;a<n.length;a++){var i=n[a].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return t},nice_number:function(e){return e.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},extactText:function(e){var t=e.contents().filter(function(){return this.nodeType==3});if(t&&t[0]){return t[0].nodeValue}else{return String()}},nice_size:function(e,t){var n=1e3,a=1024,i=!t||t&&!t.hasOwnProperty("decimal")||t.decimal===0?a:n,s=!t||t&&!t.hasOwnProperty("bits")||t.bits===0?1:8,r=!t||t&&!t.hasOwnProperty("round")||t.round===0?0:1,o=!t||t&&!t.hasOwnProperty("fixed")?2:t.fixed;e*=s;if(Math.abs(e)<n){return e+" "+theme_language("nice_size_b")+""}var l=s^1?"B":i===a?"I":String(),c=[theme_language("nice_size_k"+l+"B"),theme_language("nice_size_M"+l+"B"),theme_language("nice_size_G"+l+"B"),theme_language("nice_size_T"+l+"B"),theme_language("nice_size_P"+l+"B")],d=-1;do{e/=i;++d}while(Math.abs(e)>=n&&d<c.length-1);var f=e.toFixed(o);if(r){if(f>=5&&f<=100){f=Math.round(f/5)*5}else if(f>100&&f<=1e3){f=Math.round(f/50)*50}else if(f>1e3&&f<=1e4){f=Math.round(f/100)*100}else if(f>1e4&&f<=1e5){f=Math.round(f/250)*250}else if(f>1e5){f=Math.round(f/500)*500}}return f+" "+c[d]}};const core={error:{get:function(){return $(".container-fluid .panel-body [data-fatal-error-text]").html()},clean:function(){$(".container-fluid [data-fatal-error-text] ~ .btn-primary.btn-lg.page_footer_submit").remove();$(".container-fluid [data-header-left] .btn-group").empty()}},get_global_vars:function(e,t){var n=t?{}:[],a=window;for(var i=0;i<e.length;i++){for(var s in a){if(s.indexOf(e[i])==0)n[s]=a[s]}}return n},fnExtend:function(e,t){window[e]=function(e){return function(){e();t()}}(window[e])},linkSameOrigin:function(e){if(e.attr("href")&&(e.attr("href").match("^http:")||e.attr("href").match("^https:")||e.attr("href").match("^ftp:")||e.attr("href").match("^ftps:"))&&URI(e.attr("href")).hostname()!=v___location_hostname||e.attr("data-href")&&(e.attr("data-href").match("^http:")||e.attr("data-href").match("^https:")||e.attr("data-href").match("^ftp:")||e.attr("data-href").match("^ftps:"))&&URI(e.attr("data-href")).hostname()!=v___location_hostname){return 0}else{return 1}},moduleAvailable:function(e){var t=vars.available_modules;t=t?t:session.server.data("available-modules");if(session.server.data(e)!=undefined){return Test.true(session.server.data(e))}else if($.inArray(e,t)>-1){return true}else{return false}},curModuleFileQuery:function(e,t,n){return $('body[class*="'+e+'"]').length&&v___location_file==t&&(v___location_query&&v___location_query.indexOf(n)!==-1)},curModuleFile:function(e,t,n){var a=v___location_file==t;if(!t){if(typeof t==="undefined"){t=""}a=v___location_file===t||v___location_file==="index.cgi"}var i=$('body[class*="'+e+'"]').length;if(n){i=$("body").hasClass(e)}return i&&a},curModule:function(e,t){var n=$('body[class*="'+e+'"]').length;if(t){n=$("body").hasClass(e)}return n},moduleFile:function(e,t,n){if(e.includes("/")&&e.includes(".cgi")){var a=e.split("/"),i,s,r;a.filter(function(e,t){if(e.includes(".cgi")){i=t}});s=a[i-1];r=a[i];if(s&&s.includes(t)&&r&&r.includes(n)){return 1}}return 0},updateModuleData:function(e,t,n,a){$.ajax({type:"POST",url:v___location_prefix+e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var i=$(e).find("form.ui_form");$.each(n,function(e,t){var n=i.find('[name="'+e+'"]'),a=n.filter(":checked").val(),s=t==="+!"?+!parseInt(a):t;n.val(s)});setTimeout(function(){var e=$(i).serializeArray(),n=[];e.map(function(t,a){if(n.includes(t.name)){e.splice(a,1)}n.push(t.name)});e=Convert.json_to_query(Convert.serialized_to_json($.param(e)));$.ajax({type:"POST",url:v___location_prefix+t+(a?(t.includes(".cgi?")?"&":"?")+e:String()),data:a?false:e,dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}})},100)},error:function(){}})},getModuleData:function(e){return $.ajax({type:"POST",url:v___location_prefix+e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}})},setModuleData:function(e,t){this.getModuleData(e).then(function(e){return $(e).find("form.ui_form").serializeArray()}).done(function(e){var n={};$.each($(e),function(){n[this.name]=this.value}).promise().done(function(){$.each(t,function(e,t){var a=$('[name="'+t+'"]');a.val(n[t]);if(a.is("select")){a.find("[data-clear]").remove()}})})})}};const HTML={bottom_progress:function(e,t,n){return'<div data-progress-id="'+e+'" class="bottom_progress'+(n?" bottom_progress_horizontal":"")+'">'+(n?'<div class="bottom_progress_filename"></div><div class="bottom_progress_lane"></div>':"")+'<div class="bottom_progress_level '+t+'"></div><span class="bottom_progress_overlay">'+(n?"":"1%")+""+(n?'<span class="bottom_progress_data"></span><span class="bottom_progress_percent"></span>':"")+'</span><span class="fa fa-times-circle-o bottom_progress_cancel"></span></div>'},label:{textMaxLevels:function(e,t,n){var a="bg-",i=a+"semi-transparent",s=a+"warning",r=a+"danger",n=t.indexOf("°C")>-1,o=30,l=60,c=80,d=86,f=140,u=176,_=parseInt(settings_sysinfo_cpu_fans_base_rpm),g=_,p=_*2;t=parseInt(t);if(e==="temperature"){if(n){return t<=o?i:t>o&&t<=l?i:t>l&&t<=c?s:t>c?r:""}else{return t<=d?i:t>d&&t<=f?i:t>f&&t<=u?s:t>u?r:""}}else if(e==="rpm"){return t<=g?i:t>=g+1&&t<=p?s:r}}},template:{accordion:function(e,t,n,a){var i='<div class="panel-group panel-filter" id="'+e+'" role="tablist" aria-multiselectable="true">';for(var s=0;s<t.length;s++){var r=!$.isArray(a)||$.isEmptyObject(a)?s===0?1:0:!!a[s]?1:0,o=$.isEmptyObject(a)||!$.isEmptyObject(a)&&a.filter(function(e){return e===1}).length<=1,l=$.isArray(a)&&a[s]===2?1:0;connected_grouped=e.endsWith("_-grouped")?o?1:0:0;i+='<div class="panel panel-default">'+'<div class="panel-heading" aria-static="'+(l?"true":"false")+'" data-toggle="collapse" data-target="#'+e+"_c_"+s+'" role="tab" id="'+e+"_h_"+s+'">'+'<h4 class="panel-title"><a role="button" data-toggle="collapse" '+(connected_grouped?' data-parent="#'+e+'"':" ")+' href="#'+e+"_c_"+s+'" aria-static="'+(l?"true":"false")+'" aria-expanded="'+(r||l?"true":"false")+'" aria-controls="'+e+"_c_"+s+'">'+t[s]+"</a></h4>"+"</div>"+'<div id="'+e+"_c_"+s+'" class="panel-collapse collapse'+(r||l?" in":"")+'" aria-static="'+(l?"true":"false")+'" role="tabpanel" aria-labelledby="'+e+"_h_"+s+'">'+'<div class="panel-body inner">'+n[s]+"</div></div>"+"</div>"}i+="</div>";return i},page_content_preloader:function(e,t,n){return'<div class="container-fluid-loading '+(page.handle.content.offset()?"col-lg-10 col-lg-offset-1":"margined-top-15")+""+(t?" "+t+"":"")+'"><div class="panel-loading panel-default-loading'+(n?" panel-default-loading-hidden":"")+'"><div class="panel-heading-loading text-center"><button class="fa fa-fw fa-inverse fa-2x text-lighter favorites xcustom-favorites fa-star-o dummy"></button>&nbsp;<span>'+e+'</span></div><div class="panel-body-loading"><span class="cspinner"><span class="cspinner-icon light"></span></span></div></div></div>'},reauthenticate:function(e){var t=Test.strContains(session.server.data("webprefix"),"servers/link.cgi")?1:0;return'<div class="'+e+'">'+'<div class="'+e+'-container-center animated slideInDown">'+'<div class="'+e+'-header">'+'<div class="fa fa-times-thin fa-0_90x"></div>'+'<div class="'+e+'-header-icon">'+'<i class="fa fa-lock fa-lg"></i>'+"</div>"+'<div class="'+e+'-header-title">'+"<h3>"+theme_language("session_expired")+"</h3>"+"<small>"+theme_language("session_expired_details")+"</small>"+"</div>"+"</div>"+'<div class="panel">'+'<div class="panel-body">'+'<form action="'+(v___location_prefix+"/session_login.cgi")+'">'+'<div class="form-group hidden">'+'<label data-user for="user">'+theme_language("login_user")+"</label>"+'<input type="text" value="'+session.server.data("user")+'" name="user" class="form-control form-control-rea" required readonly>'+"</div>"+'<div class="form-group">'+'<label data-pass for="pass">'+theme_language("login_pass")+"</label>"+'<input autofocus type="password" placeholder="******************" name="pass" autocomplete="off" autocorrect="off" class="form-control form-control-rea">'+"</div>"+'<div class="form-group hidden" data-container-twofactor>'+'<label data-twofactor for="twofactor">'+theme_language("login_token")+"</label>"+'<input type="number" placeholder="123456" name="twofactor" autocomplete="off" autocorrect="off" class="form-control form-control-rea">'+"</div>"+"<div>"+'<input type="hidden" name="ajax" value="1">'+'<button data-submit class="btn btn-success pull-right"><i class="fa fa-fw fa-unlock"></i> '+theme_language("global_reauthenticate")+"</button>"+'<a data-nref class="btn btn-'+(t?"warning btn-block":"default")+'" href="'+v___location_prefix+'/"><i class="fa fa-fw fa-'+(t?"sign-out":"user-switch")+'"></i> '+(t?theme_language("global_reauthenticate"):theme_language("tooltip_switch_user"))+"</a>"+""+(t?'<a data-nref class="btn btn-default btn-block" onclick="javascript:session.reauthenticate.end()"><i class="fa fa-fw fa-arrow-circle-o-left"></i> '+theme_language("global_continue")+"</a>":"")+""+"</div>"+"</form>"+"</div>"+"</div>"+"</div>"+"</div>"}}};const load={loaded:[],bundle:function($scripts__,$css__,callBack__,callBackCalledNoEval__,opts){var execute_load=function($script,$css,callBack,callBackCalledNoEval,opts){var head=$("head"),initial_name=$script,opts_local={};if(!opts){opts={}}opts_local.sourceType="."+v___source_type;opts_local.cssPath=v___server_css_path;opts_local.jsPath=v___server_js_path;opts_local={...opts_local,...opts};callBack=typeof callBack=="object"?callBack:false;var css=(!$css?0:$css===1?$script:$css)+opts_local.sourceType+".css",js=$script+opts_local.sourceType+".js";if(!Test.strContains(initial_name,v___server_extensions_path)&&!Test.strContains(initial_name,v___server_js_path)){css=opts_local.cssPath+"/"+css;js=opts_local.jsPath+"/"+js}var processCallbacks=function(_callBack,_callBackCalledNoEval){if(_callBack&&!_callBackCalledNoEval){$.each(_callBack,function(i2,v2){try{eval(v2)}catch(e){var attemp=0;var check_loaded_func=setInterval(function(){attemp++;if(attemp>1e3){clearInterval(check_loaded_func)}try{eval(v2);clearInterval(check_loaded_func)}catch(e){}},10)}})}else if(_callBack&&_callBackCalledNoEval&&_callBackCalledNoEval!==2&&_callBackCalledNoEval!==3){$.each(_callBack,function(e,t){t.call()})}else if(_callBack&&_callBackCalledNoEval&&(_callBackCalledNoEval===2||_callBackCalledNoEval===3)){$.each(_callBack,function(e,t){if(_callBackCalledNoEval===3){window[e].call(null,t)}else{window[e].apply(null,t)}})}};if(!load.loaded.includes(initial_name)){o___gotten_scripts.push(js);load.loaded.push(initial_name);var thecsslink='<link href="'+(css+"?"+theme.version(true))+'" type="text/css" rel="stylesheet">';$css&&(css.includes(v___server_extensions_path)?head.append(thecsslink):head.find('link[rel="stylesheet"]:first').before(thecsslink));$.getScript(js+"?"+theme.version(true),function(){processCallbacks(callBack,callBackCalledNoEval)}).fail(function(e){if(e.statusText!=="canceled"&&e.statusText!=="abort"){connection_error(e,1)}})}else if(callBack||callBackCalledNoEval){processCallbacks(callBack,callBackCalledNoEval)}};if($.isArray($scripts__)){$scripts__.forEach(function(e,t,n){if(Object.is(n.length-1,t)){execute_load(e,$css__,callBack__,callBackCalledNoEval__,opts)}else{execute_load(e,$css__,0,0,opts)}})}else{execute_load($scripts__,$css__,callBack__,callBackCalledNoEval__,opts)}}};const page={handle:{content:{offset:function(e){var t=core.curModuleFile("mailbox","",1)||core.curModuleFile("mailbox","index.cgi",1);is_offset=core.curModuleFileQuery("logviewer","view_log.cgi","view=")||core.curModuleFileQuery("syslog","save_log.cgi","view=")||core.curModuleFile("virtual-server","edit_html.cgi")||core.curModuleFile("mysql","view_table.cgi")||core.curModuleFile("postgresql","view_table.cgi")||t||core.curModule(v___module_file_manager)||v___page_hasEditor||!settings_enable_container_offset?0:1;if(t&&settings_mail_ui&&e){if(!$(".container-fluid > .panel-mail").length){return}}if(e){var n=$(".container-fluid");if(page.handle.content.offset()){n.addClass("col-lg-10 col-lg-offset-1").removeClass("margined-top-15")}else{n.removeClass("col-lg-10 col-lg-offset-1").addClass("margined-top-15")}}else{return is_offset}},preloader:{processing:function(){return $(".container-fluid-loading").length},hide:function(){if(page.handle.content.preloader.processing()){page.handle.content.preloader.show()}},show:function(e,t,n){var a=this,i=$("#content"),s=$(".container-fluid"),r=$(".container-fluid-loading"),o=t?t:$("span[data-main_title]").text(),l="container-fluid-loading-persistent",c=e===-2?l:0,d=HTML.template.page_content_preloader(o,c,n);if(e!==-2&&r.length&&r.hasClass(l)){r.removeClass(l);return}if(e===-1){return i.hasClass("progressing")}if(r.length){r.remove();s.removeClass("invisible");i.removeClass("progressing progressing-preloading");setTimeout(function(){if(progress.status()){progress.end()}},10)}else{if(!core.error.get()){i.addClass("progressing progressing-preloading").prepend(d);s.addClass("invisible")}}if(e&&e!==-2){setTimeout(function(){a.preloader()},e)}}}}},render:{content:{filter:{init:function(e,t){var n=this,a="container-fluid",i=""+a+" .nav.nav-tabs",s="dataTables_filter",r=$(".__page ."+s+""),o=$(".__page .panel-filter"),l=".panel-filter .panel.panel-default",c="dataTable-mirror",d="filter_mirror_clear",f="filter-value",u="btn-filter-top-right",_="btn-accordion-filter",g="btn-toggle-accordions",p=$("body");if(r.length||o.length){setTimeout(function(){if(!$("."+u+"").length&&!$("."+_+"").length){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend('<a tabindex="0" class="btn btn-link text-lighter btn-filter-gl btn-'+(e?"accordion-filter":"filter-top-right")+' text-decoration-none pull-left" data-container="body" data-placement="bottom" data-toggle="tooltip" data-nref>'+"<label>"+'&nbsp;&nbsp;<span class="fa fa-times-circle-o vertical-align-middle '+d+' text-lighter"></span>'+'<input type="text" class="'+c+'" placeholder="'+theme_language("filter_content")+'">'+"</label>"+'<i class="fa fa-filter'+(e?"2":"")+'"></i>'+"</a>"+(e?'<a class="btn btn-link text-lighter '+g+" text-decoration-none pull-left"+(o.find(".panel").length===1?" hidden":"")+'" data-placement="left" data-toggle="tooltip" data-skip data-nref><i class="fa fa-toggle-switch-off fa-1_25x"></i></a>':"")+"")}$(".btn-filter-gl").data("title",theme_language("datatable_filter")).attr("aria-label",theme_language("datatable_filter"));$("."+g).data("title",theme_language("toggle_accordions")).attr("aria-label",theme_language("toggle_accordions"));$(".btn-group").tooltip({selector:'a[data-toggle="tooltip"][data-skip]',container:"body",trigger:"hover",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});n.clear();if($("."+i+"").length){if(e){p.on("hide.bs.tab",'a[data-toggle="tab"]',function(e){n.clear()})}p.on("shown.bs.tab",'a[data-toggle="tab"]',function(e){var t=$(e.target).parent(".active");if(t.data(f)){$("."+c+"").val(t.data(f)).trigger("input")}else{$("."+c+"").val("").trigger("input")}n.visibility(u,_,g,i)})}p.undelegate(l,"shown.bs.collapse.config hidden.bs.collapse.config");p.on("shown.bs.collapse.config hidden.bs.collapse.config",l,function(e){var t=$("."+a+" .collapsing").length;if(t){return}setTimeout(function(){var e=$("."+a).find("."+g).find("i");if(o.find(".panel-collapse").length===o.find(".panel-collapse.in").length){e.addClass("fa-toggle-switch text-light")}else{e.removeClass("fa-toggle-switch text-light")}},0)});var t=$("."+g+"");if(!e){var r=$("."+s+"");r.hide()}else{$(o).find('a[data-toggle="collapse"]').on("click",function(e){$.trim($("."+c).val()).length&&page.render.content.filter.clear();e.originalEvent&&$("."+g+"").find("i").removeClass("fa-toggle-switch text-light")})}$("."+d+"").mousedown(function(e){if($(e.target).is("."+d+"")){n.clear()}});$("."+u+", ."+_+"").click(function(e){$(this).addClass("opened");!$(e.target).is("input")&&$(this).find("label").slideToggle(0,function(){$(this).find("input").focus()})});t.click(function(e){e.stopImmediatePropagation();var t="fa-toggle-switch",a=$(this).find(".fa"),i=$(this).find("."+t).length?1:0,s=$(".__page .panel-filter:visible");if(i===0){if(s.find(".panel-collapse.in").length===s.find(".panel-collapse").length){}s.find(".panel-collapse:not(.in):not(.collapsing)").filter(function(){$(this).removeData("bs.collapse").collapse({parent:true,toggle:false}).collapse("show").removeData("bs.collapse")})}else{s.find(".panel-collapse.in:not(.collapsing)").filter(function(){$(this).attr("aria-static")!=="true"&&$(this).collapse("hide")})}a.toggleClass(t+" text-light");if(e.originalEvent!==undefined&&$("."+_+" input").val().length){n.clear()}});function h(n){var a=n.val(),r=$(".__page .panel-filter:visible");if(!e){var o="."+s+" input";if($("."+i+"").length){$(".nav-tabs li.active").data(f,a);$(".active "+o).val(a).trigger("input")}else{$(o).val(a).trigger("input")}}else{if(a){$.support.transition&&($.support.transition=false);t.find(".fa-toggle-switch-off:not(.fa-toggle-switch)").trigger("click");r.find(".panel tr:not([data-empty-row]):not(.hidden-skip)").addClass("hidden-forged");var c=r.find('.panel tbody tr:contains("'+a+'")');c.removeClass("hidden-forged");$.each($(l=" .hidden-dependent-skip"),function(e){if($(this).hasClass("hidden-forged")){$(this).nextAll(".hidden-skip").addClass("hidden-forged")}else{$(this).nextAll(".hidden-skip").removeClass("hidden-forged")}});var d=$(".__page .panel-filter:visible");$.each(d.find(".panel"),function(){var e=$(this).find("tr").first().find("td").length;rows=$(this).find("tbody").find("tr:not([data-empty-row])"),hidden_rows=$(this).find("tbody tr:not([data-empty-row]):hidden");var t=$(this).find("tbody tr[data-empty-row]");if(rows.length===hidden_rows.length){!t.length?$(this).find("tbody").append('<tr data-empty-row colspan="'+e+'"><td class="text-center">'+theme_language("filter_content_no_matches_query").replace("%str","<var data-query-str>"+a+"</var>")+"</td></tr>"):$(this).find("tbody").find("var[data-query-str]").text(a)}else{t.remove()}})}else{t.find(".fa-toggle-switch").trigger("click");r.find(".panel tr").removeClass("hidden-forged");r.find(".panel tr[data-empty-row]").remove();!$.support.transition&&($.support.transition={end:"webkitTransitionEnd"})}}var g="."+u+" span, ."+_+" span",p="."+u+" i, ."+_+" i";if($.trim(a).length>0){$(g).removeClass("text-lighter");$(p).addClass("text-danger")}else{$(g).addClass("text-lighter");$(p).removeClass("text-danger")}}var v;var m=200;$("."+c+"").keydown(function(e){var t=e.originalEvent!==undefined?m:0;if(e.keyCode==76&&e.ctrlKey||e.keyCode==27){e.preventDefault();e.stopPropagation();if(t){setTimeout(function(){n.clear()},t)}else{n.clear()}}else{t&&clearTimeout(v)}}).on("input keyup",function(e){var t=$(this),n=e.originalEvent!==undefined?m:0;$(".btn-filter-gl").tooltip("hide");if(n){clearTimeout(v);v=setTimeout(function(){h(t)},n)}else{h(t)}});$("."+u+" input, ."+_+" input").blur(function(e){$(this).parent("label").slideToggle(0);$(this).closest(".opened").removeClass("opened")});n.visibility(u,_,g,i)},0)}},visibility:function(e,t,n,a){var i=$("."+e+", ."+t+", ."+n+"");if($("."+a+"").length&&($(".active .dataTables_filter").length||$(".active #conf-_-gr").length)||!$("."+a+"").length&&($(".dataTables_filter").length||$("#conf-_-gr").length)){i.show()}else{i.hide()}},clear:function(){var e="btn-filter-top-right",t="dataTable-mirror",n="btn-accordion-filter",a=$("."+e+" ."+t+", ."+n+" ."+t+""),i=$("."+e+" input, ."+n+" input");a.val("").trigger("input");i.is(":visible")&&i.trigger("blur");$(".panel-filter").find("tr[data-empty-row]").remove();!$.support.transition&&($.support.transition={end:"webkitTransitionEnd"})}}}},branding:{selector:function(){return $("body").find(".branding-backdrop")},status:function(){return this.selector().length},process:function(e){var t=this,n=settings_product_branding_show_time_min_privileged,a=n>=1&&n<=10?n*1e3:1e3,i=settings_product_branding_show_time_max_privileged,s=i>=1&&i<=120?i*1e3:2e3,r=a/10,o="keydown.brand click.brand",l=function(){clearInterval(t.tiktok);t._stopped=1;vars.page.shown=1;var e=function(){setTimeout(function(){t.selector().off(o).remove();!page.load.happening()&&theme_title_generate();!page.load.happening()&&progress.end()},50)};vars.page.locked=0;e()};if(t._stopped){return}if(e){if(t._running<a/r){clearInterval(t._tiktok);clearTimeout(t._exec);setTimeout(l,(a/r-t._running)*r);return}else{clearInterval(t._tiktok);clearTimeout(t._exec);l()}}else{vars.page.locked=1;if(!t._exec){t._exec=setTimeout(function(){l();clearInterval(t._tiktok)},s)}if(!t._running){t._running=0;t._tiktok=setInterval(function(){t._running++},r);t.selector().focus();t.selector().on(o,function(e){var n=e.keyCode?e.keyCode:e.which;if(t._running<a/r){return}if(n===27||e.type==="click"){if(typeof t.close!="undefined"){t.close+=1}else{t.close=2}setTimeout(function(){t.close=1},vars.event.double_click_delay);if(t.close>2){clearInterval(t._tiktok);clearTimeout(t._exec);l()}}})}}}},load:{happening:function(){var e=vars.pjax.progressing,t=vars.ajax.progressing;if(e||t){return 1}else{return 0}}}};const pjax={clear:{modules:function(e){if(v___module==="csf"&&typeof __c_____undel==="function"){__c_____undel(e.url)}if(v___module===v___module_file_manager&&typeof __f_____undel==="function"&&typeof jsPanel==="object"&&typeof $v__fm__container_fluid==="string"){if(!Test.strContains(e.url,v___module_file_manager+"/config.cgi")&&!Test.strContains(e.url,v___module_file_manager+"/index.cgi")&&!Test.strContains(e.url,"save_config.cgi")){__f_____undel()}}if((v___module==="mysql"||v___module==="postgresql")&&typeof __sql_____undel==="function"){__sql_____undel()}if(v___module==="syslog"||v___module==="logviewer"){typeof refreshTimer==="number"&&clearInterval(refreshTimer)}}}};const progress_percent={body:"body",control:function(e,t,n,a){var i=this,s="bottom_progress",r="."+s+"_level",o="."+s+"_cancel",l=100,c="bottom_progress_horizontal";if(!$(i.body).find("."+s+"es").length){$(i.body).append('<div class="'+s+'es"></div>')}var d=$(i.body).find("."+s+"es");if(!d.find('div[data-progress-id="'+e+'"]').length){d.append(HTML.bottom_progress(e,t,a));if(a||d.find("."+c+"").length){d=$(i.body).find("."+s+"es");var f=d.find("."+s+':not(".'+c+'")').addClass("no-animation").detach();d.prepend(f)}d.find('div[data-progress-id="'+e+'"]').find(o).one("click",function(){var e=$(this).parent(),t=e.data("progress-id");e.find(r).removeClass("success").addClass("danger");$(this).remove();setTimeout(function(){e.remove();if(d.find("div[data-progress-id]").length===0){d.remove()}},10*l);window["progress_id_ref_"+t].abort();if(a){window["progress_id_ref_"+t+"_tracker"].abort()}})}var u=d.find('div[data-progress-id="'+e+'"]');u.find(r).css("height",n+"%");if(a){var _=u.find("."+s+"_overlay"),g=".bottom_progress_";u.find(g+"filename").html('<i class="fa fa-lg fa-fw fa-upload-cloud"></i>'+(!a[0]?"<span class='bg-filter-blur3-grayscale100-opacity35-contrast1-2-brightness0-9'>unknown-file-name</span>":Convert.htmlEscape(Convert.textTruncate(Convert.htmlDecode(a[0]),24)))).attr("title",Convert.htmlEscape(a[0]));_.find(g+"data").text($(Convert.htmlDecode(a[1])).text());_.find(g+"percent").text(a[2]+"%")}else{u.find("."+s+"_overlay").text(n+"%")}if(n==l){u.find(o).remove();setTimeout(function(){u.remove();if(d.find("div[data-progress-id]").length===0){d.remove()}},10*l)}}};const progress={target:"body",element:"top-aprogress",blocked:function(){return vars.page.locked},status:function(){return!settings_hide_top_loader},start:function(){if(this.status()&&!$(this.target).find("."+this.element+"").length){!this.blocked()&&vars.allow_ui_features&&$(this.target).append('<div class="'+this.element+'"></div>')}},end:function(){!this.blocked()&&!page.load.happening()&&$(this.target).find("."+this.element+"").remove()}};const session={reauthenticate:{start:function(){var e=this,t=e.target;var n=0;!$("."+t).length&&$.ajax({type:"GET",url:v___location_prefix+"/index.cgi",data:false,dataType:"text",success:function(a){var i="container session_login",s="form-signin-banner",r=Test.strContains(a,i+" pam_");if(!Test.strContains(a,s)){var o=e.lock_targets,l=e.lock_type,c='<input type="hidden" name="ajax" value="1">',d=$(a).find("._logo_welcome > img").attr("src"),f=function(){return $("."+t).find('input:not([name="user"]):not([name="twofactor"])')};$(o).addClass(l);var u=$("body").append(HTML.template.reauthenticate(t));u.find("."+t+"").find(".fa-times-thin").one("click",function(){session.reauthenticate.end()});plugins.navigation.load.stop();plugins.navigation.detect();plugins.navigation.switch.reset();despinnerfy_buttons();if(session.server.data("terminal")==1){plugins.terminal.close()}else if(session.server.data("shell")==1){plugins.shell.unlock();plugins.shell.close()}if(d){$("."+t).append("<style>.session-reauthenticate-container-center:before{background-image: url("+d+");}</style>")}setTimeout(function(){f().trigger("focus")},1e3);$("."+t).find("form").on("submit",function(e){e.preventDefault();e.stopImmediatePropagation();if(r){var i=$("."+t).find('form input[name="user"]');i.attr("name","answer").val(session.server.data("user"))}var s=$(a).find("form").append(c),o=s.attr("action"),l=$("."+t).find("form").serialize(),d=$("."+t).find("[data-submit]"),u=$("."+t+"-header-icon i"),_=$("."+t+"-header-title h3"),g=$("."+t+"-header-title small"),p='input[name="twofactor"]';if(!r){if($("."+t).find(p).is(":visible")){n++}l+="&save=1&failed_twofactor_attempt="+n+""}if(d.hasClass("disabled")){return}g.text(theme_language("signing_in")+"").removeClass("text-danger").addClass("loading-dots");d.addClass("btn-grey disabled").removeClass("btn-success");function h(e,n,a,i,s){var r=function(e){if(!e.endsWith(".")){e=e+"."}e=e.replace(/\n/gm,"");return e};if(n){var o=theme_language(n,1)==="session_failed"?theme_language("session_failed_password"):n;o=r(o);g.text(o).addClass("text-danger").removeClass("loading-dots");d.removeClass("btn-grey disabled").addClass("btn-success");var l=s,c=l.length?$("."+t).find(p):f();c.addClass("faa-horizontal animated");c[0].focus();setTimeout(function(){c.removeClass("faa-horizontal animated");c[0].select()},1e3)}else if(s.length){$("."+t).find("[data-container-twofactor]").removeClass("hidden");var h=r(theme_language("login_message_2fa"));g.text(h).removeClass("loading-dots");d.removeClass("btn-grey disabled").addClass("btn-success");setTimeout(function(){$("."+t).find(p).trigger("focus")})}else if(e&&!a){g.text(theme_language("signing_success")).removeClass("text-danger").removeClass("loading-dots").addClass("text-success");u.removeClass("fa-lock").addClass("fa-unlock fa-rotate-180 fa-flip-horizontal");_.text(theme_language("session_unlocked"));session.alive=1;setTimeout(function(){session.reauthenticate.end()},1800)}}$.ajax({type:"GET",url:o,data:l,dataType:"text",success:function(e){var n=$(e).find(".switch-toggle").text().length,a=$(e).find(".alert span").text(),i=$(e).find(p),s=i.length,l=a.length;if(r){var d=$(e).find("form").append(c),f=d.find('input[name="answer"]').val($("."+t).find('input[type="password"]').val()),u=d.serialize();$.ajax({type:"GET",url:o,data:u,dataType:"text",success:function(e){n=$(e).find(".switch-toggle").text().length;a=$(e).find(".alert span").text();l=a.length;h(n,a,l,e)}})}else if(s){h(n,a,l,e,i)}else{h(n,a,l,e,i)}},error:function(){d.removeClass("btn-grey disabled").addClass("btn-success");g.text(theme_language("connection_error")).addClass("text-danger").addClass("loading-dots")}})})}}})},end:function(){session.alive=1;$("."+this.target).remove();$(this.lock_targets).removeClass(this.lock_type)},target:"session-reauthenticate",lock_targets:"aside, aside .navigation, .form-control.sidebar-search, .jsPanel, #jsPanel-replacement-container, .popover, .container-fluid, .right-side-tabs, .right-side-tabs-toggler",lock_type:"pointer-events-none bg-filter-blur3-grayscale100-opacity35-contrast1-2-brightness0-9 disabled"},status:function(e){if(e&&Test.strContains(e,"container session_login")){this.alive=0;return 0}else{return 1}},server:{data:function(e,t,n){var a=$("html"),i=$("body"),s="data-"+e,r=e.replace("data-","");if(typeof n!="undefined"){if(e.startsWith("data-")){a.removeAttr(e);a.removeData(r)}else{a.removeAttr(s);a.removeData(e)}if(e==="data-uri"){i.removeAttr(e)}}else if(typeof t=="undefined"){if(e.startsWith("data-")){return a.attr(e)}else{return a.data(e)}}else{if(e.startsWith("data-")){a.attr(e,t).data(r,t)}else{a.data(e,t).attr(s)}if(e==="data-uri"||e==="data-module"){i.attr(e,t);if(e==="data-module"){i.removeClass().addClass(t)}}}}},alive:1};const Test={true:function(e){return!/^(false|0)$/i.test(e)&&!!e},false:function(e){return/^(false|0)$/i.test(e)||!e},numeric:function(e){return Number(parseFloat(e))==e},string:function(e){return"string"===typeof e||e instanceof String?1:0},strContains:function(e,t){return"string"!==typeof e?!1:!!~e.indexOf(t)},str_contains_multi:function(e,t){if(e){for(var n in t){var a=t[n];if(e.toString().indexOf(a)>-1){return true}}}return false},str_contains_multi_regex:function(e,t,n){if(e){for(var a in n){var i=n[a],s=t.toString();s=new RegExp(s.replace("::M::",i));if(s.test(e)){return true}}}return false},arrContains:function(e,t,n){typeof n=="undefined"?n=0:!1;e=$.inArray(t,e);return n?e:-1<e?1:0},arrIntersect:function(e,t){var n=[];$.each(e,function(e,a){if(t.match(new RegExp(a,"gi"))){n.push(a)}});return!$.isEmptyObject(n)},json:function(e){var t=true;try{t=$.parseJSON(e)}catch(e){t=false}return t},input:{radio:function(e,t){var n=t?":visible":"",a=$("body").find('[name="'+e+'"]:checked'+n+"");return a.length?a.val():-1}},html:function(e){if($.trim(e).startsWith("{")||$.trim(e).endsWith("}")){return false}var t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.childNodes).some(function(e){return e.nodeType===1})},scrolledIntoView:function(e){var t=$(e),n=$(window),a=n.scrollTop(),i=a+n.height(),s=t.offset(),r=s?s.top:0,o=r+t.height();return o<=i&&r>=a},occurrences:function(e,t,n){e+="";t+="";if(t.length<=0)return e.length+1;var a=0,i=0,s=n?1:t.length;while(true){i=e.indexOf(t,i);if(i>=0){++a;i+=s}else break}return a},editing:function(){return $("input:focus").length||$("textarea:focus").length||$('[contenteditable="true"]:focus').length||$('[contenteditable="true"]:focus').length}};const theme={api:{version:function(e,t){return theme.version(e,t)},page:{refresh:function(){return plugins.pjax.page.refresh()},refreshForce:function(){return plugins.pjax.page.refresh(true,true)},headers:{getAll:function(){return plugins.pjax.headers.getAll()}}},event:{on:{page:{error:function(e,t){$(document).on("pjax:error",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load error event",e)}})},beforeSend:function(e,t){$(document).on("ready pjax:beforeSend",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load beforeSend event",e)}})},start:function(e,t){$(document).on("pjax:start",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load start event",e)}})},complete:function(e,t){$(document).on("pjax:complete",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load complete event",e)}})},success:function(e,t){$(document).on("pjax:success",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load success event",e)}})},beforeReplace:function(e,t){$(document).on("pjax:beforeReplace",function(n,a,i){try{e.call(this,t,n,a,i)}catch(e){console.warn("Error executing custom function on page load beforeReplace content event",e)}})},afterReplace:function(e,t){$(document).on(vars.h.event.page.end,function(n,a){try{e.call(this,t,n,a)}catch(e){console.warn("Error executing custom function on page afterReplace content event",e)}})},popstate:function(e,t){$(document).on("pjax:popstate",function(n){try{e.call(this,t,n)}catch(e){console.warn("Error executing custom function on page popstate event",e)}})}}},one:{document:{init:null,ready:null},page:{reset:function(){return plugins.pjax.page.events.reset()},beforeSend:function(e){return plugins.pjax.page.events.beforeSend.set(e)},start:function(e){return plugins.pjax.page.events.start.set(e)},complete:function(e){return plugins.pjax.page.events.complete.set(e)},success:function(e){return plugins.pjax.page.events.success.set(e)},beforeReplace:function(e){return plugins.pjax.page.events.beforeReplace.set(e)},afterReplace:function(e){return plugins.pjax.page.events.end.set(e)}}}}},errors:{onload:function(){var e=$(".container-fluid > .panel > .panel-body > [data-fatal-error-text]").length||$("body.err-body > .err-head").length;return e}},download:function(e,t,n,a){var i=true;if(a===undefined||a==1||a===true){i=false}if(e&&t){t=typeof t=="string"?t:$.param(t);var s=document.createElement("form");s.method=n||"POST";s.action=e;if(i){s.target="_blank"}$.each(t.split("&"),function(){var e=this.split("=");if(e[1]){try{e[1]=Convert.uriDecodeComponent(e[1])}catch(e){}}var t=document.createElement("input");t.type="hidden";t.name=e[0];t.value=e[1];s.appendChild(t)});$(s).appendTo("body").submit().remove()}},veiled:function(e,t,n){var a=$(t||".container-fluid, .container-fluid-loading, .popover, .tooltip, .jsPanel, #jsPanel-replacement-container, aside, .mobile-menu-toggler, #right-side-tabs, .right-side-tabs-toggler"),i=n||"pointer-events-none bg-filter-blur-grayscale-opacity50";if(e===-1){return a.hasClass(i)}if(e){a.addClass(i)}else{a.removeClass(i)}},update:function(e,t,n){var a=e===1?"-release":"-beta",i=n?"&xhr-update-version="+n+"":String();theme.veiled(1);set_onbeforeunload_status(1,0);plugins.messenger.post('<i class="fa fa-lg fa-fw fa-git-pull"></i>'+theme_language("git_patch_initiated")+" "+theme_language("global_please_wait")+'&nbsp;&nbsp;&nbsp;<span class="cspinner"><span class="cspinner-icon white smallest margined-top-4"></span></span>',1800,"info","themeUpgrade",0);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-update=1&xhr-update-type="+a+"&xhr-update-force="+t+""+i,data:false,dataType:"json",success:function(e){if(e[0]&&e[0].success){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-git-pull"></i>'+e[0].success,4,"success","themeUpgrade");plugins.slider.notifications.dismiss("authentic_remote_version");set_server_theme_temp_data("goto",v___location_prefix+"/sysinfo.cgi");setTimeout(function(){theme_reload()},2e3)}else if(e[0]&&e[0].no_connection){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-unplugged"></i>'+e[0].no_connection,40,"warning","themeUpgrade");theme.veiled(0)}else if(e[0]&&e[0].no_git){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-git-pull"></i>'+e[0].no_git,20,"warning","themeUpgrade");theme.veiled(0)}else if(e[0]&&e[0].incompatible){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>'+e[0].incompatible,120,"error","themeUpgrade");theme.veiled(0)}else{plugins.messenger.post('<i class="fa fa-lg fa-fw fa-git-pull"></i>'+theme_language("git_patch_update"),20,"error","themeUpgrade");theme.veiled(0)}},error:function(e){session.status(e.responseText);plugins.messenger.post('<i class="fa fa-lg fa-fw fa-git-pull"></i>'+theme_language("git_patch_update"),20,"error","themeUpgrade");theme.veiled(0)},complete:function(e){set_onbeforeunload_status(0,0)}})},update_message:function(){var e="theme_update_refresh";if(!theme_message_exists(e)){var t=function(){progress.start();vars.cache.theme_updating=true;theme.veiled(true,false,"bg-filter-grayscale-opacity50");$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1",data:false,dataType:"text",complete:function(){location.reload()}})};plugins.messenger.post({id:e,class:"theme-refresh-to-update",position:"bottomLeft",timeout:false,close:false,message:theme_language("theme_update_available"),icon:"exclamation-circle",buttons:plugins.messenger.toast.construct.button(theme_language("filemanager_context_refresh").toUpperCase(),t),layout:1})}},restart_message:function(e){var t=0,n=0;if(e&&e.toString().includes("systemctl")){e+=" restart webmin";t=4500}else{e+="/restart"}var a="webmin_restart_notice",i=function(){return $("."+a+"").find(".bootbox-body")};if(i().length){return}var s=bootbox.alert({message:"<h4>"+"<i class='fa fa-fw fa-exclamation-triangle'></i>&nbsp;&nbsp;"+theme_language("global_warning")+"!</h4>"+theme_language("webmin_requires_restart").replace("$1",e),className:""+a+" bootbox-centered font-medium warning"});s.init(function(){var e=i(),a="data-p-restart",r="data-p-cancel";e.append("<br><br>"+"<div class='btn btn-group'>"+"<button "+a+" class='btn btn-info'>"+"<i class='fa fa-fw fa-reload'></i>&nbsp;&nbsp;"+theme_language("webmin_requires_restart_yes")+"</button>"+"<button "+r+" class='btn btn-default'>"+"<i class='fa fa-fw fa-times-circle-o'></i>&nbsp;"+theme_language("webmin_requires_restart_no")+"</button>"+"</div>");e=i();var o=e.find("["+a+"]"),l=e.find("["+r+"]");o.one("click",function(){n=1;e.append(theme_countdown_animated(false,7));theme_countdown_animated(e,7);progress.start();spinnerfy_buttons(o);l.off("click").addClass("pointer-events-none");despinnerfy_buttons=function(){};vars.page.locked=1;$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=cmd&action=restart",data:false,dataType:"text",complete:function(){setTimeout(function(){location.reload()},t)}})});l.one("click",function(){vars.cache.norestart=true;s.modal("hide")})});s.on("escape.close.bb",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();n&&theme.veiled(1)})},version:function(e,t){ver=session.server.data("theme-version-data");if(!ver){return String()}ver=Convert.uriDecodeComponent(ver);if(!ver.startsWith("{")||!ver.endsWith("}")){console.warn("Error parsing theme version data object");return"19.99"}ver=JSON.parse(ver);!theme.version.current&&(theme.version.current=ver.versionfull.toString());if(e){return ver.timestamped.toString()}if(t){return ver.versionfull.toString()}return ver.version.toString()},visibility:{set:function(e){var t=this;if(!t.calling&&settings_sysinfo_real_time_status!==2){if(e===true){typeof stats==="object"&&stats.general.enable()}else{typeof stats==="object"&&stats.general.disable()}t.calling=1;setTimeout(function(){t.calling=0},1)}vars.events.keypressed.meta=false;vars.events.keypressed.ctrl=false;vars.events.keypressed.shift=false;vars.events.keypressed.alt=false},get:function(){return document.hasFocus()}},config:{_:{form:{tconfig:function(){return $('body[data-uri*="tconfig.cgi"] form[action*="tconfig.cgi"]#settings_')}},funcs:{event:function(e){var t=e==="reset"?"evttcrs":"";return t},dependent_radios:function(e,t,n,a){var i=theme.config._.funcs.event("reset");if(!a){a=theme.config._.form.tconfig()}var s=function(e,t,n,a){var i=a.find('input[name="'+e+'"]:checked'),s=t,r=i.val()=="true"||parseInt(i.val())>0?true:false,o="disabled pointer-events-none";if(n){r=!r}$.each(s,function(e,t){a.find('[name="'+t+'"]:not(a)').toggleClass(""+o+" opacity-0_6",r);a.find('[name="'+t+'"]').parent(".awradio").toggleClass(o,r)})};a.find('input[name="'+e+'"]').on("change "+i+"",function(){s(e,t,n,a)}).trigger("change")}}},current:{_data:{},set:function(){this._data=core.get_global_vars(["config_portable","settings"])},get:function(){return this._data},reset:function(){var e=theme.config._.form.tconfig(),t=e[0],n=this.get();if(t){var a=t.elements,i=theme.config._.funcs.event("reset");for(var s=0,r;r=a[s++];){if(typeof n[r.name]!=="undefined"){window[r.name]=n[r.name];if(r.type==="radio"){e.find('[name="'+r.name+'"][value="'+n[r.name]+'"]').prop("checked",true).trigger(i)}else{e.find('[name="'+r.name+'"]').val(n[r.name]).trigger(i)}}}theme_config_controls(0);set_onbeforeunload_status(0,0)}}},format:function(e,t){var n;if(t=="true"||t=="false"){if(t=="true"){n=true}else{if(t=="false"){n=false}}}else{n=t}var a=Test.numeric(n)?n&&n.length>16?n:parseFloat(n):n;window[e]=a},apply:function(e,t){var n=this;if(!e){e=n._.form.tconfig()}$.each($(e.serializeArray()),function(e,t){if(t.name.endsWith("_user")||!t.name.startsWith("settings_")&&!t.name.startsWith("config_portable")){return true}n.format(t.name,t.value)}).promise().done(function(){if(t){n.save()}})},save:function(){var e=core.get_global_vars(["config_portable","settings"]);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-manage-config=1&save=1&"+Convert.json_to_query(e),dataType:"text",success:function(e){if(!session.status(e)){return}},error:function(){}});this.current.set()},events:function(e){var t=this,n=t._.funcs.event("reset");if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"tconfig.cgi"){var a=this._.form.tconfig(),i=a.find("select, input"),s="body";t.apply();i.on("input",function(e){t.format($(this).attr("name"),$(this).val());if(e.originalEvent!==undefined){theme_config_controls(1)}});var r="resize.cnff";$(window).off(r);$(window).on(r,function(e){e.preventDefault();var n=t._.form.tconfig(),a=n.find(".ui_form_end_buttons"),i=a.length;if(!i){$(this).off()}else{var s=n.find('input[name="settings_leftmenu_width"]');$(".mobile-menu-toggler:visible").length?s.prop("disabled",true):s.prop("disabled",false);var r='input[name="settings_side_slider_fixed"]',o=settings_navigation_always_collapse||window.matchMedia("(max-width: 1365px)").matches?true:false,l=n.find('input[name="settings_side_slider_enabled"]:checked').val()!="false";if(o&&!$.browser.mobile){n.find('input[name="settings_side_slider_fixed"][value="false"]').trigger("click")}l&&n.find(r).prop("disabled",o)}}).trigger(r);(function(){var e=a.find("#atrestore:not(.disabled)");$(s).undelegate(e,"click");$(e).off("click.confirm");$(e).on("click",function(){var e=get_onbeforeunload_status(),t=2500;set_onbeforeunload_status(0);if(e){setTimeout(function(){set_onbeforeunload_status(e)},t)}});$(e).confirmation({classNameRemove:"btn-default"},function(){$(this).off();var e=$(this);if(!e.hasClass("btn-inverse")){setTimeout(function(){spinnerfy_buttons(e,[1.5,-33,"small",false]);$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-settings=1&restore=1",success:function(e){if(!session.status(e)){return}theme_reload()},error:function(t){e.addClass("btn-danger").removeClass("btn-default btn-inverse opacity-0_5")}})},0)}})})();(function(){var e=a.find('input[name="settings_sysinfo_theme_updates"]').first().parents("td").parent("tr");if(e.length){var t=theme.version(),n="tmp_spinner_theme_version",i="data-theme-version-container",s="data-theme-versions",r="data-theme-stable-version",o=e.find("td").first(),l=o.find(".smaller"),c=e.next("tr").find("td").first().find("b");l.append(' <span class="text-nowrap smaller text-normal">(<span class="smaller text-normal" data-text-installed>'+theme_language("global_installed_version").toLowerCase()+"</span> <em "+r+" "+i+">"+t+'</em><span class="hidden" '+s+"></span>)</span>"+theme_spinner_small("in-btn-md "+n+""," ","width:10px; height:10px; margin-left: 5px;"));$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_latest_version=1",data:false,dataType:"json",success:function(e){var a=String(),o=e[0],l=o!=e[1]?e[1]:false,c=$("[data-text-installed]"),d=$("."+n),f=$("em["+r+"]"),u=$("span["+s+"]"),_=5;if(t){t=t.toString();var g=t.match(/([\d\.]+)/);if(g){_=g[1].length}}if(o){o=o.toString();var p=o.match(/([\d\.]+)/);if(p){_=p[1].length}}if(l){l=l.toString()}if(o&&o!=t){a+=", "+theme_language("global_latest_stable").toLowerCase()+" <em "+i+' class="text-success">'+o+"</em>"}if(l&&l!=t){a+=", "+theme_language("global_latest_beta").toLowerCase()+" <em "+i+' class="text-info">'+l+"</em>"}if(t&&t.length<=_&&o&&o.length<=_&&o.toString()!=t.toString()){f.addClass("text-danger")}if(a&&!a.length){c.text(theme_language("global_installed_and_latest_version").toLowerCase());f.addClass("text-success")}u.replaceWith(a);d.remove()},error:function(){}})}})();this._.funcs.dependent_radios("settings_right_table_links_type",["settings_right_table_animate_icons","settings_right_table_grayscaled_icons"],true);this._.funcs.dependent_radios("settings_hotkeys_active",["settings_hotkey_custom_1_user","settings_hotkey_custom_2_user","settings_hotkey_custom_3_user","settings_hotkey_custom_4_user","settings_hotkey_custom_5_user","settings_hotkey_custom_6_user","settings_hotkey_custom_7_user","settings_hotkey_custom_8_user","settings_hotkey_custom_9_user","settings_hotkey_toggle_modifier","settings_hotkey_toggle_hold_modifier","settings_hotkey_toggle_key_webmin","settings_hotkey_toggle_key_virtualmin","settings_hotkey_toggle_key_cloudmin","settings_hotkey_toggle_key_usermin","settings_hotkey_toggle_key_webmail","settings_hotkey_shell","settings_hotkey_shell2","settings_hotkey_focus_search","settings_hotkey_navigation","settings_hotkey_slider","settings_hotkey_toggle_slider","settings_hotkey_reload","settings_hotkey_reload","settings_hotkey_toggle_key_night_mode","settings_hotkey_sysinfo","settings_hotkey_favorites"],true);this._.funcs.dependent_radios("settings_side_slider_enabled",["settings_side_slider_fixed","settings_side_slider_fixed_toggle","settings_side_slider_sysinfo_enabled","settings_side_slider_notifications_enabled","settings_side_slider_favorites_enabled"],true);this._.funcs.dependent_radios("settings_sysinfo_real_time_status",["settings_sysinfo_real_time_status_disk","settings_sysinfo_real_time_stored","settings_sysinfo_real_time_stored_length"],true);this._.funcs.dependent_radios("settings_sysinfo_real_time_stored",["settings_sysinfo_real_time_stored_length"],true);this._.funcs.dependent_radios("settings_sysinfo_easypie_charts",["settings_sysinfo_easypie_charts_size","settings_sysinfo_easypie_charts_width","settings_sysinfo_easypie_charts_scale"],true);this._.funcs.dependent_radios("settings_sysinfo_theme_updates",["settings_cache_interval"],true);if(plugins.navigation.switch.dashboard.get()){a.find('[name="settings_sysinfo_link_mini"]').parents("span").parent("td").parent("tr").remove()}(function(){var e=a.find('input[name="settings_table_init_datatables"]');e.on("input "+n+"",function(){var e=$(this).next("span"),t=parseFloat(this.value),n=t+" "+theme_language("theme_xhred_global_rows").toLowerCase();n=" ("+n+")";if(!e.is("span")){$(this).after('&nbsp;&nbsp;<span class="text-muted">'+n+"</span>")}else{e.text(n)}});e.trigger("input")})();(function(){a.find('select[name="settings_navigation_color"]').on("keyup change "+n+"",function(){var e=$(this).val(),n=$("link[data-palette]"),a=e!="blue";if(a){$("head").append('<link href="'+v___location_prefix+"/unauthenticated/css/palettes/"+e.toLowerCase()+"."+v___source_type+".css?"+$.now()+'" rel="stylesheet" type="text/css" data-palette>')}setTimeout(function(){session.server.data("data-theme",e);n.remove();session.server.data("data-default-theme",e);$(s).find(".user-link.palette-toggle").find(".fa-sun").trigger("click");t.apply()},a?800:0)})})();(function(){a.find('input[name="settings_side_slider_enabled"]').on("change "+n+"",function(){var e="body .right-side-tabs",n=$(this).val()=="true"?true:false;$(""+e+"-toggler").toggleClass("hidden",!n);$(""+e+"").toggleClass("hidden",!n);if(n){$('input[name="settings_side_slider_sysinfo_enabled"][value="true"], input[name="settings_side_slider_notifications_enabled"][value="true"], input[name="settings_side_slider_favorites_enabled"][value="true"]').trigger("click")}t.apply();page_resized();settings_side_slider_fixed&&plugins.slider.state(~~n)});a.find('input[name="settings_side_slider_fixed"]').on("change "+n+"",function(){vars.slider.pinned=-1;var e=$(".right-side-tabs-dismiss .fa2-collapse-right"),n=$(this).val()=="true"?true:false;plugins.slider.state(n);e.toggleClass("fa-rotate-45",!n);t.apply()});a.find('input[name="settings_side_slider_sysinfo_enabled"], input[name="settings_side_slider_notifications_enabled"], input[name="settings_side_slider_favorites_enabled"]').on("change "+n+"",function(){var e="right-side-tabs-"+$(this).attr("name").split("_")[3],t=$(this).attr("name"),n=$(s).find("#"+e).hasClass("active"),a=$('input[name="settings_side_slider_sysinfo_enabled"][value="true"]:checked, input[name="settings_side_slider_notifications_enabled"][value="true"]:checked, input[name="settings_side_slider_favorites_enabled"][value="true"]:checked').length;if($(this).val()=="true"){$(s).find('a[href="#'+e+'"], #'+e+"").removeClass("hidden").parent().removeClass("hidden");if(t==="settings_side_slider_notifications_enabled"){$(".right-side-tab-notification-asterix").removeClass("invisible hidden hidden-forged");$(".right-side-tabs-toggler .badge.badge-danger").removeClass("invisible hidden hidden-forged");setTimeout(function(){if(typeof plugins.slider.badge==="function"){plugins.slider.badge()}},300)}}else{$(s).find('a[href="#'+e+'"], #'+e+"").addClass("hidden");if(n&&a){$("body #right-side-tabs").find("li:not(.active) a:not(.hidden)").first().trigger("click")}else if(a===0){$('input[name="settings_side_slider_enabled"][value="false"]').trigger("click")}if(t==="settings_side_slider_notifications_enabled"){$(".right-side-tab-notification-asterix").addClass("invisible hidden hidden-forged");$(".right-side-tabs-toggler .badge.badge-danger").addClass("invisible hidden hidden-forged");plugins.favicon.set(0)}}theme.config.apply()})})();(function(){a.find('select[name="settings_navigation_color"]').after('<i class="fa fa-fw fa-tune fa-1_25x text-semi-dark text-dark-hoverd text-dark-hoverd-red settings_navigation_color_toggle cursor-pointer" data-name="settings_navigation_color" style="margin-left: 10px; vertical-align: middle; background-color: transparent !important"></i>                                                                 <i class="fa fa-fw fa-refresh text-semi-dark text-dark-hoverd text-dark-hoverd-red settings_navigation_color_reset cursor-pointer hidden" data-name="settings_navigation_color" style="margin-left: 4px; vertical-align: middle; background-color: transparent !important"></i>');var e=a.find(".settings_navigation_color_toggle");e.on("click",function(){a.find("."+$(this).attr("data-name")+"_reset, ."+$(this).attr("data-name")+"_rows").toggleClass("hidden");$(this).toggleClass("forced")});var i=a.find('input[name="settings_grayscale_level_navigation"], input[name="settings_sepia_level_navigation"], input[name="settings_saturation_level_navigation"], input[name="settings_hue_level_navigation"], input[name="settings_invert_level_navigation"], input[name="settings_brightness_level_navigation"], input[name="settings_contrast_level_navigation"]');a.find(".settings_navigation_color_reset").on("click",function(){var e="grayscale(0) sepia(0) saturate(1) hue-rotate(0deg) invert(0) brightness(1) contrast(1)",t="filter: "+e+";";$(".visible-xs.mobile-menu-toggler").attr("style","position: fixed;"+t);$("aside, .visible-xs.mobile-menu-toggler").attr("style","z-index: 10; overflow: visible; transform: translate("+settings_leftmenu_width+"px, 0px);"+t);settings_side_slider_palette==="nav"&&$("#right-side-tabs").add("#right-side-tabs + .right-side-tabs-toggler").css({filter:e});a.find('input[name="settings_grayscale_level_navigation"], input[name="settings_sepia_level_navigation"], input[name="settings_hue_level_navigation"], input[name="settings_invert_level_navigation"]').val(0);a.find('input[name="settings_saturation_level_navigation"], input[name="settings_brightness_level_navigation"], input[name="settings_contrast_level_navigation"]').val(1);i.each(function(){$('code[data-name="'+$(this).attr("name")+'"]').text($(this).val())})});i.on("input "+n+"",function(){var e="grayscale("+a.find('input[name="settings_grayscale_level_navigation"]').val()+") sepia("+a.find('input[name="settings_sepia_level_navigation"]').val()+") saturate("+a.find('input[name="settings_saturation_level_navigation"]').val()+") hue-rotate("+a.find('input[name="settings_hue_level_navigation"]').val()+"deg) invert("+a.find('input[name="settings_invert_level_navigation"]').val()+") brightness("+a.find('input[name="settings_brightness_level_navigation"]').val()+") contrast("+a.find('input[name="settings_contrast_level_navigation"]').val()+")";style="filter: "+e+";";$(".visible-xs.mobile-menu-toggler").attr("style","position: fixed;"+style);$("aside, .visible-xs.mobile-menu-toggler").attr("style","z-index: 10; overflow: visible; transform: translate("+settings_leftmenu_width+"px, 0px);"+style);settings_side_slider_palette==="nav"&&$("#right-side-tabs").add("#right-side-tabs + .right-side-tabs-toggler").css({filter:e});a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());theme.config.apply()});i.each(function(e){a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());$(this).parent().parent("td").parent("tr").addClass("hidden settings_navigation_color_rows hidden-skip");if(e===0){$(this).parent().parent("td").parent("tr").prev("tr").addClass("hidden-dependent-skip")}}).promise().done(function(){if(uri_parse_param("search")){e.trigger("click")}});setTimeout(function(){$(".mobile-menu-toggler:visible").length&&$('input[name="settings_leftmenu_width"]').prop("disabled",true)},100);var s=a.find('input[name="settings_leftmenu_width"]');s.on("click keyup change "+n+"",function(e){page_adjust($(this).val(),$(this).val());a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());theme.config.apply();vars.navigation.width_initial=parseInt($(this).val())});s.each(function(){a.find('code[data-name="'+$(this).attr("name")+'"]').text($(this).val());vars.navigation.width_initial=parseInt($(this).val())});(function(){t._.funcs.dependent_radios("settings_navigation_always_collapse",["settings_leftmenu_width"]);a.find('input[name="settings_navigation_always_collapse"]').on("change "+n+"",function(){if($(this).val()=="true"){$("html").attr("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");plugins.navigation.collapse()}else if($(this).val()=="false"){$("html").attr("data-navigation-collapsed",0);$(".mobile-menu-toggler").addClass("visible-xs")}page_resized()})})();a.find('input[name="settings_leftmenu_user_html"]').on("keyup "+n+"",function(){$("aside ul.user-html li.user-html-string").html($(this).val())});t._.funcs.dependent_radios("settings_leftmenu_netdata",["settings_leftmenu_netdata_link"],true);if(!$(".right-side-tabs-toggler").length){a.find('input[name="settings_side_slider_enabled"][value="false"]').trigger("click");a.find('input[name="settings_side_slider_enabled"]').attr("disabled","disabled")}page_resized()})();$('[data-toggle="popover"]:not(.tconfig-popover)').popover({sanitize:false});var o=$('[action="tconfig.cgi"] sup.tconfig-popover');o.popover({sanitize:false,container:$('[action="tconfig.cgi"] .col_value').first()}).on("shown.bs.popover",function(){$(this).parent().parent().parent().addClass("popover-active")}).on("hidden.bs.popover",function(){$(this).parent().parent().parent().removeClass("popover-active")});var l=$('[name="settings_sysinfo_hidden_panels_user"]');l.on("input "+n+"",function(){settings_sysinfo_hidden_panels_user={};var e=$(this),t=e.val();if(t&&t.length){t.forEach(function(t){var n=e.find('option[value="'+t+'"]').text();settings_sysinfo_hidden_panels_user[t]=n})}setTimeout(function(){if($.isEmptyObject(settings_sysinfo_hidden_panels_user)){settings_sysinfo_hidden_panels_user=""}else{settings_sysinfo_hidden_panels_user=JSON.stringify(settings_sysinfo_hidden_panels_user)}})});var c=$('textarea[name="settings_leftmenu_custom_links"]'),d=c.val();c.length&&c.val(Convert.htmlDecode(d).replace(/&#47;/g,"/"));a.find("#atsave:not(.btn-inverse):not(.disabled)").on("click",function(e){e.preventDefault();var t=$(this);spinnerfy_buttons(t);set_onbeforeunload_status(0,0);var n="goto_webmin_default_module",i=a.find('select[name="'+n+'"]');if(i.length){var s=$.trim(i.val());if(get_access_level()===0){core.updateModuleData("/webmin/edit_startpage.cgi","/webmin/change_startpage.cgi",{gotomodule:s})}else{settings_webmin_default_module=s}}theme.config.apply();theme.config.save();setTimeout(function(){plugins.navigation.reload();theme_config_controls(0);despinnerfy_buttons(0,t);if(get_access_level()===0){if(settings_sysinfo_real_time_status){if(typeof stats==="object"){stats.general.enable()}else{load.bundle(v___server_extensions_path+"/stats/stats",0,["stats.general.query()"])}}else{if(typeof stats==="object"){stats.general.disable()}}}},600)})}(function(){var t=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"tconfig.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-backgrounds.cgi";if(!e&&t){plugins.navigation.reset()}if(!e&&t){if(check_location_resource("/settings-logos.cgi?saved=1")){$.each($(".file_chooser_button_preview:first"),function(){if(!$(this).hasClass("disabled")){if(!matchMedia("(max-width: 1080px)").matches){if($("aside + .__logo").length){$(".__logo img").attr("src",$("[data-image-lga]").attr("data-image"));$("aside + .__logo").attr("style","transform: translate(0px, 0px);");setTimeout(function(){$(".__logo").transition({y:"-140px"},1200)},400)}else{$("aside").after('<div class="__logo _logo" style="transform: translate(0px, 0px);"><img src="'+$("[data-image-lga]").attr("data-image")+'"></div>');setTimeout(function(){$(".__logo").transition({y:"-140px"},1200)},400)}}}else{$("aside + .__logo").remove()}})}var n=$(".btn.authentic_update:not(.disabled), .page_footer_ajax_submit:not(.disabled)");n.on("click",function(){spinnerfy_buttons($(this),[1.5,-28,"small",false])});setTimeout(function(){if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"){$(".end_submits").parent("td").after('<td style="text-align: right;">                <a class="btn btn-default page_footer_ajax_submit pull-right" style="margin-top: 5px; margin-right: -2px;" id="edit_bgs" href="'+v___location_prefix+'/settings-backgrounds.cgi"><i class="fa fa-fw fa-image" style="margin-right:5px;"></i>'+theme_language("settings_right_theme_bgs")+'</a>                <a class="btn btn-default page_footer_ajax_submit pull-right" style="margin-top: 5px; margin-right: -2px;" id="edit_logos" href="'+v___location_prefix+'/settings-logos.cgi"><i class="fa fa-fw fa-file-image-o" style="margin-right:5px;"></i>'+theme_language("settings_right_theme_logos")+"</a>                </td").parents(".ui_form_end_buttons").css("width","100%")}$(".btn-group.end_submits").css("margin-left","2px");setTimeout(function(){if(check_location_resource("/settings-logos.cgi?saved=1")||check_location_resource("/settings-backgrounds.cgi?saved=1")){var e=$(".ui_form_end_buttons #saved");e.replaceWith('<button class="btn btn-success file-editor-save page_footer_ajax_submit" type="submit" name="save" id="save"><i class="fa fa-fw fa-floppy-o"></i> '+theme_language("global_save")+" </button>")}},1300)},10)}if(!e&&(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-backgrounds.cgi")){$(function(){var e=$('input[name="authenticated_logo"]:checked, input[name="authenticated_bg"]:checked'),t=e.val(),n=$('input[name="unauthenticated_logo"]:checked, input[name="unauthenticated_bg"]:checked'),a=n.val();function i(n){typeof n=="undefined"?n=e:false;var a=["authenticated_logo_file","authenticated_bg_file"];if(n.val()!="1"){$.each(a,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").addClass("disabled").prev(".file_chooser_button_preview").addClass("disabled")})}else{$.each(a,function(e,n){$('input[name="'+n+'"]').parents(".file-input-wrapper").removeClass("disabled");if(t=="1"){$('input[name="'+n+'"]').parents(".file-input-wrapper").prev(".file_chooser_button_preview").removeClass("disabled")}})}}i();$('input[name="authenticated_logo"], input[name="authenticated_bg"]').on("change",function(){i($(this))});function s(e){typeof e=="undefined"?e=n:false;var t=["unauthenticated_logo_file","unauthenticated_bg_file"];if(e.val()!="1"){$.each(t,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").addClass("disabled").prev(".file_chooser_button_preview").addClass("disabled")})}else{$.each(t,function(e,t){$('input[name="'+t+'"]').parents(".file-input-wrapper").removeClass("disabled");if(n=="1"){$('input[name="'+t+'"]').parents(".file-input-wrapper").prev(".file_chooser_button_preview").removeClass("disabled")}})}}s();$('input[name="unauthenticated_logo"], input[name="unauthenticated_bg"]').on("change",function(){s($(this))})});$(".file_chooser_button_preview").on("mouseout",function(e){$(this).css("background","white")}).on("mouseover",function(e){$(this).css("background","#eee")});$.each($(".file_chooser_button_preview"),function(){if($(this).data("image")){$(this).popover({trigger:"hover",sanitize:false,html:true,content:function(){return"<img src='"+$(this).data("image")+"'>"}})}})}})();(function(){var e=theme.config._.form.tconfig(),t=e.find("div > table > tbody"),n=e.find("#atsave");t.on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which;if(t===13){n.not(".disabled").trigger("click")}})})();this.current.set()}}};const quirks={active_element:function(){if(document.activeElement&&$(document.activeElement).is("body")){return v___page_activeElement}else{return document.activeElement}},local_storage:{safari:function(){if(typeof localStorage=="object"){try{localStorage.setItem("d41d8cd98f00",1);localStorage.removeItem("d41d8cd98f00")}catch(e){Storage.prototype._setItem=Storage.prototype.setItem;Storage.prototype.setItem=function(){};vars.local_storage=0}}}},render:{apple:function(){browser.detect.safari(1)&&$("html").css("overflow","auto");var e=vars.h.selector.content.get();if(browser.detect.safari()){e.addClass("browser_safari")}if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)){e.data("AppleMobileDev",true);e.attr("style","-webkit-overflow-scrolling: touch !important; overflow-y: scroll !important;")}}},clean:function(){$("style[data-err]").remove()},temporary:function(){setTimeout(function(){if(typeof settings_sysinfo_real_time_status==="boolean"){settings_sysinfo_real_time_status=~~settings_sysinfo_real_time_status;theme.config.save()}},2e3)}};const regex={matches:function(e,t,n,a){n||(n=1);var i=[];var s;while(s=t.exec(e)){i.push(s[n])}if(a){i=i.slice(-1)[0]}return i}};const XHR={headers:function(e){return[e.getAllResponseHeaders(),e.getResponseHeader("content-type"),e.getResponseHeader("content-disposition"),e.getResponseHeader("content-length")]}};const plugins={};plugins.terminal=function(){var e={},t={},a=function(e){if(typeof t==="function"){t(e)}},i=function(a,i){if(!i){i={};i.container_id="terminal"}if(typeof a==="object"&&!$.isEmptyObject(a)&&a.files&&a.cols&&a.rows&&a.socket_url&&a.port){const r=a;if(r.files.js){const a=r.files.js,o=session.server.data("webprefix"),c=o+"/xterm";$.each(a,function(o,d){d=d.replace(/(.*?)\.(js|css)\?.*/,"$1");load.bundle(d,+!o,a.length-1===o?[function(){var a=setInterval(function(){if(typeof Terminal==="function"&&typeof AttachAddon==="object"&&typeof FitAddon==="object"){clearInterval(a);const d=new WebSocket(""+r.socket_url+"","binary"),f=function(a){if(!$.isEmptyObject(e)){for(const t in e){try{if(t!==a){e[t].onclose=function(){};e[t].readyState===1&&e[t].send(" exit\r");setTimeout(function(){e[t].close();delete e[t]},300)}}catch(e){}}}if(a===null){t={}}},p=function(){return document.getElementById(i.container_id)};var o={},c;d.onerror=function(){_(i.container_id,"socket_conn_sock_error");c&&c.disconnect();n=false};d.onclose=function(){if(core.curModule("xterm",1)||i.dropdown){setTimeout(function(){var e="Connection to "+(session.server.data("host")||"localhost")+" closed.";if(!$.isEmptyObject(o)){var t=i.dropdown?"xxs":"tiny",a=i.dropdown?"plugins.terminal.reconnect":"page_refresh";o.writeln(e);$(p()).find(".xterm-viewport").css("overflow","hidden");$(p()).find(".xterm-rows").html("<tt>"+e+"</tt><br>"+'<a href="javascript:'+a+'()" class="btn btn-default btn-'+t+'">'+theme_language("socket_conn_lost_reconnect")+"</a>")}},1e3)}c&&c.disconnect();n=false};d.onopen=function(){if(!i.detached){t=f;f(r.port);e[r.port]=d}var a={cols:r.cols,rows:r.rows,fontFamily:"Roboto Mono Local",letterSpacing:1,fontSize:12};if(i.terminal){a={...a,...i.terminal}}var n=new Terminal(a),_=p(),u=new AttachAddon.AttachAddon(this),g=new FitAddon.FitAddon,h=function(e){if(i.cmd){if(i.cmd.startsWith("!")){i.cmd=i.cmd.replace(/^!/,"")}setTimeout(function(){e.send(i.cmd);setTimeout(function(){e.send("\r")},420)},40)}else{setTimeout(function(){e.send(" clear\r")},40)}};n.loadAddon(u);n.loadAddon(g);n.open(_);n.focus();setTimeout(function(){$(_).addClass("__rendered")},250+500);setTimeout(function(){c=new ResizeObserver(function(){g.fit()});c.observe(_);n.onResize(function(e){d.send("\\033[8;("+e.rows+");("+e.cols+")t")});setTimeout(function(){$(_).outerWidth($(_).outerWidth()-.01);setTimeout(function(){$(_).outerWidth($(_).outerWidth()-.01)},400)},2)},1);h(this);o=n;if(i.dropdown){s={term:n,sock:this}}if(i.detached){o.onKey(function(e){if(e.key===""&&(vars.events.keypressed.ctrl||vars.events.keypressed.shift||vars.events.keypressed.meta)){l()}})}if(!i.detached){window.xterm_argv={}}}}},0)}]:0,1,{sourceType:String(),cssPath:c,jsPath:c})})}}else{if(core.curModule("xterm",1)&&!i.dropdown){_(i.container_id,"socket_conn_parse_error")}else{console.warn(theme_language("socket_conn_parse_error"))}}},n=false,s={},r=function(e){if(session.server.data("terminal")==1){var t="-shell-port-",a="terminal-dd",s=function(e){plugins.messenger.post({type:e,icon:"fa2 fa2-terminal fa-lg fa-fw",id:"xtermErr",title:theme_language("xterm_error_title"),message:theme_language("xterm_error"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,close:false,timeout:false,progressBar:false,buttons:plugins.messenger.toast.construct.button(theme_language("global_open").toUpperCase(),function(){get_pjax_content(v___location_prefix+"/xterm")})})};$(function(){var e=$("."+t+"container"),i=e.find('[data-output="true"]'),n=$("#"+a);e.find("."+t+"cmd").remove();if(n.length){n.empty()}else{i.replaceWith('<div data-label="'+theme_language("socket_conn_lost_connecting")+'" id="'+a+'"></div>')}});$.ajax({type:"GET",url:session.server.data("webprefix")+"/xterm/",dataType:"text",error:function(){n=false;console.warn("Cannot load the terminal");setTimeout(function(){l();s("error")},1e3)},success:function(t){if(!session.status(t)){return}if(t){var r=t.match(/xterm_argv\s*=\s({.*})/);if(r&&r[0]&&r[1]){var o=JSON.parse(r[1]);i(o,{dropdown:true,container_id:a,detached:true,cmd:e})}else{n=false;console.warn("Cannot start the terminal");setTimeout(function(){l();s("warning")},1e3)}}else{n=false;console.warn("Cannot start the terminal");setTimeout(function(){l();s("warning")},1e3)}}})}},o=function(e){if(!n){n=true;r(e)}else{if(typeof s.term==="object"&&typeof s.term.focus==="function"){if(typeof e==="string"){if(e.startsWith("!")){e=e.replace(/^!/,"")}setTimeout(function(){s.sock.send(" "+e);setTimeout(function(){s.sock.send("\r")},420)},40)}setTimeout(function(){s.term.focus()},40)}}setTimeout(function(){c().css("bottom","0vh").addClass("opened")},20)},l=function(){c().css("bottom","100vh").removeClass("opened")},c=function(){return $("body").find(".-shell-port-")},_=function(e,t){if($("[data-fatal-error-text]").length){return}var a="<hr>"+'<h3 class="terminal-err" data-fatal-error-text>'+theme_language(t)+"</h3>"+"<hr>"+"&nbsp;"+'<a style="margin-bottom: 15px;" class="btn btn-warning btn-lg page_footer_submit" href="javascript:page_refresh()">'+'<i class="fa fa-fw fa-refresh">&nbsp;</i> '+"<span>"+theme_language("socket_conn_lost_try")+"</span>"+"</a>";$(document.getElementById(e)).closest(".panel-body").html(a);$("#headln2c .favorites").hide()};return{new:i,reconnect:r,clean:a,open:o,close:l}}();plugins.shell=function(){var e=function(){return $("body").find(".-shell-port-").hasClass("opened")},t=function(){return $t_uri_cloudmin&&$('a[target="page"][href*="/server-manager/save_serv.cgi"][href*="shell=1"]').length},a=function(){var e=t();if(e){return v___location_prefix+"/server-manager/shell.cgi"}else if(core.moduleAvailable("shell")){return v___location_prefix+"/shell/index.cgi"}else{return 0}},n=function(){if(!g()){$(".user-link.ported-console").addClass("hidden")}else{if(settings_show_terminal_link!==false||settings_show_terminal_link2!==false){$(".user-link.ported-console").removeClass("hidden")}}},s=function(){vars.shell.processing=0;$('.-shell-port- input[data-command="true"]').removeAttr("readonly")},r=function(e,t,a,i){return'<form class="hidden" role="form" action="'+e+'" method="post" enctype="multipart/form-data">'+""+(t?'<input type="hidden" id="id" name="id" value="'+$('select[name="sid"]').val()+'">':"")+""+(a===null?'<input type="hidden" id="clearcmds" name="clearcmds" value="clearcmds">':a===false?"":'<input type="hidden" id="cmd" name="cmd" value="'+a.replace(/"/g,"&quot;")+'">')+'<input type="hidden" id="pwd" name="pwd" value="'+i+'">'+"</form>"},o=function(e){var a=t(),i=$('select[name="sid"]').val();if(!e){e=""}if(!i){i=0}$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-shell-insert=1&xhr-shell-inserted="+e+"&xhr-shell-cms="+a+"&xhr-shell-cmsid="+i,dataType:"text",complete:function(e){e=e.responseText;if(!session.status(e)){return}if(!e){return}var t=JSON.parse(e);localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(t))}})},l=function(e,t,a){$(e).next("pre").remove();u();_(t);a.scrollTop(a[0].scrollHeight);setTimeout(function(){vars.shell.processing=0;vars.shell.history=0;t.removeAttr("readonly").focus()},100)},c=function(e){var t="TERM environment variable not set.\n";if(e==="<pre>\n"+t+"</pre>"||e.endsWith(t)){e=e.replace(t,"Cannot run interactive commands in this shell.\n")}return e},_=function(e){e.val("");e.focus()},d=function(e){var t=$("body").find(".-shell-port-"),a=e&&e.startsWith("!")?e.replace(/^!/,""):false,i=t.find("input"),n="data-shell-host",s=t.find(".-shell-port-pwd").attr("data-pwd"),r=t.find("["+n+"]"),l=r.attr(n);if($t_uri_cloudmin){var c=$('aside [name="sid"] option:selected');current_host_name=c.attr("title")||c.text();r.text(current_host_name)}else{r.text(l)}o(false);if(a){i.val(a);var _=$.Event("keydown");_.which=13;i.trigger(_)}t.css("bottom","0vh").addClass("opened");m();u();setTimeout(function(){if(!a){focus();i.focus()}},20)},f=function(){var e=$("body").find(".-shell-port-"),t="command-shell-editor-spinner";e.css("bottom","100vh").removeClass("opened");$("."+t).remove();m(true)},p=function(e){var t=$(".-shell-port-container .-shell-port-cmd"),a="invisible";if(e){t.addClass(a)}else{t.removeClass(a)}},u=function(){if(core.moduleAvailable("shell")==1&&session.server.data("terminal")==="0"){var e=parseInt($("body").find(".-shell-port-cmd").width()),t=parseInt($("body").find(".-shell-port-prompt").width());$("body").find('.-shell-port- input[data-command="true"]').css("width",e-t-50+"px")}},g=function(){var e=t();if(core.moduleAvailable("shell")==1||e||session.server.data("terminal")==1){return 1}else{return 0}},h=function(e){var t=$("body").find(".-shell-port-"),a=t.find(".-shell-port-pwd"),i=a.attr("data-home");if(typeof e==="string"){e=Convert.uriDecodeComponent(e);var n=e&&e.endsWith("/")?e.slice(0,-1):e,s=n.split("/").pop();if(!s){s="/";e="/"}if(get_access_level()==2){e=get_user_home()+e}if(e===i){s="~"}e=Convert.htmlEscape(e);a.attr("data-pwd",e).attr("title",e).text(s)}},m=function(n){var s=$(document.body).find(".-shell-port-"),g='[data-command="true"]',h=s.find("input"+g+""),m=s.find("div[data-output]"),b=s.find(".-shell-port-container"),x=s.data("autocomplete"),y=$(window),k=".plugin-shell";if(n){y.off("keydown"+k+"");y.off("keyup"+k+"");b.off("click"+k+"");return}y.on("keydown"+k+"",function(t){var a=this,i=e(),n=$(".modal-shell-config:visible").length,r=String.fromCharCode(t.which).toLowerCase();if(t[settings_hotkey_toggle_modifier]&&r==settings_hotkey_shell2&&theme_shortcuts_modifier_unique(t)){t.preventDefault();if(i){f()}return}if((t.altKey||t.ctrlKey)&&String.fromCharCode(t.which).toLowerCase()=="l"){t.preventDefault()}if(typeof a.shell_request_interrupted==="undefined"){a.shell_request_interrupted=0}if(typeof this.last_pressed_times==="undefined"){this.last_pressed_times=0}else{this.last_pressed_times+=1}setTimeout(function(){a.last_pressed_times=0},vars.event.double_click_delay);if(r==="c"&&a.last_pressed_times>1&&t.ctrlKey&&!t.shiftKey&&!t.altKey&&!t.metaKey){a.shell_request_interrupted=1;typeof a.shell_request==="object"&&a.shell_request.state()==="pending"&&a.shell_request.abort();setTimeout(function(){a.shell_request_interrupted=0},1e3);return}var o=platform.detect()==="mac",l=o?t.metaKey:t.ctrlKey,c=o?t.ctrlKey:t.metaKey;if(this.searching||r==="r"&&l&&!t.shiftKey&&!t.altKey&&!c){t.preventDefault();if(typeof a.shell_request==="object"&&a.shell_request.state()==="pending"){return}var _=$(".-shell-port-type"),d=$('.-shell-port- input[data-command="true"]'),p="reverse-i-search",g="data-searching";b.scrollTop(b[0].scrollHeight);this.searching=1;run_search=function(e){var t=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),a=t.filter(function(t){return t.includes(e)});return $.unique(a).reverse()},update_search=function(e,i){if(!this.used_index||i){this.used_index=0}if(t.ctrlKey){if(r==="c"){cancel_search(1);return}if(r!=="r"){return}}if(JSON.stringify(e)==JSON.stringify(this.results)&&!i){if(t.shiftKey){--this.used_index}else{++this.used_index}}else{this.results=e}if(e.length<=this.used_index){this.used_index=0}if(this.used_index<0){this.used_index=e.length-this.used_index-2}var n=this.searching_shell_str_replaced.find("span["+g+"]"),s=n.text();var o=localStorage.getItem(v___server_hostname+"-"+"shell_command_last");if(!a.pre_searched&&o){if(o==="undefined"){o=String()}a.pre_searched=o}if(!s&&a.pre_searched){n.text(a.pre_searched);var l=run_search(a.pre_searched);update_search(l,0);return}if(!s||!e.length){failed_search();return}else{success_search()}if(e){d.val(Convert.htmlUnEscape(e[this.used_index]))}u()},failed_search=function(){var e=a.searching_shell_str_replaced.html();if(!e.includes("failed reverse")){a.searching_shell_str_replaced.html(e.replace(p,"failed "+p+""))}u();var t=new Audio("data:audio/ogg; codecs=opus;base64,T2dnUwACAAAAAAAAAAArS957AAAAAAff6O0BHgF2b3JiaXMAAAAAAkSsAAAAAAAAAO4CAAAAAAC4AU9nZ1MAAAAAAAAAAAAAK0veewEAAABiry0KEC3//////////////////3EDdm9yYmlzHQAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMDcwNjIyAAAAAAEFdm9yYmlzK0JDVgEACAAAADFMIMWA0JBVAAAQAABgJCkOk2ZJKaWUoSh5mJRISSmllMUwiZiUicUYY4wxxhhjjDHGGGOMIDRkFQAABACAKAmOo+ZJas45ZxgnjnKgOWlOOKcgB4pR4DkJwvUmY26mtKZrbs4pJQgNWQUAAAIAQEghhRRSSCGFFGKIIYYYYoghhxxyyCGnnHIKKqigggoyyCCDTDLppJNOOumoo4466ii00EILLbTSSkwx1VZjrr0GXXxzzjnnnHPOOeecc84JQkNWAQAgAAAEQgYZZBBCCCGFFFKIKaaYcgoyyIDQkFUAACAAgAAAAABHkRRJsRTLsRzN0SRP8ixREzXRM0VTVE1VVVVVdV1XdmXXdnXXdn1ZmIVbuH1ZuIVb2IVd94VhGIZhGIZhGIZh+H3f933f930gNGQVACABAKAjOZbjKaIiGqLiOaIDhIasAgBkAAAEACAJkiIpkqNJpmZqrmmbtmirtm3LsizLsgyEhqwCAAABAAQAAAAAAKBpmqZpmqZpmqZpmqZpmqZpmqZpmmZZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZQGjIKgBAAgBAx3Ecx3EkRVIkx3IsBwgNWQUAyAAACABAUizFcjRHczTHczzHczxHdETJlEzN9EwPCA1ZBQAAAgAIAAAAAABAMRzFcRzJ0SRPUi3TcjVXcz3Xc03XdV1XVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVYHQkFUAAAQAACGdZpZqgAgzkGEgNGQVAIAAAAAYoQhDDAgNWQUAAAQAAIih5CCa0JrzzTkOmuWgqRSb08GJVJsnuamYm3POOeecbM4Z45xzzinKmcWgmdCac85JDJqloJnQmnPOeRKbB62p0ppzzhnnnA7GGWGcc85p0poHqdlYm3POWdCa5qi5FJtzzomUmye1uVSbc84555xzzjnnnHPOqV6czsE54Zxzzonam2u5CV2cc875ZJzuzQnhnHPOOeecc84555xzzglCQ1YBAEAAAARh2BjGnYIgfY4GYhQhpiGTHnSPDpOgMcgppB6NjkZKqYNQUhknpXSC0JBVAAAgAACEEFJIIYUUUkghhRRSSCGGGGKIIaeccgoqqKSSiirKKLPMMssss8wyy6zDzjrrsMMQQwwxtNJKLDXVVmONteaec645SGultdZaK6WUUkoppSA0ZBUAAAIAQCBkkEEGGYUUUkghhphyyimnoIIKCA1ZBQAAAgAIAAAA8CTPER3RER3RER3RER3RER3P8RxREiVREiXRMi1TMz1VVFVXdm1Zl3Xbt4Vd2HXf133f141fF4ZlWZZlWZZlWZZlWZZlWZZlCUJDVgEAIAAAAEIIIYQUUkghhZRijDHHnINOQgmB0JBVAAAgAIAAAAAAR3EUx5EcyZEkS7IkTdIszfI0T/M00RNFUTRNUxVd0RV10xZlUzZd0zVl01Vl1XZl2bZlW7d9WbZ93/d93/d93/d93/d939d1IDRkFQAgAQCgIzmSIimSIjmO40iSBISGrAIAZAAABACgKI7iOI4jSZIkWZImeZZniZqpmZ7pqaIKhIasAgAAAQAEAAAAAACgaIqnmIqniIrniI4oiZZpiZqquaJsyq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7rukBoyCoAQAIAQEdyJEdyJEVSJEVyJAcIDVkFAMgAAAgAwDEcQ1Ikx7IsTfM0T/M00RM90TM9VXRFFwgNWQUAAAIACAAAAAAAwJAMS7EczdEkUVIt1VI11VItVVQ9VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV1TRN0zSB0JCVAAAZAAACKcWahFCSQU5K7EVpxiAHrQblKYQYk9iL6ZhCyFFQKmQMGeRAydQxhhDzYmOnFELMi/Glc4xBL8a4UkIowQhCQ1YEAFEAAAZJIkkkSfI0okj0JM0jijwRgCR6PI/nSZ7I83geAEkUeR7Pk0SR5/E8AQAAAQ4AAAEWQqEhKwKAOAEAiyR5HknyPJLkeTRNFCGKkqaJIs8zTZ5mikxTVaGqkqaJIs8zTZonmkxTVaGqniiqKlV1XarpumTbtmHLniiqKlV1XabqumzZtiHbAAAAJE9TTZpmmjTNNImiakJVJc0zVZpmmjTNNImiqUJVPVN0XabpukzTdbmuLEOWPdF0XaapukzTdbmuLEOWAQAASJ6nqjTNNGmaaRJFU4VqSp6nqjTNNGmaaRJFVYWpeqbpukzTdZmm63JlWYYte6bpukzTdZmm65JdWYYsAwAA0EzTlomi7BJF12WargvX1UxTtomiKxNF12WargvXFVXVlqmmLVNVWea6sgxZFlVVtpmqbFNVWea6sgxZBgAAAAAAAAAAgKiqtk1VZZlqyjLXlWXIsqiqtk1VZZmpyjLXtWXIsgAAgAEHAIAAE8pAoSErAYAoAACH4liWpokix7EsTRNNjmNZmmaKJEnTPM80oVmeZ5rQNFFUVWiaKKoqAAACAAAKHAAAAmzQlFgcoNCQlQBASACAw3EsS9M8z/NEUTRNk+NYlueJoiiapmmqKsexLM8TRVE0TdNUVZalaZ4niqJomqqqqtA0zxNFUTRNVVVVaJoomqZpqqqqui40TRRN0zRVVVVdF5rmeaJomqrquq4LPE8UTVNVXdd1AQAAAAAAAAAAAAAAAAAAAAAEAAAcOAAABBhBJxlVFmGjCRcegEJDVgQAUQAAgDGIMcWYUQpCKSU0SkEJJZQKQmmppJRJSK211jIpqbXWWiWltJZay6Ck1lprmYTWWmutAACwAwcAsAMLodCQlQBAHgAAgoxSjDnnHDVGKcacc44aoxRjzjlHlVLKOecgpJQqxZxzDlJKGXPOOecopYw555xzlFLnnHPOOUqplM455xylVErnnHOOUiolY845JwAAqMABACDARpHNCUaCCg1ZCQCkAgAYHMeyPM/zTNE0LUnSNFEURdNUVUuSNE0UTVE1VZVlaZoomqaqui5N0zRRNE1VdV2q6nmmqaqu67pUV/RMU1VdV5YBAAAAAAAAAAAAAQDgCQ4AQAU2rI5wUjQWWGjISgAgAwAAMQYhZAxCyBiEFEIIKaUQEgAAMOAAABBgQhkoNGQlAJAKAAAYo5RzzklJpUKIMecglNJShRBjzkEopaWoMcYglJJSa1FjjEEoJaXWomshlJJSSq1F10IoJaXWWotSqlRKaq3FGKVUqZTWWosxSqlzSq3FGGOUUveUWoux1iildDLGGGOtzTnnZIwxxloLAEBocAAAO7BhdYSTorHAQkNWAgB5AAAIQkoxxhhjECGlGGPMMYeQUowxxhhUijHGHGMOQsgYY4wxByFkjDHnnIMQMsYYY85BCJ1zjjHnIITQOceYcxBC55xjzDkIoXOMMeacAACgAgcAgAAbRTYnGAkqNGQlABAOAAAYw5hzjDkGnYQKIecgdA5CKqlUCDkHoXMQSkmpeA46KSGUUkoqxXMQSgmhlJRaKy6GUkoopaTUUpExhFJKKSWl1ooxpoSQUkqptVaMMaGEVFJKKbZijI2lpNRaa60VY2wsJZXWWmutGGOMaym1FmOsxRhjXEuppRhrLMYY43tqLcZYYzHGGJ9baimmXAsAMHlwAIBKsHGGlaSzwtHgQkNWAgC5AQAIQkoxxphjzjnnnHPOSaUYc8455yCEEEIIIZRKMeacc85BByGEEEIoGXPOOQchhBBCCCGEUFLqmHMOQgghhBBCCCGl1DnnIIQQQgghhBBCSqlzzkEIIYQQQgghhJRSCCGEEEIIIYQQQggppZRCCCGEEEIIIZQSUkophRBCCCWEEkoIJaSUUgohhBBCKaWEUkJJKaUUQgillFBKKaGUkFJKKaUQQiillFBKKSWllFJKJZRSSikllFBKSimllEoooZRQSimllJRSSimVUkopJZRSSgkppZRSSqmUUkoppZRSUkoppZRSKaWUUkoppaSUUkoppVJKKaWUEkpJKaWUUkqllFBKKaWUUlJKKaWUSgqllFJKKaUAAKADBwCAACMqLcROM648AkcUMkxAhYasBABSAQAAQiillFJKKTWMUUoppZRSihyklFJKKaWUUkoppZRSSimVUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKAcDdFw6APhM2rI5wUjQWWGjISgAgFQAAMIYxxphyzjmllHPOOQadlEgp5yB0TkopPYQQQgidhJR6ByGEEEIpKfUYQyghlJRS67GGTjoIpbTUaw8hhJRaaqn3HjKoKKWSUu89tVBSainG3ntLJbPSWmu9595LKinG2nrvObeSUkwtFgBgEuEAgLhgw+oIJ0VjgYWGrAIAYgAACEMMQkgppZRSSinGGGOMMcYYY4wxxhhjjDHGGGOMMQEAgAkOAAABVrArs7Rqo7ipk7zog8AndMRmZMilVMzkRNAjNdRiJdihFdzgBWChISsBADIAAMRRrDXGXitiGISSaiwNQYxBibllxijlJObWKaWUk1hTyJRSzFmKJXRMKUYpphJCxpSkGGOMKXTSWs49t1RKCwAAgCAAwECEzAQCBVBgIAMADhASpACAwgJDx3AREJBLyCgwKBwTzkmnDQBAECIzRCJiMUhMqAaKiukAYHGBIR8AMjQ20i4uoMsAF3Rx14EQghCEIBYHUEACDk644Yk3POEGJ+gUlToQAAAAAAAIAHgAAEg2gIhoZuY4Ojw+QEJERkhKTE5QUlQEAAAAAAAQAD4AAJIVICKamTmODo8PkBCREZISkxOUFJUAAEAAAQAAAAAQQAACAgIAAAAAAAEAAAACAk9nZ1MAAEAUAAAAAAAAK0veewIAAABnj+O9HJeVV1dTVZqZlJWTVZOLl//3WFxXYJeV//8Y/+Tc/UxIYKVFdYLOWPcLKpEsrrEHETnXiqysLLNdS6y95/ef+7Vi79Z9zVZ919e44pxH0T+fHGONcSbr+Qza425fEvs1zysffUT9+zQaHgrT7V/01BzsuyrXpCXz0qMP4mSLYZ2iYZT7dVnREnYkX1fr+76Ya2rOIWxZqt/+8fu7dPBeNIMvH50Ln/UwOVyC7df/vwOSxAYAnB1ByNXUFeZiWLQlkZiQm/UrEE59c0TW7pJx5T1in2f5ufWtNeqfPh5UhKJ5rdkW3euzR5Bnxl6ZzVEj9x8jle81vvdbX+QF7AwF9aGXl0vbqWO385cr/4ltd2sspXI3JZbe9d13usNKvuGcrs55V9wupuJlY2SjF3pHn3vGm7VOUVPVZ8767T912a/rarz46AM0sASMAUWc62z2vGvAFJAwodfkUjqDTLGzVPSOi9SKWYilemD7LM7PZDfiZ1+7Wd9jc3HC0/tMv7uMv+Oc0Otg3fEj4k2cmQf4d5xhlz5+lH9zf9pbh576EAJ09fQ8F1hhUuCwmTShJhOPShKBifF//C2oGLikd4xiSI4XPjMvcC/fz6+Y/NSLZJ949nOVksu7IHcbrNCJ7jqvFvahjonXr/Z5SS6ZyX96/29uk57eKQOU8TwkAAINXFDOfChOgCQRgSE25x89VUuxy5tRsMqCWWx3Cft8rdllSMbllX0bvbfFfosLI3sPree1B0v9TTQ7+jL2841/MKsdSr507La/nkbdBYzxfDJhDtLNyW4bkMIJJCCnyDDlv/RQX4SoeaMobphUZvcB8vmn/K3t5z2X7sj+XX1JmOxl07wOHVdzgCU7/dclLZ806G8sziRsKGVPB9v+1wbZmgGc/TBJJAABVw8riiaxOplhpajhMd+fXbRlhCYzzmLvec4vr6tsmj35n+/XQzM352aNu+e0RpP7tawxRql5rht79+81u/Jz/vuUY01kENkbGLKS5UTaS6Va3/++pPF1Xr9O0bz3GvvHouGXQ5J7zb2GKsn9v9VK4nl64fFb0yekKdnWf8P31ynuiHxEwzj+eyudorVr7ed53cwB1A09yjNcLxdb7GCfM+pYEFodXu7nmv79yoNZu7rU36bw6+1r5r37+9mw9dentyvZd5i+WLfGXe/fx7WbEbTu+bNikUDTOz9t12eXvXHf3S0Xr56ufnpbeuS7LSqIHUseattE6vKT8vcDl399cvnIjOLhZVX8/P795f31Ydb/J3H8e3HM7Z9u9TZq58odu57+hutTjjvoDZcwBEa9MNiNz/7Ix0ic6kNwyIbxR20/4uzp+JHIcej6xV4Zo82535pzx/65rWuPZmp2j8yj0ryPj0hXwFUf7Oaz8vPKeS+/OGuFJMOpeO6rx59Vqw4/lVTbffsixD6Gq7eXQ/9X177EP51Hm2rPIlr3q9Ztc7XS3v9sDrHm5/y1lv4Me6165m8OO9NwP87y/acOWh0LABRaRZtYF/+L4LqLWeASZv8aDUXgrdeoqGxf7Vno0uhKTrPz9j7HfK/Rc32P++ftHOO2Wr5iTPb/qNyYvXJk7Ht8nn7jrVlkWK/arnPYU6Lw8PXlE5GdX/MeNaf/C7spMYwCI3LH0KN+tyzb/ancv1y/ePfoOTkXF4g1Z1dM/58v7/0OXeG3l+819X0kMCo+t//wh0kAtGH1IxciZPnRX18fVrpcoMc+jYeed+43PgCN5kLMzu9nxvpJM2dhFiOLa/ZsHk1sWJHd0ytwHSWpl52utUZc3z12TquTYTTviwy6tvIrpesF9lQpoj4Mt5D16Y9/92pXBjZ0ee92bmE7m5du1YT+1oa76ndJvEL6vFN1IbLTCv6+X9/JiivLYm7vHrftvL5+PgEA/EX1IZeObBdctRf12FzJau7WCJVw0kTZprqtCDKop3ifxDvfiaVfd5377OHy3v0Us1Xe/NvK4uf/jzjn0hjvvmoeKtnUjLdPQvCyiDNm8fvLrbUmAARScQ7CfBpJDZp7VbEnzO86Mojtrl5X3zU9Qugxe91zvP1KiJVfZ3+4Z2M4V2aP5hxTWJlxW5+59qYrtB923ztvflqf2YHcepBwsXLILn65YTJ0C+o/yav4U49aXvSnD/c1RI/AF0/dvx7auZM39VHYvumRHtxFN/vf36FKN8V36azKWplP9G3dxdXsSCETskQDAORBCZ0rznlH2jn6poDkikd7BYS72r9VFu2OaDLXyD/dfc/NRuuKa7vrZUSNbFU7W3GO+PWXzZ7H5hGZJLBeLfnHPbzAzFrXoN5Zq0y8QOEdlO1f9O51qhOBuPu+R2rlVnTvoH9IvyKOZnsuvkf87oHOtZ06/69D8W2sfnzveExRd36D3e3McN0JKQC0SXUmMSN87QvKw0LDr6uiPFezdj11Es/zLrHGdGIh1vdntezxaOw+Vv99jH3/bKuv1Tr4QDxlaSYR1RZ7/m69ptWIVr9HjiDDoPnSzh6NX9J5t1CmZ1x/CKvTNa5hCh8Wt3m+iR7ulbabrz8lOa9txqPm1L2dXPwvVOLJd/r2Wnqn1tU3/ex66lu3/s/L9znGc9teLgAAcufkZfE73M4sm1rDr3r+1pqBbl7/dYjrNtas5Dilf+638lzfX93+/D++TR+1zYv9cP7wNXu01LO3Yk+vV1/kmO157N4A3DzFdRcrJfPaAADAj3KvHMeMrLq8OO/Cm4Vm8u+7rXmlh8Sh97fy44euqzcHY/m4mH1tO3/81OsZudgez3e4PWWaQ1tb0wQRpy+6h1NXOTXbrXDtT1leSxuzbyXoul7f15/9fb1752X7xlNtwlw6x8fj8Ls84rfn1sWci5vhsfl+t/PtoXtdOgk3Om+XwMpd3lP7zs2691IP8JBRjNHwPMX8aJPVGd97Z8+RzO7/+9NAhqjpHMUzjtZO8h3O+K1ecoplrYpWl/V83WH2Pjvu2O5uubrOjZvOca73h6q4zq/z6yuNzXzynM7Xw/5Q3cbV/u+ZQh18pohPyJJyW+/uwGAurL0ssIuszAjUH+IoRiksphmNYqkrMorVvZd60ZTVEpbaRm51aS2ap37ueWd6UVs8hPU/ZTJZayFMPRrqlxKsBCABqrV9DFWbsTOFKDA3J6+Hslbecp/eng26l/cby43G4qRpIJdJZzDd7wwY3IEk+od/a/1hdbszvan+cn8JwGvomufx7p7NJUNXTlzp3zQXXaqWOhQfdCnB23pzyWgmZ7hMfN6AcQb2MwavchM4AHQ1r50Se44/Hsa8avmatYGCiLYqyFHgt/zd94qtLNUoghdG8aftHPetsqKvrQOmUwt8mZzyoO9xoplpbgyrXzjvh2fO27KjkptUmXkp78XeDfnYzcPEzwCEHV9/enrUVLhcSdgx5WuePT1FuCNeafR41ldr3hdCCbwpxVIJkZv2rvtSKp61qSkn8WK99H0Xw9T5xf6dMaul7VsaYlNJ6ZoT5pZnJ3b029bX8UpP0vu5x79fAZQpX/9k270+CFwYm4A/fvHs2YkMgTLgrfZWzL4geEMG9UahK891+aRnUhIWqpuO6ys+8OV+7G9LjH3Ztrv4TSa1SoyTTpqaCeM3sSX+dM+wRVZsm6dHAqQxf/DysHM45sDJFa8L+qMfHuOKSwTwX/FeI90L9MSHqEkKsy5ylhvYlPlnZquC3V3/OpfO+/m/Ph8l8Zwy/hZZbpv7fS4f2o3147IRS0lSfvE+L0EeTYx8L2ciPvS8AZxRX//xhnx66HvCjKu+9nuk3FzYDvl+9e67/iZWq2K1ucYaaz2v+xjn+VuuVTdltEkpf8fQmOK0V1ypeCWrGlPh1fdcP/xzv/x083bdX7mmxV9KE1Uvq2LnU1+MW/+f3a3972857cnp+eyNTlrsduzq5ylZP7ef/vfmT/t6esfNLO6R6euW/p7eof2zT49tc+mXbl3hvQKkUV/7Dnv7cfDVrTbpq98GeflYEd915pMZ50crWMG9NmmHte+N2PEJMZ5tK1Grc3qufNJzNdNee/Yb8VVQZIOxdS3YzncMMXJ/GRTSf+/96gzTIvfLxu/Z1Q9Vz6U3eql47z8t32Qmg7S/nUYcrL08VMzWEuldnpx35OvoOUfHt/7Y2vatI1unvs6tU6ddJXzL3N7dCzpG3Mz1S8ABUDf97feQvc3D8FbD55dw08SH0K/bzSMFiBjeauj81yFyXU/1tdeOGPb++u2yp3ld+sAbuaL11OxgaQLmrt6AuvQCMHquK0mxhR2bRJIAzu/tCPlZ4V4xjQ5WF88td97erBgaq0GP+2gpiDdm41R7c9X5FtrZ0q+Wfao9CcY4f+tQbLu6k9IkiWUwSa9Vxav8Px+HbVOnzPXxS1dHxscP5uX2YXO5XvamuzVPd3KvrllzXYnD9aN260vlcibOvy1mujgzjand6qpaRiLrS6WLSq/lxW8T/cNCAmBh6T/DkUHMOe85evrYKWz3z9WsX79c4ppaPvVEFnvt+5CdkcXIZFpk/fq6f08TpqyDHMz9q0xXl3Vc53o0PvnpnIsuKbT3i6y2yh81v533U78uG6ZPTEbGZpT9IQnjeK3XyopF/eJf2nAuFvd9FRZtO9+UxVQCK+z+nCD3CePyW+IM35aGnn+0W/yWuFynSXuo8XtssfSC+l/1PzNd2kzCfgZWMVk/LD1e8euHe4jclkz+bEFpERv78XepH3Cbit8XMdm07dP8T2QczzsHLpJ+Kz5tzLmTb9Eqhizfx+VzAB6eOxbm+mt2+r3Ihb2/Ii+kyi34F5zNp2v+MDgqdoGxnxFfgew1c/bvT++jTVt9Ul757I/Ur/L1Gc3z1u8CfDZVwrUyMjK/XKB4Q21PlyYttwIJAH4V3Eh5qV440zVkyXLGuwoOK3dhH/hDL+uUDbf/ydnuo7eMW675bJxuP59ZebtEmgYvMM5fN3MkVNfUG4DnbQDOOaMmxHZyEQAAGNWWw9TaU9go20s5zr3/B4I4bQctWRG951dK5aNP8LU0z8bIgB09k6p5JBPUjqDY1KwxVp4+LYCHazhrfHjfx1kV54nPzvWKs9SmRcjqsMZbhPouSphMdumV42pkYb/vt5isZ7qoFFaPUk8vSmB68axdvNNVHo4cuF+brNdtbxk2F7dG6aUnsm3UdvlcJmuD825wKvVMfd7Xy+eSc3+pv5/7c4vKy33u0+/fNGHBdJx9tl0sPu8T+79/DkEum0XWJ0eMvryPxfnfDSiWYXQ/L9DE+fkmuoai7InztpFbl5ds813gv9cfZ35x9s9k++zfJe39h+8yQHnQnNn9QHx2htsxffyx4DUyIzW/CeXUpZx/+kE5FXTJwv39Ur2Nxbtl1HLGGxoiietr7YICeHNWvstOd03plLV6tGQXP7Ct+lX21wvsWuapzvnc99/unoY4kQD5/+2egDAN0AOw83322WeigBAjZUUNi3yffd5nMnqGh1/cCvW/zYsF9nlH8N9zn+gBpk1z8r68KGO8e9YMvTvJijVTFzwBAE9nZ1MABAcYAAAAAAAAK0veewMAAAD63TjdAv/mPjWE51OfDSVdk9Eu11E1xM/X++JzOgLu0t2GOOH1n1Ws15//P+eIvXbQx7tjr+el59oLl11Wgw2g4nryAWpMvErF6MYxEgAAAEwJPe9Xlt/pk++eZK/lHE9KfcTQ6+D852DtPkt3soWb7tNULn++n+/rOr38+vT5burg9vnpWHko+qXJvaGl+9vP93o7FLq5ua6Rw/j9PtDT+7w/77Pvz31xvP6Sy5d3J5yrcSkf0LVnPSvpkkuZpHTZwWTtI/nhR95ZHU1YL+UqYkfz8Zvvz6VUl+ulY8GcfSaul+vlPLXrvHz7t2n66YGpX24Xx50YKRUtDrd/70H9f49u1ktNvfQ+0xlnlPu359vTPX0iAyC13P+/f2etbH3lS5uk/92ltLqWdVkj4/patxUt4/j4XOAfSxhbsS8e/b/jm/zha1MBM8nfAr8vym/++MeV5himtKKsn853EtfX16WAXl97b76q5Mgun32iLMqAaaQvvrIAnpHmkqVjWCz0tg7H1F9e7tzNNBkZ9u37PaZf7OVnnsmKI/AuP7odx7ulcTweA84yr8uzDz3LXO6dyTPnqS2yd0bu34a/ns5WAniVgWZ5zWXcp425/7a1pQIA3pSGHse7tGdraQCoPAFuBOXJC0/88nTUywU=");t.play()},success_search=function(){var e=a.searching_shell_str_replaced.html();a.searching_shell_str_replaced.html(e.replace("failed "+p+"",p));u()},cancel_search=function(e){_.html(a.searching_shell_str);a.searching_shell_str=0;a.searching_shell_str_replaced=0;a.searching=0;if(e){d.val(String())}u()};if(!this.searching_shell_str){this.searching_shell_str=_.html()}if(!this.searching_shell_str_replaced){this.searching_shell_str_replaced=_.html("("+p+")`<span "+g+"></span>': ");u()}else{var y=this.searching_shell_str_replaced.find("span["+g+"]"),k=y.text();if(t.key&&t.key.length===1){var A=t.ctrlKey||t.altKey||t.metaKey?String():t.key,w=k+A;w&&(a.pre_searched=w,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",w));y.text(w);var C=run_search(y.text());update_search(C,A)}}if(t.keyCode===8){var S=this.searching_shell_str_replaced.find("span["+g+"]"),I=S.text(),T=I.slice(0,-1);I&&(a.pre_searched=T,localStorage.setItem(v___server_hostname+"-"+"shell_command_last",w));S.text(T);var V=run_search(S.text());update_search(V,1);return}if(t.keyCode===9||t.keyCode===13||t.keyCode===27||t.keyCode===37||t.keyCode===38||t.keyCode===39||t.keyCode===40){cancel_search()}return}if(i&&t.keyCode===27&&!n){f();return}if(i&&t.keyCode===38){t.preventDefault()}if(i&&t.keyCode===9&&h.is(":focus")){t.preventDefault();if(!x){return}var E=":"+":"+":"+":",O=h.val().trim().split(/\s+(?!-)/),j=O.length,z=O[0]&&O[0].indexOf("-")===-1?0:1,M=O[1]&&O[1].indexOf(":")===-1?0:1,q=h.val().endsWith(" "),U=$.trim(O[0])==="service",Z=$.trim(O[0])==="systemctl",J=$.trim(O[0])&&$.trim(O[0]).startsWith("chown"),K=O.length===1&&h.val().length&&!z&&!q?"commands":U||Z?"services":J?"permissions":"lists";if(!$.trim(h.val()).length){return}var W=h.val(),R=s.find(".-shell-port-pwd"),D=R.attr("data-pwd");if(K==="services"){K=U?"service":"systemctl";if(K==="systemctl"&&O.length!==3){return}W=K=="service"?$.trim(O[1]):$.trim(O[2]);if($.trim(O[0])==="service"&&(O.length===2&&q||O.length===3)){if(O.length===3){W=E+$.trim(O[1])+E+$.trim(O[2])}else{W=E+$.trim(O[1])}}}if(J){if(j===1&&!q){h.val($.trim(O[0])+" ");return}if(!M||!$.trim(O[1])){K="users";W=$.trim(O[1])}else if(!q&&!O[2]){K="groups";W=$.trim($.trim(O[1]).split(":")[1])}else{K="lists";W=D+"/"+E+$.trim(O[2])}}if(K==="lists"&&!J){W=D+"/"+E+$.trim(O[1])+E+$.trim(O[0])+E+$.trim(O[2])}$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-get_autocompletes=1&xhr-get_autocomplete_type="+K+"&xhr-get_autocomplete_string="+W+"",data:false,dataType:"json",success:function(e){var t=e.length;if(t===1){if(K==="service"||K==="systemctl"||K==="lists"){var a=$.trim(O[0]),i=$.trim(O[0])+" "+$.trim(O[1]);if(K==="lists"){if(a==="cd"&&e[0].endsWith("/")||a!=="cd"){if(a==="cd"||a==="cat"){h.val(a+" "+e[0])}else{if($.trim(O[2])){h.val(i+" "+e[0]+"")}else{h.val(a+" "+e[0]+"")}}}}else{if(a==="service"&&(O.length===2||O.length===3)){if(O.length===2){h.val(a+" "+e[0]+" ")}else if(O.length===3){h.val($.trim(O[0])+" "+$.trim(O[1])+" "+e[0])}}else if(a==="systemctl"&&O.length===3){h.val(a+" "+$.trim(O[1])+" "+e[0])}}}else{if(J){if(!M){h.val($.trim(O[0])+" "+e[0]+":")}else if(!q&&!O[2]){h.val($.trim(O[0])+" "+$.trim($.trim(O[1]).split(":")[0])+":"+e[0]+" ")}else{h.val($.trim(O[0])+" "+$.trim(O[1])+" "+e[0]+"")}}else{h.val(e[0]+" ")}}}else if(t>1){var n="<b>"+v()+" "+Convert.htmlEscape(h.val())+"</b>"+"\n";m.find("pre").append(n);m.find("pre").append(Convert.htmlEscape(e.join("\n")+"\n"));b.scrollTop(b[0].scrollHeight)}setTimeout(function(){h.focus().mousedown()},10)},error:function(e){session.status(e.responseText)}})}}).on("keyup"+k+"",function(n){var g=this,b=e(),x=$(".modal-shell-config:visible").length;if(b&&!x){var y=0,k=0,A=0,w=$(".form-control.sidebar-search"),C=t(),S=$('select[name="sid"]').val(),I=0;var T=a();if(!T){return}if(b||w.is(":focus")){if(n.keyCode===8){vars.shell.history=0}}if(b){y=$.trim(h.val());k=1;A=1}else{y=w.val();k=typeof w.val()!="undefined";A=0}if((A||k&&(!y.trim()||y.trim().startsWith("!")))&&(n.keyCode==38||n.keyCode==40)){n.preventDefault();n.stopPropagation();typeof localStorage.getItem(v___server_hostname+"-"+"shell_commands")=="undefined"?localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify({})):false;var V=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),E=V?V.length:0;if(vars.shell.history===0&&!y&&n.keyCode==40){return}else if(vars.shell.history===0&&y&&n.keyCode==38){I=1;return}else{vars.shell.history=n.keyCode==40?++vars.shell.history:--vars.shell.history}if(vars.shell.history<0&&n.keyCode===38){vars.shell.history=E-1}else if(vars.shell.history>E){vars.shell.history=0}if(V&&V[vars.shell.history%E]){if(!$.isEmptyObject(V)&&(vars.shell.history==E&&n.keyCode===38||vars.shell.history==E&&n.keyCode===40||I)){if(b){h.val("").focus()}else{w.val("").focus()}vars.shell.history=0;return}if(b){var O=V[vars.shell.history%E].replace(/^!/,"");h.val(Convert.htmlUnEscape(O)).focus()}}return}else if(k&&y.trim().startsWith("!")&&n.keyCode==27){n.preventDefault();n.stopPropagation();w.val("").focus();return}if(k&&y.trim().startsWith("!")&&n.keyCode==13){w.addClass("_shell_form_");n.preventDefault();n.stopPropagation();if(core.moduleAvailable("shell")==1||C){h.val(y.trim().substring(1)).focus();d();var j=$.Event("keyup");j.keyCode=13;h.trigger(j)}}var z=s.find(".-shell-port-container"),M=s.find(".-shell-port-pwd"),q=M.attr("data-pwd"),U=$.trim(h.val()),Z=0,J=n.keyCode?n.keyCode:n.which,K=(n.altKey||n.ctrlKey)&&String.fromCharCode(n.which).toLowerCase()=="l";if(!h.is(":focus")&&!check_selected_text()){if(!n.ctrlKey&&!n.altKey&&!n.shiftKey&&!n.metaKey){h.val(h.val()+String.fromCharCode(n.which).toLowerCase())}h.focus()}if(U&&J===13||K){if(z.find("[data-searching]").length){return}if(core.moduleAvailable("shell")||C){if(vars.shell.processing===1){return}vars.shell.processing=1;if(U==="clear"||U==="reset"||U==="exit"||K){m.find("pre").html("");_(h);if(U=="exit"){f()}}if(U==="cd ~"){Z=U;U="cd "+M.attr("data-home")}var W=false;if(U==="cd /"){W="/"}if(U==="history -c"){localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify({}));var R="<b>"+v()+" "+Convert.htmlEscape(U)+"</b>"+"\n";m.find("pre").append(R);_(h);z.scrollTop(z[0].scrollHeight);var D=r(T,C,null,q),P=new FormData($(D)[0]);$.ajax({type:"POST",url:T+"?fetch-content=1",data:P,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(!session.status(e)){return}o(U);vars.shell.processing=0},error:function(e){}});return}else if($.trim(U).startsWith("history -d")){var N=U.split(" "),Q=N[2];if(Q&&Q.length&&Test.numeric(Q)){$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-shell-pop="+Q+"&xhr-shell-cms="+C+"&xhr-shell-cmsid="+S,data:false,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(e=="1"){var t=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands"));localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(t.filter(function(e,t){return t!==parseInt(Q)-1})))}o(U)},error:function(e){}})}_(h);vars.shell.processing=0;return}else if(U.startsWith("history")){_(h);var L=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"shell_commands")),G=L?L.length:0,H=G?G.toString().length:0,R="<b>"+v()+" "+Convert.htmlEscape(U)+"</b>"+"\n";$.each($(L),function(e,t){var a=e.toString().length,n="";for(i=0;i<H+1-a;i++){n+=" "}typeof t=="string"&&(R+=e+1+n+t+"\n")}).promise().done(function(){m.find("pre").append(R);z.scrollTop(z[0].scrollHeight);o(U)});vars.shell.processing=0;return}var X=["vim","vi","emacs","nano","edit","editor","view","viewer"],F=U.split(" "),B=F[0],Y=F[1];if(B&&Y&&X.some(function(e){return e===$.trim(B)})){var ee=m.find("pre"),te="<b>"+v()+" "+Convert.htmlEscape(h.val()),ae=B==="view"?1:0,ie=ae?"viewer":"editor";var ne=get_access_level();if(ne==2||ne==3){var se=new RegExp("^"+get_user_home(),"");q=q.replace(se,"");if(!q){q="/"}}if(Y.endsWith("/")||Y.includes("../")||F&&F[1].includes("/")&&!F[1].startsWith("/")){ee.append(te+" </b>\nCan not open file "+ie+". Unsupported path expression.\n");l(_e,h,z);return}edit_file(F[1],q,[{call:"plugins.shell.toggle"},{call:"plugins.shell.done",params:[_e,h,z]},{call:"plugins.shell.close"}],ae,0,0,ae?1:0);ee.append(te+" </b>\nRedirected for opening in internal file "+ie+". "+theme_spinner_small(undefined,"white command-shell-editor-spinner smaller2")+"\n");p(1);z.scrollTop(z[0].scrollHeight);o(U);return}if($.trim(U)==="clear"||$.trim(U)==="reset"||$.trim(U)==="exit"||K){vars.shell.processing=0;vars.shell.history=0;u();h.focus();!K&&o(U);return}var re=r(T,C,U,q),oe=new FormData($(re)[0]);h.attr("readonly","true");var le=0,ce=0,_e=".-shell-port-cmd",de=".-shell-port-container",fe=false,pe=0;g.shell_request=$.ajax({xhr:function(){var e=new window.XMLHttpRequest;e.addEventListener("progress",function(e){var t=e.target.responseText;if(!session.status(t)){g.shell_request.abort();return}if(t&&t.length&&/[\x1B]/.test(t)){pe=1;g.shell_request.abort();return}t?ce++:false;if(ce>=1&&!le){if(t){$(_e).after("<pre></pre>");le++;$(de).addClass("progressing")}}else if(le){var a=extract_content(t,"<pre>","</pre>",1);if(a){a=a.replace(/<(b)[^>]*>[^<]*(<\/b>)/i,"");a=c(a);fe=a;$(_e).next("pre").replaceWith(a)}z.scrollTop(z[0].scrollHeight)}},false);return e},type:"POST",url:T+"?fetch-content=1",data:oe,dataType:"text",cache:false,contentType:false,processData:false,complete:function(e){$(de).removeClass("progressing");var t=e.status;e=e.responseText;if(!session.status(e)){return}var a=$.trim(U)==="reboot",i=$.trim(U)==="shutdown -h now";if(pe||t!==200||get_access_level()!==3&&(a||i)){var n=theme_language("shell_aborted");if(a){n="The system is rebooting.."}else if(i){n="The system has been powered off!"}var s=t!==200?extract_content(fe,"<pre>","</pre>",0)+(g.shell_request_interrupted?"\n^C":String()):n;if(fe===false){s="Cannot establish connection to the host."}m.find("pre").append("<b>"+v()+" "+Convert.htmlEscape(h.val())+" </b>\n"+s+"\n");o(U);l(_e,h,z);return}var r=v(),_=$(e).find("pre").length?$(e).find("pre"):$(e).filter("pre"),d=_.html().replace(/>&gt;/g,">"+r+""),f=$(e).find('input[name="previous"][type="hidden"]').map(function(){return Convert.htmlEscape($(this).val())}).get();localStorage.setItem(v___server_hostname+"-"+"shell_commands",JSON.stringify(f));var p=$(e).find('input[name="pwd"]').val();newPwd=p||q;d=c(d);if(!p){d+="\n"}m.find("pre").append(Z?d.replace(new RegExp(U,"g"),Z):d);M.text(W?W:newPwd==M.attr("data-home")?"~":newPwd.split("/").filter(function(e){return $.trim(e)}).slice(-1)[0]).attr("data-pwd",Convert.htmlEscape(W?W:newPwd)).attr("title",Convert.htmlEscape(W?W:newPwd));if(U==="cd .."&&newPwd==="/"){M.text("/")}l(_e,h,z)},error:function(e){}})}}}})},v=function(){return Convert.htmlEscape($(".-shell-port-type").text())};return{type:t,init:m,status:e,link:n,unlock:s,open:d,close:f,toggle:p,done:l,available:g,adjust:u,set:h}}();plugins.favicon=function(){var e=function(e){a.badge(e);titlenotifier.set(e);a.lastNum=e};var t=0;if(typeof a==="object"&&a.lastNum){t=a.lastNum}var a=new Favico({animation:"none"});e(t);return{set:e}}();plugins.slider=function(){var test_visibility=function(){if(settings_side_slider_fixed!==true||$(".mobile-menu-toggler:visible").length&&!vars.navigation.pinned||!$.support.spa||settings_side_slider_fixed===true&&window.matchMedia("(max-width: 1365px)").matches){set_visibility(0)}else{set_visibility(1)}},set_visibility=function(e,t){if(vars.slider.pinned===1&&!e&&$(".right-side-tabs i.fa2-collapse-right:visible").length){return}var a=session.server.data("access-level"),i="right-side-tabs",n="body ."+i+"",s=""+i+"-fixed",r="data-slider-fixed";if(a!="0"){return}if(e){$(n+"-toggler").addClass("hidden");$(n).css("right","0px").addClass(s);if(settings_side_slider_enabled){session.server.data(r,"1")}}else{if(settings_side_slider_enabled){if(!t){$(n+"-toggler").removeClass("hidden opened").css("right","0")}else{$(n+"-toggler").removeClass("hidden").addClass("opened").css("right","300px")}}if(!t){$(n).css("right","-302px")}else{$(n).css("right","0px")}$(n).removeClass(s);session.server.data(r,"0")}},display_badges=function(){if(!settings_side_slider_enabled||!settings_side_slider_notifications_enabled){return}var e="right-side-tabs",t="right-side-tab-notification-asterix",a="faa-ring faa-slow animated-hover",i="toggler button",n="i.fa-bell",s="span.badge",r="hidden hidden-force",o=$("."+e+" .list-group-item:not(.no-notifications, .opacity-0_3)").length;plugins.favicon.set(o);if(o>0){$("."+e+"-"+i+" "+s+"").removeClass(r).text(o);$("#"+e+" ."+t+"").removeClass(r).text(o)}else{$("."+e+"-"+i+" "+s+"").addClass(r).text(0);$("#"+e+" ."+t+"").addClass(r).text(0)}},check_notifications=function(){var $current_localData_notifications={};$.each(localStorage,function(e,t){if(typeof e=="string"&&e.indexOf("notifications_")>-1&&e.indexOf(v___server_hostname)>-1){var a=e.split("_")[1],i=JSON.parse(t),n=i.title,s=i.time,r=i.timestamp,o=i.message,l=i.readStatus,c=i.type,_=i.link;var d=s+"_"+n;if(c==="csf_deny"){d=s+"_"+n.replace(/\W/g,"")+o.replace(/\W/g,"")}$current_localData_notifications[d]=JSON.stringify({id:a,title:n,time:s,timestamp:r,message:o,readStatus:l,type:c,link:_});if($('.list-group-item[id="'+a+'"][data-type="'+c+'"]').length){$('.list-group-item[id="'+a+'"][data-type="'+c+'"] .list-group-item-heading small').text(dayjs.unix(s).fromNow())}}});var package_message_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("package_message")>-1}).length,csf_remote_version_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("csf_remote_version")>-1}).length,authentic_remote_version_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("authentic_remote_version")>-1}).length,csf_title_num=Object.values($current_localData_notifications).filter(function(e){return e.indexOf("csf_title")>-1}).length;var keys=[];for(var key in $current_localData_notifications){if($current_localData_notifications.hasOwnProperty(key)){keys.push(key)}}$.each(keys.sort(),function(i,v){var vx=$current_localData_notifications[v],vxData=Test.json(vx);if(!vxData){return true}var $__id__=vxData.id,$__data__title=vxData.title,$__data__time=vxData.time,$__data__timestamp=vxData.timestamp,$__data__message=vxData.message,$__data__readStatus=vxData.readStatus,$__data__type=vxData.type,$__data__link=vxData.link;if($__data__type=="package_message"||$__data__type=="csf_remote_version"||$__data__type=="authentic_remote_version"||$__data__type=="csf_title"){var $__num=eval($__data__type+"_num");if(i+1<$__num){$__data__readStatus=1}}if(!$('.list-group-item[id="'+$__id__+'"][data-type="'+$__data__type+'"]').length){add_notification($__id__,$__data__title,$__data__time,$__data__timestamp,$__data__message,$__data__readStatus,$__data__type,$__data__link)}})},remove_all_notifications=function(){$.each(localStorage,function(e,t){if(typeof e=="string"&&e.indexOf("notifications_")>-1&&e.indexOf(v___server_hostname)>-1){delete localStorage[e]}})},mark_notification_read=function(e,t,a,i){var n=JSON.parse(localStorage.getItem(v___server_hostname+"-"+"notifications_"+e+"_"+t));if(n){localStorage.setItem(v___server_hostname+"-"+"notifications_"+e+"_"+t,JSON.stringify({title:n.title,time:n.time,timestamp:n.timestamp,message:n.message,readStatus:a,type:n.type,link:n.link}))}i&&display_badges()},mark_group_notifications_read=function(e){var t="";if(e){t='[data-type="'+e+'"]'}$(".right-side-tabs .list-group-item"+t+":not(.no-notifications)").each(function(){$(this).addClass("opacity-0_3");mark_notification_read($(this).attr("id"),$(this).data("type"),1,0)}).promise().done(function(){display_badges()})},add_notification=function(e,t,a,i,n,s,r,o){var l=o&&(o.includes("http://")||o.includes("https://")||o.includes("ftp://")||o.includes("ftps://"))?' data-target="external"':"",c=l?"data-href":"href";$(".right-side-tabs .list-group").prepend('        <a class="list-group-item right-side-tabs-notification'+(s=="1"?" opacity-0_3":"")+'" data-type="'+r+'" id="'+e+'"'+l+" "+c+'="'+o+'">            <div class="media-body">            <i class="fa fa-fw fa-trash-o pull-right hidden"></i>            <i class="fa fa-fw fa-clear-all pull-right hidden"></i>                <div class="list-group-item-heading">'+t+" <small>"+dayjs.unix(a).fromNow()+"</small></div>                <small>"+n+"</small>            </div>        </a>        ");$(".right-side-tabs-no-notifications").remove();display_badges();if(!v___initial_load){mark_no_notifications()}},mark_no_notifications=function(){var e=browser.detect.safari(1),t=e?2:0;var a=function(){var e=theme_language("notification_none");$(".right-side-tabs .list-group").prepend('          <div class="right-side-tabs-no-notifications" style="opacity: 0">          <div class="list-group-item text-center no-notifications">          <small class="list-group-item-text text-lighter">'+e.toUpperCase()+"</small>          </div>          </div>        ");$(".right-side-tabs-no-notifications").animate({opacity:"1"},175,function(){})};if($(".right-side-tabs .list-group-item").length===0){if(e){setTimeout(function(){a()},2)}else{a()}}setTimeout(function(){display_badges()},175+t)},update_right_pane_favorites=function(){if(typeof plugins.favorites.fetch!="function"){return}var e=plugins.favorites.fetch(),t=$("#right-side-tabs .no-favorites_data");$("#right-side-tabs .favorites-dcontainer .right_pane_favorites_link, #right-side-tabs .favorites-dcontainer .right_pane_favorites_num").remove();if(e.length){$.each(e,function(e,t){var a=$("#right-side-tabs .favorites-dcontainer");if(session.server.data("webprefix")&&!t.link.includes("!edit")&&!t.link.includes("!view")){t.link=session.server.data("webprefix")+t.link}var i=Convert.htmlEscape(t.title);a.append('<span class="right_pane_favorites_num">'+(e+1)+'</span><a class="right_pane_favorites_link" target="page" href="'+Convert.quoteEscape(t.link)+'"><i data-product="'+t.icon+'" class="wbm-'+t.icon+""+(t.icon=="virtualmin"?"":"")+' wbm-sm">&nbsp;&nbsp;</i><span title="'+i+'" class="right_pane_favorites_text">'+i+"</span></a>")});t.addClass("hidden")}else{t.removeClass("hidden")}},sysinfo_update=function(){var e=this;if(e.running){return}e.running=1;if($("body .modal:not(.user_motd_data).in").length){return}if(!t){var t=session.server.data("webprefix")}if(v___user_level==0){var a=$("body").find("#system-status"),i=a.length?a[0]:0;var n=function(){$_____________got_rp__sys_dat=1;var e=core.moduleAvailable("package-updates"),t=core.moduleAvailable("proc")?"":" pointer-events-none",a=core.moduleAvailable("disk-usage")||core.moduleAvailable("quota")?"":" pointer-events-none",i=""+(e?"":' class="hidden"')+"",n=localStorage.getItem(v___server_hostname+"-sysinfo_package_message");var s=vars.local_storage?String():" hidden",r=$(localStorage.getItem(v___server_hostname+"-sysinfo_local_time")).attr("data-convertible-timestamp-full");return'          <div class="is-sysinfo_data hidden">            <div class="graph-container graph-container-fw cpu_percent'+t+s+'"><div class="graph"><div class="description" title="'+localStorage.getItem(v___server_hostname+"-sysinfo_cpu")+'">'+theme_language("global_cpu_load")+": "+localStorage.getItem(v___server_hostname+"-sysinfo_cpu_percent_stats")+"% ("+localStorage.getItem(v___server_hostname+"-sysinfo_cpu")+')</div><strong class="bar" style="width:'+localStorage.getItem(v___server_hostname+"-sysinfo_cpu_percent_stats")+'%"></strong></div></div><br class="'+s+'">            <div class="graph-container graph-container-fw mem_percent'+t+s+'"><div class="graph"><div class="description" title="'+localStorage.getItem(v___server_hostname+"-sysinfo_mem")+'">'+theme_language("body_real")+": "+localStorage.getItem(v___server_hostname+"-sysinfo_mem_percent_stats")+"% ("+localStorage.getItem(v___server_hostname+"-sysinfo_mem")+')</div><strong class="bar" style="width:'+localStorage.getItem(v___server_hostname+"-sysinfo_mem_percent_stats")+'%"></strong></div></div><br class="'+s+'">            <div class="graph-container graph-container-fw virt_percent'+t+s+'"><div class="graph"><div class="description" title="'+localStorage.getItem(v___server_hostname+"-sysinfo_virt")+'">'+theme_language("body_virt")+": "+localStorage.getItem(v___server_hostname+"-sysinfo_virt_percent_stats")+"% ("+localStorage.getItem(v___server_hostname+"-sysinfo_virt")+')</div><strong class="bar" style="width:'+localStorage.getItem(v___server_hostname+"-sysinfo_virt_percent_stats")+'%"></strong></div></div><br class="'+s+'">            <div class="graph-container graph-container-fw disk_percent'+a+s+'"><div class="graph"><div class="description" title="'+localStorage.getItem(v___server_hostname+"-sysinfo_disk")+'">'+theme_language("body_disk")+": "+localStorage.getItem(v___server_hostname+"-sysinfo_disk_percent_stats")+"% ("+localStorage.getItem(v___server_hostname+"-sysinfo_disk")+')</div><strong class="bar" style="width:'+localStorage.getItem(v___server_hostname+"-sysinfo_disk_percent_stats")+'%"></strong></div></div><br class="'+s+'">                        <div data-stats="cpu" style="height: 10px"></div><strong data-stats="cpu">'+theme_language("body_cputemps")+'</strong><br data-stats="cpu">'+(localStorage.getItem(v___server_hostname+"-sysinfo_cpu_temperature")?localStorage.getItem(v___server_hostname+"-sysinfo_cpu_temperature").replace(/<br>|&nbsp;/gi,""):"")+'<br data-stats="cpu">            <div data-stats="fans" style="height: 10px"></div><strong data-stats="fans">'+theme_language("body_cpufans")+'</strong><br data-stats="fans">'+(localStorage.getItem(v___server_hostname+"-sysinfo_cpu_fans")?localStorage.getItem(v___server_hostname+"-sysinfo_cpu_fans").replace(/<br>|&nbsp;/gi,""):"")+'<br data-stats="fans">            <div data-stats="drive" style="height: 10px"></div><strong data-stats="drive">'+theme_language("body_drivetemps")+'</strong><br data-stats="drive">'+(localStorage.getItem(v___server_hostname+"-sysinfo_hdd_temperature")?localStorage.getItem(v___server_hostname+"-sysinfo_hdd_temperature").replace(/<br>|&nbsp;/gi,""):"")+'<br data-stats="drive">                        <div class="info-list-data">              <strong>'+theme_language("body_host")+'</strong><br><span data-data="host">'+localStorage.getItem(v___server_hostname+"-sysinfo_host")+"</span>              <strong>"+theme_language("body_os")+'</strong><br><span data-data="os">'+localStorage.getItem(v___server_hostname+"-sysinfo_os")+"</span>              <strong>"+theme_language("body_time")+'</strong><br><span data-data="local_time">'+(r&&localStorage.getItem(v___server_hostname+"-sysinfo_local_time")?dayjs.unix(r).utcOffset(get_utc_offset()).format(config_portable_theme_locale_format_long):localStorage.getItem(v___server_hostname+"-sysinfo_local_time"))+"</span>              <strong>"+theme_language("body_kernel")+'</strong><br><span data-data="kernel_arch">'+localStorage.getItem(v___server_hostname+"-sysinfo_kernel_arch")+"</span>              <strong>"+theme_language("body_uptime")+'</strong><br><span data-data="uptime">'+localStorage.getItem(v___server_hostname+"-sysinfo_uptime")+"</span>              <strong>"+theme_language("body_procs")+'</strong><br><span data-data="proc">'+localStorage.getItem(v___server_hostname+"-sysinfo_proc")+"</span>              <strong"+i+">"+theme_language("body_updates")+"</strong><br"+i+'><span data-data="package_message"'+i+">"+(n&&n!=="null"?$(n).html($(n).html().split(",")[0])[0].outerHTML:"")+'</span>            </div>            <div class="warning-list-data">            </div>            <div class="extended-list-data">            </div>                      </div>          <div class="no-sysinfo_data">              <div style="height: 5px"></div>              <small class="list-group-item-text text-lighter">'+theme_language("notification_no_data").toUpperCase()+"</small>          </div>        "};if(!$("#right-side-tabs-sysinfo .graph-container").length){$("#right-side-tabs .info-container").html(n())}var s=$("#system-status, #extended_sysinfo-1"),r=$(".right-side-tabs-dismiss .fa-reload, ._sync_sysinfo_.fa-reload");r.addClass("fa-spin-fast cursor-na");s.addClass("updating");$.ajax({type:"GET",url:t+"/index.cgi/?xhr-info=1",dataType:"json",complete:function(){e.running=0;r.removeClass("fa-spin-fast cursor-na");s.removeClass("updating")},success:function(e){$.each(e[0],function(e,a){var n=$('#right-side-tabs [data-data="'+e+'"]'),s="hidden hidden-force";n=n.add(n.prev("br"));n=n.add(n.prev("strong"));if(a!=null){n.removeClass(s)}else{n.addClass(s)}if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){if(Test.numeric(a)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats",a)}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats","")}}if(i){$(i).find('span[data-id="sysinfo_'+e+'"]').html(a);if(e=="local_time"||e=="uptime"||e=="proc"){var r=$(i).find('span[data-id="sysinfo_'+e+'"]'),o=r.find("a").length?r.find("a"):r.find("span"),l=o,c=$(i).find('span[data-id="sysinfo_'+e+'"]').text();if(e=="local_time"){snippets.datetime.tictac(1)}else{l&&l.length&&r.html(l.html(c))}}page_sysinfo_sensor_update_label();if($(i).find('.piechart[data-charts="sysinfo_'+e+'"]').length){var _=$("body").find('.piechart[data-charts="sysinfo_'+e+'"]');if(_.length&&!isNaN(parseInt(a))){_.data("easyPieChart")&&_.data("easyPieChart").update(a)}}if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e+"_seen",a)}$(i).find(".modal-backdrop").remove()}$__id__=dayjs().unix();if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"||e=="csf_title"||e=="csf_remote_version"||e=="authentic_remote_version"||e=="package_message"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}}else{if(!a||a==null||a==NaN){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,"")}else{localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}}if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")){localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",1)}if(e=="authentic_theme_version"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_theme_current_version")&&a){var d=$.trim(a),f=d.match(/^(\S+)/)[1];if(!f.match(/^\d/)){f=d.match(/a>\s*(\S+)/)[1];if(f.endsWith(".")){f=f.substring(0,f.length-1)}}localStorage.setItem(v___server_hostname+"-"+"sysinfo_theme_current_version",f)}}if(e=="csf_data"){if(!localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version")&&a&&a.match(/>\s*([\d\.]+)\s*|(&nbsp;)+<\//)){localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_current_version",a.match(/>\s*([\d\.]+)\s*|(&nbsp;)+<\//)[1])}}if(e=="csf_title"||e=="csf_data"||e=="csf_remote_version"||e=="authentic_remote_version"||e=="authentic_theme_version"||e=="package_message"){if(e==="package_message"){if(!core.curModuleFile("package-updates","update.cgi")){if((localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e)!=a||localStorage.getItem(v___server_hostname+"-"+"sysinfo_package_message_initial")==1)&&a&&a.indexOf("badge-danger")>-1){var p=theme_language("notifications_packages_updates"),u=$(a).html().replace(/badge-danger/g,"badge-success"),g=t+"/package-updates/index.cgi?mode=updates";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_package_message",JSON.stringify({title:p,time:$__id__,timestamp:$__id__,message:u,readStatus:0,type:e,link:g}));plugins.slider.notifications.dismiss("package_message");localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a);localStorage.setItem(v___server_hostname+"-"+"sysinfo_package_message_initial",0);notifications(p,u,e,g)}else if(e==="package_message"){localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a)}if(!$(a).find("i.badge:first-child").length){plugins.slider.notifications.dismiss("package_message")}}}if(e=="authentic_remote_version"&&settings_sysinfo_theme_updates){var h="sysinfo_theme_current_version",m="sysinfo_"+e+"",v=localStorage.getItem(v___server_hostname+"-"+h),b=function(){return localStorage.getItem(v___server_hostname+"-"+m)},x=0;if(b()=="0"){localStorage.removeItem(v___server_hostname+"-"+m);x++}if(v&&(b()||x)){if(compareVersionNumbers(a,v)>0&&a!="0"&&a!="0.00"&&a!=null){if(a!=theme.version()){var y=theme_language("notifications_theme_update"),k=theme_language("notifications_theme_update_message").replace("%v",a),g=t+"/sysinfo.cgi";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_"+e+"",JSON.stringify({title:y,time:$__id__,timestamp:$__id__,message:k,readStatus:0,type:e,link:g}));localStorage.setItem(v___server_hostname+"-"+m,a);localStorage.setItem(v___server_hostname+"-"+h,a);notifications(y,k,e,g)}}}}if(e==="authentic_theme_version"&&!Test.strContains(a,"CHANGELOG.md")){plugins.slider.notifications.dismiss("authentic_remote_version")}if(settings_sysinfo_csf_updates){var A=localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_current_version");if(A&&A!=null&&localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_remote_version")){if(e=="csf_remote_version"&&A<a&&a!="0"&&a!="0.00"&&a!=null){var w=theme_language("notifications_firewall_update"),C=theme_language("notifications_firewall_update_message").replace("%v",a),g=t+"/csf/index.cgi";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_csf_remote_version",JSON.stringify({title:w,time:$__id__,timestamp:$__id__,message:C,readStatus:0,type:e,link:g}));plugins.slider.notifications.dismiss("csf_remote_version");localStorage.setItem(v___server_hostname+"-"+"sysinfo_"+e,a);localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_current_version",a);notifications(w,C,e,g)}}}if(e==="csf_data"&&Test.strContains(a,"data-no-update")){plugins.slider.notifications.dismiss("csf_remote_version")}if(e=="csf_title"){if(a&&a.indexOf("label-danger")>-1&&localStorage.getItem(v___server_hostname+"-"+"sysinfo_csf_not_running")!=1){var S=theme_language("notifications_firewall_danger"),I=theme_language("notifications_firewall_danger_message").replace("%v",dayjs.unix($__id__).format(config_portable_theme_locale_format_long)),g=t+"/csf/index.cgi?action=lfdstatus";localStorage.setItem(v___server_hostname+"-"+"notifications_"+$__id__+"_csf_title",JSON.stringify({title:S,time:$__id__,timestamp:$__id__,message:I,readStatus:0,type:e,link:g}));plugins.slider.notifications.dismiss("csf_title");localStorage.setItem(v___server_hostname+"-"+"sysinfo_csf_not_running",1);notifications(S,I,"csf_remote_version",g)}else if(a&&a.indexOf("label-danger")===-1){plugins.slider.notifications.dismiss("csf_title");localStorage.removeItem(v___server_hostname+"-"+"sysinfo_csf_not_running")}}}if(e==="local_motd"&&a){$.each(a,function(t,a){a.forEach(function(a){var i=a.time.substring(0,10),n=a.msg,s=i+""+t.replace(/[_]+/g,"--"),r=function(t){return v___server_hostname+"-"+""+t+"_"+s+"_"+e};if(session.server.data("user")===t&&config_portable_notifications_self===false){return true}if(!localStorage.getItem(r(e))){var o=theme_language("notifications_motd"),l=theme_language("notifications_motd_says").replace("$1",'<i class="label font-style-normal notifications-motd-user-label"> <span class="font-size-125p">'+t+"</span></i>")+": &nbsp;",c=l+n,_=theme_language("notifications_motd_says").replace("$1",t)+": "+n,d="",f=n.match(/(?:<a.*?href=\s*['"](.*?)['">])|(?:<a.*?href=\s*(.*?)[\s*>])/);if(f&&(f[1]||f[2])){d=f[1]||f[2];if(d&&(d.startsWith("http:")||d.startsWith("https:")||d.includes("ftp:")||d.includes("ftps:")||d.startsWith("//"))){c=c+' <i class="fa fa-fw fa-external-link"></i>'}else if(d){c=c+' <i class="fa fa-fw fa-link"></i>'}c=c.replace(/<a.*?>/gi," ");c=c.replace(/<\/a>/gi," ")}localStorage.setItem(r("notifications"),JSON.stringify({title:o,time:parseInt(i),timestamp:parseInt(i),message:c,readStatus:0,type:e,link:d}));localStorage.setItem(r(e),1);notifications(o,_,e,d)}})})}else if(e=="csf_deny"){var T=JSON.parse(a);$.each(T,function(a,i){i=i.split("|");var n=i[0],s=i[1],r=i[2],o=i[3],l=i[4],c=i[5],_=i[6],d=i[7];d=d.replace("*Port Scan*",r&&o?'Port <i data-port-href="http://www.speedguide.net/port.php?port='+o+'" class="badge bg-dark-red">'+o+"</i> scan":"Port scan");if(!localStorage.getItem(v___server_hostname+"-"+"allowed_trigger_"+(n+s.replace(/\./g,"0"))+"_csf_deny")){var f=theme_language("notifications_firewall_warning"),p=d+(r&&o?" <span>("+r+":"+o+")</span>":""),u=t+"/csf/index.cgi?action=temp";localStorage.setItem(v___server_hostname+"-"+"notifications_"+(n+s.replace(/\./g,"0"))+"_csf_deny",JSON.stringify({title:f,time:$__id__,timestamp:$__id__,message:p,readStatus:0,type:e,link:u}));localStorage.setItem(v___server_hostname+"-"+"allowed_trigger_"+(n+s.replace(/\./g,"0"))+"_csf_deny",1);notifications(f,p,e,u)}})}else if(e=="cpu_percent"||e=="mem_percent"||e=="virt_percent"||e=="disk_percent"){var V=$("#right-side-tabs .graph-container-fw."+e+""),E="hidden-force";V=V.add(V.next("br"));if(a!=null){V.removeClass(E)}else{V.addClass(E)}}if(localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")||localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")){if($("#right-side-tabs-sysinfo .graph-container").length){var O=!localStorage.getItem(v___server_hostname+"-"+"sysinfo_"+e+"_stats"),j=$(".info-container .graph-container."+e+"");O?j.addClass("hidden").next("br").addClass("hidden"):j.removeClass("hidden").next("br").removeClass("hidden");if(e=="cpu_percent"){var z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu"),M=z?"("+z+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu")).text(""+theme_language("global_cpu_load")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")+"% "+M+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_cpu_percent_stats")+"%")}if(e=="mem_percent"){var q=localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem"),U=q?"("+q+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem")).text(""+theme_language("body_real")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")+"% "+U+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_mem_percent_stats")+"%")}if(e=="virt_percent"){var Z=localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt"),J=Z?"("+Z+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt")).text(""+theme_language("body_virt")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")+"% "+J+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_virt_percent_stats")+"%")}if(e=="disk_percent"){var K=localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk"),W=K?"("+K+")":String();$("#right-side-tabs-sysinfo .graph-container."+e+" .description").attr("title",localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk")).text(""+theme_language("body_disk")+": "+localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")+"% "+W+"");$("#right-side-tabs-sysinfo .graph-container."+e+" .bar").attr("style","width:"+localStorage.getItem(v___server_hostname+"-"+"sysinfo_disk_percent_stats")+"%")}}}$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]').html(a);if(e=="package_message"&&core.moduleAvailable("package-updates")){var R=a;R&&$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]').html($(R).html($(R).html().split(",")[0])[0].outerHTML)}if(e=="local_time"){var D=$('#right-side-tabs .info-container .info-list-data span[data-data="'+e+'"]'),P=D.find("a").length?D.find("a"):D.find("span");if(P&&P.length){P.html(P.next("span").detach())}if(settings_theme_make_date){snippets.datetime.tictac(1)}else{D.html(a)}}if(e=="cpu_temperature"||e=="cpu_fans"){var N=0,Q="strong",L=e==="cpu_fans"?true:false,G="#right-side-tabs .info-container .badge-drivestatus.badge",H=L?"cpufans":"cpustatus",X=L?"fans":"cpu",F='.info-container [data-stats="'+X+'"]',B=".badge-"+H+"";$.each($(a).filter(B),function(e,t){var i="",n=$(this).text(),s=n.split(":"),r=s[1]||s[0],o=r;if(L){i=HTML.label.textMaxLevels("rpm",o)}else{i=HTML.label.textMaxLevels("temperature",r)}if(i=="bg-warning"||i=="bg-danger"){N=1}if(!$(""+G+"-"+H+"").length){$(""+Q+'[data-stats="'+X+'"] + br[data-stats="'+X+'"]').after(a.replace(/<br>|&nbsp;/gi,""))}$($(""+G+"-"+H+"")[e]).html($(this).text()).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(i+"-dark")}).promise().done(function(){var e=$(F).filter(Q),t=$(F).filter(B).length,i=H=L?"cpufan":"cputemp",n=t===1?i:i+"s";e.text(theme_language("body_"+n+""));if(N||a&&settings_sysinfo_cpu_and_fans_side_slider_always_show){$(F).removeClass("hidden")}else{$(F).addClass("hidden")}})}if(e=="hdd_temperature"){var Y=0;$.each($(a).filter(".badge-drivestatus:not(.badge-cpustatus)"),function(e,t){var i="",n=$(this).text(),s=n.split(":"),r=s[1]||s[0];i=HTML.label.textMaxLevels("temperature",r);if(i=="bg-warning"||i=="bg-danger"){Y=1}if(!$("#right-side-tabs .info-container .badge-drivestatus:not(.badge-cpustatus)").length){$('strong[data-stats="drive"] + br[data-stats="drive"]').after(a.replace(/<br>|&nbsp;/gi,""))}$($("#right-side-tabs .info-container .badge-drivestatus:not(.badge-cpustatus)")[e]).html($(this).text()).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(i+"-dark")}).promise().done(function(){if(Y||a&&settings_sysinfo_cpu_and_fans_side_slider_always_show){$('.info-container [data-stats="drive"]').removeClass("hidden")}else{$('.info-container [data-stats="drive"]').addClass("hidden")}})}if(e=="warning_si"){var ee=$("#right-side-tabs .info-container .warning-list-data"),te=a.replace(/<(script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/type='submit'/g,"formtarget='page' type='submit'").replace(/ui_form_end_submit" type="button"/g,'ui_form_end_submit" type="submit" formtarget="page"');ee.html(te);if(a==="<br>"){ee.empty()}plugins.dashboard.update.alerts(a);plugins.dashboard.update.alertsHTML()}if(e=="extended_si"){var ee=$("#right-side-tabs .info-container .extended-list-data");var ae=a.replace(/aria-expanded="true"/gi,'aria-expanded="false"').replace(/collapse in/gi,"collapse");opened_tabs=$("#extended_sysinfo .panel .in").map(function(){ae=ae.replace('data-toggle="collapse" href="#'+this.id+'" aria-expanded="false" aria-controls="'+this.id+'"','data-toggle="collapse" href="#'+this.id+'" aria-expanded="true" aria-controls="'+this.id+'"');ae=ae.replace('div id="'+this.id+'" class="panel-collapse collapse"','div id="'+this.id+'" class="panel-collapse collapse in"')}).promise().done(function(){ee.html('<div style="height: 11px"></div>'+ae);var e=$("#right-side-tabs .extended-list-data");e.find("div.panel-heading:not(#mount_disks_info-mount):not(#status_services-status):not(#status-virtual-server):not(#acl_logins-acl):not(#sysinfo-virtual-server):not(#quota-virtual-server):not(#bw-virtual-server)").parent().remove();$.each(e.find("div.panel-heading .panel-title"),function(){var e=$(this).find("a"),t=$(this).find("a").attr("aria-expanded")!="true"?1:0,a=t?"+":"—";$(this).append('<span class="pull-right panel-title-status'+(t?" margined-right-2":"")+'">'+a+"</span>");e.text(Convert.strUpFirst($.trim(e.text())))});e.find(".panel.panel-default").detach().appendTo("#right-side-tabs #extended_sysinfo");e.find("div.panel-body").find("img").remove();e.find('input[type="submit"]').addClass("btn btn-default btn-xs");e.find('input[type="submit"]').parents("form").attr("formtarget","page");e.find('button[type="button"].ui_submit').addClass("btn btn-default btn-xs");e.find('button[type="button"].ui_submit').parents("form").attr("formtarget","page");var t=e.find('[data-referrer="acl_logins"] .panel-body > table:first-child'),a="table-responsive";t.removeClass().addClass("table table-striped table-hover");t.wrap('<div class="'+a+'"></div>');$("#extended_sysinfo .panel").on("show.bs.collapse",function(){$(this).find(".panel-title-status").removeClass("margined-right-2").text("—")}).on("hide.bs.collapse",function(){$(this).find(".panel-title-status").addClass("margined-right-2").text("+")})});try{theme_panels_sort("slider");if(v___location_file==="sysinfo.cgi"){var ie="extended_sysinfo",ne="data-referrer",se="panel",re=""+se+"-body",oe=$($.parseHTML(a)).filter("#"+ie+"");if(oe[0]){var le=$("#"+ie+"-1");if(le.length){$.each($(oe[0]).find("."+se),function(){var e=$(this).attr(ne);if(e==="live_stats"){return}var t=$(this).find("."+re).html();if(t){var a=le.find("."+se+"["+ne+'="'+e+'"]').find("."+re);if(a.length){a.html(t);var i=a.find("table"),n=a.find('[data-toggle="tooltip"]');if(i.length){$.each(i,function(){var e=$(this);if(e.find("thead").length){try{table_data_init(e)}catch(e){}}})}if(n.length){n.tooltip({placement:"auto bottom",container:a,trigger:"hover",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}}}}).promise().done(function(){snippets.page.render_links_dashboard()})}}}}catch(e){}}if(e=="collect_interval"){if(Test.numeric(a)){settings_side_slider_background_refresh_time=parseFloat(a)}else{settings_side_slider_background_refresh_time=0}}if($.trim($(".info-list-data").text()).length){setTimeout(function(){$("#right-side-tabs .is-sysinfo_data").removeClass("hidden");$("#right-side-tabs .no-sysinfo_data").addClass("hidden")},100)}});sysinfo_replace_dismiss_buttons();setTimeout(function(){plugins.slider.notifications.check()},3e3);setTimeout(function(){plugins.dashboard.update.formsURLs()},100);snippets.datetime.locale()},error:function(e){session.status(e.responseText)}});if(settings_side_slider_enabled){typeof iupdateTimer==="number"&&clearInterval(iupdateTimer);if(typeof settings_side_slider_background_refresh_time!="undefined"){var o=settings_side_slider_background_refresh_time,l=o+2;if(settings_side_slider_background_refresh_time>0){iupdateTimer=setInterval(function(){sysinfo_update()},l*6e4)}}}}};document.addEventListener("DOMContentLoaded",function(){var e=".right-side-tabs-dismiss i.fa-reload, ._sync_sysinfo_.fa-reload";$(document.body).on("click",e,function(){if($(this).hasClass("cursor-na")){return}var e=core.moduleAvailable("virtual-server")?"virtual-server":"system-status";var t=$("#system-status, #extended_sysinfo-1"),a=$(".right-side-tabs-dismiss .fa-reload, ._sync_sysinfo_.fa-reload");a.addClass("fa-spin-fast cursor-na");t.addClass("updating");$.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1",dataType:"JSON",complete:function(t){$.ajax({type:"GET",url:v___location_prefix+"/"+e+"/recollect.cgi",data:false,dataType:"text",success:function(e){if(!session.status(e)){return}if(v___location_file==="sysinfo.cgi"){get_pjax_content(v___location_prefix+"/sysinfo.cgi")}},complete:function(e){a.removeClass("fa-spin-fast cursor-na")},error:function(e){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-refresh-fi"></i>'+theme_language("sysinfo_update_failed"),20,"error","sysinfoRecollect")}})}})});if(v___user_level==0&&$.support.spa&&!theme.errors.onload()){var t=localStorage.getItem(v___server_hostname+"-"+"right-side-tab")?localStorage.getItem(v___server_hostname+"-"+"right-side-tab"):"#right-side-tabs-sysinfo",a='<div class="no-sysinfo_data"><div style="height: 5px"></div>'+'<small class="list-group-item-text text-lighter">'+theme_language("notification_no_data").toUpperCase()+"</small>"+"</div>",i='<div class="no-favorites_data"><div style="height: 4px"></div>'+'<small class="list-group-item-text text-lighter">'+theme_language("notification_no_favorites").toUpperCase()+"</small>"+"</div>";var n=String(),s=document.querySelector("aside");if(s&&s.style&&s.style.filter&&settings_side_slider_palette==="nav"){n="filter: "+s.style.filter}var r='<div style="'+n+'" id="right-side-tabs" class="'+(settings_side_slider_enabled?"":" hidden ")+"right-side-tabs"+(settings_side_slider_fixed?" right-side-tabs-fixed":"")+'" data-bgs="'+settings_side_slider_palette+'">'+'<ul class="nav nav-tabs" role="tablist">'+'<li role="presentation" class="'+(t=="#right-side-tabs-sysinfo"?"active ":"")+""+(settings_side_slider_sysinfo_enabled?"":" hidden")+'"><a href="#right-side-tabs-sysinfo" aria-controls="home" role="tab" data-toggle="tab">'+theme_language("titles_dashboard")+"</a></li>"+'<li role="presentation" class="'+(t=="#right-side-tabs-favorites"?"active ":"")+""+(settings_side_slider_favorites_enabled&&core.moduleAvailable("webmin")?"":" hidden")+'"><a href="#right-side-tabs-favorites" aria-controls="home" role="tab" data-toggle="tab">'+theme_language("global_favorites")+"</a></li>"+'<li role="presentation" class="'+(t=="#right-side-tabs-notifications"?"active ":"")+""+(vars.local_storage&&settings_side_slider_notifications_enabled&&(core.moduleAvailable("package-updates")==1||core.moduleAvailable("csf")==1)?"":" hidden")+'"><span class="right-side-tab-notification-asterix pointer-events-none hidden"></span><a href="#right-side-tabs-notifications" aria-controls="home" role="tab" data-toggle="tab">'+theme_language("global_notifications")+"</a></li>"+"</ul>"+'<div class="tab-content">'+'<div role="tabpanel" class="tab-pane'+(t=="#right-side-tabs-sysinfo"?" active":"")+""+(settings_side_slider_sysinfo_enabled?"":" hidden")+'" id="right-side-tabs-sysinfo">'+'<div class="info-container">'+""+a+"</div>"+"</div>"+'<div role="tabpanel" class="tab-pane'+(t=="#right-side-tabs-favorites"?" active":"")+""+(settings_side_slider_favorites_enabled&&core.moduleAvailable("webmin")?"":" hidden")+'" id="right-side-tabs-favorites">'+'<div class="favorites-dcontainer">'+""+i+"</div>"+"</div>"+'<div role="tabpanel" class="tab-pane'+(t=="#right-side-tabs-notifications"?" active":"")+""+(vars.local_storage&&settings_side_slider_notifications_enabled&&(core.moduleAvailable("package-updates")==1||core.moduleAvailable("csf")==1)?"":" hidden")+'" id="right-side-tabs-notifications">'+'<div class="list-group">'+"</div>"+"</div>"+'<div class="right-side-tabs-dismiss">'+'<i aria-label="'+theme_language("tooltip_side_slider_pinned")+'" data-target-tooltip-callback="tooltip_side_slider_pinned" data-trigger="side_slider_pinned" class="fa fa2 fa-fw fa-lg fa2-collapse-right"'+theme_inject_tooltip("tooltip_side_slider_pinned",".right-side-tabs","right",false,900)+"></i>"+'<i aria-label="'+theme_language("tooltip_side_slider_refresh_sysinfo")+'" data-target-tooltip-callback="tooltip_side_slider_refresh_sysinfo" class="fa fa-fw fa-lg fa-reload"'+theme_inject_tooltip("tooltip_side_slider_refresh_sysinfo",".right-side-tabs","right",false,900)+"></i>"+'<i aria-label="'+theme_language("tooltip_side_slider_open_favorites_control")+'" data-target-tooltip-callback="tooltip_side_slider_open_favorites_control" class="fa fa-fw fa-star-o right-side-tabs-favorites-ctl pull-right"'+theme_inject_tooltip("tooltip_side_slider_open_favorites_control",false,"left",false,900)+"></i>"+'<div class="dropdown obj-settings dropup pull-right">'+'<i aria-label="'+theme_language("global_settings")+'" data-target-tooltip-callback="global_settings" data-toggle="dropdown" class="dropdown-toggle fa fa-fw fa-lg fa-settings pull-right theme obj-settings"'+theme_inject_tooltip("global_settings",false,false,false,900)+'><b class="caret"></b></i>'+'<ul class="dropdown-menu ">'+'<li><a onclick="theme_cache_clear(this);return false" data-ss-dd-theme-clear>'+theme_language("settings_right_clear_local_cache")+"</a></li>"+'<li><a data-ss-dd-theme-configuration href="'+(v___location_prefix+"/tconfig.cgi")+'">'+theme_language("global_theme_configuration")+"</a></li>"+'<li class="divider"></li>'+'<li class="dropdown-submenu right" role="menu">'+'<a data-ss-dd-help tabindex="-1">'+theme_language("global_help")+"</a>"+'<ul class="dropdown-menu shifted-top--'+($("#open_virtualmin").length?"50":"")+'" role="menu">'+'<li class="dropdown-submenu right" role="menu">'+'<a data-ss-dd-webmin tabindex="-1">'+theme_language("titles_wm")+"</a>"+'<ul class="dropdown-menu shifted-top--20" role="menu">'+'<li><a data-ss-dd-whats-new href="http://webmin.com/changes.html" target="_blank" tabindex="-1">'+theme_language("global_whats_new")+"</a></li>"+'<li><a data-ss-dd-issue-report href="https://github.com/webmin/webmin/issues" target="_blank" tabindex="-1">'+theme_language("global_report_an_issue")+"</a></li>"+"</ul>"+"</li>"+'<li class="dropdown-submenu right'+($("#open_virtualmin").length?"":" hidden")+'" role="menu">'+'<a data-ss-dd-virtualmin tabindex="-1">'+theme_language("titles_vm")+"</a>"+'<ul class="dropdown-menu shifted-top--10" role="menu">'+'<li><a data-ss-dd-whats-new href="http://webmin.com/vchanges.html" target="_blank" tabindex="-1">'+theme_language("global_whats_new")+"</a></li>"+'<li><a data-ss-dd-issue-report href="https://github.com/virtualmin/virtualmin-gpl/issues" target="_blank" tabindex="-1">'+theme_language("global_report_an_issue")+"</a></li>"+'<li><a data-ss-dd-official-website href="http://virtualmin.com" target="_blank" tabindex="-1">'+theme_language("global_official_website")+"</a></li>"+"</ul>"+"</li>"+'<li class="divider"></li>'+'<li class="dropdown-submenu right" role="menu">'+'<a data-ss-dd-about-theme tabindex="-1">'+theme_language("global_about_theme")+"</a>"+'<ul class="dropdown-menu shifted-top--50" role="menu">'+'<li><a data-ss-dd-whats-new tabindex="-1" data-click-about>'+theme_language("global_whats_new")+"</a></li>"+'<li><a data-ss-dd-issue-report href="https://github.com/authentic-theme/authentic-theme/issues" target="_blank" tabindex="-1">'+theme_language("global_report_an_issue")+"</a></li>"+'<li class="dropdown-submenu right" role="menu">'+'<a data-ss-dd-install-theme-update tabindex="-1" href="#" data-context-select-all="1">'+theme_language("global_update")+"</a>"+'<ul class="dropdown-menu shifted-top--20" role="menu">'+'<li><a data-ss-dd-install-release class="authentic_update" data-git="1" data-stable="1" tabindex="-1">'+theme_language("force_upgrade_stable")+"</a></li>"+'<li><a data-ss-dd-install-development class="authentic_update" data-git="1" data-stable="0" tabindex="-1">'+theme_language("force_upgrade_beta")+"</a></li>"+"</ul>"+"</li>"+"</ul>"+"</li>"+"</ul>"+"</li>"+"</ul>"+"</div>"+'<i aria-label="'+theme_language("tooltip_side_slider_go_to_dashboard")+'" data-target-tooltip-callback="tooltip_side_slider_go_to_dashboard" class="fa fa-fw fa-lg fa-dashboard pull-right"'+theme_inject_tooltip("tooltip_side_slider_go_to_dashboard",false,false,false,900)+"></i>"+'<i aria-label="'+theme_language("tooltip_side_slider_delete_all_notification")+'" data-target-tooltip-callback="tooltip_side_slider_delete_all_notification" class="fa fa-fw fa-lg fa-trash pull-right"'+theme_inject_tooltip("tooltip_side_slider_delete_all_notification",false,false,false,900)+"></i>"+'<i aria-label="'+theme_language("tooltip_side_slider_mark_read_all_notification")+'" data-target-tooltip-callback="tooltip_side_slider_mark_read_all_notification" class="fa fa-fw fa-lg fa-clear-all pull-right"'+theme_inject_tooltip("tooltip_side_slider_mark_read_all_notification",false,false,false,900)+"></i>"+'<i aria-label="'+theme_language("tooltip_side_slider_notifications_motd_add")+'" data-target-tooltip-callback="tooltip_side_slider_notifications_motd_add" class="fa2 fa-fw fa-lg fa2-message pull-right"'+theme_inject_tooltip("tooltip_side_slider_notifications_motd_add",false,"auto left",false,900)+"></i>"+"</div>"+"</div>"+"</div>"+'<div style="'+n+'" class="'+(settings_side_slider_enabled?"":" hidden ")+"right-side-tabs-toggler"+(settings_side_slider_fixed?" hidden":"")+'" data-bgs="'+settings_side_slider_palette+'">'+'<button aria-label="'+theme_language("side_slider_toggle")+'" type="button" class="btn btn-primary btn-menu-toggler">'+'<span class="badge badge-danger hidden"></span>'+'<i class="fa fa-fw fa-lg fa-bell"></i>'+"</button>"+"</div>"+"";if(browser.detect.safari(1)){setTimeout(function(){$(document.body).append(r);test_visibility()})}else{$(document.body).append(r);test_visibility()}if(!$('a[href="'+t+'"]:visible').length){$("#right-side-tabs ul.nav-tabs li a:visible").trigger("click")}$('#right-side-tabs .nav.nav-tabs a[data-toggle="tab"]').on("shown.bs.tab",function(e){var t=$(e.target).attr("href");localStorage.setItem(v___server_hostname+"-"+"right-side-tab",t)});$(document.body).on("click",'i[data-trigger="side_slider_pinned"]',function(e){e.stopImmediatePropagation();var t=session.server.data("data-slider-fixed")=="1"?0:1;vars.slider.pinned=t;settings_side_slider_fixed=!settings_side_slider_fixed;set_visibility(t,e.originalEvent!==undefined?1:0);$(".dropdown.open.obj-settings .dropdown-toggle").dropdown("toggle");$(window).resize()}).on("click",".right-side-tabs-favorites-ctl",function(e){if($(".favorites-menu-outer").hasClass("hover")){$(".favorites-menu-close").trigger("click")}else{$(".user-link.favorites").trigger("click")}}).on("click",'#right-side-tabs a:not([data-toggle="collapse"]):not([role="tab"]):not(.list-group-item)',function(e){$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs .info-container .graph-container-fw",function(e){var t=core.moduleAvailable("proc"),a=$(this).attr("class"),i=a.indexOf("cpu_")>-1?"cpu":a.indexOf("mem_")>-1?"mem":a.indexOf("virt_")>-1?"virt":"disk",n;if(i=="cpu"&&t){n=v___location_prefix+"/proc/index_cpu.cgi"}else if((i=="mem"||i=="virt")&&t){n=v___location_prefix+"/proc/index_size.cgi"}else if(i=="disk"&&core.moduleAvailable("disk-usage")){n=v___location_prefix+"/disk-usage"}else if(i=="disk"&&core.moduleAvailable("quota")){n=v___location_prefix+"/quota/list_users.cgi?dir=%2F"}n&&get_pjax_content(n);$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs .fa-dashboard",function(e){if(get_onbeforeunload_status()){this.href=v___location_prefix+"/sysinfo.cgi";get_onbeforeunload_message(e,this)}else{get_pjax_content(v___location_prefix+"/sysinfo.cgi")}$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}).on("click","#right-side-tabs [data-click-about]",function(e){theme_update_notice()}).on("click",".right-side-tabs-toggler:not(.hidden)",function(e){if($(this).hasClass("opened")){$(this).removeClass("opened");$(this).animate({right:"0"},0);$(".right-side-tabs").animate({right:"-302"},0)}else{$(this).addClass("opened");$(this).animate({right:"300"},parseInt(175*1.7));$(".right-side-tabs").animate({right:"0"},parseInt(175*1.7))}});$(".right-side-tabs .tab-pane").each(function(){$(this).css("height",$(document.body).outerHeight()-13)});$(".right-side-tabs").on("mouseover",".list-group-item",function(e){$(this).find(".fa.fa-trash-o").removeClass("hidden");!$(this).hasClass("opacity-0_3")&&$(this).find(".fa-clear-all").removeClass("hidden")}).on("mouseout",".list-group-item",function(e){$(this).find(".fa.fa-trash-o").addClass("hidden");$(this).find(".fa-clear-all").addClass("hidden")});$(".right-side-tabs").on("click","[data-port-href]",function(e){e.preventDefault();e.stopPropagation();open($(this).data("port-href"))});$(".right-side-tabs").on("click",'a.list-group-item[data-type="csf_deny"]',function(e){e.preventDefault();e.stopPropagation();if($(e.target).is(".fa.fa-trash-o")||$(e.target).is(".fa-clear-all")||$(e.target).is("[data-port-href]")){return}get_bundle_csf();$(document.body).append('<form action="'+v___location_prefix+'/csf/" method="post" class="hidden" id="csf_temporary_ip_entries">'+'<input type="hidden" name="action" value="temp">'+"</form>");$("form#csf_temporary_ip_entries").submit().remove();$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")});$(".right-side-tabs").on("click contextmenu","a.list-group-item",function(e){e.preventDefault();var t=$(e.target).is(".fa.fa-trash-o"),a=$(e.target).is(".fa-clear-all"),i=$(e.target).is("[data-port-href]");if(t||a||i){e.stopPropagation();e.stopImmediatePropagation()}if(e.type=="contextmenu"){$(this).find(".fa-clear-all").trigger("click");e.preventDefault();e.stopPropagation();return}if(!t&&!a&&!i){if($(this).attr("href")&&$(this).attr("href").length&&$(this).attr("href")!="undefined"&&$(this).attr("data-type")!="csf_deny"){$(this).addClass("opacity-0_3");$(this).find(".fa-clear-all").addClass("hidden");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1);$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click");get_pjax_content($(this).attr("href"))}else{$(this).addClass("opacity-0_3");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1)}}else{if($(e.target).is(".fa-clear-all")){$(this).addClass("opacity-0_3");$(this).find(".fa-clear-all").addClass("hidden");mark_notification_read($(this).attr("id"),$(this).data("type"),1,1);return}$(this).animate({opacity:"0"},175,function(){$(this).remove();localStorage.removeItem(v___server_hostname+"-"+"notifications_"+$(this).attr("id")+"_"+$(this).data("type"));mark_no_notifications()})}});$(".right-side-tabs-dismiss i.fa2-message").on("click",function(e){var t=session.server.data("user"),a=function(){return $(document.body).find(".modal.user_motd_data")},i=function(){return a().find(".user-motd-content")},n=function(e,t){var a=t||i().find(".form-group-sm").length+1,n=e.time?e.time:dayjs().unix()+""+parseInt(Math.random()*1e4);var s='<div class="form-group-sm" data-motd="'+n+'" data-id="motd-'+n+'">';s+='<input aria-label="'+theme_language("global_message")+'" type="text" class="form-control" value="'+Convert.quoteEscape(e.msg)+'" id="motd-'+n+'" placeholder="'+theme_language("global_message")+'">';var r=["all","adm"];if(session.server.data("pro-vm")==1){r.push("res")}if(core.moduleAvailable("virtual-server")){r.push("vm")}if(core.moduleAvailable("server-manager")){r.push("cm")}if(core.moduleAvailable("usermin")){r.push("um")}if(r.length>2){s+="<select>";for(var a=0;a<r.length;a++){s+='<option value="'+r[a]+'"'+(r[a]===e.target?" selected":"")+">"+theme_language("modal_motd_select_"+r[a])+"</option>"}s+="</select>"}s+='<button onclick="this.parentElement.remove()" data-toggle="tooltip" data-title="'+theme_language("modal_motd_btn_rm")+'" aria-label="'+theme_language("modal_motd_btn_rm")+'" class="btn btn-default heighter-28"><i class="fa fa-fw fa-minus-square"></i></button>';s+="</div>";return s},s="";$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=get",data:false,dataType:"JSON",success:function(e){if(!$.isEmptyObject(e.motd)){$.each($(e.motd),function(e,a){var i=a[t].length-1;a[t].forEach(function(e,t){if(!s){s='<div class="form-inline form-flex">'}s+=n(e,t+1);if(t===i){s+="</div>"}})})}$("body").click().append('<div class="modal fade8 fade10 user_motd_data" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static">'+'<div class="modal-dialog modal-lg" role="document">'+'<div class="modal-content">'+'<div class="modal-header">'+'<h4><i class="fa2 fa-fw fa2-message" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;'+theme_language("modal_motd_title")+"</h4>"+'<button type="button" class="close" data-dismiss="modal" data-toggle="tooltip" data-title="'+theme_language("global_close")+'" aria-label="'+theme_language("global_close")+'"><span aria-hidden="true">&times;</span></button>'+"</div>"+'<div class="modal-body"><small class="text-muted">'+theme_language("modal_motd_desc")+"</small>"+'<div class="user-motd-content">'+s+"</div>"+'<button data-toggle="tooltip" data-title="'+theme_language("modal_motd_btn_save")+'"  aria-label="'+theme_language("modal_motd_btn_save")+'" class="btn btn-grey pull-right btn-round btn-user-motd-save"><i class="fa fa-fw fa-floppy-o"></i></button>'+'<button data-toggle="tooltip" data-title="'+theme_language("modal_motd_btn_add")+'" aria-label="'+theme_language("modal_motd_btn_add")+'" class="btn btn-success pull-right btn-round btn-user-motd-add"><i class="fa fa-fw fa-plus"></i></button>'+"</div>"+"</div>"+"</div>"+"</div>");a().on("shown.bs.modal",function(){a().tooltip({selector:'button[data-toggle="tooltip"]',sanitize:false,container:"body",html:false,delay:{show:vars.plugins.tooltip.delay.show/3,hide:0}});a().find(".btn-user-motd-add").on("click",function(e){e.preventDefault();var t=i(),a=t.find(".form-flex"),s=a.length,r="";if(!s){r='<div class="form-inline form-flex">'}r+=n({msg:"",time:""});if(!s){r+="</div>"}if(!s){t.append(r).find('[data-motd]:last-child > input[type="text"]').focus()}else{a.append(r).find('[data-motd]:last-child > input[type="text"]').focus()}});a().find(".btn-user-motd-save").on("click",function(e){var t=$(this);e.preventDefault();if(t.hasClass("disabled")){return}var a=[];$.each(i().find("[data-motd]"),function(){var e=$(this).attr("data-motd"),t=$.trim($(this).find('[type="text"]').val()),i=$(this).find("select"),n=i.length?i.val():"all";if(t){a.push({msg:t,time:e,target:n})}});spinnerfy_buttons(t);$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=set&data="+JSON.stringify(a)+"",data:false,dataType:"JSON",complete:function(e){setTimeout(function(){despinnerfy_button(t)},300)},error:function(e){despinnerfy_button(t);session.status(e.responseText)}})})}).on("hidden.bs.modal",function(){a().remove()}).modal("show")},error:function(e){session.status(e.responseText)}})});$(".right-side-tabs-dismiss i.fa-clear-all").click(function(e){mark_group_notifications_read(false)});$(".right-side-tabs-dismiss i.fa-trash").click(function(e){$(".right-side-tabs .list-group-item:not(.no-notifications)").animate({opacity:"0"},175,function(){$(this).remove();remove_all_notifications();mark_no_notifications()})});$(".right-side-tabs .tab-pane").mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:250,scrollButtons:false});mark_no_notifications();check_notifications()}else{session.server.data("data-slider-fixed","0");$(".right-side-tabs-toggler").addClass("hidden")}});return{test:test_visibility,state:set_visibility,badge:display_badges,notifications:{check:check_notifications,dismiss:mark_group_notifications_read},update:{favorites:update_right_pane_favorites},data:{fetch:sysinfo_update}}}();plugins.notifications=function(){var e={format_links:function(e,t){var a="",i=e.match(/(?:<a.*?href=\s*['"](.*?)['">])|(?:<a.*?href=\s*(.*?)[\s*>])/),n=function(e,a,i){if(t){return"<x-a "+(i?'target="_blank" ':"")+'href="'+a+'">'+e.replace("<i","<span").replace("</i","</span")+"</x-a>"}else{return e}};if(i&&(i[1]||i[2])){a=i[1]||i[2];if(a&&(a.startsWith("http:")||a.startsWith("https:")||a.includes("ftp:")||a.includes("ftps:")||a.startsWith("//"))){e=e+" "+n('<i class="fa fa-fw fa-external-link"></i>',a,true)+""}else if(a){e=e+" "+n('<i class="fa fa-fw fa-link"></i>',a,false)+""}e=e.replace(/<a.*?>/gi," ");e=e.replace(/<\/a>/gi," ")}return{msg:e,link:a}}},t={get:function(){$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=file&action=motd&subtype=receive",dataType:"JSON",success:function(e){t._pull();t._show(e)},error:function(e){session.status(e.responseText)}})},_pull_timer:1e10,_pull:function(){var e=this,t=typeof settings_side_slider_background_refresh_time=="undefined"?5:settings_side_slider_background_refresh_time>0?settings_side_slider_background_refresh_time:5,a=(t+2)*6e4;clearInterval(this._pull_timer);a&&(e._pull_timer=setInterval(function(){e.get()},a))},_show:function(t){if(!$.isEmptyObject(t.motd)){var a=session.server.data("user"),i=function(e){var t=v___server_hostname+"-"+a+"-"+c+"_"+e;t=t.replace(/[^0-9a-z]/gi,"");return t};for(var n in t.motd){for(var s in t.motd[n]){var r=t.motd[n][s],o=r.msg,l=theme_language("notifications_motd2"),c="user_motd",_=r.time.substring(0,10),d=r.time+"-"+n,f=i(d),p=e.format_links(o,true),u=p.link;o=p.msg;if(!localStorage.getItem(f)){var g=plugins.messenger.post({icon:"fa2 fa2-message fa-1_25x",title:l+' <span class="item-time">&nbsp;'+dayjs.unix(_).fromNow()+"</span><p></p>",message:o,type:"success",id:f,position:"bottomRight",close:false,timeout:false,progressBar:false,buttons:plugins.messenger.toast.construct.button(theme_language("global_hide").toUpperCase(),function(e){localStorage.setItem(e.id.replace("toastid_-_",""),"1")}),layout:2,balloon:true});var h=g.find("x-a");if(h.length){h.on("click",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).attr("target");if(a){window.open(t,a)}else{get_pjax_content(t)}})}notifications(l,o,c,u,1)}}}}}},a={get:function(){}},i={post:function(){}};return{user:t.get,administrator:a.get,desktop:i.post}}();plugins.dashboard=function(){var e=".container-fluid .panel-group .panel:not(#system-status)",t="panel-heading",a="panel-collapse",i="dashboard_panels",n=function(){localStorage.removeItem(v___server_hostname+"-"+v___server_username+"-"+i)},s=function(){return v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1},r=function(){if(s()){var a=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+i);if(a!=null){a=Object.entries(JSON.parse(a));for(var n=0;n<a.length;n++){var r=a[n][1]?"show":"hide",o=$(""+e+" ."+t+'[id="'+a[n][0]+'"]');o.next().collapse(r);if(n===a.length-1){setTimeout(function(){document.querySelector("#content").scrollTo({top:vars.events.scrolled})})}}}}},o=function(e){var t=!e||e==="<br>"?0:1,a=$("#system-status > .panel-body > .table.table-hover");if(a.length){a.nextAll().remove();if(t){a.after(e)}}},l=function(){$.each(["system-status","right-side-tabs-sysinfo"],function(e,t){var a=$("#"+t+' .alert > [action*="webmin/upgrade.cgi"] [data-entry]');if(a.length){var i=a.parent(".btn");if(i.length){if(!i.find(".fa").length){i.removeClass("btn-default").addClass("btn-warning").prepend('<i class="fa fa-fw fa-update"></i>')}}}})},c=function(){$.each($("#system-status form:visible, #right-side-tabs form:visible"),function(){var e=$(this).attr("action"),t="?";if(e&&!e.includes("licence.cgi")){if(e.includes("?")){t="&"}$(this).attr("action",e+t+"pass-query-string=1&no-cache=1&no-query=string")}})},_=function(e,t){var a="#content #system-status ",i="table > tbody > tr > td ",n=function(e){return"+ .panel-group > .panel > #"+e+"-virtual-server-1-collapse "},s="System Information",r="Account Information",o="Software Versions",l="Virtualmin Counts",c="Virtualmin License",_=v___user_level==3?r:s,d=function(e){return e&&/(webmin|virtualmin|cloudmin|usermin|authentic)/i.test(e)},f=[],p=[],u=false,g=[],h=[],m=[],v=[],b="",x="",y=function(){if(!e){var a;$.each($(v),function(e,t){if(typeof t==="string"){a=t;b+=(e!==0?"\n":"")+t+"\n"}else{var i=Object.keys(t),n=Object.values(t);if(u&&a===_&&d(i)){return true}b+=$.trim(i[0])+": "+$.trim(n[0])+"\n"}})}else{var i="&nbsp;",n=v.length-1,a;$.each($(v),function(e,s){if(typeof s==="string"){a=s;var r=i.repeat(_.length-a.length+(a===_?3:a===o?4:5)+2);b+=(e!==0?"\n|":"|")+s.toUpperCase()+r+"| |\n|---|---|\n"}else{var l=Object.keys(s),c=Object.values(s);if(u&&a===_&&d(l)){return true}b+="|  "+$.trim(l[0])+"  |  "+$.trim(c[0])+"  |\n"}if(n===e){!t&&(b+="\n\n\n")}})}};$.each($(""+a+" > .panel-body > "+i+""),function(){var e=$(this)[0].outerText;f.push(e);if(d(e)){p.push(e);p.push($(this).next()[0].outerText)}}).promise().done(function(){$.each($(f),function(e,t){if(e===0){v.push(_)}if(e&1){v.push({[f[e-1]]:t})}}).promise().done(function(){$.each($(""+a+n("sysinfo")+i+""),function(){g.push($(this)[0].outerText)}).promise().done(function(){if(g.length&&p.length){g=p.concat(g);u=true}$.each($(g),function(e,t){if(e===0){v.push(o)}if(e&1&&e!==1+p.length){v.push({[g[e-1]]:t})}}).promise().done(function(){$.each($(""+a+n("ftypes")+i+""),function(){h.push($(this)[0].outerText)}).promise().done(function(){$.each($(h),function(e,t){if(e===0){v.push(l)}if(e&1){v.push({[h[e-1]]:t})}}).promise().done(function(){if(t){$.each($(""+a+n("serial")+i+""),function(){m.push($(this)[0].outerText)}).promise().done(function(){$.each($(m),function(e,t){if(e===0){v.push(c)}if(e&1){v.push({[m[e-1]]:t})}}).promise().done(function(){y()})})}else{y()}})})})})})});return b},d=function(e,t,a){if(!s()){return}if(e==="reset"){t="keyup";a={holdModifer:~~!false}}if(e==="reset"||e==="support-header-icon"){var i=$("#content #system-status ._support_ticket_cnt ._support_ticket_"),n="fa2-life-ring-solid";a.holdModifer&&i.toggleClass(n,t==="keydown")}if(e==="reset"||e==="copy/paste-header-icon"){var i=$("#content #system-status ._clipboard_sysinfo_cnt ._clipboard_sysinfo_"),n="fa2-clipboard-text";a.holdModifer&&i.toggleClass(n,t==="keydown")}};document.addEventListener("DOMContentLoaded",function(){$(document.body).on("shown.bs.collapse hidden.bs.collapse",""+e+"",function(){var n=$(""+e+""),s={};$.each(n,function(){$target=$(this).find("."+t+""),id=$target.attr("id"),state=$target.next("."+a).hasClass("in");s[id]=state});localStorage.setItem(v___server_hostname+"-"+v___server_username+"-"+i,JSON.stringify(s))})});return{restore:r,reset:n,update:{alerts:o,alertsHTML:l,formsURLs:c},system_info:_,events:d}}();plugins.favorites=function(){var e=function(){return $("#favorites-menu .favorites-menu-content li:not(.exclude)").length},t=function(){var e=[];$.each($("#favorites-menu .favorites-menu-content li:not(.exclude) a"),function(){var t=$(this).text(),a=$(this).attr("href"),i=$(this).find("[data-product]").attr("data-product");favorite={};if(session.server.data("webprefix")&&!a.includes("!edit")&&!a.includes("!view")){favorite.link=link_type_convert(a.replace(session.server.data("webprefix"),""),1)}else{favorite.link=link_type_convert(a,1)}favorite.title=t.trim();favorite.icon=i=="virtualmin"?i+"":i;e.push(favorite)});return e},a=function(){var e="#favorites-menu > div > nav > ul";if(typeof sortable!="function"||!$("#favorites-menu > div > nav > ul").length){return}sortable(e,{items:":not(.favorites-title)",forcePlaceholderSize:false}).on("sortupdate",function(){i()})},i=function(){$.ajax({type:"POST",url:v___location_prefix+"/settings-favorites_save.cgi",data:{favorites:'{"favorites":'+JSON.stringify(t(),null,4).replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f")+"}"},success:function(e){if(!session.status(e)){return}plugins.slider.update.favorites()},error:function(e){}});sortable("#favorites-menu > div > nav > ul")},n=function(){var t="favorites-menu .favorites-menu-content";if(e()===0){$("#"+t+" li.favorites-no-message").removeClass("hidden");$("#"+t+" .favorites-title sup a").addClass("hidden")}},s=function(t,a,i){var n="favorites-menu .favorites-menu-content";if(e()===0){$("#"+n+" li.favorites-no-message").addClass("hidden");$("#"+n+" .favorites-title sup a").removeClass("hidden")}var s;s='class="wbm-'+i+""+(i=="virtualmin"?"":"")+' wbm-sm"';$("#"+n+" li.favorites-title").after('<li class="menu-exclude" draggable="true"><a class="menu-exclude-link" target="page" href="'+link_type_convert(Convert.quoteEscape(t),1)+'"><i data-product="'+i+'" '+s+'>&nbsp;</i> <span class="f__c">'+a+'&nbsp;<small class="hidden" style="font-size: 0.6em; position: absolute; margin-top: -1px"><i aria-label="'+theme_language("favorites_remove")+'" class="fa fa-fw fa-times"></i></small></span></a></li>')},r=function(e,t){var a=snippets.parser.fileviewer.getSuffix(false,1),s=a[0],r=a[1],o=a[2],l=a[3],c=a[4],_=a[5],d=a[6],f=a[7],p=a[8];var u=e.replace(/["\\]/g,"\\$&"),g=function(){var e="",t=[u,u+s+_+f,u+r+_+d+f,u+o+_+p,u+l+_+d+p,u+c+_],a="";$.each(t,function(t,i){if(e){a=", "}e+=""+a+'a[href="'+i+'"], a[href="'+link_type_convert(i,2)+'"]'});return e};$("#favorites-menu .favorites-menu-content").find(g()).parent("li").remove();!e.startsWith("!edit")&&!e.startsWith("!view")&&$("#headln2c > .favorites, .xcustom-favorites").addClass("fa-star-o").removeClass("fa-star text-warning");if(!t){n();i()}},o=function(e){var t=$("#favorites-menu li a.menu-exclude-link"),a=e,s=$('aside select option[value="'+a+'"]').attr("title");if(t&&t.length){$.each(t,function(t,a){var i=$(a),n=i.attr("href"),o=i.find("span").text();if(n){if(n.includes(e)||o&&$.trim(o).startsWith(s)){r(n,1)}}}).promise().done(function(){setTimeout(function(){n();i()},300)})}},l=function(e,t){n();var a=$("#favorites-menu .favorites-menu-content li:not(.exclude) a").map(function(e,t){return link_type_convert($(t).attr("href"),1)}).toArray(),i,s,r,o=0,l="!edit ";if(e){r=e.find(".favorites-editor");if(r.hasClass("viewer")){l="!view ";o=1}}else{r=$("#headln2c > .favorites, .xcustom-favorites");i=link_type_convert(URI(v___location).resource(),1);if(i.includes("index.cgi")){s=i.replace("index.cgi","")}else{s=i+"index.cgi"}}if(t){t=t.replace(/\/\//g,"/")}if(o){t=t+snippets.parser.fileviewer.getSuffix(r)}if(i&&$.inArray(i,a)>-1||s&&$.inArray(s,a)>-1||a.includes(l+t)){var c=theme_language("favorites_remove");r.addClass("fa-star").removeClass("fa-star-o").attr("aria-label",c);r.attr("data-original-title",c).tooltip("fixTitle")}else{var _=theme_language("favorites_add");r.removeClass("fa-star").addClass("fa-star-o").attr("aria-label",_);r.attr("data-original-title",_).tooltip("fixTitle")}};document.addEventListener("DOMContentLoaded",function(){(function(){$(document.body).on("click",'.favorites-menu a.menu-exclude-link, .right_pane_favorites_link:not([href^="!edit"]):not([href^="!view"])',function(){var e=$(this).attr("href"),t=e.startsWith("!edit"),a=e.startsWith("!view"),i=Test.strContains(e,"virtual-server/")?"dom":Test.strContains(e,"server-manager/")?"id":false,n=Test.strContains(e,"gparent")?"gparent":i,s=URI.parseQuery(URI(e).query())[n],r=i==="dom"?"virtualmin":i==="id"?"cloudmin":"webmin",o=$('.switch-toggle input:not([id="open_'+r+'"]):checked').length;if(i){setTimeout(function(){if($("aside select").val()!=s){if(i==="dom"){plugins.navigation.get.virtualmin(s)}else if(i==="id"){plugins.navigation.get.cloudmin(s)}}},300)}else{if(!t&&!a&&o){plugins.navigation.get.webmin()}}}).on("click","#headln2c > .favorites:not(.dummy), .xcustom-favorites:not(.dummy), button.favorites-editor",function(e){e.preventDefault();var t=URI(v___location).resource(),a=$(this),n=snippets.parser.fileviewer.getOpts(a),o=n[5],l=a.is(".favorites-editor"),c,_=function(e){var t=edit_file_parse_target(e.prev("strong"));file__name=t[0],file__path=t[1],c=t[2];c=c.replace(/\/\//g,"/");return c},d=function(e){return _(e)+snippets.parser.fileviewer.getSuffix(e)},f=function(e){var t=e+snippets.parser.fileviewer.getSuffix(a);return e!=t?t:""},p=function(e){var t=theme_language("favorites_remove");e.removeClass("fa-star-o").addClass("fa-star text-warning").attr("aria-label",t);e.attr("data-original-title",t).tooltip("fixTitle")},u=function(e){var t=theme_language("favorites_add");e.addClass("fa-star-o").removeClass("fa-star text-warning").attr("aria-label",t);e.attr("data-original-title",t).tooltip("fixTitle")},g=$(".jsPanel button.favorites-editor"+(o?".viewer":"")+"").not(a);if(a.hasClass("fa-star-o")){p(a);if(l||o){$.each(g,function(){if(o&&!$(this).hasClass("viewer")){return true}if(!o&&$(this).hasClass("viewer")){return true}if(_($(this))===_(a)&&!o){p($(this))}if(o&&d($(this))===f(_(a))){p($(this))}});c=_(a);var h=Convert.htmlEscape(a.prev("[data-file-container]").attr("title")||c);if(get_access_level()===2||get_access_level()===3||get_access_level()===4){var m=new RegExp("^"+get_user_home(),"");var v=new RegExp("\\("+get_user_home(),"");c=c.replace(m,"");h=h.replace(v,"(")}var b="!edit ";if(o){c=f(c);b="!view "}c&&s(b+c,""+theme_language(o?"file_viewer":"file_editor")+" - "+h,o?"x wbm2-viewer":"editor")}else{var x=" ⇾ ",y=theme.config._.form.tconfig(),k=v___location_file==="tconfig.cgi"&&y.length,A=v___location_path===v___location_prefix+"/config.cgi"||v___location_path===v___location_prefix+"/uconfig.cgi"||v___location_path===v___location_prefix+"/mconfig.cgi"||v___location_path===v___location_prefix+"/tconfig.cgi",w=Convert.htmlEscape($("#headln2c > span[data-main_title]").text().trim()),C=Convert.htmlEscape($(".has-sub.active").text().trim()),S=Convert.htmlEscape($(".sub_active").text().trim()),I=S.trim()!==w.trim(),T="",V="";if(($t_uri_virtualmin||$t_uri_cloudmin)&&!A){T=Convert.htmlEscape($("aside .ui_select option:selected").text())}if($('body[class^="'+v___module_file_manager+'"]').length){if(typeof fm_get_current_path==="function"){V=fm_get_current_path();var E=function(e){if(get_access_level()==2||get_access_level()==3){if(fm_user_data&&fm_user_data.allowed_paths&&fm_user_data.allowed_paths.length===1){e="~"+e}}return e};if(!V){V=E("/");V="["+V+"]"}else{V="["+Convert.htmlEscape(E(Convert.uriDecodeComponent(V)))+"]"}}}if(A){if(!k){var O=v___location_file.match(/(.*?)\./),j=O?O[1]:parseInt(Math.random()*1e4);y=$('.container-fluid form[action*="'+j+'_save.cgi"]');var z=Convert.htmlEscape($("#headln2c > span[data-sub_title] span").text().trim());C=C?C+x+z:z;S=w}else{S=w}w=$.trim(y.find(".table-title").text())}else{if(($t_uri_virtualmin||$t_uri_cloudmin)&&v___location_query&&($t_uri_virtualmin&&!v___location_query.includes("dom=")||$t_uri_cloudmin&&!v___location_query.includes("id="))&&!core.curModule(v___module_file_manager)&&!core.curModule("webminlog")&&!core.curModule("phpini")&&!core.curModule("apache")&&!core.curModule("logviewer")&&!core.curModule("syslog")){T=""}}var M=(C.length?C+x:"")+(S.length?S+(w.length&&I?": ":""):"")+(I?w:"")+(V.length?" "+V:"");if(vars.events.keypressed.alt){theme_copy_to_clipboard(M);u(a)}else{s(t,M,A&&k?"theme":$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":"webmin")}}i()}else{u(a);if(l||o){$.each(g,function(){if(o&&!$(this).hasClass("viewer")){return true}if(!o&&$(this).hasClass("viewer")){return true}if(_($(this))===_(a)&&!o){u($(this))}if(o&&d($(this))===f(_(a))){u($(this))}});c=_(a);var b="!edit ";if(o){c=f(c);b="!view "}c&&r(b+c)}else{r(link_type_convert(t,1))}}}).on("click","#right-side-tabs .right_pane_favorites_link",function(e){$(".favorites-menu-outer.hover + .favorites-menu-close").trigger("click")}).on("click",".favorites-menu-close, nav.favorites-menu li a",function(){$(".favorites-menu-outer").removeClass("hover")}).on("keydown",function(e){if($(".favorites-menu-outer").css("left")=="0px"&&e.keyCode==27){$(".favorites-menu-outer").removeClass("hover")}});$("#favorites-menu .favorites-menu-content").on("mouseover","li:not(.exclude) span.f__c, li:not(.exclude) span.f__c small",function(){$(this).find("small").removeClass("hidden")}).on("mouseleave","li:not(.exclude) span.f__c, li:not(.exclude) span.f__c small",function(){$(this).find("small").addClass("hidden")});$("#favorites-menu .favorites-menu-content").on("mouseover","li:not(.exclude) small",function(){$(this).find(".fa-times").removeClass("fa-times").addClass("fa-times-circle");$(this).animate({"font-size":"0.7em","margin-top":"-2px","margin-left":"-1px"},0)}).on("mouseleave","li:not(.exclude) small",function(){$(this).find(".fa-times-circle").removeClass("fa-times-circle").addClass("fa-times");$(this).animate({"font-size":"0.6em","margin-top":"-1px","margin-left":"0"},0)});$("#favorites-menu .favorites-menu-content").on("click","li:not(.exclude) small .fa-times-circle",function(e){e.preventDefault();e.stopPropagation();r($(this).parents("a").attr("href"))})})();a()});return{detect:l,fetch:t,remove:o}}();plugins.update_notice=function(){$(document.body).on("hidden.bs.modal","#update_notice",function(){$(".modal#update_notice").remove()});$(document.body).on("show.bs.modal","#update_notice",function(){var e=$(this),t=e.find(".modal-body > h4:first-child"),a=t.text().split(/\s+/)[1],i=e.find(".versionSeparator:last").text(),n=e.find(".versionSeparator").length,s=theme.version(),r=i+" ... "+s;var o=false,l=i.match(/([\d]+\.[\d]+)/),c=s.match(/([\d]+\.[\d]+)/);if(l&&c){l=l[1];c=c[1]}$(this).addClass("update_notice_subvers");var _=e.find(".versionSeparator"),d=theme_language("global_development_version");$.each(_,function(){$(this).attr("target","_blank")});var f=$(this).find(".modal-body h4"),p=$(this).find(".modal-body h4:first");if(!$(this).find(".modal-body h4:first .diffctl").length){var u=new RegExp(RegExp.quote(a),"g");if(n){f.replaceText(u,"<span>"+r+"</span>");f.replaceText(/Version/,"Versions")}var g=$(this).find('.modal-body h4:contains("alpha"), .modal-body h4:contains("beta"), .modal-body h4:contains("RC")').length;if(f.length&&g){var h=$(this).find('.modal-body a[href*="authentic-theme/releases"]:first').text().match(/-?(?:\d+(?:\.\d*)?|\.\d+)/);latest_release=parseFloat(h?h[0]:theme.version());var m=p.text(),v=m.split("..."),b=0,x=e.find('a.versionSeparator[href*="releases"]:not(:empty)').first().text();if(v[1]){b=v[0].replace("Versions ","");p.text(p.text())}p.append('<a class="btn btn-transparent diffctl text-dark text-force-link-hover'+(h||x?"":" hidden")+'" target="_blank" href="https://github.com/authentic-theme/authentic-theme/compare/'+(x.length?x:latest_release)+'...master"><i class="fa fa-lg fa-git-pull fa-flip-horizontal"></i></a>');p.after('<span class="versionSeparator version_dev" style="margin-top: -32px;margin-right: 0;">'+'<span class="smaller text-danger"><span>'+d+"</span></span></span>")}else{p.append('<a target="_blank" class="btn btn-transparent diffctl changelogctl text-dark text-force-link-hover margined-left-3 vertical-align-baseline" href="https://github.com/authentic-theme/authentic-theme/blob/master/CHANGELOG.md#changelog"><i class="fa fa-1_50x fa-changelog'+(n?" multi-ver":" single_ver")+'"></i></a>').append('<a target="_blank" href="https://github.com/authentic-theme/authentic-theme/releases/tag/'+a+'" class="versionSeparator margined-top-10">'+a+"</a>")}}})};plugins.icons_row=function(){$(document.body).on("click",".inline-row input",function(e){if(!$(this).is(":checked")){$(this).parents(".gl-icon-container").removeClass("highlighted")}else{$(this).parents(".gl-icon-container").addClass("highlighted")}}).on("click contextmenu","div.icons-container, div.small-icons-container",function(e){var t=$(e.target).find("a[href]").first();if(e.type==="click"&&$(e.target).is($(this))&&t.length){t.trigger("click");return}if(e.type==="click"&&$(e.target).is(".gl-icon-select")&&!$.support.spa){e.preventDefault();$(this).trigger("contextmenu")}else if(e.type==="contextmenu"){e.preventDefault();if($(this).find("input").is(":checked")){$(this).find("input").prop("checked",false);$(this).removeClass("highlighted")}else{if($(this).find("input").length){$(this).find("input").prop("checked",true);$(this).addClass("highlighted")}}var a=$(e.target).is(".icon_link")?$(e.target).parent(".gl-icon-container").find(".fa-select, .fa-selected"):$(e.target).is(".gl-icon-select")?$(e.target):$(e.target).is("img")?$(e.target).parent("a").parent(".gl-icon-container").find(".fa-select, .fa-selected"):$(e.target).find(".fa-select, .fa-selected");a.hasClass("fa-select")?a.removeClass("fa-select").addClass("fa-selected"):a.removeClass("fa-selected").addClass("fa-select")}typeof db_check_selected==="function"&&db_check_selected()}).on("click",".row.icons-row .icons-container, .row.icons-row .small-icons-container",function(){if(!$(this).hasClass("forged-xx-skip")){return}})};plugins.chooser=function(){var e=false,t=false,a=false,i=function(e){$(".mppopup .cspinner.hidden").removeClass("hidden");$.ajax({type:"POST",url:e,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter(".table").html(),i=$(t).filter(".table").prev("b").html();i=o(i);if(a){a=a.replace(/<img.*dir.gif.*?>/gm,'<i class="fa fa-fw fa-folder"></i>').replace(/<img.*unknown.gif.*?>/gm,'<i class="fa fa-fw fa-file-o"></i>')}$(".mppopup .modal-body").html(i+'<table class="table table-hover table-condensed table-striped">'+a+"</table>");$v__mpp__g_gp=0;$(".mppopup_filter_input").focus();$(".mppopup_filter_input").val("")}})},n=function(e){return e.replace(/&file.*&chroot/,"&file="+Convert.uriEncodeComponent(($v__mpp__g_ol+"/").replace(/\/\/+/g,"/").replace(/:\//g,"://"))+"&chroot")},s=function(e,t){var a=e.prev('input[type="text"], input[name]');if(!a.is("input")&&!e.prev("textarea").length&&!e.prev("br").prev("textarea").length){a=e.prev("span:not(.awradio)").find('input[type="text"]')}else if(!a.length&&!a.is("input")&&t){a=e.prev("textarea");if(!a.length){a=e.prev("br").prev("textarea")}}return a},r=function(t,i,n){e&&(a=t);if(n){if($(".refInputData").is("textarea")){var s=$(".refInputData");if(s.val()){s.val(s.val()+"\n"+t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}else{s.val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}}else{$(".refInputData").val(t.replace(/\/\/+/g,"/").replace(/:\//g,"://"))}var r=$(".refInputData").parent("td").prev("td").find('input[type="radio"]'),o=$(".refInputData").parent("span").prev("span").find('input[type="radio"]'),l=$(".refInputData").prev("span").find('input[type="radio"]'),c=$(".refInputData").prev("select").find('option[value="*"]');if(o.length){o.trigger("click")}else if(l.length){l.trigger("click")}else if(c.length){c.parent("select").val("*").trigger("change")}else{r.trigger("click")}}if(i){$("body .mppopup").modal("hide")}},o=function(e){e=$.url(e).attr("path").replace(/\/$/g,"").split("/");var t="",a="/",i=a,n=get_access_level()==2||get_access_level()==3,s=get_user_home();if(n){i=s}$.each(e,function(e,r){if(r===""){var o="onclick=\"parentdir('"+i+"'); return false\"";if(n){o=String()}t+="<a "+o+">"+(get_access_level()==0?'<i class="fa fa-folder-root margined-left--5"></i>':'<i class="fa fa-user text-light margined-left--5"></i>')+"</a>"+"\n"}else{a+=r+"/";var o="onclick=\"parentdir('"+a+"'); return false\"";if(n&&!a.includes(s)){o=String()}t+="<a "+o+">"+r+"</a>"+"\n"}});var r='<nav class="breadcrumbx">'+t+"</nav>";return r+'<span class="cspinner hidden" style="margin-top: 2px; margin-left: 8px;"><span class="cspinner-icon smaller"></span></span>'},l=function(t){var i=String();!t&&(t={});if(t.file){i=t.file}var n='<div class="_xcustom_file_select hidden hidden-force">'+'<input type="text" id="_xcustom_file_select" name="_xcustom_file_select">'+'<button data-custom-chooser data-mmclick="chooser = window.open(&quot;/chooser.cgi?add=0&type=&chroot=/&file='+encodeURIComponent(i)+', &quot;chooser&quot;); " type="button"></button>'+"</div>";$("body").append(n);$(document).find("._xcustom_file_select button[data-custom-chooser]").trigger("click");if(t.resolve!==false){return new Promise(function(t){setTimeout(function(){var i=setInterval(function(){if(!e){clearInterval(i);t(a);a=false}},100)},10)})}};document.addEventListener("DOMContentLoaded",function(){(function(){var l=document.body;$(l).on("dblclick",'.mppopup a[onclick*="fileclick("], .mppopup a[onclick*="parentdir("]',function(e){e.preventDefault()}).on("dblclick",'.mppopup a[onclick*="select("]',function(){$(".mppopup button[data-mppopup_confirm]").trigger("click")}).on("click",'.mppopup a[onclick*="fileclick("], .mppopup a[onclick*="parentdir("]',function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=this;if(!t.clicks){t.clicks=0}if(!t.timer){t.timer=null}t.clicks++;$data_mppopup_value.val($v__mpp__g_ol);if(t.clicks===1){t.timer=setTimeout(function(){t.clicks=0;typeof $v__mpp__g_gp=="undefined"?$v__mpp__g_gp=0:0;if(!$v__mpp__g_gp){r($v__mpp__g_ol,0,0)}else{var e=n($v__mpp__g_op);i(e)}$v__mpp__g_gp=0},vars.event.double_click_delay)}else{clearTimeout(t.timer);t.clicks=0;if($v__mpp__g_olt){var a=n($v__mpp__g_op);i(a)}else{r($v__mpp__g_ol,1,1)}}}).on("click",".mppopup button[data-mppopup_confirm]",function(){var e=$data_mppopup_value.val();r(e,1,1);if(core.curModule("custom")){refInput.trigger("input")}}).on("show.bs.modal",".mppopup",function(){setTimeout(function(){$("body").addClass("mppopup-open")},120);v__mpp__ml_t__e=0;$data_mppopup_value=$(".mppopup input[data-mppopup_value]");$('.mppopup input[data-role="tagsinput"]').tagsinput({onTagExists:function(e,t){t.hide().fadeIn();v__mpp__ml_t__e=1}})}).on("shown.bs.modal",".mppopup",function(){var e=$("body .mppopup").find(".modal-head"),t=$("body .mppopup").find(".modal-body"),a=$("body .mppopup").find(".modal-body table"),i=e.find(".mppopup_filter > input");setTimeout(function(){$(".mppopup_filter_input").animate({opacity:1},0);$(".mppopup_filter_input").focus()},0)}).on("hide.bs.modal",".mppopup",function(){var e=$(".modal.in");e.removeClass("in");$("body").removeClass("mppopup-open");setTimeout(function(){e.addClass("in")},150)}).on("hidden.bs.modal",".mppopup",function(){refInput.removeClass("refInputData");$('.mppopup input[data-role="tagsinput"]').tagsinput("destroy");$("body .mppopup").remove();$("button[data-mmclick].disabled, input[data-mmclick].disabled").removeClass("disabled").removeAttr("disabled");setTimeout(function(){if($(".modal.in").length){$("body").addClass("modal-open")}})}).on("click",".mppopup_multi_done",function(){refInput.val($.trim($('.mppopup input[data-role="tagsinput"]').val().replace(/,/g," ")));$('.mppopup span[aria-hidden="true"]').trigger("click")}).on("keyup",".mppopup_filter_input",function(e){var t=e.which,a=$(".mppopup table tbody tr:visible"),i=a.find("td:first-child a"),n=$(".mppopup .breadcrumbx").length;if(n){return}if(t==13&&a.length===1&&!e.shiftKey){i.trigger("click")}else if(t==13&&a.length===1&&e.shiftKey){i.trigger("click").trigger("dblclick");var s=$(".mppopup .mppopup_multi_done:visible");if(s.length){setTimeout(function(){s.trigger("click")},240)}}if(!$(".mppopup table tbody tr.noresults").length){$(".mppopup table tbody").append('<tr class="hidden noresults"><td class="text-center" colspan="'+$(".mppopup table tbody tr:first-child td").length+'">'+theme_language("global_no_results_found")+"</td></tr>")}var r=$(".mppopup table tbody tr:visible:not(.noresults)"),o=$(".mppopup table tbody tr.noresults");if(r.length){o.addClass("hidden")}else{o.removeClass("hidden")}}).on("click","button[data-mmclick]:not(.disabled), input[data-mmclick]:not(.disabled)",function(i){i.preventDefault();i.stopPropagation();refInput=s($(this),1);e=!!+$(this).parent("._xcustom_file_select").length,custom_window={shown:function(){a=false;t=true},hidden:function(){t=false;e=false;$("._xcustom_file_select").remove()}};var n=$(this),r=refInput.val(),l=encodeURIComponent(r),c=$(this).attr("data-mmclick"),_=c.match("window.open\\(['\"]*(.*?)(\\s*['\"]*,.*?)"),d=_[1].match(/(\w+\.[a-z]{3,4})/gi)[0],f=d.replace(".cgi",""),p=false,u=false;n.addClass("disabled").attr("disabled","disabled");if(_[1]){var g=_[1].replace("encodeURIComponent(ifield.value)","refInputCurrValSafe");g=g.replace('"+"',"").replace('"+',"").replace("refInputCurrValSafe",l);var h=function(t,a,i,n,s,o,l,c,_,d,p){var u;if(!o){o=String()}if(!l){l=String()}if(s){u='<div class="modal-footer">'+'<div class="input-group">'+'<input data-role="tagsinput" class="form-control ui_textbox" type="text" value="'+(r?r.replace(/ /g,","):"")+'">'+'<span class="input-group-btn mppopup_multi_done">'+'<button type="button" class="btn btn-success heighter-28"><i class="fa fa-fw fa-circle-check"> </i>&nbsp;'+theme_language("global_select")+"</button>"+"</span>"+"</div>"+"</div>"}else{u='<div class="modal-footer">'+'<div class="input-group">'+'<input class="form-control ui_textbox" data-mppopup_value type="text" value="'+(refInput.is("textarea")?"":r)+'">'+'<span class="input-group-btn mppopup_string_done">'+'<button type="button" class="btn btn-success heighter-28" data-mppopup_confirm><i class="fa fa-fw fa-circle-check"> </i>&nbsp;'+theme_language("global_select")+"</button>"+"</span>"+"</div>"+"</div>"}var g='<div class="modal fade fade5 mppopup '+(e?"_xcustom_window_modal":"")+'" tabindex="-1" role="dialog">'+'<div class="modal-dialog '+o+'" role="document">'+'<div class="modal-content">'+'<div class="modal-header '+l+'">'+'<button type="button" class="close" data-dismiss="modal" aria-label="'+theme_language("global_close")+'"><span aria-hidden="true">&times;</span></button>'+(_?"":'<h4 class="modal-title">'+'<div class="mppopup_filter">'+'<input class="form-control ui_textbox mppopup_filter_input" style="opacity: 0" type="text" placeholder="'+theme_language("datatable_filter")+'" size="50" onkeyup="filter_match(this.value,\'row\',true);">'+"</div>"+"</h4>")+"</div>"+'<div class="modal-body '+f+'">'+t+"</div>"+(c?"":u)+"</div>"+"</div>"+"</div>";$(document.body).append(g);refInput.addClass("refInputData");$("body .mppopup").on("show.bs.modal",function(){if(p&&typeof p==="function"){p()}}).on("shown.bs.modal",function(){if(d&&typeof d==="function"){d()}e&&custom_window.shown()}).on("hidden.bs.modal",function(){e&&custom_window.hidden()}).modal("show")},m=function(e){if(core.curModule("cluster-useradmin")&&(e[1].startsWith("my_user_chooser")||e[1].startsWith("my_group_chooser"))){$v__mpp__g_op=v___location_prefix+"/useradmin/"+e[1]}else if(!e[1].startsWith("/")){$v__mpp__g_op="/"+e[1]}else{$v__mpp__g_op=e[1]}};var v=String(),b="cron_chooser",x='form[action*="backup_sched.cgi"], form[action*="save_newquotas.cgi"], form[action*="save_validate.cgi"]',y='[name="enabled_hidden"], [name="sched_hidden"], [name="when_hidden"]';x+=', form[action*="save_backup.cgi"], form[action*="save_vbackup.cgi"], form[action*="save_vsync.cgi"]';if(f===b){var k=$(x),A=k.find(y).val();v=""+b+".cgi?complex="+A+""}$.ajax({type:"POST",url:v||g,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e;var a=e.match('<frame.*?src="([^"]+)"');if(f===b){var i=t;i=$(i).filter("form")[0].outerHTML;i=i.replace(/<table/,"<table class='table table-condensed table-hardcoded' ");p=function(){page_radios_evolve('.popup_cron_chooser input[type="radio"]:not(.iawobject)')};u=function(){$(".popup_"+b+" form").on("submit",function(e){e.preventDefault();e.stopPropagation();var t=$(this),a=$(x),i=t.parents(".modal.mppopup.in"),n=t.serialize();$.ajax({type:"POST",url:$(this).attr("action"),data:n,dataType:"text",success:function(e){var t=e.match(/top\.opener\.hfield\.value\s*=\s*"(.*?)"/),n=e.match(/top\.opener\.cfield\.value\s*=\s*"(.*?)"/);n&&refInput.val(n[1]);t&&a.find(y).val(t[1]);i.modal("hide")}})})};h('<div class="popup_'+b+'">'+i+"</div>","",0,refInput,1,"modal-lg","modal-no-header",1,1,u,p)}else if($.isArray(a)&&a[1]&&a[1].indexOf("&multi=1")===-1){m(a);$.ajax({type:"POST",url:$v__mpp__g_op,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter(".table").html(),i=$(t).filter(".table").prev("b").html();var n=o(i),s=$(a).find("td").length;if(s===0){a=a.replace("thead","tbody");a=a.replace("<tr>",'<tr class="tr_tag"><td data-td-e class="text-center">'+theme_language("datatable_semptydirectory")+"</td>")}t=n+'<table class="table table-hover table-condensed table-striped">'+a+"</table>";if(t){t=t.replace(/<img.*dir.gif.*?>/gm,'<i class="fa fa-fw fa-folder"></i>').replace(/<img.*unknown.gif.*?>/gm,'<i class="fa fa-fw fa-file-o"></i>')}h(t,"type1",0,refInput,0)}})}else if(!$.isArray(a)){if($.isArray(a)&&a[1].indexOf("&multi=1")===-1){return}var i=t,n=$(i).filter("table").html();h('<table class="table table-hover table-condensed table-striped type2" data-target="'+refInput+'">'+n+"</table>","",1,refInput,0)}else{m(a);$.ajax({type:"POST",url:$v__mpp__g_op,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var t=e.replace(/<(!doctype|script|link|meta)\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/(script|link|meta)>/gi,"").replace(/<\/body>|<\/html>/gi,""),a=$(t).filter("table").html();t='<table class="table table-hover table-condensed table-striped type2">'+a+"</table>";h(t,"type2",0,refInput,1)}})}}})}else{$(this).removeClass("disabled");$(this).attr("onclick",$(this).attr("data-mmclick")).removeAttr("data-mmclick");$(this).trigger("click")}})})()});return{target:s,file:l}}();plugins.navigation=function(){document.addEventListener("DOMContentLoaded",function(){o();c();n();$("aside").on("click",".select2-container .select2-selection__arrow b",function(e){e.preventDefault();e.stopPropagation()}).on("click",'a[href*="/cwaf/"], a[href*="/file/"], a[href*="server-manager/bwgraph.cgi"], a[href*="history.cgi"]',function(e){e.preventDefault();e.stopPropagation();window.open($(this).attr("href"),"_blank")}).on("contextmenu",".switch-toggle label",function(e){e.preventDefault();var t=$(this).attr("for").replace("open_",""),a=$(this).prev("input").is(":checked");if(a){var i=v___location_href;set_server_theme_temp_data("goto",link_type_convert(i,1));setTimeout(function(){theme_open_new_tab(i)},200)}else if(t==="virtualmin"||t==="cloudmin"){var n;if(t==="cloudmin"){n="/server-manager/index.cgi"}else{n="/virtual-server/index.cgi"}var s=link_type_convert(n,2);set_server_theme_temp_data("goto",link_type_convert(s,1));setTimeout(function(){theme_open_new_tab(s)},200)}else if(t==="webmail"){var r=v___location_prefix+"/mailbox/index.cgi?"+$__theme_navigation;set_server_theme_temp_data("goto",link_type_convert(r,1));setTimeout(function(){theme_open_new_tab(r)},200)}else{var r=v___location_prefix+"/sysinfo.cgi?"+$__theme_navigation;set_server_theme_temp_data("goto",link_type_convert(r,1));setTimeout(function(){theme_open_new_tab(r)},200)}}).on("click",".switch-toggle input.dynamic",function(e){if(get_onbeforeunload_status()){e.preventDefault();var t=$(".switch-toggle input:checked").attr("id");get_onbeforeunload_message([],{href:"::switch::"+t});return}w($(this).attr("id").replace("open_",""));if($(this).attr("id")=="open_dashboard"){get_pjax_content(v___location_prefix+"/sysinfo.cgi");return}get_navigation_and_content($(this).attr("id").replace("open_",""))}).on("focus",".sidebar-search",function(){f("c",false)}).on("blur",".sidebar-search",function(){setTimeout(function(){f("c",true)},150)}).on("click",'.navigation a[target="page"], .user-links a[target="page"]',function(){l()}).on("click",".navigation > li .navigation_external_link",function(e){e.preventDefault();e.stopPropagation();b=$(this);window.open(b.attr("href"),"_blank")}).on("click",".navigation > li:not('.sub-wrapper'):not('.menu-container'):not('.navigation_external'):not([data-linked])",function(e){e.preventDefault();e.stopPropagation();var t=1;if(e.target&&e.target.classList&&e.target.classList.value&&(e.target.classList.value.includes("fancytree")||e.target.classList.value.includes("label-danger"))){t=0}v___blocked_navigation=t;typeof $processing=="undefined"?$processing=false:false;if(!$processing){$processing=true;var a=$("a",this).attr("href"),i=$("a",this).attr("target"),n=$(this);if(i){$(".navigation > li > ul.sub > li").each(function(){$(this).removeClass("sub_active").find("span.current").remove()})}$.when($("#sidebar .navigation > li").each(function(){var e=$(this),t=e.find("a"),a=t.is("[data-has-sub-link]");if((typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category)&&!e.is(n)){e.removeClass("active");if(e.find("a").attr("href")!="#search"&&a){$(e.find("a").attr("href")).slideUp(175)}}})).done(function(){n.hasClass("active")?n.removeClass("active"):a!="#hide"&&!i?n.addClass("active"):false;setTimeout(function(){if($(a).is(":visible")&&a!="#hide"&&!i){n.addClass("active")}else{n.removeClass("active")}$processing=false},2*175>0?2*175:1);$(a).slideToggle(175)});if(a=="#search"){$('#sidebar input[name="search"]').focus()}}}).on("click",".navigation > li.has-sub",function(){page.load.happening()&&(plugins.navigation.detectAllowed=false)}).on("click",".navigation > li > ul.sub > li:not([data-link-inactive]):not('.menu-container')",function(e){if(e.target&&$(e.target).is("li")){return}var t=window.navigator.platform==="MacIntel"?1:0;if(!t&&e.ctrlKey||t&&e.metaKey){return}var a=$(this);$(".navigation > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove();$(".navigation > li > ul.sub > li").each(function(){$(this).removeClass("sub_active").find("span.current").remove()});$("#webmin_search_form").find('input[name="search"]').val("");$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");a.addClass("sub_active").append('<span class="current"></span>')}).on("click",'a[data-refresh="true"]',function(e){e.preventDefault();page_refresh()}).on("focus",".form-control.sidebar-search",function(e){page.load.happening()&&(plugins.navigation.detectAllowed=false);$(".__logo").addClass("inited");e.preventDefault();e.stopPropagation();vars.shell.history=0}).on("keydown","#webmin_search_form",function(e){var t=$(this),a=t.find("input.sidebar-search"),i=a.val(),n=$("body").find(".-shell-port-");if(i&&e.keyCode===13){e.preventDefault();if(!i.startsWith("!")){$(this).find('input[name="title"]').remove();var s=E(1),r=theme_language("search_in_"+(s==="mailbox"?"usermin":s)+"");r=r?r:theme_language("filemanager_context_search");$("<input>").attr({type:"hidden",name:"title",value:r}).appendTo($(this));var o=$(this).attr("action")+"?"+$(this).serialize();if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:o})}else{get_pjax_content(o);a.val("")}}else{if(core.moduleAvailable("xterm")){var l=i.includes("!edit ")||i.includes("!editor "),c=i.includes("!view ")||i.includes("!viewer ");if(l||c){var _=i.replace("!edit ","").replace("!editor ","").replace("!view ","").replace("!viewer ",""),d=_.split("\\").pop().split("/").pop(),f=_.replace("/"+d,"");plugins.navigation.collapse();progress.start();if(c){edit_file(d,f||"/",false,1,0)}else{edit_file(d,f||"/")}}else{plugins.terminal.open(i)}}else if(core.moduleAvailable("shell")){plugins.shell.open(i)}}}}).on("click","[data-collapse-trigger]",function(e){e.stopImmediatePropagation();var t=session.server.data("data-navigation-collapsed")=="1"?0:1;vars.navigation.pinned=t;settings_navigation_always_collapse=!settings_navigation_always_collapse;if(settings_navigation_always_collapse){session.server.data("data-navigation-collapsed",1);$(".mobile-menu-toggler").removeClass("visible-xs");l(1,e.originalEvent!==undefined?1:0)}else{session.server.data("data-navigation-collapsed",0);$(".mobile-menu-toggler").addClass("visible-xs")}setTimeout(function(){page_resized()},0);$(window).resize()}).on("click",".user-links > li.favorites",function(){$(".favorites-menu-outer").addClass("hover")}).on("click",".user-link.palette-toggle",function(){theme_toggle_night_mode()}).on("click",".user-link.ported-console",function(){if(plugins.shell.available()){if(session.server.data("terminal")==1){plugins.terminal.open()}else{plugins.shell.open()}}}).on("click",".user-links > li",function(e){if($(e.target).is($(this))){var t=$(this).find("a"),a=t&&t[0]&&t[0].hasAttribute("data-nref");if(a){location.href=t.attr("href")}else{$(this).find("a, [data-collapse-trigger]").trigger("click")}}}).on("click",".__logout-link",function(){progress.start();get_server_theme_temp_data("goto",0)}).on("click",".servers-index-link > a",function(e){e.preventDefault();e.stopPropagation();progress.start();location.href=this.href}).mCustomScrollbar({axis:"y",theme:"minimal",scrollInertia:250,scrollButtons:false,advanced:{autoScrollOnFocus:false},callbacks:{onScroll:function(){if(!$(".mobile-menu-toggler").is(":visible")){$(".form-control.sidebar-search").blur();if($("aside select")&&$("aside select").length>0&&$("aside select").hasClass("select2-hidden-accessible")){$("aside select").select2("close")}}if($(".popover-servers-index:visible").length){$('aside [data-servers-index="popover"]').trigger("click")}}}});$("body").on("click",".popover-servers-index.in .popover-content a",function(e){e.preventDefault();progress.start();location.href=this.href})});var e=function(){var e=".navigation",t=typeof settings_navigation_auto_fold_category=="undefined"||settings_navigation_auto_fold_category;t&&$(e+" li.has-sub").removeClass("sub_active");$(e+" > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove();$(e+" > li > ul.sub > li").removeClass("sub_active").find("span.current").remove();t&&$(e+" > li.has-sub").removeClass("active");t&&$(e+" > li > ul.sub").hide();t&&$(e+" > li > a > i.fa.fa-folder-open-o").removeClass("fa-folder-open-o")},t=function(t,a){if(v___theme_pjax_call===0){return}var i=function(e){return e?e.replace("/edit_users.cgi","/list_users.cgi").replace("/edit_user.cgi","/list_users.cgi").replace("/edit_alias.cgi","/list_aliases.cgi").replace("/edit_database.cgi","/list_databases.cgi").replace("/save_database.cgi","/list_databases.cgi").replace("/edit_script.cgi","/list_scripts.cgi").replace("/script_form.cgi","/list_scripts.cgi").replace("/save_domain.cgi","/edit_domain.cgi"):e};var n=false,s=function(){n=false;if(!plugins.navigation.detectAllowed){return}typeof t=="undefined"&&(n=true);if(Test.arrContains(["webmin_search.cgi","tconfig.cgi","settings-editor_favorites_read.cgi"],v___location_file)||page_extended()){e();return}if(v___blocked_navigation){return}if(typeof a=="undefined"){var s=function(e){var t=":not([data-parent-hidden]):first",a='a[href*="'+e+'"]'+t+"";if(e&&e.includes("/virtual-server/")){var i=e.match(/.*(dom|gparent)=(\d+)/),n=e.match(/.*?\.cgi/);if(i&&i[1]&&i[2]&&n){a='a[href*="'+n[0]+'"][href*="'+(i[1]+"="+i[2])+'"]'+t+""}}return a},r=v___location_path==="/"?t:v___location_path+(v___location_query?"?"+v___location_query:"");if(v___initial_load&&!r){return}if(!r){r="/"}$nearExactMatchStatus=1,$superExactMatchStatus=0,$nearExactMatch=$('.navigation a[href*="'+r+'"]:not([data-parent-hidden]):first'),$nearExactMatchPostSave=$(".navigation "+s(r.replace("save_","edit_"))),$nearExactMatchPostList=$(".navigation "+s(r.replace("edit_","list_"))),$nearExactMatchPostListSingular=$(".navigation "+s(r.replace("edit_","list_").replace(".cgi","s.cgi"))),$nearExactMatchPostListPlural=$(".navigation "+s(r.replace("edit_","list_").replace(".cgi","es.cgi")));if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostSave;if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostList;if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostListSingular}if(!$nearExactMatch.length){$nearExactMatch=$nearExactMatchPostListPlural}}}if(Test.strContains(v___location_file||t,"cgi")&&$nearExactMatch.length){t=$nearExactMatch.attr("href");$nearExactMatchStatus=0}else if($('.navigation a[href="'+v___location_resource+'"]:not([data-parent-hidden]):first, .navigation a[href*="'+link_type_convert(v___location_path,2)+'"]:not([data-parent-hidden]):first').length){t=v___location_resource;$superExactMatchStatus=1}else if($('.navigation a[href^="'+v___location_resource+'"]:not([data-parent-hidden]):first').length){t=v___location_resource;$nearExactMatchStatus=0}t=i(t);var o=v___location_file==="config.cgi"||v___location_file==="uconfig.cgi",l=v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager;if(o&&!l){if($t_uri_virtualmin&&!core.curModule("virtualmin-awstats")){t=v___location_prefix+"/config.cgi?virtual-server"}else if($t_uri_cloudmin){t=v___location_prefix+"/config.cgi?server-manager"}else if($t_uri_webmail){t=v___location_prefix+"/uconfig.cgi?mailbox"}else{t=v___location_prefix+"/"+v___location_query+"/"}}if(l){t=v___location_prefix+"/"+v___module_file_manager}var c=$t_uri_webmin||$t_uri_usermin;if(!t&&c){if(Test.strContains(v___location_file,".cgi")&&!Test.strContains(v___location_file,"sysinfo.cgi")){t=v___location_path.replace(v___location_file,"")}else if(!t){var _=new RegExp("^"+v___location_prefix,"i");t=session.server.data("data-uri").replace(_,"").split("/").filter(function(e){return e.length!==0})[0];t=v___location_prefix+"/"+t}}if($superExactMatchStatus){targeted_menu_link=$('.navigation a[href="'+t+'"]:not([data-parent-hidden]):first, .navigation a[href="'+link_type_convert(t,2)+'"]:not([data-parent-hidden]):first')}else{if(t&&(t.endsWith("/virtual-server/")||t.endsWith("/server-manager/"))){t+="index.cgi"}targeted_menu_link=$('.navigation a[href^="'+t+'"]:not([data-parent-hidden]):first')}if(targeted_menu_link.length){e()}}else{var d=".navigation a[href",f=":not([data-parent-hidden]):first";if(a==="progress"){t=i(t);targeted_menu_link=$(""+d+'*="'+t+'"]'+f+"")}else{targeted_menu_link=$(""+d+'^="'+t+'"]'+f+"")}if(targeted_menu_link.length){e()}}$("aside .navigation .fancytree-node.fancytree-active").removeClass("fancytree-active");if(t==="/"){return}targeted_menu_link.parent("li:not(.menu-exclude):not(.user-link)").addClass("sub_active").append('<span class="current-large"></span>').parent("ul.sub").show().parent("li:not(.menu-exclude):not(.user-link)").prev("li").addClass("active")};s();n&&setTimeout(s,1)},a=function(){$(".mCSB_container, .mCSB_dragger").css("top","0");!$("#_menu_loader").length&&$("body ul.navigation").before('<span id="_menu_loader" class="loading loading-sm"></span>');$("body aside .mCSB_scrollTools, body ul.navigation, body ul.user-links").css("visibility","hidden");$("aside ul.user-html").addClass("invisible")},i=function(){$("aside ul.user-html").removeClass("invisible");$("body aside .mCSB_scrollTools, body ul.navigation, body ul.user-links").css("visibility","visible");$("#_menu_loader").remove();c();n();bind_sameorigin(1);theme_to_new_tab();s()},n=function(){vars.navigation.servers_index_control=false;var e=$('aside [data-servers-index="popover"]'),t=e.parent(),a=t.data("http-webmin-servers");if(e.length){vars.navigation.servers_index_control=true;$.ajax({type:"GET",url:a+"index-json.cgi",dataType:"JSON",success:function(i){var n="",s=session.server.data("data-webprefix");if(i&&i.length>1){t.removeClass("hidden");$.each(i,function(){if(!s.endsWith(this.id)){n+='<a href="'+(a+"link.cgi/"+this.id)+'/"><span><i class="fa2 fa-fw fa2-server-network"></i>&nbsp;'+Convert.htmlEscape(this.host)+(this.desc?" ("+Convert.htmlEscape(this.desc)+")":"")+"</span></a><br>"}});n&&e.popover({animation:"false",placement:"top",html:"true",container:"body",template:'<div class="popover popover-servers-index"><div class="arrow"></div><div class="popover-content"></div></div>',trigger:"click",content:n});e.on("shown.bs.popover",function(){$(".popover-servers-index").removeClass("fade")})}}})}},s=function(){var e=$('aside a[href*="'+v___module_file_manager+'"]');if(e&&e.length){var t=e.attr("href"),a=uri_parse_param("path",t);if(a&&!a.startsWith("/")&&!a.startsWith("%2F")){var i=new URI(t),n=i.pathname(),s="/"+a,r=n+"?path="+Convert.uriEncodeComponent(s);e.attr("href",r)}}},r=function(){return $("#_menu_loader").length},o=function(){if($("aside").css("transform")=="none"&&$("html").attr("data-navigation-collapsed")!="1"){$("aside").transition({x:settings_leftmenu_width},0,function(){if($(".__logo")&&$(".__logo").css("transform")=="none"&&!$(".mobile-menu-toggler:visible").length){$(".__logo").transition({y:"-140px"},175*1.5)}})}},l=function(e,t){var a="mobile-menu-toggler",i=$(quirks.active_element()).is('input[name="settings_navigation_always_collapse"]');i=1;if(e){}if(t){$("."+a+"").addClass("selected").find("button").addClass("btn-primary").removeClass("btn-default");$("."+a+"").css("transform","translate("+settings_leftmenu_width+"px, 0px)");return}if(typeof jQuery().transition=="function"&&($("."+a+":visible").length&&$("."+a+"").attr("style")&&$("."+a+"").attr("style").indexOf("ease")==-1)){if($(".__logo")){$(".__logo").transition({y:0},175*1.5)}$("aside, ."+a+"").transition({x:0},i?0:175,function(){$("."+a+"").removeClass("selected");$("aside").addClass("hidden-xs")})}},c=function(e){var t="body aside",a="select2";vars.navigation.select.back=false;if($(".form-control.sidebar-search").is(":focus")){return}$.each($(""+t+" select > option"),function(){var e=$(this).text().match(/^\s{0,4}/)[0].length,t=$(this).text();if(settings_leftmenu_vm_cm_dropdown_icons){if(e===4&&t.indexOf("↱")===-1){$(this).html("&nbsp;&nbsp;&nbsp;&nbsp;↱&nbsp;"+t.replace(/\s/g,""))}else if(e===2&&t.indexOf("↴")===-1){$(this).html("&nbsp;&nbsp;↴&nbsp;"+t.replace(/\s/g,""))}}}).promise().done(function(){var i=$(""+t+" select");i.removeAttr("id");if(i.length){i.removeAttr("onchange disabled");i.data(a)?i.select2("destroy"):false;i.unbind(""+a+":select");i.select2({minimumResultsForSearch:3,dropdownCssClass:"aside-select2"});var n=i.data(a);if(e){i.select2("open")}i.on(""+a+":selecting",function(){i.data("previous-value",$(this).val())});i.on(""+a+":select",function(e){var t=e.currentTarget.value;if(e.currentTarget.name==="dom"){if(get_onbeforeunload_status()){vars.navigation.select.back=true;get_onbeforeunload_message(e,this,{"plugins.navigation.get.virtualmin":[t],get_pre_default_content:[t]})}else{I(t);get_pre_default_content(t)}}else{if(e.currentTarget.name==="sid"){if(get_onbeforeunload_status()){vars.navigation.select.back=true;get_onbeforeunload_message(e,this,{"plugins.navigation.get.cloudmin":[t],get_pre_default_content:[t]})}else{T(t);get_pre_default_content(t)}}}});var s=".select2-dropdown.aside-select2",r=function(){$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$(this);setTimeout(function(){$(s).find('li[id$="'+e.attr("value")+'"]').addClass("text-danger")},0)}})};i.on(""+a+":opening",function(){r();setTimeout(function(){var e=""+s+" .select2-search__field",t="keydown.colorfilter";$(e).off(t);$(e).on(t,function(){r()})},0);$(t).find("."+a+"-container:not(."+a+"), "+v___class_select2_leak).addClass(""+a+"-aside")});i.on(""+a+":open",function(){setTimeout(function(){var e=document.querySelector(".select2-search__field");e&&e.focus()})});i.on(""+a+":closing",function(){$(t).find("."+a+"-container, "+v___class_select2_leak).removeClass(""+a+"-aside")});if($(""+t+" select option").length===1){$(t+" ."+a+" span").css("cursor","default");$(t+" ."+a+" ."+a+"-selection__arrow").remove();i.on(""+a+":open",function(){$(t+" ."+a+"-container ."+a+"-dropdown").css("opacity","0")})}$.each($(""+t+" select > option"),function(){if($(this).attr("style")&&$(this).attr("style").indexOf("italic")>-1){var e=$($("."+a+"-selection > ."+a+"-selection__rendered")[0]);if(e.text().trim()==$(this).text().trim()){e.addClass("text-danger")}}})}})},_=function(e,t){var a=$("aside select");a.val(e).trigger("change");if(t){a.trigger("select2:select")}},d=function(){if(vars.navigation.select.back){var e=$("aside select");_(e.data("previous-value"),0);vars.navigation.select.back=false}},f=function(e,t){var i="aside .form-control.sidebar-search",n="aside .autocomplete-suggestions",s=function(e){return e&&(e.includes("http://")||e.includes("https://")||e.includes("ftp://")||e.includes("ftps://"))?1:0};if(e=="c"){$(n).remove();$(i).removeAttr("disabled");$(i).autocomplete("dispose");!get_onbeforeunload_status()&&$(i).val("");if(t){return}}var r={},o="li:not(.menu-exclude):not(.user-link)";$.each($(""+o+' > ul[id^="global_"].sub > '+o+' > a, ul.navigation > [data-after] > a, ul.navigation > li > a[href*="virtual-server/index.cgi"], ul.navigation > li > a[href*="server-manager/index.cgi"]'),function(){var e=$(this).attr("href"),t=s(e),a=(e.substring(0,1)=="/"?"":"/")+e;if(t){a=e}r[a]=$.trim($(this).text())});$('li > a[target="page"][data-href="/virtual-server/index.cgi"], '+o+' > a[target="page"][data-href="/sysinfo.cgi"], '+o+' > a[target="page"][data-href="/virtual-server/pro/history.cgi"], '+o+' > a[target="page"][data-href="/server-manager/one_history.cgi"], '+o+' > a[target="page"][data-href="/server-manager/bwgraph.cgi"], '+o+' > a[target="page"][data-href="/server-manager/history.cgi"], '+o+' > a[target="page"][data-href="/mailbox/list_folders.cgi"], '+o+' > a[target="page"][data-href="/mailbox/list_ifolders.cgi"], '+o+' > a[target="page"][data-href="/mailbox/list_addresses.cgi"], '+o+' > a[target="page"][data-href="/filter/edit_forward.cgi"], '+o+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+o+' > a[target="page"][data-href="/filter/edit_auto.cgi"], '+o+' > a[target="page"][data-href="/filter/"], '+o+' > a[target="page"][data-href="/mailbox/edit_sig.cgi"]').each(function(){r[$(this).attr("data-href")]=$.trim($(this).text())});var c=function(e){var t="🔒",a=e&&e.includes(t);return a},d=$.map(r,function(e,t){if(t!="undefined"&&!c(e)){return{value:e,url:t,data:{category:V()}}}});var f={};if(core.curModule("custom")||v___location_path==v___location_prefix+"/backup-config/"||v___location_path==v___location_prefix+"/backup-config/index.cgi"||v___location_path==v___location_prefix+"/usermin/"||v___location_path==v___location_prefix+"/usermin/index.cgi"||v___location_path==v___location_prefix+"/webmin/"||v___location_path==v___location_prefix+"/webmin/index.cgi"||v___location_path==v___location_prefix+"/acl/"||v___location_path==v___location_prefix+"/acl/index.cgi"||v___location_path==v___location_prefix+"/init/"||v___location_path==v___location_prefix+"/init/index.cgi"||v___location_path==v___location_prefix+"/mount/"||v___location_path==v___location_prefix+"/mount/index.cgi"||v___location_path==v___location_prefix+"/quota/"||v___location_path==v___location_prefix+"/quota/index.cgi"||v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"||v___location_path==v___location_prefix+"/inittab/"||v___location_path==v___location_prefix+"/inittab/index.cgi"||v___location_path==v___location_prefix+"/logrotate/"||v___location_path==v___location_prefix+"/logrotate/index.cgi"||v___location_path==v___location_prefix+"/mailcap/"||v___location_path==v___location_prefix+"/mailcap/index.cgi"||v___location_path==v___location_prefix+"/pam/"||v___location_path==v___location_prefix+"/pam/index.cgi"||v___location_path==v___location_prefix+"/proc/"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_user.cgi"||v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"||v___location_path==v___location_prefix+"/cron/"||v___location_path==v___location_prefix+"/cron/index.cgi"||v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"||v___location_path==v___location_prefix+"/useradmin/"||v___location_path==v___location_prefix+"/useradmin/index.cgi"||v___location_path==v___location_prefix+"/apache/"||v___location_path==v___location_prefix+"/apache/index.cgi"||v___location_path==v___location_prefix+"/bind8/"||v___location_path==v___location_prefix+"/bind8/index.cgi"||v___location_path==v___location_prefix+"/dhcpd/"||v___location_path==v___location_prefix+"/dhcpd/index.cgi"||v___location_path==v___location_prefix+"/dovecot/"||v___location_path==v___location_prefix+"/dovecot/index.cgi"||v___location_path==v___location_prefix+"/ldap-server/"||v___location_path==v___location_prefix+"/ldap-server/index.cgi"||v___location_path==v___location_prefix+"/virtualmin-nginx/"||v___location_path==v___location_prefix+"/virtualmin-nginx/index.cgi"||v___location_path==v___location_prefix+"/fetchmail/"||v___location_path==v___location_prefix+"/fetchmail/index.cgi"||v___location_path==v___location_prefix+"/mysql/"||v___location_path==v___location_prefix+"/mysql/index.cgi"||v___location_path==v___location_prefix+"/mysql/edit_dbase.cgi"||v___location_path==v___location_prefix+"/postgresql/"||v___location_path==v___location_prefix+"/postgresql/index.cgi"||v___location_path==v___location_prefix+"/postgresql/edit_dbase.cgi"||v___location_path==v___location_prefix+"/postfix/"||v___location_path==v___location_prefix+"/postfix/index.cgi"||v___location_path==v___location_prefix+"/procmail/"||v___location_path==v___location_prefix+"/procmail/index.cgi"||v___location_path==v___location_prefix+"/proftpd/"||v___location_path==v___location_prefix+"/proftpd/index.cgi"||v___location_path==v___location_prefix+"/mailboxes/"||v___location_path==v___location_prefix+"/mailboxes/index.cgi"||v___location_path==v___location_prefix+"/mailboxes/list_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/"||v___location_path==v___location_prefix+"/mailbox/index.cgi"||v___location_path==v___location_prefix+"/samba/"||v___location_path==v___location_prefix+"/samba/index.cgi"||v___location_path==v___location_prefix+"/spam/"||v___location_path==v___location_prefix+"/spam/index.cgi"||v___location_path==v___location_prefix+"/squid/"||v___location_path==v___location_prefix+"/squid/index.cgi"||v___location_path==v___location_prefix+"/sshd/"||v___location_path==v___location_prefix+"/sshd/index.cgi"||v___location_path==v___location_prefix+"/webalizer/"||v___location_path==v___location_prefix+"/webalizer/index.cgi"||v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"||v___location_path==v___location_prefix+"/htaccess-htpasswd/"||v___location_path==v___location_prefix+"/htaccess-htpasswd/index.cgi"||v___location_path==v___location_prefix+"/status/"||v___location_path==v___location_prefix+"/status/index.cgi"||v___location_path==v___location_prefix+"/net/"||v___location_path==v___location_prefix+"/net/index.cgi"||v___location_path==v___location_prefix+"/tcpwrappers/"||v___location_path==v___location_prefix+"/tcpwrappers/index.cgi"||v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"||v___location_path==v___location_prefix+"/fail2ban/"||v___location_path==v___location_prefix+"/fail2ban/index.cgi"||v___location_path==v___location_prefix+"/nis/"||v___location_path==v___location_prefix+"/nis/index.cgi"||v___location_path==v___location_prefix+"/passwd/"||v___location_path==v___location_prefix+"/passwd/index.cgi"){$($(".container-fluid .panel-body a[href]:not([href*='javascript'],[href*='list_users.cgi?dom'],[href*='edit_hdparm.cgi?disk'],[href*='blink.cgi?disk'],[href*='smart-status/index.cgi?drive'],[href*='help.cgi'],[href*='edit_user.cgi?new='],[href*='edit_user.cgi?idx='],[href*='edit_recipe.cgi'],[href*='up.cgi'],[href*='down.cgi'],[href*='virt_index.cgi'],[href*='save_log.cgi'],[href*='backup.cgi'],[href*='activate.cgi'],[href*='#'])")).each(function(){if(v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"){f["/"+v___location_path_lead_unslashed+$(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").next("td[data-td-e]").find("a").attr("href")]=$.trim($(this).text())}else{if(v___location_path==v___location_prefix+"/backup-config/"||v___location_path==v___location_prefix+"/backup-config/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{if(v___location_path==v___location_prefix+"/mount/"||v___location_path==v___location_prefix+"/mount/index.cgi"||v___location_path==v___location_prefix+"/quota/"||v___location_path==v___location_prefix+"/quota/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{if(v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").next("td").find("label").find("tt").find("tt").text())}else{if(v___location_path==v___location_prefix+"/proc/"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_user.cgi"||v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"){if(v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").text())}else{if(v___location_path==v___location_prefix+"/proc/index_search.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").text())}else{$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" — "+$.trim($(this).parents("td").next("td").next("td").next("td").text())}}}else{if(v___location_path==v___location_prefix+"/useradmin/"||v___location_path==v___location_prefix+"/useradmin/index.cgi"){$description=$.trim($(this).parents("td").next("td").find("label").text())+" — "+$(this).text()+":"+$.trim($(this).parents("td").next("td").next("td").find("label").text())+" - "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").find("label").text())+", "+$.trim($(this).parents("td").next("td").next("td").next("td").next("td").next("td").find("label").text())}else{if(v___location_path==v___location_prefix+"/mailboxes/list_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/"||v___location_path==v___location_prefix+"/mailbox/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").next("td").find("label").text())+" — "+$.trim($(this).parents("td").next("td").find("label").text())+" ["+$.trim($(this).parents("td").next("td").next("td").find("label").text())+"]"}else{if(v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"){$description=$.trim($(this).parents("td").next("td").next("td").find("label").text())}else{if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){$description=$.trim($(this).parent("td").next("td[data-td-e]").text())+" - "+$.trim($(this).parent("td").next("td[data-td-e]").next("td[data-td-e]").text())}else{$description=$.trim($(this).parent("td").next("td[data-td-e]").text())}}}}}}}}$description?$_description=true:$_description=false;var e=$.trim($(this).text());if(core.curModule("bind8")){var t=$(this).parents("form").prev("br").prev("b").find("tt");if(t.length){var a=t.text(),i=!$(this).parent(".ui_links_row").length;if(i&&a){e=e+" ("+a+")"}}}f[($(this).attr("href").substring(0,1)=="/"?"":"/")+v___location_directory_unslashed_trail_slashed+$(this).attr("href")]=e+($_description?" (":"")+$description+($_description?")":"")}})}var p=$.map(f,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:get_module_title()}}}});var u={};$.each($(""+o+' > ul.sub:not([id^="global_"]) > '+o+' > a, ul.navigation > [data-linked]:not([data-after]) > a:not([href*="virtual-server/index.cgi"]):not([href*="server-manager/index.cgi"])'),function(e,t){u[($(this).attr("href").substring(0,1)=="/"?"":"/")+$(this).attr("href")]=$.trim($(this).text())});$(""+o+' > a[target="page"]:not([data-href="/acl/edit_user.cgi"],[data-href="/virtual-server/index.cgi"],[data-href="/sysinfo.cgi"],[data-href="/virtual-server/pro/history.cgi"], [data-href="/mailbox/list_folders.cgi"], [data-href="/mailbox/list_ifolders.cgi"], [data-href="/mailbox/list_addresses.cgi"], [data-href="/filter/edit_forward.cgi"], [data-href="/filter/edit_auto.cgi"], [data-href="/filter/edit_auto.cgi"], [data-href="/filter/"], [data-href="/mailbox/edit_sig.cgi"])').each(function(e,t){if(!$t_uri_usermin&&!v()){u[$(this).attr("data-href")]=$.trim($(this).text())}});var g=$.map(u,function(e,t){if(t!="undefined"){var a=c(e);return{value:a?"":e,url:a?"":t,data:{category:$("aside .select2-selection__rendered").text()?'<span style="font-style: italic">'+$("aside .select2-selection__rendered").clone().children().remove().end().text()+"</span>":V()}}}});var h={};$("aside select option").each(function(){h[$(this).val()+":::"+$(this).parent("select").attr("name")]=$.trim($(this).text())});var m=$.map(h,function(e,t){if(t!="undefined"){return{value:e,url:t,data:{category:$("aside select").data("autocomplete-title")}}}});var b=m.concat(p).concat(g).concat(d);try{const e="x-hidden";$.map(b,function(t,a){if(typeof settings_autocomplete_extra_associations_privileged==="object"){var i=session.server.data("language"),n=settings_autocomplete_extra_associations_privileged[i]?settings_autocomplete_extra_associations_privileged[i]:settings_autocomplete_extra_associations_privileged.en;if(typeof n==="object"){for(const[i,s]of Object.entries(n)){if(typeof s==="object"){for(const[i,n]of Object.entries(s)){if(typeof n==="object"){for(const[s,r]of Object.entries(n)){if(t&&t.url&&t.url.includes(i+"/")&&t.url.includes(r[0]+".cgi")){t.value=t.value+"<"+e+">"+r[1]+"</"+e+">";b[a]=t}}}else{if(t&&t.url&&(t.url.endsWith("/"+i+"/")||t.url.endsWith("/"+i+"/index.cgi"))){t.value=t.value+"<"+e+">"+n+"</"+e+">";b[a]=t}}}}}}}})}catch(e){}$(i).on("keydown",function(e){if(e.keyCode==34||e.keyCode==33||e.keyCode==20||e.keyCode==17||e.keyCode==16||e.keyCode==9){e.preventDefault();e.stopPropagation()}});$(i).autocomplete({lookup:b,orientation:"auto",onSelect:function(e,t){var i=$.Autocomplete.externalEvent;if(!$.isEmptyObject(i)){var n=i.keyCode?i.keyCode:i.which;if(i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||n===20||n===32||n===33||n===34||n===35||n===36||n===37||n===38||n===39||n===40||n===45||n===46||n===112||n===113||n===114||n===115||n===116||n===117||n===118||n===119||n===120||n===121||n===122||n===123||n===144||n===145){return}}if(v()===true&&$t_uri_dashboard&&get_access_level()!=2&&get_access_level()!=4){w("webmin")}$(this).val("").blur();l();var r=s(e.url);if(e.url.substring(0,1)=="/"||r){var o=e.url&&(r||e.url.includes("/file/")||e.url.includes("/cwaf/")||e.url.includes("virtual-server/pro/history.cgi")||e.url.includes("server-manager/bwgraph.cgi")||e.url.includes("server-manager/history.cgi")||e.url.includes("server-manager/one_history.cgi"));if(o){theme_open_new_tab(e.url,1);return}else{var c=e.url;if(v___location_prefix&&!c.startsWith(v___location_prefix)){c=v___location_prefix+c}if(Test.strContains(v___location_prefix,v___target_servers_index)&&c&&c.endsWith("/servers/")){return}if(c&&(c.includes("switch_user.cgi")||c.includes("/shell")||c.includes("shell=1"))){set_onbeforeunload_status(0,0);$('aside [data-linked] a[href="'+e.url+'"]').click();return}if(get_onbeforeunload_status()){if(t){t.preventDefault()}get_onbeforeunload_message([],{href:c})}else{get_pjax_content(c,["reference"])}}}else if(e.url&&e.url.indexOf(":::")>-1){var d=e.url.split(":::")[0];if(get_onbeforeunload_status()){get_onbeforeunload_message(g,this,{"plugins.navigation.select.set":[d,1]})}else{a();_(d,1)}}},groupBy:"category"})},p=function(){var e="data-goto",t=$("aside").find("li["+e+"]"),a=t.attr(e);t.remove();return a},u=function(e,t){if(get_onbeforeunload_status()){return}var e=typeof e=="undefined"||e==-1||e==""?$("aside select").val():e,a=$t_uri_virtualmin?"virtualmin":$t_uri_cloudmin?"cloudmin":$t_uri_usermin?"usermin":$t_uri_webmin?"webmin":"mail";if(a=="webmin"){w("webmin");S("webmin",t)}else if(a=="virtualmin"){w("virtualmin");I(e,t)}else if(a=="cloudmin"){w("cloudmin");T(e,t)}else if(a=="usermin"){w("usermin");S("usermin",t)}else if(a=="mail"){w("webmail");S("webmail",t)}},g=function(e,t){if(!t){t=600}var i=e?" #open_"+e+"":' [id^="open_"]',n=$(".switch-toggle"+i+":checked");if(n.length){a();var s=0;if(!s){s++;setTimeout(function(){n.click()},t)}}},h=function(e){var t="aside",a="form",i=a+"s",n="select",s=$(t+" "+n),r=s.data(n+"2"),o=$(t+" .sidebar-search").val();if(o){return}if(!e){vars.navigation.select.obj=r&&r!="undefined"&&!e&&s.select2("isOpen")}if(!e){if(r){s.select2("destroy")}$.each($(t).find(a),function(){$(this).replaceTagName(i)})}else{$.each($(t).find(i),function(){$(this).replaceTagName(a)}).promise().done(function(){c(vars.navigation.select.obj)})}},m=function(){if(vars.navigation.width_initial===false){vars.navigation.width_initial=settings_leftmenu_width}if(matchMedia("(max-width: 1080px)").matches||$("html").attr("data-navigation-collapsed")=="1"){settings_leftmenu_width=260;page_adjust(settings_leftmenu_width,0)}else{if(v___initial_load===1){return}settings_leftmenu_width=vars.navigation.width_initial;page_adjust(settings_leftmenu_width,settings_leftmenu_width)}},v=function(){if(x("dashboard")=="1"){return true}else{return false}},x=function(e){if(e){e='[id="open_'+e+'"]'}else{e=String()}return $(".switch-toggle input"+e+"").length},y=function(){w("dashboard");e();get_pjax_content(v___location_prefix+"/sysinfo.cgi")},k=function(){if(Test.string(C)){w(C)}},A=function(){var e=$('aside .switch-toggle [name="product-switcher"]:checked').attr("id");if(typeof e==="string"){return e.replace("open_","")}return null},w=function(e){if(get_onbeforeunload_status()){return}$('.switch-toggle input:not([id="open_'+e+'"])').each(function(){$(this).removeAttr("checked")}).promise().done(function(){var t=$("#open_"+e),a='.dynamic[name="product-switcher"]';if(!t.length){$(a).first().prop("checked",true)}else{$("#open_"+e).prop("checked",true)}});O()},C=setTimeout(A),S=function(n,s){if(get_onbeforeunload_status()){return}a();var r=n=="webmail"?"webmail":session.server.data("product");w(r);$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype="+r,dataType:"JSON",success:function(e){C=r;$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();if(n==="webmail"&&settings_mail_ui&&get_access_level()==3){typeof mail==="object"&&typeof mail.folders==="object"&&typeof mail.folders.get==="function"?mail.folders.get():load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.folders.get()"])}setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},I=function(n,s){if(get_onbeforeunload_status()){return}a();w("virtualmin");$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=virtualmin&dom="+n+"",dataType:"JSON",success:function(e){C="virtualmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},T=function(n,s){if(get_onbeforeunload_status()){return}a();w("cloudmin");$.ajax({type:"GET",url:v___location_prefix+"/xhr.cgi?type=nav&action=get&subtype=cloudmin&sid="+n+"",dataType:"JSON",success:function(e){C="cloudmin";$("body ul.navigation").html(e.menu);plugins.shell.link();i();!session.server.data("loading")&&t();setTimeout(function(){if(typeof s==="function"){s.call()}},10)},error:function(t){session.status(t.responseText);i();e()}})},V=function(){if($t_uri_webmin){return theme_language("titles_wm")}else if($t_uri_usermin){return theme_language("titles_um")}else if($t_uri_virtualmin){return theme_language("titles_vm")}else if($t_uri_cloudmin){return theme_language("titles_cm")}else if($t_uri_webmail){return theme_language("titles_mail")}else if($t_uri_dashboard){return theme_language("titles_dashboard")}},E=function(e,t){if($t_uri_webmin){return"webmin"}else if($t_uri_usermin){return"usermin"}else if($t_uri_dashboard){return"dashboard"}else if($t_uri_virtualmin){if(t){return"virtualmin"}else if(e){return"virtualserver"}else{return"virtual-server"}}else if($t_uri_cloudmin){if(t){return"cloudmin"}else if(e){return"servermanager"}else{return"server-manager"}}else if($t_uri_webmail){return"mailbox"}},O=function(){$t_uri_webmin=$('.switch-toggle input[id="open_webmin"]:checked').length?1:0;$t_uri_usermin=$('.switch-toggle input[id="open_usermin"]:checked').length?1:0;$t_uri_virtualmin=$('.switch-toggle input[id="open_virtualmin"]:checked').length?1:0;$t_uri_cloudmin=$('.switch-toggle input[id="open_cloudmin"]:checked').length?1:0;$t_uri_webmail=$('.switch-toggle input[id="open_webmail"]:checked').length?1:0;$t_uri_dashboard=$('.switch-toggle input[id="open_dashboard"]:checked').length?1:0},j=function(e){var e=typeof e==="object"?e.attr("href"):e,t=URI.parseQuery(URI(e).query())["dom"]||URI.parseQuery(URI(e).query())["gparent"],a=$('select[name="dom"]'),i=a.val();if(t&&t!=i){I(t)}},z=function(e){var e=typeof e==="object"?e.attr("href"):e,t=URI.parseQuery(URI(e).query())["id"],t=!t?URI.parseQuery(URI(e).query())["d"]:t,a=$('select[name="sid"]'),i=a.val();if(t&&t!=i){T(t)}};return{reset:e,select:{set:_,back:d,load:c},detect:t,detectAllowed:true,load:{start:a,stop:i},collapse:l,reload:u,update:g,deform:h,lock:m,switch:{dashboard:{get:v,set:y},available:x,get:A,set:w,reset:k},get:{webmin:S,virtualmin:I,cloudmin:T},intersect:{virtualmin:j,cloudmin:z},state:{title:V,module:E,update:O,loading:r,target:p}}}();plugins.messenger=function(){var e=function(e){e=e||"toastid_-_";return e+Date.now()+""+parseInt(Math.random()*1e6)},t=function(t,a,i,n,s,r,o){var l,c=function(e){return e==="info"||e==="success"||e==="warning"||e==="error"?e:"show"},_=c(i),d=function(e){var t=String();if(e&&e.includes("fa2")){t="2"}return"fa%pack fa%pack-%ico".replace(/%pack/g,t).replace(/%ico/,e)},f=function(e){return"placed-"+(e.position||"bottomCenter")+""+" type-"+e.type+""+" message-length-"+(e.message.length<=32?32:e.message.length<128?128:e.message.length<256?256:e.message.length<384?384:e.message.length<512?512:"1024")+""+" message-delay-"+(Test.numeric(e.timeout)&&parseInt(e.timeout)<=5?"short":"long")+" message-delay-timeout-"+parseInt(e.timeout)+""};if(typeof t==="object"&&!$.isEmptyObject(t)&&!$.isArray(t)){l=t;if(l.id){l.id="toastid_-_"+l.id+""}_=c(l.type);l.type=_;if(l.icon){l.icon=d(l.icon)}l.class=(l.class?l.class+" ":String())+f(l)}else{n=n?"toastid_-_"+n+"":null;s=typeof s=="undefined"?true:Boolean(s);r=$.isArray(r)&&r.length?r[1]?(r[1]=Convert.strUpFirst(r[1].toString()),r.join("")):r.join(""):"bottomCenter";var p=2;var u={};if(!$.isEmptyObject(o)){var g=o.cancel.label,h=o.cancel.action;u=plugins.messenger.toast.construct.button(g,h);p=1}var m=null,v=null,b;if($.isArray(t)){m=t[0]||"";v=t[1]}else if(typeof t==="string"&&t&&(b=t.match(/<*.?class=["'](.*?)["']><\/*.?>(.*)/))){m=b[1];v=b[2]}else{v=t}if(m){m=d(m)}if(!v){console.warn("Cannot post notification toast as message text is missing");return}var x=a=="0"?false:parseInt(a)||2;l={icon:m,title:String(),message:v,position:r,class:f({position:r,message:v,type:_,timeout:x}),id:n,close:s,buttons:u,layout:p,timeout:x?x*1e3:x}}if(!l.id){l.id=e()}if(!l.zindex){l.zindex=10010}if(typeof iziToast==="object"){iziToast[_](l);return $("#"+l.id)}else{console.warn("Cannot load iziToast notification plugin")}},a=function(t){defaults={timeout:2e4,close:false,overlay:true,zindex:999999999,displayMode:"once",id:e(),color:"yellow",position:"center",buttons:[["<button><b>"+theme_language("global_yes").toUpperCase()+"</b></button>",function(e,t){e.hide({transitionOut:"fadeOut"},t,"yes")},true],["<button>"+theme_language("global_no").toUpperCase()+"</button>",function(e,t){e.hide({transitionOut:"fadeOut"},t,"no")}]],onClosing:function(e,a,i){if(i==="yes"&&t.onCloseCallback&&typeof t.onCloseCallback==="function"){setTimeout(function(){t.onCloseCallback.call()},101)}}};defaults=$.extend(defaults,t||{});iziToast.question(defaults);return $("#"+defaults.id)},i={get:function(e){var t=$(document).find("#toastid_-_"+e+"");return t.length?t:null},hide:function(e){var t=this.get(e);if(t&&t.length){iziToast.hide({},t[0])}}},n=function(e,t,a){if(e==="reset"){t="keyup";a={holdModifer:~~!false}}if(e==="reset"||e==="message-user-select"){var i=$(".iziToast > .iziToast-body > .iziToast-texts > .iziToast-message");a.holdModifer&&i.toggleClass("user-select-all",t==="keydown")}};document.addEventListener("DOMContentLoaded",function(){iziToast.settings({timeout:2e3,drag:$.browser.mobile,transitionIn:"fadeIn",transitionOut:"fadeOut",animateInside:false,position:"bottomCenter",layout:2,displayMode:2})});return{post:t,ask:a,toast:{get:i.get,hide:i.hide,hideAll:iziToast.destroy,construct:{button:function(t,a){var i=e("toastBtnClose");return[["<button>"+t+"</button>",function(e,t){e.hide({onClosing:function(e,t,n){if(n===i){if(typeof a==="function"){a.call(this,t)}}}},t,i)},true]]}}},events:n}}();plugins.upload=function(e){e.removeAttr("onsubmit");e.on("submit.fm",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();var t=dayjs().unix()+""+parseInt(Math.random()*1e5),a=$(this),i=a.find(".ui_form_end_submit"),n=a.find('input[type="file"]')[0],s=n.files.length,r=a.find('input[name="dir"]').val(),o=$(n.files).map(function(e,t){return t.name}).get(),l=o.join("\n"),c=function(){theme_restore_buttons_class();$.fn.bootstrapFileInputReset(a);despinnerfy_buttons(0,i);i.addClass("disabled")},_=function(){if(s>1){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-upload-cloud"></i>'+theme_language("upload_successful").replace("$1","<em>"+s+"</em>").replace("$2","`<tt>"+r+"</tt>`").replace("<span",'<span title="'+l+'"'),10,"success","uploadSuccess_"+t+"",0,["top","right"])}else{plugins.messenger.post('<i class="fa fa-lg fa-fw fa-upload-cloud"></i>'+theme_language("upload_successful_single").replace("$1","<em>"+s+"</em>").replace("$2","`<tt>"+r+"</tt>`").replace("<span",'<span title="'+l+'"'),10,"success","uploadSuccess_"+t+"",0,["top","right"])}},d=function(e){var a=$(e.responseText).find("h3").text(),i=a.length;if(i){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-upload-cloud"></i>'+theme_language("global_error")+": "+a.replace(/\s:\s/g," — "),15,"error","uploadError_"+t+"",0,["top","right"]);return 1}else{return 0}};spinnerfy_buttons(i);window["progress_id_ref_"+t]=$.ajax({type:"POST",url:"upload.cgi?id="+t+"",processData:false,contentType:false,data:new FormData(a[0]),complete:function(e){c();if(d(e)){return}e.status===200&&_()},error:function(){$("[data-progress-id="+t+"] .bottom_progress_cancel").trigger("click")}});theme_message_dismiss("upload_error");var f=1;window["progress_id_ref_"+t+"_tracker"]=$.ajax({xhr:function(){var e=new window.XMLHttpRequest,a=0;e.addEventListener("progress",function(e){var i=e.target.responseText,n=/.file\.value\s+=\s+"(.*)";/g,s=/.size\.value\s+=\s+"(.*)";/g,r=/.pc\.value\s+=\s+"(.*)";/g,o=regex.matches(i,n,0,1),l=regex.matches(i,s,0,1),_=regex.matches(i,r,0,1);if(l){if(f){f=0;c()}var _=_||a?parseInt((_.match(/|/g)||[]).length/50*100):0;if(!_){a++}if(_>100){_=100}progress_percent.control(t,"success",_,[o,l,_])}if(!session.status(i)){window["progress_id_ref_"+t].abort();window["progress_id_ref_"+t+"_tracker"].abort();return}},false);return e},type:a.attr("method"),url:v___location_prefix+"/uptracker.cgi?id="+t+"&uid="+(get_access_level()===0||get_access_level()===1?"":session.server.data("user-id"))+"",complete:function(e){if(f){f=0;c()}if(theme_message_exists("uploadError_"+t+"")){return}e.status===200&&_()}})})};plugins.filter={options:function(e){var t='body[data-uri*="/'+v___location_file+'"] form[action="'+v___location_file+'"]',a="autocomplete-suggestions",i=" .select2 + .end_submits",n=i+" > .btn-group > .dropdown-toggle",s=$(n).parent(),r=n+" + ul",o=r+"  > li ",l=o+"  > input";var c=function(){$(l).autocomplete({lookup:e&&e.data?e.data:config_quick_access,minChars:0,appendTo:$(o),onSearchComplete:function(){var e=$(this).next("."+a+"");width=e.outerWidth()-20;parseInt(width)>0&&$(this).width(width)},onSelect:function(a){var i=$.Autocomplete.externalEvent;if(!$.isEmptyObject(i)){var s=i.keyCode?i.keyCode:i.which;if(i.ctrlKey||i.shiftKey||i.altKey||i.metaKey||s===20||s===32||s===33||s===34||s===35||s===36||s===37||s===38||s===39||s===40||s===45||s===46||s===112||s===113||s===114||s===115||s===116||s===117||s===118||s===119||s===120||s===121||s===122||s===123||s===144||s===145){return}}data_url_query=v___location_file+"?module="+($(t).find('input[name="module"]').val()||"")+"&section=";if(e&&e.url){data_url_query=e.url}var r=data_url_query+a.section+"&search="+($(this).val()||"");$(this).val("").blur();$(n).parent().trigger("click");$(this).autocomplete("dispose");get_pjax_content(r)},groupBy:"category",showNoSuggestionNotice:true,noSuggestionNotice:theme_language("global_no_results_found")})};if(e&&e.unlock){s.removeClass("cursor-na").find(".dropdown-toggle").removeClass("pointer-events-none").find(".cspinner").remove()}s.attr("data-placement","auto top").data("placement","auto top").tooltip("fixTitle");if(e&&e.tooltip&&e.tooltip.title){s.attr("data-original-title",theme_language(e.tooltip.title)).data("original-title",theme_language(e.tooltip.title)).attr("data-title",theme_language(e.tooltip.title)).data("title",theme_language(e.tooltip.title)).tooltip("fixTitle")}$(n).parent().on("hidden.bs.dropdown",function(){$(l).val("").blur().trigger("input")});$(n).parent().on("shown.bs.dropdown",function(){var e=$(this);c();$(l).focus();$(l).on("keydown.configauto",function(e){if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var t=$(this).next("."+a+"");if(t&&t.length){t[0].scrollTop=0}$(this).off("keydown.configauto")}});var t=$(i).prev().prev("select"),n=t.val();if(n){var s=t.find('option[value="'+n+'"]').text(),r=$(i).find("."+a+""),o=r.find("strong:contains("+s+")");if(o&&o.length){o[0].parentNode.parentNode.scrollTop=o[0].offsetTop}}$(l).off("keydown.cqa").on("keydown.cqa",function(t){if(t.keyCode==13){t.preventDefault()}if(t.keyCode==27){e.trigger("click")}})});var _=uri_parse_param("search");if(_){var d=$('.container-fluid td:contains("'+_+'")').last().parent();if(d&&d.length){d[0].scrollIntoView();setTimeout(function(){var e="vertical";d.find("td").first().addClass("faa-"+e+"-narrow animated animated-count-1");setTimeout(function(){var e=d.find("td").last().find('input:not([type="radio"]), input[type="radio"]:checked, textarea, select').first();if(e&&e.length){e[0].focus()}},740)},0)}}}};plugins.pjax=function(){var e={_:null,set:function(e){this._=e},get:function(e){return this._?this._.getResponseHeader(e):null},getAll:function(){if(this._){var e=this._.getAllResponseHeaders(),t=e.trim().split(/[\r\n]+/),a={};t.forEach(function(e){var t=e.split(": ");var i=t.shift();var n=t.join(": ");a[i]=n});return a}else{return null}},send:{data:{},set:function(e){this.data=e},get:function(){var e=this.data;this.data={};return e}}},t={refresh:function(e,t){this.modal=$(".modal.in").length;if(this.modal&&!t){console.warn("Cannot refresh the page with opened modal window");return}else if(t){$(".modal.in").modal("hide")}if(location.pathname&&location.pathname.includes("/xerror")){window.history.back();console.warn("Cannot refresh error page. Commanded the browser to move back one page in the session history");return}if(e){set_onbeforeunload_status(0,0)}if(get_onbeforeunload_status()){get_onbeforeunload_message(false,"get_pjax_content(v___location_resource, false, false)","ev")}else{var a=vars.previous_request,i=vars.source_request,n=unbuffered_header_processor_allow(a&&a.target?a.target.action:false);if(a.type==="submit"){if(Test.str_contains_multi(a.target.action,["new","delete","add","remove"])||Test.str_contains_multi_regex($(a.currentTarget).serialize(),"::M::=[^0&\\s]",["new","delete","add","remove"])){var s=$('.container-fluid form [data-entry="view_refresh"]');if(s&&s.length===1){s.trigger("click")}console.warn("Cannot refresh modifier page");return}get_pjax_action_submit(a,false)}else{if(n&&i.length){get_pjax_content(i,false,false)}else{get_pjax_content(v___location_resource,false,false)}}}},link:{alter:function(e){const t=function(e){var t=e,a=function(){var e=localStorage.getItem(v___server_hostname+"-"+v___server_username+"-"+"fm-last-visited-dir");return e},i=a();if(i&&(t&&typeof t==="string"&&t.includes("/"+v___module_file_manager))){if(!uri_parse_param2("path",e)){var n="path="+i;if(t.includes(".cgi")){if(t.includes(".cgi?")){t+="&"+n}else{t+="?"+n}}else{t+="/index.cgi?"+n}t.replace(/[\/]+/g,"/");return t}return e}return e};e=t(e);return e}},interaction:{set:function(e){this.last=e},get:function(e){this.now=Date.now();if(e){return[this.last,this.now]}else{return parseInt((this.now-(this.last||this.now))/1e3)}}},events:{reset:function(){this.beforeSend._=[];this.start._=[];this.success._=[];this.complete._=[];this.beforeReplace._=[];this.end._=[]},beforeSend:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},start:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},success:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},complete:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},beforeReplace:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}},end:{_:[],set:function(e){typeof e==="function"&&this._.push(e)},get:function(){!$.isEmptyObject(this._)&&this._.forEach(function(e){e.call()});this._=[]}}}};return{headers:{set:e.set,get:e.get,getAll:e.getAll,send:e.send},page:{refresh:t.refresh,link:t.link,interaction:{set:t.interaction.set,get:t.interaction.get},events:{reset:t.events.reset,beforeSend:{set:t.events.beforeSend.set,get:t.events.beforeSend.get},start:{set:t.events.start.set,get:t.events.start.get},success:{set:t.events.success.set,get:t.events.success.get},complete:{set:t.events.complete.set,get:t.events.complete.get},beforeReplace:{set:t.events.beforeReplace.set,get:t.events.beforeReplace.get},end:{set:t.events.end.set,get:t.events.end.get}}}}}();plugins.page=function(){var e={register:function(){(function(e){var t=plugins.pjax.headers.get("refresh");e.clear();if(Test.numeric(t)){t=parseInt(t);if(t>=1){e.refreshTimer=setInterval(function(){var e=$(quirks.active_element());if(!e.is('input[type="search"]')&&!e.is('input[type="text"]')&&(vars.page_interaction<=0||plugins.pjax.page.interaction.get()>4)){plugins.pjax.page.refresh()}},t*1e3)}}})(e.refresh)},refresh:{clear:function(){typeof this.refreshTimer==="number"&&clearInterval(this.refreshTimer)}},pjax:{before:function(){var e=$("#content .select2-hidden-accessible");if(e.length){e.select2("close")}},start:function(){}}};return{events:{register:e.register,refresh:{clear:e.refresh.clear},pjax:{start:e.pjax.start,before:e.pjax.before}}}}();const snippets={};snippets.datetime={};snippets.page={};snippets.patches={};snippets.parser={};snippets.initial=function(){snippets.get_goto();plugins.navigation.update("webmail");$(function(){plugins.slider.update.favorites()})};snippets.form_pre_submitter=function(){$("body").on("click",'button.ui_form_end_submit[type="button"]:not(.disabled)',function(){var e=$(this).next('input[type="submit"].hidden'),t=$(this).parent(".btn-group").next('input[type="submit"].hidden');if(!e.length){e=t}var i="form",a=e.parent(),n=a.parent("tr").find(i),r=e.parents(i);if(!r.length){r=e.closest(i);if(!r.length){r=a.prev(i)}if(!r.length){r=a.prev().prev(i)}if(!r.length){r=a.prev().prev().prev(i)}r.append(r.nextUntil(a));$.each(a.find("select, input"),function(){$('<input data-trigger-injected="1">').attr({type:"hidden",class:"hidden-force",name:$(this).attr("name")?$(this).attr("name"):$(this).attr("id"),value:$(this).val()}).appendTo(r)}).promise().done(function(){r.submit()});return}var o=e.attr("name")?e.attr("name"):e.attr("id"),l=$.trim(e.val());var s=r;if(r.parents(".alert").length&&r.find(".ui_form_end_buttons .end_submits").length){s=r.find(".ui_form_end_buttons .end_submits")}$('<input data-trigger-injected="1">').attr({type:"hidden",class:"hidden hidden-force",name:o,value:l}).appendTo(s);e.trigger("click")});$("body").on("click",'.ui_form_end_submit:not(.disabled), .page_footer_submit:not(.disabled):not([href*="javascript:history"])',function(){var e=false,t=false,i=$(this);var a=0;$(".container-fluid > .panel > .panel-body form").each(function(){if(this&&typeof this.checkValidity==="function"&&this.checkValidity()==false){a++}}).promise().done(function(){if(!a){if(core.curModule("csf")){spinnerfy_buttons(i,[2,-29,"small",t])}else{spinnerfy_buttons(i,false,e,t)}}})})};snippets.form_input_tester=function(e){var t="input.tester",i="click-event",a="btn-warning dt-tester-btn",n="data-tester",r=".btn-group.end_submits:visible button.ui_form_end_submit",o='form:not([data-tester="1"]):not(#webmin_search_form)';if(e){return $(r).hasClass(a)}$(document).on(t,o,function(e){if(e.originalEvent===undefined||e.originalEvent&&!e.originalEvent.inputType){return}if(vars.pjax.post_page_fetch){return}if(!v___location_file||v___location_file==="index.cgi"){return}var t=$(this);if(t.attr(n)==1){return}var o=t.find(".CodeMirror").length,l=$(this).attr("action");if(o&&!core.curModule("init")||(core.curModuleFile("mysql","")||core.curModuleFile("postgresql","")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("postgresql","index.cgi"))&&$(".ui_grid_table.table-hardcoded").length||core.curModuleFile("bind8","")||core.curModuleFile("bind8","index.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")||core.curModuleFile("virtual-server","wizard.cgi")||core.curModuleFile("virtual-server","list_scripts.cgi")||core.curModuleFile("virtual-server","list_scripts.cgi")||core.curModuleFile("mysql","list_vars.cgi")||core.curModuleFile("ruby-gems","index.cgi")||(l&&l.includes("edit_tmpl.cgi")||l&&l.includes("config.cgi"))||$(".modal.in.mppopup").length){t.attr(n,1);return}var s=$(e.target).is('input[type="checkbox"], input[type="radio"]'),_=$(e.target).parents("tr"),c=s&&_&&_.length&&_.attr("class")&&_.attr("class").includes("ui_checked");if(c){return}theme_restore_buttons_class();var d=t.find(r),f=d.first(),p=String("btn-xclass"),u=d.data(i)===1;if(f[0]&&f[0].classList){var h=f[0].classList.value.match(/.*(btn-\S+)/);if(h){p=h[1];f.attr("data-class-restore",p)}}if(d&&d.length){set_onbeforeunload_status(1);if(!u){d.data(i,1);f.removeClass(p).addClass(a);t.attr(n,1);d.one("click",function(){d.data(i,0);t.attr(n,0);set_onbeforeunload_status(0)});t.on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which;if(t===13&&!$(e.target).is("textarea")||t===13&&e.ctrlKey&&$(e.target).is("textarea")){if(f.hasClass(a)){e.preventDefault();f.trigger("click")}else{set_onbeforeunload_status(0)}}})}}})};snippets.inject_extra_option=function(e,t,i,a,n,r){if(e==="tr/yes:no"){var o=$("body"),l=t.parents("form");t.parents("td.col_value").parent("tr").after("<tr>"+'<td class="col_label"><b>'+a+"</b></td>"+'<td class="col_value">'+'<span class="awradio awobject">'+'<input class="iawobject" name="'+i+'" id="'+i+'_1" value="true"'+(window[i]==true||window[i]===undefined?" checked":"")+' type="radio">'+'<label class="lawobject" for="'+i+'_1">&nbsp;&nbsp;'+theme_language("global_yes")+"&nbsp;</label>"+'<input class="iawobject" name="'+i+'" id="'+i+'_0" value="false"'+(window[i]==false?" checked":"")+' type="radio">'+'<label class="lawobject margined-left-5" for="'+i+'_0">&nbsp;&nbsp;'+theme_language("global_no")+"&nbsp;</label>"+"</span>"+"</td>"+"</tr>");var s="submit."+i+"";o.off(s);o.one(s,l,function(){var e=Test.true($("[name="+i+"]:checked").val());window[i]=e;theme.config.save()})}if(e&&e.includes("checkbox:")){var _=parseInt(Math.random(11)*100),c=n&&n.checked?"checked ":String(),d=n&&n.extraClass&&n.extraClass.main?" "+n.extraClass.main:String(),f,p='<span data-checkbox-custom="'+i+'">'+"<span onclick=\"$(this).parent().find('[name="+i+"]').val(this.querySelector('input').checked ? 'true' : 'false')\" class=\"awcheckbox awobject"+d+'">'+"<input "+c+'class="iawobject" type="checkbox" id="'+i+"_"+_+'"> '+'<label class="lawobject" for="'+i+"_"+_+'">&nbsp;&nbsp;<span>'+a+"</span>&nbsp;</label>"+"</span>"+'<input type="hidden" value="'+(c?"true":"false")+'" name="'+i+'">'+"</span>";if(n){if(n.getHtml){return p}if(n.style){f=$(p).css(n.style)}}if(e==="checkbox:after"){t.after(f||p)}if(e==="checkbox:before"){t.before(f||p)}if(r){r.call()}}};snippets.datetime.tictac=function(e){var t="convertible-date-full",i="convertible-timestamp-full",a=i,n=$("[data-"+a+"]");n.parent().contents().filter(function(){return this.nodeType===3}).remove();if(typeof dayjs!=="undefined"){var r=n.data(a);if(r){var o=r+1;n.data(a,o);n.text(dayjs(o*1e3).utcOffset(get_utc_offset()).format(config_portable_theme_locale_format_full))}!e&&setInterval(snippets.datetime.tictac.bind(null,1),1e3)}};snippets.datetime.locale=function(){var e="x",t="-",i="md",a="d",n="t",r=e+t+i+t,o=function(e,i){var o=e.tagName.endsWith((t+a).toUpperCase())?1:0,l=e.tagName.includes(r+n)?0:1,s=e.outerHTML.indexOf(";1")>-1?1:0,_=e.outerHTML.indexOf(";2")>-1?1:0,c=e.outerHTML.indexOf(";-1")>-1?1:0,d=core.curModule("proc")?1:0,f=$(e).text(),p=o?f.split(";")[0]:f,u=config_portable_theme_locale_format_short||"L",h=config_portable_theme_locale_format_long||"LL",g=config_portable_theme_locale_format_time||"LT",m=dayjs.unix(p).format("l");m=m.indexOf("/")>-1?"/":m.indexOf("-")>-1?"-":".";var v=dayjs.unix(p).utcOffset(get_utc_offset()).format(g),b=_?dayjs.unix(p).utcOffset(get_utc_offset()).format("YYYY["+m+"]MM["+m+"]DD")+" "+(l?String():v):dayjs.unix(p).utcOffset(get_utc_offset()).format(!s?u:h);if(d){c=1;if(e&&typeof e.outerHTML==="string"&&e.outerHTML.includes(r+n)){$(e).remove()}}if(c){if(!isNaN(p)){p*=1e3}var x=dayjs(p).fromNow(),y=parseInt((dayjs().unix()-dayjs(p).unix())/(60*60*24)),w=dayjs(p).format("LT"),k=dayjs().format("YYYY"),C=dayjs(p).format("YYYY"),M=dayjs(p).format("ll"),F=dayjs(p).format(u);if(core.curModule("mailbox")){if(y===0){x=w}else if(k==C){x=M.replace(k,"").replace(",","")}else{x=F}}v=x;b=x}var j;if($(e).is("td")){j=$(e)}else{j=$(e).parent("td")}j.is("td")&&j.attr("data-order",p);if(i){return!o?v:b}else{$(e).replaceWith(!o?v:"<span"+(b.indexOf(" ")>-1?' data-placement="auto top" data-container="body" data-toggle="tooltip" data-title="'+(c?dayjs(p).calendar(null,{sameElse:"LLL"}):dayjs.unix(p).fromNow())+'"':"")+">"+b+"</span>")}};$.each($(r+a).add(r+n).add($("td:contains("+(r+a)+")")).add($("td:contains("+(r+n)+")")).add("option:contains("+(r+a)+")").add("option:contains("+(r+n)+")"),function(a,n){var l=!n.tagName.startsWith(r.toUpperCase());if(l){var s=$(n).text(),_=Convert.htmlUnEscape(s);var c="";$.each($(_),function(a,n){var r=$(n)[0].tagName&&$(n)[0].tagName.startsWith((e+t+i).toUpperCase());if(r){c+=o($(n)[0],1)+" "}}).promise().done(function(){$(n).text(c)})}else{o(n,0)}})};snippets.ajax=function(){$(document).ajaxStop(function(){setTimeout(function(){if(session.alive===0){session.reauthenticate.start()}},300)}).ajaxSuccess(function(){v___theme_ajax_error=0;if(typeof stats==="object"&&stats.general.error&&get_access_level()===0&&settings_sysinfo_real_time_status){stats.general.disable();stats.general.enable();stats.general.error=0}setTimeout(function(){var e=theme.version(false,true);if(theme.version.current&&e&&e!==theme.version.current&&!vars.cache.theme_updating){!theme_message_exists("theme_update_refresh")&&theme.update_message()}},300)}).ajaxError(function(e,t,i){if(t.statusText!=="canceled"&&t.statusText!=="abort"){connection_error(t,0,false,i)}});$.ajaxSetup({complete:function(e,t){var i="container session_login";if(Test.strContains(e.responseText,i)||e&&(e.getResponseHeader("Auth-type")==="auth-required=1"||e.responseText&&(e.responseText.indexOf("reset-fonts-grids-base")>-1&&e.responseText.indexOf("window.top.location = window.location;")>-1))){session.reauthenticate.start()}},beforeSend:function(e,t){t.url=link_type_convert(t.url,1);e.setRequestHeader("X-no-links","1")}})};snippets.pjax=function(){$(document).on("submit","form",function(e){if(e.originalEvent!==undefined){v___theme_content_history=0}if($(this).attr("data-download")=="true"){return}if(e.target.target==="_blank"){return}try{if(core.curModuleFile("virtual-server","edit_newfeatures.cgi")){page.render.content.filter.clear()}}catch(e){}e.preventDefault();if(get_onbeforeunload_status()){get_onbeforeunload_message(e,this)}else{get_pjax_action_submit(e)}});$(document).on("click","a"+$__theme_default_deselectors+"",function(e){if(e.originalEvent!==undefined){v___theme_content_history=0}if(get_onbeforeunload_status()&&$(quirks.active_element()).is("a"+$__theme_event_deselectors)&&(!this.href||this.href&&this.href.length>0&&(!this.href.includes("!edit")&&!this.href.includes("!view")))){e.preventDefault();var t=this.getAttribute("href");if(t===null){return}get_onbeforeunload_message(e,this)}else{get_pjax_action_click(e,this)}});$(document).on("pjax:error",function(e,t,i,a,n){plugins.pjax.page.events.reset();if(i==="error"){var r=$.active;if(r){$.active=r-1}if(Test.strContains(n.url,"/csf/index.cgi")){theme_reload();return}}});$(document).on("pjax:start",function(e,t,i){plugins.pjax.page.events.start.get();plugins.page.events.refresh.clear();vars.pjax.replace_contents=1;vars.pjax.event.end=1;vars.pjax.progressing=1;plugins.navigation.detectAllowed=true;if(t){session.server.data("loading",1);$("body").addClass("loading-bg")}vars.page_user_inactive=1;vars.requested_page=i.url;if(typeof set_server_theme_temp_data_timeout==="number"){clearTimeout(set_server_theme_temp_data_timeout)}});$(document).on("pjax:beforeReplace",function(e,t,i){plugins.pjax.page.events.beforeReplace.get();if(vars.ajax.progressing){vars.pjax.replace_contents=-1;vars.pjax.event.end=0;return}if(settings_mail_ui){if(uri_parse("directory",i.url).indexOf("/mailboxes")===-1&&uri_parse("directory",i.url).indexOf("/mailbox")>-1&&(!uri_parse("file",i.url)||uri_parse("file",i.url).indexOf("index.cgi")>-1)){vars.pjax.replace_contents=0;mail_page_check()}}plugins.navigation.deform(0);pjax.clear.modules(i);if(i.push===false){if(Test.strContains(i.url,"/config.cgi?")||Test.strContains(i.url,"/uconfig.cgi?")||Test.strContains(i.url,"/mconfig.cgi?")||Test.strContains(i.url,"/tconfig.cgi")){t.find(".btn-accordion-filter, .btn-toggle-accordions").remove()}}plugins.page.events.pjax.before()});$(document).on("ready pjax:beforeSend",function(e,t,i){plugins.pjax.page.events.beforeSend.get();if(vars.pjax.cancel===1){vars.pjax.cancel=0;return false}else if(e&&e.relatedTarget&&e.relatedTarget.dataset&&e.relatedTarget.dataset.pjax==="no"){return false}if(theme_download_link_blob(i)){return false}if(theme_download_link(i)){return false}if($t_uri_webmail&&settings_mail_ui){if(core.moduleAvailable("mailbox")){if(core.curModule(v___module_file_manager)||i.url&&!i.url.includes(v___location_file)&&v___location_file==="tconfig.cgi"){page.handle.content.preloader.show(false,false,true);plugins.navigation.reset()}if(typeof mail==="object"){if($("aside .fancytree-container").length===0){mail_load_folders()}}else{load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.folders.get()"])}}}if(settings_mail_ui){if(core.curModule("mailbox")&&(core.curModuleFile("mailbox","")||core.curModuleFile("mailbox","index.cgi"))){if(uri_parse("directory",i.url).indexOf("/mailboxes")===-1&&uri_parse("directory",i.url).indexOf("/mailbox")>-1&&(!uri_parse("file",i.url)||uri_parse("file",i.url).indexOf("index.cgi")>-1)){mail_load(i.url);return false}}}i.url=plugins.pjax.page.link.alter(i.url);progress.start();typeof v___theme_postponed_fetcher==="number"&&clearInterval(v___theme_postponed_fetcher);var a=$(e.relatedTarget),n=a.attr("href");n=n?n:i.url.replace(v___location_origin,""),clicked_in_nav_menu=a.parent().is("[data-linked], .favorites-dcontainer, .menu-exclude.ui-sortable-handle")||typeof i.callback==="object"&&i.callback[0]==="reference";if(clicked_in_nav_menu){check_bundle(n)}if(typeof i.callback==="object"&&i.callback[0]==="beforeSend"){if(i.callback[3]){setTimeout(function(){window[i.callback[1].apply(this,i.callback[2])]},i.callback[3])}else{window[i.callback[1].apply(this,i.callback[2])]}}plugins.page.events.pjax.before();v___theme_pjax_call+=1});$(document).on("pjax:success",function(event,data,status,xhr,options){plugins.pjax.page.events.success.get();theme_message_dismiss("ajaxError");if(typeof options.callback==="object"&&options.callback[0]==="success"){if(options.callback[3]){setTimeout(function(){if(typeof options.callback[1]==="string"){eval(options.callback[1])}else{window[options.callback[1].apply(this,options.callback[2])]}},options.callback[3])}else{if(typeof options.callback[1]==="string"){eval(options.callback[1])}else{window[options.callback[1].apply(this,options.callback[2])]}}}});$(document).on("pjax:complete",function(e,t,i){plugins.page.events.refresh.clear();vars.pjax.initial_load=1;vars.allow_ui_features=1;vars.pjax.progressing=0;plugins.pjax.page.events.complete.get();if(v___theme_reload){theme_reload()}progress.end();session.server.data("loading",0,1);$("body").removeClass("loading-bg");v___theme_connection_triggered_origin=0;typeof stats==="object"&&stats.general.error&&(stats.general.disable(),stats.general.enable());setTimeout(function(){plugins.navigation.detectAllowed=true},1e3)});$(document).on(vars.h.event.page.end,function(e,t){vars.pjax.cache.set("enable");plugins.pjax.page.events.end.get();if(!vars.pjax.event.end){return}if(session.alive===0||v___theme_reload===1){return}if(t!=undefined&&t.responseText&&t.responseText.includes("data-predownload")){return}plugins.navigation.deform(1);get_pjax_event_end(e,t);setTimeout(function(){var e=link_type_convert(location.hash,1).replace("#","");if(e&&e.length>0){var t=$('[name="'+e+'"]');if(t.length){t[0].scrollIntoView({duration:200,smooth:true,direction:"vertical",complete:function(){}})}}},200);v___page_container.find(".panel > .panel-body:first").one("click mousedown keypress",function(){vars.page_user_inactive=0});vars.pjax.post_page_fetch=true;setTimeout(function(){vars.pjax.post_page_fetch=false},100);if(settings_embed_product_branding_privileged){!vars.page.shown&&page.branding.process(true)}});$(document).on("pjax:popstate",function(e){var t=e.state;_history_page_back=1;setTimeout(function(){_history_page_back={}},0);set_pjax_send_headers(e.state.url);var i=vars.pjax.page_cache&&!vars.pjax.cache.disabled(false,true);if(e.hasContents){get_pjax_event_end_funcs(0,!i)}vars.previous_request=String();vars.source_request=String()})};snippets.pjaxHooks=function(e,t){if(e&&t==="csf"){var i=e.substring(0,2048);var a=i.match(/.*<title.*>(ConfigServer Security.*Firewall)/),n=i.match(/.*<html.*data-csf='(.*?)'/);if(a&&a[1]&&!n){vars.pjax.event.end=0;plugins.messenger.post('<i class="fa fa-lg fa-fw fa-info-circle"></i>'+theme_language("notify_patching_module_style").replace("$1","<em>"+theme_language("csf")+"</em>")+" "+theme_language("global_please_wait")+'&nbsp;&nbsp;&nbsp;<span class="cspinner"><span class="cspinner-icon white smallest margined-top-4"></span></span>',300,"info","csf_patching");theme.veiled(1);$.post(v___location_prefix+"/index.cgi/?xhr-csf-unload=1",function(e){setTimeout(function(){v___module="csf";window.history.pushState({},false,link_type_convert(v___location_prefix+"/csf/index.cgi",2));theme_title_generate()},200);setTimeout(function(){location.reload()},3e3)});return 1}}};snippets.get_goto=function(){plugins.navigation.state.update();var e=plugins.navigation.state.target(),t=function(){if($t_uri_virtualmin){get_default_virtualmin_content(false)}else if($t_uri_cloudmin){get_default_cloudmin_content(false)}else{get_default_content()}};var i=session.server.data("webprefix");if(i&&e){e=e.toString();if(!e.startsWith(i)){e=i+(e.startsWith("/")?e:"/"+e)}}if(!e){t();return}var a=unbuffered_header_processor_allow,n=!a(e),r=function(e){var t=URI(e).directory();if(t&&t!="/"&&t!=v___location_prefix){return t}else{return false}};if(a(e,1)){n=0;var o=r(e);if(o){get_pjax_content(o+"/");return}}if(e&&(e.match(/.*(save|change|install|backup|fetch|upload|delete|modify|view_table|reboot|shutdown|copy|move).*\.cgi$/g)||e.match(/.*(enable_domain|disable_domain).*\.cgi.*/g)||e.match(/.*(newkey|savekey|save_ipkey|newcsr).*\.cgi.*/g)||e.includes("index.cgi?action=upgrade")||e.includes("shell/index.cgi"))){var l=r(e);if(l){get_pjax_content(l);return}}var s=session.server.data("initial-wizard");if(e&&n){if(Test.strContains(e,v___module_file_manager+"/config.cgi")){get_pjax_content(v___location_prefix+"/"+v___module_file_manager);return}if(s!="1"&&$t_uri_virtualmin){get_pjax_content(v___location_prefix+"/virtual-server/wizard.cgi");return}if(URI(e).hostname()&&URI(e).hostname()!==URI(location.href).hostname()||Test.strContains(e,"/servers/link.cgi/")||Test.strContains(e,"/mailbox/view_mail.cgi")||Test.strContains(e,"/mailbox/reply_mail.cgi")||Test.strContains(e,"xerror")||e==="/"||e===v___location_prefix+"/"||e==="%2F"||Test.strContains(e,"config_save")||e==="/?"+$__theme_navigation){t();return}check_bundle(e);if(v___initial_load&&e){history.replaceState(null,document.title,link_type_convert(e,2))}if(document.hasFocus()||document.visibilityState!=="hidden"){e&&get_pjax_content(e)}else{page.branding.process(true);e&&get_pjax_content(e)}}};snippets.tooltips=function(e){if(e){var t='[data-toggle="tooltip"]:not([data-skip]), [data-toggle="virtualmin-license"], .panel-body td a:not([data-skip]), .icons-container',i=vars.h.selector.content.get();try{i.tooltip("destroy")}catch(e){}var a="container-fluid",n=$("."+a+" .gl-icon-container").length||("."+a+" .small-icons-container").length;i.tooltip({selector:t,sanitize:false,placement:n||$("[data-fbplacement]").length?"auto bottom":"auto top",trigger:"hover",html:true,delay:{show:n?vars.plugins.tooltip.delay.show/10:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}else{$("aside").tooltip({selector:'li[data-toggle="tooltip"], li > a[data-toggle="tooltip"].menu-exclude-link, label[data-toggle="tooltip"], .servers-index-link .popover-trigger',sanitize:false,container:"body",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})}};snippets.progressive_button=function(e,t){var i=e.querySelector(".progressing");i&&(i.style.width=t+"%")};snippets.button_lock=function(e,t){if(t){e.setAttribute("disabled","disabled")}else{e.removeAttribute("disabled")}};snippets.help_popup=function(){var e=$("body");e.on("click",".help_popup",function(e){e.stopPropagation();e.preventDefault();var t=$(this),i=function(e){e=e.replace(/<p>[\n]+<\/p>/gi,"<br>");e=e.replace(/<p>[\n]+<p>/gi,"<br>");e=e.replace(/�/gi,"");var t=$(e).filter(".ui_subheading").first().text(),i=$.parseHTML(e),a="";i=i.filter(function(e){if(e.nodeName&&e.nodeName.toLowerCase()!=="meta"&&e.nodeName.toLowerCase()!=="link"&&e.nodeName.toLowerCase()!=="title"&&e.nodeName.toLowerCase()!=="hr"&&e.nodeName.toLowerCase()!=="style"&&(e.nodeName.toLowerCase()!=="h3"&&e.className!=="ui_subheading")){e.outerHTML?a+=e.outerHTML:a+=$.trim(e.textContent)?"<span data-text>"+$.trim(e.textContent)+"</span>":$.trim(e.textContent);return e}});if(platform.detect()==="mac"){a=a.replaceAll("Ctrl +","⌘ +");a=a.replaceAll("Alt +","⌥ +")}return[t,i,a]};var a=t.attr("href").indexOf("showpass.cgi")>-1?v___location_directory_trail_slashed+t.attr("href"):t.attr("href");$.ajax({type:"POST",url:a,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}var n=i(e),r=n[0],o=n[1],l=n[2];if(!o){return}var s=t.attr("href").indexOf("/file-manager")>-1,_='<button type="button" class="close pull-right close-popover-trigger font-size-120p">&times;</button>',c=t.attr("href").indexOf("showpass.cgi")>-1,d=t.attr("href").indexOf("/locale")>-1||s;if(c){_=""}r=_+"<span>"+r+"</span>";t.data("title",r);t.data("content",l);var f=String(),p=t.hasClass("btn-link");if(l&&(l.length>1024||l.includes("<pre>")||l.includes("<ul>")||l.includes("<ad>"))){f=" popover_extra_width"}var u=function(){return matchMedia("(max-width: 767px)").matches},h=u()||d?"bottom":"auto right";if(a&&a.includes("strftime")){h="top"}if(s){h="auto right";if(window.matchMedia("(max-width: 767px)").matches){h="bottom"}}t.data("placement",h);var g=t.parent(),m=".container-fluid";if(t.parents(".opener_table_style")&&t.parents(".wrapped-accordion")){g=t.parents(".wrapped-accordion").parent();if(!g.length){g=m}}t.popover({html:true,sanitize:false,container:p||c||d?m:g,template:'<div class="popover module-help'+(c?" showpass-popover":d?" popover-wider":"")+""+f+'" role="tooltip" style="z-index: '+(10001+$(".module-help").length*10)+'"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>',title:function(){return r},content:function(){return l},placement:h});t.popover("show");var v="shown.bs.popover";t.off(v);t.on(v,function(){var e=$(this),t=e.next(".popover.module-help"),a=t.hasClass("right")?" right":"",n=function(){var t=".popover.module-help",i=e.next(t);return i.length?i:$(".container-fluid > .popover.module-help:last-child")};$(this).addClass("activated"+a+"");n().find(".popover:visible").addClass("module-help");$('body[class*="'+v___module_file_manager+'"]').find(".popover:visible").addClass("file-manager-help");!window.matchMedia("(max-width: 992px)").matches&&$(this).closest("tr").addClass("popover-active");var r=".popover.module-help",o=n(),l="click.tmpclkpopover";o.undelegate(l);o.find("a").addClass("allowed");o.on(l,"a",function(e){e.stopPropagation();e.stopImmediatePropagation();var t=$(this),a=t.attr("href"),n=t.parents(r),o=n.find(".popover-title > span"),l=n.find(".popover-content");if(a&&a.startsWith("http")){t.attr("target","_blank")}else{e.preventDefault();var s=v___location_prefix+"/help.cgi/"+v___module+"/"+a;$.ajax({type:"POST",url:s,dataType:"text",success:function(e){if(!session.status(e)){return}var t=i(e),a=t[0],r=t[1];o.text(a);l.html(r);n.find("a").addClass("allowed")}})}});setTimeout(function(){var e=$(".module-help"),t=e.length;$.each(e,function(e){if(t===e+1){popover_visibility_position($(this))}}).promise().done(function(){var e=n();if(e.length){e.trigger("click")}})},10)});var b="hidden.bs.popover";t.on(b,function(){$(this).closest("tr").removeClass("popover-active");$(this).removeClass("activated right");t.off(v)})}})})};snippets.page.render_links_dashboard=function(){theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="webminlog/"]',"btn btn-info btn-xxs f__lnk_t_btn-el vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete_session.cgi"]',"btn btn-danger f__lnk_t_btn-el btn-xxs vertical-align-top margined-left--1 margined-top-1 ---forced","fa-unplugged");theme_buttonify(["/sysinfo.cgi"],".container-fluid table td[data-td-e]",'a[href*="list_sessions.cgi"]',"btn btn-link-bordered f__lnk_t_btn-el btn-xxs vertical-align-top margined-left--1 margined-top-1 ---forced","fa-cog no-btn-text");theme_buttonify(["/sysinfo.cgi"],".container-fluid",'a[href*="acl/list_sessions.cgi"]',"btn btn-default","fa-group-o","users","","","|");theme_buttonify(["/sysinfo.cgi"],".container-fluid",'a[href*="virtual-server/search.cgi"]',"btn btn-info btn-xxs f__lnk_t_btn-el vertical-align-top margined-top-1 margined-left-4 ---forced",0,"","","","|");theme_buttonify(["/sysinfo.cgi","/virtual-server/edit_newchangelog.cgi","/server-manager/edit_newchangelog.cgi"],".container-fluid #newfeatures-virtual-server-1-collapse dt, .container-fluid #newfeatures-server-manager-1-collapse dt, .container-fluid .table td dt","a","btn btn-link btn-link-bordered btn-xxs btn-dnwo f__lnk_t_btn-el margined-left-3 vertical-align-top margined-top-1","fa-eye","|","")};snippets.page.render_links=function(e){theme_buttonify(["/syslog-ng/list_destinations.cgi"],".container-fluid .table tbody tr td:last-child",'a[href*="view_log.cgi"]',"btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","");theme_buttonify(["/virtual-server/edit_newmysqls.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-cog");theme_buttonify(["/cluster-cron/","/cluster-cron/index.cgi","/cluster-copy/","/cluster-copy/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-play");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete.cgi"]',"btn btn-danger btn-xxs vertical-align-top margined-top-1 ---forced","fa-times-circle","","","","|");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="//"]',"btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","");theme_buttonify(["/virtualmin-git/","/virtualmin-git/index.cgi"],".container-fluid table td[data-td-e]",'a[href*="help.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","");theme_buttonify(["/webalizer/","/webalizer/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1",0);theme_buttonify(["/cpan/edit_mod.cgi"],".container-fluid .table tbody tr td","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-3 margined-right--1 btn-dnwo ---forced","","","","","|");theme_buttonify(["/forward/index.cgi","/forward/"],".container-fluid",'.panel-body > a:first[href*="simple"]',"btn btn-default _btn-links-top btn-xs vertical-align-top margined-top-1 margined-left-3",0,"","","","|");theme_buttonify(["/forward/index.cgi","/forward/"],".container-fluid",".panel-body > span[data-unckecked]","btn btn-info _btn-links-top btn-xs vertical-align-top margined-top-1 margined-left-3",0,"","","","|");theme_buttonify(["/acl/list_sessions.cgi"],".container-fluid table td[data-td-e]",'a[href*="webminlog/"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/acl/list_sessions.cgi"],".container-fluid table td[data-td-e]",'a[href*="delete_session.cgi"]',"btn btn-danger btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","fa-unplugged");snippets.page.render_links_dashboard();theme_buttonify(["/virtual-server/","/virtual-server/index.cgi","/virtual-server/edit_plan.cgi","/virtual-server/search.cgi"],".container-fluid form table tbody td",'a[href*="list_users.cgi?"], a[href*="list_aliases.cgi?"]',"btn btn-link btn-link-bordered btn-xxs btn-hover-hide vertical-align-top margined-top-1",0,"(~)"," ~ ","");theme_buttonify(["/server-manager/","/server-manager/index.cgi"],".container-fluid form table tbody td",'a[href*="mass_update_form.cgi?"]',"btn btn-link btn-link-bordered btn-xxs btn-transparent btn-link-bordered vertical-align-top margined-left-3 margined-top-1",0,"","","","-");theme_buttonify(["/quota/","/quota/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="activate.cgi"][href*="&active=3"]',"btn btn-warning btn-xxs vertical-align-top margined-top-1","fa-ban");theme_buttonify(["/quota/","/quota/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="activate.cgi"][href*="&active=0"]',"btn btn-success btn-xxs vertical-align-top margined-top-1","fa-check-circle-o");theme_buttonify(["/virtualmin-google-analytics/","/virtualmin-google-analytics/index.cgi"],".container-fluid .table tbody td[data-td-e]",'a[href*="edit.cgi"]',"btn btn-warning btn-xxs vertical-align-top margined-top-1","fa-pencil-square");theme_buttonify(["/apache/","/apache/index.cgi"],".container-fluid .table tbody tr td:last-child","a.ui_link","btn btn-transparent btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-external-link");theme_buttonify(["/ldap-server/edit_schema.cgi"],".container-fluid table tr.ui_checked_columns td",'a[href*="view_sfile.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 ---forced",0,"","","","|");theme_buttonify(["/ldap-server/edit_schema.cgi"],".container-fluid table tr.ui_checked_columns td",'a[href*="edit_sfile.cgi"]',"btn btn-warning btn-xxs vertical-align-top margined-left--2 margined-top-1 ---forced","fa-pencil-square-o");theme_buttonify(["/virtualmin-awstats/generate.cgi"],".container-fluid .panel-body",'a[href*="view.cgi?config="]',"btn btn-link-bordered btn-xxs vertical-align-top margined-top-2","fa-eye","","");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid",'a[href^="list_addresses.cgi"][href*="add="]',"btn btn-default btn-block btn margined-top-10","fa-plus-circle");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href^="list_addresses.cgi"][href*="edit="]',"btn btn-primary btn-xxs btn-hover-hide vertical-align-top margined-top-1 margined-left--2 ---forced pull-right","fa-pencil-square-o");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href^="save_address.cgi"],a[href^="save_group.cgi"][href*="gdelete="]',"btn btn-danger btn-xxs btn-hover-hide vertical-align-top margined-top-1 margined-left--2 ---forced pull-left","fa-times-circle");theme_buttonify(["/mailbox/list_addresses.cgi"],".container-fluid table td",'a[href="list_addresses.cgi?mode=users"],a[href="list_addresses.cgi?mode=groups"]',"btn btn-default btn-xxs btn-xxs--g-edit vertical-align-top margined-top-1 margined-left--2 pull-right btn-dnwo","fa-times-circle-o");theme_buttonify(["/cron/","/cron/index.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="exec_cron.cgi"]',"btn btn-success btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-play");theme_buttonify(["/cron/","/cron/index.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="kill_cron.cgi"]',"btn btn-danger btn-link-bordered btn-xxs vertical-align-top margined-top-1","fa-stop fa-0_75x no-vt-al fa-fw margined-right-1 faa-flash animated");theme_buttonify(["/at/","/at/edit_job.cgi"],".container-fluid .table tbody tr td",'a.ui_link[href*="edit_job.cgi?full=1"]',"btn btn-default btn-xxs btn-tiny btn-dnwo ui_link_replaced pull-right margined-top-2");theme_buttonify(["/phpini/","/phpini/index.cgi"],".container-fluid .table tbody tr td",'a[href*="list_ini.cgi"]',"btn btn-success btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline","fa-cog","","","","|");theme_buttonify(["/phpini/","/phpini/index.cgi"],".container-fluid .table tbody tr td",'a[href*="edit_manual.cgi"]',"btn btn-primary btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline ---forced","fa-pencil");theme_buttonify(["/virtualmin-awstats/","/virtualmin-awstats/index.cgi"],".container-fluid .table tbody tr td",'a[href*="view.cgi"]',"btn btn-success btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline","fa-eye","","","","|");theme_buttonify(["/virtualmin-awstats/","/virtualmin-awstats/index.cgi"],".container-fluid .table tbody tr td",'a[href*="config.cgi"]',"btn btn-grey btn-xxs btn-xxs f__lnk_t_btn-el vertical-align-baseline ---forced","fa-cog");var t=$(".container-fluid .ui_links_row"),i="ui_link_empty";if(core.curModule("firewall",1)||core.curModule("firewall6",1)){t.first().find("."+i+"").addClass("btn-warning").removeClass("btn-success")}if($('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"||v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"||v___location_path==v___location_prefix+"/software/list_pack.cgi"||v___location_path==v___location_prefix+"/mailboxes/view_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/view_mail.cgi"||v___location_path==v___location_prefix+"/mailboxes/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/list_folders.cgi"||v___location_path==v___location_prefix+"/mailbox/list_ifolders.cgi"||v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"||v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"||v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"){$.each($('tr td:last-child > .ui_links_row, tr td:last-child:contains("|")'),function(){var e=$(this).parent(),t="ui_link btn-inverse btn-tiny";if(v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"){e.find('a[href^="backup_form.cgi"]').html("<span>"+e.find('a[href^="backup_form.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-success btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('<i class="fa fa-fw fa-floppy-o" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');e.find('a[href^="restore_form.cgi"]').html("<span>"+e.find('a[href^="restore_form.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-primary btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('<i class="fa fa-fw fa-reply" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');e.find('a[href^="backuplog.cgi"]').html("<span>"+e.find('a[href^="backuplog.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-info btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass(t).prepend('<i class="fa fa-fw fa-file-o" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>')}if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){e.find('a[href^="edit_hdparm.cgi"]').html("<span>"+e.find('a[href^="edit_hdparm.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-success btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t);e.find('a[href*="smart-status/index.cgi"]').html("<span>"+e.find('a[href*="smart-status/index.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-info btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t);e.find('a[href^="blink.cgi"]').html("<span>"+e.find('a[href^="blink.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-warning btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass(t)}if(v___location_path==v___location_prefix+"/mailbox/list_folders.cgi"||v___location_path==v___location_prefix+"/mailbox/list_ifolders.cgi"){e.find('a[href^="index.cgi"]').html("<span>"+e.find('a[href^="index.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('<i class="fa fa-fw fa-eye" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');e.find('a[href^="edit_auto.cgi"]').html("<span>"+e.find('a[href^="edit_auto.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-info btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('<i class="fa fa-fw fa-recycle" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');e.find('a[href^="copy_form.cgi"]').html("<span>"+e.find('a[href^="copy_form.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-warning btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('<i class="fa fa-fw fa-clone" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>')}if(v___location_path==v___location_prefix+"/mailboxes/view_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/view_mail.cgi"||v___location_path==v___location_prefix+"/mailboxes/reply_mail.cgi"||v___location_path==v___location_prefix+"/mailbox/reply_mail.cgi"){e.find('a[href^="detach.cgi"]:not([href*="&save=1"]):not([target="_blank"])').html("<span>"+e.find('a[href^="detach.cgi"]:not([href*="&save=1"]):not([target="_blank"])').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-primary btn-xxs").removeClass("heighter-34").removeClass(t).removeClass(t).prepend('<i class="fa fa-fw fa-eye" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');e.find('a[href*="detach.cgi"][target="_blank"]').html("<span>"+e.find('a[href*="detach.cgi"][target="_blank"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).prepend('<i class="fa fa-fw fa-external-link" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');e.find('a[href*="&save=1"]:not([target="_blank"])').html("<span>"+e.find('a[href*="&save=1"]:not([target="_blank"])').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-warning btn-xxs").removeClass("heighter-34").removeClass(t).prepend('<i class="fa fa-fw fa-download" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');e.find('a[href*="view_mail.cgi?"]:not([target="_blank"])').addClass("ui_link_replaced btn btn-default btn-xxs").removeClass("heighter-34").removeClass(t);e.find('a[href*="view_mail.cgi?"][target="_blank"]').addClass("ui_link_replaced btn btn-success btn-xxs").removeClass("heighter-34").removeClass(t).prepend('<i class="fa fa-fw fa-external-link" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>')}}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}else{$('tr td:last-child:contains("|")').replaceText(/\s*/gi,"").replaceText(/\|/gi,"")}});if($('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"){$('#content a[href*="edit_mon.cgi?id"]').addClass("ui_link_replaced btn btn-default btn-xxs margined-bottom-2").removeClass("heighter-34").removeClass("ui_link");$('#content a[href*="edit_mon.cgi?id"]').last().css("margin-left","-1px");$('tr td:last-child:contains("|")').replaceText(/\|/gi,"")}else{$('tr td:last-child:contains("|")').contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_path==v___location_prefix+"/fdisk/"||v___location_path==v___location_prefix+"/fdisk/index.cgi"){$("body").find('a[href^="blink.cgi"]:not(.ui_link_replaced)').html("<span>"+$("body").find('a[href^="blink.cgi"]:not(.ui_link_replaced)').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-warning btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link")}if(v___location_path==v___location_prefix+"/fsdump/"||v___location_path==v___location_prefix+"/fsdump/index.cgi"){$.each($("tr td:last-child"),function(){$(this).find('a[href^="backup.cgi"]').html("<span>"+$(this).find('a[href^="backup.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-success btn-xxs margined-top--2 f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link").prepend('<i class="fa fa-fw fa-floppy-o" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');$(this).find('a[href^="kill.cgi"]').html("<span>"+$(this).find('a[href^="kill.cgi"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-danger btn-xxs margined-top-1 f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link").prepend('<i class="fa fa-fw fa-trash-o" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>')})}if(v___location_path==v___location_prefix+"/syslog/"||v___location_path==v___location_prefix+"/syslog/index.cgi"||v___location_path==v___location_prefix+"/logviewer/"||v___location_path==v___location_prefix+"/logviewer/index.cgi"){$.each($("tr td:last-child"),function(){$(this).find('a[href*="save_log.cgi"][href*="view=1"], a[href*="view_log.cgi"][href*="view=1"]').html("<span>"+$(this).find('a[href*="save_log.cgi"][href*="view=1"], a[href*="view_log.cgi"][href*="view=1"]').text().replace(/\.\.$/,"&nbsp;")+"</span>").addClass("ui_link_replaced btn btn-primary btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").removeClass("ui_link")})}if(v___location_path==v___location_prefix+"/software/list_pack.cgi"){var a='td a.ui_link[href*="view.cgi"]';$(a).html('<i class="fa fa-fw fa-eye-fi fa-1_25x"></i>').addClass("ui_link_replaced btn btn-default btn-xxs f__lnk_t_btn-el").removeClass("heighter-34").attr("style","margin-top: 2px !important; margin-bottom: 0 !important; margin-right: 15px").removeClass("ui_link").prepend('<i class="fa fa-fw fa-eye hidden" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>')}}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/index.cgi"){if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"&&v___location_file&&v___location_file.indexOf("index_")>-1||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/index.cgi"||v___location_path===v___location_prefix+"/proc/"){$("a.ui_link + b").addClass("btn").css("margin-left","3px");$("b + a.ui_link").addClass("btn").css("margin-left","3px");if($('.panel-body > b:first-child:contains(":")').length>0){$(".panel-body > b:first-child").remove()}$(".panel-body > b").addClass("btn btn-success")}$(".panel-body").contents().filter(function(){return this.nodeType==3}).remove();$(".panel-body > a.ui_link").addClass("btn").css("margin-left","3px")}if(!e){if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fdisk/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"postfix/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"pam/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logviewer/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"syslog/"){$("p > a[href], table + a[href], div.panel-body > a.ui_link").each(function(e,t){$(this).text($(this).text().replace(/\.$/,""))})}var n=".container-fluid .panel-body";$(""+n+" a.select_all,"+""+n+" a.select_invert,"+""+n+" a.select_invert ~ .ui_link,"+""+n+" .ui_links_row > *:not(.ui_link_empty, .ui_link_replaced),"+""+n+" .ui_link:not(.ui_link_empty)").each(function(){if(core.error.get()){return}if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){return}if(core.curModuleFile("acl")){if(this.href&&this.href.includes("edit_user.cgi?user")){return}}if($(this).parent("td").length||$(this).parent("label").length||$(this).parent("tt").length||$(this).parent("th").length||$(this).parents("b").length||$(this).parent("pre").length||core.curModuleFile("virtual-server","cert_form.cgi")&&$(this).attr("href")&&$(this).attr("href").includes("edit_domain.cgi")||$(this).parents('[data-dcontainer="1"]').length&&unbuffered_header_processor_allow(v___location_path)||v___location_path==v___location_prefix+"/webmin_search.cgi"){return}if(!core.curModuleFile("virtual-server","history.cgi")&&!core.curModuleFile("server-manager","bwgraph.cgi")&&!core.curModuleFile("server-manager","one_history.cgi")&&!core.curModule("proc")&&v___location_directory_unslashed_trail_slashed!=v___location_prefix_unslashed_trail_slashed+"passwd/"&&$(this).text()&&v___location_path!=v___location_prefix+"/mailboxes/"&&v___location_path!=v___location_prefix+"/mailboxes/index.cgi"&&v___location_path!=v___location_prefix+"/usermin/list_configs.cgi"&&!$(this).hasClass("help_popup")||core.curModule("procmail")){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced");$(this).html("<span>"+$(this).text().replace(/\.$/,"")+"</span>");var e=$(this).parent().contents().filter(function(){return this.nodeType==3});if(e){$.each(e,function(){if($(this).text()&&$(this).text().length<=3){$(this).remove()}})}if($(this).hasClass("select_all")){$(this).html('<i class="fa fa-fw fa-check-square-o"> </i> <span>'+$(this).text()+"</span>")}if($(this).hasClass("select_invert")){$(this).html('<i class="fa fa-fw fa-share-square-o"> </i> <span>'+$(this).text()+"</span>")}if((core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager",""))&&($(this).parent('form[action="mass.cgi"]').length||$(this).parent(".ui_links_row").parent('form[action="mass.cgi"]').length)){if($(this).is(":nth-child(1)")||$(this).is(":nth-child(6)")){$(this).html('<i class="fa fa-fw fa-check-square-o"> </i> <span>'+$(this).text()+"</span>")}if($(this).is(":nth-child(2)")||$(this).is(":nth-child(7)")){$(this).html('<i class="fa fa-fw fa-plug-o fa-1_15x fa-rotate-45"> </i> <span>'+$(this).text()+"</span>")}if($(this).is(":nth-child(3)")||$(this).is(":nth-child(8)")){$(this).html('<i class="fa fa-fw fa-webmin"> </i> <span>'+$(this).text()+"</span>")}}if(core.curModuleFile("mount","index.cgi")||core.curModuleFile("mount","")){var t=$(this).attr("href");if(t){$(this).html('<i class="fa2 fa-fw fa2-'+(t.includes("show=1")?"eye":"eye-off")+' fa-0_90x"> </i> <span>'+$(this).text()+"</span>")}}if($(this).attr("href")&&($(this).attr("href").indexOf("edit")===0&&$(this).attr("href").indexOf("edit_allow")!==0||$(this).attr("href").indexOf("master_form")===0||$(this).attr("href").indexOf("slave_form")===0||$(this).attr("href").indexOf("stub_form")===0||$(this).attr("href").indexOf("forward_form")===0||$(this).attr("href").indexOf("delegation_form")===0||$(this).attr("href").indexOf("mass_form")===0||$(this).attr("href").indexOf("newdb_form")===0)){$(this).html('<i class="fa fa-fw fa-plus-square-o"> </i> '+$(this).html())}else{if($(this).attr("href")&&$(this).attr("href").indexOf("edit_allow")===0){$(this).html('<i class="fa fa-fw fa-shield"> </i> <span>'+$(this).text()+"</span>")}else{if($(this).attr("href")&&$(this).attr("href").indexOf("mass_ucreate")===0){$(this).html('<i class="fa fa-fw fa-user"> </i> <span>'+$(this).text()+"</span>")}if($(this).attr("href")&&$(this).attr("href").indexOf("grace_form")>-1){$(this).html('<i class="fa fa-fw fa-clock"> </i> <span>'+$(this).text()+"</span>")}}}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_manual")>-1){$(this).html('<i class="fa fa-fw fa-pencil-square-o"> </i> <span>'+$(this).text()+"</span>")}if(core.curModule("custom")){if($(this).attr("href")&&$(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-terminal"> </i> <span>'+$(this).text()+"</span>")}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-pencil-square-o"> </i> <span>'+$(this).text()+"</span>")}if($(this).attr("href")&&$(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-database"> </i> <span>'+$(this).text()+"</span>")}}if(!$(this).attr("href")){$(this).remove()}}});var r="btn-tiny",o="ui_link_replaced";$.each($(".btn-group.ui_links_row > .ui_link_empty"),function(){if($(this).prev("."+r+"."+o+"").length||$(this).next("."+r+"."+o+"").length){$(this).addClass(""+r+" "+o+"")}});$.each($("."+r+"."+o+""),function(){if($(this).prev('[class="table table-striped table-condensed"]').length&&$(this).next(':not(".ui_link_replaced")').length){$(this).removeClass("btn-tiny ui_link_replaced").addClass("ui_link_re-replaced")}});$("a.ui_link_replaced").each(function(){if($(this).prev().is("b")){$(this).prev("b").addClass("btn btn-success btn-tiny")}if($(this).next().is("b")){$(this).next("b").addClass("btn btn-success btn-tiny")}if(core.curModule("htaccess-htpasswd")){$("table tr.ui_checked_columns .ui_links_row > a").addClass("btn-link btn-link-bordered btn-xxs btn-hover-hide").removeClass("btn-tiny btn-inverse")}});if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fetchmail/"){$("#content a.ui_link").each(function(){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").css("margin-bottom","3px").css("margin-top","-3px");$(this).html("<span>"+$(this).text().replace(/\.$/,"")+"</span>");$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();var e=function(e){return'<i class="fa fa-fw fa-'+e+'"> </i> '};if($(this).attr("href").indexOf("edit_poll")>-1){$(this).prepend(e("plus-square-o"))}if($(this).attr("href").indexOf("edit_global")>-1){$(this).prepend(e("pencil-square-o"))}if($(this).attr("href").indexOf("check")>-1){$(this).prepend(e("check-square-o"))}})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"filter/"){$("#content a.ui_link").each(function(){function e(e){return'<i class="fa fa-fw fa-'+e+'"> </i> '}if($(this).attr("href").indexOf("edit_auto")>-1){$(this).find("i").replaceWith(e("reply"))}if($(this).attr("href").indexOf("edit_forward")>-1){$(this).find("i").replaceWith(e("reply-all"))}})}}if(v___location_path==v___location_prefix+"/virtual-server/domain_form.cgi"||v___location_path==v___location_prefix+"/server-manager/list_images.cgi"||v___location_path==v___location_prefix+"/virtual-server/bwgraph.cgi"||v___location_path==v___location_prefix+"/server-manager/bwgraph.cgi"){$(".panel-body > .ui_links_row > ").each(function(){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).html("<span>"+$(this).text().replace(/\.$/,"")+"</span>");if($(this).hasClass("btn-success")){$(this).removeClass("btn-inverse")}});$.each($(".panel-body > .ui_links_row > .ui_link_empty"),function(){if($(this).text().replace(/[\t\n]+/g," ").length<4){$(this).remove()}else{$(this).html("<span>"+$(this).text().replace("|","").replace("|","").replace(/(?:\r\n|\r|\n)/g,"")+"</span>");if($(this).prev().is("img")){$(this).removeClass().addClass("margined-left-3")}}});$(".panel-body > b").css("margin-right","7px");if(v___location_path==v___location_prefix+"/virtual-server/domain_form.cgi"){$.each($(".panel-body > .ui_links_row > .btn"),function(e,t){if(e==0){$(this).html('<i class="fa fa-fw fa-plus-square"> </i> <span>'+$(this).text()+"</span>")}if(e==1){$(this).html('<i class="fa fa-fw fa-level-down"> </i> <span>'+$(this).text()+"</span>")}if(e==2){$(this).html('<i class="fa fa-fw fa-reply fa-flip-horizontal"> </i> <span>'+$(this).text()+"</span>")}if(e==3){$(this).html('<i class="fa fa-fw fa-reply-all fa-flip-horizontal"> </i> <span>'+$(this).text()+"</span>")}})}if(v___location_path==v___location_prefix+"/server-manager/bwgraph.cgi"){var l=".container-fluid .panel-body",s=$(l+" .btn-info"),_=$(l+' [name="ago"]');s.removeClass("btn-info").addClass("btn-default heighter-28 margined-left--4");s.find(".fa").remove();_.next(".btn-default").addClass("margined-left--7");_.prev("b").addClass("font-weight-normal")}}if(v___location_path==v___location_prefix+"/server-manager/edit_serv.cgi"||v___location_path==v___location_prefix+"/server-manager/edit_owner.cgi"){$('.table-striped .col_value a[href^="edit_serv.cgi"], .table-striped .col_value a[href^="edit_owner.cgi"]').each(function(){$(this).addClass("btn btn-inverse btn-xxs ui_link_replaced margined-right--2").removeClass("btn-tiny ui_link");$(this).html("<span>"+$(this).text().replace(/\.$/,"")+"</span>");if($(this).hasClass("btn-success")){$(this).removeClass("btn-inverse")}});$.each($(".table-striped .col_value .ui_links_row > .ui_link_empty"),function(){$(this).addClass("btn-xxs ui_link_replaced").removeClass("btn-tiny ui_link");if($(this).text().length<4){$(this).remove()}else{$(this).html("<span>"+$(this).text().replace("|","").replace("|","").replace(/(?:\r\n|\r|\n)/g,"")+"</span>")}})}$("a.ui_link, .btn").each(function(){if($(this).text().substr(-1)=="."&&!$(this).parent().is("label")){var e=$(this).text().substr(-1)=="."&&$(this).text().substr(-2)==".."?2:1;$(this).html("<span>"+$(this).text().substr(0,$(this).text().length-e)+"</span>")}})};snippets.page.render_table_labels=function(e){var t="vertical-align-top",i="no-vr-al-tp";e.find("td.col_label:not(."+t+"):visible").each(function(){var e=$(this).next(".col_value"),a=$(this).find("b"),n="inline-block margined-top-",r=browser.detect.firefox(),o=$(this).parent("tr"),l=o.parent().hasClass("td-counter")?0:o.children("td").length;if(l>2){o.parent().addClass("td-counter td-count-"+l+"")}if(this.clientHeight>=30){$(this).addClass(t);var s="table",_="input",c="select",d="textarea",f="upload",p="el-wp-chooser",u="ui_",h="password",g="textbox",m="hidden",v="opener_shown",b="br",x="t-password-complexity-meter-wrapper-cont",y="heighter",w="force",k="ds-bl-fs",C=$(e.find(""+_+":not(."+u+""+m+'):not([type="'+m+'"]), '+c+", "+d+"")[0]),M=C.is("."+u+""+g+""),F=C.is("."+u+""+c+", ."+u+""+f+"")?C:false,j=C.is("."+u+""+d+""),T=C.parent().is("."+p+""),q=e.find(""+s+":visible"),O=q.find("tr").first().find("td").first().outerHeight(),z=q.length;if(T){if($(e.children()[0]).is("."+p+"")){j=true}}var S=a.parents("."+v+"").length,I=S?3:2,A=e.children(),H=A.filter(""+b+", ."+k+"").index(),W=H===-1?A:A.slice(0,H),L=A[0],E=0;if(e.find("."+u+""+c+"").length||e.find(c).length||e.find("."+p+"").length||e.find("."+u+""+g+"").length||e.find("."+u+d).length||e.find("."+u+"opt_"+g+"").length||e.find(""+_+'[type="text"]').length||e.find("."+u+h).length||e.find(""+_+'[type="'+h+'"]').length||z||M||F||j){if(S&&this.clientHeight==32){I=5}var P=0;W.filter(function(){var e=this.clientHeight;if(!e){e=parseInt($(this).find(""+_+", "+d+", "+c+"").first().css("height"))}if(P<e){P=e}});if(z){var D=q.hasClass(""+u+"multi_"+c+""),N=q.hasClass(""+u+"grid_"+s+""),R="1";if(O<=20||N){R="3"}if(P<=20){R="-1"}else{R="2"}if(N){if(q.length&&q[0]&&$(q[0]).outerHeight()===32){R="6"}}if(this.clientHeight<48||P<=20||D||N){a.addClass(n+R+"")}return}else if(P<=20){I=-1}else if(W.filter("."+p+"").length||H===-1&&A.last().is("."+p+"")){var U=A.filter("."+p+"").find("."+u+"opt_"+g+", ."+u+g+", ."+u+d+", "+_+"").outerHeight(true);if(U<=28){E=1;I+=1}else if(U>64){I=0}else if(U==30){I=4}else{I+=3}if(j&&!U==32){I=-2}}else if(A&&A[0]){if($(L).hasClass(k)||$(L).is(b)){I-=2}else if(M){I+=S?1:2}else if(F){if(e.find(""+c+"[multiple]").length){I=-1}}else if(j){I=-1}else if(e.find("."+x+"").length){var Q="4";a.addClass(n+Q+"");return}}if(!E&&(I==3||I==2)){I=4}a.addClass(n+I+"")}}else if(this.clientHeight<=22){var Y=e.find(".graph-container")[0];if(e.find(".awobject").length){if(this.clientHeight<=20&&!r||this.clientHeight===22&&r){var B=0;if(r){B=1}$(this).addClass(i);a.addClass(n+B+"")}}else if(Y){var V=-4;$(this).addClass(i);a.addClass(n+V+"")}else if(this.clientHeight===18){var J=-1;$(this).addClass(i);a.addClass(n+J+"")}}}).promise().done(function(){var e=$(this)[0],t="hover",i="table",a=""+i+"-"+t+"";if(e){$(e).parents("."+i+"").removeClass(""+a+" "+a+"-force").addClass("no-"+t+"")}})};snippets.page.render=function($is_history_action){vars.page_interaction=v___initial_load?-1:0;page_control_header();if(!settings_sysinfo_expand_all_accordions&&settings_sysinfo_remember_accordions){plugins.dashboard.restore()}quirks.clean();plugins.navigation.state.update();var needs_restart_from=session.server.data("needs-restart");if(needs_restart_from&&!vars.cache.norestart&&!vars.ajax.progressing&&!v___initial_load&&session.server.data("product")==="webmin"){theme.restart_message(needs_restart_from)}if($is_history_action){$(".popover.in").remove()}else{(function(){var e=$('.container-fluid > .panel > .panel-heading a[href*="config.cgi"]');if(e.length){var t=" "+theme_shortcuts_generate("conf"),i=e.text();e.text(i+t)}})()}if($is_history_action&&typeof __cm_editor_static!="undefined"){__cm_editor_static.toTextArea();$('button[data-form="submitter"]').unwrap();$('.CodeMirror, button[data-form="submitter"] + button, .-helper.__helper, .-helper.soft_wt').remove()}(function e(){var t=$("body");t.off("mousedown.cm1 keydown.cm1");t.undelegate('button[type="submit"]:not(.disabled)',"click.cm");t.undelegate('button[data-form="submitter"]:not(.disabled)',"click.cm")})();table_proc_size_columns();$("body").attr("style",session.server.data("style"));$.each($('select[onchange="form.submit()"]'),function(){$(this).removeAttr("onchange").addClass("onchange_form_submit_triggger")});page.handle.content.offset(true);if(editor_init_check()){var select_for_edited_file=$('select[name="file"]:first, select[name="manual"]:first');select_for_edited_file.addClass("onchange_form_submit_triggger");select_for_edited_file.next("button.ui_form_end_submit").addClass("hidden")}snippets.datetime.locale();if(get_access_level()==3&&core.curModule("quota")){var $_table_quota=$(".container-fluid .panel-body .table"),$_table_quota_empty_label=$_table_quota.find("thead:first-child").add($_table_quota.find("thead:first-child").next("tbody")).remove()}if($.support.spa&&core.curModule("tunnel")){$("#content .container-fluid form.ui_form[action]").on("submit",function(e){var t=$(quirks.active_element());e.preventDefault();e.stopPropagation();progress.start();$.ajax({type:$(this).attr("method")?"GET":"POST",url:v___location_prefix+"/"+v___module+"/"+$(this).attr("action"),data:get_form_data($(this)),dataType:"text",complete:function(e){if(!session.status(e)){return}theme_open_new_tab(this.url);t.removeClass("disabled").find("i").removeClass("invisible").next(".cspinner_container").remove();progress.end()}})})}if(core.curModule("tunnel")){var $tunnel_form=$('.ui_form[action="seturl.cgi"]'),$input=$tunnel_form.find("input"),$btn=$tunnel_form.find("button"),$b=$tunnel_form.find("b"),b_text=$b.text().replace(/:$/,"");$b.remove();$input.attr("placeholder",b_text).css({width:"100%",height:"32px",minHeight:"32px"});$btn.addClass("btn-block margined-top--1")}if(check_location_resource("/config.cgi?tunnel")){$('table table[width="100%"] tr:first-child').addClass("hidden")}$.each($('tr td:last-child a:contains("..")'),function(){if(v___location_path==v___location_prefix+"/virtual-server/list_databases.cgi"){if($(this).attr("href")&&$(this).attr("href").includes("showpass.cgi")){return true}$(this).html($(this).text().replace(/\.\.$/,"&nbsp;")).addClass("ui_link_replaced btn f__lnk_t_btn-el btn-transparent btn-link-bordered btn-xxs margined-top--3").removeClass("ui_link")}});if($.support.spa&&!$is_history_action){var is_error_page=$(".container-fluid .panel > .panel-body > [data-fatal-error-text]").length;if(v___location_file&&v___location_file.includes("error")&&!v___location_file.includes("edit_")){is_error_page=1}!is_error_page&&$("#headln2c").prepend("<button  "+theme_inject_tooltip(theme_language("favorites_add"),".container-fluid")+' aria-label="'+theme_language("favorites_add")+'" class="fa fa-fw fa-inverse fa-2x fa-star-o text-lighter favorites"></button>&nbsp;')}plugins.favorites.detect();if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"){$("table.table tbody tr").addClass("ui_checked_columns")}page_table_rows_control();!$is_history_action&&page_radios_evolve();var on_load_checkbox_sel_str='.container-fluid .ui_checked_columns td.ui_checked_checkbox input[type="checkbox"]:checked';$(on_load_checkbox_sel_str).parents("tr.ui_checked_columns").addClass("hl-aw");$(""+on_load_checkbox_sel_str+"[disabled]").parents("tr.ui_checked_columns").addClass("hl-aw-chk");if($("body").hasClass("servers")){if(core.curModuleFile("servers","index.cgi")||core.curModuleFile("servers","")){vars.pjax.cache.set("disable")}var form_selector='form[action="delete_servs.cgi"]',servers_selector_str=$(form_selector).length?""+form_selector+" a.icon_link, "+form_selector+" a.ui_link, "+form_selector+" .col-xs-1":'.container-fluid > .panel > .panel-body > .row a[href*="link.cgi/"]',$form_logouts_a=$(form_selector).find('a[href^="logout.cgi"]'),form_logouts_a_title=$form_logouts_a.length?$form_logouts_a.first().text():String();setTimeout(function(){if($form_logouts_a.length){$form_logouts_a.each(function(){var e=form_logouts_a_title;if(e){e=$.trim(Convert.strUpFirst(e.replace(/[\(\)]/g,"")))}$(this).addClass("gl-icon-logout").attr("title",e).attr("aria-label",e).html('<i class="fa fa-fw fa-sign-out text-danger fa-1_10x"></i>');var t=$(this).parent(),i=$(this).detach();t.before(i)})}},1);$(servers_selector_str).on("click",function(e){if($(e.target).is(".gl-icon-select")){$.support.spa?$(this).trigger("contextmenu"):$(this).parents(".gl-icon-container").trigger("contextmenu");return}var t=v___location_href+$(this).attr("href"),i=$(this).attr("href");if(i&&i.indexOf("edit_serv.cgi")>-1||i&&i.indexOf("logout.cgi")>-1){if(e.originalEvent!==undefined){$.pjax.click(e,{timeout:0,push:get_pjax_push(),type:get_pjax_type(),container:"[data-dcontainer]",fragment:"[data-dcontainer]"})}}else{var a=vars.events.keypressed.ctrl;if(i&&i.indexOf("://")===-1){var n=link_type_convert(t,1),r="/index.cgi",o="link.cgi/",l=r+o;if(n&&n.includes(l)){n=n.replace(l,"/"+o)}if(a){open(n)}else{progress.start();location.href=n}}else{if(a){open(i)}else{progress.start();location.href=i}}}e.preventDefault();e.stopPropagation()})}if(!$is_history_action){if($(".opener_container").length){$.each($(".opener_container"),function(){if($(this).find(".opener_shown").is(":visible")){$(this).parent("tr").prev("tr").find("td a:nth-child(1)").addClass("opener_container_opened").removeClass("opener_container_closed")}})}if($(".opener_shown, .opener_hidden").length>0){if($(".opener_trigger").length>0){$(".panel-body  .ui_form .table  tbody  tr").removeClass("thead");$(".opener_trigger").parents("table.table").addClass("opener_table_style");$(".opener_trigger").parents("tr").addClass("_c__op_r").attr("style","border: 0 !important");$(".opener_trigger").parent("td").addClass("_c__op_d");$(".opener_trigger").parent("td").find("a").addClass("link_hover_effect link_hover_effect_style_extra")}}var target_restore_selector='a[id*="opener"][id$="_restore"]';if($(target_restore_selector).parent().is("p")){$(target_restore_selector).next("a").parent("p").replaceTagName("div");$(target_restore_selector).next("a").removeClass().addClass("opener_extra_container_a_style link_hover_effect").parent("div").addClass("opener_extra_container opener_extra_container_style margined-top-10");$(target_restore_selector).remove()}var $hidden_opener_trigger=$('a[href^="javascript:hidden_opener"]:not(".opener_trigger")');if($hidden_opener_trigger.length>0){$hidden_opener_trigger.each(function(e,t){var i=v___location_path==v___location_prefix+"/virtual-server/backup_form.cgi"&&v___location_href&&v___location_href.indexOf("?sched=")>-1?true:false;$(this).find("img").length>0?$(this).remove():false;$(this).css("border-bottom","0");$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").addClass("opener_table_cell_style_small");if(!i){$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").addClass("opener_table_cell_style_small opener_table_cell_style_small_exclusion_border_top");$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").parent("tr").parent("tbody").parent("table").parent("div.opener_hidden").addClass("opener_shown_inner").parent(".opener_container").addClass("has_sub_inner")}$(this).parent("td:not('.col_label'):not('.col_value'), td.col_header").find("a").addClass("link_hover_effect link_hover_effect_style");if($(this).parent().is(".panel-body")||$(this).parent().is(".ui_form")||$(this).parent().is("p")){var a=$(this),n=a.parent().is(".panel-body")?".panel-body":a.parent().is("p")?"p":".ui_form";var r=a.parent(n).find('a[href^="javascript:hidden_opener"]'),o='<div class="opener_extra_container"></div>';if(core.curModuleFile("bind8","edit_zonekey.cgi")){r.eq(1).wrapAll(o);r.eq(e+1).wrapAll(o)}else{r.eq(e+1).wrapAll(o)}a.parent('.panel-body > a[href^="javascript:hidden_opener"]:first-child').remove();var l=a.parent(n).find(".opener_extra_container");$(l).next("br").remove();$(l).addClass("opener_extra_container_style");$(l).find("a").addClass("opener_extra_container_a_style link_hover_effect");$(l).next(".opener_hidden").attr("style","padding:8px")}});$.each($(".opener_hidden"),function(){$(this).css("display","none")})}$("a.opener_trigger").each(function(){$(this).parent("td").css("text-align","left")});$('form[action*="seen_newfeatures.cgi"]').each(function(){$(this).parents("table.table-striped").next(".ui_form_end_buttons").css("margin-top","14px")});$("#tall_0").before("<br>");$(".opener_container").each(function(e,t){if($(this).find("div").hasClass("opener_hidden")){$(this).hide()}else{$(this).show()}});$.each($("div.barchart"),function(){var e=$(this).find('img[src*="red.gif"]'),t=$(this).parent("td").contents().filter(function(){return this.nodeType==3}).text();if(e&&e.attr("width")){$(this).parent("td").html('<div class="graph-container graph-container-fw"><div class="graph"><div class="description"> '+t+' </div><strong class="bar" style="width:'+e.attr("width")+'">'+e.attr("width")+"</strong></div></div>")}});$('.panel-body > form > table > tbody > tr > td:has(input[type="submit"])').parents("table.table-hardcoded > tbody > tr").css("border","none").parents("table").css("margin-top","20px");$('.panel-body > form > table > tbody > tr > td:has(input[type="submit"])').parents("table.table-hardcoded > tbody").css("border","none");$('.ui_grid_table > tbody > tr.ui_grid_row > td:has(button[type="submit"])').parents("table.ui_grid_table").css("border","none");$("form.ui_form > table label.radio, form.ui_form > table label.checkbox").each(function(){var e=$(this),t=e.find("i.fa"),i=e.find("i.fa").text().trim(),a=e.text().trim();if(i.length===0&&a.length===0){t.parent("label").remove()}})}theme.config.events($is_history_action);$("#system-status > div.panel-body > table > tbody > tr > td").on("mouseover",function(){$(this).find(".btn-hidden").removeClass("hidden")}).on("mouseout",function(){$(this).find(".btn-hidden").addClass("hidden")});if(core.curModule("bind8")){var $table_data_recursive_tree=$(".container-fluid table[data-recursive_tree]");if($table_data_recursive_tree.length){$table_data_recursive_tree.removeClass().addClass("table table-hover");$.each($table_data_recursive_tree.find('img[src*="images/"]'),function(e,t){var i=$(this);if(Test.strContains(i.attr("src"),"close")){i.replaceWith('<i class="fa fa-fw fa-lg fa-caret-down text-dark"></i>')}if(Test.strContains(i.attr("src"),"open")){i.replaceWith('<i class="fa fa-fw fa-lg fa-caret-right text-dark"></i>')}if(Test.strContains(i.attr("src"),"smallicon")){i.replaceWith('<i class="fa fa-fw fa-world text-semi-dark"></i>')}})}}if(core.curModule("software")&&(Test.strContains(v___location_file,"tree.cgi")||Test.strContains(v___location_file,"ipkg-tree.cgi"))||core.curModuleFile("cluster-software","edit_host.cgi")){$('img[src*="images/"]').each(function(e,t){var i=$(this);i.next("a").removeClass();if(Test.strContains(i.attr("src"),"close")){i.replaceWith('<i class="fa fa-fw fa-lg fa-caret-down text-dark"></i>')}if(Test.strContains(i.attr("src"),"open")){i.replaceWith('<i class="fa fa-fw fa-lg fa-caret-right text-dark"></i>')}if(Test.strContains(i.attr("src"),"pack")){i.replaceWith('<i class="fa fa-fw fa-lg fa-package-install text-semi-dark"></i>')}});if(Test.strContains(v___location_file,"ipkg-tree.cgi")){$('form[action*="ipkg-tree.cgi"] + script + p > a, form[action*="ipkg-tree.cgi"] + script + p + table +p > a').addClass("margined-top-10")}}if(core.curModule("mysql")||core.curModule("postgresql")){$('a > img[src*="images/left.gif"]').each(function(e,t){var i=$(this);i.replaceWith('<i class="fa fa-fw fa-lg fa-arrow-circle-o-left text-semi-light vertical-align-baseline"></i>')});$('a > img[src*="images/right.gif"]').each(function(e,t){var i=$(this);i.replaceWith('<i class="fa fa-fw fa-lg fa-arrow-circle-o-right text-semi-light vertical-align-baseline"></i>')})}if(core.curModuleFile("virtual-server","list_scripts.cgi")){$('td > a > img[src*="images/staroff.gif"]').each(function(e,t){var i=$(this);$(t).attr("src",""+v___location_prefix+"/images/staroff.gif")});$('td > a > img[src*="images/staron.gif"]').each(function(e,t){var i=$(this);$(t).attr("src",""+v___location_prefix+"/images/staron.gif")})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"status/"){$("td img").each(function(e,t){var i=t.src;if(i){var a=i.match(/images\/(.*)\./),n=a&&a[0]&&a[1]?a[1]:String(),r="fa fa-fw fa-1_15x fa-check text-success";if(n==="down"){r="fa fa-fw fa-1_15x fa-times-circle text-danger"}else if(n==="timed"){r="fa fa-fw fa-clock text-warning fa-1_15x"}else if(n==="webmin"){r="fa fa-fw fa-webmin fa-1_15x text-warning"}else if(n==="skip"){r="fa2 fa-fw fa2-minus fa-1_15x text-semi-dark vertical-align-middle"}else if(n==="not"){r="fa2 fa-fw fa2-not-interested fa-1_15x text-semi-dark"}else if(n==="quest"){r="fa fa-fw fa-question-circle fa-1_15x text-semi-dark"}if(n){$(t).replaceWith('<i title="'+theme_language("status_module_mon_"+n+"")+'" class="'+r+' margined-left-3"></i>')}}})}if(core.curModule("proc")||core.curModule("firewall")||core.curModule("firewall6")||core.curModule("shorewall")||core.curModule("shorewall6")||core.curModuleFile("pam","edit_pam.cgi")||core.curModule("filter")){$("td a img[src], td label a img[src]").parents("td").addClass("text-center").attr("data-arrange",1);$('td img[src*="images/gap.gif"]').replaceWith('<i class="fa fa-fw fa-caret-down invisible"></i>');$('td a img[src*="images/down.gif"]').replaceWith('<i title="'+theme_language("move_down")+'" class="fa fa-fw fa-move-down cursor-pointer"></i>');$('td a img[src*="images/up.gif"]').replaceWith('<i title="'+theme_language("move_up")+'" class="fa fa-fw  fa-move-up cursor-pointer"></i>');$('td a img[src*="images/after.gif"]').replaceWith('<i title="'+theme_language("add_after")+'" class="fa fa-fw fa-level-down cursor-pointer"></i>');$('td a img[src*="images/before.gif"]').replaceWith('<i title="'+theme_language("add_before")+'" class="fa fa-fw fa-level-down fa-rotate-180 cursor-pointer"></i>')}if(core.curModule("squid")||core.curModule("cron")){$('td a img[src*="images/movedown.gif"]').replaceWith('<i title="'+theme_language("move_down")+'" class="fa fa-fw fa-move-down cursor-pointer"></i>');$('td a img[src*="images/moveup.gif"]').replaceWith('<i title="'+theme_language("move_up")+'" class="fa fa-fw fa-move-up cursor-pointer"></i>')}if(core.curModule("cron")){$('td a img[src*="images/bottom.gif"]').replaceWith('<i title="'+theme_language("move_bottom")+'" class="fa fa-fw fa-level-down cursor-pointer"></i>');$('td a img[src*="images/top.gif"]').replaceWith('<i title="'+theme_language("move_top")+'" class="fa fa-fw fa-level-down fa-rotate-180 cursor-pointer"></i>')}$("input").each(function(e,t){if($(this).attr("src")=="images/ok.gif"){$(t).attr("src",""+v___location_prefix+"/"+$(this).attr("src"));$(this).parents("td").attr("style","white-space: nowrap")}});core.curModule("commands")&&$("body").addClass("custom");if(!$is_history_action){if(core.curModuleFile("custom","view.cgi")){var $_t_title=$('form[action="save.cgi"]').find(".table-title"),$_tt=$_t_title.find("tt").detach();$("#headln2c").find("[data-main_title]").after("<span data-sub_title><br>"+$_tt[0].outerHTML+"</span>");$_t_title.remove()}$.each($(".container-fluid .panel-body table tr:empty"),function(){$(this).remove()});$.each($("span > input"),function(){var e=$(this).parent("span").next(".chooser_button"),t=$(this).parent("span").next('input[type="button"][onclick]'),i=$(this).parent("span").next("select");if(e){e.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; margin-top:4px !important;").find("i.fa-files-o").css("margin-top","0").addClass("vertical-align-middle")}if($(this).parents(".tab-content")){e.css("margin-top","4px")}if(t){t.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; vertical-align: middle").next("i.fa-files-o").css("margin-top","11px").addClass("vertical-align-middle");t.attr("style","display: inline; width:40px; height: 28px; margin-right:0 !important; vertical-align: middle").next("i.fa-calendar").attr("style","margin-top: 21px !important; font-size: 11px; margin-left: -27px; pointer-events: none;")}});$.each($('input[type="button"][onclick^="ifield"]'),function(e,t){$(this).css("margin-left","0").css("width","40px").css("height","28px")});$('.ui_form[action="switch.cgi"] > input.form-control.ui_textbox').next('input[type="button"][onclick^="ifield"]').attr("style","margin-top: 2px !important; margin-bottom: 2px !important; margin-left: 0 !important");setTimeout(function(){$('.ui_form[action="switch.cgi"]  .file_chooser_button_attached').attr("style","font-size: 11px; pointer-events: none; margin-top: 14px !important;")},10);if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cshrc/"){$("textarea").each(function(e,t){$(this).attr("style","height: 20em !important")})}if(v___location_path==v___location_prefix+"/acl/"||v___location_path==v___location_prefix+"/acl/edit_user.cgi"){$('.ui_grid_table.table-hardcoded .ui_grid_row .ui_grid_cell input[type="checkbox"], .table-hardcoded .col_value input[type="checkbox"]').each(function(e,t){$(this).attr("style","vertical-align: bottom !important")})}if(core.curModule("custom")||core.curModule("commands")){$(".panel-body > .ui_grid_table.table-hardcoded").each(function(e,t){$(this).attr("style","margin-top: 3px !important")});$(".panel-body td > .ui_form").each(function(){$(this).attr("style","padding-top: 0 !important")});$(".panel-body > a.ui_link").each(function(e,t){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).text($(this).text().replace(/\.$/,""));$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();if($(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-terminal"> </i> <span>'+$(this).text()+"</span>")}if($(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-pencil-square-o"> </i> <span>'+$(this).text()+"</span>")}if($(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-database"> </i> <span>'+$(this).text()+"</span>")}});$.each($("td[data-td-e] > .ui_links_row"),function(){var e=$(this).parent();e.find('a[href^="edit_"]').addClass("ui_link_replaced btn btn-xxs btn-transparent btn-link-bordered f__lnk_t_btn-el").css("margin-right","3px").removeClass("ui_link").prepend('<i class="fa fa-fw fa-pencil">&nbsp;</i>');e.parents("table").find("thead > tr > th:eq(2)").addClass("pointer-events-none")}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}});$.each($("td.col_value.col_header > .ui_links_row"),function(){}).promise().done(function(){if($(this).is(".ui_links_row")){$(this).contents().unwrap()}});theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="form.cgi"]',"btn btn-primary btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-cog","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="run.cgi"], a[href^="sql.cgi"]',"btn btn-success btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-play fa-0_85x","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="view.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-pencil-square-o","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table td[data-td-e]:nth-child(3)",'a[href^="sqlform.cgi"]',"btn btn-info btn-xxs vertical-align-top margined-top-1 margined-left--2 ---forced","fa-cog","","","","|");theme_buttonify(["/custom/","/custom/index.cgi","/commands/","/commands/index.cgi"],".container-fluid table.ui_grid_table td:last-child",'a[href^="edit_"]',"btn btn-default btn-transparent btn-transparent-link btn-xxs vertical-align-top margined-top-1 margined-right-5 pull-right btn-dnwo ---forced","fa-pencil","","","","|");$('body[class*="custom"] table.ui_grid_table tr td > form .table-responsive table tr:first-child td.col_header button.ui_submit').prepend('<i class="fa fa-fw fa-stop"></i>');$.fn.eW=function(e,t){if(!$.fn.eW.fakeEl){$.fn.eW.fakeEl=$("<span data-eW>").hide().appendTo(document.body)}$.fn.eW.fakeEl.text(e||this.val()||this.text()||this.attr("placeholder")).css("font",t||this.css("font"));return $.fn.eW.fakeEl.width()+2};$('table.ui_grid_table td input[type="text"], table.ui_grid_table td input[type="password"], table.ui_grid_table td textarea').on("input",function(){var e=$(this).eW()+15;if($(this).attr("type")==="password"){}$(this).css({width:e})}).trigger("input");var is_two_columns=$(".sub_table_container").first().find('td[colspan="4"]').length?0:1;var $empty_cells=$("table.ui_grid_table tbody tr.ui_grid_row td.ui_grid_cell");$.each($empty_cells,function(){var e=$(this).html();if(e=="<br>"||e.length<10){$(this).remove()}if(is_two_columns){$(this).addClass("no-contents");$(this).parent("tr").addClass("no-contents")}})}if(check_current_file("config.cgi")&&v___location_query&&v___location_query.includes("custom")||check_current_file("edit_configs.cgi")&&v___location_query&&v___location_query.includes("mod=commands")){$('[name="width_def"], [name="height_def"], [name="wrap"]').parent().parent("td").parent("tr").addClass("hidden")}snippets.page.render_links($is_history_action);if(core.curModuleFile("fdisk","edit_disk.cgi")){$.each($(".panel-body > table.table.table-striped tbody tr"),function(){var e=$(this).find("td:nth-child(3)");if(e.find('img[src*="images/use"], img[src*="images/gap"]').length){e.addClass("extent-graphs")}})}if(v___location_path==v___location_prefix+"/virtual-server/edit_link.cgi"){$(".table-hardcoded").find('input[name="open"]').parent("td").parent("tr").remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"){$('.table.table-striped.table-condensed tr.tr_tag td[data-td-e] input[type="checkbox"]').each(function(e,t){$(this).attr("style","vertical-align: middle !important")})}if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"){$("#signal").attr("style","margin-bottom: 0 !important;")}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"procmail/"){$(".panel-body p:first-child").next("p").contents().filter(function(){return this.nodeType==3}).remove();$(".panel-body p:last-child").prev("a.ui_link").remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cron/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"cron/index.cgi"){$('.panel-body form.ui_form[action="index.cgi"]').next("script").next("b").next("p").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"filter/"){$(".panel-body > b").next("p").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"dhcpd/"){var $dhcp_target=$(".panel-body > p");if(!$dhcp_target.find('a[href*="../software"]').length){$dhcp_target.contents().filter(function(){return this.nodeType==3}).remove()}}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"htaccess-htpasswd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"forward/"){$("td table.table-hardcoded.table.table-subtable").removeClass("table-striped")}$(".ui_buttons_hr > td > table.table-hardcoded > tbody > tr > td[nowrap]").each(function(){$(this).parents("table").attr("style","margin-bottom: 15px !important")});var textarea_fm_ctl_ui_textarea="textarea.form-control.ui_textarea",btn_type_button_def='button[type="button"].btn-default',text_area_class_to_set="-ta-fn-fx -ta-fn-fx-small margined-bottom--6",btn_styling="width:100% !important; padding-top: 0; height:28px !important; ";$(textarea_fm_ctl_ui_textarea).next(btn_type_button_def).each(function(){$(this).prev("textarea").addClass(""+text_area_class_to_set+" margined-bottom--f25");$(this).attr("style",btn_styling)});$(textarea_fm_ctl_ui_textarea).next("br").next(btn_type_button_def).each(function(){$(this).prev("br").prev("textarea").addClass(text_area_class_to_set);$(this).attr("style",btn_styling)});$(".table-hardcoded > tbody > tr > td > input.form-control.ui_textbox").next('button[type="button"].ui_button').each(function(){$(this).attr("style","margin-top: 2px !important")});$(".table-hardcoded > tbody > tr > td.col_label b a, .ui_table_row td a").each(function(e,t){if(!$(this).attr("href")){$(this).attr("style","color: #191919; text-decoration: none; cursor:default")}});$('input[name="all_weekdays"], .ui_grid_cell > table.table-condensed, table.table-hardcoded table.table-condensed, select[multiple][name="days"]').each(function(){$(this).parent("td").attr("style","vertical-align: top !important; padding-left:2px; padding-right:2px;")});$('input[type="submit"]').each(function(){$(this).addClass("btn btn-default")});$("table tr th").each(function(){if($(this).text()){$(this).attr("style","width: auto")}});$("table thead th:not(.table-title)").each(function(){$(this).css("border-top","none");$(this).css("border-bottom","none")});if($("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){!$("body").hasClass("file-manager")&&$("body").addClass("file-manager");$("#headln2l").prepend("<a onClick='window.open(\""+v___location_prefix+'/help.cgi/authentic-theme/file-manager", "help", "toolbar=no,menubar=no,scrollbars=yes,width=600,height=400,resizable=yes"); return false\' href="'+v___location_prefix+'/help.cgi/authentic-theme/file-manager"></a>')}var $table_header_links=$(".panel-heading > .header > div  a");$.each($table_header_links,function(){var e=0,t=$(this).attr("href");if(!t){return}if(t.indexOf("config.cgi")>-1||t.indexOf("man/search.cgi")>-1||t.indexOf("/index.cgi")>-1||t==v___location_directory_trail_slashed||t.indexOf("index.cgi")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"openvpn/"||t.indexOf("index.cgi?")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"spam/"||t.indexOf("restart_zone.cgi")>-1||t.indexOf("restart.cgi")>-1||t.indexOf("restart_progressive.cgi")>-1||t.indexOf("apply.cgi")>-1||t.indexOf("apply_progressive.cgi")>-1||t.indexOf("start.cgi")>-1||t.indexOf("start_progressive.cgi")>-1||t.indexOf("stop.cgi")>-1||t.indexOf("stop_progressive.cgi")>-1||t=="//"&&(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi")||t.indexOf("delete_")>-1||t.indexOf("list_mail.cgi")>-1||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1||t.indexOf("help.cgi")>-1){$.each($(this).next("br"),function(){$(this).remove()});$.each($(this).prev("br"),function(){$(this).remove()});if(t.indexOf("help.cgi")>-1){var i=$(this),a=$(this).parent("div");$(this).remove();a.append(i)}if(t.indexOf("/index.cgi")>-1||t==v___location_directory_trail_slashed||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1){$iconized_class="fa-arrow-left";$(this).data("title","").data("back",1)}else{if(t=="//"&&(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-logos.cgi")){$iconized_class="fa-arrow-left";$(this).attr("href",v___location_prefix+"/tconfig.cgi").data("title","").data("back",1)}else{if(t.indexOf("config.cgi")>-1){$iconized_class="fa-cog";$(this).data("title","")}else{if(t.indexOf("restart.cgi")>-1||t.indexOf("restart_progressive.cgi")>-1||t.indexOf("apply.cgi")>-1||t.indexOf("apply_progressive.cgi")>-1){$iconized_class="fa-refresh";e=$(this).find("b").detach()}else{if(t.indexOf("restart_zone.cgi")>-1){$iconized_class="fa-retweet"}else{if(t.indexOf("start.cgi")>-1||t.indexOf("start_progressive.cgi")>-1){$iconized_class="fa-play"}else{if(t.indexOf("stop.cgi")>-1||t.indexOf("stop_progressive.cgi")>-1){$iconized_class="fa-square"}else{if(t.indexOf("man/search.cgi")>-1){$iconized_class="fa-search"}else{if(t.indexOf("delete_")>-1){$iconized_class="fa-trash-o"}else{if(t.indexOf("list_mail.cgi")>-1){$iconized_class="fa-inbox"}else{if(t.indexOf("index.cgi")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"openvpn/"){$iconized_class="fa-cogs"}else{if(t.indexOf("index.cgi?")>-1&&v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"spam/"){$iconized_class="fa-arrow-left";$(this).data("back",1)}}}}}}}}}}}}var n=t.indexOf("help.cgi")>-1;if(n){$iconized_class="fa-question-circle";$(this).data("title","")}var r=Convert.strUpInitial(n?theme_language("global_help"):$(this).data("back")===1?!core.curModule(v___module_file_manager)?theme_language("global_return_to_module_index"):"":$(this).text()),o=e?"&nbsp;&nbsp"+e.text():"";$(this).data("toggle","tooltip").data("title",r).attr("data-container","body").addClass(vars.h.class.button.tableHeader).removeClass("ui_link").append('<i class="fa '+$iconized_class+'"></i><span>'+o+"</span>");$(this).attr("aria-label",r);$(this).contents().filter(function(){return this.nodeType==3}).remove();var l=$(this);l.tooltip({container:"body",placement:l.is(":last-child")?"auto right":"auto top",trigger:"hover",delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}});if((v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"apache/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proftpd/")&&(t.indexOf("restart.cgi")>-1||t.indexOf("apply.cgi")>-1)||$(this).parent("div").find("a")&&$(this).parent("div").find("a").length==1||t.indexOf("man/search.cgi")>-1||t.indexOf("config.cgi")>-1||t.indexOf("/index.cgi")>-1||t.indexOf("/index.cgi")>-1||t.indexOf("/virtual-")>-1||t.indexOf("/virtualmin-")>-1||t.indexOf("/server-")>-1){if((t.indexOf("/index.cgi")>-1||t.indexOf("config.cgi")>-1)&&$("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){$(this).attr("style","margin-right: 0 !important; padding: 6px 12px")}else{$(this).attr("style","margin-right: 0 !important")}}}$("#headln2l").removeClass("invisible")});$.each($('td.ui_grid_cell:contains("|")'),function(){$(this).contents().filter(function(){return this.nodeType==3}).remove()});$('a[href*="help.cgi"][onclick], a[href*="help.cgi/"], a[href*="showpass.cgi?"][onclick]').attr("onclick","").unbind("click").addClass("help_popup");$(".help_popup").each(function(){var e=$(this).find("b"),t=e.length?e:$(this),i=$.trim(t.html());if(i){t.html(i.replace(/\?$/,""))}})}if(!$is_history_action){$('select.ui_select[name="days"]').each(function(){$(this).parent("td").attr("style","vertical-align: top !important")});if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailboxes/"||v___location_path==v___location_prefix+"/mailboxes/index.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailbox/"||v___location_path==v___location_prefix+"/postfix/view_mailq.cgi"){if(core.curModuleFile("mailboxes","reply_mail.cgi")||core.curModuleFile("mailbox","reply_mail.cgi")){var $x=$('.container-fluid .table-subtable a[href^="reply_mail.cgi"][href*="html="]'),$x_th2=$x.parent(".ui_links_row").parent("th");$x_th1=$x_th2.prev();$x.addClass("pull-right margined-top-2 margined-right-2");$x.detach().prependTo($x_th1);$x_th2.remove();var $that_last_attach_row=$('.mailboxes[data-uri*="reply_mail.cgi"] #content form .col_value.col_header .ui_links_row:empty').parent();if($that_last_attach_row.text()==="\n"){$that_last_attach_row.parent("tr").remove()}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj2=$('.container-fluid form[action="reply_mail.cgi"]');$del_mail_obj2.contents().filter(function(){return this.nodeType==3}).remove()}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){if(core.curModule("mailboxes")){$(".container-fluid").find('[name="mark1"], [name="mark2"], [name="move1"], [name="move2"], [name="copy1"], [name="copy2"]').each(function(){$(this).val($(this).val().replace(/:$/,""))})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")){var $del_mail_obj_form=$('.container-fluid form[action="delete_mail.cgi"]'),$last_links_row=$del_mail_obj_form.find('input[type="hidden"]:first-child ~ [type="submit"] ~ .ui_links_row').last();if($last_links_row.length){$last_links_row.nextUntil("hr").addBack().remove();$del_mail_obj_form.next("script").next("center").remove();$del_mail_obj_form.contents().filter(function(){return this.nodeType==3}).remove()}else{setTimeout(function(){$del_mail_obj_form.find(".ui_links_row").last().addClass("margined-bottom-8").removeClass("margined-bottom--2")})}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj_form2=$('.container-fluid form[action="reply_mail.cgi"]'),$last_links_row2=$del_mail_obj_form2.find('input[type="hidden"]:first-child ~ [type="submit"]').nextAll(".table-responsive").last();if($last_links_row2.length){$last_links_row2.nextAll().filter(".ui_form_end_submit, .ui_form_end_submit + .hidden, .ui_form_end_submit + .hidden + br, .ui_form_end_submit + .hidden + select").remove()}else{$del_mail_obj_form2.find(".table-responsive").last().addClass("margined-bottom-5")}}}if(core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$(".container-fluid").find('[name="mark1"], [name="mark2"], [name="move1"], [name="move2"], [name="copy1"], [name="copy2"]').each(function(){if($(this).is("button")){$(this).text($(this).text().replace(/:/,""))}else{$(this).val($(this).val().replace(/:$/,""))}})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$.each($(".container-fluid .ui_form img"),function(){var e=$(this).attr("src");if(e){if(e.includes("images/special.gif")){$(this).replaceWith('<i class="fa fa-fw fa-lg fa-exclamation fa-xs margined-left-4 text-semi-light vertical-align-baseline"></i>')}if(e.includes("images/replied.gif")){$(this).replaceWith('<i class="fa fa-fw fa-lg fa-reply fa-xs margined-left-4 text-semi-light vertical-align-baseline"></i>')}if(e.includes("images/search.gif")){$(this).remove()}if(e.includes("images/attach.gif")){$(this).replaceWith('<i class="fa fa-fw fa-lg fa-paperclip fa-rotate-315 margined-left-4 text-semi-light"></i>')}}})}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){$(".container-fluid").find('[name="delete"]').addClass("btn-danger").removeClass("btn-default");$(".container-fluid").find('[name="reply"]').addClass("btn-info").removeClass("btn-default");$(".container-fluid").find('[name="new"]').addClass("btn-success").removeClass("btn-default");$(".container-fluid").find('[name="razor"]').addClass("btn-warning").removeClass("btn-default")}if(!v___location_file){$(".ui_form_end_submit").css("margin-top","0");$("input#user").addClass("heighter-34 vertical-align-top")}else if(v___location_file=="list_mail.cgi"||v___location_file=="mail_search.cgi"){$('.container-fluid input:not([type="checkbox"]), .container-fluid .ui_form_end_submit, .container-fluid select').addClass("heighter-34").removeClass("heighter-28").css("margin-bottom","-1px");var $del_mail_obj=$('.container-fluid form[action="delete_mail.cgi"]');$del_mail_obj.addClass("margined-top-7");$del_mail_obj.find(".ui_links_row").first().addClass("margined-top-7");$del_mail_obj.find(".ui_links_row").last().addClass("margined-bottom--2");$del_mail_obj.nextAll(".ui_page_flipper").addClass("margined-top-7");$del_mail_obj.find('[name="delete"], [name="new"]').removeAttr("style")}$("body").find("form").removeAttr("onsubmit");var $header_tables=$("body").find('input[name="from"]').parents(".tab-pane").parent("td");$header_tables.children("table").hide();$.each($header_tables.find("input, textarea, select"),function(){if(!$(this).hasClass("ui_select")&&!$(this).attr("onclick")&&$(this).attr("type")!="checkbox"&&$(this).attr("type")!="submit"){$(this).attr("style","width: 60%").addClass("inline-block")}if($(this).attr("onclick")){$(this).addClass("inline-block")}});onbeforeunload=null;if($("body").find('input.ui_hidden[name="html_edit"]').val()==1){editor_html_init(["body",2,false,"edit_web"],"basic")}$("body").find('input[name="from"]').parents(".tab-pane").prev("table").remove();$("body").find('input[name="from"]').parents(".tab-pane ").parent("td").find("div, table").each(function(e,t){$(this).find(".col_label").css("width","20%");$(this).find('input[name="subject"]').parent("td").prev("td").find("b").attr("style","font-size: 13px !important");$(this).find('input[name="subject"]').parents("table").show();$(this).find('input[name="subject"]').parent("td").find(".submitter").remove()});var $editor_mode_link_container=$("body").find('textarea[id="body"]').parents("table").find("thead > tr > th:last-child");$editor_mode_link=$editor_mode_link_container.find("a").addClass("editor_mode_link");$editor_mode_link_container.parent("tr").find("th:first-child").append($editor_mode_link);$editor_mode_link_container.remove();var $editor_mode_link_button=$("body").find('textarea[id="body"]').parents("table").find(".editor_mode_link");$editor_mode_link_button_state=$editor_mode_link_button.attr("href")?$editor_mode_link_button.attr("href").indexOf("html=0"):false;$editor_mode_link_button.attr("title",$editor_mode_link_button.text()).addClass("editor_mode_link_button pull-right btn btn-sm "+($editor_mode_link_button_state==-1?"btn-success":"btn-primary")).html('<i class="fa '+($editor_mode_link_button_state==-1?"fa-font":"fa-text-width")+'"> </i>');$(".editor_mode_link_button").tooltip();var $fileinput_add_another_attachment=$("body").find('a[onclick="return add_attachment()"]');$fileinput_add_another_attachment.addClass("btn btn-default ui_link_replaced btn-xxs margined-top-1 margined-left-2 margined-bottom-2");$fileinput_add_another_attachment.text($fileinput_add_another_attachment.text().replace(/\.$/,""));var $fileinput_add_another_servattachment=$("body").find('a[onclick="return add_ss_attachment()"]');$fileinput_add_another_servattachment.attr("onclick","return theme_add_ss_attachment()");$fileinput_add_another_servattachment.addClass("btn btn-default ui_link_replaced btn-xxs margined-top-1 margined-left-3 margined-bottom-2");$fileinput_add_another_servattachment.text($fileinput_add_another_servattachment.text().replace(/\.$/,""));if(v___location_path.indexOf("view_mail.cgi")>-1||v___location_path.indexOf("view_mailq.cgi")>-1){var $table_title_header_container_main=$(".ui_form").find("div.table-responsive"),$table_title_header_container=$table_title_header_container_main.first().find(".table-title");$table_title_links_container=$table_title_header_container.next();$table_title_links_container.contents().filter(function(){return this.nodeType==3}).remove();$table_title_header_container_main.find('[name="detach"]').addClass("heighter-28 btn-xs");$table_title_links_container.find("a").removeClass("btn-inverse").parent(".ui_links_row").contents().unwrap();$table_title_links_container.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force");$table_title_links=$table_title_links_container.html();$table_title_header_container.append($table_title_links);$table_title_links_container.remove();$table_title_second_container=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("table:first-child");$table_title_header_container=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:first-child");$table_title_links_container=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th:last-child");if($(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("th").length==2){$table_title_links_container.remove()}else{}$table_title_links_container.find("a").addClass("table_title_links pull-right btn btn-tiny margined-top-3 margined-right-3 pull-right-force");$table_title_links_container.find("a").removeClass("btn-inverse").parent(".ui_links_row").contents().unwrap();$table_title_links=$table_title_links_container.html();$table_title_header_container.append($table_title_links);setTimeout(function(){if($(".ui_form").find("div.table-responsive").first().find("table:first-child").outerWidth()!=$(".ui_form").find("div.table-responsive").first().next("div.table-responsive").find("table:first-child").outerWidth()){var e=parseInt($(".ui_form").find("div.table-responsive").first().find("table:first-child").width()/2);$table_title_second_container.find(".pull-right").removeClass("pull-right").addClass("pull-left")}$.each($table_title_second_container.find("table"),function(){$(this).removeClass().addClass("clear-formatting");$.each($(this).find("td.col_value"),function(){$(this).addClass("col_value_transparent")})})},30);if($table_title_header_container.find("b")&&$table_title_header_container.find("b").length>1){if($table_title_header_container.find("b:first-child").text()==$table_title_header_container.find("b:last-child").text()){$table_title_header_container.find("b:last-child").remove()}}$('.container-fluid center > a > img[src*="images/left.gif"]').each(function(){$(this).replaceWith('<i class="fa fa-fw fa-lg fa-arrow-circle-o-left text-semi-light vertical-align-baseline"></i>')});$('.container-fluid center > a > img[src*="images/right.gif"]').each(function(){$(this).replaceWith('<i class="fa fa-fw fa-lg fa-arrow-circle-o-right text-semi-light vertical-align-baseline"></i>')})}$("td > a").on("click",function(){if($(this).attr("onclick")=="return add_attachment()"){}$("input[type=file]").each(function(){if(!$(this).parent("a").hasClass("file-input-wrapper")){$(this).bootstrapFileInput()}})});if(settings_mailbox_slash_delimiter){$('.container-fluid select.ui_select[name="id"] > option').each(function(e,t){$(t).text($(t).text().replace(/\./g,"/").replace(/\/\//g,"/"))})}$.each($('table td[align="right"], table td[align="left"]'),function(e,t){$(this).attr("style","border: 0 !important;");$(this).parents("tbody").attr("style","border: 0 !important;");$(this).parents("table.table-hardcoded.table.table-striped.table-condensed.table-subtable").removeClass("table-hardcoded table table-striped table-condensed table-subtable")});$.each($("div.table-responsive > table tbody tr td > table.table-hardcoded"),function(e,t){$(this).find("tr > td.col_label > b").removeAttr("style");$(this).removeClass("table table-condensed")});$.each($("div.table-responsive > table tbody tr td > div.tab-pane"),function(e,t){$(this).find("table").removeClass("table");$(this).parents("div.table-responsive").find("table").removeClass("table-striped table-subtable")});$.each($('div.table-responsive > table tbody tr td > div.tab-pane .col_value > input[type="button"][onclick^="ifield"]'),function(e,t){$(this).attr("style","margin-left: 0; margin-top: 0 !important; vertical-align: top;")})}$.each($(".barchart"),function(){$(this).find("img").attr("height",4)});$("a").each(function(){if(!$(this).attr("href")){$(this).addClass("no_effect")}});$.each($(".container-fluid input:not(.ui_upload)"),function(){if($(this).css("height")=="28px"){$(this).prev("input").addClass("heighter-28")}});if(core.curModule("logviewer")||core.curModule("syslog")||core.curModule("phpini")){$(".container-fluid .chooser_button + .ui_form_end_submit").addClass("heighter-28")}if(core.curModuleFile("gnupg","edit_key.cgi")){$(".container-fluid .sub_table_container .table-condensed .btn-success").addClass("heighter-28").removeClass("btn-success").addClass("btn-default")}if(core.curModuleFile("virtual-server","backuplog.cgi")){$('.container-fluid input[name="search"]').addClass("margined-top--1")}if(core.curModuleFile("usermin","list_sessions.cgi")){$('.container-fluid input[name="user"] + button + button').addClass("heighter-34-force")}$.each($(".container-fluid select"),function(){if($(this).next("input").outerHeight()==32){$(this).addClass("heighter-34")}});$.each($(".container-fluid .ui_buttons_row input, .container-fluid .ui_buttons_row select"),function(){$(this).addClass("heighter-34")});if(core.curModuleFile("gnupg","list_keys.cgi")){$('.container-fluid input[id="id"]').addClass("heighter-34")}if(core.curModuleFile("virtual-server","edit_script.cgi")){var x1z1x1c41=$('input[name="version"]');x1z1x1c41.length&&x1z1x1c41.attr("style",x1z1x1c41.attr("style").replace("n: middle","n: bottom !important")).addClass("heighter-34")}$.each($("tr > .ui_form"),function(){if($(this).next().next("td").find("input.submitter")){$(this).next().next("td").find("input.submitter").addClass("heighter-34")}});$.each($("input.heighter-34").next(".chooser_button"),function(){$(this).addClass("heighter-34");$(this).find(".fa.fa-files-o").css("margin-top","0").addClass("vertical-align-middle")});setTimeout(function(){$.each($(".container-fluid select"),function(){if($(this).next("input").outerHeight()==32||$(this).prev("input").outerHeight()==32){$(this).addClass("heighter-34").removeClass("heighter-28")}else{if($(this).next("input").outerHeight()==28||$(this).prev("input").outerHeight()==28){$(this).addClass("heighter-28").removeClass("heighter-34")}}})},1);if(core.curModule("term")||core.curModuleFile("server-manager","login.cgi")){var tmp__is__m__term=$("iframe");if(tmp__is__m__term.length){var $this=tmp__is__m__term;$this.on("load",function(){$this.contents().find("#term").css("width","99.3%").css("height","96vh").css("margin-top","1px")});$(this).next("br").remove().next('input[type="button"]').remove();$(this).next('input[type="button"]').remove();$(this).next("p").remove()}}$.each($(".chooser_button"),function(){if($(this).prev("input").attr("style")&&$(this).prev("input").attr("style").indexOf("max-width: 100%")>-1){$(this).prev("input").css("max-width","93%")}});if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&settings_sysinfo_link_mini==true){$(".navigation > li:not('.has-sub')").removeClass("sub_active").find("span.current-large").remove()}$.each($('input[value="..."], input[value=" ..."], input[value="  ..."], input[value="... "], input[value="...  "], input[value=" ... "], input[value="  ...  "]'),function(){$(this).after('<i class="fa fa-fw fa-files-o -cs file_chooser_button_attached vertical-align-middle" style="font-size:11px; pointer-events: none"></i>');$(this).attr("value","").addClass("file_chooser_button_attached_input")});$.each($(".chooser_button"),function(){$(this).prev("input").css("margin-top","2px").css("margin-bottom","2px")});$.each($(".file_chooser_button_attached"),function(){$(this).prev('input[type="button"]').prev("input").css("margin-top","2px").css("margin-bottom","2px");if(!$(this).parents(".ui_buttons_label").length&&!$(this).parents(".table-subtable").length){$(this).css("margin-top","11px")}});$.each($(".container-fluid .ui_form > .file_chooser_button_attached"),function(){if($(this).prev(".heighter-34")&&$(this).prev(".heighter-34").length||$(this).next(".heighter-34")&&$(this).next(".heighter-34").length){$(this).css("margin-top","16px");$(this).prev("input[onclick]").css("width","40px")}});$.each($('.container-fluid .ui_form[action="init_cache.cgi"] > .file_chooser_button_attached'),function(){if($(this).prev(".heighter-34")&&$(this).prev(".heighter-34").length||$(this).next(".heighter-34")&&$(this).next(".heighter-34").length){$(this).css("margin-top","14px")}});$.each($(".col_value > .file_chooser_button_attached"),function(){$(this).prev("input[onclick]").css("width","40px").css("margin-left","0")});if(v___location_path==v___location_prefix+"/virtualmin-mailman/"||v___location_path==v___location_prefix+"/virtualmin-mailman/index.cgi"){$("input[name^=reset_]").addClass("heighter-28")}if(v___location_path==v___location_prefix+"/software/edit_pack.cgi"||v___location_path==v___location_prefix+"/apache/show.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"){$.each($(".container-fluid .panel-body .btn:not(.chooser_button)"),function(){$(this).removeClass("heighter-28").addClass("heighter-34")})}if(v___location_path==v___location_prefix+"/virtualmin-svn/"||v___location_path==v___location_prefix+"/virtualmin-svn/index.cgi"){$.each($("tr > td[data-td-e] > button"),function(){$(this).addClass("btn-hover-wash_off-in-row bhw-sm heighter-28 heighter-28-force margined-top-2 margined-bottom-2");if($(this).find(".fa-backup").length){$(this).removeClass("heighter-28-force")}})}if(v___location_path==v___location_prefix+"/virtualmin-init/"||v___location_path==v___location_prefix+"/virtualmin-dav/list_shares.cgi"||v___location_path==v___location_prefix+"/squid/edit_acl.cgi"||v___location_path==v___location_prefix+"/virtualmin-nginx/"||v___location_path==v___location_prefix+"/fdisk/edit_disk.cgi"||v___location_path==v___location_prefix+"/server-manager/edit_newlinks.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"backup-config/"){$.each($(".container-fluid .panel-body .ui_link_re-replaced"),function(){$(this).addClass("btn-tiny").removeClass("heighter-34")})}if(v___location_path==v___location_prefix+"/pam/"){$(".panel-body > a.ui_link").addClass("btn-tiny")}if(v___location_path==v___location_prefix+"/software/"||v___location_path==v___location_prefix+"/software/index.cgi"){$(".container-fluid input#search").addClass("heighter-34 vertical-align-top");$('form[action="file_info.cgi"] > .ui_form_end_submit').addClass("heighter-28 heighter-28-force margined-top-0")}if(v___location_path==v___location_prefix+"/software/tree.cgi"){$(".ui_link").addClass("margined-top-10")}if(v___location_path==v___location_prefix+"/syslog/save_log.cgi"||v___location_path==v___location_prefix+"/logviewer/view_log.cgi"){$.each($(".container-fluid .heighter-34"),function(){$(this).removeClass("heighter-34").addClass("heighter-28")});$("form:first").next("script").next("br").remove();$("form:last").css("margin-top","5px")}if(v___location_path==v___location_prefix+"/status/edit_mon.cgi"){$('td.col_value > table[cellspacing="1"] tbody').attr("style","border: 0 !important;");$(".opener_trigger:last-child").css("font-size","16px");$.each($("table.sub_table_container td > font"),function(){$(this).parents("tbody");$(this).contents().unwrap().wrap('<i class="fa fa-info-circle"><span class="font-family-default vertical-align-baseline margined-left-3">&nbsp;</span></i>')})}if(v___location_path==v___location_prefix+"/shell/"||v___location_path==v___location_prefix+"/shell/index.cgi"||v___location_path==v___location_prefix+"/server-manager/shell.cgi"||v___location_path==v___location_prefix+"/server-manager/massshell.cgi"){$.each($(".container-fluid .btn:not(.btn-link), .container-fluid select, .container-fluid input"),function(){$(this).removeClass("heighter-28").addClass("heighter-34");if($(this).is('input[type="button"]')){$($(this).addClass("submitter"))}if($(".form-control.sidebar-search").val()&&$(".form-control.sidebar-search").val().trim().startsWith("!")){$(".form-control.sidebar-search").val("")}$(".ui_form").find("input.btn.btn-default:first").addClass("btn-success")});$(".container-fluid input#cmd").focus();setTimeout(function(){var e=$("#content");var t=e.find(v___page_container).outerHeight();e.scrollTop(t)})}$.each($("input"),function(){if($(this).outerHeight()==28&&$(this).next("input").outerHeight()!=28){if($(this).is(':not([type="hidden"])')){$(this).next("input").addClass("heighter-28")}}});$.each($(".container-fluid select"),function(){if($(this).outerHeight()==32&&$(this).next("select").outerHeight()!=32){$(this).next("select").addClass("heighter-34")}});if(v___location_path==v___location_prefix+"/cluster-passwd/edit_passwd.cgi"){$.each($("input + button"),function(e,t){if($(this).css("height")=="28px"){$(this).addClass("heighter-28").css("line-height","12px").css("margin-top","2px")}})}if(v___location_path==v___location_prefix+"/cluster-shell/"||v___location_path==v___location_prefix+"/cluster-shell/index.cgi"){var $__btn_to_rep=$('button[onclick*="run.cgi?clear"]');if($__btn_to_rep.length){var btn_txt=$__btn_to_rep.text();$__btn_to_rep.replaceWith('<button class="btn btn-default ui_button heighter-28"><a class="no_effect" href="run.cgi?clear=1" data-original-title="" title="">'+btn_txt+"</a></button>")}}if(v___location.pathname==v___location_prefix+"/virtual-server/pro/history.cgi"||v___location.pathname==v___location_prefix+"/server-manager/bwgraph.cgi"||v___location.pathname==v___location_prefix+"/server-manager/history.cgi"||v___location.pathname==v___location_prefix+"/server-manager/one_history.cgi"){$("body").find("table.ui_form_end_buttons .btn.btn-default.submitter.ui_submit").addClass("btn-success");$(".panel-body > table tr td .ui_link_empty").each(function(e,t){$(this).addClass("btn-tiny ui_link_replaced")});$(".panel-body > table a").each(function(e,t){$(this).addClass("btn btn-inverse btn-tiny ui_link_replaced").removeClass("ui_link");$(this).text($(this).text().replace(/\.$/,""));if($(this).text()&&$(this).text().indexOf("<<")>-1){$(this).text($(this).text().replace(/\<\</,""));$(this).html('<i style="vertical-align: baseline !important;" class="fa fa-fw fa-angle-double-left"> </i> <span>'+$(this).text()+"</span>")}if($(this).text()&&$(this).text().indexOf(">>")>-1){$(this).text($(this).text().replace(/\>\>/,""));$(this).html($(this).text()+' <i style="vertical-align: baseline !important;" class="fa fa-fw fa-angle-double-right"> </i>')}$(this).parent().contents().filter(function(){return this.nodeType==3}).remove();if($(this).attr("href").indexOf("edit_cmd.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-terminal"> </i> <span>'+$(this).text()+"</span>")}if($(this).attr("href").indexOf("edit_file.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-pencil-square-o"> </i> <span>'+$(this).text()+"</span>")}if($(this).attr("href").indexOf("edit_sql.cgi?new")===0){$(this).html('<i class="fa fa-fw fa-database"> </i> <span>'+$(this).text()+"</span>")}$(this).parents("table").css("margin-bottom","3px")});if($("#history").next("table.ui_grid_table").next("a").length){$("#history").next("table").next("a").addClass("btn btn-info btn-tiny ui_link_replaced").attr("style","margin-top: 4px !important; margin-bottom: 2px !important").attr("target","_blank");$("#history").next("table").next("a").text($("#history").next("table").next("a").text().replace(/\.\.$/,""));$("#history").next("table").next("a").html('<i style="vertical-align: middle !important;" class="fa fa-fw fa-external-link"></i>&nbsp;'+$("#history").next("table").next("a").text())}else{$("#history").next("a").addClass("btn btn-info btn-tiny ui_link_replaced").attr("style","margin-top: 4px !important; margin-bottom: 2px !important").attr("target","_blank");$("#history").next("a").text($("#history").next("a").text().replace(/\.\.$/,""));$("#history").next("a").html('<i style="vertical-align: middle !important;" class="fa fa-fw fa-external-link"></i>&nbsp;'+$("#history").next("a").text())}$(".panel-body > hr + b").attr("style","font-size: 16px; font-weight: normal;");$(".panel-body > hr + b").text($(".panel-body > hr + b").text().replace(/\:$/,""));try{onLoad()}catch(e){}}$.each($('tr > td[valign="top"][width="50%"]'),function(){var e=$(this).attr("style");$(this).attr("style","vertical-align: top !important; "+(e?e:""))});$("body table").each(function(e,t){var i=$(this);if(!$(t).hasClass("table")&&!$(t).hasClass("header")&&!$(t).hasClass("ui_form_end_buttons")&&!$(t).hasClass("ui_table")){$(t).addClass("table-hardcoded");if($t_uri_usermin){$(t).addClass("table-subtable");if($(t).find("tr.thead").length||$(t).hasClass("sub_table_container table-hardcoded table-subtable")){}}}});if(v___location_path==v___location_prefix+"/virtual-server/list_scripts.cgi"){table_data_init($("#att_existing > form > table.table.table-striped.table-condensed, #att_new > form > table.table.table-striped.table-condensed"));page.render.content.filter.init();$('[action="list_scripts.cgi"]').replaceWith("<p>"+theme_language("virtual_server_scripts_desc")+"</p>")}if(v___location_path==v___location_prefix+"/virtual-server/edit_newscripts.cgi"){table_data_init($("#att_summary > table.table.table-striped.table-condensed"))}if(v___location_path==v___location_prefix+"/server-manager/index.cgi"||v___location_path==v___location_prefix+"/virtualmin-htpasswd/index.cgi"){table_data_init($("body form > table.table.table-striped.table-condensed"))}if($('body[class*="status"]').length&&!v___location_file&&!$('body[class*="smart-status"]').length||v___location_path==v___location_prefix+"/servers/"||v___location_path==v___location_prefix+"/servers/index.cgi"||v___location_path==v___location_prefix+"/webminlog/search.cgi"){table_data_init($("table.table-striped.table-condensed"))}if(core.curModule("smart-status")){$('select[name="drive"]').addClass("heighter-34");$('select[name="drive"] + .ui_form_end_submit').addClass("heighter-34")}if($('body[class*="ldap-useradmin"]').length){table_data_init($("form > table.table.table-striped.table-condensed"))}if(v___location_path==v___location_prefix+"/virtual-server/list_sched.cgi"){table_data_init($(".table.table-striped.table-hover.table-condensed"),false,false,{orderable:false,targets:[0,-1]})}if(v___location_path==v___location_prefix+"/servers/"||v___location_path==v___location_prefix+"/servers/index.cgi"){$(".ui_checked_columns td table tr td").find('a.ui_link[href*="edit_serv.cgi"]').addClass("margined-left-4 label label-sm label-primary hidden").html('<i class="fa fa-fw fa-pencil-square-o"></i>');$(".ui_checked_columns").hover(function(){$(this).find("td table tr a.ui_link.label.hidden").removeClass("hidden")},function(){$(this).find("td table tr a.ui_link.label").addClass("hidden")})}$.each($('table.table.table-striped.table-condensed.dataTable.no-footer > thead > tr[role="row"]:first-child'),function(e,t){$(this).attr("style","border-top: 4px solid #f2f2f2 !important")});$.each($('button[onclick^="ifield"].btn.btn-default.ui_button'),function(){$(this).addClass("file_chooser_button_emulate")});$.each($(".file_chooser_button_emulate"),function(){if(!$(this).find(".fa-files-o").length){$(this).append('<i class="fa fa-fw fa-files-o -cs vertical-align-middle" style="font-size:11px; pointer-events: none"></i>')}if($(this).prev("input").css("height")=="28px"){$(this).addClass("heighter-28")}});$.each($("label > img"),function(e,t){$(this).attr("style","vertical-align: baseline !important")});$.each($('select[multiple][name="weekdays"]'),function(){$(this).parents('td[valign="top"], td[data-td-e]').attr("style","vertical-align: top !important");$(this).parents('table[width="100%"]').parents(".ui_radio_table.table-hardcoded").css("width","100%")});$.each($("label").find("br"),function(){$(this).parent("label").prev(".aradio, .acheckbox").attr("style","margin-left: 0 !important;");$(this).parent("label").next(".aradio, .acheckbox").attr("style","margin-left: 0 !important;")});$.each($(".table-responsive + .table-responsive + .table-hardcoded td"),function(){if($(this).find(".heighter-34").length){$.each($(".table-responsive + .table-responsive + .table-hardcoded td"),function(){$(this).find(".btn").addClass("heighter-34")})}});if(v___location_path==v___location_prefix+"/cpan/edit_mod.cgi"){$('.container-fluid form[action="download.cgi"]').next().next().next().find(".submitter.ui_submit").addClass("heighter-34")}if(core.curModuleFile("virtual-server","edit_script.cgi")){$('.container-fluid .ui_form button[name="stop"], .container-fluid .ui_form button[name="start"], .container-fluid .ui_form button[name="restart"]').addClass("heighter-34-force margined-right--4");$('.container-fluid .ui_form button[name="upgrade"]').addClass("margined-right--5")}if(v___location_path==v___location_prefix+"/cpan/"||v___location_path==v___location_prefix+"/cpan/index.cgi"){var cpan_button=$('input[name="cpan"]').next("button");if(cpan_button.length){cpan_button.html('<i class="fa fa-fw fa-files-o -cs vertical-align-middle" style="font-size:11px; margin-top: -6px; pointer-events: none"></i>').attr("style","width: 40px; height: 28px; vertical-align:middle !important; margin-top:2px; margin-bottom:2px;");cpan_button.attr("onclick",cpan_button.attr("onclick").replace("document.forms[0]","document.forms[1]"))}}if($("form").find(".icons-row:not(.inline-row)").length){$("form").find(".icons-row").addClass("_processed_"+(settings_right_table_links_type=="1"?" small":"")+"").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef").find(".icons-container").addClass("icons-container-stretched")}if($(".ui_subheading + .ui_links_row ~ .icons-row:not(.inline-row)").length){$(".ui_subheading + .ui_links_row ~ .icons-row:not(.inline-row)").addClass("_processed_"+(settings_right_table_links_type=="1"?" small":"")+"").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef").find(".icons-container").addClass("icons-container-stretched")}function __m_ico_row_tb(){$("body").find(".icons-row:not(._processed_):not(.inline-row)").css({"padding-top":"8px","padding-bottom":"8px"});$("body").find(".icons-row:not(._processed_):not(.inline-row)").css("border-top","1px solid #efefef").css("border-bottom","1px solid #efefef")}function __m_ico_row_t(){$("body").find(".icons-row:not(._processed_):not(.inline-row)").css({"padding-top":"18px"});$("body").find(".icons-row:not(._processed_):not(.inline-row)").css("border-top","1px solid #efefef")}if(v___location_path==v___location_prefix+"/lvm/"||v___location_path==v___location_prefix+"/lvm/index.cgi"||v___location_path==v___location_prefix+"/proftpd/virt_index.cgi"||v___location_path==v___location_prefix+"/dhcpd/"||v___location_path==v___location_prefix+"/dhcpd/index.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/"||v___location_path==v___location_prefix+"/cluster-usermin/index.cgi"||v___location_path==v___location_prefix+"/bind8/"||v___location_path==v___location_prefix+"/bind8/index.cgi"||v___location_path==v___location_prefix+"/grub/"||v___location_path==v___location_prefix+"/grub/index.cgi"||v___location_path==v___location_prefix+"/cluster-software/"||v___location_path==v___location_prefix+"/cluster-software/index.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/edit_user.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/edit_group.cgi"||v___location_path==v___location_prefix+"/cluster-webmin/edit_mod.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/edit_mod.cgi"||v___location_path==v___location_prefix+"/cluster-software/edit_pack.cgi"||v___location_path==v___location_prefix+"/cluster-useradmin/"||v___location_path==v___location_prefix+"/cluster-useradmin/index.cgi"||v___location_path==v___location_prefix+"/cluster-usermin/"||v___location_path==v___location_prefix+"/cluster-usermin/index.cgi"||v___location_path==v___location_prefix+"/cluster-webmin/"||v___location_path==v___location_prefix+"/cluster-webmin/index.cgi"){__m_ico_row_tb()}if(v___location_path==v___location_prefix+"/proftpd/"||v___location_path==v___location_prefix+"/proftpd/index.cgi"||v___location_path==v___location_prefix+"/mysql/"||v___location_path==v___location_prefix+"/mysql/index.cgi"||v___location_path==v___location_prefix+"/postgresql/"||v___location_path==v___location_prefix+"/postgresql/index.cgi"||v___location_path==v___location_prefix+"/bacula-backup/"||v___location_path==v___location_prefix+"/bacula-backup/index.cgi"){__m_ico_row_t()}$.each($(".row.icons-row.inline-row"),function(){$(this).find("a.icon_link").contents().filter(function(){return this.nodeType==3}).remove()});$.each($(".row.icons-row:not(.inline-row) .icons-container"),function(){$(this).removeAttr("data-title").removeAttr("data-toggle").removeAttr("data-placement").removeAttr("data-container")});if($("body").find(".icons-row > div.icons-container").length||$("body").find(".icons-row > div.small-icons-container").length){$.each($(".icons-row .hidden-forged-6"),function(){if($(this).find("input").is(":checked")){$(this).parents('div[class*="icons-container"]').addClass("highlighted")}});$.each($(".hidden-forged-7 > a"),function(){$(this).removeClass();if($(this).parents(".hidden-forged-7").hasClass("hidden-forged-7-small")){$(this).html('<i title="'+theme_language("edit_current")+'" aria-label="'+theme_language("edit_current")+'" class="fa fa-edit text-semi-dark text-dark-hoverd"> </i>');$(this).parent().parent().prepend('<i title="'+theme_language("select_deselect")+'" aria-label="'+theme_language("select_deselect")+'" class="fa fa-fw fa-select text-dark text-dark-hoverd gl-icon-select" style="top:1px; left:-1px"></i>')}else{$(this).html('<i title="'+theme_language("edit_current")+'" aria-label="'+theme_language("edit_current")+'" class="fa fa-edit text-semi-dark text-dark-hoverd"> </i>');$(this).parent().parent().prepend('<i title="'+theme_language("select_deselect")+'" aria-label="'+theme_language("select_deselect")+'" class="fa fa-fw fa-lg fa-select text-dark text-dark-hoverd gl-icon-select"></i>')}})}if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"virtualmin-registrar/"){$.each($("td > input "),function(){if($(this).parents("table.table-hardcoded").find('form[action="edit.cgi"]').length){$(this).css("margin-left","5px");$(this).parent("td").prev("td").find("select").css("margin-left","5px")}})}if(v___location_path==v___location_prefix+"/virtual-server/list_scripts.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newscripts.cgi"){$('form[action="disable_scripts.cgi"] thead + thead tr th, form[action="disable_scripts.cgi"] tbody + thead tr th, form[action="script_form.cgi"] thead + thead tr th, form[action="script_form.cgi"] tbody + thead tr th').attr("colspan","5")}$.each($(".file_chooser_button_attached"),function(e,t){if($(this).prev('input[onclick*=".cgi"]')){$(this).prev('input[onclick*=".cgi"]').css("width","40px")}});if($t_uri_cloudmin&&(v___location_path==v___location_prefix+"/server-manager/add_form.cgi"||v___location_path==v___location_prefix+"/server-manager/scan_form.cgi")){$.each($("label"),function(){$(this).find("br").remove()})}if((v___location_path==v___location_prefix+"/mysql/view_table.cgi"||v___location_path==v___location_prefix+"/postgresql/view_table.cgi")&&$("td[data-td-e] > table.table-hardcoded")){var $tables=$(".container-fluid form .table.table-striped.table-hover.table-condensed");$tables.addClass("table-resizable").resizeableTableColumns(uri_parse_param("table",vars.source_request)||uri_parse_param("table",vars.source_request)||uri_parse_param("table",v___location_file+"?"+$(vars.previous_request.target).serialize()));if($tables.find(".ui_checked_checkbox").length){$tables.find("thead tr th:first-child").addClass("nonresizable")}var $___colspan=$(".container-fluid td[data-td-e] > table.table-hardcoded").parents("table").find("thead").find("tr").find("th").length;$(".container-fluid td[data-td-e] > table.table-hardcoded").parent("td[data-td-e]").attr("colspan",$___colspan).attr("style","padding: 1px !important;")}if(v___location_path==v___location_prefix+"/virtual-server/backup_form.cgi"&&v___location_href&&v___location_href.indexOf("?sched=")>-1){setTimeout(function(){var e=$("a[href=\"javascript:hidden_opener('hiddendiv_adddest', 'hiddenopener_adddest')\"]");e.next().attr("style","").addClass("btn btn-tiny btn-default margined-bottom-10");e.one("click",function(t){e.next("br").replaceWith('<div class="br-hidden">&nbsp;</div>');$(this).add(e).remove()})},10)}$.each($('form[action="save_global.cgi"], form[action="save_iptables.cgi"], form[action="save_domain.cgi"],form[action="domain_setup.cgi"],form[action="mass_create.cgi"],form[action="save_roundrobin.cgi"],form[action="save_alert.cgi"], body.time form[action="apply.cgi"]'),function(){$(this).find(".col_header").removeClass("col_header")});if(check_location_resource("/virtual-server/edit_newchangelog.cgi")||check_location_resource("/server-manager/edit_newchangelog.cgi")||check_location_resource("/shell/")||check_location_resource("/shell/index.cgi")||check_location_resource("/server-manager/shell.cgi")){$("td.col_value.col_value").removeClass("col_header")}if(check_location_resource("/ldap-server/edit_ldif.cgi")){$("span > input.ui_opt_textbox").unwrap()}if(v___location_path==v___location_prefix+"/server-manager/gvnc.cgi"){$("body.server-manager p > ").css("height","100%").parent("p").attr("style","display: block; height: "+parseInt($(window).outerHeight()/1.4)+"px")}if(v___location_path==v___location_prefix+"/spam/edit_simple.cgi"||v___location_path==v___location_prefix+"/spam/edit_header.cgi"){var target=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:first-child"),container=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:last-child"),link=container.find("a");target.append(link);container.remove();target.find("a").addClass("table_title_links pull-right btn btn-xs btn-link btn-link-bordered btn-transparent").attr("style","position: absolute; right: 23px; margin-top: 5px !important;")}if(v___location_path==v___location_prefix+"/server-manager/edit_pass.cgi"&&$('form[action="save_pass.cgi"]').find('a[href*="edit_pass.cgi?"]:not(.btn)').length){var target=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:first-child"),container=$(".ui_form .table-responsive table.table.table-striped.table-condensed.table-subtable > thead tr th:last-child"),link=container.find("a");target.append(link);container.remove();target.find("a").addClass("table_title_links pull-right btn btn-info btn-tiny").attr("style","position: absolute; right: 20px; margin-top: 3px !important;")}$('.panel-default + a[href="/virtual-server/"]').attr("href",v___location_prefix+"/virtual-server/index.cgi");$('.panel-default + a[href="/server-manager/"]').attr("href",v___location_prefix+"/server-manager/index.cgi");if(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"acl/"){$("body.acl > div > div > div.panel-body > form > div > table > tbody > tr > td > table > tbody > tr:nth-child(1) > td > table > tbody").attr("style","border: 0 !important");var $t__acl_title=$("br").next(".ui_grid_table.table-hardcoded").find("tbody").addClass("border-global-color").parent("table").prev("br").prev("b");$("br").next(".ui_grid_table.table-hardcoded").css("margin-bottom","3px");$.each($t__acl_title,function(e,t){if($(this).text()==""){$(this).next("br").remove();$(this).remove()}});$t__acl_title.attr("style","margin-bottom: -3px !important").next("br").remove()}if($('body[class*="bandwidth"]').length){$(".fa.fa-calendar.file_chooser_button_attached").attr("style","font-size: 11px; margin-top: 9px !important; pointer-events: none; margin-left: -27px !important;")}if(v___location_path==v___location_prefix+"/mysql/exec_form.cgi"||v___location_path==v___location_prefix+"/postgresql/exec_form.cgi"){$('select[name="old"], input[name="clear"], select[name="charset"]').removeClass("heighter-34").addClass("heighter-28");$('input[name="clear"]').attr("style","margin-bottom: 3px !important;");$('select[name="old"]').attr("style","margin-bottom: 3px !important; margin-right: 0 !important;")}if((v___location_file=="config.cgi"||v___location_file=="uconfig.cgi")&&(v___location_query=="mysql"||v___location_query=="postgresql")){$('input[name="style"]').parents("td.col_value").parent("tr").after('        <tr>            <td class="col_label"><b>'+theme_language("xsql_fit_content_screen_height")+'</b></td>            <td class="col_value">'+'<span class="awradio awobject">'+'<input class="iawobject" name="config_portable_module_xsql_fit_content_screen_height" id="config_portable_module_xsql_fit_content_screen_height_1" value="true"'+(config_portable_module_xsql_fit_content_screen_height?" checked":"")+' type="radio">'+'<label class="lawobject" for="config_portable_module_xsql_fit_content_screen_height_1">&nbsp;&nbsp;'+theme_language("global_yes")+"&nbsp;</label>"+'<input class="iawobject" name="config_portable_module_xsql_fit_content_screen_height" id="config_portable_module_xsql_fit_content_screen_height_0" value="false"'+(config_portable_module_xsql_fit_content_screen_height?"":" checked")+' type="radio">'+'<label class="lawobject margined-left-5" for="config_portable_module_xsql_fit_content_screen_height_0">&nbsp;&nbsp;'+theme_language("global_no")+"&nbsp;</label>"+"</span>        </td>        </tr>    ")}}if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")){var $del_mail_obj3=$('.container-fluid form[action="reply_mail.cgi"]'),$print_mail_btn=$del_mail_obj3.find('[name="print"]');$print_mail_btn.removeAttr("onclick");$print_mail_btn.on("click",function(e){e.preventDefault();e.stopPropagation();var t=$del_mail_obj3.find(".table-responsive").first(),i=t.find(".sub_table_container"),a=t.next(".table-responsive").find(".clear-formatting");var n=i.parent().html()||String(),r=a.parent().html()||String();if(n){n=n.replace(/�/g,"")}if(r){r=r.replace(/�/g,"")}progress.start();$("body").append('<div class="printer-container">'+n+"<br><br><hr><br><br>"+r+"</div>");$($(".printer-container:last").printThis()).promise().done(function(){setTimeout(function(){progress.end()},600);$(".printer-container").remove()})})}if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){if(!$is_history_action){var status_id="#system-status",$status_panel_content=$(""+status_id+" .panel-body");!$status_panel_content.text().trim()&&$status_panel_content.parent(status_id).remove();$("td img, #status_services-status-1-collapse .tr_tag [data-td-e] > img").each(function(e,t){var i=t.src;if(i){var a=i.match(/images\/(.*)\./),n=a&&a[0]&&a[1]?a[1]:String(),r="fa fa-fw fa-1_15x fa-check text-success";if(n==="down"){r="fa fa-fw fa-1_15x fa-times-circle text-danger"}else if(n==="timed"){r="fa fa-fw fa-clock text-warning fa-1_15x"}else if(n==="webmin"){r="fa fa-fw fa-webmin fa-1_15x text-warning"}else if(n==="skip"){r="fa2 fa-fw fa2-minus fa-1_15x text-semi-dark vertical-align-middle"}else if(n==="not"){r="fa2 fa-fw fa2-not-interested fa-1_15x text-semi-dark"}else if(n==="quest"){r="fa fa-fw fa-question-circle fa-1_15x text-semi-dark"}if(n){$(t).replaceWith('<i title="'+theme_language("status_module_mon_"+n+"")+'" class="'+r+' margined-left-3"></i>')}}});$.each($(".piechart"),function(){if(isNaN($(this).data("percent"))){$(this).parents(".text-center").remove()}}).promise().done(function(){var e=$("span[data-charts]"),t='div[class^="col-md-"]',i=e.parents(".row").find(t).length,a=12/i,n=i===2?"3":i==="1"?"6":"",a=n?n:a;$.each(e.parents(".row"),function(e,n){$(this).find(t).removeClass().addClass("col-md-"+(i===2?6:a)+" col-md-"+a*1.5+" col-xs-"+a*1.5+" col-xs-"+a*2+" text-center xx");if(i===3){var r="col-xs-";$(this).find(t).last().removeClass(r+"6"+" "+(r+"8")).addClass(r+"12")}})});try{theme_panels_sort("dashboard")}catch(e){}$('span[data-entry="nf_seen"]').parent("button").on("click",function(e){e.preventDefault();var t=$(this),i=$('form[action*="seen_newfeatures.cgi"]');$.ajax({type:"GET",url:i.attr("action"),data:false,statusCode:{200:function(){t.parents(".panel.panel-default").remove()}}})});plugins.dashboard.update.formsURLs();var aria_label_attr="aria-label";$.each($(".__page [data-title]:not(["+aria_label_attr+"]), .__page [title]:not(["+aria_label_attr+"])"),function(e,t){$(this).attr(aria_label_attr,$(t).attr("data-title")||$(t).attr("title"))})}snippets.datetime.tictac(1);setTimeout(theme_title_generate);$("#live_stats-collapse").on("shown.bs.collapse",function(){if(stats&&stats.general){var e=[];Object.keys(stats.general).forEach(function(t){if(t.startsWith("chart_")){e.push(t)}});e.forEach(function(e){var t=stats.general[e];if(typeof t.resizeListener==="function"){t.resizeListener()}})}})}if(!$is_history_action){if(v___location_path==v___location_prefix+"/virtual-server/edit_phpmode.cgi"){$("#hiddendiv_phpinfo table tbody tr").css("border","1px solid #"+(v___theme_night_mode_enabled?"393b3f":"eee")+"")}var $showpass_target=$('a[href*="showpass.cgi?"][onclick]'),show_pass_key='<i class="fa2 fa2-account-key"></i>';$.each($showpass_target,function(){$(this).html(show_pass_key);$(this).next(".awobject").addClass("margined-left-4");var e=$(this).parent().parent(".awobject");if(e.length){e.after($(this).detach())}});$showpass_target.addClass("badge badge-transparent badge-circle");if(v___location_path==v___location_prefix+"/webmin/edit_startpage.cgi"){$('select[name="deftab"]').parents("td.col_value").parent("tr").hide();$('select[name="gotomodule"] option').each(function(){($(this).val()=="virtual-server"||$(this).val()=="server-manager")&&$(this).remove()})}if(v___location_path==v___location_prefix+"/webmin/edit_ui.cgi"||v___location_path==v___location_prefix+"/usermin/edit_ui.cgi"){$('select[name*="sysinfo"], select[name*="dateformat"], input[name*="showlogin"], input[name*="showhost"], input[name*="sizefile_def"], input[name*="sizeuser_def"], input[name*="sizemodule_def"], input[name*="sizeusers_def"], input[name*="sizemodules_w"], input[name*="cs_link_def"], input[name*="cs_header_def"], input[name*="cs_table_def"], input[name*="cs_text_def"], input[name*="cs_page_def"], input[name*="width_def"], input[name*="height_def"], input[name*="sizedate_def"], input[name*="texttitles"]').parents("td.col_value").parent("tr").addClass("hidden");$(".sub_table_container tr td.no-border").parent("tr").addClass("hidden");var $container_ui_interface=$(".container-fluid .panel-body");$container_ui_interface.contents().filter(function(){return this.nodeType==3}).remove();$container_ui_interface.find("p").first().remove()}if(check_location_resource("/config.cgi?virtual-server")||check_location_resource("/config.cgi?server-manager")){$('input[name="theme_image"], input[name="theme_link"], input[name="theme_alt"]').parents("td.col_value").parent("tr").hide();$('input[name="show_sysinfo"]:checked').length===0&&$('input[name="show_sysinfo"][value="1"]').attr("checked","checked")}if(v___location_path==v___location_prefix+"/virtual-server/edit_resel.cgi"){$('input[name="logo"][id="logo"], input[name="link"]').parents("td.col_value").parent("tr").hide()}if(v___location_path==v___location_prefix+"/virtual-server/edit_newfeatures.cgi"){$('.container-fluid tr td:last-child label:contains("|")').replaceText(/\|/gi,"");var $targets_features_and_plugins_links=$(".container-fluid td a.ui_link");$targets_features_and_plugins_links.addClass("ui_link_replaced btn btn-transparent btn-link-bordered f__lnk_t_btn-el margined-left--2 btn-xxs").removeClass("heighter-34").removeClass("ui_link btn-inverse btn-tiny").prepend('<i class="fa fa-fw fa-eye hidden" style="vertical-align: baseline !important">&nbsp;&nbsp;</i>');$.each($targets_features_and_plugins_links,function(){var e=$(this).parent();if(e.is(".ui_links_row")){if(e.parent().is("label")){e.parent().contents().unwrap()}e.contents().unwrap()}$(this).parents("td.cursor-pointer").attr("data-td-e",1)})}if($("#headln2l .btn .fa-arrow-left").length){if($("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1){}else{$("#headln2l .btn .fa-arrow-left").parent("a").attr("href",$("#headln2l .btn .fa-arrow-left").parent("a").attr("href").replace("index.cgi",""))}var v___URI=URI(v___location);v___location_file=v___URI.filename()}$("#headln2r, #headln2l").prepend('<div class="btn-group-vertical-small"><div class="btn-group">').append("</div></div>");$("#headln2r a").detach().appendTo("#headln2r .btn-group");$("#headln2l a").detach().appendTo("#headln2l .btn-group");if(!$.support.spa&&!$("body").hasClass("file-manager")){$("#headln2l .btn-group").prepend('<a href="'+v___location_prefix+'/" data-container="body" class="btn btn-link text-lighter pd-lf-10 pd-rt-10" data-placement="auto top" data-toggle="tooltip" data-title="'+theme_language("return_home")+'"><i class="fa fa-home fa-md"></i></a>')}if(!$.support.spa&&!$("body").hasClass("file-manager")){session.server.data("data-slider-fixed",0)}if(core.curModule("virtual-server","list_records.cgi")){$.each($('form[action="delete_records.cgi"] table td > label > [data-type][data-text]'),function(){$(this).replaceWith('<i data-cloud="'+$(this).data("type")+'"'+' data-toggle="tooltip"'+' data-title="'+$(this).data("text")+'" class="fa2 fa2-cloud'+($(this).data("type")!=="proxied"?"-off":"")+'"></i>')})}$.each($(".ui_form_end_submit"),function(){if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/kill_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/renice_proc.cgi"||v___location_file=="edit_dbase.cgi"||v___location_file=="edit_pam.cgi"||v___location_file=="list_records.cgi"||core.curModule("mailbox")||core.curModuleFile("virtual-server","edit_script.cgi")||core.curModule("mailboxes")){return}var e=$(this).parent().find(".ui_form_end_submit");if(!e.parents(".btn-group").length&&e.length>1){$(this).parent().find(".ui_form_end_submit, .ui_form_end_submit + input").wrapAll('<div class="btn-group end_submits"></div>')}}).promise().done(function(){$.each($(".end_submits"),function(){if($(this).prev(".heighter-28").length||$(this).prev("input, select").css("height")=="28px"){$(this).find(".ui_form_end_submit").addClass("heighter-28")}var e=$('select[name*="parentuser"]').first();if(core.curModule("virtual-server")&&e.length===1){var t=e.addClass("heighter-34 pull-left").attr("style","margin-top: -1px !important; margin-right: -1px;").detach(),i=$('button[name="add1"] + input');i.after(t)}})});$.each($(".btn-group").find("span"),function(){$(this).not("[class]").length&&!$.trim($(this).text()).length&&$(this).remove()});if($(".panel-default").nextAll("a.btn.btn-primary").length===2){$(".panel-default").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-o-left")}if($(".panel-default").nextAll("a.btn.btn-primary").length===3){$(".panel-default").next("a.btn.btn-primary").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-left");$(".panel-default").next("a.btn.btn-primary").find(".fa.fa-arrow-left").removeClass("fa-arrow-left").addClass("fa-arrow-circle-o-left")}if(v___location_path==v___location_prefix+"/init/reboot.cgi"){$("input.btn-success").removeClass("btn-success").addClass("btn-warning")}if(v___location_path==v___location_prefix+"/init/shutdown.cgi"){$("input.btn-success").removeClass("btn-success").addClass("btn-danger")}if(!$.support.spa){page_display()}$("table tr.thead td").addClass("tdhead");var dynamic_switch_off_on=$(".fa-toggle-switch-off").parent("button.btn-default");if(dynamic_switch_off_on.length===1){var dynamic_switch__val=dynamic_switch_off_on.parent("td").find('input[type="radio"]:checked').val();if(dynamic_switch__val=="1"){dynamic_switch_off_on.find(".fa-toggle-switch-off").addClass("fa-toggle-switch").removeClass("fa-toggle-switch-off")}}var my_editor_page=$('form[action*="manual"] > select[name="file"], form[action*="manual.cgi"] > select[name="manual"], form[action*="edit_"] > select[name="file"]');if(my_editor_page.length){my_editor_page.addClass("heighter-34");$('form[action*="manual"], form[action*="edit_"]').css("margin-bottom","4px")}if(core.curModule("firewalld")){$("select#zone").addClass("heighter-34");$('form[action="save_ifaces.cgi"] > .btn').addClass("btn-tiny f__lnk_t_btn-el")}$('body[class*="proftpd"] .table-hardcoded tr td > input + input.btn.btn-default').removeClass("heighter-28").addClass("heighter-34").prev("input").addClass("heighter-34");$('body[class*="proftpd"] form[action="find_ftpaccess.cgi"] > input:first-child').removeClass("heighter-34").addClass("heighter-28");if(v___location_file=="edit_simple.cgi"&&$('body[class*="spam"]').length){$("tr td").contents().filter(function(){return this.nodeType==3}).remove()}if(v___location_file=="edit_awl.cgi"&&$('body[class*="spam"]').length){$('input[name="user"]').next("input").addBack().addClass("heighter-34")}if(core.curModuleFile("usermin","list_sessions.cgi")){$('.container-fluid #user, .container-fluid input[type="button"]').addClass("heighter-34")}if(core.curModuleFile("htaccess-htpasswd","")||core.curModuleFile("htaccess-htpasswd","index.cgi")){$("#search, .chooser_button").addClass("heighter-34").css("margin-bottom","-1px");$("#search").css("margin-top","1px");$('form[action*="search.cgi"] .ui_form_end_submit').css("margin-top","2px").css("margin-right","-4px")}if(core.curModuleFile("mailboxes","")||core.curModuleFile("mailboxes","index.cgi")){$("#user").addClass("heighter-34 vertical-align-middle margined-bottom-1");$(".chooser_button").addClass("margined-top-2 margined-bottom-2")}if(core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")){$("#mfolder1, #mfolder2").addClass("heighter-34").css("margin-bottom","-1px").css("margin-top","-1px")}if(core.curModuleFile("quota","list_users.cgi")){$("#user, #user + input").addClass("heighter-34")}if(core.curModuleFile("quota","list_groups.cgi")){$("#group, #group + input").addClass("heighter-34")}if(core.curModuleFile("apache","htaccess.cgi")||core.curModuleFile("virtualmin-registrar","index.cgi")||core.curModuleFile("virtualmin-registrar","")){$(".ui_form_end_submit").addClass("heighter-28-force")}var attempt_make_all_elem=$('form:not([action="save_log.cgi"], [action="view_log.cgi"]) .table-responsive .table .sub_table_container .table tbody tr td > select,                               form:not([action="save_log.cgi"], [action="view_log.cgi"], [action="save_net.cgi"]) .table-responsive .table .sub_table_container .table tbody tr td > input,                               form:not([action="save_user.cgi"], [action="save_group.cgi"]) .table td.opener_container td.col_value table tbody tr td > select,                               form:not([action="save_user.cgi"], [action="save_group.cgi"]) .table td.opener_container td.col_value table tbody tr td > input,                               form[action="save_newglobal.cgi"] > table tbody tr td input,                               form[action="save_newfields.cgi"] > table tbody tr td input,                               form[action="save_newfields.cgi"] > table tbody tr td select,                               form[action="save_newshells.cgi"] > table tbody tr td select,                               form[action="save_newshells.cgi"] > table tbody tr td input,                               form[action="save_linkcats.cgi"] > table tbody tr td input,                               form[action="save_gen.cgi"] > table tbody tr td input                               ');$.each(attempt_make_all_elem,function(e,t){if($(this).parent().find("input[data-mmclick]").length||$(this).parent().find("button[data-mmclick]").length||$(this).parent().find('input[onclick*="window.open"]').length||$(this).parent().find('button[onclick*="window.open"]').length){return}if($(this).prev(".awobject").length){$(this).css("width","auto");return}if($(this).parent().find('input:not([type="checkbox"], [type="radio"]), select').length==1){$(this).css("width","100%").css("min-width","100%")}else if($(this).parent().find('input:not([type="checkbox"], [type="radio"]), select').length==2){$(this).parent().find("input, select").first().css("width","39%");$(this).parent().find("input, select").last().css("width","60%").css("float","right")}});var $edit_new_style_target=$('a[onclick^="window.open(\\"thumb_style.cgi?"]');if(core.curModuleFile("virtual-server","edit_newstyles.cgi")){$edit_new_style_target.html('<i class="fa fa-fw fa-external-link"></i>').addClass("btn btn-transparent btn-link-bordered btn-xxs margined-top--3")}else if(core.curModule("virtual-server")){$edit_new_style_target.html('<i class="fa fa-fw fa-external-link" style="margin-top: 7px;"></i>').addClass("btn btn-transparent btn-link-bordered heighter-28-force")}$edit_new_style_target.on("click",function(e){e.stopPropagation()});if(core.curModuleFile("virtual-server","edit_html.cgi")){$('.ui_form_end_submit:not([name="create"], [name="cancel"], [name="save"], [name="delete"])').addClass("heighter-28-force");var is_html_mode_edit_web_pages=v___location_query.indexOf("editok")!==-1||v___location_query.indexOf("createok")!==-1?true:false,is_text_mode_edit_web_pages=v___location_query.indexOf("textok")!==-1?true:false;if(is_html_mode_edit_web_pages&&$("#body").length){$("#editok").removeClass("btn-default").addClass("btn-grey");$("#body").css("display","none");$("hr + b").addClass("hidden");$("#body").after('<div class="display-inline-block text-center __tmp__spinner" style="margin-top: -35px;"><span class="cspinner" style="margin-top:18px; position: relative"><span class="cspinner-icon"></span></span></div>');editor_html_init(["body",2,true,"edit_web"])}else if(is_text_mode_edit_web_pages){$("#textok").removeClass("btn-default").addClass("btn-grey");editor_init_check()&&editor_init($(".container-fluid > .panel > .panel-body textarea"),false,false,"static",false,true,false,$is_history_action)}$(".ui_form_end_submit").click(function(){set_onbeforeunload_status(0,0)});$("input:file").change(function(){var e=$(this);setTimeout(function(){$('form[action*="upload_html.cgi"]').append(e)},500)})}var $magic_button_selector='        body button[onclick*="window.open"][onclick*="choose"][onclick*="chooser.cgi"]:not([onclick*="_chooser.cgi"]),        body input[onclick*="window.open"][onclick*="choose"][onclick*="chooser.cgi"]:not([onclick*="_chooser.cgi"]),                body button[onclick*="window.open"][onclick*="choose"][onclick*="cron_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="cron_chooser.cgi"],                body button[onclick*="window.open"][onclick*="choose"][onclick*="standard_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="standard_chooser.cgi"],                body button[onclick*="window.open"][onclick*="choose"][onclick*="third_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="third_chooser.cgi"],                body button[onclick*="window.open"][onclick*="choose"][onclick*="user_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="user_chooser.cgi"],                body button[onclick*="window.open"][onclick*="choose"][onclick*="group_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="group_chooser.cgi"],                body button[onclick*="window.open"][onclick*="choose"][onclick*="my_group_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="my_group_chooser.cgi"],                body button[onclick*="window.open"][onclick*="choose"][onclick*="interface_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="interface_chooser.cgi"],                body button[onclick*="window.open"][onclick*="choose"][onclick*="module_chooser.cgi"],        body input[onclick*="window.open"][onclick*="choose"][onclick*="module_chooser.cgi"]    ';if($($magic_button_selector).length){$($magic_button_selector).each(function(){$(this).attr("data-mmclick",$(this).attr("onclick")).removeAttr("onclick");plugins.chooser.target($(this),0)})}if(core.curModuleFile("virtualmin-nginx","")||core.curModuleFile("virtualmin-awstats","")||core.curModuleFile("fdisk","edit_disk.cgi")||core.curModuleFile("virtual-server","edit_newlinks.cgi")||core.curModuleFile("virtualmin-dav","list_shares.cgi")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"pam/"&&!v___location_file||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logviewer/"&&(!v___location_file||v___location_file==="index.cgi")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"syslog/"&&(!v___location_file||v___location_file==="index.cgi")||v___location_path==v___location_prefix+"/postfix/master.cgi"){var obj=$('.panel-body > .ui_link, .panel-body > .ui_link_replaced,                 body[data-uri*="virtualmin-awstats"] .panel-body > form > .ui_link_replaced,                 body[data-uri*="edit_disk.cgi"] .panel-body p > a.ui_link_replaced,                 body[data-uri*="edit_newlinks.cgi"] .panel-body > form > .ui_link_replaced,                 body[data-uri*="edit_newlinks.cgi"] .panel-body > .ui_emptymsg + p > .ui_link_replaced'),text=$.trim(obj.first().text()),href=obj.first().attr("href");if(typeof settings_hidden_force_table_header_links!="undefined"){if(href){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend('          <a href="'+($.support.spa?v___location_directory_trail_slashed:"")+href+'" class="'+vars.h.class.button.tableHeader+' pull-left" data-container="body" data-toggle="tooltip" data-title="'+text+'">          <i class="fa fa-plus"></i>          </a>          ');obj.next("br").remove();obj.remove()}}else{obj.addClass("btn btn-inverse btn-tiny ui_link_replaced");if(!obj.find(".fa").length){obj.prepend('<i class="fa fa-fw fa-plus-square-o"> </i> ')}}}if(v___theme_night_mode_enabled||v___theme_night_mode){if($(".opener_shown").length>0){var __tmp_ui_grinTable=$(".opener_container, .opener_container:hidden").find(".ui_grid_table, .ui_grid_table:hidden");if(__tmp_ui_grinTable.length){$.each(__tmp_ui_grinTable,function(e,t){$(this).parent("td").attr("style","padding: 0 !important")})}}if($(".opener_table_style_small").length>0){var __tmp_ui_hardTable=$(".opener_table_style_small, .opener_table_style_small:hidden").find(".sub_table_container.table-hardcoded, .sub_table_container.table-hardcoded:hidden");if(__tmp_ui_hardTable.length){$.each(__tmp_ui_hardTable,function(e,t){$(this).parent("td").attr("style","padding: 0 !important");$(this).find("tbody tr td").attr("style","padding-left: 3px !important; padding-right: 3px !important")})}}}$('html[data-script-name*="webmin/edit_assignment.cgi"] table table tbody tr td, html[data-script-name*="usermin/edit_assignment.cgi"] table table tbody tr td').hover(function(){if($(this).is("td:nth-child(1)")||$(this).is("td:nth-child(3)")){$(this).addClass("hl-ow").next("td").addClass("hl-ow")}else if($(this).is("td:nth-child(2)")||$(this).is("td:nth-child(4)")){$(this).addClass("hl-ow").prev("td").addClass("hl-ow")}},function(){$(this).removeClass("hl-ow").next("td").removeClass("hl-ow");$(this).removeClass("hl-ow").prev("td").removeClass("hl-ow")});if(core.curModuleFile("server-manager","edit_pass.cgi")&&!v___location_query.includes("force=1")||core.curModuleFileQuery("virtualmin-registrar","edit.cgi","registrar=")||core.curModuleFileQuery("htaccess-htpasswd","edit_user.cgi","new=")||core.curModuleFile("useradmin","edit_group.cgi")||core.curModuleFile("useradmin","edit_user.cgi")){setTimeout(function(){$("#headln2r .btn-group a").addClass("pull-left").attr("style","");$("#headln2r .btn-group").prepend('        <a class="'+vars.h.class.button.tableHeader+' pull-left generate-password-key-g" data-nref data-placement="auto top" data-toggle="tooltip" data-title="'+Convert.strUpInitial(theme_language("password_generator_new"))+'">            <i class="fa fa-1_25x fa-key-plus" style="width: 14px; margin-left: -3px;"></i>        </a>    ')},0)}if(v___user_level==0){}else{settings_side_slider_enabled=false;settings_side_slider_enabled=false;session.server.data("data-slider-fixed","0");$("#right-side-tabs, .right-side-tabs-toggler").addClass("hidden")}if(core.curModuleFile("bind8","edit_zonekey.cgi")){var $taxtarea_name_ds=$('textarea[name="ds"]');if($taxtarea_name_ds.val()&&!$taxtarea_name_ds.val().includes("\n")){g__text_breaker($taxtarea_name_ds,$("#headln2c").find("span[data-sub_title]").text())}}if(core.curModuleFile("virtual-server","transfer_form.cgi")){$('input[name="newttl"]').addClass("heighter-34")}if(core.curModule("passwd")){$('.container-fluid .panel-body input[name="user"]').addClass("heighter-34")}$.each($(".gl-icon-container"),function(e,t){if(!$(this).find("a:first").find("i.fa-edit").length){$(this).find("a:first").prepend('<i aria-label="'+theme_language("select_deselect")+'" class="fa fa-fw fa-lg fa-select text-dark text-dark-hoverd gl-icon-select"></i>');$(this).find("a:first").prepend('<i aria-label="'+theme_language("edit_current")+'" class="fa fa-fw fa-edit text-semi-dark text-dark-hoverd gl-icon-edit"></i>')}});if(v___location_path==v___location_prefix+"/proc/index_search.cgi"){$(".col_header").removeClass("col_header")}var $file_upload_inputs=$('input[type="file"]:not([name="upfiles"])');if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){init_dnd_uploads()}else{$file_upload_inputs.bootstrapFileInput()}}else{reset_dnd_uploads();init_dnd_uploads()}function reset_dnd_uploads(){if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){var e=$('form.ui_form[action*="upload.cgi"]'),t=e.find(".ui_submit.ui_form_end_submit"),i=e.find(".file-input-wrapper");theme_restore_buttons_class();$.fn.bootstrapFileInputReset(e);despinnerfy_buttons(0,t);i.find("span").remove();i.contents().unwrap()}}function init_dnd_uploads(){if(core.curModule("updown")||core.curModuleFile("updown","index.cgi")){var e=$('input[type="file"]:not([name="upfiles"])'),t='form.ui_form[action*="upload.cgi"]',i=$(""+t+" .ui_submit.ui_form_end_submit"),a='name="upload0"';$(""+t+' input[name^="upload"]:not(['+a+"])").remove();e.bootstrapFileInput(["dnd dnd_updown",i]);i.addClass("disabled");plugins.upload($("#att_upload .ui_form"));init_dnd_form($(t))}}function init_dnd_form(e){e.on("drag dragstart dragend dragover dragenter dragleave drop",function(e){e.preventDefault();e.stopPropagation()}).on("drop",function(e){droppedFiles=e.originalEvent.dataTransfer.files;$(this).trigger("input").find('input[type="file"]').prop("files",droppedFiles).trigger("change.fiw")});e.find(".file-input-wrapper").on("dragover dragenter",function(){$(this).addClass("pulse")}).on("dragleave dragend drop",function(){$(this).removeClass("pulse")})}if(core.curModuleFile("virtual-server","index.cgi")||core.curModuleFile("virtual-server","")){var ui_checked_columns="ui_checked_columns",class_sel="."+ui_checked_columns+"",$checked_columns=v___page_container.find(class_sel),extra_selector=$checked_columns.length?class_sel:'a[href*="edit_domain.cgi"]';var cllv=0;$('a[href*="list_users.cgi"], a[href*="list_aliases.cgi"], '+extra_selector+"").on("click",function(e){if(!$(e.target).is('input[type="checkbox"]')&&!$(e.target).is(".lawobject")&&!$(e.target).is(".ui_checked_checkbox")){var t=$(this);if(t.is(class_sel)){t=$(this).find("a").first()}if(!cllv&&(t&&t.length)){cllv++;t.off("click");plugins.navigation.intersect.virtualmin(t)}}})}if(core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager","")||vars.requested_page&&vars.requested_page.includes("/server-manager/index.cgi")){var cllc=0;$('a[href*="mass_update_form.cgi"], .ui_checked_columns').on("click",function(e){if(!$(e.target).is('input[type="checkbox"]')){if(!$(e.target).is('input[type="checkbox"]')&&!$(e.target).is(".lawobject")&&!$(e.target).is(".ui_checked_checkbox")){var t=$(this);t=$(this).find("a").first()}if(!cllc&&(t&&t.length)){cllc++;t.off("click");plugins.navigation.intersect.cloudmin(t)}}})}var codemirror_target_cnt=".container-fluid > .panel > .panel-body";editor_init_check()&&editor_init($(codemirror_target_cnt+" textarea"),false,false,"static",false,true,false,$is_history_action);if(core.curModule("cshrc")||core.curModule("plan")||core.curModuleFile("virtual-server","mass_aedit_form.cgi")){var cshrc1=$(""+codemirror_target_cnt+" form:eq(0) > textarea:visible"),cshrc2=$(""+codemirror_target_cnt+" form:eq(1) > textarea:visible");$is_history_action&&page_refresh(1);if(cshrc2.length){editor_init(cshrc1,false,false,"static1",true,false,false,$is_history_action,.36);editor_init(cshrc2,false,false,"static2",true,false,false,$is_history_action,.36)}else{editor_init(cshrc1,false,false,"static1",true,false,false,$is_history_action,.51)}}viewer_init_check()&&viewer_init();if(settings_sysinfo_easypie_charts&&v___location_path==v___location_prefix+"/sysinfo.cgi"){var isNR=v___theme_night_mode_enabled||v___theme_night_mode?1:0;$("body").find("#system-status").find(".piechart").easyPieChart({barColor:function(e){return e<50?isNR?"#269373":"#5cb85c":e<85?isNR?"#c38d40":"#f0ad4e":"#cb3935"},trackColor:isNR?"#3b424b":"#f8f8f8",scaleColor:isNR?"#3b424b":"#dfe0e0",size:parseInt(settings_sysinfo_easypie_charts_size),scaleLength:parseInt(settings_sysinfo_easypie_charts_scale),trackWidth:parseInt(settings_sysinfo_easypie_charts_width),lineWidth:0,lineCap:"square",onStep:function(e,t,i){$(this.el).find(".percent").text(Math.round(i))}});if(v___user_level!=0&&v___user_level!=3){fetch(v___location_prefix+"/index.cgi/?xhr-info=1")}}if((v___location_path.indexOf(".cgi")===-1||v___location_path.indexOf("link.cgi")!==-1||v___location_path==v___location_prefix+"/proc/open_files.cgi"||v___location_path==v___location_prefix+"/webmin/edit_webmincron.cgi"||v___location_path==v___location_prefix+"/postfix/mailq.cgi"||v___location_path==v___location_prefix+"/webmin_search.cgi"||v___location_path==v___location_prefix+"/useradmin/index.cgi"||v___location_path==v___location_prefix+"/quota/list_users.cgi"||v___location_path==v___location_prefix+"/quota/list_groups.cgi"||v___location_path==v___location_prefix+"/init/index.cgi")&&(v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"webmin/"&&v___location_prefix.indexOf("servers/link.cgi")===-1||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"proc/"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"webmin_search.cgi"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"postfix/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"virtual-server/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"init/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"xinetd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mount/"||core.curModule("custom")||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"quota/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"php-pear/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fsdump/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"inittab/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"logrotate/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"mailcap/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cron/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"software/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"useradmin/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"apache/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"webalizer/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"cpan/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"htaccess-htpasswd/"||v___location_directory_unslashed_trail_slashed==v___location_prefix_unslashed_trail_slashed+"fdisk/")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","")||core.curModuleFile("mailboxes","index.cgi")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("mysql","list_vars.cgi")||core.curModuleFile("postgresql","index.cgi")||core.curModuleFile("custom","index.cgi")||core.curModuleFile("cron","index.cgi")||core.curModuleFile("logviewer","")||core.curModuleFile("logviewer","index.cgi")||core.curModuleFile("syslog","")||core.curModuleFile("syslog","index.cgi")||core.curModuleFile("cluster-cron","")||core.curModuleFile("cluster-cron","index.cgi")||core.curModuleFile("cluster-copy","")||core.curModuleFile("cluster-copy","index.cgi")||core.curModuleFile("virtual-server","postgrey.cgi")||core.curModuleFile("virtual-server","list_balancers.cgi")||core.curModuleFile("virtualmin-dav","list_shares.cgi")||core.curModuleFile("virtual-server","list_aliases.cgi")||core.curModuleFile("ruby-gems","index.cgi")||core.curModuleFile("postfix","master.cgi")||core.curModuleFile("postfix","virtual.cgi")||core.curModuleFile("postfix","sni.cgi")||core.curModuleFile("postfix","aliases.cgi")||core.curModuleFile("fail2ban","list_filters.cgi")||core.curModuleFile("fail2ban","list_actions.cgi")||core.curModuleFile("fail2ban","list_jails.cgi")||core.curModuleFile("virtual-server","list_databases.cgi")||core.curModuleFile("virtual-server","connectivity.cgi")||core.curModuleFile("virtual-server","list_buckets.cgi")||core.curModuleFile("virtual-server","list_clouds.cgi")||core.curModuleFile("fdisk","edit_disk.cgi")||core.curModuleFile("virtualmin-git","")||core.curModuleFile("virtualmin-git","index.cgi")||core.curModuleFile("virtualmin-svn","")||core.curModuleFile("virtualmin-svn","index.cgi")||core.curModuleFile("help","search.cgi")||core.curModuleFile("server-manager","edit_domains.cgi")||core.curModuleFile("net","list_ifcs.cgi")||core.curModuleFile("net","list_hosts.cgi")||core.curModuleFile("bind8","edit_recs.cgi")||core.curModuleFile("bind8","index.cgi")||core.curModuleFile("bind8","")||core.curModuleFile("virtual-server","edit_newresels.cgi")||core.curModuleFile("cpan","index.cgi")||core.curModuleFile("virtual-server","list_records.cgi")||core.curModule("firewall")||core.curModule("firewall6")||core.curModule("ruby-gems")||v___location_path==v___location_prefix+"/at/"||v___location_path==v___location_prefix+"/at/index.cgi"||v___location_path==v___location_prefix+"/useradmin/list_logins.cgi"||v___location_path==v___location_prefix+"/man/search.cgi"||v___location_path==v___location_prefix+"/proc/index_tree.cgi"||v___location_path==v___location_prefix+"/proc/index_user.cgi"||v___location_path==v___location_prefix+"/proc/index_size.cgi"||v___location_path==v___location_prefix+"/proc/index_cpu.cgi"||v___location_path==v___location_prefix+"/proc/index_search.cgi"||v___location_path==v___location_prefix+"/software/search.cgi"||v___location_path==v___location_prefix+"/software/file_info.cgi"||v___location_path==v___location_prefix+"/software/list_pack.cgi"||v___location_path==v___location_prefix+"/cluster-software/list_pack.cgi"||v___location_path==v___location_prefix+"/virtual-server/index.cgi"||v___location_path==v___location_prefix+"/virtual-server/list_users.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newplan.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newfeatures.cgi"||v___location_path==v___location_prefix+"/virtual-server/edit_newtmpl.cgi"||v___location_path==v___location_prefix+"/virtual-server/backuplog.cgi"||v___location_path==v___location_prefix+"/package-updates/"||v___location_path==v___location_prefix+"/package-updates/index.cgi"||v___location_path==v___location_prefix+"/package-updates/update.cgi"||v___location_path==v___location_prefix+"/security-updates/index.cgi"||v___location_path==v___location_prefix+"/virtual-server/usage.cgi"||v___location_path==v___location_prefix+"/virtual-server/search.cgi"||v___location_path==v___location_prefix+"/filter/"){var $page_table_table=$(".__page table.table");$page_table_table.each(function(){table_data_init($(this))}).promise().done(function(){if($page_table_table.length){page.render.content.filter.init()}})}var $cont_fl_tbl_sortable=$(".container-fluid table.dtable-sortable");$cont_fl_tbl_sortable.each(function(){table_data_init($(this))}).promise().done(function(){if($cont_fl_tbl_sortable.length){page.render.content.filter.init()}});$(".select_all").on("click",function(){var e=$(this).parents("form");if(e.find('.icons-row div[class*="icons-container"]').length){$.each(e.find(".icons-row .hidden-forged-6"),function(){$(this).parents('div[class*="icons-container"]').addClass("highlighted").find(".fa-select").removeClass("fa-select").addClass("fa-selected")})}});$(".select_invert").on("click",function(){var e=$(this).parents("form");$.each(e.find(".icons-row .hidden-forged-6"),function(){var e=$(this).parents('div[class*="icons-container"]');if($(this).find("input").is(":checked")){e.addClass("highlighted").find(".fa-select, .fa-selected").removeClass("fa-select").addClass("fa-selected")}else{e.removeClass("highlighted").find(".fa-select, .fa-selected").removeClass("fa-selected").addClass("fa-select")}})});$('.icons-row div[class*="icons-container"]').on("mouseover",function(e){$(this).find(".hidden-forged-7").removeClass("hidden-forged")}).on("mouseout",function(e){$(this).find(".hidden-forged-7").addClass("hidden-forged")});if(v___location.search!="?dashboard"&&plugins.navigation.switch.dashboard.get()==true){if(v___location_file=="sysinfo.cgi"){plugins.navigation.switch.set("dashboard");plugins.navigation.reset()}else if(!v___initial_load){if($("#open_webmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_webmin"){plugins.navigation.switch.set("webmin")}else{if($("#open_virtualmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_virtualmin"){plugins.navigation.switch.set("virtualmin")}else{if($("#open_cloudmin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_cloudmin"){plugins.navigation.switch.set("cloudmin")}else{if($("#open_usermin").length>0&&$(".switch-toggle input:checked").attr("id")!="open_usermin"){plugins.navigation.switch.set("usermin")}}}}}}$('form[action="bootup.cgi"]').on("submit",function(e){if($("#starting").length>0){$("#starting").remove();$(this).append('<input type="hidden" id="starting" name="starting" value="'+$('input[name="boot"]:checked').val()+'">')}else{if($("#table").length>0){$(this).append('<input type="hidden" id="table" name="table" value="'+$('input[name="boot"]:checked').val()+'">')}else{if($('input[name="boot"][type="hidden"]').length>0){$('input[name="boot"][type="hidden"]').remove();$(this).append('<input type="hidden" name="boot" value="'+$('input[name="boot"]:checked').val()+'">')}}}});$('input[name="config_portable_module_xsql_fit_content_screen_height"]').on("change",function(){var e=$(this).attr("name"),t=$(this).val()=="true"?true:false;window[e]=t;theme.config.save()});if($.support.spa&&v___location_file==="mconfig.cgi"&&uri_parse_param("module")===v___module_file_manager){var file_manager_config_form_func=function(){return $('.container-fluid form[action*="mconfig_save.cgi"]')},file_manager_config_save_btn_func=function(){return file_manager_config_form_func().find('[name="save"].ui_form_end_submit')},$file_manager_config_form=file_manager_config_form_func();$file_manager_config_form.keydown(function(e){if(e.keyCode===13){e.preventDefault();e.stopImmediatePropagation();file_manager_config_save_btn_func().trigger("focus").trigger("click");return false}});$file_manager_config_form.on("submit",function(e){if(!e.originalEvent||e.originalEvent.submitter&&e.originalEvent.submitter.name!=="save_next"){e.preventDefault();e.stopImmediatePropagation()}var t=$file_manager_config_form.find('select[name="per_page"]');if(t.length){config_portable_module_filemanager_records_per_page=parseInt(t.val())}theme.config.apply($file_manager_config_form,1)});var $fm_size_checkbox=$file_manager_config_form.find('input[name="columns"][value="size"]');if($fm_size_checkbox.length&&!$fm_size_checkbox.is(":checked")){$fm_size_checkbox.prop("checked",true)}$fm_size_checkbox.parent().hide();var $fm_def_sort=$file_manager_config_form.find('select[name="config_portable_module_filemanager_default_sort"]');if($fm_def_sort.length){var $empty_options=$fm_def_sort.find('option[value="0"], option[value="-1"]'),$empty_option_1=$($empty_options[0]),$empty_option_2=$($empty_options[1]);$empty_option_1.after('<option data-label disabled="disabled">'+theme_language("filemanager_sorting_asc")+"</option>");$empty_option_2.text(theme_language("filemanager_sorting_desc")).attr("data-label","").prop("disabled","disabled").removeAttr("value")}var $fm_columns=$file_manager_config_form.find('input[name="columns"]:not([value="size"])');$fm_columns.on("input",function(){var e=this.value,t=this.checked;$fm_def_sort.find("option[value]").map(function(){if(this.value&&this.value.includes(e)){if(!t&&$(this).is(":selected")){$fm_def_sort.val(0)}return $(this).prop("disabled",!t)}})}).trigger("input");var $save_btn=$file_manager_config_form.find('[name="save"]'),get_file_manager_link=function(){return $('aside .navigation a[href*="'+v___module_file_manager+'"]').attr("href")};$save_btn.on("click",function(e){e.preventDefault();e.stopPropagation();vars.pjax.cache.set("disable");if($(this).hasClass("disabled")){return}var t=$(this),i=session.server.data("webprefix");t.attr("name","save_next");var a=$("<input>").attr({type:"hidden",name:"section_curr",value:$file_manager_config_form.find('[name="section"]').val()}).appendTo($file_manager_config_form);set_onbeforeunload_status(0);$file_manager_config_form.submit();despinnerfy_buttons();spinnerfy_buttons(t);progress.start();$.ajax({type:"POST",url:$file_manager_config_form.attr("action")+"?noredirect=1",data:$file_manager_config_form.serialize(),complete:function(){theme_open_new_inner_link(i+"/"+v___module_file_manager+"/index.cgi")}});setTimeout(function(){a.remove();t.attr("name","save")},1)});var deps={config_portable_module_filemanager_hide_tree_view:["config_portable_module_filemanager_tree_expand_search","config_portable_module_filemanager_tree_view_depth","config_portable_module_filemanager_tree_exclude_on_first_load"],config_portable_module_filemanager_hide_toolbar:["config_portable_module_filemanager_hovered_toolbar"]};for(const e in deps){theme.config._.funcs.dependent_radios(e,deps[e],false,$file_manager_config_form)}["selinux","acls"].forEach(function(e){var t=$file_manager_config_form.find('[name="columns"][value="'+e+'"]'),i="filemanager_mconfig_columns_"+e+"_disabled",a=window["theme_server_data_available_"+e+""];t.prop("disabled",!a);var n=t.parent();if(!a){if(t.is(":checked")){t.prop("checked",false)}n.attr("data-target-tooltip-callback",i);theme_inject_tooltip(i,false,false,false,false,false,true,"click",true,1)}});if(v___location_path===v___location_prefix+"/mconfig.cgi"){var $files_safe_mode_input_obj=$('.container-fluid input[name="config_portable_module_filemanager_files_safe_mode"]');if(!$is_history_action&&$files_safe_mode_input_obj.length){snippets.inject_extra_option("checkbox:after",$files_safe_mode_input_obj.closest(".awobject").last(),"config_portable_module_filemanager_files_mode_ask",theme_language("filemanager_files_mode_ask"),{style:{marginLeft:6,verticalAlign:"1%"},checked:config_portable_module_filemanager_files_mode_ask?true:false})}var $files_auto_per_page_mode_input_obj=$('.container-fluid select[name="per_page"]');if($files_auto_per_page_mode_input_obj.length){if(!$is_history_action){snippets.inject_extra_option("checkbox:after",$files_auto_per_page_mode_input_obj,"config_portable_module_filemanager_auto_per_page",theme_language("global_automatic"),{style:{marginLeft:8,verticalAlign:"1%"},checked:config_portable_module_filemanager_auto_per_page?true:false},function(){var e=$('input[name="config_portable_module_filemanager_auto_per_page"]');$('form[action="mconfig_save.cgi"]').on("change",e,function(){var t=e.get(0);$files_auto_per_page_mode_input_obj.toggleClass("disabled",t.value=="true"?true:false)}).trigger("change")})}}}}$('.ui_form_end_submit[onclick^="window.open"]').click(function(){var e=$(this);setTimeout(function(){e.removeClass("disabled");plugins.navigation.load.stop()},100)});if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){sysinfo_replace_dismiss_buttons();$("body").undelegate(".piechart canvas","mouseover mouseleave");$("body").on("mouseover",".piechart canvas",function(){var e=$(this).parent("span").attr("data-charts").split("_")[1];if((e=="cpu"||e=="mem"||e=="virt")&&!core.moduleAvailable("proc")){return}else if(e=="disk"&&!core.moduleAvailable("disk-usage")&&!core.moduleAvailable("quota")){return}$(this).addClass("cursor-alias")});$("body").undelegate("canvas","click");$("body").on("click","canvas",function(e){e.preventDefault();var t=$(this).parent("span").attr("data-charts").split("_")[1],i;if(t=="cpu"&&core.moduleAvailable("proc")){i=v___location_prefix+"/proc/index_cpu.cgi"}else if((t=="mem"||t=="virt")&&core.moduleAvailable("proc")){i=v___location_prefix+"/proc/index_size.cgi"}else if(t=="disk"&&core.moduleAvailable("disk-usage")){i=v___location_prefix+"/disk-usage"}else if(t=="disk"&&core.moduleAvailable("quota")){i=v___location_prefix+"/quota/list_users.cgi?dir=%2F"}if(i&&i.length){get_pjax_content(i)}});page_sysinfo_sensor_update_label();if(v___user_level=="0"){plugins.slider.data.fetch()}var chart_size_def_value=172;if(settings_sysinfo_easypie_charts_size!=chart_size_def_value){var diff=parseInt(settings_sysinfo_easypie_charts_size-chart_size_def_value),position_diff_label=diff*.9,position_diff_percent=diff*.2,font_diff_label=settings_sysinfo_easypie_charts_size<chart_size_def_value?settings_sysinfo_easypie_charts_size<chart_size_def_value-20?"8px":"8.5px":"9px",font_diff_percent=settings_sysinfo_easypie_charts_size<chart_size_def_value?settings_sysinfo_easypie_charts_size<chart_size_def_value-20?"1.6em":"1.7em":"1.8em",$piechart_label=$(".piechart .data-cnt .label"),piechart_label_right=parseInt($piechart_label.css("right")),piechart_label_bottom=parseInt($piechart_label.css("bottom")),$piechart_percent=$(".piechart .data-cnt .percent"),piechart_percent_top=parseInt($piechart_percent.css("top")),piechart_percent_left=parseInt($piechart_percent.css("left"));$piechart_label.css({bottom:parseInt(piechart_label_bottom-position_diff_label),right:parseInt(piechart_label_right-position_diff_label),fontSize:font_diff_label});$piechart_percent.css({top:parseInt(piechart_percent_top+position_diff_percent),left:parseInt(piechart_percent_left+position_diff_percent),fontSize:font_diff_percent})}var extended_sysinfo_str="extended_sysinfo";table_data_init($("#"+extended_sysinfo_str+"-1 #updates-virtual-server-1-collapse .table.table-condensed, #"+extended_sysinfo_str+"-1 #net_net_info-net-1-collapse .table.table-condensed, #"+extended_sysinfo_str+"-1 #mount_disks_info-mount-1-collapse .table.table-condensed, #"+extended_sysinfo_str+"-1 #acl_logins-acl-1-collapse .table.table-condensed"));vars.pjax.cache.set("disable");var dashboard_panels=function(){return $("#"+extended_sysinfo_str+"-1.panel-group").find(".panel")},data_referrer_str="data-referrer";dashboard_panels().find(".on-hover").on("click",function(e){e.preventDefault();e.stopPropagation();var t=$(this).parents("["+data_referrer_str+"]"),i=t.attr(data_referrer_str);if(i==="live_stats"){settings_sysinfo_real_time_stored=false;theme.config.save()}else{try{settings_sysinfo_hidden_panels_user=settings_sysinfo_hidden_panels_user.replace(/'/g,'"');settings_sysinfo_hidden_panels_user=JSON.parse(settings_sysinfo_hidden_panels_user)}catch(e){settings_sysinfo_hidden_panels_user={}}settings_sysinfo_hidden_panels_user[i]=$.trim(t.find(".panel-title a").text());settings_sysinfo_hidden_panels_user=JSON.stringify(settings_sysinfo_hidden_panels_user);theme.config.save()}t.remove();var a="#right-side-tabs .extended-list-data  > .panel-group#extended_sysinfo";if($(a).length){$(a).find("["+data_referrer_str+"="+i+"]").remove()}$(".tooltip").hide();var n=localStorage.getItem(v___server_hostname+"-"+"dashboard_panel_removed_explained"),r='data-panel-removed="messenger"';if(!n){plugins.messenger.post("<i "+r+' class="fa fa-lg fa-fw fa-exclamation-circle"></i>'+(theme_language("global_warning")+": "+theme_language("dashboard_panels_disabled_explain")),45,"warning","dashboard_panel_removed",1,["bottom","center"]);var o=$("["+r+"]").parent().prev(".messenger-close");o.one("click",function(e){localStorage.setItem(v___server_hostname+"-"+"dashboard_panel_removed_explained",1)})}});var panels_container_sel=".container-fluid #"+extended_sysinfo_str+"-1";sortable(panels_container_sel,{forcePlaceholderSize:true}).on("sortupdate",function(){settings_sysinfo_panels_order={};dashboard_panels().each(function(e,t){settings_sysinfo_panels_order[$(t).attr(data_referrer_str)]=String.fromCharCode(97+e).toUpperCase()}).promise().done(function(){settings_sysinfo_panels_order=JSON.stringify(settings_sysinfo_panels_order);theme.config.save();setTimeout(function(){try{theme_panels_sort("slider")}catch(e){}},100)})});plugins.dashboard.update.alertsHTML()}if($t_uri_virtualmin&&core.curModuleFileQuery("syslog","save_log.cgi","view=1")||$t_uri_virtualmin&&core.curModuleFileQuery("logviewer","view_log.cgi","view=1")){$('select[name="idx"] option').filter(function(){return this.text==$.trim($("span[data-sub_title] tt").text())}).attr("selected",true);$('select[name="idx"]').addClass("hidden")}if(core.curModuleFileQuery("logviewer","view_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","new=")){var target=".panel-body .fa-refresh-fi",current_refresh_timer=localStorage.getItem(v___server_hostname+"-"+"option_"+v___module+"_refresh"),current_icon_class_str=".fa-refresh-fi",refresh_timer_str=".refresh-timer-timeout",btn_str=""+target+", .panel-body "+refresh_timer_str+"",timeout_box='<span class="label label-transparent-35 label-sm margined-top-1 refresh-timer-timeout">'+(current_refresh_timer?current_refresh_timer:"0")+"&nbsp;</span>";$.each($(target+":not([data-processed])").parent("button"),function(e,t){$(this).addClass("btn-xxs btntimer").find("i").attr("data-processed",1);$(this).wrap('<div class="btn-group'+(e===1?" dropup":"")+'"></div>');$(this).after(""+'<button class="btn btn-warning dropdown-toggle" data-toggle="dropdown" data-original-title="" title="" aria-expanded="false">'+'<i class="fa fa-caret-down"></i>'+"</button>"+'<ul class="dropdown-menu dropdown-menu-right refresh-timer-select">'+'<li><a data-off data-timeout="0">'+theme_language("global_automatic_refresh")+": "+theme_language("global_off")+"</a></li>"+'<li class="divider"></li>'+'<li><a data-on data-timeout="2">2 '+theme_language("global_seconds")+"</a></li>"+'<li><a data-on data-timeout="5">5 '+theme_language("global_seconds")+"</a></li>"+'<li><a data-on data-timeout="15">15 '+theme_language("global_seconds")+"</a></li>"+'<li><a data-on data-timeout="30">30 '+theme_language("global_seconds")+"</a></li>"+'<li><a data-on data-timeout="60">60 '+theme_language("global_seconds")+"</a></li>"+'<li><a data-on data-timeout="120">2 '+theme_language("global_minutes")+"</a></li>"+'<li><a data-on data-timeout="300">5 '+theme_language("global_minutes")+"</a></li>"+"</ul>");if(current_refresh_timer&&current_refresh_timer!="0"){var i=$(btn_str);$(this).find("i").before(timeout_box);$(this).find("i").remove();var a=current_refresh_timer;typeof refreshTimer==="number"&&clearInterval(refreshTimer);refreshTimer=setInterval(function(){--a;$(refresh_timer_str).text(a);if(a<=0){$(i[0]).parent().trigger("click");clearInterval(refreshTimer)}},1e3)}}).promise().done(function(){$(".refresh-timer-select li").click(function(){typeof refreshTimer==="number"&&clearInterval(refreshTimer);var e='<i class="fa fa-fw fa-refresh-fi fa-1_25x refresh-timer-icon"></i>',t='<span class="label label-transparent-35 label-sm margined-top-1 refresh-timer-timeout">'+(current_refresh_timer?current_refresh_timer:"0")+"&nbsp;</span>";localStorage.setItem(v___server_hostname+"-"+"option_"+v___module+"_refresh",$(this).find("a").data("timeout"));current_refresh_timer=localStorage.getItem(v___server_hostname+"-"+"option_"+v___module+"_refresh");var i=$(btn_str),a=i.parent();if(current_refresh_timer&&current_refresh_timer!="0"){if(!a.find(refresh_timer_str).length){a.prepend(t)}a.find(refresh_timer_str).html(current_refresh_timer+"&nbsp;");$(current_icon_class_str).remove();var n=current_refresh_timer;refreshTimer=setInterval(function(){--n;$(refresh_timer_str).text(n);if(n<=0){var e=$(btn_str);$(e[0]).parent().trigger("click");clearInterval(refreshTimer)}},1e3)}else{$(refresh_timer_str).remove();!a.find(current_icon_class_str).length&&a.prepend(e)}})});$.each($('form[action*="save_log.cgi"] select[name="idx"], form[action*="view_log.cgi"] select[name="idx"]'),function(){$(this).on("change",function(){var e=$("button.ui_submit.ui_form_end_submit");$(this).next().next('[name="filter"]').val("");e.first().trigger("click");e.addClass("disabled")})})}if(core.curModuleFile("virtual-server","summary_domain.cgi")){$(".__page #headln2l .btn-group, .__page .page_footer_submit").remove();var $a_targ_dom_file=$("a[data-dom-file]"),a_targ_dom_file_path=Convert.quoteEscape($a_targ_dom_file.data("dom-file")),a_targ_dom_file_view_link="!view "+a_targ_dom_file_path+"/M=1/V=1/H=1",a_targ_dom_file_edit_link="!edit "+a_targ_dom_file_path;$a_targ_dom_file.data("view-link",a_targ_dom_file_view_link).data("edit-link",a_targ_dom_file_edit_link).attr("href",a_targ_dom_file_view_link)}if(settings_side_slider_enabled){if(core.curModule("package-updates")){plugins.slider.notifications.dismiss("package_message")}if(core.curModule("csf")){plugins.slider.notifications.dismiss("csf_remote_version");plugins.slider.notifications.dismiss("csf_title")}}vars.plugins.tooltip.delay.show=600;vars.plugins.tooltip.delay.hide=50;snippets.tooltips(true);if($.support.spa&&(window.matchMedia("(max-width: 1080px)").matches||$("html").attr("data-navigation-collapsed")=="1"&&!vars.navigation.pinned)){plugins.navigation.lock()}if($.support.spa&&(window.matchMedia("(max-width: 1365px)").matches||$("html").attr("data-navigation-collapsed")=="1"&&!vars.navigation.pinned)){plugins.slider.state()}if(!$is_history_action){}if($("body").hasClass("session_login")){setTimeout(function(){page_display()},200)}theme_to_new_tab();if(core.curModuleFile("acl","save_twofactor.cgi")){setTimeout(function(){var e=$("p > img"),t=e.attr("src");e.attr("src",t.replace(v___location_prefix+"/"+v___module+"/",""))},0)}if(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/edit_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/kill_proc.cgi"||v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"proc/renice_proc.cgi"){var proc_nice_level='form[action*="renice_proc.cgi"]',proc_nice_pid=$(proc_nice_level).next('input[name="pid"]'),proc_target=$('.col_value select[name="nice"]').parent("td"),proc_target_content=proc_target.html();$(proc_nice_level).append(proc_nice_pid.detach(),proc_target_content);proc_target.html($(proc_nice_level).detach());$('.proc form[action*="kill_proc.cgi"]').on("submit",function(){var e=quirks.active_element(),t=$(this).find("input").filter(function(){return this.name!="pid"&&this.name!="signal"&&this.name!=e.name});t.attr("disabled","disabled");setTimeout(function(){t},1);return true})}setTimeout(function(){v___blocked_navigation=0},10);var date_chooser_button=$(".date_chooser_button");if(date_chooser_button.length){$.each(date_chooser_button,function(){var e=$(this).parent('td:contains("/")');var t=e.find("select"),i=t.prev("input");$year=t.next("input"),cls="margined-left--10";t.addClass(cls);$year.addClass(cls).attr("size",3);i.attr("size",1)})}$.each($(".date_chooser_button"),function(){var e="input",t="select",i=$(e+'[name="'+$(this).data("year")+'"]'),a=$(t+'[name="'+$(this).data("month")+'"]'),n=$(e+'[name="'+$(this).data("day")+'"]'),r=$(a).find("option:eq(0)").val()==1?0:1;$(this).datepicker({format:" yyyy-m-d",language:session.server.data("language"),todayHighlight:true,autoclose:true}).on("changeDate",function(e){var t=(e.date.getFullYear()+"-"+(e.date.getMonth()+1)+"-"+e.date.getDate()).split("-");if(t){$(n).val(parseInt(t[2]));$(a).val(parseInt(t[1])-r);$(i).val(parseInt(t[0]))}}).on("show",function(e){var t=$(this),o=parseInt($(n).val()),l=$(a).val()?parseInt($(a).val())+r:false,s=$(i).val();if(o&&l&&s){t.datepicker("update",""+s+"-"+l+"-"+o+"")}else{}})});if(core.curModule("mailbox")){$.each($('[onclick*="document.forms"]'),function(){var e=$(this),t=e.attr("onclick"),i=$("aside form").length;e.attr("onclick",t.replace(/document\.forms\[0\]/g,"document.forms["+i+"]"));e.attr("onclick",t.replace(/document\.forms\[1\]/g,"document.forms["+(i+1)+"]"))});$("#print").on("click",function(e){e.preventDefault();e.stopPropagation()})}if(core.curModuleFile("forward","edit_alias.cgi")){$.each($('[onchange*="document.forms"]'),function(){var e=$(this),t=e.attr("onchange"),i=$("aside form").length;e.attr("onchange",t.replace("document.forms[0]","document.forms["+i+"]"))})}if(core.curModuleFile("schedule","edit.cgi")||core.curModule("mailbox")){$.each($('[onclick*="address_chooser"]'),function(e,t){$(this).attr("onclick",$(this).attr("onclick").replace(".forms[0]",".forms[1]"));$(this).next(".file_chooser_button_attached").removeClass("fa-files-o").addClass("fa-address-book-o")})}var add_clock_icon=function(e){e.removeClass("fa-files-o").addClass("fa-clock").css("font-size","12px").css("line-height","10px")};if(core.curModuleFile("virtual-server","backup_form.cgi")){add_clock_icon($('[name="enabled_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("virtual-server","edit_newquotas.cgi")||core.curModuleFile("virtual-server","edit_newvalidate.cgi")){add_clock_icon($('[name="sched_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("server-manager","edit_backup.cgi")||core.curModuleFile("server-manager","edit_vbackup.cgi")||core.curModuleFile("server-manager","edit_vsync.cgi")){add_clock_icon($('[name$="_complex"] + input + .file_chooser_button_attached'))}if(core.curModuleFile("server-manager","index.cgi")||core.curModuleFile("server-manager","")){$.each($('[onclick*="document.forms"]'),function(){var e=$(this),t=e.attr("onclick"),i=$("aside form").length,a=$(".container-fluid .panel-body > form").length-1;e.attr("onclick",t.replace(/document\.forms\[\d*\]/g,"document.forms["+(i+a)+"]"))})}var selectStr="select",mod_status_edit_mon_select='[action="edit_mon.cgi"] '+selectStr+'[name="type"]',select_for=$(""+selectStr+'.ui_select[name="module"], '+selectStr+'.ui_select[name="user"], '+selectStr+'.ui_select[name="nuser"],                    '+selectStr+'.ui_select[name="zone"],                    '+selectStr+'.ui_select[name="serv"],                    '+selectStr+'.ui_select[name="mod"],                     '+selectStr+".onchange_form_submit_triggger,                     "+mod_status_edit_mon_select+",                     "+selectStr+'[name="idx"], '+selectStr+'[name="file"]:first, '+selectStr+'[name="manual"]:first'),originalSelectAddedHiddenClass=""+selectStr+"2-hidden-accessible",select2Class=""+selectStr+"2",select2ContentTriggerClass=""+selectStr+"2-content",select2ContentContainerTriggerClass=select2ContentTriggerClass+"-"+"container",heighterStr="heighter",heighterType="34",v___page_hadEditor=0;if($is_history_action){$.each($(".container-fluid ."+originalSelectAddedHiddenClass+" + ."+select2Class+""),function(){v___page_hadEditor=1;$(this).prev("."+originalSelectAddedHiddenClass+"").removeClass(originalSelectAddedHiddenClass);$(this).remove()})}if(core.curModuleFile("webminlog","")||core.curModuleFile("webminlog","index.cgi")||core.curModuleFile("time","")||core.curModuleFile("time","index.cgi")||core.curModuleFile("firewalld","edit_serv.cgi")||core.curModuleFile("php-pear","")||core.curModuleFile("php-pear","index.cgi")||core.curModuleFile("mysql","")||core.curModuleFile("mysql","index.cgi")||core.curModuleFile("mysql","edit_dbase.cgi")||core.curModuleFile("fail2ban","edit_manual.cgi")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("postgresql","")||core.curModuleFile("postgresql","index.cgi")||core.curModuleFile("postgresql","edit_dbase.cgi")||core.curModuleFile("status","")||core.curModuleFile("status","index.cgi")||(core.curModuleFile("virtual-server","edit_tmpl.cgi")||v___location_path===v___location_prefix+"/config.cgi"||v___location_path===v___location_prefix+"/uconfig.cgi"||v___location_path===v___location_prefix+"/mconfig.cgi"||v___location_path===v___location_prefix+"/tconfig.cgi")||core.curModuleFileQuery("logviewer","view_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","view=1")||core.curModuleFileQuery("syslog","save_log.cgi","new=")||v___page_hasEditor||v___page_hadEditor){var force_small_select=false;if(select_for.hasClass(""+heighterStr+"-28")||select_for.outerHeight()<=28||force_small_select){heighterType="28"}if(!$(mod_status_edit_mon_select).length){editor_config_label(v___location_file==="edit_keys.cgi")}else{if($(mod_status_edit_mon_select).length){$(mod_status_edit_mon_select).each(function(){filter_out_objects_inner_chars($(this).prev(),":");$(this).prev().addClass("elm-rel-z")})}}select_for.select2({minimumResultsForSearch:6,containerCssClass:""+select2ContentTriggerClass+" "+heighterStr+"-"+heighterType+"",dropdownCssClass:""+select2ContentTriggerClass+" h"+heighterType+""});select_for.next("."+select2Class+"").addClass(select2ContentContainerTriggerClass);select_for.next("."+select2Class+"").next(".ui_form_end_submit").addClass(""+heighterStr+"-"+heighterType+"");select_for.on("select2:open",function(){$("body").find(".select2-container, "+v___class_select2_leak).removeClass("select2-aside");setTimeout(function(){var e=document.querySelector(".select2-search__field");e&&e.focus()})});select_for.on("select2:select",function(e){$(this).parents("form").trigger("input")});setTimeout(function(){bind_sameorigin(0)},100)}if(v___location_file==="install_mod.cgi"){var prev_req=vars.previous_request,$prev_req_file=$(prev_req.target).find('[name="file"]');if(prev_req.type==="submit"&&Test.strContains($(prev_req.target).attr("action"),v___location_file)&&$prev_req_file&&$prev_req_file.val()){if(Test.strContains($prev_req_file.val(),"csfwebmin")){$('.container-fluid a[href*="csf"]').on("click",function(e){e.preventDefault();$('aside a[href*="csf/index.cgi"]').trigger("click")});plugins.navigation.reload();$.ajax({type:"POST",url:v___location_prefix+"/index.cgi",success:function(e){},error:function(e){}})}}}if(!$is_history_action&&v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"settings-editor_read.cgi"){$('form[action*="settings-editor_write.cgi"] .btn-group.end_submits button.btn').on("click",function(){var custom_styles=$("[data-custom-style]"),custom_script=$("[data-custom-script]"),data=$('[name="data"]').val();if(Test.strContains($('[name="file"]').val(),"styles.css")){custom_styles.remove();$("head").append("<style data-custom-style>"+data+"</style>")}if(Test.strContains($('[name="file"]').val(),"scripts.js")){custom_script.remove();eval(data)}})}var $bottom_js_back=$('.btn-lg.page_footer_submit[href*="javascript:history.back"]'),$topBackButton=$("#headln2l a i.fa.fa-arrow-left").parent("a");if($bottom_js_back&&$bottom_js_back.length){$topBackButton.attr("title",theme_language("global_prev_page")).tooltip("fixTitle").attr("href","javascript:history.back()");$topBackButton.one("click",function(e){e.preventDefault();e.stopPropagation();$bottom_js_back[0].click()})}else if(v___module!==v___module_file_manager){$topBackButton.find("i").addClass("fa-return").parent("a").addClass("btn-squiare-headln2 text-lighter-slight")}if(core.curModule("backup-config")){var $fetch_form=$($('.container-fluid form[action*=".cgi"].ui_form')[0]);$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="dest_mode"]:checked').val()=="4"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}});var $submit=$fetch_form.find('.ui_submit[name="backup"]'),$mods=$fetch_form.find('select[name="mods"]');$mods.length&&!$mods.val().length&&$submit.addClass("disabled");$fetch_form.on("change",function(e){var t=$mods.val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}})}if(core.curModuleFile("webmin","edit_mods.cgi")||core.curModuleFile("usermin","edit_mods.cgi")){var $fetch_form=$($('.container-fluid form[action*=".cgi"].ui_form')[3]);$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="to"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_download_form($(this),"download_is_being_prepared")}});var $submit=$fetch_form.find('.ui_submit[name="ok"]');$submit.addClass("disabled");$fetch_form.on("change",function(e){var t=$fetch_form.find('select[name="mod"]').val()&&$fetch_form.find('select[name="mod"]').val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}})}if(core.curModuleFile("gnupg","edit_sign.cgi")||core.curModuleFile("gnupg","edit_decrypt.cgi")||core.curModuleFile("gnupg","edit_encrypt.cgi")){var $gnupg_forms=$('.container-fluid form[action="sign.cgi/signed.txt"].ui_form, '+'.container-fluid form[action="decrypt.cgi/output.txt"].ui_form,'+'.container-fluid form[action="encrypt.cgi/output.gpg"].ui_form');$gnupg_forms.attr("target","_blank")}if(core.curModuleFile("server-manager","transfer_form.cgi")){var $fetch_form=$('.container-fluid form[action*="download.cgi"].ui_form');$fetch_form.on("submit",function(e){if($fetch_form.find('input[name="dest"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_open_new_tab(v___location_prefix+"/server-manager/"+$(this).attr("action")+"?"+$(this).serialize());setTimeout(despinnerfy_buttons,300)}})}if((core.curModuleFile("mysql","backup_form.cgi")||core.curModuleFile("postgresql","backup_form.cgi"))&&v___location_query&&v___location_query.includes("db=")){var $backup_form=$('.container-fluid form[action*=".cgi"].ui_form');$backup_form.on("submit",function(e){if($backup_form.find('input[name="dest"]:checked').val()=="1"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}})}if(core.curModuleFile("mysql","csv_form.cgi")){var $backup_form=$('.container-fluid form[action*=".cgi"].ui_form');$backup_form.on("submit",function(e){if($backup_form.find('input[name="dest"]:checked').val()=="0"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}});var $submit=$backup_form.find('.ui_submit[name="ok"]');var $select_for_dbs_or_tables=$backup_form.find('select[name="cols"]');$backup_form.on("change",function(e){var t=$select_for_dbs_or_tables.val().length;if(t){$submit.removeClass("disabled")}else{$submit.addClass("disabled")}});$backup_form.trigger("change")}if(core.curModuleFile("virtual-server","backup_form.cgi")){var $vm_backup_form=$('form[action*="backup.cgi/backup"]'),$vm_backup_form_sched=$('form[action*="backup_sched.cgi"]');$vm_backup_form.on("submit",function(e){if($vm_backup_form.find('select[name^="dest0_"]').val()=="4"){e.preventDefault();e.stopPropagation();theme_download_form($(this))}});$vm_backup_form.find("a.select_all, a.select_invert").on("click",function(){$vm_backup_form.trigger("change")});$vm_backup_form.on("change",function(){var e=$('.ui_submit[name="now"]'),t=(!$vm_backup_form.find('[name="doms"]').length||($vm_backup_form.find('[name="all"]:checked').val()=="1"&&$vm_backup_form.find('[name="doms"] option').length>=1||$vm_backup_form.find('[name="all"]:checked').val()=="2"&&$vm_backup_form.find('[name="doms"]').val().length>=1&&$vm_backup_form.find('[name="doms"] option').length>1||$vm_backup_form.find('[name="all"]:checked').val()!="2"&&$vm_backup_form.find('[name="doms"]').val().length))&&(!$vm_backup_form.find('[name="plan"]').length||($vm_backup_form.find('[name="plan_def"]:checked').val()=="1"||$vm_backup_form.find('[name="plan"]').val().length))&&($vm_backup_form.find('[name="feature_all"]:checked').val()=="1"||$vm_backup_form.find('[name="feature"]:checked').length);if(t){e.removeClass("disabled","1")}else{e.addClass("disabled","1")}});$vm_backup_form.trigger("change");$vm_backup_form.find('select[name^="dest0_"]').on("change",function(){var e='input[name="fmt"]',t=$("form").find(""+e+'[value="0"]'),i=$("form").find(""+e+'[value="1"], '+e+'[value="2"]');if($(this).val()=="4"||$(this).val()=="44"){i.prop("disabled",true);t.prop("checked",true).trigger("change");t.closest("tr").toggleClass("hidden",true)}else{i.prop("disabled",false);t.closest("tr").toggleClass("hidden",false)}});var $vm_backup_form_target=$vm_backup_form.length?$vm_backup_form:$vm_backup_form_sched;$vm_backup_form_target.find('input[type="radio"][name="compression"]').on("change",function(){var e=$vm_backup_form_target.find('input[type="radio"][name="increment"][value="0"]'),t=e.closest("tr");if($(this).val()=="3"){e.trigger("click");t.hide()}else{t.show()}});var $sched_backup_form=$('form[action*="backup_sched.cgi"]');if($sched_backup_form.length){var $sched_backup_form_purge=$sched_backup_form.find('[name^="purge"].ui_opt_textbox');if($sched_backup_form_purge.length){$sched_backup_form_purge.closest(".ui_grid_cell").prev("td").attr("style","vertical-align: middle !important; width: 10%; padding-left: 2px !important; padding-right: 10px !important")}}}$.each($(".container-fluid a.ui_link_replaced"),function(){if(this.href.includes("webminlog.csv")){$(this).removeClass().addClass("btn btn-default ui_submit heighter-34").prepend('<i class="fa fa-fw fa-export"></i> ')}});if(core.curModuleFile("virtual-server","edit_user.cgi")){$('.ui_form > table.opener_table_style > tbody > tr > td.opener_container > div[class^="opener_"] > .table-hardcoded:first-child').each(function(e,t){var i=$(t).find("tbody > tr > td");if(!i.length){$(t).parents(".opener_table_style").remove()}});var $showpass=$('form[action="save_user.cgi"] a[href^="showpass.cgi"]');if($showpass.length){$showpass.prev(".awradio").addClass("vertical-align-text-top").find(".lawobject").css({maxHeight:"25px"})}}if(core.curModuleFile("virtual-server","delete_domain.cgi")){$('form[action*="delete_domain.cgi"]').on("submit",function(){var e=URI.parseQuery(URI(location.href).query()).dom;plugins.favorites.remove(e)})}if(core.curModuleFile("server-manager","mass.cgi")){$('form[action*="mass.cgi"]').on("submit",function(){var e=$(this).find('input[name="d"][type="hidden"]').map(function(e,t){return $(t).val()}).get(),t=$(this).find('input[name="dereg"][type="hidden"][value="1"]').length;$.each(e,function(e,i){if(t&&i&&i.length>3){plugins.favorites.remove(i)}})})}if(core.curModuleFile("server-manager","mass_domains.cgi")){$('form[action*="mass_domains.cgi"]').on("submit",function(){var e=$(this).find('input[name="d"][type="hidden"]').map(function(e,t){return $(t).val()}).get(),t=$(this).find('input[name="delete"][type="hidden"][value="1"]').length;$.each(e,function(e,i){if(t&&i&&i.length>3){if(i&&i.includes("/")){i=i.split("/")[1];plugins.favorites.remove(i)}}})})}if(core.curModule("help")){$('.ui_form_end_submit ~ [type="reset"]').addClass("heighter-34")}var $multi_select=$(".ui_multi_select");if($multi_select.length){$multi_select.find('[onclick^="multi_select_move"]').text("...")}check_reboot(1);if(v___location_path&&v___location_path.length&&v___location_path.includes("webalizer/view_log.cgi")){if(!$is_history_action){var $link_targets=document.querySelectorAll(".container-fluid .panel-body  center  p  small a");$link_targets.forEach(function(e,t){e.innerHTML=e.innerHTML.slice(1,-1);e.classList.add("btn","btn-transparent","btn-link-bordered","btn-xxs")});var title_target_cnt=document.querySelector(".container-fluid #headln2c");title_target=title_target_cnt.querySelector("span"),title_target_fav=title_target_cnt.querySelector("button"),title_target_text=title_target.innerHTML;title_target_text=title_target_text.substr(0,title_target_text.lastIndexOf("-")).trim(),title_target_main=title_target_text.substr(0,title_target_text.lastIndexOf(" ")),title_target_sub=title_target_text.substr(title_target_text.lastIndexOf(" ")+1);title_target_cnt.innerHTML=title_target_fav.outerHTML+"&nbsp;<span data-main_title>"+title_target_main+'</span><span data-sub_title=""><br>'+title_target_sub+"</span>";var $table_broken=$(".container-fluid .panel-body table"),$table_broken_delims=$table_broken.find('[height="4"]');$table_broken.removeClass("table-hardcoded").addClass("table-bordered").find('td[bgcolor="#c0c0c0"], th[bgcolor="#c0c0c0"]').attr("bgcolor","#f5f5f5");$table_broken_delims.remove();$.each($table_broken_delims,function(){$(this).parent("tr").remove()})}}if(core.curModuleFile("acl","edit_user.cgi")||core.curModule("changepass")||core.curModuleFile("virtual-server","clone_form.cgi")||core.curModuleFile("virtual-server","edit_user.cgi")||core.curModuleFile("virtual-server","list_databases.cgi")||core.curModuleFile("virtual-server","edit_domain.cgi")||core.curModuleFile("virtual-server","domain_form.cgi")||core.curModuleFile("virtual-server","edit_pass.cgi")||core.curModuleFile("samba","edit_euser.cgi")||core.curModuleFile("samba","ask_epass.cgi")||core.curModuleFileQuery("postgresql","edit_user.cgi","new=")||core.curModuleFileQuery("mysql","edit_user.cgi","new=")||core.curModuleFileQuery("passwd","edit_passwd.cgi","user=")||core.curModuleFile("mailbox","inbox_login_error.cgi")||core.curModuleFile("server-manager","edit_pass.cgi")&&v___location_query.includes("force=1")){if(core.curModuleFile("virtual-server","edit_domain.cgi")){$('.container-fluid .panel-body input[type="text"][name="passwd"]').addClass("t-password-complexity-meter-inputter-obj")}$('.container-fluid .panel-body input[type="password"]:not([data-password-again]), '+'.container-fluid .panel-body input[type="text"][name="passwd"]:not([data-password-again]), '+".container-fluid .panel-body input.t-password-complexity-meter-inputter-obj, "+'[data-uri*="/virtual-server/edit_user.cgi"] .container-fluid .panel-body input[name="mailpass"]').passwordComplexityMeter();var class_to_remove="badge badge-transparent badge-circle";if(core.curModuleFile("virtual-server","list_databases.cgi")){var $view_pass_button=$('a[href^="showpass.cgi?dom="]');$view_pass_button.each(function(){$(this).addClass("btn btn-default heighter-28 margined-left--1");$(this).parents(".ui_radio_table").find(".t-password-complexity-meter-wrapper-cont > .btn-group").append($(this).detach());$(this).removeClass(class_to_remove)})}if(core.curModuleFile("server-manager","edit_pass.cgi")){var $view_pass_button2=$('.t-password-complexity-meter-wrapper-cont + a[href^="showpass.cgi?"]');$view_pass_button2.addClass("btn btn-default heighter-28 margined-left--1");$view_pass_button2.removeClass(class_to_remove);var $fg_targ=$('form[action="save_pass.cgi"] .t-password-complexity-meter-wrapper-cont > .btn-group');$fg_targ.append($view_pass_button2.detach());$fg_targ.find("i.fa2-account-key").addClass("pd-tp-3");var $view_pass_button3=$('input[type="password"] + a[href^="showpass.cgi?"]');$view_pass_button3.addClass("btn btn-default heighter-28 margined-left--4").find("i.fa2-account-key").addClass("pd-tp-3");$view_pass_button3.removeClass(class_to_remove)}}var input_warning_caps="input_warning_caps",input_password_targets=document.querySelectorAll('input[type="password"]');$(".container-fluid ."+input_warning_caps+"").remove();for(i=0,length=input_password_targets.length;i<length;i++){var span=document.createElement("span"),isLargePassInput=input_password_targets[i].offsetHeight>30?1:0;span.classList.add(input_warning_caps);span.setAttribute("title","Caps Lock");isLargePassInput&&span.classList.add("large");input_password_targets[i].classList.add("use_"+input_warning_caps+"");input_password_targets[i].parentNode.insertBefore(span,input_password_targets[i].nextSibling);input_password_targets[i].addEventListener("blur",function(){this.nextSibling.classList.remove("visible")});input_password_targets[i].addEventListener("keydown",function(e){if(typeof e.getModifierState!=="function"){return}state=e.keyCode===20?!e.getModifierState("CapsLock"):e.getModifierState("CapsLock");if(state){this.nextSibling.classList.add("visible")}else{this.nextSibling.classList.remove("visible")}})}$.each($(".container-fluid select:visible"),function(){if($(this).css("height")==="28px"){$(this).nextAll(".btn").addClass("heighter-28")}});if($is_history_action&&(core.curModule("mysql")||core.curModule("postgresql"))){typeof f__ex__mysql_runner_update==="function"&&f__ex__mysql_runner_update()}$(".container-fluid select").on("change",function(){if(this.multiple){var e=$(this).val();$(this.options).removeAttr("selected");$(this.options).removeAttr("selected");for(var t=0,i=this.options.length;t<i;t++){if(e.includes(this.options[t].value)){this.options[t].setAttribute("selected","selected")}}}else{$(this.options).removeAttr("selected");this.options[this.options.selectedIndex].setAttribute("selected","selected")}});if(core.curModuleFile("useradmin","edit_group.cgi")){$.each($(".container-fluid .btn-group.ui_links_row a"),function(){$(this).removeClass("btn-inverse btn-tiny").addClass("btn-transparent btn-transparent-link").find("i").addClass("fa-users").removeClass("fa-plus-square-o")})}if(!$is_history_action){var cnt_fluid_str="container-fluid",table_str="table",table_hover_str=""+table_str+"-hover",table_hover_force=table_hover_str+"-force",table_sub_cnt_str="sub_"+table_str+"_container",table_hardcoded_str=""+table_str+"-hardcoded",radio_table_str="ui_radio_"+table_str+"",table_grig_str="ui_grid_"+table_str+"",table_grig_str_percent=table_grig_str+':not([width*="%"])',cls_no_hover_str="nh-tr",cls_no_border_str="no-border",multi_sel_str="ui_multi_select",margined_str="margined-",hidden_div_str="hiddendiv_",opener_str="opener_",opener_hidden_str=""+opener_str+"hidden",vs_str="virtual-server",sm_str="server-manager",file_edit_start_str="edit_",cgi_ext_str=".cgi",server_templates_vm_name_sel_str='[name="editmode"]',cm_fl=core.curModuleFile,server_templates_vm=cm_fl(vs_str,""+file_edit_start_str+"tmpl"+cgi_ext_str+""),server_templates_vm_query=$("."+cnt_fluid_str+" "+server_templates_vm_name_sel_str+"").val()&&!$("."+cnt_fluid_str+" "+server_templates_vm_name_sel_str+"").val().match(/(virt|scripts|autoconfig|php|phpwrappers|avail)$/),proc_hidden_dest_backups=1,proc_hidden_dest_backups_cm=1;if(cm_fl(vs_str,"edit_plan"+cgi_ext_str+"")){var $tableEditPlan=$(".ui_form ."+table_str+"."+table_hover_str+"."+opener_str+""+table_str+"_style");$.each($tableEditPlan,function(){var e=$(this);if(e.find("thead").length){e.addClass("text-nowrap").removeClass(""+table_hover_str+" "+table_hover_force).attr("style","margin-top: 5px !important; ").wrap('<div class="long-'+table_str+"-wrapper "+margined_str+"top--5 "+margined_str+'bottom--4"><div class="long-'+table_str+'-scroll"></div></div>');e.find(""+table_str+"."+table_hover_str+"").first().removeClass(table_hover_str);e.find("."+opener_hidden_str+" > "+table_str+"").removeClass(table_hover_force).find("tbody > tr > td > "+table_str+"."+table_hover_str+"").addClass(table_hover_force)}})}}if(v___location_path==v___location_prefix+"/shell/"||v___location_path==v___location_prefix+"/shell/index.cgi"||v___location_path==v___location_prefix+"/server-manager/shell.cgi"){var shell_header_sel="#headln2r .btn-group",path_to_shell_class="path-to-shell",shell_title=$("aside .user-link.ported-console").attr("data-title"),shell_title_inject=String();if(!$is_history_action){if(shell_title){shell_title_inject=theme_inject_tooltip(shell_title,"#headln2r",false,false,false,"(")}if(session.server.data("terminal")==="0"){$(shell_header_sel).append("<a "+shell_title_inject+' class="btn btn-link text-lighter pull-left path-to-shell-injected '+path_to_shell_class+'"><i class="fa fa-terminal" aria-hidden="true"></i></a>')}}$(shell_header_sel).find("."+path_to_shell_class+"").on("click",function(e){e.preventDefault();plugins.shell.open()})}if(core.error.get()){if(v___initial_load||v___module===v___module_file_manager||vars.requested_page&&vars.requested_page.includes("/"+v___module_file_manager+"")){core.error.clean()}}if(core.curModuleFile("server-manager","list_ifaces.cgi")||core.curModuleFile("server-manager","list_ips.cgi")){var ui_links_row_str="ui_links_row",$empty_table_check=$(".container-fluid ."+ui_links_row_str+" ~ .table-condensed, #att_ranges .table-striped");var $safe_target=$empty_table_check.find("thead + tbody").html();if($safe_target&&$safe_target.length===1){$empty_table_check.add($empty_table_check.next("."+ui_links_row_str+"")).add($empty_table_check.next("."+ui_links_row_str+"").nextAll("br")).remove()}}$("textarea").on("click",function(){if(!$(this).attr("readonly")||$(this).hasClass("disabled")){return}var e=$(this).val();if(e){this.select();theme_copy_to_clipboard(e);plugins.messenger.post('<i class="fa fa-lg fa-fw fa-clipboard"></i>'+theme_language("textarea_to_clipboard")+":<pre>"+e+"</pre>",5,"success","textarea_to_clipboard")}});if(core.curModuleFile("mailbox","list_addresses.cgi")){$('.container-fluid textarea[name="members"] ~ .btn.btn-success.ui_form_end_submit').removeClass("btn-success").addClass("btn-default btn-block margined-top--5 btn--save-grp").find(".fa").remove()}if(core.curModule("custom")){var custom_file_edit_mode=core.curModuleFile("custom","view.cgi");if(!$is_history_action){var custom_cmd_main_container_main=".ui_grid_row > .ui_grid_cell > .ui_form > .table-responsive > .table-subtable > tbody > tr > td > .sub_table_container",custom_cmd_main_container=""+custom_cmd_main_container_main+" > tbody";$(""+custom_cmd_main_container+' > tr:nth-child(1) > td[colspan="2"]').each(function(){if(!$(this).find(".ui_form_end_submit").length){$(this).addClass("no-contents padded-a-3").parent("tr").addClass("no-contents")}});var $has_icon=$(".sub_table_container td:last-child.col_value.col_header > .ui_form_end_submit");if(!$has_icon.find("i.fa").length&&!$has_icon.parents(".ui_grid_cell").length){$has_icon.addClass("heighter-28")}var custom_sub_table=".custom table.ui_grid_table .ui_grid_row .sub_table_container";var $col_head=$(""+custom_sub_table+" tr");$.each($col_head,function(){if(!$(this).find(".ui_form_end_submit").length){$(this).find(".col_header.col_value").removeClass()}});$.each($(custom_sub_table),function(){var e=$(this).find("tr"),t=e.find("input:not(:hidden):not(.hidden), textarea, select").length;if(t>=1){$(this).addClass("dense");e.find("td.col_label").addClass("w-auto");e.find('td.col_value:not([colspan="2"])').find("button.ui_form_end_submit").addClass("btn-tiny").parent("td").prev("td.col_label").addClass("vertical-align-middle");e.addClass("no-contents")}});if(v___location_file==="form.cgi"){$(".sub_table_container").find(".ui_form_end_submit").addClass("heighter-28").prepend('<i class="fa fa-fw fa-0_95x fa-play">&nbsp;</i>').parent("td").prev("td.col_label").addClass("vertical-align-middle")}if(custom_file_edit_mode){var detach_button_html='<a data-external-detach-custom-file data-toggle="tooltip" data-container="body" data-title="'+theme_language("search_in_file_open_external")+'" aria-label="'+theme_language("search_in_file_open_external")+'" class="btn btn-link text-lighter text-decoration-none btn-squiare-headln2 text-lighter-slight">'+'<span class="fa2 fa2-link-external vertical-align-baseline fa-mds"></span>'+"</a>";$("#headln2l .btn-group").append(detach_button_html)}}if(custom_file_edit_mode){$("#headln2l .btn-group [data-external-detach-custom-file]").on("click",function(e){e.preventDefault();var t=$("#headln2c").find("[data-main_title] + [data-sub_title] > tt").text();t&&edit_file_from_full_path(t)})}}if(!$is_history_action){$(".chooser_button").each(function(){var e=$(this).prev("input[name], textarea");if(!e.length){e=$(this).prev("span").find(".ui_opt_textbox");if(e.length){e=e.unwrap()}}else{if(!e.attr("class")&&e.outerHeight(true)===32){e.css({marginTop:1,marginBottom:1})}}$(this).add(e).wrapAll('<span class="white-space-pre el-wp-chooser"></span>')})}var vs_str_="virtual-server",sm_str_="server-manager",vm_nginx_="virtualmin-nginx";if(core.curModuleFile(vs_str_,"edit_newchroot.cgi")||core.curModuleFile(vs_str_,"edit_newglobal.cgi")||core.curModuleFile(vs_str_,"edit_newlinks.cgi")||core.curModuleFile(vs_str_,"edit_newshells.cgi")||core.curModuleFile(vs_str_,"view_backuplog.cgi")||core.curModuleFile(vm_nginx_,"edit_logs.cgi")||core.curModuleFile(vm_nginx_,"edit_srewrite.cgi")||core.curModuleFile(vm_nginx_,"edit_saccess.cgi")||core.curModuleFile(vm_nginx_,"edit_sproxy.cgi")||core.curModuleFile(vm_nginx_,"edit_fcgi.cgi")||core.curModuleFile(vs_str_,"edit_phpver.cgi")||core.curModuleFile(vs_str_,"edit_spf.cgi")||core.curModuleFile(vs_str_,"ratelimit.cgi")||core.curModuleFile(vs_str_,"edit_newfields.cgi")||core.curModuleFile(sm_str_,"edit_docker.cgi")||core.curModuleFile(sm_str_,"edit_vserver.cgi")||core.curModuleFile(sm_str_,"edit_zone.cgi")||core.curModuleFile(sm_str_,"edit_openvz.cgi")||core.curModuleFile(sm_str_,"list_locations.cgi")||core.curModuleFile(sm_str_,"edit_lxc.cgi")||core.curModuleFile(sm_str_,"list_ips.cgi")||core.curModuleFile("acl","edit_unix.cgi")||core.curModuleFile("squid","edit_cachemgr.cgi")||core.curModuleFile("spam","edit_white.cgi")||core.curModuleFile("fsdump","edit_dump.cgi")||core.curModuleFile("mysql","backup_form.cgi")||core.curModuleFile("mysql","table_form.cgi")||core.curModuleFile("postgresql","backup_form.cgi")||core.curModuleFile("webmin","edit_bind.cgi")||core.curModuleFile("usermin","edit_bind.cgi")||core.curModuleFile("procmail","edit_recipe.cgi")||core.curModuleFile("usermin","edit_logout.cgi")||core.curModuleFile("net","list_routes.cgi")||core.curModuleFile("cron","edit_cron.cgi")||core.curModuleFile("cluster-copy","edit.cgi")||core.curModuleFile("cluster-cron","edit.cgi")||core.curModuleFile("webalizer","edit_log.cgi")||core.curModuleFile("apache","edit_global.cgi")||core.curModuleFile("logrotate","edit_sched.cgi")||core.curModuleFile("fetchmail","edit_cron.cgi")||core.curModuleFile(vs_str_,"edit_bucket.cgi")||core.curModuleFile("sshd","edit_net.cgi")||core.curModuleFile("fail2ban","edit_jail.cgi")||core.curModuleFile("webmin","edit_advanced.cgi")||core.curModuleFile("webmin","edit_web.cgi")||core.curModuleFile("usermin","edit_web.cgi")||core.curModuleFile("webmin","edit_os.cgi")||core.curModuleFile("usermin","edit_os.cgi")||core.curModuleFile("virtualmin-init","edit_tmpl.cgi")||core.curModuleFile("ssh","edit_host.cgi")||core.curModuleFile("syslog","edit_log.cgi")||core.curModuleFile("mysql","newdb_form.cgi")||core.curModuleFile("ldap-server","acl_form.cgi")||core.curModuleFile("ldap-client","edit_server.cgi")||core.curModuleFile("squid","edit_ports.cgi")||core.curModuleFile("squid","edit_logs.cgi")||core.curModuleFile("squid","edit_cache.cgi")||core.curModuleFile("virtualmin-nginx","edit_server.cgi")||core.curModuleFile("spam","edit_simple.cgi")||core.curModuleFile("spam","edit_report.cgi")||core.curModule("virtual-server")&&v___location_file=="edit_resel.cgi"||core.curModule("virtual-server")&&v___location_file=="edit_tmpl.cgi"||core.curModuleFile("cpan","download.cgi")||core.curModuleFile("virtual-server","edit_phpmode.cgi")||check_location_resource("/config.cgi?phpini")||$('body[class*="bind8"]').length&&v___location_file||$('body[class*="status"]').length&&v___location_file=="edit_mon.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_sql.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_cmd.cgi"||$('body[class*="custom"]').length&&v___location_file=="edit_file.cgi"){$(".table:not(.opener_table_style):not(.dataTable)").removeClass("table-hover").addClass("no-hover");if(core.curModule("virtual-server")&&v___location_file=="edit_tmpl.cgi"){$(".table:not(.opener_table_style):not(.dataTable) > tbody > tr > td > table > tbody > tr > td > table").addClass("w-100p-f")}}theme_ui_opt_select(3);if(core.curModuleFile("apache","edit_mods.cgi")){var mpm_targets='.iawobject[value^="mpm_"]';$(mpm_targets).on("click",function(){$(mpm_targets+":checked").not(this).trigger("click")})}snippets.page.render_table_labels($(".container-fluid > .panel > .panel-body"));$(".ui_grid_cell:first-child > .btn-group.ui_links_row").parent().addClass("ui_grid_cell_auto");$(".ui_radio_table > tbody > tr > td > textarea").each(function(){$(this).parent("td").prev("td").addClass("vertical-align-middle")});if(core.curModuleFile("acl","edit_user.cgi")){$('.container-fluid form[action="save_user.cgi"] input[name="twofactor"]').prev().removeClass().addClass("btn btn-xxs btn-success margined-left-5 pd-bt-2").attr("type","submit")}if(!$is_history_action&&v___location_path===v___location_prefix+"/virtual-server/edit_tmpl.cgi"){embed_table_header_icon();var server_template_filter_dropdown_spinner=theme_spinner_small(false,!v___theme_night_mode?"dark smaller2":" "),server_template_filter_dropdown_tooltip_text=theme_language("tooltip_virtualmin_templates_filter_generating"),server_template_filter_dropdown_tooltip_data_toggle_str='data-toggle="tooltip"',server_template_filter_dropdown_html=""+"<div "+server_template_filter_dropdown_tooltip_data_toggle_str+' data-container="body" data-title="'+server_template_filter_dropdown_tooltip_text+'" class="btn-group elm-rel-z config-search cursor-na">'+'<button aria-label="'+server_template_filter_dropdown_tooltip_text+'" data-toggle="dropdown" class="btn dropdown-toggle btn-default elm-rel-z heighter-28 pd-lr-8 pointer-events-none" aria-expanded="false">'+server_template_filter_dropdown_spinner+'<span class="fa fa-md fa-file-find"></span>'+"</button>                                    "+'<ul class="dropdown-menu pd-tb-0" role="menu">'+'<li class=""><input style="display: inline; width: auto; height: 28px; padding-top: 0; padding-bottom: 2px; vertical-align: middle" class="form-control ui_textbox" type="text" id="search_i_18" name="search" value="" size="" >'+"</li>"+"</ul>"+"</div>";var server_template_filter_dropdown_selector_str='[action="edit_tmpl.cgi"] > [name="editmode"] ~ .end_submits';$(server_template_filter_dropdown_selector_str).prepend(server_template_filter_dropdown_html);$(server_template_filter_dropdown_selector_str).find("["+server_template_filter_dropdown_tooltip_data_toggle_str+"]").attr("data-placement","auto top").data("placement","auto top").tooltip("fixTitle")}if(v___location_path===v___location_prefix+"/config.cgi"||v___location_path===v___location_prefix+"/uconfig.cgi"||v___location_path===v___location_prefix+"/mconfig.cgi"||v___location_path===v___location_prefix+"/tconfig.cgi"){embed_table_header_icon();setTimeout(plugins.filter.options,101)}$("#content > .container-fluid > .panel > div.panel-body > p:last-child").each(function(){var e=$(this).text();if(e&&e.length){e=$.trim(e);if(!e){$(this).empty()}}});if(core.curModule("virtualmin-nginx")&&v___location_file=="edit_mime.cgi"&&v___location_query&&v___location_query.indexOf("search=")>=0){var $vm_nginx_scroll_to_add_new=$('#content .ui_checked_columns [name="name"]');if($vm_nginx_scroll_to_add_new.length){vars.page_user_inactive=0;setTimeout(function(){$vm_nginx_scroll_to_add_new[0].scrollIntoView({behavior:"auto",block:"center"});$vm_nginx_scroll_to_add_new[0].focus()},300)}}if(core.curModuleFile("virtual-server","edit_phpmode.cgi")){var cnt_str=".container-fluid",modes_sel_str=""+cnt_str+' [name="mode"]',curr_mode=$(""+modes_sel_str+":checked").val(),$modes=$(modes_sel_str);if(curr_mode&&$modes&&$modes.length){var $php_ver_select_row=$(""+cnt_str+' [name^="ver_"]').parents("td.col_value").parent(),$php_ver_select_row_all_used_for_none=$modes.closest(".col_value").parent("tr").nextAll("tr");$php_ver_select_row_all_used_for_none=$php_ver_select_row_all_used_for_none.add($php_ver_select_row_all_used_for_none.closest("form").find("table.opener_table_style:last"));$modes.on("change",function(){var e=$(this).val();if(curr_mode==="none"||e==="none"){$php_ver_select_row_all_used_for_none.hide()}else{$php_ver_select_row_all_used_for_none.show()}if(curr_mode.replace("fcgid","cgi")!==e.replace("fcgid","cgi")){$php_ver_select_row.hide()}else{$php_ver_select_row.show()}var t=$(""+cnt_str+" .ui_text_color");if(t.length){var i=t.parent("td").parent("tr");if(e==="fpm"){i.hide()}else{i.show()}}})}$(".container-fluid sup.ui_help > i").removeClass("fa-question-circle fa-0_80x").addClass("fa2 fa2-php fa-1_50x")}var cnt_tbl_body="container-fluid .panel-body",ui_links_row="ui_links_row",not_data_table=":not(.dataTable)",only_child=":only-child",tbl_hardcoded="table-hardcoded:not(.ui_table_end_submit_right):not(.ui_buttons_table)",form_elem="form",table_cls_str="table:not([data-recursive_tree])",icn_row="icons-row",long_tbl_pref="long-table-";if(!core.curModuleFile("bind8","")&&!core.curModuleFile("bind8","index.cgi")&&!core.curModuleFile("postfix","sni.cgi")&&!core.curModuleFile("postfix","virtual.cgi")&&!core.curModuleFile("postfix","aliases.cgi")){tbl_hardcoded+=":not(.ui_grid_table):not(.ui_radio_table)"}var theTableToWrap=$("."+cnt_tbl_body+" > "+form_elem+" > ."+ui_links_row+" ~ ."+table_cls_str+""+not_data_table+","+"."+cnt_tbl_body+" > "+form_elem+" > ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > ."+table_cls_str+""+only_child+","+"."+cnt_tbl_body+" > ."+icn_row+" ~ ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > "+form_elem+" ~ ."+tbl_hardcoded+","+"."+cnt_tbl_body+" > ."+ui_links_row+" ~ ."+table_cls_str+""+not_data_table+"");if(theTableToWrap.length&&session.server.data("product")!=="usermin"){theTableToWrap.wrap('<div class="'+long_tbl_pref+'wrapper"><div class="'+long_tbl_pref+'scroll noMaxHeight"></div></div>')}if(typeof vars.requested_page==="string"&&vars.requested_page&&vars.requested_page.includes("webmin/fix_os")){v___title_initial=session.server.data("title-initial");theme_title_generate();$(".info-container").find('form[action*="webmin/fix_os.cgi"]').parents(".alert").remove()}if(typeof vars.requested_page==="string"&&vars.requested_page&&vars.requested_page.includes("init/reboot")){despinnerfy_buttons()}if(core.curModuleFile("virtual-server","manual_records.cgi")||core.curModuleFile("bind8","edit_text.cgi")){$(".container-fluid").find("form").find('[name="validate"], [name="soa"]').parent(".awcheckbox").addClass("solid")}$(".container-fluid .ui_checked_columns td:not(.ui_checked_checkbox) .awcheckbox").parent("td:not(:first-child)").addClass("awcheckbox_cont");$.each($(".container-fluid select:not([multiple])"),function(){if($(this).outerHeight()<30){$(this).addClass("heighter-28")}});$.each($(".container-fluid .tr_tag > td[data-td-e]:last-child"),function(){var e=$(this).find(".f__lnk_t_btn-el");if(e.length){$(this).wrapInner('<div data-btns="container"></div>');e.removeAttr("style");$(this).attr("data-btns",1)}});if(core.curModule("virtualmin-support")&&!$is_history_action){var submit_ticket_btn=document.querySelector("[data-submit-ticket]");$(submit_ticket_btn).removeClass().addClass("btn btn-lg btn-primary").prepend('<i class="fa2 fa-fw fa2-virtualmin"></i>')}if(v___location_query&&v___location_query.includes("refresh-navigation=1")){if(!v___initial_load){plugins.navigation.reload(undefined,function(){plugins.navigation.detect(v___location_path,1)})}else{plugins.navigation.detect(v___location_path,1)}}if(core.curModuleFile("webminlog","view.cgi")){var webminlog_module_no_command_escapes_sel_str="webminlog_module_no_command_escapes",webminlog_module_no_command_escapes__icon_cls_str="fa2-code",webminlog_module_no_command_escapes__icon_active_cls_str="text-danger",webminlog_module_no_command_escapes_icon_obj_func=function(){return $("."+webminlog_module_no_command_escapes_sel_str).find("."+webminlog_module_no_command_escapes__icon_cls_str)},wb_log_no_code_btn_item_name=v___server_hostname+"-"+webminlog_module_no_command_escapes_sel_str,wb_log_no_status_func=function(){return localStorage.getItem(wb_log_no_code_btn_item_name)=="0"},wb_log_no_status_remove_backslashes_func=function(){webminlog_module_no_command_escapes_icon_obj_func().addClass(webminlog_module_no_command_escapes__icon_active_cls_str);$.each($(".webminlog .opener_container td > pre"),function(){$(this).html().length&&$(this).html($(this).html().replace(/[\\]+/g,""))})};if(!$is_history_action){$("#headln2r .btn-group").prepend(""+"<a "+theme_inject_tooltip(theme_language(webminlog_module_no_command_escapes_sel_str),".container-fluid")+' aria-label="'+theme_language(webminlog_module_no_command_escapes_sel_str)+'"  href="javascript:;" class="btn btn-link text-lighter text-decoration-none '+webminlog_module_no_command_escapes_sel_str+'">'+'<i class="fa2 '+webminlog_module_no_command_escapes__icon_cls_str+' vertical-align-middle"></i></a>')}$("."+webminlog_module_no_command_escapes_sel_str).on("click",function(e){e.preventDefault();localStorage.setItem(wb_log_no_code_btn_item_name,wb_log_no_status_func()?"1":"0");if(wb_log_no_status_func()){localStorage.setItem(wb_log_no_code_btn_item_name,"0");wb_log_no_status_remove_backslashes_func()}else{localStorage.setItem(wb_log_no_code_btn_item_name,"1");page_refresh()}});if(wb_log_no_status_func()){wb_log_no_status_remove_backslashes_func()}}$("#content form > .table.opener_table_style").each(function(){var e="long-table-";$(this).wrap('<div class="'+e+'wrapper wrapped-accordion"><div class="'+e+'scroll noMaxHeight"></div></div>')});(function(){var e="virtual-server",t="edit_tmpl.cgi";if(core.curModuleFile(e,t)){var i=session.server.data("user"),a=uri_parse_param("id"),n=uri_parse_param("new"),r=[],o=[],l=(e+"_"+"templates_"+a+"_"+i).replace(/-/g,"_"),s=l+"_status",_=v___location_prefix+"/xhr.cgi?type=file&action=cache&module="+e+"&submodule=server-templates&server-template-id="+a+"&subaction=",c=function(t){return v___location_prefix+"/"+e+"/edit_tmpl.cgi?id="+a+(t?"&editmode="+t+"&nnext=1":"")},d=c()+"&editmode=",f=function(e){return e==uri_parse_param("id")},p=function(e,t,i){if(f(i)){plugins.filter.options({data:e,url:t,unlock:1,tooltip:{title:"tooltip_virtualmin_templates_filter"}})}};if(!n){if(vars.cache[l]){p(vars.cache[l],d,a)}else{$.ajax({type:"POST",url:_+"get",data:false,dataType:"JSON",success:function(e){if(e&&e.cached){vars.cache[l]=e.cached;p(e.cached,d,a)}else{if(vars.cache[s]){console.warn("Cache for this template is already being generated");return true}var t=function(e){vars.cache[s]=true;$.ajax({type:"POST",url:c(e),data:false,dataType:"text",success:function(i){if(i&&i.length){var n=$.parseHTML(i);if(n&&n.length){var c=$(n),f=c.find('select[name="editmode"]'),u=f.val();if(!u){console.warn("Cannot detect fetched template category");return true}var h=c.find(".table-responsive"),g=$.trim(h.find(".table-title").text()),m=h.find(".col_label");if(!m.length){m=h.find("tr.tr_tag > td[data-td-e]:first-child")}m.map(function(){var e=$.trim(this.innerText);if(g&&e){o.push({data:{category:g},section:u,value:e})}});if(!e){if($.isEmptyObject(r)){f.find("option").map(function(){r.push(this.value)});r.pop()}}var v=r.shift();if(v){t(v)}if(!v&&$.isEmptyObject(r)){vars.cache[s]=false;vars.cache[l]=o;p(o,d,a);$.ajax({type:"POST",url:_+"put&data="+JSON.stringify(o)+"",dataType:"JSON",error:function(){console.warn("Cannot store template cache")}})}}}}})};t()}}})}}}})();(function(){if(core.curModuleFile("virtual-server","backup.tgz")){var e=".container-fluid .panel-body",t='a[href*="download_backup.cgi"]';theme_buttonify([null],e,t,"btn btn-transparent btn-link-bordered btn-xxs margined-top-10 margined-bottom--10","");$(e).find(t).on("click",function(e){var t="cursor-na";if($(this).hasClass(t)){e.preventDefault();e.stopPropagation();return false}$(this).addClass(t).closest("b").addClass(""+t+" filter-grayscale filter-invert")})}})();(function(){if(core.curModuleFile("virtual-server","wizard.cgi")){var e=$('[data-radio-table="mysize"] span[data-wizard_myrec]');if(e.length){filter_out_objects_inner_chars(e,"(");filter_out_objects_inner_chars(e,")");e.addClass("label label-info label-sm")}var t=$('[name="mypass"]'),i=$('[name="mypass_def"]'),a=$('[name="parse"]');t.on("input",function(){a.toggleClass("disabled",!$(this).val())});i.on("change",function(){if($(this).val()=="0"){t.trigger("input")}else{a.removeClass("disabled")}});var n=$('[name="defdom"]'),r=n.closest("tr").nextAll("tr");n.on("change",function(){r.toggleClass("hidden",$(this).val()=="0")});var o='.container-fluid form[action="wizard.cgi"]',l=$(o),s=$(""+o+' button[name="parse"]');l.on("keydown",".table-responsive .table-subtable",function(e){if(e.keyCode===13){e.preventDefault();e.stopPropagation();s.trigger("click")}})}})();(function(){if(core.curModuleFile("mysql","edit_dbase.cgi")){$('[name="addview"]').addClass("heighter-34 heighter-34-force")}if(core.curModuleFile("virtual-server","save_cloud.cgi")){$(".btn-tiny.ui_link_replaced").addClass("heighter-34 margined-top-8").prepend('<i class="fa2 fa-fw fa2-account-key">&nbsp;&nbsp;</i>')}})();(function(){var e='body[class*="tikimanager"] .col_value > form',t=".btn.ui_submit",i='[name="dom"] + '+t+"";if(core.curModuleFile("virtualmin-tikimanager","index.cgi")||core.curModuleFile("virtualmin-tikimanager","")){$(e+" "+t).addClass("heighter-28");$(".col_value > "+t).addClass("heighter-28");var a=$(e+" "+i);a.removeClass("heighter-28 btn-success btn-default").addClass("btn-grey btn-xxs margined-top--2").find("span").css("font-size","100%")}})();(function(){if(core.curModuleFile("apache","")||core.curModuleFile("apache","index.cgi")){$('.container-fluid .ui_form .table td a.btn[href^="http"]:has(.fa-external-link)').attr("target","_blank").addClass("cursor-alias").parent().removeClass("cursor-pointer")}})();(function(){var e="#content > .container-fluid > .panel > div.panel-body",t="font-weight-normal",i=$(""+e+" > *").length,a=$(""+e+" > p").length,n=$(""+e+" > b").length,r=$(""+e+" > b ~ b").length>0,o=$(""+e+" > b + p:empty:last-child"),l=$(""+e+" > p + p:empty:last-child"),s=o.prev("b"),_=l.prev("p");if(i===a||i===2&&a===1&&n===1){if(_.length||s.length){var c=s.length?s:_.length?_:[];if(c.length){c.css("margin-bottom",0).addClass(t).find("b").addClass(t)}}}var d=$(""+e+" > b:first-child"),f=$(""+e+" > .ui_subheading + b:nth-child(2)");var p=d.length?d:f.length?f:[];if(p.length&&!r){p.addClass(t);var u=p.next("p");if(u.find(".ui_link").length){u.addClass("margined-top-6")}}var h=$(""+e+" > .ui_form > br + textarea");if(h.length){h.before('<p class="margined-bottom-5"></p>')}})();(function(){if($.support.spa&&core.curModule("server-manager")){var e=$('.container-fluid .panel-body [action="bwgraph.cgi"]');e.attr("target","_blank");e.on("submit",function(e){e.stopPropagation()})}})();(function(){if(typeof v___location_file==="string"){if(v___location_file.includes("tconfig.cgi")){var e=$('.container-fluid select[name="settings_sysinfo_hidden_panels_user"]');e.after('<div class="font-size-90pf text-muted"> &nbsp;'+theme_language("settings_sysinfo_hidden_panels_user_desc_"+(platform.detect()==="mac"?"mac":"pc")+"")+"</div>");e.closest("td").prev("td").addClass("vertical-align-top").find("b").addClass("margined-top-3");var t=$('.container-fluid select[name="settings_hotkey_toggle_hold_modifier"] option, .container-fluid select[name="settings_hotkey_toggle_modifier"] option, .container-fluid .table-cell-padded code');t.each(function(){var e=$(this).text();if(e&&platform.detect()==="mac"){e=e.replaceAll("Ctrl","Control");e=e.replaceAll("Alt","Option");e=e.replaceAll("Meta","Command");$(this).text(e)}})}}})();(function(){$.each($("[data-ui-buttons-row-form-container]"),function(){var e=$(this).prev("tr");if(e.find("td > hr").length){e.addClass("ui-pre-buttons-hr-row")}})})();(function(){$.each($('[onclick="form.target = \\"_blank\\""]'),function(){$(this).removeAttr("onclick");$(this).on("click",function(e){e.preventDefault();e.stopPropagation();var t=$(this).closest("form");t[0]&&theme_open_new_tab(t[0].action+"?"+$(this).attr("name")+"="+Convert.uriEncodeComponent(t.find('[name="'+$(this).attr("name")+'"][value]').val()||1)+"&"+t.serialize())})})})();(function(){var e="container-fluid",t="heighter-28 heighter-28-force",i="heighter-34",a='.sub_table_container select[name="attach"]',n='form[action="reply_mail.cgi"]';if(core.curModuleFile("mailboxes","view_mail.cgi")||core.curModuleFile("mailboxes","mail_search.cgi")||core.curModuleFile("mailboxes","list_mail.cgi")||core.curModuleFile("mailbox","view_mail.cgi")||core.curModuleFile("mailbox","mail_search.cgi")){$("."+e+" ."+i+"").addClass(t).removeClass(i);$("."+e+" "+n+" > .btn, "+n+" > select").addClass(t).removeClass(i);$("."+e+" "+n+" "+a+"").next("b").replaceTagName("span");var r=$("."+e+" "+n+" "+a+"").next("span");r.text(r.text().replace(/:/,""));r.next(".el-wp-chooser").find("input").addClass("w-33p").css("width",String()).removeAttr("size")}})();(function(){if($.support.spa){if(core.curModule("xterm",1)&&typeof xterm_argv==="object"&&!$.isEmptyObject(xterm_argv)){vars.pjax.cache.set("disable");plugins.terminal.new(xterm_argv);var e="#headln2r .btn-group",t="path-to-shell",i=$("aside .user-link.ported-console").attr("data-title"),a=theme_inject_tooltip(i,"#headln2r",false,false,false,"(");$(e).append("<a "+a+' class="btn btn-link text-lighter pull-left path-to-shell-injected '+t+'"><i class="fa2 fa2-terminal fa-1_15x" aria-hidden="true"></i></a>');$(e).find("."+t+"").on("click",function(e){e.preventDefault();plugins.terminal.open()})}else{plugins.terminal.clean(null)}}})();(function(){try{if(core.curModuleFile("virtual-server","domain_form.cgi")||core.curModuleFile("virtual-server","clone_form.cgi")||core.curModuleFile("virtual-server","import_form.cgi")||core.curModuleFile("virtual-server","rename_form.cgi")){domain_change=function(){};var e="autocomplete-suggestions-container",t=$('aside select[name="dom"] option'),i=$('.container-fluid .ui_form[action="domain_setup.cgi"] input[name="dom"], '+'.container-fluid .ui_form[action="clone.cgi"] input[name="newdomain"], '+'.container-fluid .ui_form[action="import.cgi"] input[name="dom"], '+'.container-fluid .ui_form[action="rename.cgi"] input[name="new"]'),a=[],n=function(t,i){t.parent().find("."+e+"").remove();t.autocomplete({lookup:i,width:t.outerWidth(),appendTo:t.parent()[0],containerClass:"autocomplete-suggestions highlighted wwidth "+e+"",showNoSuggestionNotice:false,minChars:0,triggerSelectOnValidInput:false,tabDisabled:true});theme.api.event.one.page.beforeReplace(function(){t.autocomplete("dispose")})},r=function(e){var t=[],i=[];e.forEach(function(e){if(!i.includes(e.value)){t.push(e);i.push(e.value)}});return t};$.each(t,function(e,t){var i=$.trim($(t).text()),n=String();if(i){var r=i.match(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+$/);if(r&&r[0]){i=r[0]}var o=i.match(/\.([A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+\.[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]+$)/);if(o&&o[0]&&o[1]){n=o[1]}if(n&&n!=i){a.push({value:n,data:{category:0}})}try{i=i.replace(/↴\s+/,String()).replace(/↱\s+/,String())}catch(e){}a.push({value:i,data:{category:0}})}});if(a.length){n(i,a);i.on("input",function(e){var t=[],o=i.val(),l=String.fromCharCode(e.keyCode?e.keyCode:e.which).toLowerCase();if(o&&o.toString().split(".").length>=2){i.autocomplete("dispose");return}$.each($(a),function(e,i){var a={...i};if(o.toString().endsWith(".")){o=o.slice(0,-1)}if(o){a.value=o+"."+a.value;t.push(a)}}).promise().done(function(){var e=a.slice(),o=t.slice(),l=$.merge(e,o);l=r(l);i.autocomplete("dispose");n(i,l);i.trigger("blur").trigger("focus")})})}}}catch(e){console.warn("Error: Cannot retrieve list of domains")}})();if(core.curModuleFile("virtual-server","edit_redirect.cgi")){vars.pjax.cache.set("disable")}};snippets.page.events=function(e,t){if(e==="reset"){e="keyup";t={holdModifer:~~!false}}if(core.curModuleFile("virtual-server","summary_domain.cgi")){var i=$("a[data-dom-file][href]");i.attr("data-no-randomized",1);t.holdModifer&&i.attr("href",function(){if(e==="keydown"){return $(this).data("edit-link")}else{return $(this).data("view-link")}})}};snippets.parser.fileviewer={getOpts:function(e){var t=e.hasClass("viewer-1"),i=e.hasClass("viewer-2"),a=e.hasClass("viewer-3"),n=e.hasClass("viewer-4"),r=e.hasClass("viewer-5"),o=e.hasClass("viewer"),l=e.hasClass("viewer-reverse"),s=e.hasClass("viewer-head"),_=e.hasClass("viewer-tail");return[t,i,a,n,r,o,l,s,_]},getSuffix:function(e,t){var i="/M=1",a="/M=2",n="/M=3",r="/M=4",o="/M=5",l="/V=1",s="/R=1",_="/H=1",c="/T=1";if(t){return[i,a,n,r,o,l,s,_,c]}var d=this.getOpts(e);return(d[0]?i:"")+(d[1]?a:"")+(d[2]?n:"")+(d[3]?r:"")+(d[4]?o:"")+(d[5]?l:"")+(d[6]?s:"")+(d[7]?_:"")+(d[8]?c:"")}};const events={};events.window=function(){window.document.addEventListener("visibilitychange",function(){if(document.visibilityState!=="hidden"){theme_post_event_window_state_activated("visibilitychange")}else{theme_post_event_window_state_deactivated("visibilitychange")}});window.addEventListener("focus",function(){theme_post_event_window_state_activated("focus")});window.addEventListener("blur",function(){theme_post_event_window_state_deactivated("blur")});window.addEventListener("popstate",function(){$('[data-trigger-injected="1"]').remove()});var e=document.querySelector("#content");if(e){e.addEventListener("scroll",function(e){if(!vars.pjax.post_page_fetch){vars.events.scrolled=e.target.scrollTop;plugins.pjax.page.interaction.set(Date.now())}})}$(document.body).on("keydown",function(e){if(e.keyCode===17){vars.events.keypressed.meta=true}if(e.keyCode===91){vars.events.keypressed.ctrl=true}if(e.keyCode===16){vars.events.keypressed.shift=true}if(e.keyCode===18){vars.events.keypressed.alt=true}theme_post_event_handler("keydown",{_isKeyCombo:e.originalEvent!==undefined&&e.key&&e.key!=="Alt"&&e.key!=="Shift"&&e.key!=="Control"&&e.key!=="Meta"&&(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey),_keyCode:e.keyCode,_isHuman:e.originalEvent!==undefined,meta:e.keyCode===17,metaPressed:vars.events.keypressed.meta,ctrl:e.keyCode===91,ctrlPressed:vars.events.keypressed.ctrl,shift:e.keyCode===16,shiftPressed:vars.events.keypressed.shift,alt:e.keyCode===18,altPressed:vars.events.keypressed.alt,holdModifer:event_hold_modifer_pressed()})}).on("keyup",function(e){if(e.keyCode===17){vars.events.keypressed.meta=false}if(e.keyCode===91){vars.events.keypressed.ctrl=false}if(e.keyCode===16){vars.events.keypressed.shift=false}if(e.keyCode===18){vars.events.keypressed.alt=false}theme_post_event_handler("keyup",{_isKeyCombo:e.originalEvent!==undefined&&e.key&&e.key!=="Alt"&&e.key!=="Shift"&&e.key!=="Control"&&e.key!=="Meta"&&(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey),_keyCode:e.keyCode,_isHuman:e.originalEvent!==undefined,meta:e.keyCode===17,metaPressed:vars.events.keypressed.meta,ctrl:e.keyCode===91,ctrlPressed:vars.events.keypressed.ctrl,shift:e.keyCode===16,shiftPressed:vars.events.keypressed.shift,alt:e.keyCode===18,altPressed:vars.events.keypressed.alt,holdModifer:~~!false})});$(window).on("keydown",function(e){var t=plugins.shell.status();if(!t&&session.alive){theme_shortcuts(e)}}).on("resize",function(){page_resized();plugins.shell.adjust();page_control_header()});var t=$(document.body).find(".-shell-port-"),n=t.find(".-shell-port-container");n.on("click",".-shell-port-close",function(){if(plugins.shell.available()){if(session.server.data("terminal")==1){plugins.terminal.close()}else if(session.server.data("shell")==1){plugins.shell.close()}}})};events.body=function(){const e=this;$(document.body).on("mousedown tap keydown",function(){setTimeout(function(){if(!vars.events.keypressed.shift){vars.page_interaction=1}});plugins.pjax.page.interaction.set(Date.now())}).on("click",function(e){var t=".showpass-popover";if($(t).length){if(!$(t).is(e.target)&&$(t).has(e.target).length===0&&$(".popover").has(e.target).length===0){$(t).popover("hide")}}var n=function(t){if(vars.navigation.servers_index_control){if(e.originalEvent!==undefined||t){var n="servers-index",i=":visible",a=$("[data-"+n+"]");if(a.is(i)){var s=$(".popover-"+n+"");if(s.is(i)){if(!$(e.target).is(a)){if(!s.find(e.target).length){a.trigger("click")}}}}}}};var i="mobile-menu-toggler";if($("."+i+"").is(":visible")){if(!$(e.target).is('[data-servers-index="popover"], .mCustomScrollBox, .wbm-sm, .fa-stack, input[name="product-switcher"], label[for*="open_"], span, .sidebar-search, .select2-search, .select2-search__field, .select2-selection__rendered, .select2-selection')){n(true);plugins.navigation.collapse()}}$(".tooltip").tooltip("hide");n();var a="right-side-tabs",s=document.querySelector("."+a+""),o=s&&s.style.right==="0px"?true:false;if(o){if(!$(".right-side-tabs-toggler").hasClass("hidden")&&$(".right-side-tabs-toggler").hasClass("opened")&&!$(e.target).parents("#right-side-tabs").is("#right-side-tabs")&&!$(e.target).is(".fa-bell")&&!$(e.target).is(".fa-trash-o")&&!$(e.target).is(".badge.badge-danger")){$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}}var r=window.navigator.platform==="MacIntel"?1:0;if((!r&&e.ctrlKey||r&&e.metaKey)&&!e.altKey){if($(e.target).closest("a").data("no-randomized")){return}var l=link_type_convert($(e.target).attr("href"),1),c=$(e.target).find("a").attr("href")||$(e.target).parents("a").attr("href"),d=link_type_convert(c,1),_=$(e.target).find("a").length?$(e.target).find("a"):$(e.target).parents("a"),f=Math.floor(Math.random()*1e5);if(l&&!Test.strContains(l,"javascript")||d&&!Test.strContains(d,"javascript")){if(l){$(e.target).attr("href",link_type_convert(l+(Test.strContains(l,"?")?"&":"?")+"randomized="+f+"",2));setTimeout(function(){$(e.target).attr("href",link_type_convert(l,2))})}else if(d){_.attr("href",link_type_convert(d+(Test.strContains(d,"?")?"&":"?")+"randomized="+f+"",2));setTimeout(function(){_.attr("href",link_type_convert(d,2))})}}}}).on("keydown",function(e){var t=e.keyCode?e.keyCode:e.which,n=String.fromCharCode(t).toLowerCase(),i=this;if(typeof i.timedOut==="number"){clearTimeout(i.timedOut)}if(n&&t!==8){if(i.preValue){i.preValue+=n}else{i.preValue=n}}var a=function(){var n=i.preValue;i.preValue=null;if($("input").is(":focus")||$("select").is(":focus")||$("textarea").is(":focus")||$(".modal.in").length||vars.events.blocked||$(".-shell-port-").hasClass("opened")||!session.alive){return}if(v___location_path==v___location_prefix+"/server-manager/gvnc.cgi"||v___location_path==v___location_prefix+"/server-manager/login.cgi"||v___location_path==v___location_prefix+"/telnet/"||v___location_path==v___location_prefix+"/telnet/index.cgi"||v___location_path==v___location_prefix+"/stunnel/"||v___location_path==v___location_prefix+"/stunnel/index.cgi"){return}if((core.curModuleFile("virtual-server","edit_tmpl.cgi")||v___location_path===v___location_prefix+"/config.cgi"||v___location_path===v___location_prefix+"/uconfig.cgi"||v___location_path===v___location_prefix+"/mconfig.cgi"||v___location_path===v___location_prefix+"/tconfig.cgi")&&n&&RegExp(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]/).test(n)&&t!==112&&t!==113&&t!==114&&t!==115&&t!==116&&t!==117&&t!==118&&t!==119&&t!==120&&t!==121&&t!==122&&t!==123&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){var a=".container-fluid .config-search",s=""+a+" > .dropdown-toggle",o=a+' input[name="search"]';if($(a).length){$(s).trigger("click.bs.dropdown");$(o).val(n).trigger("input");return}}if(n&&RegExp(/^[A-Za-zÀ-ž\u0370-\u9FCC\.\-_\d\-]/).test(n)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&t!==106&&t!==107&&t!==109&&t!==112&&t!==113&&t!==114&&t!==115&&t!==116&&t!==117&&t!==118&&t!==119&&t!==120&&t!==121&&t!==122&&t!==123){if(!$(".dataTables_filter label input").length&&!$(".btn-accordion-filter").length){setTimeout(function(){var t=$('aside input[name="search"]');if(e.shiftKey&&n=="1"){t.focus().val("!")}else{if(!Test.editing()){t.focus().val(n).trigger("change")}}},1)}else{$(".btn-filter-top-right, .btn-accordion-filter").trigger("click");$(".btn-filter-top-right .dataTable-mirror, .btn-accordion-filter .dataTable-mirror").focus().val(n).trigger("keyup")}}};this.timedOut=setTimeout(a,vars.event.stopped_typing_delay)}).on("click","#quota-virtual-server-collapse a.ui_link, #quota-virtual-server-1-collapse a.ui_link, #bw-virtual-server-collapse a.ui_link, #bw-virtual-server-1-collapse a.ui_link, .container-fluid > #system-status > .panel-body > .alert a, .right-side-tabs .info-container .alert a",function(){var e=URI.parseQuery(URI($(this).attr("href")).query())["dom"],t="virtualmin",n=$('.switch-toggle input:not([id="open_'+t+'"]):checked').length;if(n){plugins.navigation.switch.set(t)}else{}setTimeout(function(){$("aside select").val()!=e&&plugins.navigation.get.virtualmin(e)},300)}).on("click",".file-input-wrapper",function(e){e.stopPropagation();var t=$(this).prev('input[type="radio"]').add($(this).parent("td").prev("td").find('input[type="radio"]'));t.length===1&&t.prop("checked",true)}).on("click",".--to-new-tab",function(){$(this).attr("target","_blank")}).on("click",'[data-target="external"]',function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();$(this).attr("data-href")&&theme_open_new_tab($(this).attr("data-href"),1)}).on("click",".mobile-menu-toggler",function(e){var t=175;$this=$(this);var n="opened";if(!$(this).data(n)){$(this).data(n,1);plugins.navigation.update("webmail")}if($("aside").hasClass("hidden-xs")){$(this).addClass("selected").find("button").addClass("btn-primary").removeClass("btn-default");if($(".__logo")){$(".__logo").css("transform","translate(0px, 0px)");setTimeout(function(){$(".__logo").transition({y:"-140px"},t*1.5)},1100)}$this.css("transform","translate(0px, 0px)");$("aside").css("transform","translate(0px, 0px)");$("aside").removeClass("hidden-xs");$("aside, .mobile-menu-toggler").transition({x:settings_leftmenu_width},t*2.5)}else{plugins.navigation.collapse()}}).on("click",'a[data-id^="csf_"], a[data-type^="csf_"]',function(e){get_bundle_csf()}).on("click",'a[href*="mysql"], a[href*="postgresql"]',function(e){get_bundle_sql()}).on("shown.bs.modal",".modal.in",function(){$(this).focus()}).on("click",".module-help",function(){popover_visibility_position($(this))}).on("click",".close-popover-trigger",function(e){$(e.target).parent().parent().not(this).popover("hide")}).on("change",'.ui_checked_columns:visible input[type="checkbox"], .ui_checked_columns:visible input[type="radio"]',function(e){var t=$(this).parents("tr.ui_checked_columns:visible");if(t.length&&t.find("input:first").is($(this))){if($(this).is(":checked")){t.addClass("hl-aw")}else{t.removeClass("hl-aw hl-aw-chk")}if(typeof v____timeout_cb_ck_row!=="undefined"&&typeof v____timeout_cb_ck_row==="number"){clearTimeout(v____timeout_cb_ck_row)}v____timeout_cb_ck_row=setTimeout(function(){typeof __r____changed==="function"&&__r____changed()},1)}}).on("click",".authentic_update:not(.disabled)",function(e){e.preventDefault();e.stopPropagation();var t=$(this),n=!tconfig_beta_updates?1:0,i=t.data("force")=="1"?1:0,a;var s=t.attr("data-stable");if(s&&s.length){n=s=="1"?1:0}var o=t.attr("data-version");a=o?o:false;theme.update(n,i,a)}).on("mousemove.tconf","#force_update_menu_cnt .dropdown-submenu.clickable.prelocked > a",function(e){var t="locked",n=$(this).parent(),i=n.parent().offset().left,a=n.width(),s=parseInt(e.pageX-i-a);if(s>-24){n.removeClass(t)}else{n.addClass(t)}}).on("click",".csf-submit",function(e){e.preventDefault();var t=$(this).data("id"),n="disabled";$("#"+t).submit();$(this).addClass(n).attr(n,n);spinnerfy_button_tiny($(this))}).on("change",".onchange_form_submit_triggger",function(e){e.preventDefault();if(get_onbeforeunload_status()){get_onbeforeunload_message(this,"$($eventData).parent('form').submit()","ev")}else{$(this).parent("form").submit()}}).on("click",".generate-password-key-g",function(){var e=$(this);(async function(){var t=await theme_password_generator(e);theme_copy_to_clipboard(t);plugins.messenger.post('<i class="fa fa-lg fa-fw fa-key-plus"></i>'+theme_language("password_generator_new_success").replace("%password",'&nbsp;<code class="vertical-align-middle">'+Convert.htmlEscape(t)+"</code>&nbsp;"),10,"success","newGeneratedPassword")})()}).on("click",".messenger-message .messenger-message-inner tt",function(){if(check_selected_text()){return}theme_copy_to_clipboard($(this).text());plugins.messenger.post('<i class="fa fa-lg fa-fw fa-clipboard"></i>'+theme_language("filemanager_copying_successful"),2,"success","newClipboardCopied")}).on("keydown",'form[action*="save_log.cgi"] input[name="filter"], form[action*="save_log.cgi"] input[name="lines"], form[action*="view_log.cgi"] input[name="filter"], form[action*="view_log.cgi"] input[name="lines"]',function(e){if(e.keyCode==13){e.preventDefault();var t=$("button.ui_submit.ui_form_end_submit");t.first().trigger("click");t.addClass("disabled")}}).on("click",'button, input[type="submit"], a',function(e){v___page_activeElement=this}).on("click","._c__op_d",function(e){if($(e.target).is(this)){var t=$(this).find(".opener_trigger").first()[0];t&&t.click()}}).on("click",'form[action*="save_user.cgi"] button[name="but_switch"], a[href*="virtual-server/switch_user.cgi"]',function(){v___theme_reload=1}).on("click",'[href*="javascript:history"]',function(e){if(v___theme_content_history){e.preventDefault();e.stopPropagation();v___theme_content_history=0;get_pjax_content(v___location_directory)}}).on("click",".ui_multi_select_row select[multiple] option",function(e){var t=$(this).parent("select"),n=t.parent("td"),i=n.parent("tr"),a=n.index(),s="onclick",o="["+s+'*="multi_select_move"]';if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&(a===0||a===2)){i.find("td:eq(1)").find(""+o+"["+s+'*="'+(a?0:1)+'"]').trigger("click")}}).on("click",'.container-fluid a[href], .container-fluid button, .container-fluid input[type="button"], .right-side-tabs a[href], .right-side-tabs button, .right-side-tabs input[type="button"], .right-side-tabs .info-container .graph-container-fw, .right-side-tabs-dismiss i, .favorites-menu li a',function(){v___blocked_navigation=0;plugins.navigation.detectAllowed=true}).on("click","#content #system-status .panel-heading ._support_ticket_cnt",function(){var e=plugins.dashboard.system_info("markdown","allow-private-data"),t=function(e){var t="\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\x3c!---\n",n=session.server.data("hostname"),i=n?""+n+" system information":"System information";t+="BELOW TEXT CONTAINS YOUR SYSTEM INFORMATION AND SHOULD BE LEFT INTACT\n";t+="--\x3e\n";t+="\n<br>\n\n---\n<br>\n<details>\n";t+="<summary><strong>"+i+"</strong></summary>\n\n";t+=e;t+="\n</details>\n";t+="<br>";t+="\n\x3c!---\n";t+="SCROLL TO THE VERY TOP OF THE PAGE TO FILL YOUR TICKET\n";t+="--\x3e\n";return"https://forum.virtualmin.com/new-message?groupname=staff&"+"body="+Convert.uriEncodeComponent(t)+"%0A%0A%0A%0A"};var n=t(e);theme_copy_to_clipboard(n,true);!event_hold_modifer_pressed()&&theme_open_new_external_link(n)}).on("click","#content #system-status .panel-heading ._clipboard_sysinfo_cnt",function(){var e=plugins.dashboard.system_info(!event_hold_modifer_pressed()),t=session.server.data("hostname"),n=t?""+t+" system information":"System information",i="\n\n\x3c!---\n";i+="BELOW TEXT CONTAINS YOUR SYSTEM INFORMATION AND SHOULD BE EITHER LEFT INTACT OR EDITED WITH CARE\n";i+="--\x3e\n";i+="\n<br>\n\n---\n<br>\n<details>\n";i+="<summary><strong>"+n+"</strong></summary>\n\n\n\n";i+=e;i+="</details>\n";i+="<br>";i+="\n\x3c!---\n";i+="SCROLL TO THE VERY TOP OF THE PAGE TO FILL YOUR TICKET\n";i+="--\x3e\n";if(!vars.events.keypressed.shift){var a=function(e){return $('[data-id^="sysinfo_'+e+'"]').text()},s=a("webmin"),o=a("usermin"),r=a("virtualmin"),l=a("cloudmin"),c=a("authentic_theme"),d=a("os"),_=a("package_");i="|  SYSTEM INFORMATION||\n";i+="|----------------------|---------------------------|\n";if(d){i+="|  OS type and version |     "+d+"     |\n"}if(s){i+="|  Webmin version      |     "+s+"     |\n"}if(o){i+="|  Usermin version     |     "+o+"     |\n"}if(r){i+="|  Virtualmin version  |     "+r+"     |\n"}if(l){i+="|  Cloudmin version    |     "+l+"     |\n"}if(c){i+="|  Theme version       |     "+c+"     |\n"}if(_){i+="|  Package updates     |     "+_+"   |\n"}}theme_copy_to_clipboard(!event_hold_modifer_pressed()?i:e)}).on("click",'#extended_sysinfo-1 .panel-collapse[aria-labelledby="status-virtual-server-1"] a:not(.ui_link)',function(e){e.preventDefault();var t=$(this),n=t.attr("href"),i=t.parents(".panel").first();i.addClass("updating");if(t.hasClass("disabled")){return}t.addClass("disabled opacity-0_4");var a=t.find(".fa-refresh");if(a){a.addClass("fa-spin")}progress.start();$.ajax({type:"GET",url:n,data:false,statusCode:{200:function(){$.ajax({type:"GET",url:v___location_prefix+"/sysinfo.cgi?no-cache=1&no-query=string",complete:function(){i.removeClass("updating")},success:function(e){var t="#status-virtual-server-1-collapse",n=$(e).find(t).find(".panel-body");$('[data-dcontainer="1"]').find(t).find(".panel-body").replaceWith(n);progress.end()}})}}})}).on("mouseenter mouseleave","#extended_sysinfo-1 .panel.panel-default.ui-sortable-handle .panel-collapse > .panel-body",function(e){var t="#extended_sysinfo-1 .panel",n="draggable",i="data-"+n+"",a="true";if(e.type==="mouseenter"){$(""+t+"["+n+'="'+a+'"]').removeAttr(n).attr(i,a)}else{$(""+t+"["+i+'="'+a+'"]').removeAttr(i).attr(n,a)}}).on("click","[data-href-background]",function(e){e.preventDefault();var t=$(this).attr("data-href-background");progress.start();$.post(t,function(){plugins.slider.data.fetch();if(v___location_path&&v___location_path.indexOf("/sysinfo.cgi")>-1){page_refresh()}})}).on("click","#jsPanel-replacement-container > .jsPanel-replacement > .jsPanel-hdr",function(e){e.preventDefault();$(this).find(".jsPanel-btn-normalize").trigger("click")}).on("shown.bs.tab",'.nav.nav-tabs > li > a[data-toggle="tab"]',function(e){if(v___module===v___module_file_manager){return}$($.fn.dataTable.tables(true)).css("width","100%");$($.fn.dataTable.tables(true)).DataTable().columns.adjust();var t=$(e.target).attr("href");if(t){snippets.page.render_table_labels($(".tab-pane"+t+""))}}).on("shown.bs.collapse",".panel > .panel-collapse",function(){snippets.page.render_table_labels($(this))})};(function e(){if(session.server.data("navigation")&&browser.detect.internet_explorer()>5&&browser.detect.internet_explorer()<=11){setTimeout(function(){var e="<p>"+theme_language("browser_warning")+"</p>";theme_alert(theme_language("global_warning"),e,false,"md","danger",false,"10 modal-ie-warning",0)},2e3);if(!String.prototype.endsWith){String.prototype.endsWith=function(e,t){var i=this.toString();if(typeof t!=="number"||!isFinite(t)||Math.floor(t)!==t||t>i.length){t=i.length}t-=e.length;var n=i.lastIndexOf(e,t);return n!==-1&&n===t}}if(!String.prototype.startsWith){if(!String.prototype.startsWith){String.prototype.startsWith=function(e,t){t=t||0;return this.indexOf(e,t)===t}}}}})();function addmodule(e){adduser(e);return false}function addgroup(e){adduser(e);return false}function adduser(e){$v__mpp__g_olt=0;$('.mppopup input[data-role="tagsinput"]').tagsinput("add",e);setTimeout(function(){if(!v__mpp__ml_t__e){$(".mppopup_filter_input").val("");$(".mppopup_filter_input").focus().trigger("keyup")}v__mpp__ml_t__e=0},440);return false}function addinterface(e){adduser(e);return false}function parentdir(e){if(e&&e.length>1&&e.endsWith("/")){e=e.replace(/\/$/,"")}fileclick(e,"1");$v__mpp__g_gp=1}function fileclick(e,t){$v__mpp__g_ol=e;$v__mpp__g_olt=t}function select(e,t){$data_mppopup_value.val(e);return false}function filter_match(e,t,i){t="";i=i||false;var n=function(e){e=e||false;var n=$(".mppopup table tbody tr");if(n.length>0){for(var a=0;a<n.length;a++){var s=n[a];var r=s.className;if(!i&&r!==t){continue}if(i&&r.match(t)===null){continue}if(e){s.style.display=""}else{s.style.display="none"}}}return n};e=e.trim();if(e!==""){var a=n(false);if(a.length>0){for(var s=0;s<a.length;s++){var r=a[s].className;if(!i&&r!==t){continue}if(i&&r.match(t)===null){continue}var o=a[s].getElementsByTagName("a");for(var l=0;l<o.length;l++){var _=o[l].innerHTML.trim();_=_.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,"");if(_!==""){_=_.toLowerCase();if(_.match(e.toLowerCase())){a[s].style.display=""}}}}}}else{n(true)}}function tab_action(e,t){if(document.forms[0]&&document.forms[0][e]){document.forms[0][e].value=t}}function hidden_opener(e,t){if($("#"+e).parent(".opener_container").length===0){$("#"+e).wrapAll('<div class="opener_container opener_sub_container margined-top"></div>')}if($("#"+e).hasClass("opener_shown")){$("#"+e).parent(".opener_container").prev(".opener_extra_container.opener_extra_container_style").find(".opener_extra_container_a_style").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").prev("p").find(".opener_extra_container_a_style").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").parent("tr").prev("tr").find("td a:nth-child(1)").removeClass("opener_container_opened").addClass("opener_container_closed");$("#"+e).parent(".opener_container").show().find("#"+e).slideUp(0,function(){$("#"+e).removeClass("opener_shown").addClass("opener_hidden").parent('.opener_container:not(".opener_sub_container")').hide();$("#"+e).parent(".opener_sub_container").removeClass("margined-top -cnt-opened");$("#"+e).parents(".opener_table_style_small:first").removeClass("-tcnt-opened")})}else{var i=$("#"+e);i.parent(".opener_container").prev(".opener_extra_container.opener_extra_container_style").find(".opener_extra_container_a_style").addClass("opener_container_opened").removeClass("opener_container_closed");i.parent(".opener_container").prev("p").find(".opener_extra_container_a_style").addClass("opener_container_opened").removeClass("opener_container_closed");i.parent(".opener_container").parent("tr").prev("tr").find("td a:nth-child(1)").addClass("opener_container_opened").removeClass("opener_container_closed");i.slideUp(0).removeClass("opener_hidden").addClass("opener_shown").parent(".opener_container").slideDown(0).find(".opener_shown").slideDown(0);i.parent(".opener_sub_container").addClass("margined-top  -cnt-closed");i.parents(".opener_table_style_small:first").addClass("-tcnt-opened");snippets.page.render_table_labels(i)}}function select_mode(e){var t=$("aside form").length;for(i=0;i<document.forms[0+t].mode.length;i++){document.forms[0+t].mode[i].checked=document.forms[0+t].mode[i].value==e}}function theme_add_ss_attachment(){var e=document.getElementById("sattachblock");if(e){var t=$(e).prev("div"),i=t.find(".white-space-pre.el-wp-chooser"),n=i.first(),a=n.length?n[0].outerHTML:String(),s=i.length+1;if(a){a=a.replaceAll("file0","file"+s);t.append(a)}}return false}function theme_select_all_link(e,t){var n="theme_select_all_link",a='[onclick*="'+n+'"][onclick*=',s=a+'"\\"'+t+'\\""]',r=$("aside form").length,o=document.forms[e+r];if(!o||!$(o).find(s).length){var l=$(".container-fluid "+s+"").closest("form");if(l.length){o=l[0]}}var _=o[t],d=function(e){var t=e.closest("tr.ui_checked_columns");t&&t.classList.toggle("hl-aw",e.checked)};if(_){if(!_.length&&!_.disabled){_.checked=true;d(_)}else{for(i=0;i<_.length;i++){if(!_[i].disabled){_[i].checked=true;d(_[i])}}}}}function theme_select_invert_link(e,t){var n="theme_select_invert_link",a='[onclick*="'+n+'"][onclick*=',s=a+'"\\"'+t+'\\""]',r=$("aside form").length,o=document.forms[e+r];if(!o||!$(o).find(s).length){var l=$(".container-fluid "+s+"").closest("form");if(l.length){o=l[0]}}var _=o[t],d=function(e){var t=e.closest("tr.ui_checked_columns");t&&t.classList.toggle("hl-aw",e.checked)};if(_){if(!_.length&&!_.disabled){_.checked=!_.checked;d(_)}else{for(i=0;i<_.length;i++){if(!_[i].disabled){_[i].checked=!_[i].checked;d(_[i])}}}}}function g__text_breaker(e,t){if(!e.val()){return}var i=e.val().split(t),n="";$.each(i,function(e,i){i&&(n+=t+i+"\n")});e.val(n)}function event_generate(e,t){var i=$.Event(e);i.which=t;return i}function event_hold_modifer_pressed(){return settings_hotkey_toggle_hold_modifier==="ctrlKey"&&vars.events.keypressed.ctrl||settings_hotkey_toggle_hold_modifier==="metaKey"&&vars.events.keypressed.meta||settings_hotkey_toggle_hold_modifier==="shiftKey"&&vars.events.keypressed.shift||settings_hotkey_toggle_hold_modifier==="altKey"&&vars.events.keypressed.alt}function event_hold_modifer_icon(){return settings_hotkey_toggle_hold_modifier==="ctrlKey"?"⌃":settings_hotkey_toggle_hold_modifier==="metaKey"?"⌘":settings_hotkey_toggle_hold_modifier==="shiftKey"?"⇧":"⌥"}function extract_content(e,t,i,n){var a=String();if(!e){return a}var s=t.endsWith(">"),r=t.length;if(!s){var o=new RegExp(""+t+"(.*?>)"),l=e.match(o);if(l&&l[0]&&l[1]){r+=l[1].length}}var _=s?t.length:r,d=n?0:_,c=n&&i?i.length:0,f=e.indexOf(t);if(f===-1){return a}var u=e.indexOf(i,f),g=u===-1?e.length:u;if(!i){g=-1}var p=$.trim(e.slice(f+d,g+c));return p}function get_user_home(){var e=session.server.data("user-home"),t=e.match(/\/.*?\/[0-9]*\/\.(.*)/);if(t&&t[1]){e=t[1]}if(!e){if(typeof fm_user_data!=="undefined"){if(fm_user_data&&fm_user_data.home){e=fm_user_data.home}}}return e}function get_form_data(e){var t=e.attr("enctype")&&e.attr("enctype").indexOf("form-data")>-1?0:1;return t?e.serialize():new FormData(e[0])}function page_extended(){return v___location_file==="settings-logos.cgi"||v___location_file==="settings-logos_save.cgi"||v___location_file==="settings-backgrounds.cgi"||v___location_file==="settings-backgrounds_save.cgi"||v___location_file==="settings-editor_read.cgi"||v___location_file==="settings-editor_write.cgi"||v___location_file==="settings-favorites_save.cgi"?1:0}function check_bundle(e){if(Test.strContains(e,"/mysql/")||Test.strContains(e,"/postgresql/")){get_bundle_sql()}if(Test.strContains(e,"/"+v___module_file_manager+"/")){get_bundle_file_manager()}if(Test.strContains(e,"/csf/")){get_bundle_csf()}}function get_bundle_csf(e){load.bundle(v___server_extensions_path+"/csf/csf",1,e?["csf_init()"]:false,0)}function get_bundle_file_manager(e){load.bundle(v___server_extensions_path+"/file-manager/file-manager",0,e?["___f__tw()"]:false,0)}function get_bundle_sql(){load.bundle(v___server_extensions_path+"/sql",0)}function theme_open_new_external_link(e){var t="theme_open_new_link_ext";$("body").append('<a href="'+e+'" class="hidden" target="_blank" id="'+t+'"></a>');$("#"+t).simulateUserClick().remove()}function theme_open_new_inner_link(e){var t="theme_open_new_link";$("body").append('<a href="'+e+'" class="hidden" id="'+t+'"></a>');$("#"+t).simulateUserClick().remove()}function theme_open_new_tab(e,t){var i="theme_open_new_tab";if(t!==1){e=Test.strContains(e,v___location_origin)?e:v___location_origin+(e.startsWith("/")?e:"/"+e)}$("body").append('<a href="'+e+'" target="_blank" class="hidden" id="'+i+'"></a>');$("#"+i).simulateUserClick().remove()}function theme_to_new_tab(){$.each($('a[href*="virtualmin-awstats/view.cgi?config="],             .virtualmin-awstats a[href*="view.cgi?config="]   '),function(){$(this).addClass("--to-new-tab")})}function theme_restore_buttons_class(){var e="data-class-restore";$.each($(".container-fluid ["+e+"]"),function(){var t="btn-xclass",i=$(this).attr(e);if($(this)[0]&&$(this)[0].classList){var n=$(this)[0].classList.value.match(/.*(btn-\S+)/);if(n){t=n[1];$(this).removeAttr(e);$(this).removeClass(t).addClass(i)}}})}function theme_reload(e){if(e){window.location.href=link_type_convert(v___location_resource,2)}else{window.location.href=location.origin+v___location_prefix}}function theme_update_notice(e){$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-get_update_notice=1",complete:function(){e&&e.classList.remove("disabled")},success:function(e){if(!session.status(e)){return}var t=$(e).appendTo($("body"));t.modal("show")},error:function(e){}})}function theme_inject_tooltip(e,t,i,n,a,s,r,o,l,_){var d=v___initial_load?3e3:0,c=e;if(_){d=_}e=theme_language(e)||e;if(!t){t="body"}if(!i){i="auto top"}if(!n){n="tooltip"}if(!o){o="hover"}if(!a){a=vars.plugins.tooltip.delay.show}if(d){setTimeout(function(){var e=$('[data-target-tooltip-callback="'+c+'"]');e.attr("data-title",theme_language(c));e.attr("data-delay",'{"show":'+vars.plugins.tooltip.delay.show+', "hide":'+vars.plugins.tooltip.delay.hide+"}");e.tooltip({container:t,placement:i,sanitize:false,trigger:o,html:r?true:false,delay:{show:a,hide:vars.plugins.tooltip.delay.hide}})},d)}var f=String();if(s){var u=new RegExp("(?=\\"+s+")");e=e.split(u);e=e.join("<br>")}if(s||r){f=' data-html="true" '}a='{"show":"'+a+'", "hide":"'+vars.plugins.tooltip.delay.hide+'"}';if(l){return{container:t,placement:i,delay:a,toggle:n,title:e,html:f?true:false}}return' data-container="'+t+'" data-placement="'+i+"\" data-delay='"+a+"' data-toggle=\""+n+'" data-title="'+e+'" '+f+""}function theme_title_generate(e,t){var i=plugins.navigation.state.loading(),n=session.server.data("loading")==1?1:0;if(vars.page.locked){return}if((i||n)&&!vars.h.selector.content.get().hasClass("progressing")){setTimeout(theme_title_generate,100);return}if(!$.support.spa){return}var a=$("#headln2c").data("current-module-name"),s=$("#headln2c span[data-main_title]").text()||$('.panel-heading font[size="+2"]').text(),r=String(),o=r,l=$("aside select option:checked").text(),_=session.server.data("product")!=="webmin"?theme_language("theme_xhred_titles_um"):theme_language("theme_xhred_titles_wm"),d=Convert.strUpFirst(session.server.data("product")),c=v___title_initial;if(typeof c==="string"){c=c.replace(d,_)}var f=c?" — "+c:r,u=c?c+" — ":r,g=session.server.data("hostname"),p=session.server.data("user"),m=theme_language("titles_dashboard"),h=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi",v=$(".container-fluid > .error_40x");if(a&&a!==s&&!$t_uri_virtualmin&&!$t_uri_cloudmin){s=a+"/"+s}if(v___module==="csf"){s=theme_language("csf")}if(h){s=m}if(v.length){s=v.find("strong").text()}if(t){s=t}var b=" - "+s;if(settings_document_title==1){u=String()}if(settings_document_title==2){f=String()}if(settings_document_title==3){u=String();f=String()}if(settings_document_title==5){u=g+" - "+c+" — ";f=String()}if(settings_document_title==6){u=p+"@"+g+" - "+c+" — ";f=String()}if(settings_document_title==7){u=String();f=" — "+_}if(settings_document_title==8){u=g+" — ";f=String()}if(settings_document_title==9){u=p+"@"+g+" — ";f=String()}if(settings_document_title==4){if(e){return o}else{document.title=c}}else{if($('li.sub_active a[href*="'+v___module_file_manager+'"]').length){var x=v___module_file_manager;var w=$('body[class*="'+x+'"] .active form input#path').val();if(w){o=u+Convert.uriDecodeComponent(w)+" - "+$("li.sub_active a").text()+f;if(e){return o}else{document.title=o}}else{o=u+$("li.sub_active a").text()+f;if(e){return o}else{document.title=o}}}else if(($t_uri_virtualmin||$t_uri_cloudmin)&&l&&l.length&&!v.length){if(h){o=u+m+f;if(e){return o}else{document.title=o}}else if(s&&s.length){o=u+l+b+f;if(e){return o}else{document.title=o}}else{o=u+plugins.navigation.state.title()+f;if(e){return o}else{document.title=o}}}else{if(s&&s.length){o=u+s+f;if(e){return o}else{document.title=o}}else{o=c;if(e){return o}else{document.title=o}}}}var y=$(".right-side-tabs .list-group-item:not(.no-notifications, .opacity-0_3)").length;if(settings_side_slider_enabled&&settings_side_slider_notifications_enabled){titlenotifier.set(y)}else{titlenotifier.set(0)}}function link_type_convert(e,t){if(typeof e==="undefined"){return}if(e){e=e.replace(/([?&])(_pjax|_)=[^&]*/g,"")}if(t===1){e=e.replace("?"+$__theme_navigation+"","").replace("&"+$__theme_navigation+"","").replace("&amp;"+$__theme_navigation+"","")}if(t===2){if(!Test.strContains(e,$__theme_navigation)){e=Test.strContains(e,"?")?e+"&"+$__theme_navigation:e+"?"+$__theme_navigation}}return e}function get_page_title_subtitle(e){var t=$("[data-sub_title]").text(),i=$('[data-main_title=""]').text(),n=i+(t?": "+t:String());return e?i:n}function get_pjax_push(){return true}function get_pjax_type(e){var t=String();if(e&&e.href){t=e.href.match(/([^\/]*)\/*$/)[1]}if(Test.string(e)){var i=e.replace(v___location_origin+v___location_prefix,""),n=i.replace(v___module,"").replace(/^\/+/g,""),a=$('form[action*="'+i+'"]:visible'),a=a.length?a:$('form[action="'+n+'"]:visible'),s=i.match(/\w+.cgi/gi),a=a.length||!s?a:$('form[action*="'+s[0]+'"]:visible'),r=a.attr("method"),o=a.attr("enctype");if(o==="multipart/form-data"){return"post"}else if(r){return r}else if(!r){var r=$('form[action="'+i+'"]').attr("method"),r=r?r:$('form[action="'+URI(i).filename()+'"]').attr("method"),l=$('form[action="'+i+'"]').attr("enctype");if(r||l){if(l==="multipart/form-data"){return"post"}else{return r}}else{return"get"}}}else if(typeof e=="object"&&$(e).is("form")){var _=e,d=_.attr("method");if(d){return d}else{return"get"}}return v___module==="csf"&&!$('.csf-container textarea[name="formdata"]').length||(t==="shell"||e===v___location_prefix+"/shell/"||e&&Test.strContains(e,".cgi?")&&!Test.strContains(e,"config.cgi?"))?"GET":"POST"}function set_pjax_send_headers(e){}function get_pjax_content(e,t,i){plugins.navigation.detectAllowed=true;var n=typeof i=="undefined"||i===true||i==1?true:false;if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:e});return}set_pjax_send_headers(e);if(e&&unbuffered_header_processor_allow(e)){unbuffered_header_processor(e,0);return}t=typeof t=="object"?t:function(){},$type=$.isArray(t)?$("<a>",{href:e})[0]:false;e=link_type_convert(e,1);$.pjax({url:e,timeout:0,push:n,type:get_pjax_type($type?$type:e),container:"[data-dcontainer]",fragment:"[data-dcontainer]",callback:t})}function get_pjax_event_end(e,t,i){if(!session.alive){return}if(t!=null){if(t.status){var n=$('div[data-dcontainer="1"]'),a=t.status.toString().startsWith("40"),s=t.status.toString().startsWith("50");if(a||s){$.pjax.cache(false,false,[n,link_type_convert(v___location_prefix+"/xerror",2),get_page_title_subtitle(1)]);vars.allow_ui_features=0;setTimeout(function(){vars.allow_ui_features=1},200);if(a){var r=extract_content(t.responseText,'<div class="container error_40x" data-dcontainer="1">',"</div>",0);if(r){n.html(r)}}else if(s){var o=$(t.responseText).filter("h1").text(),l=$(t.responseText).filter("p").text(),_;_='<div class="alert alert-danger error_40x">';_+='<strong><i class ="fa fa-exclamation-triangle"></i> '+t.status+" - "+o+"</strong><br><span>"+l+"</span>\n";_+="</div>";n.html(_)}theme_title_generate();return}}}if(t==null||typeof t.responseText=="undefined"){return}var d=t.getResponseHeader("Content-Disposition");if(d&&d.toLowerCase().indexOf("attachment")!==-1){return}var c=t.responseText.match("<html(.*)>"),f;if(c&&c[0]){f=(new DOMParser).parseFromString(c[0],"text/html");f=f.querySelector("html").attributes}else{return}f&&$(f).each(function(e,t){if(this.nodeName!=="id"){if($.support.spa&&this.nodeName==="data-redirect"&&this.nodeValue&&this.nodeValue.length>0&&this.nodeValue!="/"&&this.nodeValue!="/?"+$__theme_navigation&&this.nodeValue!=location.origin+v___location_prefix+"/"&&this.nodeValue!=location.origin+v___location_prefix+"/?"+$__theme_navigation&&(!Test.strContains(this.nodeValue,"://")||Test.strContains(this.nodeValue,location.host))){vars.previous_request=String();vars.source_request=String();mail_page_check(this)}if(this.nodeName==="data-language"){var i=session.server.data("uri"),n=session.server.data("language"),a=this.nodeValue;if(a&&n&&n!==a){if(i&&i.match(/change-user|webmin\/edit_lang|\/language\//)){$.post(v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1");setTimeout(function(){plugins.navigation.reload()},300)}}}if(this.nodeName==="data-locale"){var s=session.server.data("uri"),r=session.server.data("locale"),o=this.nodeValue;if(o&&r&&r!==o){if(s&&s.match(/change-user|webmin\/edit_lang|\/language\//)){dayjs.locale(this.nodeValue)}}}if(this.nodeName!="data-level"&&this.nodeName!="data-access-level"){session.server.data(this.nodeName,this.nodeValue)}if(this.nodeName==="data-slider-fixed"){if(vars.slider.pinned!==-1){session.server.data(this.nodeName,vars.slider.pinned)}}if(this.nodeName==="data-navigation-collapsed"){if(vars.navigation.pinned!==-1){session.server.data(this.nodeName,vars.navigation.pinned)}}}}).promise().done(function(){plugins.pjax.headers.set(t);if(!core.curModule("mailboxes")&&uri_parse("directory",session.server.data("data-uri")).indexOf("/mailbox")>-1&&(!uri_parse("file",session.server.data("data-uri"))||uri_parse("file",session.server.data("data-uri")).indexOf("index.cgi")>-1)){mail_load(session.server.data("data-uri"));page_init();return false}plugins.page.events.register();get_pjax_event_end_funcs(1,false,i);$.each($(".container-fluid img"),function(){var e=$(this),t=e.attr("src");if(t&&!Test.strContains(t,"//")&&!t.startsWith("/")){e.attr("src",v___location_directory_trail_slashed+t)}});unbuffered_header_post(t);if(e){var n=$(e.relatedTarget),a=n.attr("href"),s=n.parent().is("[data-linked], .favorites-dcontainer, .menu-exclude.ui-sortable-handle");if(s&&(Test.strContains(a,"/mysql/")||Test.strContains(a,"/postgresql/"))||(Test.strContains(v___module,"mysql")||Test.strContains(v___module,"postgresql"))){typeof f__ex__mysql_runner==="function"&&f__ex__mysql_runner()}if(s&&Test.strContains(a,"/csf/")||Test.strContains(v___module,"csf")){if(typeof csf_init==="function"){csf_init()}else{get_bundle_csf("init")}}}})}function get_pjax_event_end_funcs(e,t,i){page_init();var n=function(){if(e&&v___module===v___module_file_manager&&v___location_file!=="config.cgi"&&v___location_file!=="mconfig.cgi"){page.handle.content.preloader.show()}if(v___module_file_manager){if(get_access_level()!=0){plugins.slider.state(0)}}if(!e){session.server.data("data-script-name",v___location_path);session.server.data("data-uri",v___location_resource);var t=new RegExp("^"+v___location_prefix,"i");v___module=session.server.data("data-uri").replace(t,"").split("/").filter(function(e){return e.length!==0})[0];session.server.data("data-module",v___module);setTimeout(function(){session.server.data("data-title-initial",$("#headln2c span[data-main_title]").text());snippets.page.render(1);despinnerfy_buttons();if($t_uri_virtualmin){plugins.navigation.intersect.virtualmin(location.href)}else if($t_uri_cloudmin){plugins.navigation.intersect.cloudmin(location.href)}},0)}};if(t){var a=function(){if(session.server.data("loading")){setTimeout(a,100)}else{n();plugins.navigation.detect()}};setTimeout(a,0);return}else{n()}if(!i&&e&&Test.strContains(v___location_directory,v___module_file_manager)){if(typeof ___f__tw==="function"){if(v___location_file==="config.cgi"||v___location_file==="mconfig.cgi"){___f__tw()}else{setTimeout(function(){___f__tw()},100)}}else{get_bundle_file_manager(1)}}if(!core.curModule("csf")){session.server.data("post",0,1)}e&&snippets.page.render(0);$(".tooltip").tooltip("hide");$(".popover").popover("hide");theme_title_generate();plugins.navigation.detect();e&&vars.h.selector.content.get().scrollTop(0);setTimeout(function(){var e=v___page_container.find("form:visible:first"),t=e.find('input:visible:not([readonly]):not([disabled]):not([type="radio"]):not([type="checkbox"]), textarea:visible:not([readonly]):not([disabled])');if(t.length&&!t.parents(".ui_buttons_table").length&&v___location_file!=="config.cgi"&&v___location_file!=="uconfig.cgi"&&v___location_file!=="tconfig.cgi"){if(vars.page_user_inactive&&(v___location_file==="domain_form.cgi"||Test.strContains(v___location_query,"new=")||e&&e.length&&(e.attr("action").startsWith("create")||e.attr("action").startsWith("add")||e.attr("action").startsWith("new")))){if(t&&t.val().length===0){try{isElemInView(t[0])&&t[0].focus()}catch(e){}}}}},400);if(e&&!core.curModule(v___module_file_manager)&&!core.curModule("csf")&&v___location_file!=="tconfig.cgi"){page.handle.content.preloader.hide()}}function get_pjax_action_submit(e,t){var i=typeof t=="undefined"||t===true||t==1?true:false;if(get_onbeforeunload_status()){return}vars.previous_request_progressive=e;if(e&&e.target&&e.target.action&&unbuffered_header_processor_allow(e.target.action)){unbuffered_header_processor(e,1);return}var n=$(e.currentTarget),a=Test.strContains(n.attr("enctype"),"multipart/form-data"),s=String(),r=String(),o=!a?n.serialize():String(),l=n.find('[type="submit"]'),_=$(quirks.active_element()),d=_.is('[type="submit"]')?_:l.length===1?l:false;if(d&&!a){s=d.attr("name");r=d.val()||$.trim(d.text());o=s&&o&&o.includes(s+"=")?true:false;if(s&&r&&!o){$('<input data-trigger-injected="1">').attr({type:"hidden",class:"hidden-force",name:s,value:r}).appendTo(n)}}vars.previous_request=e;vars.source_request=v___location_resource;vars.previous_request_progressive=String();v___theme_connection_triggered_origin=1;set_pjax_send_headers(e.target.action);$.pjax.submit(e,"[data-dcontainer]",{timeout:0,push:i,type:get_pjax_type(e.target.action),fragment:"[data-dcontainer]"})}function get_pjax_action_click(e,t,i){var n=typeof i=="undefined"||i===true||i==1?true:false;if($(t).attr("href")==undefined){return}var a=$(t).attr("href");if(a&&(a.includes("!edit")||a.includes("!view"))){e.preventDefault();var s=snippets.parser.fileviewer.getSuffix(false,1),r=s[0],o=s[1],l=s[2],_=s[3],d=s[4],c=s[5],f=s[6],u=s[7],g=s[8],p=a.includes(c),m=a.includes(f);isHead=a.includes(u);isTail=a.includes(g);if(p){a=a.replace(r,"").replace(o,"").replace(l,"").replace(_,"").replace(d,"").replace(c,"").replace(f,"").replace(u,"").replace(g,"")}var h=a.replace("!edit ","").replace("!view ",""),v=h.split("\\").pop().split("/").pop(),b=h.replace("/"+v,"");progress.start();if(p){edit_file(v,b||"/",false,1,0,m,isHead,isTail)}else{edit_file(v,b||"/")}return}if($(e.target).is(".gl-icon-select")){e.preventDefault();$(t).trigger("contextmenu");return}set_pjax_send_headers(t.href);vars.previous_request_progressive=t.href;if(t&&t.href&&unbuffered_header_processor_allow(t.href)){e.preventDefault();unbuffered_header_processor(t.href,0);return}if(e&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey){$(t).attr("href",link_type_convert($(t).attr("href"),1))}if(e&&(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)){setTimeout(function(){despinnerfy_buttons()},400)}v___theme_connection_triggered_origin=1;if(e.target.href&&$(e.target).hasClass("page_footer_submit")&&e.target.href.includes(".cgi/")&&!e.target.href.includes("/link.cgi/")){var x=URI(e.target.href),w=x.directory();if(w&&w.includes(".cgi")){var y=w.split("/");y=y.filter(function(e){return!e.includes(".cgi")});y=y.join("/");e.target.href=e.target.href.replace(w,y)}}$.pjax.click(e,{timeout:0,push:n,type:get_pjax_type(t),container:"[data-dcontainer]",fragment:"[data-dcontainer]"});vars.previous_request=e;vars.previous_request_progressive=String()}function get_onbeforeunload_message($eventData,$thisData,$justEval){var popovers=$(".popover.in"),are_there_popovers=popovers.length,delay=are_there_popovers?120:0,before_onload_class_prompt="bootbox-o__f_m-beforeclose-prompt";if(are_there_popovers){popovers.popover("hide")}setTimeout(function(){if($("."+before_onload_class_prompt+"").length){return}var save_prompt=bootbox.dialog({message:""+theme_language("global_unbeforeunload_message")+"",title:'<i class="fa fa-fw fa-question-circle font-size-80p '+before_onload_class_prompt+'">&nbsp;&nbsp;</i> <strong class="font-size-90p">'+theme_language("global_unbeforeunload_title")+"</strong>",buttons:{main:{label:'&nbsp;<i class="fa fa-fw fa-arrow-circle-o-left">&nbsp;&nbsp;</i>'+theme_language("global_cancel")+"&nbsp;&nbsp;",className:"btn-default vertical-align-top margined-left--2",callback:function(){despinnerfy_buttons();plugins.navigation.detect();plugins.navigation.select.back()}},danger:{label:'&nbsp;<i class="fa fa-fw fa-arrow-circle-o-right">&nbsp;&nbsp;</i>'+theme_language("global_continue")+"&nbsp;&nbsp;",className:"btn-danger vertical-align-top margined-left--2",callback:function(){set_onbeforeunload_status(0,0);set_onbeforeunload_status(0,1);if(vars.ajax.progressing){progressive_request.abort()}try{if(typeof v___location_file==="string"){if(v___location_file.includes("tconfig.cgi")){theme.config.current.reset()}}}catch(e){}if($justEval==="ev"){eval($thisData);return}else{$.each($justEval,function(func,params){var caller=func.includes(".")?eval(func):window[func];caller.apply(null,params)})}var switchStr="::switch::";if($thisData&&$thisData.href&&Test.strContains($thisData.href,switchStr)){$('.switch-toggle input[id="'+$thisData.href.replace(""+switchStr+"","")+'"]').trigger("click");return}var $is_form=$($thisData).is("form");if(!$is_form){if($thisData.href&&$thisData.href.length){get_pjax_content($thisData.href,false)}}else if($is_form){get_pjax_action_submit($eventData)}}}},onEscape:function(){despinnerfy_buttons();plugins.navigation.detect()}});save_prompt.on("shown.bs.modal",function(){var e=$(this);setTimeout(function(){e.find('[data-bb-handler="danger"]').focus()},0)})},delay)}function get_onbeforeunload_status(){return $('.container-fluid > .panel > .panel-body[data-unload-warning="1"]').length||$('html[data-unload-warning="1"]').length}function set_onbeforeunload_status(e,t){var i=t?"html":".container-fluid > .panel > .panel-body",n="data-unload-warning";if(e){$(i).attr(n,"1")}else{$(i).removeAttr(n)}}function set_onbeforeunload_status_native(e){var t="html",i="data-unload-error";if(e){$(t).attr(i,"1")}else{$(t).removeAttr(i)}}function get_onbeforeunload_status_native(){return $('html[data-unload-error="1"]').length}function theme_panels_sort(e){var t,i;if(e==="slider"){t="#right-side-tabs .extended-list-data  > .panel-group#extended_sysinfo";i=""+t+" > .panel"}else if(e==="dashboard"){t="#extended_sysinfo-1.panel-group";i=""+t+" > .panel.panel-default"}else{return}if(!$(t).length){return}if(typeof settings_sysinfo_panels_order==="string"){if(settings_sysinfo_panels_order==="[object Object]"){settings_sysinfo_panels_order={}}else{settings_sysinfo_panels_order=settings_sysinfo_panels_order.replace(/'/g,'"');settings_sysinfo_panels_order=JSON.parse(settings_sysinfo_panels_order)}}if(!$.isEmptyObject(settings_sysinfo_panels_order)){for(var n in settings_sysinfo_panels_order){$(t).find('.panel[data-referrer="'+n+'"]').attr("data-sorter",settings_sysinfo_panels_order[n])}}settings_sysinfo_panels_order=JSON.stringify(settings_sysinfo_panels_order);var a=$(i).sort(function(e,t){return $(e).attr("data-sorter")>$(t).attr("data-sorter")?1:-1}).appendTo(t)}function theme_cache_clear(e){theme.veiled(1);plugins.messenger.post('<i class="fa fa-lg fa-fw fa2 fa2-delete fa-1_25x"></i>'+theme_language("clear_cache_initiated")+" "+theme_language("global_please_wait")+'&nbsp;&nbsp;&nbsp;<span class="cspinner"><span class="cspinner-icon white smallest margined-top-4"></span></span>',0,"info","themeUpgrade",0);typeof stats!=="undefined"&&stats.general.disable();$.post(v___location_prefix+"/index.cgi/?xhr-theme_clear_cache=1");set_onbeforeunload_status(0,0);localStorage.clear();$(".right-side-tabs-dismiss .fa-trash, .right-side-tabs-dismiss .fa-refresh").trigger("click");e&&spinnerfy_buttons($(e),[1.5,-33,"small",1e3]);setTimeout(function(){theme_reload()},1e3)}async function theme_password_generator(e){var t=e.find(".fa"),i=e.outerHeight()<=28?"fa-0_90x line-height-11 margined-left--1 margined-right-0":"fa-0_90x line-height-11 margined-right--2",n="fa fa-spin fa-reload fa-spin-fast";e.find(n.replace(/fa/g,".fa").replace(/\s+/g,"")).remove();var a=$('<i class="'+n+" cursor-na "+i+'"></i>').appendTo(e),s="pointer-events-none";t.addClass(s);t.hide();const r=await $.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-gennewpass=get",data:false,dataType:"text"});a.remove();t.show();t.removeClass(s);if(!r){var o="15|a-z,A-Z,0-9,#",l=o.split("|")[1].split(","),_=parseInt(o.split("|")[0]),d="",c="";if($.inArray("a-z",l)>=0){d+="abcdefghijklmnopqrstuvwxyz"}if($.inArray("A-Z",l)>=0){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"}if($.inArray("0-9",l)>=0){d+="0123456789"}if($.inArray("#",l)>=0){d+="![]{}()%&*$#^<>~@|"}for(var f=0;f<_;f++){c+=d.charAt(Math.floor(Math.random()*d.length))}return c}return r}function get_cookie(e){var t=e+"=";var i=document.cookie.split(";");for(var n=0;n<i.length;n++){var a=i[n];while(a.charAt(0)==" ")a=a.substring(1,a.length);if(a.indexOf(t)==0)return a.substring(t.length,a.length)}return null}function array_swap(e){var t={};for(var i in e){t[e[i]]=i}return t}function theme_module_check_clone(e){if(e){var t=e.replace(/\//g,"");if(v___module&&v___module!==t&&v___module.includes(t)){return 1}}return 0}function theme_buttonify(e,t,i,n,a,s,r,o,l,_){typeof a=="undefined"?a=false:false;typeof s=="undefined"?s="":false;typeof r=="undefined"?r="":false;typeof o=="undefined"||o==false?o="":false;typeof l=="undefined"||l==false?l=false:false;typeof _=="undefined"||_==false?_=false:false;$.each(e,function(e,d){if(v___location_path==v___location_prefix+d||theme_module_check_clone(d)||d===null){if(s!==1&&!$.isArray(s)){s=s.split("~");r=r.split("~")}$.each($(s),function(e,i){if(s!==1){var n=new RegExp(RegExp.quote(i),"g");$(""+t+':not(.f__lnk_t_btn):contains("'+i+'")').replaceText(n,r[e])}}).promise().done(function(){var e="",s="";if(o&&o.indexOf("~")>-1){o=o.split("~");e=o[0];s=o[1]}$.each($(t).find(i),function(){var r=$(t).find(i).parents(".btn-group.ui_links_row");if(r.length){r.contents().unwrap()}if($(this).parents(t).hasClass("f__lnk_t_btn")&&!Test.strContains(n,"---forced")){return}if(l){var o=new RegExp(RegExp.quote(l),"g");$(this).parent().replaceText(o,_?_:"")}if(n&&n.indexOf("__center__")>-1){$(i).parent().addClass("text-center").addClass("f__lnk_t_btn-el")}var d=" vertical-align-baseline",c=false;if(a&&a.includes("no-vt-al")){d=""}if(a&&a.includes("no-btn-text")){c=true}$(this).html(e+("<span"+(c?' class="hidden-force"':"")+">"+$(this).text().replace(/\.\.$/,"")+"</span>")+s).addClass(n).addClass("f__lnk_t_btn-el").removeClass("ui_link").prepend(a?'<i class="fa fa-fw margined-left--3 '+a+""+d+""+(c?" margined-right--3":"")+'">'+(c?"":"&nbsp;&nbsp;")+"</i>":"");$(this).parent(t).addClass("f__lnk_t_btn");$(this).parent("label").addClass("f__lnk_label_cnt").parent("td").addClass("f__lnk_td_cnt")})})}})}function theme_toggle_night_mode(){var e=$("body .user-link.palette-toggle"),t=e.find(".fa-sun").length?0:1,i=session.server.data("data-night-mode"),n=session.server.data("data-default-theme"),a="gainsboro",s=$("input, textarea").is(":focus");if($.support.spa&&s){return}if(!$.support.spa){return}if($("body").find(".modal.in:visible").length){return}var r=function(){var e=v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&$(".__page .piechart").length;if(e){$.each($(".piechart"),function(){$(this).addClass("bg-filter-blur-grayscale-invert-opacity75").data("easyPieChart").update(0)});setTimeout(function(){get_pjax_content(v___location_prefix+"/sysinfo.cgi")},100)}theme.config.save()};if(t===1){e.find(".fa-moon").removeClass("fa-moon").addClass("fa-sun");progress.start();$(document).find(".settings_navigation_color_toggle").addClass("hidden");var o=$("html").find('head link[href*="palettes"][data-palette]');var l=document.styleSheets.length+1;$("html").find("head").append('<link href="'+v___location_prefix+"/unauthenticated/css/palettes/gunmetal."+v___source_type+".css?"+$.now()+'" rel="stylesheet" type="text/css" data-palette>');$("html").find("head").append('<link href="'+v___location_prefix+"/unauthenticated/css/palettes/nightrider."+v___source_type+".css?"+$.now()+'" rel="stylesheet" type="text/css" data-palette>');var _=function(e){var t=function(){session.server.data("data-theme","gunmetal");o.remove();session.server.data("data-bgs","nightRider");session.server.data("data-night-mode",1);v___theme_night_mode_enabled=1;v___theme_night_mode=1;settings_force_night_mode=v___theme_night_mode;if(!(v___location_path_lead_unslashed==v___location_prefix_unslashed_trail_slashed+"sysinfo.cgi"&&$(".__page .piechart").length)){setTimeout(function(){progress.end()},201)}r()};var i=document.styleSheets;try{if(!i[e]||!i[e].cssRules[0]){setTimeout(function(){_(e)},200);return}}catch(e){if(e.name!=="SecurityError"){setTimeout(function(){t()},800);return}return}t()};_(l)}else{$("body").find(".settings_navigation_color_toggle").removeClass("hidden");e.find(".fa-sun").removeClass("fa-sun").addClass("fa-moon");var d=$("html").find('head link[href*="gunmetal"]');session.server.data("data-default-theme")!="blue"&&$("html").find("head").append('<link href="'+v___location_prefix+"/unauthenticated/css/palettes/"+n.toLowerCase()+"."+v___source_type+".css?"+$.now()+'" rel="stylesheet" type="text/css" data-palette>');session.server.data("data-theme",n);d.remove();session.server.data("data-bgs",a);session.server.data("data-night-mode",0);$("html").find('head link[href*="nightrider"]').remove();v___theme_night_mode_enabled=0;v___theme_night_mode=0;settings_force_night_mode=v___theme_night_mode;r()}}function theme_spinner_small(e,t,i){e=e||"in-btn-md";t=t||"dark";i=i||"width:12px; height:12px; margin-right: 7px;";return'<span class="cspinner '+e+'" style="position: relative"><span class="cspinner-icon '+t+'" style="'+i+'"></span></span>'}function despinnerfy_buttons(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0,t=arguments.length>0&&arguments[1]!==undefined?arguments[1]:0,i=t?t:$(".btn.disabled");$.each(i,function(){var t=$(this),i=t.find(".cspinner_container, .cspinner_custom"),n=i.prev("i.invisible, i.hidden-force");!e&&t.removeClass("disabled");n.removeClass("invisible hidden-force");i.remove()})}function despinnerfy_button(e){var t=e.find(".cspinner_container, .cspinner_custom"),i=t.prev("i.invisible, i.hidden-force");e.removeClass("disabled");i.removeClass("invisible hidden-force");t.remove()}function spinnerfy_buttons(e,t,i,n,a){var s=e.attr("onclick")&&e.attr("onclick").indexOf("blank")!==-1||e.parents("form").attr("target")&&e.parents("form").attr("target").indexOf("blank")!==-1?true:false,r=e.hasClass("heighter-28"),o=e.css("height")=="28px",l=e.hasClass("btn-tiny"),_=e.hasClass("btn-lg")||e.css("height")=="35px",d=e.outerHeight(),c=parseInt(d/(l?5:r||o?4.4:_?3.6:4))+(browser.detect.firefox()?0:0);c+=r||o?.5:0;var f=e.find(".fa, .fa2").first().outerWidth(),u=parseInt(f/(l?1.6:r||o?1.15:_?1.4:1.3))-.5,g=e.find(".fa"),p='span class="cspinner_container" style="position: absolute; top: '+c+"px; left: "+u+'px;"><span class="cspinner" style="left: 0"',m="cspinner-icon white",h="cspinner-icon dark",v=typeof t=="undefined"||t==false?false:t,b="<"+p+'><span class="'+m+" "+(v?v[2]?v[2]:"":r||o?"smaller":"small")+'"></span></span></span>',x="<"+p+'><span class="'+h+" "+(v?v[2]?v[2]:"":r||o?"smaller":"small")+'"></span></span></span>';if(l){b="<"+p+'><span class="'+m+' smaller2"></span></span></span>',x="<"+p+'><span class="'+h+' smaller2"></span></span></span>'}setTimeout(function(){!s&&e.addClass("disabled")},10);if(g.length&&!s){var w=function(){if(e.hasClass("btn-default")){g.addClass("invisible").after(x)}else{g.addClass("invisible").after(b)}};if(a){e.addClass("disabled");w()}else{setTimeout(function(){w()},10)}}typeof i==undefined?i=false:false;typeof n==undefined?n=false:false;if(v[3]||i){setTimeout(function(){e.removeClass("disabled");g.removeClass("invisible");e.find(".cspinner_container").remove()},i?i:v[3])}if(n){setTimeout(function(){progress.end()},400)}}function spinnerfy_button_tiny(e){var t=theme_spinner_small("margined-top--1 cspinner_custom","white","width: 8px; height: 8px; margin-right: 5px; border-width: 1px;");e.find(".fa").first().addClass("hidden-force").after(t)}function theme_language(e,t){typeof t=="undefined"?t=false:false;var i="theme_xhred_"+e,n=v___theme_language;if(t){var a=Convert.arrFlip(n);return a[$.trim(i)]||a[$.trim(e)]}else{var s=n[i]||n[e];if(s&&platform.detect()==="mac"){s=s.toString();s=s.replaceAll("Ctrl +","⌘ +");s=s.replaceAll("Alt +","⌥ +");s=s.replaceAll("Ctrl+","⌘+");s=s.replaceAll("Alt+","⌥+");s=s.replaceAll("Shift+","⇧+");s=s.replaceAll("+Shift","+⇧")}return s}}function theme_copy_to_clipboard(e,t){var i=function(e){var t="tmp-clipboard-obj";$("body").append('<button class="hidden '+t+'" data-clipboard-text="'+Convert.quoteEscape(e)+'"></button>');var i=new ClipboardJS("."+t+"");$("."+t+"").trigger("click").remove();i.destroy()};if(t){i(e)}else{try{navigator.clipboard.writeText(e)}catch(t){i(e)}}}function theme_post_event_handler(e,t){if(!t._isKeyCombo&&t._isHuman){var i=$(quirks.active_element());if(i&&i.length&&i.is('input[type="text"], .ui_textbox, textarea, .ui_textarea')){return}plugins.dashboard.events("support-header-icon",e,t);plugins.dashboard.events("copy/paste-header-icon",e,t);plugins.messenger.events("message-user-select",e,t);snippets.page.events(e,t)}}function theme_post_event_window_state_activated(e){theme.visibility.set(true);e==="focus"&&theme_window_focused();plugins.dashboard.events("reset");snippets.page.events("reset")}function theme_post_event_window_state_deactivated(e){theme.visibility.set(false)}function get_utc_offset(){return session.server.data("time-offset")}function check_reboot(){if(core.curModuleFile("init","reboot.cgi")&&!document.querySelector('.container-fluid [action="reboot.cgi"]')){setTimeout(function(){connection_error({status:0,reboot:1},1,{body:theme_language("connection_reboot_details"),title:theme_language("connection_reboot"),icon:"refresh-mdi"});vars.pjax.post_reboot=true},1e3)}}function xhr_response_text_to_html(e){var t=null;if(typeof e==="object"){var i=e.responseText;if(typeof i==="string"&&i){try{var n=new DOMParser,a=n.parseFromString(i,"text/html"),s=$($(a).find("body"));if(s&&s.length){var r=s[0].childNodes;if(r&&r.length){t=$(r).add(s);return t.length?t:null}}}catch(e){}}}return t}function connection_error(e,t,i,n){var a=function(e){var t=vars.previous_request,i=typeof t==="object"&&t.currentTarget&&t.currentTarget.action&&t.currentTarget.action.toString().includes(e);return i};if(core.curModule("webmin")&&a("/change")){return}var s=vars.previous_request_progressive;if(typeof s==="object"){s=$(s.target).serialize();if(v___location_file==="update.cgi"&&s.includes("mode=updates")&&s.includes("u=webmin")){return}}if(e&&e.status===500&&vars.ajax.progressing||n&&n.url&&n.url.includes("/stats")&&a("/wizard")){return}var r=function(e,t){var i=String(),n=xhr_response_text_to_html(e);if(n&&(n.filter("p").length||t&&n.find("[data-fatal-error-text]").length)){var a=$.trim(n.filter("p").html())||$.trim(n.find("[data-fatal-error-text]").html());if(a){var s=a.replace(/\n/g," ").match(/(.*)\sat\s\/|(.*)/);if(s){i=" – "+Convert.htmlStrip(s[2]||s[1])}}}return i};var o=r(e);if(e.status===502&&o&&o.includes("tree.cgi")){return}progress.end();v___theme_ajax_error=1;if((v___theme_connection_triggered_origin===1||t)&&(e.status===0||e.status===400||e.status===404||e.status===500||e.status===502||e.status===503)){var l="modal-connection-warning",_="hidden.bs.modal",d=e;if(vars.pjax.post_reboot){vars.pjax.post_reboot=false}if(!$("."+l).length&&!this.called){this.called=1;$.ajax({context:this,type:"GET",url:v___location_prefix+"/index.cgi/?xhr-error=1",data:false,dataType:"text",timeout:3e3,success:function(){this.called=0},error:function(){var e=theme_language("connection_error_details").replace("%server",location.host+v___location_prefix),t=theme_language("connection_lost"),n="unplugged",a="danger";var s="virtual-server",r="_domain.cgi",o="_form.cgi",c=core.curModuleFile(s,"wizard.cgi"),f=$('.container-fluid form[action*="wizard.cgi"]'),u="wizardinputdefdommanual",g=f.find('input[type="radio"][name="defdom"], input[type="text"][name="defhost"]').length===3||f.find("#"+u+"").length,p=core.curModuleFile(s,"edit"+r+"")||core.curModuleFile(s,"save"+r+"")||core.curModuleFile(s,"delete"+r+"")||core.curModuleFile(s,"cert"+o+"")||core.curModuleFile(s,"rename"+o+"")||core.curModuleFile(s,"rename.cgi")||core.curModuleFile(s,"domain"+o+"")||core.curModuleFile(s,"domain_setup.cgi")||core.curModuleFile(s,"letsencrypt.cgi")||c;if(p){var m=theme_language("theme_xhred_connection_error_details_ssl");m=m.replace("<a>",'<a data-ssl-warning-fixer class="cursor-pointer">');var h="[data-ssl-warning-fixer]",v="click.sslwarn";$("body").off(v,h).on(v,h,function(e){e.preventDefault();var t=560,i=300;window.open(""+(location.origin+v___location_prefix)+"/?xnavigation=ERR_CERT_AUTHORITY_INVALID","net::ERR_CERT_AUTHORITY_INVALID","menubar=no,location=no,resizable=no,scrollbars=no,status=no,width="+t+"px,height="+i+"px").focus()});e=e.replace("<ul>","<ul><li>"+m+"</li>");if(g){if(c){f.find('input:not([type="submit"]):not([name="step"])').removeAttr("name").removeAttr("id");$("<input>").attr({type:"hidden",name:"defdom",id:u,value:0}).appendTo(f)}}}if(i){e=i.body;t=i.title;n=i.icon;l+=" modal-reboot",a="warning"}var b="loading-dots",x=new Date;x=dayjs(x.toISOString()).format(config_portable_theme_locale_format_full);var w='<sup class="fa fa-clock" data-toggle="tooltip" data-title="'+(theme_language("connection_lost")+": <br>"+x)+'"></sup>';if(d.reboot){w=String()}theme_alert(t+'<span class="'+b+'"></span>'+w,e,false,"md",a,""+n+" fa-lg","7 "+l+"",0);setTimeout(function(){$("."+l+" ."+b+" + .fa").tooltip({placement:"auto bottom",trigger:"hover",html:true,delay:{show:vars.plugins.tooltip.delay.show,hide:vars.plugins.tooltip.delay.hide}})},150);setTimeout(function(){if(v___theme_connection_reestablish===0){connection_reestablish();v___theme_connection_reestablish=1;this.called=0;$("."+l).on(_,function(){v___theme_connection_reestablish=0;progress.end();if(g){var e=f.find('input[name="parse"]').prev('button[name="parse"]');e.length&&e.trigger("click")}if(p){plugins.navigation.reload()}})}},1);setTimeout(function(){plugins.navigation.load.stop();plugins.navigation.detect();plugins.navigation.switch.reset();despinnerfy_buttons();plugins.shell.unlock()},100)}})}}else{var c=r(e,true),f=String();if(e.status===413){var u=theme_wiki_link("global_error_more_details_online","https://github.com/authentic-theme/authentic-theme/wiki/Error:--413---Request-Entity-Too-Large");if(u){f=". <br>"+u}}var g=String();if(n&&n.url){g="&nbsp; — <kbd data-error>"+n.url+"</kbd>"}if(e.status!==200){e.status&&plugins.messenger.post('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>'+(theme_language("global_error")+":&nbsp;&nbsp;"+e.status+" - "+e.statusText+""+c+f+g),10,"error","ajaxError");setTimeout(despinnerfy_buttons,400)}else if(c&&c.toString().toLowerCase().includes("no space left on")){plugins.messenger.post({type:"error",icon:"fa2 fa2-disk fa-1_25x",id:"connection_error_200_disk_quota_error",title:theme_language("disk_quota_error_title"),message:theme_language("disk_quota_error_message"),layout:1,displayMode:1,position:"bottomCenter",cancel:true,timeout:0})}}}function theme_wiki_link(e,t){var i=theme_language(e),n=i.match(/%1(.*)%1/);if(n){var a=new RegExp(n[1],"g");i=i.replace(/%1/g,String()).replace(a,'<a target="_blank" class="text-success" href="'+t+'">'+n[1]+"</a>");return i}else{return String()}}function connection_modal_close(){var e="modal-connection-warning";$("."+e).modal("hide");v___theme_connection_reestablish=0}function connection_reestablish(){var e="modal-connection-warning";$("."+e).length&&$.ajax({type:"GET",url:v___location_prefix+"/index.cgi/?xhr-check=1",data:false,timeout:1e3,dataType:"text",success:function(){$("."+e).removeClass("modal-reboot");$("."+e).find(".modal-header").removeClass().addClass("modal-header background-success background--bordered").find("h4").html('<i class="fa fa-fw fa-plug fa-lg">&nbsp;&nbsp;</i> '+theme_language("connection_success"));$("."+e).find(".modal-body").html("<p>"+theme_language("connection_success_details")+"</p>");if(vars.pjax.post_reboot){get_pjax_content(v___location_prefix+"/sysinfo.cgi",["success",connection_modal_close]);vars.pjax.post_reboot=false;vars.previous_request=String()}else{setTimeout(function(){connection_modal_close()},300)}},error:function(){v___theme_connection_reestablish&&setTimeout(function(){connection_reestablish()},1e3)}})}function control_server_theme_temp_data(e,t,i,n,a,s){return $.ajax({type:"POST",url:v___location_prefix+"/index.cgi/?xhr-theme_temp_data=1&xhr-theme_temp_data_action="+e+"&xhr-theme_temp_data_name="+t+"&xhr-theme_temp_data_value="+(i?Convert.uriEncodeComponent(i):i)+"&xhr-theme_temp_data_keep="+n+"",data:false,dataType:"text",success:function(e){if(!session.status(e)){return}if(typeof a==="function"&&(!e.length||e.length&&s===1)){a()}},error:function(e){}})}function get_server_theme_temp_data(e,t,i,n){return control_server_theme_temp_data("get",e,false,t,i,n)}function set_server_theme_temp_data(e,t){control_server_theme_temp_data("set",e,t)}function page_control_header(){var e=".header",t="#headln2l",i="#headln2c",n=$(""+e+" "+t+""),a=$(""+e+" "+i+"");if(matchMedia("(max-width: 767px)").matches){if(n.next().is(i)){var s=a.detach();n.before(s)}}else{if(a.next().is(t)){var s=a.detach();n.after(s)}}}function page_display(){var e=$("body"),t=$("body").find(".container-fluid"),i=$("head");t.css({opacity:1,"pointer-events":"auto"});e.css("overflow","auto");i.find("#__tmp_no_overflow").remove()}function page_remove_progress(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;despinnerfy_buttons(e);setTimeout(function(){get_server_theme_temp_data("redirected",0)},100);setTimeout(function(){progress.end()},600)}function page_adjust(e,t){if(typeof $.injectCSS=="function"){$("style[data-persist]").remove();t?t="translate("+t+"px, 0px) !important":t=false;$.injectCSS({"#sidebar":{left:-e+"px",width:e+"px",transform:t},".switch-toggle":{width:e+"px"},".__page":{"margin-left":e+"px !important"},".autocomplete-suggestions":{"min-width":e-23+"px !important"},".__logo":{width:e+"px","max-width":e+"px"},"#jsPanel-replacement-container":{left:($.support.spa?settings_leftmenu_width-1:-2)+"px"}});if($("aside select").length&&core.curModuleFile("webmin","edit_themes.cgi")&&!$.browser.mobile){$("aside select[data-autocomplete-title]").attr("style","width:"+(e-24)+"px; margin-top: 0 !important");plugins.navigation.select.load()}}}function theme_modal_dismiss(){$(".modal.in").find("[data-dismiss]").trigger("click")}function theme_shortcut_check(e){if(!e.endsWith("/")){e+="/"}if(!e.startsWith("/")){e="/"+e}if(core.moduleAvailable(URI(e).directory().replace(/\//g,""))){return true}else{return false}}function theme_shortcuts_generate(e){var t,i=theme_shortcuts_modifier_name();if(e==="conf"){var n=settings_hotkey_open_module_config_privileged,a=n==="dot"?".":n==="comma"?",":n;t="("+i+" + "+a.toString().toUpperCase()+")"}else{t="("+i+" + "+e.toString().toUpperCase()+")"}return t}function theme_shortcuts_modifier_name(e){var t,i=e||settings_hotkey_toggle_modifier,n=platform.detect()==="mac";if(n){if(i==="ctrlKey"){t="⌃"}else if(i==="altKey"){t="⌥"}else if(i==="shiftKey"){t="⇧"}else if(i==="metaKey"){t="⌘"}}else{if(i==="ctrlKey"){t="Ctrl"}else if(i==="altKey"){t="Alt"}else if(i==="shiftKey"){t="⇧"}else if(i==="metaKey"){t="Meta"}}return t}function theme_shortcuts_modifier_unique(e){var t=["ctrlKey","altKey","shiftKey","metaKey"],i=t.indexOf(settings_hotkey_toggle_modifier),n=false;t.splice(i,1);t.map(function(t){if(e[t]&&!n){n=true}});return!n}function theme_shortcuts(e){var t=e.keyCode?e.keyCode:e.which;if(Test.editing()||$(".modal-backdrop.in").length||$(".__page").hasClass("single-page")){return}if(vars.page_interaction===0){if(t===8&&e.shiftKey){window.history.forward();return}else if(t===8){window.history.back();return}}if(settings_hotkeys_active){var i=theme_shortcuts_modifier_unique(e);if(e.ctrlKey&&e.altKey&&e.metaKey&&e.shiftKey&&String.fromCharCode(e.which)=="R"){!theme.veiled(-1)&&theme_cache_clear()}if(get_access_level()===0&&e.ctrlKey&&e.altKey&&e.shiftKey&&e.metaKey&&String.fromCharCode(e.which)=="U"){!theme.veiled(-1)&&theme.update(0)}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_open_module_config_privileged||settings_hotkey_open_module_config_privileged==="dot"&&e.which===190||settings_hotkey_open_module_config_privileged==="comma"&&e.which===188){e.preventDefault();if(vars.events.keypressed.shift){$('aside .user-links a[href*="config.cgi"]').trigger("click")}else{$('.container-fluid > .panel > .panel-heading a[href*="config.cgi"]').trigger("click")}}if(!i){return true}if(!session.alive){e.preventDefault();return}if(e[settings_hotkey_toggle_modifier]){if((e.which===37||e.which===39)&&v___location_file&&(v___location_file.toString().includes("config.cgi")||v___location_file.toString().includes("edit_tmpl.cgi"))){var n=$('.container-fluid  .ui_form[action*="config.cgi"], .container-fluid  .ui_form[action*="edit_tmpl.cgi"]'),a=function(e){return'button[name="'+e+'"]:not(.disabled)'};n.find(e.which===37?a("nprev"):a("nnext")).trigger("click")}if(String.fromCharCode(e.which)=="1"&&settings_hotkey_custom_1_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_1_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_1_user)}if(String.fromCharCode(e.which)=="2"&&settings_hotkey_custom_2_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_2_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_2_user)}if(String.fromCharCode(e.which)=="3"&&settings_hotkey_custom_3_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_3_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_3_user)}if(String.fromCharCode(e.which)=="4"&&settings_hotkey_custom_4_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_4_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_4_user)}if(String.fromCharCode(e.which)=="5"&&settings_hotkey_custom_5_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_5_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_5_user)}if(String.fromCharCode(e.which)=="6"&&settings_hotkey_custom_6_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_6_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_6_user)}if(String.fromCharCode(e.which)=="7"&&settings_hotkey_custom_7_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_7_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_7_user)}if(String.fromCharCode(e.which)=="8"&&settings_hotkey_custom_8_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_8_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_8_user)}if(String.fromCharCode(e.which)=="9"&&settings_hotkey_custom_9_user){e.preventDefault();theme_shortcut_check(settings_hotkey_custom_9_user)&&get_pjax_content(v___location_prefix+settings_hotkey_custom_9_user)}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_focus_search){e.preventDefault();$(".form-control.sidebar-search").focus()}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_toggle_key_webmin){e.preventDefault();$('.switch-toggle input[id="open_webmin"]').trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_toggle_key_virtualmin){e.preventDefault();$('.switch-toggle input[id="open_virtualmin"]').trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_toggle_key_cloudmin){e.preventDefault();$('.switch-toggle input[id="open_cloudmin"]').trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_toggle_key_usermin){e.preventDefault();$('.switch-toggle input[id="open_usermin"]').trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_toggle_key_webmail){e.preventDefault();$('.switch-toggle input[id="open_webmail"]').trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_toggle_key_night_mode){e.preventDefault();theme_toggle_night_mode()}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_navigation&&window.matchMedia("(min-width: 1080px)").matches){e.preventDefault();$('aside [data-collapse-trigger="1"]').addClass("m").trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_slider&&window.matchMedia("(min-width: 1366px)").matches){e.preventDefault();$('[data-trigger="side_slider_pinned"]').trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_toggle_slider){e.preventDefault();$(".right-side-tabs-toggler:not(.hidden) .btn-menu-toggler").trigger("click")}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_reload&&$('.user-links a[data-refresh="true"]')){e.preventDefault();page_refresh()}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_shell2&&theme_shortcuts_modifier_unique(e)&&(core.moduleAvailable("shell")==1||plugins.shell.type())){e.preventDefault();if(session.server.data("terminal")==1){if(plugins.shell.status()){plugins.terminal.close()}else{plugins.terminal.open()}}else{if(plugins.shell.status()){plugins.shell.close()}else{plugins.shell.open()}}return}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_sysinfo){e.preventDefault();if(plugins.navigation.switch.dashboard.get()==true){plugins.navigation.switch.dashboard.set()}else{get_pjax_content(v___location_prefix+"/sysinfo.cgi")}}if(String.fromCharCode(e.which).toLowerCase()==settings_hotkey_favorites){e.preventDefault();if($(".favorites-menu-outer").css("left")!="0px"){$(".user-link.favorites").trigger("click")}else{$(".favorites-menu-outer").removeClass("hover")}}}else{if(e.keyCode===191){e.preventDefault();$(".form-control.sidebar-search").focus()}}return false}}function sysinfo_replace_dismiss_buttons(){var e=$('#system-status [onclick*="webmin/hide.cgi?id"], #right-side-tabs [onclick*="webmin/hide.cgi?id"], [data-referrer^="announce"] [onclick*="webmin/hide.cgi?id"]');$.each(e,function(){var e=$(this).attr("onclick"),t=$(this).text();if($(this).is("input")){t=$(this).val()}$(this).before('<a class="btn btn-grey btn-tiny margined-top-3" data-panel-ctl data-href-background="'+e.split('"')[1]+'"><i class="fa fa-fw fa-times-circle-o"></i> '+t+"</a>");$(this).remove()});var t=$('#system-status [onclick*="window.open"][onclick*="_new"], #right-side-tabs [onclick*="window.open"][onclick*="_new"], [data-referrer^="announce"] [onclick*="window.open"][onclick*="_new"]');$.each(t,function(){var e=$(this).attr("onclick"),t=$(this).text();if($(this).is("input")){t=$(this).val()}var i="btn-primary",n=e.split('"')[1],a="fa fa-fw fa-external-link";if(n.includes("pa"+"t"+"r"+"eo"+"n")){a="fa2 fa-fw fa2-kiss-wink-heart-bold";i="btn-success"}$(this).before('<a class="btn '+i+' btn-tiny margined-top-3" data-panel-ctl target="_blank" rel="noreferrer" href="'+n+'"><i class="'+a+'"></i> '+t+"</a>");$(this).remove()})}function get_access_level(){if(vars.level!=""&&vars.level!==-1){return parseInt(vars.level)}else{return parseInt(session.server.data("level"))}}function theme_updating(){return theme_message_exists("themeUpgrade")}function theme_message_exists(e){return plugins.messenger.toast.get(e)}function theme_message_dismiss(e){return plugins.messenger.toast.hide(e)}function theme_message_and_unlock(e,t){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:String();var a=arguments.length>4&&arguments[4]!==undefined?arguments[4]:"info";var s=arguments.length>5&&arguments[5]!==undefined?arguments[5]:3;var r=arguments.length>6&&arguments[6]!==undefined?arguments[6]:0;plugins.messenger.post('<i class="fa fa-lg fa-fw '+e+'"></i>'+theme_language(""+t)+"</code>&nbsp;",s,a,n,r);setTimeout(function(){page_remove_progress(i)},600)}function theme_alert(e,t,i,n,a,s,r,o){typeof i==="undefined"||i==false?i=false:false;typeof n==="undefined"||n==false?n="md":false;typeof a==="undefined"||a==false?a="danger":false;typeof s==="undefined"||s==false?s="exclamation-triangle":false;typeof r==="undefined"||r==false?r="7":false;typeof o==="undefined"||o==false?o=false:false;var l=$.isArray(i)?i:[false,false],_="modal-global-notification",d=""+'<div class="modal fade '+_+" "+r+'" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static">'+'<div class="modal-dialog modal-'+n+'">'+'<div class="modal-content">'+'<div class="modal-header background-'+a+' background--bordered">'+'<button type="button" class="close" data-dismiss="modal" aria-label="'+theme_language("global_close")+'"><span aria-hidden="true">&times;</span></button>'+'<h4 class="modal-title"><i class="fa fa-fw fa-'+s+'">&nbsp;&nbsp;</i> '+(theme_language(e)?theme_language(e):e)+"</h4>"+"</div>"+'<div class="modal-body">'+"<p>"+(theme_language(t)?theme_language(t):t)+"</p>"+"<div"+($.isArray(i)?"":' class="hidden"')+">"+'<button class="btn btn-default btn-xs btn-block margined-bottom-1" type="button" data-toggle="collapse" data-target="#collapse-'+_+'" aria-expanded="false" aria-controls="collapse-'+_+'">'+theme_language(i[0])+"</button>"+'<div class="collapse" id="collapse-'+_+'">'+'<div class="well">'+i[1]+"</div>"+"</div>"+"</div>"+"</div>"+"</div>"+"</div>"+"</div>";setTimeout(function(){if(!$("body").hasClass("modal-open")){$("body").append(d);$("."+_).modal("show");$("."+_).on("click",".modal-body a.label",function(e){$("."+_).modal("hide")});$("."+_).on("hidden.bs.modal",function(e){$("."+_).remove()})}},o)}function get_module_title(){$_right_menu_title=$("#headln2c");if($_right_menu_title.find("span[data-main_title]").text().length){return $_right_menu_title.find("span[data-main_title]").text()}else{if($_right_menu_title.text().length){return $_right_menu_title.text().text()}else{return"->"}}}function editor_background_save(e,t){if($('.container-fluid textarea[name="data"],'+'.container-fluid textarea[name="text"],'+'.container-fluid textarea[name="directives"],'+'.container-fluid textarea[name="manual"]').length===1&&$('.container-fluid textarea[name="data"],'+'.container-fluid textarea[name="text"],'+'.container-fluid textarea[name="directives"],'+'.container-fluid textarea[name="manual"]').parents("form").find('input[type="submit"]').length===1){if(!$(".CodeMirror").length){return}function i(){if(typeof __cm_editor_static!="undefined"){$(".container-fluid > .panel > .panel-body").attr("data-cm-line",""+__cm_editor_static.getCursor().line+","+__cm_editor_static.getCursor().ch+"").attr("data-cm-state",$('[data-form="submitter"]').hasClass("btn-warning")&&!$('[data-form="submitter"]').next("button").hasClass("disabled"))}}var n=$(document.body),a=".container-fluid > .panel > .panel-body",s=$(""+a+' textarea[name="data"], '+a+' textarea[name="text"], '+a+' textarea[name="directives"], '+a+' textarea[name="manual"]').parents("form"),r=s.find('button[type="button"]').length?s.find('button[type="button"]'):s.find('input[type="submit"]'),o='<i class="fa fa-fw fa-floppy-o margined-right-2">&nbsp;&nbsp;</i>',l=$(""+a+' textarea[name="directives"]').length?"-12px":"0",_=$(""+a+" select").val()?$(""+a+" select").val():$(".container-fluid .table-title").text()?$(".container-fluid .table-title").text():$(".container-fluid .panel-body tt:first").text()?$(".container-fluid .panel-body tt:first").text():$(".container-fluid #headln2c tt:first").text()?$(".container-fluid #headln2c tt:first").text():"";$(a+" .ui_reset").remove();$(a).addClass("magic-editor-container");r.parents("table.ui_form_end_buttons").prev("br").remove();r.parents("table.ui_form_end_buttons").prev("div.table-responsive").attr("style","margin-bottom: -4px !important");r.replaceWith('            <span class="btn-group" style="margin-top: '+l+'">                <button type="button" class="btn btn-'+(e?"warning":"success")+' btn-34 margined-top-5" data-form="submitter" data-form-onbeforeunload="'+(e?"1":"0")+'"><span>'+o+theme_language("global_save")+'&nbsp;</span></button>                <button type="submit" class="btn btn-default btn-34 margined-top-5"><span><i class="fa fa-fw fa-arrow-circle-o-left margined-right-2">&nbsp;&nbsp;</i>'+theme_language("global_save_and_close")+"&nbsp;</span></button>            </span>        ");var d=$(""+a+' button[type="button"]:not(.ui_form_end_submit)'),c=$(""+a+' button[type="submit"]:not(.ui_form_end_submit)'),f=window["__cm_editor_static"],u='button[type="submit"]:not(.disabled)',g='button[data-form="submitter"]:not(.disabled)';f.on("change",function(e,t){__cm_editor_static.save();d.addClass("btn-warning").removeClass("btn-success").attr("data-form-onbeforeunload",1);i()});n.off("mousedown.cm1").on("mousedown.cm1",""+a+" .CodeMirror",function(e){i()}).off("keydown.cm1").on("keydown.cm1",function(e){var t=e.keyCode?e.keyCode:e.which,i=$(""+a+' button[type="button"]:not(.ui_form_end_submit)'),n=i.not(".disabled"),s=$(""+a+' button[type="submit"]:not(.ui_form_end_submit)'),r=s.not(".disabled");if(i.find(".cspinner_container").length||s.find(".cspinner_container").length){e.preventDefault();return}if((t==13||t==83)&&f&&f.hasFocus()){if(t==83){var o=platform.detect()==="mac"?e.metaKey:e.ctrlKey;if(!e.shiftKey&&o){e.preventDefault();if(n.length){n.trigger("click")}}else if(e.altKey&&o&&e.shiftKey&&r.length){e.preventDefault();r.trigger("click")}}else{if(o&&e.shiftKey&&r.length){r.trigger("click")}else{if(o&&n.length){n.trigger("click")}}}}}).undelegate(u,"click.cm").on("click.cm",u,function(e){set_onbeforeunload_status(0,0);$(this).addClass("disabled").find(".fa.fa-arrow-circle-o-left").addClass("invisible");spinnerfy_buttons($(this));d.attr("data-form-onbeforeunload",0)}).undelegate(g,"click.cm").on("click.cm",g,function(e){e.preventDefault();var t=$(this),i=t.parents("form"),n=i.attr("enctype")&&i.attr("enctype").indexOf("form-data")>-1?0:1,r=n?i.serialize():new FormData(i[0]);$(this).addClass("disabled").find(".fa.fa-floppy-o").addClass("invisible");spinnerfy_buttons($(this));theme_message_dismiss("magic_save_error");theme_message_dismiss("magic_save_success");setTimeout(function(){$.ajax({type:"POST",url:s.attr("action"),data:r,dataType:"text",cache:false,contentType:false,processData:false,success:function(e){if(!session.status(e)){return}d.removeClass("btn-warning").addClass("btn-success").attr("data-form-onbeforeunload",0);$("button").removeClass("disabled").find(".fa").removeClass("invisible").parent().find(".cspinner_container").remove();$(a).attr("data-cm-state","false");set_onbeforeunload_status(0,0);if($(e).find(".panel-body > hr + h3").length&&!$(e).find(".panel-body .table").length&&!$(e).find(".panel-body form[action]").length){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>'+$(e).find(".panel-body hr + h3").html(),60,"error","magic_save_error");d.removeClass("btn-success").addClass("btn-warning").attr("data-form-onbeforeunload",1);$(a).attr("data-cm-state","true");return}plugins.messenger.post('<i class="fa fa-fw fa-check-circle"></i>'+theme_language("filemanager_file_saved").replace("%value",_),3,"success","magic_save_success")},error:function(e){}})},300)});editor_config_search(t)}}function filter_out_objects_inner_chars(e,t,i){i=i?i:"";if(e.is("input")){var n=e.val();if(n){e.val(e.val().replace(t,i))}}else{var a=e.html(),s=e.text();if($.trim(a).length&&$.trim(a).length!==$.trim(s).length){var r=String(),o=a.match(/(.*?<.*?>.*?)(.*?)(<\/.*?>.*?)/gm);if(o&&o.length){$.each($(o),function(e,n){if(typeof n==="string"&&n&&n.length){var a=n.match(/(.*?<.*?>.*?)(.*?)(<\/.*?>.*?)/);if(a&&a[0]&&a[1]&&a[3]){r+=a[1]+(!a[2]?"":a[2].replace(t,i).replace(/\s/g,"&nbsp;"))+a[3]}}});e.html(r)}}else if(s&&s.length){e.html(s.replace(t,i).replace(/\s/g,"&nbsp;"))}}}function editor_config_label(e){var t=".panel-body form select",i=$(t),n=i.prev("b"),a=n.text(),s=i.prev('input[type="submit"]'),r=theme_language("editing_config_file"),o=function(e){if(e){e=e.replace(":","")}return e};if(e){if(s.length){a=o(s.val())}else{a=o(a)}r=a}var l="<span data-text-span>"+r+":&nbsp; </span>";if(n.length){n.replaceWith(l)}else if(s.length&&s.index()===0){s.replaceWith(l)}}function editor_config_search(e){var t="dropdown-editor_config_search",i="data-search-in-files-button",n="["+i+"]",a="data-clear-search",s="["+a+"]",r="search-in-files",o='[data-name="'+r+'"]',l="data-search-in-results",_="data-search-in-results-container",d="."+t,c="data-external-detach",f="."+t+" + ["+c+"]",u=".panel-body form .select2",g="data-search-in-files-icon-find",p=theme_spinner_small(),m="data-no-results-initial",h="data-search-stats",v=0;editor_config_label();setTimeout(function(){var e=$(u),c=e.prev("select"),b=c.attr("name"),x=e.parents("form").attr("action");e.addClass("z-index-10001");if(c.find("option").length<=1){return}e.parents("form").addClass("text-nowrap");if(!$(d).length){e.after('<div data-toggle="tooltip" data-container="body" data-title="'+theme_language("search_in_file")+'" class="btn-group '+t+'">                                    <button aria-label="'+theme_language("search_in_file")+'" data-toggle="dropdown" class="btn btn-default dropdown-toggle" aria-expanded="false">                                       <span class="fa fa-md fa-file-find"></span>                                    </button>                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">                                      <li>                                        <button '+a+' class="btn btn-link btn-transparent-link hidden"><i aria-label="'+theme_language("global_reset")+'" class="fa fa-times-circle-o"></i></button>                                        <input type="text" name data-name="'+r+'" placeholder="'+theme_language("find_in_config_files")+'" class="heighter-34">                                      </li>                                      <li><span data-search-in-files-container><span '+i+' class="btn btn-default pull-right disabled"><i '+g+' class="fa fa-search"></i>'+p+""+theme_language("global_find")+"</span></span></li>                                      <li "+m+' role="separator" class="divider"></li>                                      <li '+m+" "+l+' class="'+(settings_cm_editor_palette=="monokai"?"dark":"light")+'">                                        <span '+_+"></span>                                        <span "+h+'></span>                                      </li>                                    </ul>                                </div>                                <button data-external-detach data-toggle="tooltip" data-container="body" data-title="'+theme_language("search_in_file_open_external")+'" aria-label="'+theme_language("search_in_file_open_external")+'" class="btn btn-default">                                   <span class="fa2 fa2-link-external vertical-align-baseline fa-mds"></span>                                </button>                                ');setTimeout(function(){var e=uri_parse_param("editor_search");if(e){$(o).val(e).trigger("keydown");setTimeout(function(){$(n).removeClass("disabled").trigger("click")})}})}function w(){$("["+m+"]").removeClass("showing-results");$(d).find("span.fa").removeClass("text-warning")}function y(){$("["+m+"]").addClass("showing-results");$(d).find("span.fa").addClass("text-warning")}function C(e){if(e){$("["+h+"]").addClass("hidden")}else{$("["+h+"]").removeClass("hidden")}}$(f).on("click",function(e){e.preventDefault();var t="disabled";if($(this).hasClass(t)){return}$(this).addClass(t);var i=$(this).parents("form").find("select").val();i&&edit_file_from_full_path(i)});var k=$("["+_+"]");k.find("a").on("click",function(e){e.preventDefault();var t=$(this).attr("data-href")+k[0].scrollTop;if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:t})}else{get_pjax_content(t)}});$(d).find("li").on("click",function(e){e.stopPropagation()});$(d).on("show.bs.dropdown",function(){var e=$(u).prev("select").prev('input[type="submit"]'),t=-1,i=$(u).width();if(i<360){t+=$(u)[0].offsetLeft-(e.length?14:11)}var n=t+i+$(d).width();$(this).find(".dropdown-menu").css("min-width",n).css("max-width",n).css("width",n);var a=$(this).parents("form").outerWidth(),s=$(this)[0].offsetLeft;if(s<a/3){var r="dropdown-menu-right",o=(a-s)/1.5;$(this).find("."+r).removeClass(r);$(this).find(".dropdown-menu").css("min-width",o).css("max-width",o).css("width",o)}});$(d).on("shown.bs.dropdown",function(){$(o).focus().select();var e=uri_parse_param("editor_scroll");if(e&&v===0){e=parseInt(e);$("["+_+"]")[0].scrollTop=e;v++}});$(d).on("hidden.bs.dropdown",function(){var e=window["__cm_editor_static"];e&&e.focus()});$(s).on("click",function(e){e.preventDefault();e.stopPropagation();$(o).val("").trigger("keydown");$(o).focus()});$(o).on("keydown keyup paste cut",function(e){if(e.type==="keyup"&&e.keyCode===27){return}if(e.keyCode==9||e.keyCode==13||e.keyCode==27){e.preventDefault();if(e.keyCode==27){$(o).val().length?$(o).val(""):$(d).trigger("click")}if($(n).hasClass("disabled")){return}if(e.keyCode==13){$(n).trigger("click")}}var t=$("["+_+"]");if(e.keyCode===33||e.keyCode===34||e.keyCode===38||e.keyCode===40){var i=t[0].scrollTop,a=e.keyCode===38?i-45:e.keyCode===40?i+45:e.keyCode===34?i+7*45:e.keyCode===33?i-7*45:i;t[0].scrollTop=a}var r=$(this);setTimeout(function(){if(r.val().length){$(n).removeClass("disabled");$(s).removeClass("hidden")}else{$(n).addClass("disabled");$(s).addClass("hidden");w()}})});$(n).on("click",function(){if($(this).hasClass("disabled")){return}var e=$(o).val(),t=[];$(u).prev("select").find("option").map(function(e,i){t.push(i.value)});$("["+g+"]").addClass("hidden");$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-search-in-file=1&xhr-search-in-file-files="+t.join(",")+"&xhr-search-in-file-string="+e+"",data:false,dataType:"json",success:function(t){var i=$("["+_+"]");i.empty();y();if(t.length){var n=String();var a=new RegExp(RegExp.quote($.trim(e)),"gi"),s=[],r=0;C(0);$.each($(t),function(t,i){s.push(i[0]);var o=i[1][0].match(a);r+=o?o.length:0;n+="<span>"+'<span class="pull-right"><a data-href="'+(x+"?"+b+"="+i[0]+"&editor_line="+i[1][1]+"&editor_search="+e+"&editor_scroll=")+'">Line: '+i[1][1]+"</a></span>"+'<span class="pull-left">'+i[0]+"</span>"+"<span>"+i[1][0].replace(a,"<kbd>"+$.trim(e)+"</kbd>")+"</span>"+"</span>"}).promise().done(function(){i.append(n);i[0].scrollTop=0;i.find("a").on("click",function(e){e.preventDefault();var t=$(this).attr("data-href")+i[0].scrollTop;if(get_onbeforeunload_status()){get_onbeforeunload_message(false,{href:t})}else{get_pjax_content(t)}});var t=jQuery.unique(s).length;var a;if(s.length===1&&r===1){a=theme_language("find_in_config_files_result_found_single")}else if(s.length===1&&r>1){a=theme_language("find_in_config_files_result_found_multi")}else{a=theme_language("find_in_config_files_results_found")}a=a.replace("$1",r).replace("$2",t).replace("$3","<kbd>"+e+"</kbd>");$("["+h+"]").html(a)})}else{i.append("<span data-no-results>"+theme_language("filemanager_search_no_matches").replace(".","")+"</span>");C(1);$(d).find("span.fa").removeClass("text-warning")}},complete:function(){$("["+g+"]").removeClass("hidden")},error:function(e){session.status(e.responseText)}})})})}function page_resized(){plugins.navigation.lock();if(!$(".mobile-menu-toggler").hasClass("selected")&&$("html").attr("data-navigation-collapsed")!="1"){$("aside").addClass("hidden-xs");$("aside").css("transform","translate("+settings_leftmenu_width+"px, 0px)");if(typeof jQuery().transition=="function"&&($(".__logo")&&!$(".mobile-menu-toggler:visible").length)){$(".__logo").transition({y:"-140px"},700,function(){})}else{if($(".__logo")){$(".__logo").css("transform","translate(0px, 0px)")}}}plugins.slider.test()}function theme_config_controls(e){var t=$("#atsave, #save_user");if(e){set_onbeforeunload_status(1,0);t.addClass("btn-warning")}else{set_onbeforeunload_status(0,0);t.removeClass("btn-warning")}}function theme_washout(e){var t=$("aside, .jsPanel, .mobile-menu-toggler, .right-side-tabs, .right-side-tabs-toggler, .container-fluid"),i="pointer-events-none bg-filter-blur2-grayscale100-opacity75";e?t.removeClass(i):t.addClass(i)}function theme_countdown_animated(e,t){if(!e){return'<div class="countdown-animated-circle'+(t?" time-"+t+"":"")+'"><div class="number"></div><svg><circle r="18" cx="20" cy="20"></circle></svg></div>'}var i=e.find(".countdown-animated-circle > .number")[0],n=t||5,a=n;if(i){i.textContent=a;var s=setInterval(function(){a=--a<=0?clearInterval(s):a;i.textContent=a},1e3)}}function theme_reload_message(e,t){vars.pjax.cancel=1;var i="theme_reload_notice",t=t?t:"warning",n=bootbox.alert({message:theme_language(e),className:""+i+" bootbox-centered font-medium "+t+""}),a=setTimeout(function(){theme_reload()},4500);n.init(function(){var e=$("."+i+"").find(".bootbox-body");e.append(theme_countdown_animated());theme_countdown_animated(e);theme_washout()});n.on("escape.close.bb",function(e){e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();clearTimeout(a);vars.pjax.cancel=0;theme_washout(1)})}function theme_window_focused(){if(core.curModule("package-updates")&&$("a.btn-tiny + b.btn-success + a.btn-tiny").length&&$(".dataTables_wrapper").length&&!get_onbeforeunload_status()){vars.allow_ui_features=0;page_refresh()}}function theme_download_form(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"backup_is_being_prepared";var i=arguments.length>1&&arguments[2]!==undefined?arguments[2]:0;var n=arguments.length>1&&arguments[3]!==undefined?arguments[3]:0;var a=e.serialize(),s=e.attr("action"),r=e.attr("method");setTimeout(function(){theme.download(s,a,r,n)},3300);theme_message_and_unlock("fa-download-cloud",t,i)}function theme_download_link_blob(e){var t=v___module.includes("webminlog")&&Test.arrIntersect(["webminlog.csv"],e.url)||v___module.includes("virtual-server")&&Test.arrIntersect(["download_backup.cgi"],e.url);if(t){location.href=e.url;return 1}else{return 0}}function theme_download_link(e){var t=v___module.includes("software")&&Test.arrIntersect(["view.cgi"],e.url)||v___module.includes("mysql")&&Test.arrIntersect(["download.cgi"],e.url)||v___module.includes("postgresql")&&Test.arrIntersect(["download.cgi"],e.url)||v___module.includes("postfix")&&Test.arrIntersect(["detach_queue.cgi"],e.url)||v___module.includes("mailbox")&&Test.arrIntersect(["detach.cgi","detachall.cgi","slideshow.cgi"],e.url)||v___location_file==="view_mail.cgi"&&uri_parse_param("raw",e.url)=="1";if(t){theme_open_new_tab(e.url);return 1}else{return 0}}function theme_unbind(e,t){$(e).off(t)}function theme_ui_opt_select(e){var t=$(".container-fluid td");if(t.length>256){return}t.each(function(){var t=$(this),i=t.find("br").length,n=t.find(".awradio"),a="ui_select",s=n.last().next("."+a+""),r="input",o=":checked",l="disabled",_=""+r+'[type="radio"]',d="name",c="_def";if(!s.length){s=n.last().next("br").next("."+a+"")}if(this.childElementCount===e+i&&s.length&&n.length===2&&n.first().length&&n.first().find(_).length&&n.first().find(_).attr(d)){if(n.first().find(_).attr(d).endsWith(c)){n.on(r,function(){var e=$(this).find(_).is(o),t=$(this).is(n.first());s.prop(l,t&&e)});n.find(""+r+""+o+"").trigger(r)}}})}function bind_sameorigin(e){if(e===1){$.each($('aside ul.navigation a[href^="http"], aside ul.navigation a[href^="https"], aside ul.navigation a[href^="ftp"], aside ul.navigation a[href^="ftps"], aside ul.navigation a[data-href^="http"], aside ul.navigation a[data-href^="https"], aside ul.navigation a[data-href^="ftp"], aside ul.navigation a[data-href^="ftps"]'),function(){$(this).removeClass("navigation_module_trigger").parents("li").addClass("navigation_external");$(this).attr("target","_blank");$(this).attr("href",$(this).data("href"));$(this).removeAttr("data-href")})}else{$.each($('.container-fluid a[href^="http"], .container-fluid a[href^="https"], .container-fluid a[href^="ftp"], .container-fluid a[href^="ftps"]'),function(){if(!core.linkSameOrigin($(this))){$(this).attr("target","_blank")}})}}function get_default_content(){if(get_onbeforeunload_status()){return}$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=nav&action=goto",dataType:"JSON",success:function(e){var t="/sysinfo.cgi",i=t;if(e.gotomodule){i="/"+e.gotomodule}else if(typeof settings_webmin_default_module!="undefined"&&settings_webmin_default_module){i="/"+settings_webmin_default_module}if(v___user_level==3&&core.moduleAvailable("mailbox")&&$t_uri_webmail){i="/mailbox/index.cgi?id=INBOX"}else if(v___user_level==3&&(!e.gotomodule||e.gotomodule==="mailbox")&&$t_uri_usermin){i=t}check_bundle(i);get_pjax_content(v___location_prefix+i)},error:function(e){session.status(e.responseText)}})}function get_pre_default_content(e){var t=plugins.navigation.switch.get()==="virtualmin"||get_access_level()===2?"virtual-server":plugins.navigation.switch.get()==="cloudmin"||get_access_level()===4?"server-manager":null;if(!t){return}var i=t==="server-manager",n=i?"id":"dom",a=i?get_default_cloudmin_content:get_default_virtualmin_content;if(settings_right_page_keep){$.ajax({type:"POST",url:v___location_prefix+"/xhr.cgi?type=nav&action=validate&subtype=links&"+n+"="+e+"&module="+t+"&param="+n+"",dataType:"JSON",success:function(i){var s=i.menu;if(s){var r=uri_parse_param2("file",v___location_resource);if(r){r=r.match(/(error|access)%5Flog/);if(r&&r[0]&&r[1]){r=r[1]}else{r=String()}}var o=s.includes(v___location_file)?v___location_file:false,l=s.filter(function(e){if(v___module&&e&&typeof e==="string"){if(e.startsWith("/"+v___module)){if(r){if(e.toLowerCase().includes(r)){return e}else{return false}}else{return e}}else{return e.startsWith(v___module)?e:false}}})[0],_=false;if(!o&&v___location_file){_=v___location_file;var d="edit_",c="list_",f="save_",u=".cgi",g="s.cgi",p="es.cgi";if(_.startsWith(d)){var m=_.replace(d,c);if(s.includes(m)){o=m}else{var h=m.replace(u,g);if(s.includes(h)){o=h}if(!o){h=m.replace(u,p);if(s.includes(h)){o=h}}}}else if(_.startsWith(f)){var v=_.replace(f,d);if(s.includes(v)){o=v}else{var b=v.replace(u,g);if(s.includes(b)){o=b}if(!o){b=v.replace(u,p);if(s.includes(b)){o=b}}}if(!o){var x=_.replace(f,c);if(s.includes(x)){o=x}else{var w=x.replace(u,g);if(s.includes(w)){o=w}if(!o){w=x.replace(u,p);if(s.includes(w)){o=w}}}}}}if(l){if(l.startsWith(v___module_file_manager)){if(typeof __f____r==="function"){__f____r("get",uri_parse_param2("path",l),false,0,false)}}else{get_pjax_content(l)}}else if(o){var y=location.pathname&&location.pathname.includes("/"+t+"/pro/"+o)?"pro/":String(),$="/"+t+"/"+y+o+"?"+n+"="+e;get_pjax_content(v___location_prefix+$)}else{a(e)}}else{a(e)}},error:function(){a(e)}})}else{a(e)}}function get_default_virtualmin_content(e){if(get_onbeforeunload_status()){return}var t,i=function(e){get_pjax_content(v___location_prefix+e)},n="virtual-server",a="/"+n+"",s=session.server.data("initial-wizard"),r=get_access_level()===2?"view_domain":"summary_domain";if(s!="1"&&$t_uri_virtualmin){t=a+"/wizard.cgi"}else if(e!==false){$.ajax({type:"POST",async:true,url:v___location_prefix+"/xhr.cgi?type=can&action=view_dom&dom="+e+"",dataType:"JSON",success:function(n){if(n.view_dom){t=a+"/"+r+".cgi?dom="+e}else{t=a+"/index.cgi"}i(t)}});return}else{if(settings_right_virtualmin_default=="sysinfo.cgi"||settings_right_virtualmin_default==""){t="/sysinfo.cgi"}else if(settings_right_virtualmin_default=="index.cgi"){t=a+"/index.cgi"}else{$.ajax({type:"POST",async:true,url:v___location_prefix+"/xhr.cgi?type=can&action=view_dom&dom="+settings_right_virtualmin_default+"",dataType:"JSON",success:function(e){if(e.view_dom){t=a+"/"+r+".cgi?dom="+settings_right_virtualmin_default}else{t=a+"/index.cgi"}i(t)}});return}}i(t)}function get_default_cloudmin_content(e,t){if(get_onbeforeunload_status()&&!t){return}var i;if(e!==false&&!settings_right_cloudmin_default&&settings_right_cloudmin_default!="0"){i="server-manager/edit_serv.cgi?id="+e}else{if(settings_right_cloudmin_default=="sysinfo.cgi"||settings_right_cloudmin_default==""&&settings_right_cloudmin_default!="0"){i="sysinfo.cgi"}else if(settings_right_cloudmin_default=="index.cgi"){i="server-manager/index.cgi"}else{i="server-manager/edit_serv.cgi?id="+settings_right_cloudmin_default}}if(t){return v___location_prefix+"/"+i}else{get_pjax_content(v___location_prefix+"/"+i)}}function get_navigation_and_content(e){if(get_onbeforeunload_status()){return}if(e==="virtualmin"){plugins.navigation.get.virtualmin(settings_right_virtualmin_default);if(settings_right_reload==1){get_default_virtualmin_content(false)}}else{if(e==="cloudmin"){plugins.navigation.get.cloudmin(settings_right_cloudmin_default);if(settings_right_reload==1){get_default_cloudmin_content(false)}}else{plugins.navigation.switch.dashboard.get()==false&&plugins.navigation.get.webmin(e);if(settings_right_reload){get_default_content()}}}}function editor_html_toolbar(e){var t,i;t=[{name:"styles",items:["Font","FontSize","Format"]},{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript"]},{name:"colors",items:["TextColor","BGColor"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"paragraph",items:["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","-","Blockquote","-","Outdent","Indent","-","BidiLtr","BidiRtl","-","RemoveFormat"]}];i=[{name:"styles",items:["Font","FontSize","Format"]},{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript"]},{name:"colors",items:["TextColor","BGColor"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"paragraph",items:["JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","NumberedList","BulletedList","-","Blockquote","-","Outdent","Indent","-","BidiLtr","BidiRtl","-","RemoveFormat"]}];if(e==="basic"){return i}else{var n=[{name:"document",items:["Source","-","Preview","Print"]},{name:"clipboard",items:["Undo","Redo"]},{name:"editing",items:["Find","-","Emojione"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["InsertPre","CreateDiv","-","Table","base64image","HorizontalRule","PageBreak","Iframe"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},{name:"tools",items:["ShowBlocks"]},"/"];return n.concat(i)}}function edit_files_cascade(e,t,i){var n="-9999px",a=$(".jsPanel").filter(function(){return $(this).css("left")!==n}),s=a.length,r=$(window).width(),o=1,l=$(window).height(),_=2,d=r/s,c=l/s,f=$(".jsPanel-controlbar .jsPanel-btn-align"),u=vars.jspanels_reversed?$(a).toArray().reverse():a;if(e){if(s==1){f.addClass("disabled")}else{f.removeClass("disabled")}return}$.each(u,function(e,a){if($(this).css("left")===n){return}var o=parseInt($(this).attr("data-uid").replace("jsp_","")),_=parseInt($(t).attr("id").replace("jsPanel-",""))+1;if(i===1){var f=r-20,u=c-(e+1==s?20:5);window["jsp_"+o].resize(f,u).reposition("left-top 10 "+(10+c*e)+"")}else{var f=d-(e+1==s?20:5),u=l-20;window["jsp_"+o].resize(f,u).reposition("left-top "+(10+d*e)+" 10")}});vars.jspanels_reversed===1?vars.jspanels_reversed=0:vars.jspanels_reversed=1;vars.jspanels_reversed=0}function edit_file_parse_target(e){var t=e.find("[data-file-name]").text(),i=e.find("[data-file-path]").text(),n=i+"/"+t;return[t,i,n]}function edit_file_parse_name_and_path(e){var t=e?e.toString().match(/^(.+)\/([^/]+)$/):null;if(t&&t[0]&&t[1]&&t[2]){return[t[2],t[1]]}else{return[null,null]}}function edit_file_from_full_path(e){var t=edit_file_parse_name_and_path(e);if(t[0]&&t[1]){edit_file(t[0],t[1])}else{console.warn("Cannot parse file name and path. Returned value is",t)}}function edit_file(external_file_name,external_file_name_path,external_callback,readOnly,binary_file,reverse_file,head_file,tail_file){if(!core.moduleAvailable(v___module_file_manager)){return}var ____jsPanelId="jsp_"+parseInt(Math.random()*1e18),___target,___file_name,___file_name_path,__file_to_open,htmlDataAttr="htmledit",file_editor_save_button_str="_filemanager_file_editor_save",html_editor_target,is_html_editor,maximizedWindow=false,maximizedMargin={top:10,right:10,bottom:10,left:10},panelSize={a:$(window).width()<720,w:parseInt(content_page_calc_width()*.8+content_page_center_h_offset()),h:parseInt(content_page_calc_height()*.7)};if(external_file_name&&external_file_name_path){var external_file_name_initial=external_file_name,external_file_name_path_initial=external_file_name_path;if(external_file_name.includes("/")){external_location_parts=external_file_name.split("/");external_file_name=external_location_parts.slice(-1)[0];external_location_parts.pop();external_file_name_path=external_location_parts.join("/");if(!external_file_name_initial.startsWith("/")){external_file_name_path=external_file_name_path_initial+"/"+external_file_name_path}}if(typeof jsPanel!="object"){var init_script_name="jquery.jspanel";load.bundle(init_script_name,1,{edit_file:[external_file_name,external_file_name_path,external_callback,readOnly,binary_file,reverse_file,head_file,tail_file]},2);return}___file_name=external_file_name;___file_name_path=external_file_name_path}else{if(config_portable_module_filemanager_editor_maximized){maximizedWindow="maximize"}panelSize.w=parseInt(content_page_calc_width()*.85+content_page_center_h_offset());panelSize.h=parseInt(content_page_calc_height()*.95);if(typeof $v__fm__container_fluid_form!=="undefined"){___target=$($v__fm__container_fluid_form+" table tbody tr.m-active").find("a[data-filemin-link]"),___file_name=Convert.htmlUnEscape(___target.attr("data-filemin-link")),___file_name_path=fm_path_check_jailed(decodeURIComponent($($v__fm__container_fluid+" #path").val())),html_editor_target=___target.parent("td").parent("tr"),is_html_editor=html_editor_target.data(htmlDataAttr)==1?1:0;html_editor_target.removeData(htmlDataAttr)}}__file_to_open=v___location_prefix+"/"+v___module_file_manager+"/edit_file.cgi";var __f___es_adj=function(e,t){var i=e.find("option:selected").text(),n=$("<div data-encoding_manual-"+t+' class="invisible inline-block">').html(i);$("body").append(n);var a=$("body").find("div[data-encoding_manual-"+t+"]"),s=a.width();e.css("width",s+13);a.remove()};var __f___cm_resize=function(e,t){var i=parseInt($(e).attr("id").replace("jsPanel-",""))+1;if(!t){var n="__hm_editor_html_editor_"+i,a=window[n];typeof a!="undefined"&&CKEDITOR.instances[n].resize("100%",parseInt($(e).find(".jsPanel-content").css("height")),false)}var s=window["__cm_editor_"+i],r=typeof s!="undefined";if(r){document.activeElement.blur();if(!t){s.setSize(e.content.css("width"),e.content.css("height"))}setTimeout(function(){s.focus()},0)}};var manipulate_file_name=function(e,t){var i='form input[name="file"]',n=e.find(i),a=e.find(".jsPanel-title strong"),s=a.text();if(t){s=s.replace(n.val(),t);a.attr("title",s);a.find("[data-file-name]").text(t);var r=edit_file_parse_target(e.find("strong"));n.val(r[0]);plugins.favorites.detect(e,r[2])}return n.val()};var save_file_as=function(e){var t='form input[name="file"]',i=e.find(t),n=i.val(),a=bootbox.prompt({closeButton:false,title:'<i class="fa fa2 fa-fw fa2-save-as font-size-80p bootbox-o__f_m-save-prompt">&nbsp;&nbsp;</i> <strong class="font-size-90p">'+theme_language("editor_save_file_as")+"</strong>",value:n,buttons:{confirm:{label:'&nbsp;<i class="fa fa-fw fa-check-circle">&nbsp;</i> '+theme_language("global_save_as")+"&nbsp;&nbsp;",className:"btn-primary vertical-align-top disabled _btn-submit-rename"},cancel:{label:"&nbsp;&nbsp;"+theme_language("global_cancel")+"&nbsp;&nbsp;",className:"btn-default vertical-align-top pull-left"}},callback:function(t){if(t&&t!=n){t=t.replace(/..\//g,"");t=t.replace(/\//g,"");manipulate_file_name(e,t)}else{}setTimeout(function(){var i=window["__cm_editor_"+(parseInt(e.attr("id").replace("jsPanel-",""))+1)];i&&i.focus();if(t&&t!=n){e.find("."+file_editor_save_button_str).addClass("text-danger");set_onbeforeunload_status_native(1)}},100)}});a.on("shown.bs.modal",function(e){setTimeout(function(){var t=$(e.target),i=t.find("input"),n=i.val(),a=t.find("._btn-submit-rename");i[0].focus();i.on("keydown input",function(e){if(n!==$(this).val()){a.removeClass("disabled")}else{a.addClass("disabled")}var t=e.keyCode?e.keyCode:e.which;if(t===13&&n===$(this).val()){e.preventDefault();e.stopImmediatePropagation()}})},100)})};var jsPaneler=function(){var viewEditError_str="vieweditError",composers=$(".jsPanel.jspShown").length,small_window=window.innerWidth<640,ioffset=composers?5:0,offset=composers?ioffset*5*composers:ioffset,jsPanelPosition=small_window?{offsetX:content_page_center_h_offset()}:{offsetX:parseInt(content_page_center_h_offset())+offset,offsetY:offset};theme_message_dismiss(viewEditError_str);window[____jsPanelId]=$.jsPanel({contentAjax:{url:__file_to_open,dataType:"text",data:{path:___file_name_path,file:___file_name,limit:readOnly?config_portable_module_filemanager_view_limit:0,reverse:~~reverse_file,head:~~head_file,tail:~~tail_file},autoload:false,fail:function(e){if(e.statusText!=="canceled"&&e.statusText!=="abort"){connection_error(e,1)}},done:function(w,textStatus,jqXHR,jsPanel){if(typeof fm_target_spinner_remove==="function"){fm_target_spinner_remove()}var ___file_name_path_local=___file_name_path;var $is_non_utf8=session.server.data("charset")!="UTF-8",x=$(w).find(".ui_form");if(!x.length){var error_message_rs=$(w).find("[data-fatal-error-text]").html(),error_msg=theme_language("global_error")+": "+error_message_rs;plugins.messenger.post('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>'+error_msg,30,"error",viewEditError_str);progress.end();this.close();return}var the_path_x=___file_name_path,v="<strong data-file-container><span data-file-name>"+(Convert.htmlEscape(___file_name)+"</span> (<span data-file-path>"+(Convert.htmlEscape(___file_name_path)||"/")+"</span>)")+"</strong>",jsPanelContainer_this_initial=this,jsPanelContainer=$(jsPanelContainer_this_initial),jsPanelId=parseInt(jsPanel.attr("id").replace("jsPanel-",""))+1;jsPanel.attr("data-uid",____jsPanelId);if(!$(x).find("textarea").length){x=$(w).find('form[action="save_file.cgi"]').append($(w).find("#data").removeAttr("id")).prepend($(w).find("#file").removeAttr("id")).prepend($(w).find("#path").removeAttr("id"))}jsPanel.headerTitle(v);jsPanelContainer.data("jspuid",____jsPanelId);if(!is_html_editor){var __icon=readOnly?"fa-lg fa2 fa2-file-text-o":"fa2 fa2-edit",is_viewer=readOnly?" viewer":"",is_reverse=reverse_file?" viewer-reverse":"",is_head=head_file?" viewer-head":"",is_tail=tail_file?" viewer-tail":"";var is_viewer_mode="",is_viewer_mode_num=0;if(is_viewer){is_viewer_mode=is_viewer+"-";if(!is_reverse&&!is_head&&!is_tail){is_viewer_mode+="5";is_viewer_mode_num=5}else if(is_reverse&&is_tail){is_viewer_mode+="4";is_viewer_mode_num=4}else if(!is_reverse&&is_tail){is_viewer_mode+="3";is_viewer_mode_num=3}else if(is_reverse&&is_head){is_viewer_mode+="2";is_viewer_mode_num=2}else if(!is_reverse&&is_head){is_viewer_mode+="1";is_viewer_mode_num=1}}jsPanelContainer.find(".jsPanel-hdr h3").prepend('<i class="fa fa-fw '+__icon+' __helper___ zi-last pointer-events-none">&nbsp;&nbsp;</i>').find("strong").attr("title",$(v).text()).after('<button aria-label="'+theme_language("favorites_add")+'" class="fa fa-fw fa-inverse fa-star-o text-lighter favorites-editor'+(is_viewer+is_viewer_mode+is_reverse+is_head+is_tail)+'" data-delay=\'{"show":"600", "hide":"30"}\'></button>&nbsp;')}jsPanelContainer.find(".jsPanel-content").html(x);var file_name_parts=edit_file_parse_target(jsPanelContainer.find(".jsPanel-hdr h3").find("strong"));if(file_name_parts[2]){plugins.favorites.detect(jsPanelContainer,file_name_parts[2])}if(external_file_name&&external_callback){if(typeof external_callback==="string"){var caller=external_callback.includes(".")?eval(external_callback):window[external_callback];caller.call()}else{external_callback.forEach(function(r){var caller=r.call.includes(".")?eval(r.call):window[r.call];if(r.params){caller.apply(null,r.params)}else{caller.call()}})}}var $this=jsPanelContainer.find(".jsPanel-content");var A=$this.find(".ui_form_end_buttons tr td span:first-child input"),z=$this.find(".ui_form_end_buttons tr td span:nth-child(2) input");$this.find(".ui_form_end_buttons").remove();var IsMac=platform.detect()==="mac",hotKeyToggleWrap=IsMac?"⌥ + W":"Alt + W",hotKeySaveAs=IsMac?"⌘ + ⇧ + S":"Ctrl + Shift + S",hotKeyRevert=IsMac?"⌘ + ⌥ + R":"Ctrl + Alt + R";jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar").prepend("                "+(!readOnly?'<div class="jsPanel-btn jsPanel-btn-save '+file_editor_save_button_str+'" title="'+theme_language("global_save")+'" aria-label="'+theme_language("global_save")+'"><i class="fa fa-fw fa-save"></i></div>':'<div class="jsPanel-btn jsPanel-btn-save"></div>')+'                <div class="dropdown">                  <span aria-label="'+theme_language("global_menu")+'" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">                    <i class="fa fa-menu"></i>                  </span>                  <ul class="dropdown-menu dropdown-menu-right small">                    <li class="jsPanel-btn-align vertical"><a class="ddm-link" href="javascript:;"><i class="fa fa-align-horizontal-middle pull-left margined-top-2"></i>'+theme_language("filemanager_editor_align_panels_vertically")+""+ui_inject_alt_key_label()+'</a></li>                    <li class="jsPanel-btn-align hidden horizontal"><a class="ddm-link" href="javascript:;"><i class="fa fa-align-vertical-middle pull-left margined-top-2"></i>'+theme_language("filemanager_editor_align_panels_horizontally")+""+ui_inject_alt_key_label()+'</a></li>                    <li class="jsPanel-btn-togglewrap'+(is_html_editor?" hidden":"")+'"><a class="ddm-link" title="'+hotKeyToggleWrap+'" href="javascript:;"><i class="fa fa-wrap-text pull-left margined-top-2"></i>'+theme_language("filemanager_editor_toggle_soft_wrap")+'</a></li>                    <li role="separator" class="divider'+(is_html_editor||readOnly?" hidden":"")+'"></li>                    <li class="jsPanel-btn-save-as'+(readOnly?" hidden-force":"")+'"><a class="ddm-link" title="'+hotKeySaveAs+'" href="javascript:;"><i class="fa fa2 fa2-save-as pull-left margined-top-2"></i>'+theme_language("global_save_as")+'...</a></li>                    <li role="separator" class="divider"></li>                    '+(!$is_non_utf8?'<li class="jsPanel-btn-content-refresh'+(!readOnly?" hidden":"")+'"><a class="ddm-link ddm-link-refresh" title="Alt + R / F2" href="javascript:;"><i class="fa fa-refresh pull-left margined-top-3"></i>'+theme_language("filemanager_editor_refresh_content")+"</a></li>":"")+"                    "+(!$is_non_utf8&&!readOnly?'<li class="jsPanel-btn-content-revert"><a class="ddm-link ddm-link-revert" title="'+hotKeyRevert+'" href="javascript:;"><i class="fa fa-1_25x fa-refresh-mdi fa-flip-horizontal pull-left margined-top-3 margined-left--2 line-height-10"></i>'+theme_language("filemanager_editor_revert_content")+"</a></li>":"")+'                    <li class="__helper___tr'+(is_html_editor||readOnly?" hidden":"")+'"><a class="ddm-link" href="javascript:;">'+theme_language("global_help")+"</a></li>                  </ul>                </div>            ");jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar .__helper___tr").click(function(e){var t=jsPanelContainer.find(".jsPanel-hdr .fa2-edit");t.removeClass("pointer-events-none").trigger("click");t.removeClass("pointer-events-none")});jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar .jsPanel-btn-save-as").click(function(){save_file_as(jsPanelContainer)});jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar .jsPanel-btn-align:not(.disabled)").click(function(e){if($(this).hasClass("disabled")){return}edit_files_cascade(0,jsPanelContainer_this_initial,!$(this).hasClass("horizontal")?0:1)});edit_files_cascade(1,jsPanelContainer_this_initial,0);var $__f__enc=$this.find("form").attr("data-encoding"),$__f__is_binary=$this.find("form").attr("data-binary"),__cm_editor_encoding_item=v___server_hostname+"-"+"__cm_editor_encoding",$is_encoding=$__f__enc?true:false;$__f__enc=$__f__enc?$__f__enc:localStorage.getItem(__cm_editor_encoding_item)?"not_detected":"UTF-8";binary_file=binary_file||$__f__is_binary;var select_options="";var encodings={"UTF-8":"utf-8","ISO-8859-1":"iso-8859-1 (cp1252)&#x200E;","windows-1252":"cp1252 (iso-8859-1)&#x200E;","windows-1250":"cp1250","windows-1251":"cp1251","windows-1253":"cp1253","windows-1254":"cp1254","windows-1255":"cp1255","windows-1256":"cp1256","ISO-8859-2":"iso-8859-2","ISO-8859-7":"iso-8859-7","ISO-8859-9":"iso-8859-9","ISO-8859-15":"iso-8859-15","US-ASCII":"ascii","x-IBM874":"cp874",IBM866:"cp866","KOI8-R":"koi8","EUC-KR":"EUC encoding, Korean","EUC-JP":"EUC encoding, Japanese",Shift_JIS:"Shift-JIS, Japanese"};if(!encodings.hasOwnProperty($__f__enc)&&$__f__enc!="not_detected"){select_options+='<option value="'+$__f__enc+'" selected>'+$__f__enc.toLowerCase()+"</option>"}$.each(encodings,function(e,t){select_options+='<option value="'+e+'"'+($__f__enc.toLowerCase()==e.toLowerCase()||!e?" selected":"")+">"+t+"</option>"});jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar").prepend('<div data-encoding-label class="jsPanel-btn text-light cursor-default">'+'<label class="select-styled select-styled-small select-styled-no-border select-styled-no-icon'+($is_non_utf8||binary_file?" pointer-events-none hidden":"")+'"> <select required data-encoding dir="rtl">'+select_options+"</select> </label>"+"</div>");var __data_select_encoding=jsPanelContainer.find("select[data-encoding]"),__data_encoding=__data_select_encoding.val(),__cm_editor_save_btn=jsPanelContainer.find("."+file_editor_save_button_str+""),__footer_loader=function(e){var t=jsPanelContainer.find(".jsPanel-ftr").find("[data-file-stat] [cspinner-file-message]"),i="invisible";if(e){t.removeClass(i)}else{t.addClass(i)}},__footer_message=function(e,t,i){var n=jsPanelContainer.find(".jsPanel-ftr").find("[data-file-stat] [data-file-message]");if(typeof this.timeouted==="number"){clearTimeout(this.timeouted)}if(e===-1){return n.text().length}if(!e){e=""}__footer_loader(false);if(t){!i&&__footer_loader(true);n.html(Convert.htmlUnEscapeSafe(Convert.htmlEscape(e)));if(i){this.timeouted=setTimeout(function(){__footer_loader(false);n.text("")},i*1e3)}}else{if(i){this.timeouted=setTimeout(function(){__footer_loader(false);n.text("")},i*1e3)}else{__footer_loader(false);n.text("")}}},update_file_stat_data=function(){var e=___file_name_path+"/"+___file_name;if(get_access_level()===2||get_access_level()===3||get_access_level()===4){e=get_user_home()+___file_name_path+"/"+___file_name}e=e.replace(/\/\//g,"/");var t="jsPanelFileStat_"+jsPanelId,i=v___location_prefix+"/xhr.cgi?type=file&action=stat&"+"&file="+Convert.encodeURIComponentConsistent(e)+"&module="+v___module_file_manager;window[t]=$.ajax({type:"POST",url:i,data:false,dataType:"JSON",success:function(e){var n=jsPanelContainer.find(".jsPanel-ftr").find("[data-file-controls]"),a=n.find("[data-file-size]"),s=n.find("[data-file-info]"),r=function(){var e=s.data("bs.popover");return e.tip().find(".popover-content")},o=e.size[0],l=e.size[1],_=e.content;_=Convert.htmlEscape(_);_=_.replace(/(?:\r\n|\r|\n)/g,"<br>").replace(/\/\//g,"/");_=_.replace(/((\b)(?!\d+)IO Block|(?!\d+)\w+\b): /g,"<strong>$1: </strong>");_=_.replace(/\s/g,"&nbsp;");var d=t+"_fileinfo";window[d]=[];var c="data-a-checksum",f=""+c+"&#61;&quot;",u="&quot;",g=new RegExp(""+f+"(.*?)"+u,"g"),p=_.match(g),m=l>=1024e3&&l<config_portable_module_filemanager_checksum_limit,h=function(e,t,i){var n=r();if(n&&n.length){var a=e.call(this,t),o=new RegExp(a);s[0].dataset.content=s[0].dataset.content.replace(o,i);n.html(n.html().replace(o,i))}},v=function(e,t){if(!t){h(b,e,x(e))}window[d][e]=$.ajax({type:"POST",url:i+"&checksum="+e,data:false,dataType:"JSON",success:function(t){h(x,e,t.checksum)},error:function(e){session.status(e.responseText)}})},b=function(e){return"<button "+c+'="'+e+'" class="btn btn-default btn-xs btn-xxs vertical-align-baseline"><i class="fa fa-refresh"></i></button>'},x=function(e){return"<span "+c+'="'+e+'" class="cspinner margined-left-8"><span class="cspinner-icon dark smallest"></span></span>'};if(p){_=_.replace(g,m?x("$1"):b("$1"))}a.text(o);s.popover({container:jsPanelContainer,placement:"auto left",sanitize:false,trigger:"click",html:true});if(is_viewer_mode){var w=theme_language("filemanager_view_"+(is_viewer_mode_num===5?"head_and_tail":is_viewer_mode_num===4?"tail_and_reverse":is_viewer_mode_num===3?"tail":is_viewer_mode_num===2?"head_and_reverse":"head")+"");_="&nbsp;&nbsp;<strong>View:</strong>  "+w+"<br>"+_}s.attr("data-content",_);var y="mousedown.jsPanelFileInfo"+jsPanelId+"",C=".bs.popover",k="shown"+C+"",j="hide"+C+"",O=s.data("bs.popover");s.off(k);s.on(k,function(){var e=jsPanelContainer.find(".popover:visible"),t=$(this);e.addClass("jsPanel-file-info");$(document.body).off(y);$(document.body).on(y,function(e){if(!$(e.target).is(t)&&!$(e.target).hasClass("popover-content")&&(!$(e.target).is("strong")||$(e.target).is("strong")&&!$(e.target).parent().is(".popover-content"))&&!$(e.target).is("button["+c+"]")&&!$(e.target).parent().is("button["+c+"]")){t.trigger("click")}});if(!m){var i="click.checksumevt";r().off(i);r().on(i,"button["+c+"]",function(e){e.preventDefault();v($(this).attr(c),0)})}else{$.each(r().find("span["+c+"]"),function(){v($(this).attr(c),1)})}});s.off(j);s.on(j,function(){$(document.body).off(y)})},error:function(e){session.status(e.responseText)}})};!is_html_editor&&!binary_file&&jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar").prepend('<div data-mode-select class="jsPanel-btn text-light cursor-default">'+'<label class="select-styled select-styled-small select-styled-no-border select-styled-no-icon">'+""+editor_modes()+"</label></div>");__f___es_adj(__data_select_encoding,jsPanelId);__data_encoding==Object.keys(encodings)[2]&&__data_select_encoding.val(Object.keys(encodings)[1]);__data_select_encoding.on("change changed",function(e){if($is_non_utf8){return}var t=window["jsPanelChangeEncoding_"+jsPanelId];if(typeof t!=="undefined"&&typeof t.abort==="function"&&t.readyState&&t.readyState!=4){return}if(__cm_editor_save_btn.hasClass("text-danger")&&__cm_editor_save_btn.hasClass("__locked__")&&e.type!=="changed"){if(e.type==="changed"){__cm_editor_save_btn.removeClass("text-danger __locked__")}return}var i=$(this).val(),n=___file_name_path_local+"/"+manipulate_file_name(jsPanelContainer);__f___es_adj($(this),jsPanelId);if(!$is_encoding&&!readOnly){localStorage.setItem(__cm_editor_encoding_item,i)}if(get_access_level()===2||get_access_level()===3||get_access_level()===4){n=get_user_home()+n}window["jsPanelChangeEncoding_"+jsPanelId]=$.ajax({type:"POST",url:v___location_prefix+"/index.cgi?xhr-encoding_convert=1&xhr-encoding_convert_name="+i+"&xhr-encoding_convert_file="+Convert.encodeURIComponentConsistent(n)+""+"&xhr-encoding_convert_cmodule="+v___module_file_manager+"&xhr-encoding_convert_limit="+(readOnly?config_portable_module_filemanager_view_limit:0)+"&xhr-encoding_convert_reverse="+~~reverse_file+"&xhr-encoding_convert_head="+~~head_file+"&xhr-encoding_convert_tail="+~~tail_file,data:false,dataType:"text",success:function(e){if(!session.status(e)){return}typeof window["__cm_editor_"+jsPanelId]!="undefined"&&window["__cm_editor_"+jsPanelId].setValue(e);if(typeof CKEDITOR=="object"){typeof window["__hm_editor_html_editor_"+jsPanelId]!="undefined"&&CKEDITOR.instances["__hm_editor_html_editor_"+jsPanelId].setData(e)}__cm_editor_save_btn.removeClass("text-danger __locked__");__data_select_encoding.removeClass("pointer-events-none");var t=$("body").find("."+file_editor_save_button_str+".text-danger").length;set_onbeforeunload_status_native(t);__footer_message(-1)&&__footer_message(theme_language("global_done"),1,2);update_file_stat_data()},error:function(e){console.log(e);var t=theme_language("global_error")+": "+(e.status&&e.statusText&&e.statusText!=="error"?e.status+" - "+e.statusText:theme_language("connection_lost"));__footer_message(t,1,2)}})});update_file_stat_data();if(!readOnly){var __cm_editor_encoding=localStorage.getItem(__cm_editor_encoding_item);if(!$is_non_utf8&&!binary_file&&!$is_encoding&&__cm_editor_encoding){if(__cm_editor_encoding&&encodings.hasOwnProperty(__cm_editor_encoding)){__data_select_encoding.val(__cm_editor_encoding).trigger("change")}}}var theHeight=parseInt($this.css("height")),theTextarea=$this.find("textarea");if(is_html_editor){editor_html_init([theTextarea,theHeight,true,"html_editor_"+jsPanelId])}else{editor_init(theTextarea,v,[null,theHeight],jsPanelId,false,true,false,false,false,readOnly)}jsPanelContainer.addClass("jspShown").css("opacity",0);jsPanelContainer.animate({opacity:1},400,function(){if(is_html_editor){}else{window["__cm_editor_"+jsPanelId].focus();jsPanelContainer.find(".jsPanel-btn-togglewrap").click(function(e){var t=window["__cm_editor_"+jsPanelId],i=!t.getOption("lineWrapping");t.setOption("lineWrapping",i);localStorage.setItem(v___server_hostname+"-"+session.server.data("user")+"-editor-line-wrapping",~~i)})}var e=function(e){var t=e.querySelectorAll(".jsPanel-resizeit-handle"),i;for(i=0;i<t.length;i++){const e=t[i];e.addEventListener("mousedown",function(){e.addEventListener("mousemove",function(){__f___cm_resize(jsPanelContainer_this_initial)})})}};var t=document.getElementById("jsPanel-"+(jsPanelId-1)+"");e(t)});jsPanelContainer.click(function(){var e=parseInt($(this).attr("data-uid").replace("jsp_",""));window["jsp_"+e].front()});jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar [data-encoding-label], .jsPanel-hdr .jsPanel-controlbar .dropdown, .jsPanel-hdr .jsPanel-controlbar .jsPanel-btn").each(function(e,t){var i="title",n=".jsPanel-btn-",a="global_";if($(this).is(n+"maximize")){$(this).attr(i,theme_language(a+"maximize"))}if($(this).is(n+"minimize")){$(this).attr(i,theme_language(a+"minimize"))}if($(this).is(n+"normalize")){$(this).attr(i,theme_language(a+"normalize"))}if($(this).is(n+"close")){$(this).attr(i,theme_language(a+"close"))}if($(this).is(n+"save")){$(this).attr(i,theme_language(a+"save"))}if($(this).is("[data-encoding-label]")){$(this).attr(i,theme_language(a+"set_encoding"))}});__data_select_encoding.click(function(e){if($(this).data("reverting")===1){$(this).data("reverting",0);__footer_message(theme_language("filemanager_editor_reverting_content")+"..",1);return}if(e.originalEvent!==undefined){if(!$is_non_utf8&&$(this).hasClass("pointer-events-none")){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>'+theme_language("filemanager_save_to_change_encoding"),4,"warning","savingFileDone")}}else{if($(this).hasClass("pointer-events-none")){plugins.messenger.post('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>'+theme_language("filemanager_save_to_refresh_content"),4,"warning","savingFileDone")}else{__footer_message(theme_language("filemanager_save_to_refresh_content_proc")+"..",1)}}});jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar .jsPanel-btn-content-refresh").click(function(){__data_select_encoding.val(__data_select_encoding.val()).trigger("change").trigger("click")});jsPanelContainer.find(".jsPanel-hdr .jsPanel-controlbar .jsPanel-btn-content-revert").click(function(){__data_select_encoding.data("reverting",1);__data_select_encoding.val(__data_select_encoding.val()).trigger("changed").trigger("click")});var keydown_editor="keydown.feditor"+jsPanelId+"",keyup_editor="keyup.feditor"+jsPanelId+"",$$body=$("body");$$body.on(keydown_editor,function(e){if(jsPanelContainer_this_initial.find(".dropdown").hasClass("open")){if(event_hold_modifer_pressed()&&!vars.events.keypressed.shift){e.preventDefault();jsPanelContainer.find(".jsPanel-btn-align.vertical").addClass("hidden");jsPanelContainer.find(".jsPanel-btn-align.horizontal").removeClass("hidden")}if(vars.events.keypressed.shift){e.preventDefault();vars.jspanels_reversed=1}}});$$body.on(keyup_editor,function(e){if(jsPanelContainer_this_initial.find(".dropdown").hasClass("open")){e.preventDefault();jsPanelContainer.find(".jsPanel-btn-align.horizontal").addClass("hidden");jsPanelContainer.find(".jsPanel-btn-align.vertical").removeClass("hidden")}if(!vars.events.keypressed.shift){e.preventDefault();vars.jspanels_reversed=0}});jsPanelContainer.on(keydown_editor,function(e){var t=e.keyCode?e.keyCode:e.which,i=$(":focus").parents(".jsPanel"),n=platform.detect()==="mac"?e.metaKey:e.ctrlKey,a=platform.detect()==="mac"?e.ctrlKey:e.metaKey;if(t===27){var s=this;if(typeof s.close_timeout!="undefined"){s.close_timeout+=1}else{s.close_timeout=2}setTimeout(function(){s.close_timeout=1},vars.event.double_click_delay);if(s.close_timeout>2){if(!$(".bootbox.modal").length){if(n){jsPanelContainer_this_initial.minimize()}else{jsPanelContainer_this_initial.close()}}}}var r=function(e){i.find("."+file_editor_save_button_str+"").trigger("click");e&&i.find(".jsPanel-btn-close").trigger("click")};if((t==13||t==83)&&i.is(".jsPanel")){if(t==83){if(!e.shiftKey&&n){e.preventDefault();!readOnly&&r()}else if(!e.altKey&&n&&e.shiftKey){e.preventDefault();!readOnly&&save_file_as($(this))}else if(e.altKey&&n&&e.shiftKey){e.preventDefault();!readOnly&&r(1)}}else{if(n&&e.shiftKey){!readOnly&&r(1)}else{if(n){!readOnly&&r()}}}}if(t===82&&(e.altKey&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey)||t===113&&(!e.altKey&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey)){e.preventDefault();i.find(".ddm-link-refresh").trigger("click")}if(t===82&&(e.altKey&&n&&!e.shiftKey&&!a)){e.preventDefault();i.find(".ddm-link-revert").trigger("click")}});jsPanelContainer_this_initial.find(".dropdown").on("show.bs.dropdown",function(e){jsPanelContainer.find(".jsPanel-btn-align.horizontal").addClass("hidden");jsPanelContainer.find(".jsPanel-btn-align.vertical").removeClass("hidden")});__cm_editor_save_btn.click(function(e){$(this).find("i").replaceWith(theme_spinner_small());$(this).removeClass("text-danger __locked__");__data_select_encoding.removeClass("pointer-events-none");jsPanelContainer.find('form[action="save_file.cgi"]').submit()});var u=function(){var e=__cm_editor_save_btn;e.find(".cspinner").remove();e.find("i").remove();e.prepend('<i class="fa fa-fw fa-save"></i>')};jsPanelContainer.find('form[action="save_file.cgi"]').submit(function(e){e.preventDefault();e.stopPropagation();var t=window["jsPanelSaving_"+jsPanelId];if(typeof t!=="undefined"&&typeof t.abort==="function"&&t.readyState&&t.readyState!=4){return}var i=Convert.htmlEscape(jsPanelContainer.find(".jsPanel-title strong").text());var n='form[action="save_file.cgi"]',a="select[data-encoding]",s=jsPanelContainer.find(a).val();var r=jsPanelContainer.find(""+n+' input[name="file"]').val(),o=___file_name_path_local,l=jsPanelContainer.find(""+n+' textarea[name="data"]').val();__footer_message(theme_language("filemanager_saving_file").replace("%value",r)+"..",1);window["jsPanelSaving_"+jsPanelId]=$.ajax({type:"POST",url:v___location_prefix+"/"+v___module_file_manager+"/save_file.cgi",data:{file:r,path:o,data:l,encoding:s?s:String()},dataType:"text",success:function(e){if(!session.status(e)){return}var t=jsPanelContainer.find("."+file_editor_save_button_str+" .cspinner");if(!$(e).find("textarea#data").length){var i=$(e).find(".panel-body h3").html();if(Test.strContains(i,":")){var n=i.split(":"),a=n.pop(),s=n.join(":");i="<strong>"+Convert.htmlEscape(a)+'</strong>: <span class="font-weight-normal">'+Convert.htmlEscape(s)+"</span>"}else{i=Convert.htmlEscape(i)}plugins.messenger.post('<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>'+i,10,"error","savingFileError");if(t.parent(".btn").index()===1){theme_modal_dismiss()}u();return}__footer_message(theme_language("filemanager_file_saved").replace("%value",r),1,2);u();update_file_stat_data();var o=$("body").find("."+file_editor_save_button_str+".text-danger").length,l=$("body").find('[data-form="submitter"]').hasClass("btn-warning");if(!o&&!l){set_onbeforeunload_status(0,0)}set_onbeforeunload_status_native(o)},error:function(e){var t=theme_language("global_error")+": "+(e.status&&e.statusText&&e.statusText!=="error"?e.status+" - "+e.statusText:theme_language("connection_lost"));__footer_message(t,1,2);u()}})});progress.end();__footer_message(-1)&&__footer_message(theme_language("global_done"),1,2);$(".dropdown-editor_config_search + [data-external-detach]").removeClass("disabled")}},setstatus:maximizedWindow,footerToolbar:function(e){return'<span data-file-stat><strong data-file-message class="text-light"></strong><span cspinner-file-message class="cspinner invisible"><span class="cspinner-icon smaller"></span></span></span><span data-file-controls><strong data-file-size class="text-light"></strong><i data-file-info class="fa2 fa-fw fa2-info-circle cursor-pointer"></i></span>'},maximizedMargin:maximizedMargin,panelSize:{width:panelSize.a?"98%":panelSize.w,height:panelSize.a?"99%":panelSize.h},position:jsPanelPosition,dblclicks:{title:"maximize"},headerControls:{smallify:"remove"},dragit:{stop:function(){__f___cm_resize(this,1)}},resizeit:{stop:function(e,t,i){__f___cm_resize(this)}},onresized:function(){__f___cm_resize(this)},onnormalized:function(){var e=parseInt($(this).attr("id").replace("jsPanel-",""));this.resize({width:$(window).width()/1.5,height:$(window).height()/2});if(e<parseInt($(window).height()/1.5/11.5)){this.reposition("left-top "+25*e+"px "+25*e+"px")}edit_files_cascade(1,this,0);__f___cm_resize(this)},onmaximized:function(){edit_files_cascade(1,this,0);__f___cm_resize(this)},onminimized:function(){edit_files_cascade(1,this,0)},onclosed:function(){edit_files_cascade(1,this,0);var e=parseInt(this[0].id.replace(/\D/g,""))+1,t="keydown.feditor"+e+"",i="keyup.feditor"+e+"",n=$("body");n.off(t);n.off(i);var a=window["jsPanelFileStat_"+e+"_fileinfo"]||{};Object.entries(a).forEach(function(e){const[t,i]=e;if(i&&typeof i.abort==="function"){i.abort.call()}});setTimeout(function(){var e=$("body").find("."+file_editor_save_button_str+".text-danger").length,t=$("body").find('[data-form="submitter"]').hasClass("btn-warning");if(!e&&!t){set_onbeforeunload_status(0,0)}set_onbeforeunload_status_native(e)},100)},onbeforeclose:function(){var e=this,t=function(){if(v___module!==v___module_file_manager){return}if(readOnly){return}var t=$("#"+e[0].id+"").find("span[data-file-name]").text();file_path=$("#"+e[0].id+"").find("span[data-file-path]").text();setTimeout(function(){var e=decodeURIComponent($($v__fm__container_fluid+" #path").val()||"/");if(Convert.uriEncodeComponent(file_path)===Convert.uriEncodeComponent(e)){if(typeof __f__get_fs==="function"){var i=_f__table().dataTable().$("tr").find('td:nth-child(3) a[data-filemin-link="'+t+'"]').parent("td").parent("tr");__f__get_fs(i,1)}}},300)};if($("body").find(".bootbox-o__f_m-save-prompt").length&&this.find("."+file_editor_save_button_str+".text-danger").length){return false}if(this.find("."+file_editor_save_button_str+".text-danger").length){bootbox.dialog({message:""+theme_language("filemanager_file_edit_but_not_saved")+" <br><br>"+theme_language("filemanager_file_edit_but_not_saved_what_to_do")+"",title:'<i class="fa fa-fw fa-question-circle font-size-80p bootbox-o__f_m-save-prompt">&nbsp;&nbsp;</i> <strong class="font-size-90p">'+Convert.htmlEscape(e.find(".jsPanel-title strong").text())+"</strong>",buttons:{success:{label:'&nbsp;<i class="fa fa-fw fa-save">&nbsp;&nbsp;</i>'+theme_language("global_save_and_close")+"&nbsp;&nbsp;",className:"btn-primary vertical-align-top ",callback:function(){e.find(".jsPanel-btn-save").trigger("click");t();e.find(".jsPanel-btn-close").trigger("click")}},danger:{label:'&nbsp;<i class="fa fa-fw fa-times-circle-o">&nbsp;&nbsp;</i>'+theme_language("global_close_without_saving")+"&nbsp;&nbsp;",className:"btn-danger vertical-align-top margined-left--2",callback:function(){e.find("."+file_editor_save_button_str+".text-danger").removeClass("text-danger");e.find(".jsPanel-btn-close").trigger("click");var t=$("body").find("."+file_editor_save_button_str+".text-danger").length,i=$("body").find('[data-form="submitter"]').hasClass("btn-warning");if(!t&&!i){set_onbeforeunload_status(0,0)}set_onbeforeunload_status_native(t)}},main:{label:'&nbsp;<i class="fa fa-fw fa-arrow-circle-o-left">&nbsp;&nbsp;</i>'+theme_language("global_continue_editing")+"&nbsp;&nbsp;",className:"btn-default vertical-align-top margined-left--2",callback:function(){setTimeout(function(){var t=window["__cm_editor_"+(parseInt(e.attr("id").replace("jsPanel-",""))+1)];t&&t.focus()},100)}}},onEscape:function(){setTimeout(function(){var t=window["__cm_editor_"+(parseInt(e.attr("id").replace("jsPanel-",""))+1)];t&&t.focus()},100)}});return false}else{t()}}})};if(is_html_editor){if(typeof CKEDITOR=="object"){jsPaneler()}else{CKEDITOR_BASEPATH=v___server_js_path+"/ckeditor/";var init_script_name="ckeditor";$.getScript(""+v___server_js_path+"/"+init_script_name+"/"+init_script_name+".js?"+theme.version(true)+"",function(){load.loaded.push(init_script_name);jsPaneler()}).fail(function(e){if(e.statusText!=="canceled"&&e.statusText!=="abort"){connection_error(e,1)}})}}else{jsPaneler()}typeof __f___cs==="function"&&__f___cs()}function editor_html_init(e,t){var i=!Test.string(e[0]),n=i?e[3]:e[0],a;if(i){a="__hm_editor_"+e[3];e[0].attr("id",a)}else{a=e[0]}var s=function(){CKEDITOR.config.extraPlugins="emojione";CKEDITOR.config.dialog_noConfirmCancel=true;CKEDITOR.config.fullPage=true;CKEDITOR.config.toolbar=editor_html_toolbar(t);var n=session.server.data("language"),s=$(window).height()/e[1];CKEDITOR.replace(a,{language:n,width:"100%",baseFloatZIndex:20001,height:i?e[1]:s});if(!CKEDITOR.instances[a]&&typeof CKEDITOR=="object"&&CKEDITOR.instances){for(var r in CKEDITOR.instances){a=CKEDITOR.instances[r].name}}CKEDITOR.instances[a].on("instanceReady",function(t){t.editor.on("panelShow",function(e){if(v___theme_night_mode_enabled||v___theme_night_mode){$(e.data.element.$.children[0]).contents().find("body").addClass("nightRider")}else{$(e.data.element.$.children[0]).contents().find("body").removeClass("nightRider")}});CKEDITOR.instances[a].resize("100%",i?e[1]:s,false)});CKEDITOR.instances[a].on("instanceReady",function(e){$(e.editor.document.$).click(function(){var t=$(e.sender.container.$).parents(".jsPanel").attr("data-uid");if(t&&t.length){parent.window["jsp_"+parseInt(t.replace("jsp_",""))].front()}});e.editor.on("dialogShow",function(e){var t="cke_dialog_ui_checkbox";$(e.data._.element.$).find("."+t+"").removeClass().addClass("awcheckbox awobject");$(e.data._.element.$).find("."+t+"_input").removeClass().addClass("iawobject").next("label").addClass("lawobject");if(e.data._.name==="base64imageDialog"){}})});if(e[2]===true){CKEDITOR.instances[a].on("change",function(t){this.updateElement();set_onbeforeunload_status(1,0);var i=parseInt(e[3].replace("html_editor_",""))-1;$("#jsPanel-"+i+"").find("._filemanager_file_editor_save").addClass("text-danger __locked__");$("#jsPanel-"+i+"").find("select[data-encoding]").addClass("pointer-events-none")})}if(e[3]==="edit_web"){setTimeout(function(){$("hr + b").removeClass("hidden");$(".__tmp__spinner").remove()},100)}};if(typeof CKEDITOR=="object"){s()}else{CKEDITOR_BASEPATH=v___server_js_path+"/ckeditor/";var r="ckeditor";$.getScript(""+v___server_js_path+"/"+r+"/"+r+".js?"+theme.version(true)+"",function(){load.loaded.push(r);s()}).fail(function(e){if(e.statusText!=="canceled"&&e.statusText!=="abort"){connection_error(e,1)}})}}function table_proc_size_columns(){if(core.curModule(v___module_file_manager)){return}var e=[];$.each($(".container-fluid tr td span[data-filesize-bytes]"),function(){var t=$(this).parents("table"),i=$(this),n=$(this).parents("td"),a=n.index();if(i.length){n.attr("data-order",i.attr("data-filesize-bytes"));!Test.arrContains(e,a)&&e.push(a);t.attr("data-ordered",1);i.contents().unwrap()}}).promise().done(function(){for(var t=0;t<e.length;t++){$(".container-fluid [data-ordered] tr td:nth-child("+(e[t]+1)+"):not([data-order])").attr("data-order",0)}})}function table_data_init(e,t,i,n){typeof t=="undefined"?t=false:false;typeof i=="undefined"?i=false:false;typeof n=="undefined"?n=false:false;$.each(e,function(t){if($(this).parents("#right-side-tabs").length){e.splice(t,1)}});if(core.curModuleFile("virtual-server","index.cgi")){t=true}$.fn.dataTableExt.sErrMode="throw";var a=function(e){if(e.parents(".info-container").length){return}if(!e[0]||!e[0].tHead||e[0].tHead.querySelector("tr:first-child th.table-title")){return}var a=e[0].querySelectorAll("tr").length,s=a>1e3,r=e.parents(".ui_grid_table").length;if(!r&&s){s=0}if(a>settings_table_init_datatables){return}var o=r?"i":String(),l=e.DataTable({order:[],aaSorting:[],bDestroy:true,bPaginate:s,pageLength:parseInt(window.outerHeight/40),columnDefs:[n],bInfo:s,bStateSave:t,destroy:true,dom:i?"Rlfrtip":s?"tf"+o+'p<"clear">':"f",language:{emptyTable:theme_language("datatable_semptytable"),info:theme_language("datatable_sinfo"),infoEmpty:theme_language("datatable_sinfoempty"),lengthMenu:theme_language("datatable_slengthmenu"),loadingRecords:theme_language("datatable_sloadingrecords"),processing:theme_language("datatable_sprocessing"),search:"",zeroRecords:theme_language("datatable_szerorecords"),paginate:{first:'<i class="fa fa-fw fa-angle-double-left"></i>',last:'<i class="fa fa-fw fa-angle-double-right"></i>',previous:'<i class="fa fa-fw fa-angle-left"></i>',next:'<i class="fa fa-fw fa-angle-right"></i>'}},initComplete:function(e){var t=$(e.nTableWrapper),i="dt-table-hscroll";if(t&&t.parent().is("."+i+"")){return}if(t.length){var n="opacity-0",a="pointer-events-none",r=e.nTable.querySelector(".ui_checked_columns:first-child .ui_checked_checkbox, .ui_checked_columns:first-child td > .awcheckbox");if(r){$(r).parents("table").find("thead th:first-child").addClass(""+n+" "+a+"")}var o=e.nTable.tHead.querySelectorAll("th");if(o.length){o.forEach(function(e){if(!e.textContent){e.classList.add(n,a)}})}if(s){t.addClass("dt-paginated").parents(".ui_grid_table").addClass("dt-paginated-grid").next(".btn-group.ui_links_row").before("<hr>");vars.pjax.cache.set("disable")}else{t.next("table").wrapAll('<div class="'+i+'"></div>')}}}});t&&l.search("").draw();var _=true;e.find("th").on("mouseover touchstart",function(e){if($(e.target).hasClass("sorting")){_=true}else{_=false}});l.on("order.dt",function(t){var i=l.order(),n=e.find("thead .sorting_desc, thead .sorting_asc").length===1?1:0,a=function(){l.order.neutral().draw();_=true};if(n&&!vars.events.keypressed.shift){if(!_&&i[0]&&i[0][1]==="asc"){a();return}}_=false})};if(core.curModuleFile("virtual-server","list_users.cgi")){var s=$(".table thead tr th").filter(function(){return $(this).text().match(/Last login|Dernière Connexion|Siste innlogging|Letzer Login|Laatste login/)}).index();if(s>-1){$.each(e.find("tbody tr td:nth-child("+(s+1)+")"),function(e,t){var i=$(this).text();if(/Never|Jamais|Aldri|Niemals|Nigdy|Nooit/i.test(i)){i=0}$(this).attr("data-sort",i)}).promise().done(function(){a(e)})}else{a(e)}}else{a(e)}}function mail_load_folders(){if(this.timeout){clearInterval(this.timeout)}if(typeof $.ui==="object"&&typeof $.ui.fancytree==="function"&&typeof mail==="object"&&typeof mail.folders==="object"&&typeof mail.folders.get==="function"){mail.folders.get()}else{this.timeout=setTimeout(function(){mail_load_folders()},200)}}function mail_load(e){if(!$t_uri_webmail||!settings_mail_ui){return}page.handle.content.offset(true);var t=uri_parse_param("id",e),i=uri_parse_param("folder",e),n=uri_parse_param("start",e),a=typeof mail==="object"&&typeof mail.messages==="object"&&typeof mail.messages.get==="function";a?mail.messages.get({id:t,folder:i,start:n}):load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.messages.get()"]);if(v___initial_load){var t=uri_parse_param("id");a?mail.messages.get(t):load.bundle(v___server_extensions_path+"/mail/mail",1,["mail.messages.get()"])}}function mail_page_check(e){if($t_uri_webmail&&settings_mail_ui&&session.server.data("product")==="usermin"&&(!e||e.nodeValue&&e.nodeValue.includes("mailbox"))){!page.handle.content.preloader.processing()&&page.handle.content.preloader.show(false,false,true);plugins.navigation.reset()}}function page_sysinfo_sensor_update_label(){var e=$("#system-status .badge-drivestatus");if(e.length){$.each(e,function(e,t){var i="",n=$(this).text(),a=n.split(":"),s=a[1]||a[0],r=s,o=$(this).hasClass("badge-cpufans")?1:0;if(o){i=HTML.label.textMaxLevels("rpm",r)}else{i=HTML.label.textMaxLevels("temperature",s)}Test.string(i)&&$(this).removeClass(function(e,t){return(t.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(i)})}}function page_table_rows_control(){var e=this;this.prev_active=undefined;var t=$("body").attr("class")&&$("body").attr("class").indexOf(v___module_file_manager)>-1,i=core.curModule("init")&&v___location_file.startsWith("edit_")||core.curModuleFile("virtual-server","edit_newshells.cgi");if(t||i){return}var n=$(".container-fluid table .ui_checked_columns"),a=n.length;var s="td:nth-child(1)",r="input:checkbox";$.each(n,function(t,i){if($(i).find("a[href]")&&!Test.strContains(v___location_path,"init/edit_")&&!$("body").hasClass("servers")&&!$(this).hasClass("selectable")){$(i).addClass("cursor-pointer").find("td").addClass("cursor-pointer").find("label").addClass("cursor-pointer").find("tt").addClass("cursor-pointer")}$(i).find("td:not(.selectable)").click(function(t){if($(this).find("a[href]").length>1&&!$(t.target).is("td")||($(t.target).is("select")||$(t.target).is("option"))){return}var n=window.navigator.platform==="MacIntel"?1:0;if(!n&&t.ctrlKey||n&&t.metaKey){return}if($(this).is(".ui_checked_checkbox")&&$(this).find(".awcheckbox > input[disabled]").length){return}if(check_selected_text()){return}if(!vars.events.keypressed.shift&&$(this).is(s)&&$(t.target).is(s)&&$(this).find(r).length){var a=$(this).find(r).first(),o=a.is(":checked");a.prop("checked",!o).trigger("change");return}setTimeout(function(){e.prev_active=$(i)},50);if(vars.events.keypressed.shift&&e.prev_active&&!e.prev_active.is($(i))&&t.originalEvent&&t.originalEvent.isTrusted===true){var l=e.prev_active.index(),_=$(i).index(),d=_>l?$(i).prevUntil(e.prev_active):$(i).nextUntil(e.prev_active),c="td:first-child input";var f=e.prev_active.find(c).is(":checked");d.find(c).each(function(t,i){$(i).add(e.prev_active.find(c)).prop("checked",f);$(i).trigger("change")})}if($(t.target).is(".awobject, .iawobject, .lawobject, .awcheckbox, .awradio, .ui_link, .btn")){if($(t.target).is(".ui_link, .btn")){t.preventDefault();t.stopPropagation();t.stopImmediatePropagation();var u=$(t.target).attr("href")||$(t.target).find("a").attr("href");if(u&&u.length>1){var g=$(t.target)||$(t.target).find("a");if(!core.linkSameOrigin(g)){theme_open_new_tab(u,1)}else{get_pjax_content(u)}}return}else{return}}if($(i).find("a[href]")&&!$("body").hasClass("servers")){var p=$(i).find("a[href]")[0],m=$(this).parents("tr.ui_checked_columns"),h=$(t.target).find('input[type="checkbox"]:not(":disabled")'),v=h.length;if(p&&($(this).find("a").attr("href")===$(p).attr("href")||$(this).find("a").attr("href")===undefined)&&!$(t.target).is("select, input, .awobject, .iawobject, .lawobject, .awcheckbox, .awradio")&&$(this).parent("tr").find('a[href*="download.cgi"]').length===0){if($(p).attr("target")){t.preventDefault();!v&&window.open($(p).attr("href"),$(p).attr("target"))}else{if(t.originalEvent){t.preventDefault();$(p).attr("href")&&get_pjax_content($(p).attr("href"))}}}if($(p).attr("href")){v&&get_pjax_content($(p).attr("href"))}}});$(i).find("td").contextmenu(function(e){if(!vars.events.keypressed.shift){e.stopPropagation();return}typeof window.getSelection==="function"&&window.getSelection().removeAllRanges();var t=$(this).parents("tr.ui_checked_columns");e.preventDefault();if($(this).parents("tr").find('input[type="checkbox"]:first').length&&$(this).parents("tr").find('input[type="checkbox"][disabled]').length===0||$(this).parents("tr").find('input[type="checkbox"][disabled]').length&&$(this).parents("tr").find("input").length>1){if(t.find('input[type="checkbox"]:first').is(":checked")){t.removeClass("hl-aw hl-aw-chk")}else{t.addClass("hl-aw")}t.find('input[type="checkbox"]:first').trigger("click")}})})}function page_radios_evolve(e){if(session.server.data("post")=="conf"){return}if(!e){e='.container-fluid input[type="radio"]:not(.iawobject), .container-fluid input[type="checkbox"]:not(.iawobject)'}$.each($(e),function(e){if($(this).data("xdn")===1||$(this).hasClass("_select-unselect_")===1){return}if($(this)[0]){$___text=$(this)[0].nextSibling}var t=$(this).next('input:not([type="radio"], [type="checkbox"], [type="hidden"]), select, textarea'),i=$___text&&$___text.nodeValue&&$.trim($___text.nodeValue).length>1,n=$.trim((i?$___text.nodeValue:"&nbsp;").replace(/<hr>/g,"&lt;hr&gt;").replace(/<header>/g,"&lt;header&gt;")),n=n.length&&n!="&nbsp;"?n+"&nbsp;&nbsp;":n,a=$(this).attr("type").toLowerCase(),s=$(this).parents(".tab-pane").attr("id"),s=s&&s.length?s.replace(/[^a-zA-Z0-9_-]+/g,""):0,r=Math.floor(Math.random()*9e4)+1e4,o=$(this).attr("id"),l=("eid_"+(o&&$(this).attr("name")?$(this).attr("name"):r)+"_"+r+"_"+e+"_"+s).replace(/[^a-zA-Z0-9_-]+/g,"_"),l=o&&$("body").find("#"+o.replace(/[^a-zA-Z0-9_-]+/g,"_")).length===1?o.replace(/[^a-zA-Z0-9_-]+/g,"_"):l;if($(this).next("label").length===0&&t.length===0&&i){$(this).addClass("iawobject");var _='for="'+l+'"';$(this).attr("id",l);$($___text).wrap('<label class="lawobject" '+_+">&nbsp;&nbsp;"+n+"&nbsp;</label>");$($___text).remove();$(this).next("label").addBack().wrapAll('<span class="aw'+a+' awobject awobjectm"></span>');$(this).data("xdn",1)}else if(t.length===0&&$(this).next("label").length===0&&$(this).prev("label").length===1&&!i){var d=$(this).prev("label"),c=d.text();$(this).addClass("iawobject");$(this).attr("id",l);$(this).after('<label class="lawobject" for="'+l+'">&nbsp;&nbsp;'+c+"&nbsp;</label>");$(this).next("label").addBack().wrapAll('<span class="aw'+a+' awobject awobjectm"></span>');$(this).removeClass("form-control").css("width","initial");d.remove();$(this).data("xdn",1)}else if(t.length===0&&$(this).next("label").length===0&&!i){$(this).addClass("iawobject");$(this).attr("id",l);$(this).after('<label class="lawobject" for="'+l+'">&nbsp;&nbsp;</label>');$(this).next("label").addBack().wrapAll('<span class="aw'+a+' awobject awobjectm"></span>');$(this).data("xdn",1)}if(t.length===1&&$(this).next("label").length===0){$(this).addClass("iawobject");$(this).attr("id",l);$(this).after('<label class="lawobject" for="'+l+'">&nbsp;&nbsp;'+n+"&nbsp;</label>");$(this).next("label").addBack().wrapAll('<span class="aw'+a+' awobject awobjectm"></span>');i&&$($___text).remove();$(this).data("xdn",1)}})}function popover_visibility_position(e){$.each($(".module-help"),function(t,i){if(!e.is($(this))){$(this).css({"z-index":10001-t,opacity:.85})}else{$(this).css({"z-index":10001+t,opacity:1})}})}function page_refresh(e){plugins.pjax.page.refresh(e)}function page_init(){typeof v___initial_load==="undefined"&&(v___initial_load=1);typeof v___title_initial==="undefined"&&(v___title_initial=session.server.data("title-initial"));v___location=location;$__theme_name__="authentic",$__theme_navigation="xnavigation=1",$__theme_event_deselectors=':not([href*="index.cgi?path="]):not([href*="config.cgi?path="]):not([href*="download.cgi?file="])',$__theme_default_deselectors=':not([target="_blank"]):not([href^="#"]):not([data-href^="#"]):not([data-toggle="collapse"]):not([href*="javascript:"]):not(.has-sub):not([data-has-sub-link]):not([onclick]):not([data-nref])',v___class_select2_leak=".select2-dropdown, .select2-search, .select2-results, aside .select2, aside .select2-selection, aside .select2-selection__rendered",v___user_level=session.server.data("access-level"),v___shell_type=v___user_level==0?"#":"$",v___debug=parseInt(session.server.data("debug")),v___source_type=v___debug?"src":"min",v___available_usermin=session.server.data("usermin"),typeof $.support.spa==="undefined"&&($.support.spa=session.server.data("navigation")),session.alive=session.server.data("session")=="1"?1:0,typeof v___blocked_navigation==="undefined"&&(v___blocked_navigation=0),v___server_username=session.server.data("user"),v___server_userhome=get_user_home(),v___module=session.server.data("module"),typeof v___module_previous==="undefined"&&(v___module_previous=0),v___script_name=session.server.data("script-name").replace(/^\//g,""),v___module_file_manager="file"+(core.moduleAvailable("file-manager")?"-manager":"min"),v___server_hostname=session.server.data("hostname"),v___theme_reload=0,v___theme_connection_reestablish=0,v___theme_connection_triggered_origin=0,v___theme_ajax_error=0,typeof v___theme_pjax_call==="undefined"&&(v___theme_pjax_call=0),typeof v___theme_content_history==="undefined"&&(v___theme_content_history=0),typeof v___location_previous==="undefined"&&(v___location_previous=0),v___theme_night_mode=session.server.data("data-night-mode")=="1"?1:0,v___theme_night_mode_enabled=v___theme_night_mode,o___gotten_scripts=typeof o___gotten_scripts==="undefined"?[]:o___gotten_scripts,v___page_container=function(){return $(".container-fluid")}(),v___page_activeElement=$("body")[0],v___page_hasEditor=editor_init_check(),v___target_servers_index="servers/link.cgi",v___URI=URI(v___location),v___location_protocol=v___URI.protocol(),v___location_port=v___URI.port(),v___location_origin=v___URI.origin(),v___location_hostname=v___URI.hostname(),v___location_href=v___location.href,v___location_path=v___URI.path().replace(/\/+/g,"/"),v___location_path_unslashed=v___location_path.replace(/^\//g,"").replace(/\/$/g,""),v___location_path_lead_unslashed=v___location_path.replace(/^\//g,""),v___location_file=v___URI.filename(),v___location_directory=v___URI.directory(),v___location_directory_trail_slashed=v___location_directory?v___location_directory.endsWith("/")?v___location_directory:v___location_directory+"/":"/",v___location_directory_unslashed=v___location_directory.replace(/^\//g,"").replace(/\/$/g,""),v___location_directory_unslashed_trail_slashed=v___location_directory_unslashed+"/",v___location_query=link_type_convert(v___URI.query(),1),v___location_resource=link_type_convert(v___URI.resource(),1),v___location_resource_unslashed=v___location_resource.replace(/^\//g,"").replace(/\/$/g,""),v___location_prefix=session.server.data("webprefix"),v___location_prefix_unslashed_trail_slashed=v___location_prefix.replace(/^\//g,"").replace(/\/$/g,"")+"/",v___location_prefix_unslashed_trail_slashed==="/"?v___location_prefix_unslashed_trail_slashed="":false,v___server_css_path=v___location_prefix+"/unauthenticated/css",v___server_css_palettes_path=v___server_css_path+"/palettes",v___server_js_path=v___location_prefix+"/unauthenticated/js",v___server_extensions_path=v___location_prefix+"/extensions";plugins.navigation.state.update();if(v___location_query&&v___location_query.includes("xnavigation=ERR_CERT_AUTHORITY_INVALID")){window.close()}}function content_page_center_h_offset(){var e=$("aside"),t=e.length,i=parseInt(session.server.data("navigation-collapsed"))||matchMedia("(max-width: 1080px)").matches,n=parseInt(session.server.data("slider-fixed")),a=0,s=!($(window).width()<640);if(!n&&i){a=0}else if(s&&t&&(!i&&!n||i&&!n||!i&&n)){a=-20}if(s&&t&&i&&n){a=-150}if(s&&t&&!i&&!n){a=e.outerWidth()/2}return a}function content_page_calc_width(){var e=parseInt(session.server.data("navigation-collapsed"))||matchMedia("(max-width: 1080px)").matches,t=e?0:$("aside").outerWidth()||0,i=parseInt(session.server.data("slider-fixed"))&&!document.querySelector(".right-side-tabs-toggler").offsetHeight,n=!i?0:300,a=window.innerWidth-t-n-60-2;return parseInt(a)}function content_page_calc_height(e){var t="container-fluid",i=0,n=320;if(e==="editor"){i=200}var a=$(window).outerHeight()-parseInt($("."+t+"").css("margin-top"))-parseInt($("."+t+" > .panel > .panel-heading").outerHeight())-parseInt($("."+t+" > .panel > .panel-body").css("padding-top"))-i;return parseInt(a>n?a:n)}function editor_change_mode(e,t){var i=CodeMirror.findModeByMIME(t);mode=i.mode;spec=i.mime;e.setOption("mode",spec);CodeMirror.autoLoadMode(e,mode)}function editor_modes(e){var t='<select title="'+theme_language("editor_set_syntax")+'" aria-label="'+theme_language("editor_set_syntax")+'" data-no-appearance class="select-mode-info" dir="rtl">',i=CodeMirror.modeInfo,n=0,a=e&&e.helperType?e.helperType:0;$.each(i,function(i,s){var r=0;if(e){if(!n&&a&&a==s.mime){r=1;n++}if(!a){if(!n&&e.name==s.mode){r=1;n++}else if(!n&&e&&e.name&&s.mime.indexOf(e.name)>-1){n++;r=1}else if(!n&&e&&e.name&&e.name.indexOf(s.mime)>-1){n++;r=1}}}t+="<option "+(r?" selected":"")+' value="'+s.mime+'">'+s.name+"</option>"});t+="</select>";var s=0;if(!$(t).find("option[selected]").val()){var r=$(t);r.find('option[value="text/plain"]').attr("selected",1);s=r[0].outerHTML}return s||t}function editor_init_check(){var e=$(".container-fluid > .panel > .panel-body textarea");if(e.length===1&&(e.attr("name")==="data"||e.attr("name")==="text"||e.attr("name")==="conf"||e.attr("name")==="script"||core.curModuleFileQuery("virtual-server","edit_html.cgi","textok=")||core.curModuleFileQuery("nginx","edit_server.cgi","editfile=")||v___location_file.indexOf("manual")>-1)){if(core.curModule("gnupg")||core.curModuleFile("virtual-server","mass_ucreate_form.cgi")||core.curModuleFile("virtual-server","mass_create_form.cgi")||core.curModuleFile("server-manager","edit_pubkey.cgi")||core.curModuleFile("server-manager","edit_key.cgi")||check_location_resource("/config.cgi?server-manager")||core.curModuleFile("useradmin","batch_form.cgi")||core.curModuleFile("useradmin","gbatch_form.cgi")||v___location_file==="mass_form.cgi"||v___location_file==="feedback_form.cgi"||$("textarea").attr("id")==="notes"){return 0}v___page_hasEditor=1;return 1}return 0}function editor_custom_modes(e,t){var i,n,a=t||v___module;if(a==="apache"||t&&(Test.strContains(t.toLowerCase(),"/apache2/")||Test.strContains(t.toLowerCase(),"/httpd/"))||(a==="postfix"||t&&Test.strContains(t.toLowerCase(),"/postfix/"))||(a==="dovecot"||t&&Test.strContains(t.toLowerCase(),"/dovecot/"))||(a==="spam"||t&&Test.strContains(t.toLowerCase(),"/spam/"))||(a==="sendmail"||t&&Test.strContains(t.toLowerCase(),"/sendmail/"))||(a==="samba"||t&&Test.strContains(t.toLowerCase(),"/samba/"))||(a==="proftpd"||t&&Test.strContains(t.toLowerCase(),"/proftpd/"))||(a==="fail2ban"||t&&Test.strContains(t.toLowerCase(),"/fail2ban/"))||(a==="sshd"||t&&(Test.strContains(t.toLowerCase(),"/ssh/")||Test.strContains(t.toLowerCase(),"/sshd/")))||(a==="squid"||t&&Test.strContains(t.toLowerCase(),"/squid/"))||(a==="ldap-server"||t&&Test.strContains(t.toLowerCase(),"/ldap-server/"))||a==="postgresql"){i="rpm";n="rpm-spec"}else if(a==="mysql"||t&&(Test.strContains(t.toLowerCase(),"/mysql/")||Test.strContains(t.toLowerCase(),"/mariadb/"))){i="properties";n="text/x-properties"}else{if(a==="init"||t&&Test.strContains(t.toLowerCase(),"/init/")||(a==="procmail"||t&&Test.strContains(t.toLowerCase(),"/procmail/"))||core.curModuleFile("cron","edit_manual.cgi")||(a==="shorewall"||t&&Test.strContains(t.toLowerCase(),"/shorewall/"))||t&&Test.strContains(t.toLowerCase(),"caddy")||(Test.strContains(a,"cshrc")||t&&Test.strContains(t.toLowerCase(),"cshrc"))){i="shell";n="text/x-sh"}else if(Test.strContains(a,"nginx")||t&&Test.strContains(t.toLowerCase(),"nginx")){i="nginx";n="text/x-nginx-conf"}else if(a==="phpini"||t&&Test.strContains(t.toLowerCase(),"/phpini/")){i="z80";n="text/x-z80"}else{if(a=="bind8"||t&&(Test.strContains(t.toLowerCase(),"/bind")||Test.strContains(t.toLowerCase(),"/named"))||core.curModuleFile("virtual-server","manual_records.cgi")){if(v___location_query&&(Test.strContains(v___location_query.toLowerCase(),"file=")&&Test.strContains(v___location_query.toLowerCase(),"named.conf")||!Test.strContains(v___location_query.toLowerCase(),"file="))){i="go";n="text/x-go"}else if(v___location_file==="edit_text.cgi"||v___location_file==="manual_records.cgi"){i="nsis";n="text/x-nsis"}else{i="mscgen";n="text/x-mscgen"}}else{if(a=="virtual-server"&&e&&e.attr("name")=="body"){i="htmlmixed";n="text/html"}}}}return[i,n]}function editor_fix_width(e){var t=$(e).parent("form"),i=content_page_calc_width();if(t&&t.length){t.width(i);$(window).off("resize.cmc");$(window).on("resize.cmc",function(){editor_fix_width(e,i)})}}function editor_init(e,t,i,n,a,s,r,o,l,_){r=typeof r=="undefined"||r==false?false:true;l=typeof l=="undefined"||l==false?false:l;if(r){return}a=typeof a=="undefined"||a==false?false:true;s=typeof s=="undefined"||s==false?false:true;$.each(e,function(r,d){var c=$(this),f=["phpini","bind8"],u=["phpini"],g=["bind8"],p=v___module;f.indexOf(p)>=0&&$(this).data("name","data");CodeMirror.modeURL=v___location_prefix+"/unauthenticated/js/codemirror/mode/%N/%N.js";var m=null,h="text/plain";var v=false;if(core.curModuleFile("custom","view.cgi")){v=$(".container-fluid").find("[data-sub_title]").find("tt").text()}else{if(n&&!n.toString().includes("static")){if(t){v=t.replace(/<(?:.|\n)*?>/gm,"").replace(/ *\([^)]*\) */g,"");t=v}}else{v=$('select[name="file"]').val()}}var b=0;var x=t?t:v,w,m,h;if(w=/.+\.([^.]+)$/.exec(x)){var y=CodeMirror.findModeByExtension(w[1]);if(y){m=y.mode;h=y.mime;b=[m,h]}}else{if(/\//.test(x)){var y=CodeMirror.findModeByMIME(x);if(y){m=y.mode;h=x;b=[m,h]}}else{m=null;h="text/plain";b=[m,h]}}var C=n.toString().includes("static");if(C){var k;if(core.curModuleFile("custom","view.cgi")&&v){k=editor_custom_modes(false,v)}else{k=editor_custom_modes($(this))}m=k[0];h=k[1]}else if(m===null||m==="null"){var j=document.getElementById("jsPanel-"+(n-1)+""),O=edit_file_parse_target($(j)),T=O[2]||x;var S=editor_custom_modes(false,T);m=S[0];h=S[1];var P;if(!m){var I;if(I=/.+\.([^.]+)$/.exec(T)){P=I[1];if(P==="fcgi"){P="cgi"}var E=CodeMirror.findModeByExtension(P);if(E){m=E.mode;h=E.mime}}}if((m===null||m==="null")&&P&&!T.toLowerCase().includes("readme")){if(T.includes("cron")||T.includes("clamav")||T.includes("clamav")){m="shell";h="text/x-sh"}else if(P==="conf"){m="properties";h="text/x-properties"}else if(T.match(/^\/etc\//)){m="rpm";h="rpm-spec"}}if(!m&&!T.toLowerCase().includes("readme")){if(T.includes("git/config")||T.includes("shadow")||T.includes("group")||T.includes("passwd")){m="properties";h="text/x-properties"}else if(T.includes("bash")||T.includes(".profile")||T.includes("/usr/local")||T.includes("cron")||T.includes("git/hooks")||T.includes("grub.d")){m="shell";h="text/x-sh"}else if(T.toLowerCase().includes("pgp")||T.toLowerCase().includes("gpg")||T.toLowerCase().includes("ssl.")||T.includes("/pki/")){m="asciiarmor";h="application/pgp"}else if(T.match(/^\/etc\//)||T.includes(".git")&&T.includes("/exclude")){m="rpm";h="rpm-spec"}}}$current_file=v___location_path.replace(/^\//g,"");if($current_file){$current_file=$current_file.split("/")[1]}if(editor_init_check()||$(".jsPanel").length||a){CodeMirror.commands.autocomplete=function(e){e.showHint({hint:CodeMirror.hint.anyword})};var z=function(){if(d&&$(d).length){var e=$(d).parents(".panel-body").find(".dropdown-editor_config_search");if(n&&n.toString().includes("static")&&$(d).parents("form")){e.find('button[data-toggle="dropdown"]').trigger("click")}}},q={"Alt-Space":"autocomplete","Alt-S":z,"Shift-Cmd-F":"replace","Shift-Ctrl-F":"replace"};if(config_portable_module_filemanager_editor_tabs_to_spaces){q["Tab"]=function(){window["__cm_editor_"+n].replaceSelection(config_portable_module_filemanager_editor_tabs_to_spaces_number,"end")}}var D;try{D=$(d).parent("form").attr("data-binary")}catch(e){}window["__cm_editor_"+n]=CodeMirror.fromTextArea(d,{tabMode:"indent",matchBrackets:!_,lineNumbers:!_,keyMap:"sublime",highlightSelectionMatches:{annotateScrollbar:!_},lineWrapping:_&&D?true:~~localStorage.getItem(v___server_hostname+"-"+session.server.data("user")+"-editor-line-wrapping")||false,indentUnit:0,autofocus:!_,foldGutter:!_,readOnly:_,continueComments:!_,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:q,styleActiveLine:!_,theme:v___theme_night_mode?"monokai":settings_cm_editor_palette});if(n&&n.toString().includes("static")){v___page_hasEditor=1}window["__cm_editor_"+n].setOption("mode",h);if(m&&m!="rpm"){CodeMirror.autoLoadMode(window["__cm_editor_"+n],m)}var R=".jsPanel-controlbar .jsPanel-btn-";window["__cm_editor_"+n].addKeyMap({"Alt-W":function(e){var t=!e.getOption("lineWrapping");e.setOption("lineWrapping",t);localStorage.setItem(v___server_hostname+"-"+session.server.data("user")+"-editor-line-wrapping",~~t)},"Alt-Up":function(){var e=document.getElementById("jsPanel-"+(n-1)+"");if(e){$(e).find(""+R+"maximize:visible").trigger("click")}},"Alt-Down":function(){var e=document.getElementById("jsPanel-"+(n-1)+"");if(e){$(e).find(""+R+"normalize:visible").trigger("click")}}});var M=$("body").find(".jsPanel"),L=M&&M.length;page.handle.content.offset(true);setTimeout(function(){if(C){var e=$(".container-fluid .panel > .panel-body .CodeMirror");e.before("<i "+theme_inject_tooltip(theme_language("global_help"))+' aria-label="'+theme_language("global_help")+'" class="fa fa-fw fa-lg fa-question-circle text-muted -helper __helper"></i>');if(e.length===1&&core.curModule("custom")){e.before('<div data-mode-select data-mode-select-single-mode class="text-light cursor-default">'+'<label class="select-styled select-styled-small select-styled-no-border select-styled-no-icon">'+""+editor_modes(__cm_editor_static.getMode())+"</label></div>");var t=e.prev("[data-mode-select]").find(".select-mode-info");t.on("change",function(){editor_change_mode(__cm_editor_static,$(this).val())});if(y&&y.mime){t.val(y.mime).trigger("change")}}}else{var i=document.getElementById("jsPanel-"+(n-1)+""),a=$(i).find(".select-mode-info"),s=$(i).find(a).find("option");s.filter(function(){return this.value.indexOf(h)>-1}).prop("selected",true);a.on("change",function(){editor_change_mode(window["__cm_editor_"+n],$(this).val())})}var r=$(".fa.fa-question-circle.__helper:not(.soft_wt), .__helper___:not(.soft_wt)");$.ajax({type:"GET",url:v___location_prefix+"/help.cgi/authentic-theme/editor",data:false,dataType:"text",success:function(e){if(platform.detect()==="mac"){e=e.replaceAll("Ctrl + ⇧ + △","⌃ + ⇧ + △");e=e.replaceAll("Ctrl + ⇧ + ▽","⌃ + ⇧ + ▽");e=e.replaceAll("Ctrl + ⇧ + K","⌃ + ⇧ + K");e=e.replaceAll("Ctrl +","⌘ +");e=e.replaceAll("Alt +","⌥ +")}r.popover({container:"body",placement:"auto left",sanitize:false,title:'<button type="button" class="close pull-right close-popover-trigger font-size-120p">&times;</button>'+theme_language("editor_help_title"),content:e,trigger:"click",html:true})}});r.on("show.bs.popover",function(e){if(this.classList.contains("zi-last")){setTimeout(function(){var t=e.delegateTarget.lastElementChild;if(t&&t.classList){t.classList.add("zi-99999")}})}});r.on("inserted.bs.popover",function(){$("body").find(".editor_help").parents(".popover").addClass("_helper").next("header").remove();$("body").find(".popover-content > .ui_subheading").remove()})},100);if(s){window["__cm_editor_"+n].on("change",function(e,t){if(!Test.strContains(v___location_path,"init/edit_")){if(n&&n.toString().includes("static")){set_onbeforeunload_status(1,0)}}})}var A=$(".container-fluid > .panel > .panel-body").attr("data-cm-line"),K=$(".container-fluid > .panel > .panel-body").attr("data-cm-state");if(o){despinnerfy_buttons();$('[data-form="submitter"]').hasClass("btn-warning")&&set_onbeforeunload_status(1);page.handle.content.offset(true)}if(o&&!!A){__cm_editor_static.setCursor(parseInt(A.split(",")[0]),parseInt(A.split(",")[1]))}var N=uri_parse_param("editor_line");if(N){__cm_editor_static.setCursor(parseInt(N)-1,0)}var F=0;if(core.curModuleFile("virtual-server","edit_html.cgi")){F-=-200}else{F-=-50}if(l){var W=$(d).parents("form"),U=W.find('input[type="submit"]:visible, .ui_form_end_submit.btn-success[type="button"]:visible');W.on("submit",function(e){set_onbeforeunload_status(0,0)});if(U.prev("br").length){U.addClass("margined-top--10")}$(window).resize(function(){window["__cm_editor_"+n].setSize(null,(content_page_calc_height("editor")-F)*l)}).trigger("resize");window["__cm_editor_"+n].on("change",function(){set_onbeforeunload_status(1,0);U.removeClass("btn-default btn-success").addClass("btn-danger")})}else{var H;i?H=i:H=4;if(!i){$window_height=content_page_calc_height("editor")-F;window["__cm_editor_"+n].setSize(null,$window_height);$(window).resize(function(){$window_height=content_page_calc_height("editor")-F;window["__cm_editor_"+n].setSize(null,$window_height)})}else{window["__cm_editor_"+n].on("change",function(t,i){e.val(window["__cm_editor_"+n].getValue());var a=$(":focus").parents(".jsPanel");if(a.is(".jsPanel")){a.find("._filemanager_file_editor_save").addClass("text-danger __locked__");a.find("select[data-encoding]").addClass("pointer-events-none");set_onbeforeunload_status_native(1)}});window["__cm_editor_"+n].setSize(H[0],H[1])}}var B=$(".sub_table_container");if(B.find(".CodeMirror").length){B.addClass("xcontent-force-no-styling");$(".panel-body").addClass("xqcontent-forced");if(B.find(".CodeMirror").closest("td").parent("tr").hasClass("ui_checked_columns")){$(".panel-body").addClass("xqcontent-forced-checked")}}if(n&&n.toString().includes("static")){editor_background_save(o&&!!A&&K=="true",o)}if(n&&n.toString().includes("static")&&!L){editor_fix_width(".container-fluid > .panel .panel-body textarea:hidden")}}})}function viewer_init_check(){if($('body[class^="logviewer"]').length&&v___location_query&&(v___location_query.indexOf("view=1")>-1||v___location_query.indexOf("new=")>-1)||$('body[class^="syslog"]').length&&v___location_query&&(v___location_query.indexOf("view=1")>-1||v___location_query.indexOf("new=")>-1)||$('body[class^="syslog-ng"]').length&&v___location_file&&v___location_file==="view_log.cgi"&&v___location_query&&v___location_query.indexOf("dest=")>-1){return 1}else{return 0}}function viewer_init(){$("pre[data-cm-viewer]").remove();if(!$(".panel-body pre").find("i").length){var e=false;$(".panel-body pre").each(function(t,i){var n=$(this),a=Convert.htmlStrip(Convert.uriDecodeComponent(n.html()));n.addClass("hidden");n.after("<pre data-cm-viewer data-cm-viewer-id-"+(t+1)+"></pre>");$target=$("pre[data-cm-viewer-id-"+(t+1)+"]");var s=$.trim($('[name="filter"]:first').val());if(s&&s.length){var r=0;try{new RegExp(s,"i")}catch(e){r=1}if(!r){CodeMirror.defineMode("highlightSearch",function(e,t){var i={token:function(e,t){var i=e.string.match(new RegExp(s,"i")),n=i&&i[1];if(n){s="";$.each(i,function(e,t){if(Test.numeric(e)&&e>0){if(s.length){s+="|"+t}else{s=t}}})}s=new RegExp(s,"i");if(e.match(s)){return"highlightSearch"}while(e.next()!=null&&!e.match(s,false)){}return null}};return CodeMirror.overlayMode(CodeMirror.getMode(e,t.backdrop),i)})}}e=CodeMirror($target[0],{value:a,lineNumbers:false,mode:s?"highlightSearch":null,theme:v___theme_night_mode?"monokai":settings_cm_editor_palette,readOnly:true,lineWrapping:~~localStorage.getItem(v___server_hostname+"-"+session.server.data("user")+"-viewer-line-wrapping")||false});e.addKeyMap({"Alt-W":function(e){var t=!e.getOption("lineWrapping");e.setOption("lineWrapping",t);localStorage.setItem(v___server_hostname+"-"+session.server.data("user")+"-viewer-line-wrapping",~~t)}})}).promise().done(function(){})}else{var t=0,i=$('.panel-body [name="filter"]');if(i.length&&i.val()){t=1}$(".panel-body pre > i").addClass("label label-transparent-15").text(theme_language(t?"global_no_results_found":"global_empty").toUpperCase());$(".panel-body pre").addClass("text-center")}}function notifications(e,t,i,n,a){if(!settings_side_slider_enabled||!settings_side_slider_notifications_enabled){if(!a){return}}var s=function(e,t){if(t){if(t.startsWith("http:")||t.startsWith("https:")||t.includes("ftp:")||t.includes("ftps:")||t.startsWith("//")){theme_open_new_tab(t,1)}else{check_bundle(t);plugins.navigation.reset();get_pjax_content(t)}}e.close();window.focus()};var e=Convert.htmlUnEscape($.trim(e.replace(/(<([^>]+)>)/gi,""))).replace(/\s+/g," "),t=Convert.htmlUnEscape($.trim(t.replace(/(<([^>]+)>)/gi,""))).replace(/\s+/g," ");var r=session.server.data("product");if(plugins.navigation.switch.available("cloudmin")){r="cloudmin"}else if(plugins.navigation.switch.available("virtualmin")){r="virtualmin"}i=r;if(Notification.permission==="granted"){var o=new Notification(e,{body:t,icon:v___location_prefix+"/images/"+"notifications_"+i+".png"});o.onclick=function(){s(o,n)}}else if(Notification.permission!=="denied"){Notification.requestPermission(function(a){if(a==="granted"){var r=new Notification(e,{body:t,icon:v___location_prefix+"/images/"+"notifications_"+i+".png"});r.onclick=function(){s(r,n)}}})}}function uri_parse(e,t){var i=URI(t?t:v___location);if(e==="directory"){return i.directory()}else if(e==="directory"){return i.directory()}else if(e==="file"){return i.filename()}else if(e==="query"){return i.query()}}function uri_parse_param(e,t){var i=URI.parseQuery(URI(t?t:v___location_resource).query())[e];return i?i:String()}function uri_parse_param2(e,t){var i=t,n=new RegExp("[?&]"+e+"=([^&#]*)","i"),a=n.exec(i);return a?a[1]:null}function unbuffered_header_post(e){var t=this;if(!t.is_running){t.is_running=2}if(Test.strContains(e.responseText,"theme_post_save")||Test.strContains(e.responseText,"theme_select_server")){if(t.is_running!==2){return}t.is_running=1;setTimeout(function(){t.is_running=2},1e3);var i=e.responseText.match(/theme_post_save(.*)$/gm),n=e.responseText.match(/theme_select_server(.*)$/gm);setTimeout(function(){if(i){var e=i[0].split("="),t=function(){var e=location.pathname;if(e){e=e.replace(/^\//,"");plugins.navigation.detect(e,"progress")}};plugins.navigation.reload(e[1],t)}else if(n){var a=n[0].split("="),s=$("aside select").val();if(s!=a[1]){plugins.navigation.reload(a[1]=="-1"?"0":a[1])}}},500)}}function unbuffered_header_processor_allow_popstate(){var e=vars.requested_page;if(e&&e.includes("proc/trace.cgi")){progressive_request.abort();return true}return false}function unbuffered_header_processor_allow(e,t){var i=URI(v___location),n=i.path(),a="virtual-server",s="server-manager";var r=vars.previous_request_progressive;if(typeof vars.previous_request_progressive==="object"){r=$(r.target).serialize()}typeof e=="undefined"?false:n=e;if((!v___initial_load||t)&&n&&Test.strContains(n,".cgi")&&(Test.strContains(n,"webmin/install_theme.cgi")||Test.strContains(n,"usermin/install_theme.cgi")||n.indexOf("/"+a+"/import.cgi")>-1||n.indexOf("/"+a+"/postsave.cgi")>-1||n.indexOf("/"+a+"/validate.cgi")>-1||n.indexOf("/"+s+"/save_serv.cgi")>-1||n.indexOf("/"+s+"/mass_update.cgi")>-1||n.indexOf("/"+s+"/mass_domains.cgi")>-1||n.indexOf("/"+s+"/get_images.cgi")>-1||n.indexOf("/"+s+"/list_gces.cgi")>-1||n.indexOf("/"+s+"/list_ec2s.cgi")>-1||n.indexOf("/"+s+"/unpause.cgi")>-1||n.indexOf("/"+s+"/find.cgi")>-1||n.indexOf("useradmin/batch_exec.cgi")>-1||n.indexOf("useradmin/gbatch_exec.cgi")>-1||n.indexOf("useradmin/mass_delete_user.cgi")>-1||n.indexOf(""+a+"/domain_setup.cgi")>-1||n.indexOf(""+a+"/upgrade.cgi")>-1||n.indexOf(""+a+"/mass_create.cgi")>-1||n.indexOf(""+a+"/restore.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/save_newip.cgi")>-1||n.indexOf(""+a+"/pro/mass_domains_change.cgi")>-1||n.indexOf(""+a+"/install_dkim.cgi")>-1||n.indexOf(""+a+"/reset_features.cgi")>-1||n.indexOf(""+a+"/save_domain.cgi")>-1||n.indexOf(""+a+"/backup.cgi")>-1||n.indexOf(""+a+"/save_phpmode.cgi")>-1||n.indexOf(""+a+"/script_install.cgi")>-1||n.indexOf(""+a+"/mass_change.cgi")>-1||n.indexOf(""+a+"/save_ratelimit.cgi")>-1||n.indexOf(""+a+"/mass_scripts.cgi")>-1||n.indexOf(""+a+"/mass_upgrade.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/save_newips.cgi")>-1||n.indexOf(""+a+"/letsencrypt.cgi")>-1&&!r.includes("only")||n.indexOf(""+a+"/migrate.cgi")>-1||n.indexOf(""+a+"/save_mail.cgi")>-1||n.indexOf(""+a+"/pro/mass_delete_domains.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/delete_domain.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/unscript_install.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/mass_uninstall.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/clone.cgi")>-1||n.indexOf(""+a+"/fix_symlinks.cgi")>-1&&!r.includes("ignore")||n.indexOf(""+a+"/disable_domain.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/delete_databases.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/move.cgi")>-1||n.indexOf(""+a+"/enable_domain.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/transfer.cgi")>-1||n.indexOf(""+a+"/pro/mass_disable.cgi")>-1||n.indexOf(""+a+"/rename.cgi")>-1||n.indexOf(""+a+"/pro/mass_enable.cgi")>-1||n.indexOf(""+a+"/save_frame.cgi")>-1||n.indexOf(""+a+"/check.cgi")>-1||n.indexOf(""+a+"/save_newchroot.cgi")>-1||n.indexOf(""+a+"/enable_dkim.cgi")>-1||n.indexOf(""+a+"/install_awscli.cgi")>-1||n.indexOf(""+a+"/save_proxy.cgi")>-1||n.indexOf(""+a+"/save_dbname.cgi")>-1||n.indexOf(""+a+"/save_dbpass.cgi")>-1||n.indexOf(""+a+"/save_dbhosts.cgi")>-1||n.indexOf(""+a+"/save_mysqlremote.cgi")>-1||n.indexOf(""+a+"/enable_clamd.cgi")>-1||n.indexOf(""+a+"/disable_clamd.cgi")>-1||n.indexOf(""+a+"/enable_spamd.cgi")>-1||n.indexOf(""+a+"/disable_spamd.cgi")>-1||n.indexOf(""+a+"/unalias.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/save_newautoconfig.cgi")>-1||n.indexOf(""+a+"/quotacheck.cgi")>-1||n.indexOf(""+a+"/unsub.cgi")>-1&&r.includes("confirm")||n.indexOf(""+a+"/save_domdkim.cgi")>-1||n.indexOf(""+a+"/fix_modphp.cgi")>-1&&!r.includes("ignore")||n.indexOf(""+a+"/pro/connectivity.cgi")>-1||n.indexOf(""+a+"/all_webmin.cgi")>-1||n.indexOf(""+a+"/copy_cert_all.cgi")>-1||n.indexOf(""+a+"/disable_mod_php.cgi")>-1||n.indexOf("virtualmin-support/send_ticket.cgi")>-1||n.indexOf("virtualmin-support/enable_login.cgi")>-1||n.indexOf("virtualmin-support/disable_login.cgi")>-1||n.indexOf(""+s+"/empty.cgi")>-1||n.indexOf(""+s+"/exec_vbackup.cgi")>-1||n.indexOf(""+s+"/exec_vsync.cgi")>-1||n.indexOf(""+s+"/failover.cgi")>-1||n.indexOf(""+s+"/find.cgi")>-1||n.indexOf(""+s+"/gcescan.cgi")>-1||n.indexOf(""+s+"/install_kvm.cgi")>-1||n.indexOf(""+s+"/install_xen.cgi")>-1||n.indexOf(""+s+"/manual_image.cgi")>-1||n.indexOf(""+s+"/mass.cgi")>-1&&(r.includes("delete")||r.includes("dereg")||r.includes("script")||r.includes("shutdown")||r.includes("startup")||r.includes("reboot"))||n.indexOf(""+s+"/mass_move.cgi")>-1||n.indexOf(""+s+"/mass_script.cgi")>-1||n.indexOf(""+s+"/massupload.cgi")>-1||n.indexOf(""+s+"/move.cgi")>-1||n.indexOf(""+s+"/move_disk.cgi")>-1||n.indexOf(""+s+"/newami.cgi")>-1||n.indexOf(""+s+"/pause.cgi")>-1||n.indexOf(""+s+"/reset.cgi")>-1||n.indexOf(""+s+"/restore.cgi")>-1||n.indexOf(""+s+"/restore_domain.cgi")>-1||n.indexOf(""+s+"/save_ec2address.cgi")>-1||n.indexOf(""+s+"/save_limits.cgi")>-1||n.indexOf(""+s+"/save_pass.cgi")>-1||n.indexOf(""+s+"/save_vcpus.cgi")>-1||n.indexOf(""+s+"/scan.cgi")>-1||n.indexOf(""+s+"/transfer.cgi")>-1||n.indexOf(""+s+"/unpause.cgi")>-1||n.indexOf(""+s+"/upgrade.cgi")>-1||n.indexOf(""+s+"/upload.cgi")>-1||n.indexOf(""+s+"/add.cgi")>-1||n.indexOf(""+s+"/backup.cgi")>-1||n.indexOf(""+s+"/boot.cgi")>-1||n.indexOf(""+s+"/clone.cgi")>-1||n.indexOf(""+s+"/convert_image.cgi")>-1||n.indexOf(""+s+"/create_address.cgi")>-1||n.indexOf(""+s+"/create.cgi")>-1||n.indexOf(""+s+"/create_dimage.cgi")>-1||n.indexOf(""+s+"/create_dkvolume.cgi")>-1||n.indexOf(""+s+"/create_domain.cgi")>-1||n.indexOf(""+s+"/create_ec2attach.cgi")>-1||n.indexOf(""+s+"/create_ec2_snapshot.cgi")>-1||n.indexOf(""+s+"/create_gceattach.cgi")>-1||n.indexOf(""+s+"/create_gdisk.cgi")>-1||n.indexOf(""+s+"/create_gimage.cgi")>-1||n.indexOf(""+s+"/create_gsnapshot.cgi")>-1||n.indexOf(""+s+"/create_image.cgi")>-1||n.indexOf(""+s+"/create_volume.cgi")>-1||n.indexOf(""+s+"/delete_addresses.cgi")>-1||n.indexOf(""+s+"/delete_backuplogs.cgi")>-1||n.indexOf(""+s+"/delete_ec2attach.cgi")>-1||n.indexOf(""+s+"/delete_ec2_snapshots.cgi")>-1&&r.includes("confirm")||n.indexOf(""+s+"/delete_gceattach.cgi")>-1||n.indexOf(""+s+"/delete_volumes.cgi")>-1&&r.includes("confirm")||n.indexOf(""+s+"/download.cgi")>-1&&r.includes("dest=1")||n.indexOf(""+s+"/ec2scan.cgi")>-1||n.indexOf("cluster-usermin/upgrade.cgi")>-1||n.indexOf("cluster-usermin/install.cgi")>-1||n.indexOf("cluster-usermin/update.cgi")>-1||n.indexOf("cluster-webmin/install.cgi")>-1&&r.includes("source=2")||n.indexOf("cluster-webmin/update.cgi")>-1||n.indexOf("cluster-useradmin/save_user.cgi")>-1||n.indexOf("cluster-useradmin/save_group.cgi")>-1||n.indexOf("cluster-useradmin/delete_user.cgi")>-1||n.indexOf("cluster-useradmin/create_group.cgi")>-1||n.indexOf("cluster-useradmin/create_user.cgi")>-1||n.indexOf("ldap-useradmin/batch_exec.cgi")>-1||n.indexOf("ldap-useradmin/mass_delete_user.cgi")>-1||n.indexOf("usermin/upgrade.cgi")>-1||n.indexOf("usermin/update.cgi")>-1||n.indexOf("cpan/download.cgi")>-1&&(r.includes("source=2")||r.includes("source=3"))||n.indexOf("cpan/install.cgi")>-1&&!r.includes("need=")||n.indexOf("burner/save_profile.cgi")>-1||n.indexOf("burner/burn.cgi")>-1||n.indexOf("bind8/mass_create.cgi")>-1||n.indexOf("bind8/mass_rcreate.cgi")>-1||n.indexOf("bind8/mass_delete.cgi")>-1&&r.includes("confirm")||n.indexOf("bind8/mass_update.cgi")>-1||n.indexOf("bind8/zone_dnssecmigrate_dt.cgi")>-1||n.indexOf("bind8/mass_rdelete.cgi")>-1||n.indexOf("bind8/enable_zonekey.cgi")>-1||n.indexOf("bind8/enable_zonedt.cgi")>-1||n.indexOf("bind8/disable_zonedt.cgi")>-1||n.indexOf("webalizer/save_log.cgi")>-1&&!r.includes("view=")&&!r.includes("global=")||n.indexOf("bacula-backup/restore.cgi")>-1||n.indexOf("bacula-backup/backup.cgi")>-1||n.indexOf("bacula-backup/gbackup.cgi")>-1||n.indexOf("bacula-backup/label.cgi")>-1||n.indexOf("bacula-backup/mount.cgi")>-1||n.indexOf("cluster-software/install_pack.cgi")>-1||n.indexOf("updown/download.cgi")>-1||n.indexOf("software/install_pack.cgi")>-1||n.indexOf("software/do_install.cgi")>-1||n.indexOf("software/apt_upgrade.cgi")>-1||n.indexOf("software/rhn_check.cgi")>-1||n.indexOf("software/yum_upgrade.cgi")>-1||n.indexOf("software/urpmi_upgrade.cgi")>-1||n.indexOf("software/csw_upgrade.cgi")>-1||n.indexOf("software/ports_upgrade.cgi")>-1||n.indexOf("webmin/letsencrypt.cgi")>-1&&!r.includes("save=")||n.indexOf("webmin/delete_webmincron.cgi")>-1&&!r.includes("delete=")||n.indexOf("webmin/test_sendmail.cgi")>-1||n.indexOf("package-updates/update.cgi")>-1||core.moduleFile(n,"custom","run.cgi")||core.moduleFile(n,"custom","sql.cgi")&&!core.moduleFile(n,"custom","edit_sql.cgi")||n.indexOf("virtualmin-init/save.cgi")>-1||n.indexOf("virtualmin-init/mass.cgi")>-1||n.indexOf("backup-config/save.cgi")>-1||n.indexOf("squid/init_cache.cgi")>-1||n.indexOf("squid/clear.cgi")>-1&&r.includes("confirm")||n.indexOf("squid/chown.cgi")>-1||n.indexOf("ldap-client/check.cgi")>-1||n.indexOf("sendmail/del_mailqs.cgi")>-1||n.indexOf("sendmail/flushq.cgi")>-1||n.indexOf("init/mass_start_stop.cgi")>-1||n.indexOf("init/mass_launchd.cgi")>-1||n.indexOf("init/mass_systemd.cgi")>-1||n.indexOf("init/mass_upstarts.cgi")>-1||n.indexOf("init/mass_rcs.cgi")>-1||n.indexOf("init/save_services.cgi")>-1||n.indexOf("ldap-server/create.cgi")>-1||n.indexOf("change-user/change.cgi")>-1||n.indexOf("virtualmin-slavedns/save.cgi")>-1||n.indexOf("proc/trace.cgi")>-1||n.indexOf("proc/run.cgi")>-1&&!r.includes("mode=1")||n.indexOf("proc/kill_proc_list.cgi")>-1||n.indexOf("fsdump/backup.cgi")>-1||n.indexOf("fsdump/restore.cgi")>-1||n.indexOf("webmin_search.cgi")>-1||n.indexOf("security-updates/update.cgi")>-1||n.indexOf("virtualmin-mailrelay/save.cgi")>-1||n.indexOf("cluster-copy/exec.cgi")>-1||n.indexOf("cron/save_cron.cgi")>-1||n.indexOf("cron/exec_cron.cgi")>-1||n.indexOf("virtualmin-registrar/import.cgi")>-1||n.indexOf("virtualmin-registrar/save_ns.cgi")>-1||n.indexOf("virtualmin-registrar/transfer.cgi")>-1||n.indexOf("virtualmin-registrar/renew.cgi")>-1||n.indexOf("virtualmin-registrar/create.cgi")>-1||n.indexOf("htaccess-htpasswd/search.cgi")>-1||n.indexOf("acl/makedn.cgi")>-1||n.indexOf("acl/cert_issue.cgi")>-1||n.indexOf("acl/maketables.cgi")>-1||n.indexOf("acl/schema.cgi")>-1||n.indexOf("filter/move.cgi")>-1||n.indexOf("fetchmail/check.cgi")>-1||n.indexOf("servers/find.cgi")>-1||n.indexOf("cluster-cron/exec.cgi")>-1||n.indexOf("raid/mkfs.cgi")>-1||n.indexOf("lvm/pvmove.cgi")>-1||n.indexOf("lvm/mkfs.cgi")>-1||n.indexOf("ppp-client/init.cgi")>-1||n.indexOf("fdisk/mkfs.cgi")>-1||n.indexOf("fdisk/tunefs.cgi")>-1||n.indexOf("fdisk/fsck.cgi")>-1||n.indexOf("spam/deleteall_awl.cgi")>-1||n.indexOf("quota/check_quotas.cgi")>-1||n.indexOf("virtualmin-awstats/save.cgi")>-1&&r.includes("gen=")||n.indexOf("virtualmin-awstats/config_save.cgi")>-1&&r.includes("gen=")||n.indexOf("postfix/flushq.cgi")>-1||n.indexOf("status/delete_mons.cgi")>-1&&!r.includes("delete=")||n.indexOf(""+a+"/licence.cgi")>-1||n.indexOf("/webmin/upgrade.cgi")>-1||n.indexOf("_progressive.cgi")>-1)){return 1}else{return 0}}function unbuffered_header_processor_allow_scroll(){var e=["webmin_search.cgi"],t=core.curModule("package-updates")&&$('form[action*="update.cgi"]').length?1:0;if(e.filter(function(e){return vars.requested_page&&vars.requested_page.includes(e)}).length||Test.arrContains(e,v___location_file)||t||!settings_perform_content_scrolling){return 0}else{return 1}}function unbuffered_header_processor(e,t){var i=String(),n=String(),a=String(),s=String();if(t){var r=e;a=$(r.target);s=r.target.action;i=Test.strContains(a.attr("enctype"),"multipart/form-data");vars.source_request=v___location_resource;var o=String(),l=String(),_=!i?a.serialize():String(),d=a.find('[type="submit"]'),c=$(quirks.active_element()),f=c.is('[type="submit"]')?c:d.length===1?d:false;if(f&&!i){o=f.attr("name");l=f.val()||$.trim(f.text());_=o&&_&&_.includes(o+"=")?true:false;if(o&&l&&!_){$('<input data-trigger-injected="1">').attr({type:"hidden",class:"hidden-force",name:o,value:l}).appendTo(a)}}n=i?new FormData(a[0]):a.serialize()}var u=0,g=0,p=0,m=t?s:e;progress.start();set_onbeforeunload_status(1,1);vars.ajax.progressing=1;vars.pjax.progressing=0;$("body").addClass("loading-bg");vars.requested_page=m;vars.page.locked=1;var h=0,v=0,b='div[data-dcontainer="1"]',x=$(b).clone(),w=get_page_title_subtitle(1),y=String();progressive_request=$.ajax({xhr:function(){var e=new window.XMLHttpRequest;e.responseType="text";e.addEventListener("progress",function(t){var i=XHR.headers(e)[1];if(i&&(i.includes("application/")||i.includes("audio/")||i.includes("video/"))){progressive_request.abort();if(i.includes("application/")){window.location.href=y}else{theme_open_new_tab(y)}setTimeout(function(){progress.end()},500)}var n=t.target.responseText,a='<div class="panel-body">',s=extract_content(n,a),r=$(n),o=r.filter(b).html(),l=r.filter(b).find("pre").length;if(!session.status(n)){progressive_request.abort();return}if(s){g++}if((l||g>p)&&!u){if(o){var _=vars.h.selector.content.get();$(b).html(o);u++;if(unbuffered_header_processor_allow_scroll()){var d=_.hasScrollBar();if(d){if(!h){_.scrollTop(_[0].scrollHeight)}else{}}else{_.scrollTop(0)}}_.on("wheel.buffered",function(e){var t=parseInt(this.scrollTop)===parseInt(this.scrollHeight-this.offsetHeight);if(!t){h=1}if(t&&h){h=0}});_.addClass("progressing");$(b).children(".panel").first().addClass("progressive-content");if(!unbuffered_header_processor_allow_scroll()){_.addClass("static")}get_pjax_event_end(false,t.target,1);var c=session.server.data("redirect"),f=c?c:y;$.pjax.cache(false,false,[x,link_type_convert(f,2),w])}$("body").addClass("loading-bg")}else if(u){if(s){var m=$(b).find(".panel-body").html(s);m.find(".btn").addClass("disabled");m.find(".ui_link.ui_link_empty").remove()}if(!h&&unbuffered_header_processor_allow_scroll()){vars.h.selector.content.get().scrollTop(vars.h.selector.content.get()[0].scrollHeight)}else{}v=vars.h.selector.content.get().scrollTop()}},false);return e},type:get_pjax_type(a?a:m),url:m,processData:t&&i?false:true,contentType:t&&i?false:"application/x-www-form-urlencoded; charset=UTF-8",data:t?n:false,beforeSend:function(e){e.setRequestHeader("X-no-links","1");e.setRequestHeader("X-Progressive-URL",m);y=this.url;session.server.data("loading",1)},complete:function(e){vars.ajax.progressing=0;vars.page.locked=0;var t=vars.h.selector.content.get();session.server.data("loading",0,1);var i=e.responseText,n=$(i).filter(b);$(b).html(n.html());t.children(".container-fluid").children(".panel").first().addClass("progressive-content");get_pjax_event_end(false,e,1);if(!h&&unbuffered_header_processor_allow_scroll()){t.scrollTop(t[0].scrollHeight)}else{t.scrollTop(v)}var a=".progressing pre",s=$(""+a+" > i");if(s.is(":first-child")&&s.is(":last-child")){$(a).addClass("no_data").find("i:first-child").addClass("label text-center label-transparent-15 text-uppercase")}t.removeClass("progressing static");$("#headln2c .favorites").remove();progress.end();set_onbeforeunload_status(0,1);$("body").removeClass("loading-bg");unbuffered_header_post(e);t.off("wheel.buffered");if(core.curModuleFile("package-updates","update.cgi")){plugins.slider.data.fetch()}if(!theme.visibility.get()){notifications(theme_language("global_command_completed"),get_page_title_subtitle(),session.server.data("product"))}if(v___location_file==="webmin_search.cgi"){t.find(".ui_link.ui_link_empty").remove()}vars.previous_request_progressive=String()}})}function isElemInView(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function check_selected_text(){return window.getSelection().toString()}function clear_selected_text(){if(window.getSelection){window.getSelection().removeAllRanges()}}function check_location_resource(e,t){if(t&&v___location_resource){return v___location_resource.includes(v___location_prefix+e)}else{return v___location_resource===v___location_prefix+e}}function check_current_file(e){return v___location_file==e}$.extend($.expr[":"],{containsi:function(e,t,i,n){return(e.textContent||e.innerText||"").toLowerCase().indexOf((i[3]||"").toLowerCase())>=0}});Object.defineProperty(Array.prototype,"reOrder",{enumerable:false,value:function(e,t){if(t>=this.length){var i=t-this.length;while(i--+1){this.push(undefined)}}this.splice(t,0,this.splice(e,1)[0]);return this}});(function(e){e.fn.simulateUserClick=function(){return this.each(function(){if("createEvent"in document){var e=this.ownerDocument,t=e.createEvent("MouseEvents");t.initMouseEvent("click",true,true,e.defaultView,1,0,0,0,0,false,false,false,false,0,null);this.dispatchEvent(t)}else{this.click()}})}})(jQuery);(function(e){e.fn.replaceTagName=function(t){var i=[],n=this.length;while(n--){var a=document.createElement(t),s=this[n],r=s.attributes;for(var o=r.length-1;o>=0;o--){var l=r[o];a.setAttribute(l.name,l.value)}a.innerHTML=s.innerHTML;e(s).after(a).remove();i[n-1]=a}return e(i)}})(jQuery);jQuery.fn.selectText=function(){var e=document;var t=this[0];if(e.body.createTextRange){var i=document.body.createTextRange();i.moveToElementText(t);i.select()}else if(window.getSelection){var n=window.getSelection();var i=document.createRange();i.selectNodeContents(t);n.removeAllRanges();n.addRange(i)}};(function(e){e.fn.replaceText=function(t,i,n){return this.each(function(){var a=this.firstChild,s,r,o=[];if(a){do{if(a.nodeType===3){s=a.nodeValue;r=s.replace(t,i);if(r!==s){if(!n&&/</.test(r)){e(a).before(r);o.push(a)}else{a.nodeValue=r}}}}while(a=a.nextSibling)}o.length&&e(o).remove()})}})(jQuery);(function(e){e.fn.hasScrollBar=function(e){var t=this.get(0);if(t){return e?t.scrollWidth>t.clientWidth:t.scrollHeight>t.clientHeight}}})(jQuery);$.fn.toggleCheckbox=function(){if($(this).attr("type")=="checkbox"){$(this).prop("checked",!$(this).is(":checked"))}};jQuery.fn.confirmation=function(e,t){e=$.extend({className:"btn-danger",classNameRemove:"",timeout:2500},e);$(this).each(function(i,n){var a,s=$(n),r=s.html();function o(){s.removeClass(e.className).data("confirmed",false).find(".tmp_question").remove();if(e.classNameRemove){s.addClass(e.classNameRemove)}}s.data("confirmed",false);s.on("click.confirm",function(i){i.preventDefault();if(s.data("confirmed")){t.call(s,i);o()}else{s.data("confirmed",true);if(e.classNameRemove){s.removeClass(e.classNameRemove)}s.append('<em class="tmp_question">?</em>').addClass(e.className).bind("mouseout.confirm",function(){a=setTimeout(o,e.timeout)}).bind("mouseover.confirm",function(){clearTimeout(a)})}}).removeClass(e.className);if(e.classNameRemove){s.addClass(e.classNameRemove)}});return $(this)};RegExp.quote=function(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")};$.fn.contentText=function(e){return $(this).contents().filter(function(){return $(this).text().trim()==e.trim()})};$.fn.hasAnyClass=function(){for(var e=0;e<arguments.length;e++){if(this.hasClass(arguments[e])){return true}}return false};$(function(){var e,t=".blinking-default:not(.hidden)",i="opacity";setInterval(function(){if(e==0){$(t).css(i,"1");e=1}else{if(e=1){$(t).css(i,"0");e=0}}},900)});(function(e){var t={},i="table-resizable",n=""+i+" thead th",a="resizing",s=["dblclick.tmp","mousemove.tmp","mousedown.tmp","mouseup.tmp"];e.fn.resizeableTableColumns=function(r){var o,l,_,d,c=false,f=v___location_file;if(r&&typeof r==="string"){f+=r}if(!jQuery.isEmptyObject(t)){for(var u in t){var g=parseInt(u.replace(f,""))+1,p=t[u];if(!isNaN(g)){e("."+n+":nth-child("+g+")").width(p).css("min-width",p)}}}e(document).on(s[1],function(e){if(c){var i=l+(e.pageX-o);_.css("min-width",i).width(i);t[f+_.index()]=i}}).on(s[3],function(){if(c){d.removeClass(a);c=false}}).on(s[2],"."+n+":not(.nonresizable):not(:last-child)",function(t){_=e(this);c=true;o=t.pageX;l=_.width();d=_.closest("."+i+"").addClass(a)}).on(s[0],"."+n+"",function(){e(this).css("min-width","").css("width","");delete t[f+e(this).index()]});e(document).one("pjax:complete",function(){theme_unbind(document,s.join(" "))})}})(jQuery);(function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera);(function(e){const t=function(t){const i=function(){if(t.attr("name")==="wpass"?1:0){return}const i="div",n="<"+i+">",a="t-password-complexity-meter-",s="gb",r="cb",o=e(n).addClass(a+s),l=e(n).addClass(a+r),_="keyup",d=t.outerWidth(),c=""+a+"wrapper-cont",f=t.parent("."+c+""),u="password-plain",g="btn-group",p=""+a+"inputter-obj";f.find("."+a+"wrapper").remove();f.find("."+u+"").parent("."+g).remove();f.contents().unwrap();t.attr("type","password");t.attr("spellcheck","false");t.addClass(p);t.wrap("<"+i+' class="'+c+'"></'+i+">");t.parent().addClass(""+a+"strength-visible");t.after(e(n).addClass(""+a+"wrapper").css("width",d).append(o.append(l)));t.on(_,function(){const e=function(e){var t=function(e,t,i){return i.indexOf(e)===t},i=0,n=3;const a=e.match(/([\d])/g),s=e.match(/([\_\-\.,~!?@#$%^&*/\\])/g),r=e.match(/([a-z])/g),o=e.match(/([A-Z])/g);if(a){i+=parseInt(a.length/2)}if(s){i+=s.length*4}if(r){i+=r.length}if(o){i+=o.length}var l=e.split("").length,_=e.split("").filter(t).length;i+=_;if(e.match(/^[a-zA-Z]+$/)||e.match(/^[\d]+$/)||e.match(/^[a-z0-9]+$/)||e.match(/^[A-Z0-9]+$/)){n=1}else if(e.match(/^[a-zA-Z0-9]+$/)){n=2}i+=parseInt(e.length*n);if(i>100){i=100}if(i<0){i=0}return i},i=t.val(),n=e(i);const s=n<0?0:n;l.removeClass(""+a+""+r+"-0 "+a+""+r+"-30 "+a+""+r+"-70 "+a+""+r+"-100");if(s<=20){l.addClass(""+a+""+r+"-0")}else if(s>20&&s<=30){l.addClass(""+a+""+r+"-30")}else if(s>30&&s<=70){l.addClass(""+a+""+r+"-70")}else if(s>70){l.addClass(""+a+""+r+"-100")}l.css({width:(i&&s===0?2:s)+"%"})}).trigger(_);const m=t.outerHeight(),h=m<=28?"heighter-28":String(),v="generate-password-key",b="fa2",x="fa2-eye",w=t.attr("name")==="not_yet_def"?" hidden ":String(),y=t.attr("name")==="old"||t.attr("name")==="new2"||t.attr("name")==="repeat"?" hidden ":String(),$="fa2-eye-off",C="<"+i+' class="'+g+'"><button data-nref data-toggle="tooltip" data-container=".container-fluid" data-title="'+theme_language("global_toggle_password_visibility")+'" class="btn btn-default '+h+" margined-left--1 "+u+w+'"><i class="'+b+" "+x+'"></i></button>',k='<button class="btn btn-default '+h+" margined-left--1 "+v+y+'" data-nref data-toggle="tooltip" data-container=".container-fluid" data-title="'+Convert.strUpInitial(theme_language("password_generator_new"))+'"><i class="fa fa-1_15x fa-key-plus"></i></button></'+i+">";t.css("width",d).css("max-width",d);t.after(C+k);var j=t.next("."+g).find("."+u),O=t.next("."+g).find("."+v);j.on("click",function(t){t.preventDefault();var i=t.originalEvent!==undefined,n=e(this).parents("."+c).find("input"),a=e(this).find("."+b),s=a.hasClass($)?1:0;if((e(this).hasClass("disabled")||n[0].disabled)&&i){return}if(s){n.attr("type","password");a.addClass(x).removeClass($)}else{n.attr("type","text");a.removeClass(x).addClass($)}});O.on("click",function(i){i.preventDefault();var n=e(this);if(n.hasClass("disabled")){return}(async function(){var e=await theme_password_generator(n);var i=n.parents("."+c).find("input"),a=e;if(i[0].disabled){return}i.val(a);theme_copy_to_clipboard(a);t.trigger(_).trigger("focus").trigger("input")})()});try{const e=new MutationObserver(function(e,t){const i=e[0].target.disabled;O.add(j).add(j.parent().parent("."+c)).toggleClass("disabled",i);O[0].toggleAttribute("disabled",i);j[0].toggleAttribute("disabled",i)});e.observe(t[0],{attributes:true,childList:false,subtree:false})}catch(e){}if(!t.val()){j.trigger("click")}return this};return i.call(this)};e.fn.passwordComplexityMeter=function(){return this.each(function(){new t(e(this))})}})(jQuery);function vwTOpx(e){var t=window,i=document,n=i.documentElement,a=i.getElementsByTagName("body")[0],s=t.innerWidth||n.clientWidth||a.clientWidth;var r=s*e/100;return r}function vhTOpx(e){var t=window,i=document,n=i.documentElement,a=i.getElementsByTagName("body")[0],s=t.innerHeight||n.clientHeight||a.clientHeight;var r=s*e/100;return r}function pxTOvw(e){var t=window,i=document,n=i.documentElement,a=i.getElementsByTagName("body")[0],s=t.innerWidth||n.clientWidth||a.clientWidth;var r=100*e/s;return r}function pxTOvh(e){var t=window,i=document,n=i.documentElement,a=i.getElementsByTagName("body")[0],s=t.innerHeight||n.clientHeight||a.clientHeight;var r=100*e/s;return r}function load_init(){quirks.local_storage.safari();$.ajax({type:"GET",url:v___location_prefix+"/index.cgi/?xhr-get_available_modules=1",data:false,dataType:"text",async:$.support.spa,success:function(e){if(!session.status(e)){return}session.server.data("available-modules",JSON.parse(e))}});$.ajax({type:"GET",url:v___location_prefix+"/index.cgi/?xhr-get_user_level=1",data:false,dataType:"text",async:$.support.spa,success:function(e){if(!session.status(e)){return}vars.level=e}});dayjs.locale(session.server.data("locale"));page_adjust(settings_leftmenu_width,0);plugins.navigation.lock();if(typeof theme.api.event.one.document.init==="function"){theme.api.event.one.document.init.call()}}function embed_table_header_icon(e){var t=$("thead tr th.table-title"),i=e||"fa-settings";if(!t.find("."+i+"").length){t.prepend('<i class="fa fa-fw '+i+'"></i>&nbsp;&nbsp;')}}function ui_inject_alt_key_label(){return'<i class="text-muted extra-key-label label label-default pointer-events-none">'+event_hold_modifer_icon()+"</i>"}function compareVersionNumbers(e,t){if(!e||!t){return NaN}var i=e.toString().split("."),n=t.toString().split("."),a=function(e){return/^\d+$/.test(e)},s=function(e){for(var t=0;t<e.length;++t){if(!a(e[t])){return false}}return true};if(!s(i)||!s(n)){return NaN}for(var r=0;r<i.length;++r){if(n.length===r){return 1}if(i[r]===n[r]){continue}if(i[r]>n[r]){return 1}return-1}if(i.length!=n.length){return-1}return 0}function print_errors_post(e){if(e==="filemin"){localStorage.removeItem(v___server_hostname+"-"+v___server_username+"-"+"fm-last-visited-dir");$(".container-fluid > .panel > .panel-heading").addClass("file-manager-error")}}const var_dump=console.log;page_init();load_init();$(function(){console.log("Welcome to Authentic Theme "+theme.version(false,true)+(v___debug?" (debug)":String())+"\nhttps://github.com/authentic-theme/authentic-theme");if($.support.pjax&&$.support.spa){snippets.form_input_tester();snippets.ajax();snippets.pjax()}else if(!$.support.spa){$("head").append('<style id="__tmp_no_overflow">body {overflow: hidden}</style>');var e=".container-fluid";$(e).removeClass("col-lg-10 col-lg-offset-1").addClass("margined-top-15").parents("html").addClass("single_tab");$(e).wrap('<div id="content" class="__page single-page"></div>');if(v___module===v___module_file_manager&&v___location_file!=="config.cgi"&&v___location_file!=="mconfig.cgi"){page.handle.content.preloader.show()}if(settings_embed_product_branding_privileged){!vars.page.shown&&page.branding.process(true)}}snippets.datetime.tictac(0);quirks.render.apple();quirks.clean();quirks.temporary();platform.set();browser.set();if($.support.spa){page_display();get_access_level()===0&&settings_sysinfo_real_time_status&&load.bundle(v___server_extensions_path+"/stats/stats",0,["stats.general.query()"]);if(v___user_level==0){if(settings_side_slider_enabled&&settings_side_slider_fixed){session.server.data("data-slider-fixed","1")}}snippets.initial();setTimeout(function(){plugins.slider.data.fetch()},5e3);setTimeout(function(){if(get_access_level()!="0"){plugins.notifications.user()}},2500)}events.window();events.body();snippets.tooltips();plugins.update_notice();plugins.icons_row();snippets.form_pre_submitter();snippets.help_popup();setTimeout(function(){window.onbeforeunload=function(){if(get_onbeforeunload_status()||get_onbeforeunload_status_native()){progress.end();return true}};$(function(){if(!$.support.spa){progress.end()}})},100);snippets.page.render(0);setTimeout(function(){v___initial_load=0},1e3);setTimeout(function(){vars.available_modules=session.server.data("available-modules")},1e4);if(typeof theme.api.event.one.document.ready==="function"){theme.api.event.one.document.ready.call()}});

Filemanager

Name Type Size Permission Actions
ckeditor Folder 0755
codemirror Folder 0755
bundle.min.js File 1.55 MB 0644
bundle.min.js.gz File 448.07 KB 0644
defaults.js File 10.83 KB 0644
jquery.fancytree.min.js File 83.5 KB 0644
jquery.fancytree.min.js.gz File 26.69 KB 0644
jquery.jspanel.min.js File 76.08 KB 0644
jquery.jspanel.min.js.gz File 18.2 KB 0644
photoswipe.min.js File 42.95 KB 0644
photoswipe.min.js.gz File 15.1 KB 0644
quill.min.js File 226.98 KB 0644
quill.min.js.gz File 48.05 KB 0644
service-worker.js File 141 B 0644