!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=[],i=Object.getPrototypeOf,o=n.slice,s=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},r=n.push,a=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,d=u.toString,h=d.call(Object),f={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g=function(e){return null!=e&&e===e.window},m=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var i,o,s=(n=n||m).createElement("script");if(s.text=e,t)for(i in v)(o=t[i]||t.getAttribute&&t.getAttribute(i))&&s.setAttribute(i,o);n.head.appendChild(s).parentNode.removeChild(s)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.5.1",w=function(e,t){return new w.fn.init(e,t)};function C(e){var t=!!e&&"length"in e&&e.length,n=_(e);return!p(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 o.call(this)},get:function(e){return null==e?o.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(o.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:r,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,i,o,s,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==typeof r||p(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&r!==i&&(c&&i&&(w.isPlainObject(i)||(o=Array.isArray(i)))?(n=r[t],s=o&&!Array.isArray(n)?[]:o||w.isPlainObject(n)?n:{},o=!1,r[t]=w.extend(c,s,i)):void 0!==i&&(r[t]=i));return r},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]"!==c.call(e)||(t=i(e))&&("function"!=typeof(n=u.call(t,"constructor")&&t.constructor)||d.call(n)!==h))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(C(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):r.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:a.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;i<n;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i=[],o=0,s=e.length,r=!n;o<s;o++)!t(e[o],o)!==r&&i.push(e[o]);return i},map:function(e,t,n){var i,o,r=0,a=[];if(C(e))for(i=e.length;r<i;r++)null!=(o=t(e[r],r,n))&&a.push(o);else for(r in e)null!=(o=t(e[r],r,n))&&a.push(o);return s(a)},guid:1,support:f}),"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){l["[object "+t+"]"]=t.toLowerCase()}));var T=function(e){var t,n,i,o,s,r,a,l,c,u,d,h,f,p,g,m,v,y,_,b="sizzle"+1*new Date,w=e.document,C=0,T=0,x=le(),S=le(),E=le(),k=le(),D=function(e,t){return e===t&&(d=!0),0},$={}.hasOwnProperty,A=[],N=A.pop,L=A.push,I=A.push,M=A.slice,O=function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},j="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",P="(?:\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+H+"*("+P+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+H+"*\\]",F=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",q=new RegExp(H+"+","g"),W=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),B=new RegExp("^"+H+"*,"+H+"*"),U=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),Q=new RegExp(H+"|>"),z=new RegExp(F),J=new RegExp("^"+P+"$"),V={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+j+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+H+"?|\\\\([^\\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))},ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},se=function(){h()},re=be((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{I.apply(A=M.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(t){I={apply:A.length?function(e,t){L.apply(e,M.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function ae(e,t,i,o){var s,a,c,u,d,p,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return i;if(!o&&(h(t),t=t||f,g)){if(11!==w&&(d=Z.exec(e)))if(s=d[1]){if(9===w){if(!(c=t.getElementById(s)))return i;if(c.id===s)return i.push(c),i}else if(y&&(c=y.getElementById(s))&&_(t,c)&&c.id===s)return i.push(c),i}else{if(d[2])return I.apply(i,t.getElementsByTagName(e)),i;if((s=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return I.apply(i,t.getElementsByClassName(s)),i}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(Q.test(e)||U.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(ie,oe):t.setAttribute("id",u=b)),a=(p=r(e)).length;a--;)p[a]=(u?"#"+u:":scope")+" "+_e(p[a]);v=p.join(",")}try{return I.apply(i,y.querySelectorAll(v)),i}catch(t){k(e,!0)}finally{u===b&&t.removeAttribute("id")}}}return l(e.replace(W,"$1"),t,i,o)}function le(){var e=[];return function t(n,o){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function ce(e){return e[b]=!0,e}function ue(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=t}function he(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(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&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce((function(t){return t=+t,ce((function(n,i){for(var o,s=e([],n.length,t),r=s.length;r--;)n[o=s[r]]&&(n[o]=!(i[o]=n[o]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},s=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},h=ae.setDocument=function(e){var t,o,r=e?e.ownerDocument||e:w;return r!=f&&9===r.nodeType&&r.documentElement&&(p=(f=r).documentElement,g=!s(f),w!=f&&(o=f.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",se,!1):o.attachEvent&&o.attachEvent("onunload",se)),n.scope=ue((function(e){return p.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(f.getElementsByClassName),n.getById=ue((function(e){return p.appendChild(e).id=b,!f.getElementsByName||!f.getElementsByName(b).length})),n.getById?(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,i,o,s=t.getElementById(e);if(s){if((n=s.getAttributeNode("id"))&&n.value===e)return[s];for(o=t.getElementsByName(e),i=0;s=o[i++];)if((n=s.getAttributeNode("id"))&&n.value===e)return[s]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,s=t.getElementsByTagName(e);if("*"===e){for(;n=s[o++];)1===n.nodeType&&i.push(n);return i}return s},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=K.test(f.querySelectorAll))&&(ue((function(e){var t;p.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+H+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+H+"*(?:value|"+j+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+H+"*name"+H+"*="+H+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+H+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=K.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",F)})),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=K.test(p.compareDocumentPosition),_=t||K.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e==f||e.ownerDocument==w&&_(w,e)?-1:t==f||t.ownerDocument==w&&_(w,t)?1:u?O(u,e)-O(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,r=[e],a=[t];if(!o||!s)return e==f?-1:t==f?1:o?-1:s?1:u?O(u,e)-O(u,t):0;if(o===s)return he(e,t);for(n=e;n=n.parentNode;)r.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;r[i]===a[i];)i++;return i?he(r[i],a[i]):r[i]==w?-1:a[i]==w?1:0}),f},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&g&&!k[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){k(t,!0)}return 0<ae(t,f,null,[e]).length},ae.contains=function(e,t){return(e.ownerDocument||e)!=f&&h(e),_(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=f&&h(e);var o=i.attrHandle[t.toLowerCase()],s=o&&$.call(i.attrHandle,t.toLowerCase())?o(e,t,!g):void 0;return void 0!==s?s:n.attributes||!g?e.getAttribute(t):(s=e.getAttributeNode(t))&&s.specified?s.value:null},ae.escape=function(e){return(e+"").replace(ie,oe)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,i=[],o=0,s=0;if(d=!n.detectDuplicates,u=!n.sortStable&&e.slice(0),e.sort(D),d){for(;t=e[s++];)t===e[s]&&(o=i.push(s));for(;o--;)e.splice(i[o],1)}return u=null,e},o=ae.getText=function(e){var t,n="",i=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[i++];)n+=o(t);return n},(i=ae.selectors={cacheLength:50,createPseudo:ce,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(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]||ae.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]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&z.test(n)&&(t=r(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=x[e+" "];return t||(t=new RegExp("(^|"+H+")"+e+"("+H+"|$)"))&&x(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var o=ae.attr(i,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&-1<o.indexOf(n):"$="===t?n&&o.slice(-n.length)===n:"~="===t?-1<(" "+o.replace(q," ")+" ").indexOf(n):"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,o){var s="nth"!==e.slice(0,3),r="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,g=s!==r?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,_=!1;if(m){if(s){for(;g;){for(h=t;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[r?m.firstChild:m.lastChild],r&&y){for(_=(f=(c=(u=(d=(h=m)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1])&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(_=f=0)||p.pop();)if(1===h.nodeType&&++_&&h===t){u[e]=[C,f,_];break}}else if(y&&(_=f=(c=(u=(d=(h=t)[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&c[1]),!1===_)for(;(h=++f&&h&&h[g]||(_=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++_||(y&&((u=(d=h[b]||(h[b]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[C,_]),h!==t)););return(_-=o)===i||_%i==0&&0<=_/i}}},PSEUDO:function(e,t){var n,o=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return o[b]?o(t):1<o.length?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var i,s=o(e,t),r=s.length;r--;)e[i=O(e,s[r])]=!(n[i]=s[r])})):function(e){return o(e,0,n)}):o}},pseudos:{not:ce((function(e){var t=[],n=[],i=a(e.replace(W,"$1"));return i[b]?ce((function(e,t,n,o){for(var s,r=i(e,null,o,[]),a=e.length;a--;)(s=r[a])&&(e[a]=!(t[a]=s))})):function(e,o,s){return t[0]=e,i(t,null,s,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return 0<ae(e,t).length}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||o(t)).indexOf(e)}})),lang:ce((function(e){return J.test(e||"")||ae.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===p},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.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!i.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Y.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:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:me((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:me((function(e,t,n){for(var i=n<0?n+t:t<n?t:n;0<=--i;)e.push(i);return e})),gt:me((function(e,t,n){for(var i=n<0?n+t:n;++i<t;)e.push(i);return e}))}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})i.pseudos[t]=pe(t);function ye(){}function _e(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function be(e,t,n){var i=t.dir,o=t.next,s=o||i,r=n&&"parentNode"===s,a=T++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o);return!1}:function(t,n,l){var c,u,d,h=[C,a];if(l){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,l))return!0}else for(;t=t[i];)if(1===t.nodeType||r)if(u=(d=t[b]||(t[b]={}))[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[i]||t;else{if((c=u[s])&&c[0]===C&&c[1]===a)return h[2]=c[2];if((u[s]=h)[2]=e(t,n,l))return!0}return!1}}function we(e){return 1<e.length?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function Ce(e,t,n,i,o){for(var s,r=[],a=0,l=e.length,c=null!=t;a<l;a++)(s=e[a])&&(n&&!n(s,i,o)||(r.push(s),c&&t.push(a)));return r}function Te(e,t,n,i,o,s){return i&&!i[b]&&(i=Te(i)),o&&!o[b]&&(o=Te(o,s)),ce((function(s,r,a,l){var c,u,d,h=[],f=[],p=r.length,g=s||function(e,t,n){for(var i=0,o=t.length;i<o;i++)ae(e,t[i],n);return n}(t||"*",a.nodeType?[a]:a,[]),m=!e||!s&&t?g:Ce(g,h,e,a,l),v=n?o||(s?e:p||i)?[]:r:m;if(n&&n(m,v,a,l),i)for(c=Ce(v,f),i(c,[],a,l),u=c.length;u--;)(d=c[u])&&(v[f[u]]=!(m[f[u]]=d));if(s){if(o||e){if(o){for(c=[],u=v.length;u--;)(d=v[u])&&c.push(m[u]=d);o(null,v=[],c,l)}for(u=v.length;u--;)(d=v[u])&&-1<(c=o?O(s,d):h[u])&&(s[c]=!(r[c]=d))}}else v=Ce(v===r?v.splice(p,v.length):v),o?o(null,r,v,l):I.apply(r,v)}))}function xe(e){for(var t,n,o,s=e.length,r=i.relative[e[0].type],a=r||i.relative[" "],l=r?1:0,u=be((function(e){return e===t}),a,!0),d=be((function(e){return-1<O(t,e)}),a,!0),h=[function(e,n,i){var o=!r&&(i||n!==c)||((t=n).nodeType?u(e,n,i):d(e,n,i));return t=null,o}];l<s;l++)if(n=i.relative[e[l].type])h=[be(we(h),n)];else{if((n=i.filter[e[l].type].apply(null,e[l].matches))[b]){for(o=++l;o<s&&!i.relative[e[o].type];o++);return Te(1<l&&we(h),1<l&&_e(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(W,"$1"),n,l<o&&xe(e.slice(l,o)),o<s&&xe(e=e.slice(o)),o<s&&_e(e))}h.push(n)}return we(h)}return ye.prototype=i.filters=i.pseudos,i.setFilters=new ye,r=ae.tokenize=function(e,t){var n,o,s,r,a,l,c,u=S[e+" "];if(u)return t?0:u.slice(0);for(a=e,l=[],c=i.preFilter;a;){for(r in n&&!(o=B.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),n=!1,(o=U.exec(a))&&(n=o.shift(),s.push({value:n,type:o[0].replace(W," ")}),a=a.slice(n.length)),i.filter)!(o=V[r].exec(a))||c[r]&&!(o=c[r](o))||(n=o.shift(),s.push({value:n,type:r,matches:o}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):S(e,l).slice(0)},a=ae.compile=function(e,t){var n,o,s,a,l,u,d=[],p=[],m=E[e+" "];if(!m){for(t||(t=r(e)),n=t.length;n--;)(m=xe(t[n]))[b]?d.push(m):p.push(m);(m=E(e,(o=p,a=0<(s=d).length,l=0<o.length,u=function(e,t,n,r,u){var d,p,m,v=0,y="0",_=e&&[],b=[],w=c,T=e||l&&i.find.TAG("*",u),x=C+=null==w?1:Math.random()||.1,S=T.length;for(u&&(c=t==f||t||u);y!==S&&null!=(d=T[y]);y++){if(l&&d){for(p=0,t||d.ownerDocument==f||(h(d),n=!g);m=o[p++];)if(m(d,t||f,n)){r.push(d);break}u&&(C=x)}a&&((d=!m&&d)&&v--,e&&_.push(d))}if(v+=y,a&&y!==v){for(p=0;m=s[p++];)m(_,b,t,n);if(e){if(0<v)for(;y--;)_[y]||b[y]||(b[y]=N.call(r));b=Ce(b)}I.apply(r,b),u&&!e&&0<b.length&&1<v+s.length&&ae.uniqueSort(r)}return u&&(C=x,c=w),_},a?ce(u):u))).selector=e}return m},l=ae.select=function(e,t,n,o){var s,l,c,u,d,h="function"==typeof e&&e,f=!o&&r(e=h.selector||e);if(n=n||[],1===f.length){if(2<(l=f[0]=f[0].slice(0)).length&&"ID"===(c=l[0]).type&&9===t.nodeType&&g&&i.relative[l[1].type]){if(!(t=(i.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(s=V.needsContext.test(e)?0:l.length;s--&&(c=l[s],!i.relative[u=c.type]);)if((d=i.find[u])&&(o=d(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(s,1),!(e=o.length&&_e(l)))return I.apply(n,o),n;break}}return(h||a(e,f))(o,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!d,h(),n.sortDetached=ue((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),ue((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ue((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ue((function(e){return null==e.getAttribute("disabled")}))||de(j,(function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null})),ae}(e);w.find=T,w.expr=T.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=T.uniqueSort,w.text=T.getText,w.isXMLDoc=T.isXML,w.contains=T.contains,w.escapeSelector=T.escape;var x=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&w(e).is(n))break;i.push(e)}return i},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=w.expr.match.needsContext;function k(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function $(e,t,n){return p(t)?w.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?w.grep(e,(function(e){return-1<a.call(t,e)!==n})):w.filter(t,e,n)}w.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?w.find.matchesSelector(i,e)?[i]:[]:w.find.matches(e,w.grep(t,(function(e){return 1===e.nodeType})))},w.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(w(e).filter((function(){for(t=0;t<i;t++)if(w.contains(o[t],this))return!0})));for(n=this.pushStack([]),t=0;t<i;t++)w.find(e,o[t],n);return 1<i?w.uniqueSort(n):n},filter:function(e){return this.pushStack($(this,e||[],!1))},not:function(e){return this.pushStack($(this,e||[],!0))},is:function(e){return!!$(this,"string"==typeof e&&E.test(e)?w(e):e||[],!1).length}});var A,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||A,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:N.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),D.test(i[1])&&w.isPlainObject(t))for(i in t)p(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=m.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):p(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,A=w(m);var L=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function M(e,t){for(;(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,i=0,o=this.length,s=[],r="string"!=typeof e&&w(e);if(!E.test(e))for(;i<o;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(r?-1<r.index(n):1===n.nodeType&&w.find.matchesSelector(n,e))){s.push(n);break}return this.pushStack(1<s.length?w.uniqueSort(s):s)},index:function(e){return e?"string"==typeof e?a.call(w(e),this[0]):a.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 x(e,"parentNode")},parentsUntil:function(e,t,n){return x(e,"parentNode",n)},next:function(e){return M(e,"nextSibling")},prev:function(e){return M(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,n){return x(e,"nextSibling",n)},prevUntil:function(e,t,n){return x(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return null!=e.contentDocument&&i(e.contentDocument)?e.contentDocument:(k(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},(function(e,t){w.fn[e]=function(n,i){var o=w.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=w.filter(i,o)),1<this.length&&(I[e]||w.uniqueSort(o),L.test(e)&&o.reverse()),this.pushStack(o)}}));var O=/[^\x20\t\r\n\f]+/g;function j(e){return e}function H(e){throw e}function P(e,t,n,i){var o;try{e&&p(o=e.promise)?o.call(e).done(t).fail(n):e&&p(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(i))}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(O)||[],(function(e,t){n[t]=!0})),n):w.extend({},e);var i,o,s,r,a=[],l=[],c=-1,u=function(){for(r=r||e.once,s=i=!0;l.length;c=-1)for(o=l.shift();++c<a.length;)!1===a[c].apply(o[0],o[1])&&e.stopOnFalse&&(c=a.length,o=!1);e.memory||(o=!1),i=!1,r&&(a=o?[]:"")},d={add:function(){return a&&(o&&!i&&(c=a.length-1,l.push(o)),function t(n){w.each(n,(function(n,i){p(i)?e.unique&&d.has(i)||a.push(i):i&&i.length&&"string"!==_(i)&&t(i)}))}(arguments),o&&!i&&u()),this},remove:function(){return w.each(arguments,(function(e,t){for(var n;-1<(n=w.inArray(t,a,n));)a.splice(n,1),n<=c&&c--})),this},has:function(e){return e?-1<w.inArray(e,a):0<a.length},empty:function(){return a&&(a=[]),this},disable:function(){return r=l=[],a=o="",this},disabled:function(){return!a},lock:function(){return r=l=[],o||i||(a=o=""),this},locked:function(){return!!r},fireWith:function(e,t){return r||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),i||u()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!s}};return d},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"]],i="pending",o={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return w.Deferred((function(t){w.each(n,(function(n,i){var o=p(e[i[4]])&&e[i[4]];s[i[1]]((function(){var e=o&&o.apply(this,arguments);e&&p(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(t,i,o){var s=0;function r(t,n,i,o){return function(){var a=this,l=arguments,c=function(){var e,c;if(!(t<s)){if((e=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=e&&("object"==typeof e||"function"==typeof e)&&e.then,p(c)?o?c.call(e,r(s,n,j,o),r(s,n,H,o)):(s++,c.call(e,r(s,n,j,o),r(s,n,H,o),r(s,n,j,n.notifyWith))):(i!==j&&(a=void 0,l=[e]),(o||n.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,u.stackTrace),s<=t+1&&(i!==H&&(a=void 0,l=[e]),n.rejectWith(a,l))}};t?u():(w.Deferred.getStackHook&&(u.stackTrace=w.Deferred.getStackHook()),e.setTimeout(u))}}return w.Deferred((function(e){n[0][3].add(r(0,e,p(o)?o:j,e.notifyWith)),n[1][3].add(r(0,e,p(t)?t:j)),n[2][3].add(r(0,e,p(i)?i:H))})).promise()},promise:function(e){return null!=e?w.extend(e,o):o}},s={};return w.each(n,(function(e,t){var r=t[2],a=t[5];o[t[1]]=r.add,a&&r.add((function(){i=a}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),r.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=r.fireWith})),o.promise(s),t&&t.call(s,s),s},when:function(e){var t=arguments.length,n=t,i=Array(n),s=o.call(arguments),r=w.Deferred(),a=function(e){return function(n){i[e]=this,s[e]=1<arguments.length?o.call(arguments):n,--t||r.resolveWith(i,s)}};if(t<=1&&(P(e,r.done(a(n)).resolve,r.reject,!t),"pending"===r.state()||p(s[n]&&s[n].then)))return r.then();for(;n--;)P(s[n],a(n),r.reject);return r.promise()}});var R=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&R.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 q(){m.removeEventListener("DOMContentLoaded",q),e.removeEventListener("load",q),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(m,[w])}}),w.ready.then=F.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?e.setTimeout(w.ready):(m.addEventListener("DOMContentLoaded",q),e.addEventListener("load",q));var W=function(e,t,n,i,o,s,r){var a=0,l=e.length,c=null==n;if("object"===_(n))for(a in o=!0,n)W(e,t,a,n[a],!0,s,r);else if(void 0!==i&&(o=!0,p(i)||(r=!0),c&&(r?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(w(e),n)})),t))for(;a<l;a++)t(e[a],n,r?i:i.call(e[a],a,t(e[a],n)));return o?e:c?t.call(e):l?t(e[0],n):s},B=/^-ms-/,U=/-([a-z])/g;function Q(e,t){return t.toUpperCase()}function z(e){return e.replace(B,"ms-").replace(U,Q)}var J=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function V(){this.expando=w.expando+V.uid++}V.uid=1,V.prototype={cache:function(e){var t=e[this.expando];return t||(t={},J(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[z(t)]=n;else for(i in t)o[z(i)]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][z(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(z):(t=z(t))in i?[t]:t.match(O)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||w.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var X=new V,Y=new V,G=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var i,o;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n="true"===(o=n)||"false"!==o&&("null"===o?null:o===+o+""?+o:G.test(o)?JSON.parse(o):o)}catch(e){}Y.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return Y.hasData(e)||X.hasData(e)},data:function(e,t,n){return Y.access(e,t,n)},removeData:function(e,t){Y.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,i,o,s=this[0],r=s&&s.attributes;if(void 0===e){if(this.length&&(o=Y.get(s),1===s.nodeType&&!X.get(s,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&0===(i=r[n].name).indexOf("data-")&&(i=z(i.slice(5)),Z(s,i,o[i]));X.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each((function(){Y.set(this,e)})):W(this,(function(t){var n;if(s&&void 0===t)return void 0!==(n=Y.get(s,e))||void 0!==(n=Z(s,e))?n:void 0;this.each((function(){Y.set(this,e,t)}))}),null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each((function(){Y.remove(this,e)}))}}),w.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=X.get(e,t),n&&(!i||Array.isArray(n)?i=X.access(e,t,w.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),i=n.length,o=n.shift(),s=w._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete s.stop,o.call(e,(function(){w.dequeue(e,t)}),s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:w.Callbacks("once memory").add((function(){X.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,i=1,o=w.Deferred(),s=this,r=this.length,a=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";r--;)(n=X.get(s[r],e+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],ie=m.documentElement,oe=function(e){return w.contains(e.ownerDocument,e)},se={composed:!0};ie.getRootNode&&(oe=function(e){return w.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});var re=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===w.css(e,"display")};function ae(e,t,n,i){var o,s,r=20,a=i?function(){return i.cur()}:function(){return w.css(e,t,"")},l=a(),c=n&&n[3]||(w.cssNumber[t]?"":"px"),u=e.nodeType&&(w.cssNumber[t]||"px"!==c&&+l)&&te.exec(w.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;r--;)w.style(e,t,u+c),(1-s)*(1-(s=a()/l||.5))<=0&&(r=0),u/=s;u*=2,w.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}var le={};function ce(e,t){for(var n,i,o,s,r,a,l,c=[],u=0,d=e.length;u<d;u++)(i=e[u]).style&&(n=i.style.display,t?("none"===n&&(c[u]=X.get(i,"display")||null,c[u]||(i.style.display="")),""===i.style.display&&re(i)&&(c[u]=(l=r=s=void 0,r=(o=i).ownerDocument,a=o.nodeName,(l=le[a])||(s=r.body.appendChild(r.createElement(a)),l=w.css(s,"display"),s.parentNode.removeChild(s),"none"===l&&(l="block"),le[a]=l)))):"none"!==n&&(c[u]="none",X.set(i,"display",n)));for(u=0;u<d;u++)null!=c[u]&&(e[u].style.display=c[u]);return e}w.fn.extend({show:function(){return ce(this,!0)},hide:function(){return ce(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){re(this)?w(this).show():w(this).hide()}))}});var ue,de,he=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;ue=m.createDocumentFragment().appendChild(m.createElement("div")),(de=m.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ue.appendChild(de),f.checkClone=ue.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue,ue.innerHTML="<option></option>",f.option=!!ue.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 me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,i=e.length;n<i;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,f.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var ye=/<|&#?\w+;/;function _e(e,t,n,i,o){for(var s,r,a,l,c,u,d=t.createDocumentFragment(),h=[],f=0,p=e.length;f<p;f++)if((s=e[f])||0===s)if("object"===_(s))w.merge(h,s.nodeType?[s]:s);else if(ye.test(s)){for(r=r||d.appendChild(t.createElement("div")),a=(fe.exec(s)||["",""])[1].toLowerCase(),l=ge[a]||ge._default,r.innerHTML=l[1]+w.htmlPrefilter(s)+l[2],u=l[0];u--;)r=r.lastChild;w.merge(h,r.childNodes),(r=d.firstChild).textContent=""}else h.push(t.createTextNode(s));for(d.textContent="",f=0;s=h[f++];)if(i&&-1<w.inArray(s,i))o&&o.push(s);else if(c=oe(s),r=me(d.appendChild(s),"script"),c&&ve(r),n)for(u=0;s=r[u++];)pe.test(s.type||"")&&n.push(s);return d}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Te(){return!0}function xe(){return!1}function Se(e,t){return e===function(){try{return m.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,i,o,s){var r,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Ee(e,a,n,i,t[a],s);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=xe;else if(!o)return e;return 1===s&&(r=o,(o=function(e){return w().off(e),r.apply(this,arguments)}).guid=r.guid||(r.guid=w.guid++)),e.each((function(){w.event.add(this,t,o,i,n)}))}function ke(e,t,n){n?(X.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var i,s,r=X.get(this,t);if(1&e.isTrigger&&this[t]){if(r.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=o.call(arguments),X.set(this,t,r),i=n(this,t),this[t](),r!==(s=X.get(this,t))||i?X.set(this,t,!1):s={},r!==s)return e.stopImmediatePropagation(),e.preventDefault(),s.value}else r.length&&(X.set(this,t,{value:w.event.trigger(w.extend(r[0],w.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&w.event.add(e,t,Te)}w.event={global:{},add:function(e,t,n,i,o){var s,r,a,l,c,u,d,h,f,p,g,m=X.get(e);if(J(e))for(n.handler&&(n=(s=n).handler,o=s.selector),o&&w.find.matchesSelector(ie,o),n.guid||(n.guid=w.guid++),(l=m.events)||(l=m.events=Object.create(null)),(r=m.handle)||(r=m.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(O)||[""]).length;c--;)f=g=(a=Ce.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=w.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=w.event.special[f]||{},u=w.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&w.expr.match.needsContext.test(o),namespace:p.join(".")},s),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,p,r)||e.addEventListener&&e.addEventListener(f,r)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),w.event.global[f]=!0)},remove:function(e,t,n,i,o){var s,r,a,l,c,u,d,h,f,p,g,m=X.hasData(e)&&X.get(e);if(m&&(l=m.events)){for(c=(t=(t||"").match(O)||[""]).length;c--;)if(f=g=(a=Ce.exec(t[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=w.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=h.length;s--;)u=h[s],!o&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(s,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));r&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||w.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)w.event.remove(e,f+t[c],n,i,!0);w.isEmptyObject(l)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,s,r,a=new Array(arguments.length),l=w.event.fix(e),c=(X.get(this,"events")||Object.create(null))[l.type]||[],u=w.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(r=w.event.handlers.call(this,l,c),t=0;(o=r[t++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==s.namespace&&!l.rnamespace.test(s.namespace)||(l.handleObj=s,l.data=s.data,void 0!==(i=((w.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,i,o,s,r,a=[],l=t.delegateCount,c=e.target;if(l&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(s=[],r={},n=0;n<l;n++)void 0===r[o=(i=t[n]).selector+" "]&&(r[o]=i.needsContext?-1<w(o,this).index(c):w.find(o,this,null,[c]).length),r[o]&&s.push(i);s.length&&a.push({elem:c,handlers:s})}return c=this,l<t.length&&a.push({elem:c,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:p(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 he.test(t.type)&&t.click&&k(t,"input")&&ke(t,"click",Te),!1},trigger:function(e){var t=this||e;return he.test(t.type)&&t.click&&k(t,"input")&&ke(t,"click"),!0},_default:function(e){var t=e.target;return he.test(t.type)&&t.click&&k(t,"input")&&X.get(t,"click")||k(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?Te:xe,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:xe,isPropagationStopped:xe,isImmediatePropagationStopped:xe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Te,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Te,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Te,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:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(e,t){w.event.special[e]={setup:function(){return ke(this,e,Se),!1},trigger:function(){return ke(this,e),!0},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,i=e.relatedTarget,o=e.handleObj;return i&&(i===this||w.contains(this,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}})),w.fn.extend({on:function(e,t,n,i){return Ee(this,e,t,n,i)},one:function(e,t,n,i){return Ee(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,w(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=xe),this.each((function(){w.event.remove(this,e,n,t)}))}});var De=/<script|<style|<link/i,$e=/checked\s*(?:[^=]|=\s*.checked.)/i,Ae=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ne(e,t){return k(e,"table")&&k(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,i,o,s,r,a;if(1===t.nodeType){if(X.hasData(e)&&(a=X.get(e).events))for(o in X.remove(t,"handle events"),a)for(n=0,i=a[o].length;n<i;n++)w.event.add(t,o,a[o][n]);Y.hasData(e)&&(s=Y.access(e),r=w.extend({},s),Y.set(t,r))}}function Oe(e,t,n,i){t=s(t);var o,r,a,l,c,u,d=0,h=e.length,g=h-1,m=t[0],v=p(m);if(v||1<h&&"string"==typeof m&&!f.checkClone&&$e.test(m))return e.each((function(o){var s=e.eq(o);v&&(t[0]=m.call(this,o,s.html())),Oe(s,t,n,i)}));if(h&&(r=(o=_e(t,e[0].ownerDocument,!1,e,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(l=(a=w.map(me(o,"script"),Le)).length;d<h;d++)c=o,d!==g&&(c=w.clone(c,!0,!0),l&&w.merge(a,me(c,"script"))),n.call(e[d],c,d);if(l)for(u=a[a.length-1].ownerDocument,w.map(a,Ie),d=0;d<l;d++)c=a[d],pe.test(c.type||"")&&!X.access(c,"globalEval")&&w.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?w._evalUrl&&!c.noModule&&w._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):y(c.textContent.replace(Ae,""),c,u))}return e}function je(e,t,n){for(var i,o=t?w.filter(t,e):e,s=0;null!=(i=o[s]);s++)n||1!==i.nodeType||w.cleanData(me(i)),i.parentNode&&(n&&oe(i)&&ve(me(i,"script")),i.parentNode.removeChild(i));return e}w.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var i,o,s,r,a,l,c,u=e.cloneNode(!0),d=oe(e);if(!(f.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(r=me(u),i=0,o=(s=me(e)).length;i<o;i++)a=s[i],"input"===(c=(l=r[i]).nodeName.toLowerCase())&&he.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(t)if(n)for(s=s||me(e),r=r||me(u),i=0,o=s.length;i<o;i++)Me(s[i],r[i]);else Me(e,u);return 0<(r=me(u,"script")).length&&ve(r,!d&&me(e,"script")),u},cleanData:function(e){for(var t,n,i,o=w.event.special,s=0;void 0!==(n=e[s]);s++)if(J(n)){if(t=n[X.expando]){if(t.events)for(i in t.events)o[i]?w.event.remove(n,i):w.removeEvent(n,i,t.handle);n[X.expando]=void 0}n[Y.expando]&&(n[Y.expando]=void 0)}}}),w.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return W(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 Oe(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ne(this,e).appendChild(e)}))},prepend:function(){return Oe(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ne(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Oe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Oe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(me(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 W(this,(function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!De.test(e)&&!ge[(fe.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Oe(this,arguments,(function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(me(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,i=[],o=w(e),s=o.length-1,a=0;a<=s;a++)n=a===s?this:this.clone(!0),w(o[a])[t](n),r.apply(i,n.get());return this.pushStack(i)}}));var He=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Pe=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Re=function(e,t,n){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.call(e),t)e.style[o]=s[o];return i},Fe=new RegExp(ne.join("|"),"i");function qe(e,t,n){var i,o,s,r,a=e.style;return(n=n||Pe(e))&&(""!==(r=n.getPropertyValue(t)||n[t])||oe(e)||(r=w.style(e,t)),!f.pixelBoxStyles()&&He.test(r)&&Fe.test(t)&&(i=a.width,o=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=n.width,a.width=i,a.minWidth=o,a.maxWidth=s)),void 0!==r?r+"":r}function We(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(c).appendChild(u);var t=e.getComputedStyle(u);i="1%"!==t.top,l=12===n(t.marginLeft),u.style.right="60%",r=36===n(t.right),o=36===n(t.width),u.style.position="absolute",s=12===n(u.offsetWidth/3),ie.removeChild(c),u=null}}function n(e){return Math.round(parseFloat(e))}var i,o,s,r,a,l,c=m.createElement("div"),u=m.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,w.extend(f,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),r},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),s},reliableTrDimensions:function(){var t,n,i,o;return null==a&&(t=m.createElement("table"),n=m.createElement("tr"),i=m.createElement("div"),t.style.cssText="position:absolute;left:-11111px",n.style.height="1px",i.style.height="9px",ie.appendChild(t).appendChild(n).appendChild(i),o=e.getComputedStyle(n),a=3<parseInt(o.height),ie.removeChild(t)),a}}))}();var Be=["Webkit","Moz","ms"],Ue=m.createElement("div").style,Qe={};function ze(e){return w.cssProps[e]||Qe[e]||(e in Ue?e:Qe[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Be.length;n--;)if((e=Be[n]+t)in Ue)return e}(e)||e)}var Je=/^(none|table(?!-c[ea]).+)/,Ve=/^--/,Xe={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:"0",fontWeight:"400"};function Ge(e,t,n){var i=te.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function Ke(e,t,n,i,o,s){var r="width"===t?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;r<4;r+=2)"margin"===n&&(l+=w.css(e,n+ne[r],!0,o)),i?("content"===n&&(l-=w.css(e,"padding"+ne[r],!0,o)),"margin"!==n&&(l-=w.css(e,"border"+ne[r]+"Width",!0,o))):(l+=w.css(e,"padding"+ne[r],!0,o),"padding"!==n?l+=w.css(e,"border"+ne[r]+"Width",!0,o):a+=w.css(e,"border"+ne[r]+"Width",!0,o));return!i&&0<=s&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-s-l-a-.5))||0),l}function Ze(e,t,n){var i=Pe(e),o=(!f.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,i),s=o,r=qe(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(He.test(r)){if(!n)return r;r="auto"}return(!f.boxSizingReliable()&&o||!f.reliableTrDimensions()&&k(e,"tr")||"auto"===r||!parseFloat(r)&&"inline"===w.css(e,"display",!1,i))&&e.getClientRects().length&&(o="border-box"===w.css(e,"boxSizing",!1,i),(s=a in e)&&(r=e[a])),(r=parseFloat(r)||0)+Ke(e,t,n||(o?"border":"content"),s,i,r)+"px"}function et(e,t,n,i,o){return new et.prototype.init(e,t,n,i,o)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=qe(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,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,s,r,a=z(t),l=Ve.test(t),c=e.style;if(l||(t=ze(a)),r=w.cssHooks[t]||w.cssHooks[a],void 0===n)return r&&"get"in r&&void 0!==(o=r.get(e,!1,i))?o:c[t];"string"==(s=typeof n)&&(o=te.exec(n))&&o[1]&&(n=ae(e,t,o),s="number"),null!=n&&n==n&&("number"!==s||l||(n+=o&&o[3]||(w.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),r&&"set"in r&&void 0===(n=r.set(e,n,i))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,i){var o,s,r,a=z(t);return Ve.test(t)||(t=ze(a)),(r=w.cssHooks[t]||w.cssHooks[a])&&"get"in r&&(o=r.get(e,!0,n)),void 0===o&&(o=qe(e,t,i)),"normal"===o&&t in Ye&&(o=Ye[t]),""===n||n?(s=parseFloat(o),!0===n||isFinite(s)?s||0:o):o}}),w.each(["height","width"],(function(e,t){w.cssHooks[t]={get:function(e,n,i){if(n)return!Je.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,t,i):Re(e,Xe,(function(){return Ze(e,t,i)}))},set:function(e,n,i){var o,s=Pe(e),r=!f.scrollboxSize()&&"absolute"===s.position,a=(r||i)&&"border-box"===w.css(e,"boxSizing",!1,s),l=i?Ke(e,t,i,a,s):0;return a&&r&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-Ke(e,t,"border",!1,s)-.5)),l&&(o=te.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ge(0,n,l)}}})),w.cssHooks.marginLeft=We(f.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(qe(e,"marginLeft"))||e.getBoundingClientRect().left-Re(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 i=0,o={},s="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+ne[i]+t]=s[i]||s[i-2]||s[0];return o}},"margin"!==e&&(w.cssHooks[e+t].set=Ge)})),w.fn.extend({css:function(e,t){return W(this,(function(e,t,n){var i,o,s={},r=0;if(Array.isArray(t)){for(i=Pe(e),o=t.length;r<o;r++)s[t[r]]=w.css(e,t[r],!1,i);return s}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,i,o,s){this.elem=e,this.prop=n,this.easing=o||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(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[ze(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,it,ot,st=/^(?:toggle|show|hide)$/,rt=/queueHooks$/;function at(){nt&&(!1===m.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function lt(){return e.setTimeout((function(){tt=void 0})),tt=Date.now()}function ct(e,t){var n,i=0,o={height:e};for(t=t?1:0;i<4;i+=2-t)o["margin"+(n=ne[i])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function ut(e,t,n){for(var i,o=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),s=0,r=o.length;s<r;s++)if(i=o[s].call(n,t,e))return i}function dt(e,t,n){var i,o,s=0,r=dt.prefilters.length,a=w.Deferred().always((function(){delete l.elem})),l=function(){if(o)return!1;for(var t=tt||lt(),n=Math.max(0,c.startTime+c.duration-t),i=1-(n/c.duration||0),s=0,r=c.tweens.length;s<r;s++)c.tweens[s].run(i);return a.notifyWith(e,[c,i,n]),i<1&&r?n:(r||a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c]),!1)},c=a.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:tt||lt(),duration:n.duration,tweens:[],createTween:function(t,n){var i=w.Tween(e,c.opts,t,n,c.opts.specialEasing[t]||c.opts.easing);return c.tweens.push(i),i},stop:function(t){var n=0,i=t?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return t?(a.notifyWith(e,[c,1,0]),a.resolveWith(e,[c,t])):a.rejectWith(e,[c,t]),this}}),u=c.props;for(function(e,t){var n,i,o,s,r;for(n in e)if(o=t[i=z(n)],s=e[n],Array.isArray(s)&&(o=s[1],s=e[n]=s[0]),n!==i&&(e[i]=s,delete e[n]),(r=w.cssHooks[i])&&"expand"in r)for(n in s=r.expand(s),delete e[i],s)n in e||(e[n]=s[n],t[n]=o);else t[i]=o}(u,c.opts.specialEasing);s<r;s++)if(i=dt.prefilters[s].call(c,e,u,c.opts))return p(i.stop)&&(w._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return w.map(u,ut,c),p(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),w.fx.timer(w.extend(l,{elem:e,anim:c,queue:c.opts.queue})),c}w.Animation=w.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ae(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){p(e)?(t=e,e=["*"]):e=e.match(O);for(var n,i=0,o=e.length;i<o;i++)n=e[i],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var i,o,s,r,a,l,c,u,d="width"in t||"height"in t,h=this,f={},p=e.style,g=e.nodeType&&re(e),m=X.get(e,"fxshow");for(i in n.queue||(null==(r=w._queueHooks(e,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,h.always((function(){h.always((function(){r.unqueued--,w.queue(e,"fx").length||r.empty.fire()}))}))),t)if(o=t[i],st.test(o)){if(delete t[i],s=s||"toggle"===o,o===(g?"hide":"show")){if("show"!==o||!m||void 0===m[i])continue;g=!0}f[i]=m&&m[i]||w.style(e,i)}if((l=!w.isEmptyObject(t))||!w.isEmptyObject(f))for(i in d&&1===e.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=m&&m.display)&&(c=X.get(e,"display")),"none"===(u=w.css(e,"display"))&&(c?u=c:(ce([e],!0),c=e.style.display||c,u=w.css(e,"display"),ce([e]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===w.css(e,"float")&&(l||(h.done((function(){p.display=c})),null==c&&(u=p.display,c="none"===u?"":u)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",h.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),l=!1,f)l||(m?"hidden"in m&&(g=m.hidden):m=X.access(e,"fxshow",{display:c}),s&&(m.hidden=!g),g&&ce([e],!0),h.done((function(){for(i in g||ce([e]),X.remove(e,"fxshow"),f)w.style(e,i,f[i])}))),l=ut(g?m[i]:0,i,h),i in m||(m[i]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),w.speed=function(e,t,n){var i=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||p(e)&&e,duration:e,easing:n&&t||t&&!p(t)&&t};return w.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in w.fx.speeds?i.duration=w.fx.speeds[i.duration]:i.duration=w.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){p(i.old)&&i.old.call(this),i.queue&&w.dequeue(this,i.queue)},i},w.fn.extend({fadeTo:function(e,t,n,i){return this.filter(re).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=w.isEmptyObject(e),s=w.speed(t,n,i),r=function(){var t=dt(this,w.extend({},e),s);(o||X.get(this,"finish"))&&t.stop(!0)};return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,o=null!=e&&e+"queueHooks",s=w.timers,r=X.get(this);if(o)r[o]&&r[o].stop&&i(r[o]);else for(o in r)r[o]&&r[o].stop&&rt.test(o)&&i(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=e&&s[o].queue!==e||(s[o].anim.stop(n),t=!1,s.splice(o,1));!t&&n||w.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=X.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],s=w.timers,r=i?i.length:0;for(n.finish=!0,w.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;t<r;t++)i[t]&&i[t].finish&&i[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,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ct(t,!0),e,i,o)}})),w.each({slideDown:ct("show"),slideUp:ct("hide"),slideToggle:ct("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){w.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}})),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,at())},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,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}}))},it=m.createElement("input"),ot=m.createElement("select").appendChild(m.createElement("option")),it.type="checkbox",f.checkOn=""!==it.value,f.optSelected=ot.selected,(it=m.createElement("input")).value="t",it.type="radio",f.radioValue="t"===it.value;var ht,ft=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return W(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 i,o,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===e.getAttribute?w.prop(e,t,n):(1===s&&w.isXMLDoc(e)||(o=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:null==(i=w.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&k(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,o=t&&t.match(O);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),ht={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=ft[t]||w.find.attr;ft[t]=function(e,t,i){var o,s,r=t.toLowerCase();return i||(s=ft[r],ft[r]=o,o=null!=n(e,t,i)?r:null,ft[r]=s),o}}));var pt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function mt(e){return(e.match(O)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(O)||[]}w.fn.extend({prop:function(e,t){return W(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 i,o,s=e.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&w.isXMLDoc(e)||(t=w.propFix[t]||t,o=w.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.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,i,o,s,r,a,l=0;if(p(e))return this.each((function(t){w(this).addClass(e.call(this,t,vt(this)))}));if((t=yt(e)).length)for(;n=this[l++];)if(o=vt(n),i=1===n.nodeType&&" "+mt(o)+" "){for(r=0;s=t[r++];)i.indexOf(" "+s+" ")<0&&(i+=s+" ");o!==(a=mt(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,o,s,r,a,l=0;if(p(e))return this.each((function(t){w(this).removeClass(e.call(this,t,vt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;n=this[l++];)if(o=vt(n),i=1===n.nodeType&&" "+mt(o)+" "){for(r=0;s=t[r++];)for(;-1<i.indexOf(" "+s+" ");)i=i.replace(" "+s+" "," ");o!==(a=mt(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):p(e)?this.each((function(n){w(this).toggleClass(e.call(this,n,vt(this),t),t)})):this.each((function(){var t,o,s,r;if(i)for(o=0,s=w(this),r=yt(e);t=r[o++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else void 0!==e&&"boolean"!==n||((t=vt(this))&&X.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":X.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&-1<(" "+mt(vt(n))+" ").indexOf(t))return!0;return!1}});var _t=/\r/g;w.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i=p(e),this.each((function(n){var o;1===this.nodeType&&(null==(o=i?e.call(this,n,w(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=w.map(o,(function(e){return null==e?"":e+""}))),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=w.valHooks[o.type]||w.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(_t,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:mt(w.text(e))}},select:{get:function(e){var t,n,i,o=e.options,s=e.selectedIndex,r="select-one"===e.type,a=r?null:[],l=r?s+1:o.length;for(i=s<0?l:r?s:0;i<l;i++)if(((n=o[i]).selected||i===s)&&!n.disabled&&(!n.parentNode.disabled||!k(n.parentNode,"optgroup"))){if(t=w(n).val(),r)return t;a.push(t)}return a},set:function(e,t){for(var n,i,o=e.options,s=w.makeArray(t),r=o.length;r--;)((i=o[r]).selected=-1<w.inArray(w.valHooks.option.get(i),s))&&(n=!0);return n||(e.selectedIndex=-1),s}}}}),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)}},f.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),f.focusin="onfocusin"in e;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var s,r,a,l,c,d,h,f,v=[i||m],y=u.call(t,"type")?t.type:t,_=u.call(t,"namespace")?t.namespace.split("."):[];if(r=f=a=i=i||m,3!==i.nodeType&&8!==i.nodeType&&!bt.test(y+w.event.triggered)&&(-1<y.indexOf(".")&&(y=(_=y.split(".")).shift(),_.sort()),c=y.indexOf(":")<0&&"on"+y,(t=t[w.expando]?t:new w.Event(y,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=_.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),h=w.event.special[y]||{},o||!h.trigger||!1!==h.trigger.apply(i,n))){if(!o&&!h.noBubble&&!g(i)){for(l=h.delegateType||y,bt.test(l+y)||(r=r.parentNode);r;r=r.parentNode)v.push(r),a=r;a===(i.ownerDocument||m)&&v.push(a.defaultView||a.parentWindow||e)}for(s=0;(r=v[s++])&&!t.isPropagationStopped();)f=r,t.type=1<s?l:h.bindType||y,(d=(X.get(r,"events")||Object.create(null))[t.type]&&X.get(r,"handle"))&&d.apply(r,n),(d=c&&r[c])&&d.apply&&J(r)&&(t.result=d.apply(r,n),!1===t.result&&t.preventDefault());return t.type=y,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(v.pop(),n)||!J(i)||c&&p(i[y])&&!g(i)&&((a=i[c])&&(i[c]=null),w.event.triggered=y,t.isPropagationStopped()&&f.addEventListener(y,wt),i[y](),t.isPropagationStopped()&&f.removeEventListener(y,wt),w.event.triggered=void 0,a&&(i[c]=a)),t.result}},simulate:function(e,t,n){var i=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(i,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)}}),f.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 i=this.ownerDocument||this.document||this,o=X.access(i,t);o||i.addEventListener(e,n,!0),X.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=X.access(i,t)-1;o?X.access(i,t,o):(i.removeEventListener(e,n,!0),X.remove(i,t))}}}));var Ct=e.location,Tt={guid:Date.now()},xt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Et=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Dt=/^(?:input|select|textarea|keygen)/i;function $t(e,t,n,i){var o;if(Array.isArray(t))w.each(t,(function(t,o){n||St.test(e)?i(e,o):$t(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)}));else if(n||"object"!==_(t))i(e,t);else for(o in t)$t(e+"["+o+"]",t[o],n,i)}w.param=function(e,t){var n,i=[],o=function(e,t){var n=p(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,(function(){o(this.name,this.value)}));else for(n in e)$t(n,e[n],t,o);return i.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")&&Dt.test(this.nodeName)&&!kt.test(e)&&(this.checked||!he.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(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var At=/%20/g,Nt=/#.*$/,Lt=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,Ot=/^\/\//,jt={},Ht={},Pt="*/".concat("*"),Rt=m.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,s=t.toLowerCase().match(O)||[];if(p(n))for(;i=s[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function qt(e,t,n,i){var o={},s=e===Ht;function r(a){var l;return o[a]=!0,w.each(e[a]||[],(function(e,a){var c=a(t,n,i);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(t.dataTypes.unshift(c),r(c),!1)})),l}return r(t.dataTypes[0])||!o["*"]&&r("*")}function Wt(e,t){var n,i,o=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&w.extend(!0,e,i),e}Rt.href=Ct.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,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?Wt(Wt(e,w.ajaxSettings),t):Wt(w.ajaxSettings,e)},ajaxPrefilter:Ft(jt),ajaxTransport:Ft(Ht),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,s,r,a,l,c,u,d,h,f=w.ajaxSetup({},n),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?w(p):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),_=f.statusCode||{},b={},C={},T="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(c){if(!r)for(r={};t=It.exec(s);)r[t[1].toLowerCase()+" "]=(r[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=r[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(e,t){return null==c&&(e=C[e.toLowerCase()]=C[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)x.always(e[x.status]);else for(t in e)_[t]=[_[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),S(0,t),this}};if(v.promise(x),f.url=((t||f.url||Ct.href)+"").replace(Ot,Ct.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(O)||[""],null==f.crossDomain){l=m.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Rt.protocol+"//"+Rt.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=w.param(f.data,f.traditional)),qt(jt,f,n,x),c)return x;for(d in(u=w.event&&f.global)&&0==w.active++&&w.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Mt.test(f.type),o=f.url.replace(Nt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(At,"+")):(h=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(xt.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(Lt,"$1"),h=(xt.test(o)?"&":"?")+"_="+Tt.guid+++h),f.url=o+h),f.ifModified&&(w.lastModified[o]&&x.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&x.setRequestHeader("If-None-Match",w.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Pt+"; q=0.01":""):f.accepts["*"]),f.headers)x.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,x,f)||c))return x.abort();if(T="abort",y.add(f.complete),x.done(f.success),x.fail(f.error),i=qt(Ht,f,n,x)){if(x.readyState=1,u&&g.trigger("ajaxSend",[x,f]),c)return x;f.async&&0<f.timeout&&(a=e.setTimeout((function(){x.abort("timeout")}),f.timeout));try{c=!1,i.send(b,S)}catch(t){if(c)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,n,r,l){var d,h,m,b,C,T=n;c||(c=!0,a&&e.clearTimeout(a),i=void 0,s=l||"",x.readyState=0<t?4:0,d=200<=t&&t<300||304===t,r&&(b=function(e,t,n){for(var i,o,s,r,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)s=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){s=o;break}r||(r=o)}s=s||r}if(s)return s!==l[0]&&l.unshift(s),n[s]}(f,x,r)),!d&&-1<w.inArray("script",f.dataTypes)&&(f.converters["text script"]=function(){}),b=function(e,t,n,i){var o,s,r,a,l,c={},u=e.dataTypes.slice();if(u[1])for(r in e.converters)c[r.toLowerCase()]=e.converters[r];for(s=u.shift();s;)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=u.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(r=c[l+" "+s]||c["* "+s]))for(o in c)if((a=o.split(" "))[1]===s&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[o]:!0!==c[o]&&(s=a[0],u.unshift(a[1]));break}if(!0!==r)if(r&&e.throws)t=r(t);else try{t=r(t)}catch(e){return{state:"parsererror",error:r?e:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}(f,b,x,d),d?(f.ifModified&&((C=x.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=C),(C=x.getResponseHeader("etag"))&&(w.etag[o]=C)),204===t||"HEAD"===f.type?T="nocontent":304===t?T="notmodified":(T=b.state,h=b.data,d=!(m=b.error))):(m=T,!t&&T||(T="error",t<0&&(t=0))),x.status=t,x.statusText=(n||T)+"",d?v.resolveWith(p,[h,T,x]):v.rejectWith(p,[x,T,m]),x.statusCode(_),_=void 0,u&&g.trigger(d?"ajaxSuccess":"ajaxError",[x,f,d?h:m]),y.fireWith(p,[x,T]),u&&(g.trigger("ajaxComplete",[x,f]),--w.active||w.event.trigger("ajaxStop")))}return x},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,i,o){return p(n)&&(o=o||i,i=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:o,data:n,success:i},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]&&(p(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(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return p(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=p(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 Bt={0:200,1223:204},Ut=w.ajaxSettings.xhr();f.cors=!!Ut&&"withCredentials"in Ut,f.ajax=Ut=!!Ut,w.ajaxTransport((function(t){var n,i;if(f.cors||Ut&&!t.crossDomain)return{send:function(o,s){var r,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)a[r]=t.xhrFields[r];for(r in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(r,o[r]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Bt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){n&&i()}))},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(o){if(n)throw o}},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(i,o){t=w("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Qt,zt=[],Jt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||w.expando+"_"+Tt.guid++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",(function(t,n,i){var o,s,r,a=!1!==t.jsonp&&(Jt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Jt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=p(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Jt,"$1"+o):!1!==t.jsonp&&(t.url+=(xt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return r||w.error(o+" was not called"),r[0]},t.dataTypes[0]="json",s=e[o],e[o]=function(){r=arguments},i.always((function(){void 0===s?w(e).removeProp(o):e[o]=s,t[o]&&(t.jsonpCallback=n.jsonpCallback,zt.push(o)),r&&p(s)&&s(r[0]),r=s=void 0})),"script"})),f.createHTMLDocument=((Qt=m.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Qt.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(f.createHTMLDocument?((i=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(i)):t=m),s=!n&&[],(o=D.exec(e))?[t.createElement(o[1])]:(o=_e([e],t,s),s&&s.length&&w(s).remove(),w.merge([],o.childNodes)));var i,o,s},w.fn.load=function(e,t,n){var i,o,s,r=this,a=e.indexOf(" ");return-1<a&&(i=mt(e.slice(a)),e=e.slice(0,a)),p(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),0<r.length&&w.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done((function(e){s=arguments,r.html(i?w("<div>").append(w.parseHTML(e)).find(i):e)})).always(n&&function(e,t){r.each((function(){n.apply(this,s||[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 i,o,s,r,a,l,c=w.css(e,"position"),u=w(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),s=w.css(e,"top"),l=w.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(s+l).indexOf("auto")?(r=(i=u.position()).top,o=i.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),p(t)&&(t=t.call(e,n,w.extend({},a))),null!=t.top&&(d.top=t.top-a.top+r),null!=t.left&&(d.left=t.left-a.left+o),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),u.css(d))}},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,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],o={top:0,left:0};if("fixed"===w.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((o=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),o.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-w.css(i,"marginTop",!0),left:t.left-o.left-w.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||ie}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;w.fn[e]=function(i){return W(this,(function(e,i,o){var s;if(g(e)?s=e:9===e.nodeType&&(s=e.defaultView),void 0===o)return s?s[t]:e[i];s?s.scrollTo(n?s.pageXOffset:o,n?o:s.pageYOffset):e[i]=o}),e,i,arguments.length)}})),w.each(["top","left"],(function(e,t){w.cssHooks[t]=We(f.pixelPosition,(function(e,n){if(n)return n=qe(e,t),He.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,i){w.fn[i]=function(o,s){var r=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===s?"margin":"border");return W(this,(function(t,n,o){var s;return g(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===o?w.css(t,n,a):w.style(t,n,o,a)}),t,r?o:void 0,r)}}))})),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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},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 Vt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.proxy=function(e,t){var n,i,s;if("string"==typeof t&&(n=e[t],t=e,e=n),p(e))return i=o.call(arguments,2),(s=function(){return e.apply(t||this,i.concat(o.call(arguments)))}).guid=e.guid=e.guid||w.guid++,s},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=k,w.isFunction=p,w.isWindow=g,w.camelCase=z,w.type=_,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(Vt,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return w}));var Xt=e.jQuery,Yt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Yt),t&&e.jQuery===w&&(e.jQuery=Xt),w},void 0===t&&(e.jQuery=e.$=w),w})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap={},e.jQuery)}(this,(function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var s={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var n=e.getAttribute("href");t=n&&"#"!==n?n.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var n=t(e).css("transition-duration"),i=t(e).css("transition-delay"),o=parseFloat(n),s=parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=t[i],a=r&&s.isElement(r)?"element":null===(l=r)||void 0===l?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(a))throw new Error(e.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+o+'".')}var l},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?s.findShadowRoot(e.parentNode):null},jQueryDetection:function(){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};s.jQueryDetection(),t.fn.emulateTransitionEnd=function(e){var n=this,i=!1;return t(this).one(s.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||s.triggerTransitionEnd(n)}),e),this},t.event.special[s.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}};var r="alert",a=t.fn[r],l=function(){function e(e){this._element=e}var n=e.prototype;return n.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},n.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(e){var n=s.getSelectorFromElement(e),i=!1;return n&&(i=document.querySelector(n)),i||(i=t(e).closest(".alert")[0]),i},n._triggerCloseEvent=function(e){var n=t.Event("close.bs.alert");return t(e).trigger(n),n},n._removeElement=function(e){var n=this;if(t(e).removeClass("show"),t(e).hasClass("fade")){var i=s.getTransitionDurationFromElement(e);t(e).one(s.TRANSITION_END,(function(t){return n._destroyElement(e,t)})).emulateTransitionEnd(i)}else this._destroyElement(e)},n._destroyElement=function(e){t(e).detach().trigger("closed.bs.alert").remove()},e._jQueryInterface=function(n){return this.each((function(){var i=t(this),o=i.data("bs.alert");o||(o=new e(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),e}();t(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',l._handleDismiss(new l)),t.fn[r]=l._jQueryInterface,t.fn[r].Constructor=l,t.fn[r].noConflict=function(){return t.fn[r]=a,l._jQueryInterface};var c=t.fn.button,u=function(){function e(e){this._element=e}var n=e.prototype;return n.toggle=function(){var e=!0,n=!0,i=t(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))e=!1;else{var s=i.querySelector(".active");s&&t(s).removeClass("active")}e&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),t(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),e&&t(this._element).toggleClass("active"))},n.dispose=function(){t.removeData(this._element,"bs.button"),this._element=null},e._jQueryInterface=function(n){return this.each((function(){var i=t(this).data("bs.button");i||(i=new e(this),t(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),e}();t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(e){var n=e.target,i=n;if(t(n).hasClass("btn")||(n=t(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))e.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void e.preventDefault();("LABEL"!==i.tagName||o&&"checkbox"!==o.type)&&u._jQueryInterface.call(t(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){var n=t(e.target).closest(".btn")[0];t(n).toggleClass("focus",/^focus(in)?$/.test(e.type))})),t(window).on("load.bs.button.data-api",(function(){for(var e=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),t=0,n=e.length;t<n;t++){var i=e[t],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var s=0,r=(e=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;s<r;s++){var a=e[s];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}})),t.fn.button=u._jQueryInterface,t.fn.button.Constructor=u,t.fn.button.noConflict=function(){return t.fn.button=c,u._jQueryInterface};var d="carousel",h=t.fn[d],f={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},p={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},g={TOUCH:"touch",PEN:"pen"},m=function(){function e(e,t){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._element=e,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=e.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(s.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(e){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one("slid.bs.carousel",(function(){return n.to(e)}));else{if(i===e)return this.pause(),void this.cycle();var o=e>i?"next":"prev";this._slide(o,this._items[e])}},n.dispose=function(){t(this._element).off(".bs.carousel"),t.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(e){return e=o({},f,e),s.typeCheckConfig(d,e,p),e},n._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;this.touchDeltaX=0,t>0&&this.prev(),t<0&&this.next()}},n._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on("keydown.bs.carousel",(function(t){return e._keydown(t)})),"hover"===this._config.pause&&t(this._element).on("mouseenter.bs.carousel",(function(t){return e.pause(t)})).on("mouseleave.bs.carousel",(function(t){return e.cycle(t)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var e=this;if(this._touchSupported){var n=function(t){e._pointerEvent&&g[t.originalEvent.pointerType.toUpperCase()]?e.touchStartX=t.originalEvent.clientX:e._pointerEvent||(e.touchStartX=t.originalEvent.touches[0].clientX)},i=function(t){e._pointerEvent&&g[t.originalEvent.pointerType.toUpperCase()]&&(e.touchDeltaX=t.originalEvent.clientX-e.touchStartX),e._handleSwipe(),"hover"===e._config.pause&&(e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout((function(t){return e.cycle(t)}),500+e._config.interval))};t(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(e){return e.preventDefault()})),this._pointerEvent?(t(this._element).on("pointerdown.bs.carousel",(function(e){return n(e)})),t(this._element).on("pointerup.bs.carousel",(function(e){return i(e)})),this._element.classList.add("pointer-event")):(t(this._element).on("touchstart.bs.carousel",(function(e){return n(e)})),t(this._element).on("touchmove.bs.carousel",(function(t){return function(t){t.originalEvent.touches&&t.originalEvent.touches.length>1?e.touchDeltaX=0:e.touchDeltaX=t.originalEvent.touches[0].clientX-e.touchStartX}(t)})),t(this._element).on("touchend.bs.carousel",(function(e){return i(e)})))}},n._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next()}},n._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(e)},n._getItemByDirection=function(e,t){var n="next"===e,i="prev"===e,o=this._getItemIndex(t),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return t;var r=(o+("prev"===e?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),s=t.Event("slide.bs.carousel",{relatedTarget:e,direction:n,from:o,to:i});return t(this._element).trigger(s),s},n._setActiveIndicatorElement=function(e){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));t(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(e)];i&&t(i).addClass("active")}},n._slide=function(e,n){var i,o,r,a=this,l=this._element.querySelector(".active.carousel-item"),c=this._getItemIndex(l),u=n||l&&this._getItemByDirection(e,l),d=this._getItemIndex(u),h=Boolean(this._interval);if("next"===e?(i="carousel-item-left",o="carousel-item-next",r="left"):(i="carousel-item-right",o="carousel-item-prev",r="right"),u&&t(u).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(u,r).isDefaultPrevented()&&l&&u){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(u);var f=t.Event("slid.bs.carousel",{relatedTarget:u,direction:r,from:c,to:d});if(t(this._element).hasClass("slide")){t(u).addClass(o),s.reflow(u),t(l).addClass(i),t(u).addClass(i);var p=parseInt(u.getAttribute("data-interval"),10);p?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=p):this._config.interval=this._config.defaultInterval||this._config.interval;var g=s.getTransitionDurationFromElement(l);t(l).one(s.TRANSITION_END,(function(){t(u).removeClass(i+" "+o).addClass("active"),t(l).removeClass("active "+o+" "+i),a._isSliding=!1,setTimeout((function(){return t(a._element).trigger(f)}),0)})).emulateTransitionEnd(g)}else t(l).removeClass("active"),t(u).addClass("active"),this._isSliding=!1,t(this._element).trigger(f);h&&this.cycle()}},e._jQueryInterface=function(n){return this.each((function(){var i=t(this).data("bs.carousel"),s=o({},f,t(this).data());"object"==typeof n&&(s=o({},s,n));var r="string"==typeof n?n:s.slide;if(i||(i=new e(this,s),t(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else s.interval&&s.ride&&(i.pause(),i.cycle())}))},e._dataApiClickHandler=function(n){var i=s.getSelectorFromElement(this);if(i){var r=t(i)[0];if(r&&t(r).hasClass("carousel")){var a=o({},t(r).data(),t(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),e._jQueryInterface.call(t(r),a),l&&t(r).data("bs.carousel").to(l),n.preventDefault()}}},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return f}}]),e}();t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",m._dataApiClickHandler),t(window).on("load.bs.carousel.data-api",(function(){for(var e=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=e.length;n<i;n++){var o=t(e[n]);m._jQueryInterface.call(o,o.data())}})),t.fn[d]=m._jQueryInterface,t.fn[d].Constructor=m,t.fn[d].noConflict=function(){return t.fn[d]=h,m._jQueryInterface};var v="collapse",y=t.fn[v],_={toggle:!0,parent:""},b={toggle:"boolean",parent:"(string|element)"},w=function(){function e(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var r=n[i],a=s.getSelectorFromElement(r),l=[].slice.call(document.querySelectorAll(a)).filter((function(t){return t===e}));null!==a&&l.length>0&&(this._selector=a,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=e.prototype;return n.toggle=function(){t(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!(this._isTransitioning||t(this._element).hasClass("show")||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(e){return"string"==typeof o._config.parent?e.getAttribute("data-parent")===o._config.parent:e.classList.contains("collapse")}))).length&&(n=null),n&&(i=t(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var r=t.Event("show.bs.collapse");if(t(this._element).trigger(r),!r.isDefaultPrevented()){n&&(e._jQueryInterface.call(t(n).not(this._selector),"hide"),i||t(n).data("bs.collapse",null));var a=this._getDimension();t(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[a]=0,this._triggerArray.length&&t(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(a[0].toUpperCase()+a.slice(1)),c=s.getTransitionDurationFromElement(this._element);t(this._element).one(s.TRANSITION_END,(function(){t(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),t(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(c),this._element.style[a]=this._element[l]+"px"}}},n.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass("show")){var n=t.Event("hide.bs.collapse");if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",s.reflow(this._element),t(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r<o;r++){var a=this._triggerArray[r],l=s.getSelectorFromElement(a);null!==l&&(t([].slice.call(document.querySelectorAll(l))).hasClass("show")||t(a).addClass("collapsed").attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[i]="";var c=s.getTransitionDurationFromElement(this._element);t(this._element).one(s.TRANSITION_END,(function(){e.setTransitioning(!1),t(e._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(c)}}},n.setTransitioning=function(e){this._isTransitioning=e},n.dispose=function(){t.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(e){return(e=o({},_,e)).toggle=Boolean(e.toggle),s.typeCheckConfig(v,e,b),e},n._getDimension=function(){return t(this._element).hasClass("width")?"width":"height"},n._getParent=function(){var n,i=this;s.isElement(this._config.parent)?(n=this._config.parent,void 0!==this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(n.querySelectorAll(o));return t(r).each((function(t,n){i._addAriaAndCollapsedClass(e._getTargetFromElement(n),[n])})),n},n._addAriaAndCollapsedClass=function(e,n){var i=t(e).hasClass("show");n.length&&t(n).toggleClass("collapsed",!i).attr("aria-expanded",i)},e._getTargetFromElement=function(e){var t=s.getSelectorFromElement(e);return t?document.querySelector(t):null},e._jQueryInterface=function(n){return this.each((function(){var i=t(this),s=i.data("bs.collapse"),r=o({},_,i.data(),"object"==typeof n&&n?n:{});if(!s&&r.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(r.toggle=!1),s||(s=new e(this,r),i.data("bs.collapse",s)),"string"==typeof n){if(void 0===s[n])throw new TypeError('No method named "'+n+'"');s[n]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return _}}]),e}();t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var n=t(this),i=s.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));t(o).each((function(){var e=t(this),i=e.data("bs.collapse")?"toggle":n.data();w._jQueryInterface.call(e,i)}))})),t.fn[v]=w._jQueryInterface,t.fn[v].Constructor=w,t.fn[v].noConflict=function(){return t.fn[v]=y,w._jQueryInterface};var C="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,T=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(C&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}(),x=C&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),T))}};function S(e){return e&&"[object Function]"==={}.toString.call(e)}function E(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function k(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function D(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=E(e),n=t.overflow,i=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?e:D(k(e))}function $(e){return e&&e.referenceNode?e.referenceNode:e}var A=C&&!(!window.MSInputMethodContext||!document.documentMode),N=C&&/MSIE 10/.test(navigator.userAgent);function L(e){return 11===e?A:10===e?N:A||N}function I(e){if(!e)return document.documentElement;for(var t=L(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===E(n,"position")?I(n):n:e?e.ownerDocument.documentElement:document.documentElement}function M(e){return null!==e.parentNode?M(e.parentNode):e}function O(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,o=n?t:e,s=document.createRange();s.setStart(i,0),s.setEnd(o,0);var r,a,l=s.commonAncestorContainer;if(e!==l&&t!==l||i.contains(o))return"BODY"===(a=(r=l).nodeName)||"HTML"!==a&&I(r.firstElementChild)!==r?I(l):l;var c=M(e);return c.host?O(c.host,t):O(e,M(t).host)}function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",i=e.nodeName;if("BODY"===i||"HTML"===i){var o=e.ownerDocument.documentElement,s=e.ownerDocument.scrollingElement||o;return s[n]}return e[n]}function H(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=j(t,"top"),o=j(t,"left"),s=n?-1:1;return e.top+=i*s,e.bottom+=i*s,e.left+=o*s,e.right+=o*s,e}function P(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+i+"Width"])}function R(e,t,n,i){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],L(10)?parseInt(n["offset"+e])+parseInt(i["margin"+("Height"===e?"Top":"Left")])+parseInt(i["margin"+("Height"===e?"Bottom":"Right")]):0)}function F(e){var t=e.body,n=e.documentElement,i=L(10)&&getComputedStyle(n);return{height:R("Height",t,n,i),width:R("Width",t,n,i)}}var q=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},W=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),B=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};function Q(e){return U({},e,{right:e.left+e.width,bottom:e.top+e.height})}function z(e){var t={};try{if(L(10)){t=e.getBoundingClientRect();var n=j(e,"top"),i=j(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s="HTML"===e.nodeName?F(e.ownerDocument):{},r=s.width||e.clientWidth||o.width,a=s.height||e.clientHeight||o.height,l=e.offsetWidth-r,c=e.offsetHeight-a;if(l||c){var u=E(e);l-=P(u,"x"),c-=P(u,"y"),o.width-=l,o.height-=c}return Q(o)}function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=L(10),o="HTML"===t.nodeName,s=z(e),r=z(t),a=D(e),l=E(t),c=parseFloat(l.borderTopWidth),u=parseFloat(l.borderLeftWidth);n&&o&&(r.top=Math.max(r.top,0),r.left=Math.max(r.left,0));var d=Q({top:s.top-r.top-c,left:s.left-r.left-u,width:s.width,height:s.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var h=parseFloat(l.marginTop),f=parseFloat(l.marginLeft);d.top-=c-h,d.bottom-=c-h,d.left-=u-f,d.right-=u-f,d.marginTop=h,d.marginLeft=f}return(i&&!n?t.contains(a):t===a&&"BODY"!==a.nodeName)&&(d=H(d,t)),d}function V(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=J(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),s=Math.max(n.clientHeight,window.innerHeight||0),r=t?0:j(n),a=t?0:j(n,"left"),l={top:r-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:s};return Q(l)}function X(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===E(e,"position"))return!0;var n=k(e);return!!n&&X(n)}function Y(e){if(!e||!e.parentElement||L())return document.documentElement;for(var t=e.parentElement;t&&"none"===E(t,"transform");)t=t.parentElement;return t||document.documentElement}function G(e,t,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s={top:0,left:0},r=o?Y(e):O(e,$(t));if("viewport"===i)s=V(r,o);else{var a=void 0;"scrollParent"===i?"BODY"===(a=D(k(t))).nodeName&&(a=e.ownerDocument.documentElement):a="window"===i?e.ownerDocument.documentElement:i;var l=J(a,r,o);if("HTML"!==a.nodeName||X(r))s=l;else{var c=F(e.ownerDocument),u=c.height,d=c.width;s.top+=l.top-l.marginTop,s.bottom=u+l.top,s.left+=l.left-l.marginLeft,s.right=d+l.left}}var h="number"==typeof(n=n||0);return s.left+=h?n:n.left||0,s.top+=h?n:n.top||0,s.right-=h?n:n.right||0,s.bottom-=h?n:n.bottom||0,s}function K(e){return e.width*e.height}function Z(e,t,n,i,o){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var r=G(n,i,s,o),a={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},l=Object.keys(a).map((function(e){return U({key:e},a[e],{area:K(a[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function ee(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?Y(t):O(t,$(n));return J(n,o,i)}function te(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),i=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function ne(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function ie(e,t,n){n=n.split("-")[0];var i=te(e),o={width:i.width,height:i.height},s=-1!==["right","left"].indexOf(n),r=s?"top":"left",a=s?"left":"top",l=s?"height":"width",c=s?"width":"height";return o[r]=t[r]+t[l]/2-i[l]/2,o[a]=n===a?t[a]-i[c]:t[ne(a)],o}function oe(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function se(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var i=oe(e,(function(e){return e[t]===n}));return e.indexOf(i)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&S(n)&&(t.offsets.popper=Q(t.offsets.popper),t.offsets.reference=Q(t.offsets.reference),t=n(t,e))})),t}function re(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=ee(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Z(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=ie(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=se(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function ae(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function le(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var o=t[i],s=o?""+o+n:e;if(void 0!==document.body.style[s])return s}return null}function ce(){return this.state.isDestroyed=!0,ae(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[le("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function ue(e){var t=e.ownerDocument;return t?t.defaultView:window}function de(){this.state.eventsEnabled||(this.state=function(e,t,n,i){n.updateBound=i,ue(e).addEventListener("resize",n.updateBound,{passive:!0});var o=D(e);return function e(t,n,i,o){var s="BODY"===t.nodeName,r=s?t.ownerDocument.defaultView:t;r.addEventListener(n,i,{passive:!0}),s||e(D(r.parentNode),n,i,o),o.push(r)}(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}(this.reference,this.options,this.state,this.scheduleUpdate))}function he(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,ue(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function fe(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function pe(e,t){Object.keys(t).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&fe(t[n])&&(i="px"),e.style[n]=t[n]+i}))}var ge=C&&/Firefox/i.test(navigator.userAgent);function me(e,t,n){var i=oe(e,(function(e){return e.name===t})),o=!!i&&e.some((function(e){return e.name===n&&e.enabled&&e.order<i.order}));if(!o){var s="`"+t+"`",r="`"+n+"`";console.warn(r+" modifier is required by "+s+" modifier in order to work, be sure to include it before "+s+"!")}return o}var ve=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ye=ve.slice(3);function _e(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ye.indexOf(e),i=ye.slice(n+1).concat(ye.slice(0,n));return t?i.reverse():i}var be={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var o=e.offsets,s=o.reference,r=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",u={start:B({},l,s[l]),end:B({},l,s[l]+s[c]-r[c])};e.offsets.popper=U({},r,u[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n,i=t.offset,o=e.placement,s=e.offsets,r=s.popper,a=s.reference,l=o.split("-")[0];return n=fe(+i)?[+i,0]:function(e,t,n,i){var o=[0,0],s=-1!==["right","left"].indexOf(i),r=e.split(/(\+|\-)/).map((function(e){return e.trim()})),a=r.indexOf(oe(r,(function(e){return-1!==e.search(/,|\s/)})));r[a]&&-1===r[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[r.slice(0,a).concat([r[a].split(l)[0]]),[r[a].split(l)[1]].concat(r.slice(a+1))]:[r];return(c=c.map((function(e,i){var o=(1===i?!s:s)?"height":"width",r=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,r=!0,e):r?(e[e.length-1]+=t,r=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,i){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+o[1],r=o[2];if(!s)return e;if(0===r.indexOf("%")){var a=void 0;switch(r){case"%p":a=n;break;case"%":case"%r":default:a=i}return Q(a)[t]/100*s}return"vh"===r||"vw"===r?("vh"===r?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*s:s}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,i){fe(n)&&(o[t]+=n*("-"===e[i-1]?-1:1))}))})),o}(i,r,a,l),"left"===l?(r.top+=n[0],r.left-=n[1]):"right"===l?(r.top+=n[0],r.left+=n[1]):"top"===l?(r.left+=n[0],r.top-=n[1]):"bottom"===l&&(r.left+=n[0],r.top+=n[1]),e.popper=r,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||I(e.instance.popper);e.instance.reference===n&&(n=I(n));var i=le("transform"),o=e.instance.popper.style,s=o.top,r=o.left,a=o[i];o.top="",o.left="",o[i]="";var l=G(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=s,o.left=r,o[i]=a,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),B({},e,n)},secondary:function(e){var n="right"===e?"left":"top",i=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(i=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),B({},n,i)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=U({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,i=t.reference,o=e.placement.split("-")[0],s=Math.floor,r=-1!==["top","bottom"].indexOf(o),a=r?"right":"bottom",l=r?"left":"top",c=r?"width":"height";return n[a]<s(i[l])&&(e.offsets.popper[l]=s(i[l])-n[c]),n[l]>s(i[a])&&(e.offsets.popper[l]=s(i[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!me(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],s=e.offsets,r=s.popper,a=s.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),h=l?"left":"top",f=l?"bottom":"right",p=te(i)[c];a[f]-p<r[d]&&(e.offsets.popper[d]-=r[d]-(a[f]-p)),a[d]+p>r[f]&&(e.offsets.popper[d]+=a[d]+p-r[f]),e.offsets.popper=Q(e.offsets.popper);var g=a[d]+a[c]/2-p/2,m=E(e.instance.popper),v=parseFloat(m["margin"+u]),y=parseFloat(m["border"+u+"Width"]),_=g-e.offsets.popper[d]-v-y;return _=Math.max(Math.min(r[c]-p,_),0),e.arrowElement=i,e.offsets.arrow=(B(n={},d,Math.round(_)),B(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(ae(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=G(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],o=ne(i),s=e.placement.split("-")[1]||"",r=[];switch(t.behavior){case"flip":r=[i,o];break;case"clockwise":r=_e(i);break;case"counterclockwise":r=_e(i,!0);break;default:r=t.behavior}return r.forEach((function(a,l){if(i!==a||r.length===l+1)return e;i=e.placement.split("-")[0],o=ne(i);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,h="left"===i&&d(c.right)>d(u.left)||"right"===i&&d(c.left)<d(u.right)||"top"===i&&d(c.bottom)>d(u.top)||"bottom"===i&&d(c.top)<d(u.bottom),f=d(c.left)<d(n.left),p=d(c.right)>d(n.right),g=d(c.top)<d(n.top),m=d(c.bottom)>d(n.bottom),v="left"===i&&f||"right"===i&&p||"top"===i&&g||"bottom"===i&&m,y=-1!==["top","bottom"].indexOf(i),_=!!t.flipVariations&&(y&&"start"===s&&f||y&&"end"===s&&p||!y&&"start"===s&&g||!y&&"end"===s&&m),b=!!t.flipVariationsByContent&&(y&&"start"===s&&p||y&&"end"===s&&f||!y&&"start"===s&&m||!y&&"end"===s&&g),w=_||b;(h||v||w)&&(e.flipped=!0,(h||v)&&(i=r[l+1]),w&&(s=function(e){return"end"===e?"start":"start"===e?"end":e}(s)),e.placement=i+(s?"-"+s:""),e.offsets.popper=U({},e.offsets.popper,ie(e.instance.popper,e.offsets.reference,e.placement)),e=se(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,o=i.popper,s=i.reference,r=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[r?"left":"top"]=s[n]-(a?o[r?"width":"height"]:0),e.placement=ne(t),e.offsets.popper=Q(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!me(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=oe(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,i=t.y,o=e.offsets.popper,s=oe(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==s&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var r,a,l=void 0!==s?s:t.gpuAcceleration,c=I(e.instance.popper),u=z(c),d={position:o.position},h=function(e,t){var n=e.offsets,i=n.popper,o=n.reference,s=Math.round,r=Math.floor,a=function(e){return e},l=s(o.width),c=s(i.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),h=t?u||d||l%2==c%2?s:r:a,f=t?s:a;return{left:h(l%2==1&&c%2==1&&!d&&t?i.left-1:i.left),top:f(i.top),bottom:f(i.bottom),right:h(i.right)}}(e,window.devicePixelRatio<2||!ge),f="bottom"===n?"top":"bottom",p="right"===i?"left":"right",g=le("transform");if(a="bottom"===f?"HTML"===c.nodeName?-c.clientHeight+h.bottom:-u.height+h.bottom:h.top,r="right"===p?"HTML"===c.nodeName?-c.clientWidth+h.right:-u.width+h.right:h.left,l&&g)d[g]="translate3d("+r+"px, "+a+"px, 0)",d[f]=0,d[p]=0,d.willChange="transform";else{var m="bottom"===f?-1:1,v="right"===p?-1:1;d[f]=a*m,d[p]=r*v,d.willChange=f+", "+p}var y={"x-placement":e.placement};return e.attributes=U({},y,e.attributes),e.styles=U({},d,e.styles),e.arrowStyles=U({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return pe(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&pe(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,i,o){var s=ee(o,t,e,n.positionFixed),r=Z(n.placement,s,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",r),pe(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},we=function(){function e(t,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};q(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=x(this.update.bind(this)),this.options=U({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(U({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){i.options.modifiers[t]=U({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return U({name:e},i.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&S(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return W(e,[{key:"update",value:function(){return re.call(this)}},{key:"destroy",value:function(){return ce.call(this)}},{key:"enableEventListeners",value:function(){return de.call(this)}},{key:"disableEventListeners",value:function(){return he.call(this)}}]),e}();we.Utils=("undefined"!=typeof window?window:global).PopperUtils,we.placements=ve,we.Defaults=be;var Ce="dropdown",Te=t.fn[Ce],xe=new RegExp("38|40|27"),Se={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},Ee={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},ke=function(){function e(e,t){this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var n=e.prototype;return n.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass("disabled")){var n=t(this._menu).hasClass("show");e._clearMenus(),n||this.show(!0)}},n.show=function(n){if(void 0===n&&(n=!1),!(this._element.disabled||t(this._element).hasClass("disabled")||t(this._menu).hasClass("show"))){var i={relatedTarget:this._element},o=t.Event("show.bs.dropdown",i),r=e._getParentFromElement(this._element);if(t(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&n){if(void 0===we)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var a=this._element;"parent"===this._config.reference?a=r:s.isElement(this._config.reference)&&(a=this._config.reference,void 0!==this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&t(r).addClass("position-static"),this._popper=new we(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(r).closest(".navbar-nav").length&&t(document.body).children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass("show"),t(r).toggleClass("show").trigger(t.Event("shown.bs.dropdown",i))}}},n.hide=function(){if(!this._element.disabled&&!t(this._element).hasClass("disabled")&&t(this._menu).hasClass("show")){var n={relatedTarget:this._element},i=t.Event("hide.bs.dropdown",n),o=e._getParentFromElement(this._element);t(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),t(this._menu).toggleClass("show"),t(o).toggleClass("show").trigger(t.Event("hidden.bs.dropdown",n)))}},n.dispose=function(){t.removeData(this._element,"bs.dropdown"),t(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},n.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},n._addEventListeners=function(){var e=this;t(this._element).on("click.bs.dropdown",(function(t){t.preventDefault(),t.stopPropagation(),e.toggle()}))},n._getConfig=function(e){return e=o({},this.constructor.Default,t(this._element).data(),e),s.typeCheckConfig(Ce,e,this.constructor.DefaultType),e},n._getMenuElement=function(){if(!this._menu){var t=e._getParentFromElement(this._element);t&&(this._menu=t.querySelector(".dropdown-menu"))}return this._menu},n._getPlacement=function(){var e=t(this._element.parentNode),n="bottom-start";return e.hasClass("dropup")?n=t(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":e.hasClass("dropright")?n="right-start":e.hasClass("dropleft")?n="left-start":t(this._menu).hasClass("dropdown-menu-right")&&(n="bottom-end"),n},n._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},n._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=o({},t.offsets,e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},n._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(e.modifiers.applyStyle={enabled:!1}),o({},e,this._config.popperConfig)},e._jQueryInterface=function(n){return this.each((function(){var i=t(this).data("bs.dropdown");if(i||(i=new e(this,"object"==typeof n?n:null),t(this).data("bs.dropdown",i)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},e._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,s=i.length;o<s;o++){var r=e._getParentFromElement(i[o]),a=t(i[o]).data("bs.dropdown"),l={relatedTarget:i[o]};if(n&&"click"===n.type&&(l.clickEvent=n),a){var c=a._menu;if(t(r).hasClass("show")&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&t.contains(r,n.target))){var u=t.Event("hide.bs.dropdown",l);t(r).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),i[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),t(c).removeClass("show"),t(r).removeClass("show").trigger(t.Event("hidden.bs.dropdown",l)))}}}},e._getParentFromElement=function(e){var t,n=s.getSelectorFromElement(e);return n&&(t=document.querySelector(n)),t||e.parentNode},e._dataApiKeydownHandler=function(n){if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||t(n.target).closest(".dropdown-menu").length):!xe.test(n.which))&&!this.disabled&&!t(this).hasClass("disabled")){var i=e._getParentFromElement(this),o=t(i).hasClass("show");if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||o&&(27===n.which||32===n.which))return 27===n.which&&t(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void t(this).trigger("click");var s=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(e){return t(e).is(":visible")}));if(0!==s.length){var r=s.indexOf(n.target);38===n.which&&r>0&&r--,40===n.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}}},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return Se}},{key:"DefaultType",get:function(){return Ee}}]),e}();t(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',ke._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",ke._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",ke._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(e){e.preventDefault(),e.stopPropagation(),ke._jQueryInterface.call(t(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(e){e.stopPropagation()})),t.fn[Ce]=ke._jQueryInterface,t.fn[Ce].Constructor=ke,t.fn[Ce].noConflict=function(){return t.fn[Ce]=Te,ke._jQueryInterface};var De=t.fn.modal,$e={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ae={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Ne=function(){function e(e,t){this._config=this._getConfig(t),this._element=e,this._dialog=e.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var n=e.prototype;return n.toggle=function(e){return this._isShown?this.hide():this.show(e)},n.show=function(e){var n=this;if(!this._isShown&&!this._isTransitioning){t(this._element).hasClass("fade")&&(this._isTransitioning=!0);var i=t.Event("show.bs.modal",{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(e){return n.hide(e)})),t(this._dialog).on("mousedown.dismiss.bs.modal",(function(){t(n._element).one("mouseup.dismiss.bs.modal",(function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return n._showElement(e)})))}},n.hide=function(e){var n=this;if(e&&e.preventDefault(),this._isShown&&!this._isTransitioning){var i=t.Event("hide.bs.modal");if(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=t(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off("focusin.bs.modal"),t(this._element).removeClass("show"),t(this._element).off("click.dismiss.bs.modal"),t(this._dialog).off("mousedown.dismiss.bs.modal"),o){var r=s.getTransitionDurationFromElement(this._element);t(this._element).one(s.TRANSITION_END,(function(e){return n._hideModal(e)})).emulateTransitionEnd(r)}else this._hideModal()}}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(e){return t(e).off(".bs.modal")})),t(document).off("focusin.bs.modal"),t.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(e){return e=o({},$e,e),s.typeCheckConfig("modal",e,Ae),e},n._triggerBackdropTransition=function(){var e=this;if("static"===this._config.backdrop){var n=t.Event("hidePrevented.bs.modal");if(t(this._element).trigger(n),n.defaultPrevented)return;var i=this._element.scrollHeight>document.documentElement.clientHeight;i||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var o=s.getTransitionDurationFromElement(this._dialog);t(this._element).off(s.TRANSITION_END),t(this._element).one(s.TRANSITION_END,(function(){e._element.classList.remove("modal-static"),i||t(e._element).one(s.TRANSITION_END,(function(){e._element.style.overflowY=""})).emulateTransitionEnd(e._element,o)})).emulateTransitionEnd(o),this._element.focus()}else this.hide()},n._showElement=function(e){var n=this,i=t(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),t(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&s.reflow(this._element),t(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e}),a=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(r)};if(i){var l=s.getTransitionDurationFromElement(this._dialog);t(this._dialog).one(s.TRANSITION_END,a).emulateTransitionEnd(l)}else a()},n._enforceFocus=function(){var e=this;t(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(n){document!==n.target&&e._element!==n.target&&0===t(e._element).has(n.target).length&&e._element.focus()}))},n._setEscapeEvent=function(){var e=this;this._isShown?t(this._element).on("keydown.dismiss.bs.modal",(function(t){e._config.keyboard&&27===t.which?(t.preventDefault(),e.hide()):e._config.keyboard||27!==t.which||e._triggerBackdropTransition()})):this._isShown||t(this._element).off("keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var e=this;this._isShown?t(window).on("resize.bs.modal",(function(t){return e.handleUpdate(t)})):t(window).off("resize.bs.modal")},n._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){t(document.body).removeClass("modal-open"),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger("hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(e){var n=this,i=t(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),t(this._backdrop).appendTo(document.body),t(this._element).on("click.dismiss.bs.modal",(function(e){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:e.target===e.currentTarget&&n._triggerBackdropTransition()})),i&&s.reflow(this._backdrop),t(this._backdrop).addClass("show"),!e)return;if(!i)return void e();var o=s.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(s.TRANSITION_END,e).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass("show");var r=function(){n._removeBackdrop(),e&&e()};if(t(this._element).hasClass("fade")){var a=s.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(s.TRANSITION_END,r).emulateTransitionEnd(a)}else r()}else e&&e()},n._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(e.left+e.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),i=[].slice.call(document.querySelectorAll(".sticky-top"));t(n).each((function(n,i){var o=i.style.paddingRight,s=t(i).css("padding-right");t(i).data("padding-right",o).css("padding-right",parseFloat(s)+e._scrollbarWidth+"px")})),t(i).each((function(n,i){var o=i.style.marginRight,s=t(i).css("margin-right");t(i).data("margin-right",o).css("margin-right",parseFloat(s)-e._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,s=t(document.body).css("padding-right");t(document.body).data("padding-right",o).css("padding-right",parseFloat(s)+this._scrollbarWidth+"px")}t(document.body).addClass("modal-open")},n._resetScrollbar=function(){var e=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));t(e).each((function(e,n){var i=t(n).data("padding-right");t(n).removeData("padding-right"),n.style.paddingRight=i||""}));var n=[].slice.call(document.querySelectorAll(".sticky-top"));t(n).each((function(e,n){var i=t(n).data("margin-right");void 0!==i&&t(n).css("margin-right",i).removeData("margin-right")}));var i=t(document.body).data("padding-right");t(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},e._jQueryInterface=function(n,i){return this.each((function(){var s=t(this).data("bs.modal"),r=o({},$e,t(this).data(),"object"==typeof n&&n?n:{});if(s||(s=new e(this,r),t(this).data("bs.modal",s)),"string"==typeof n){if(void 0===s[n])throw new TypeError('No method named "'+n+'"');s[n](i)}else r.show&&s.show(i)}))},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return $e}}]),e}();t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var n,i=this,r=s.getSelectorFromElement(this);r&&(n=document.querySelector(r));var a=t(n).data("bs.modal")?"toggle":o({},t(n).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var l=t(n).one("show.bs.modal",(function(e){e.isDefaultPrevented()||l.one("hidden.bs.modal",(function(){t(i).is(":visible")&&i.focus()}))}));Ne._jQueryInterface.call(t(n),a,this)})),t.fn.modal=Ne._jQueryInterface,t.fn.modal.Constructor=Ne,t.fn.modal.noConflict=function(){return t.fn.modal=De,Ne._jQueryInterface};var Le=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Ie=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,Me=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function Oe(e,t,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);for(var i=(new window.DOMParser).parseFromString(e,"text/html"),o=Object.keys(t),s=[].slice.call(i.body.querySelectorAll("*")),r=function(e,n){var i=s[e],r=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(t["*"]||[],t[r]||[]);a.forEach((function(e){(function(e,t){var n=e.nodeName.toLowerCase();if(-1!==t.indexOf(n))return-1===Le.indexOf(n)||Boolean(e.nodeValue.match(Ie)||e.nodeValue.match(Me));for(var i=t.filter((function(e){return e instanceof RegExp})),o=0,s=i.length;o<s;o++)if(n.match(i[o]))return!0;return!1})(e,l)||i.removeAttribute(e.nodeName)}))},a=0,l=s.length;a<l;a++)r(a);return i.body.innerHTML}var je="tooltip",He=t.fn[je],Pe=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Re=["sanitize","whiteList","sanitizeFn"],Fe={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},qe={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},We={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Be={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Ue=function(){function e(e,t){if(void 0===we)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}var n=e.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var n=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(n);var i=s.findShadowRoot(this.element),o=t.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=s.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&t(r).addClass("fade");var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,c=this._getAttachment(l);this.addAttachmentClass(c);var u=this._getContainer();t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(u),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new we(this.element,r,this._getPopperConfig(c)),t(r).addClass("show"),"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);var d=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),"out"===n&&e._leave(null,e)};if(t(this.tip).hasClass("fade")){var h=s.getTransitionDurationFromElement(this.tip);t(this.tip).one(s.TRANSITION_END,d).emulateTransitionEnd(h)}else d()}},n.hide=function(e){var n=this,i=this.getTipElement(),o=t.Event(this.constructor.Event.HIDE),r=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};if(t(this.element).trigger(o),!o.isDefaultPrevented()){if(t(i).removeClass("show"),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,t(this.tip).hasClass("fade")){var a=s.getTransitionDurationFromElement(i);t(i).one(s.TRANSITION_END,r).emulateTransitionEnd(a)}else r();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},n.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},n.setContent=function(){var e=this.getTipElement();this.setElementContent(t(e.querySelectorAll(".tooltip-inner")),this.getTitle()),t(e).removeClass("fade show")},n.setElementContent=function(e,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=Oe(n,this.config.whiteList,this.config.sanitizeFn)),e.html(n)):e.text(n):this.config.html?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text())},n.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},n._getPopperConfig=function(e){var t=this;return o({},{placement:e,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}},this.config.popperConfig)},n._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=o({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},n._getContainer=function(){return!1===this.config.container?document.body:s.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},n._getAttachment=function(e){return qe[e.toUpperCase()]},n._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,(function(t){return e.toggle(t)}));else if("manual"!==n){var i="hover"===n?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,o="hover"===n?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,(function(t){return e._enter(t)})).on(o,e.config.selector,(function(t){return e._leave(t)}))}})),this._hideModalHandler=function(){e.element&&e.hide()},t(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=o({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?"focus":"hover"]=!0),t(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},n._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},n._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},n._getConfig=function(e){var n=t(this.element).data();return Object.keys(n).forEach((function(e){-1!==Re.indexOf(e)&&delete n[e]})),"number"==typeof(e=o({},this.constructor.Default,n,"object"==typeof e&&e?e:{})).delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),s.typeCheckConfig(je,e,this.constructor.DefaultType),e.sanitize&&(e.template=Oe(e.template,e.whiteList,e.sanitizeFn)),e},n._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},n._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(Pe);null!==n&&n.length&&e.removeClass(n.join(""))},n._handlePopperPlacementChange=function(e){this.tip=e.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},n._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},e._jQueryInterface=function(n){return this.each((function(){var i=t(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new e(this,o),t(this).data("bs.tooltip",i)),"string"==typeof n)){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return We}},{key:"NAME",get:function(){return je}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Be}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Fe}}]),e}();t.fn[je]=Ue._jQueryInterface,t.fn[je].Constructor=Ue,t.fn[je].noConflict=function(){return t.fn[je]=He,Ue._jQueryInterface};var Qe="popover",ze=t.fn[Qe],Je=new RegExp("(^|\\s)bs-popover\\S+","g"),Ve=o({},Ue.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Xe=o({},Ue.DefaultType,{content:"(string|element|function)"}),Ye={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Ge=function(e){var n,o;function s(){return e.apply(this,arguments)||this}o=e,(n=s).prototype=Object.create(o.prototype),n.prototype.constructor=n,n.__proto__=o;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},r.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},r.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(".popover-body"),n),e.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(Je);null!==n&&n.length>0&&e.removeClass(n.join(""))},s._jQueryInterface=function(e){return this.each((function(){var n=t(this).data("bs.popover"),i="object"==typeof e?e:null;if((n||!/dispose|hide/.test(e))&&(n||(n=new s(this,i),t(this).data("bs.popover",n)),"string"==typeof e)){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},i(s,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return Ve}},{key:"NAME",get:function(){return Qe}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Ye}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Xe}}]),s}(Ue);t.fn[Qe]=Ge._jQueryInterface,t.fn[Qe].Constructor=Ge,t.fn[Qe].noConflict=function(){return t.fn[Qe]=ze,Ge._jQueryInterface};var Ke="scrollspy",Ze=t.fn[Ke],et={offset:10,method:"auto",target:""},tt={offset:"number",method:"string",target:"(string|element)"},nt=function(){function e(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on("scroll.bs.scrollspy",(function(e){return i._process(e)})),this.refresh(),this._process()}var n=e.prototype;return n.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(e){var n,r=s.getSelectorFromElement(e);if(r&&(n=document.querySelector(r)),n){var a=n.getBoundingClientRect();if(a.width||a.height)return[t(n)[i]().top+o,r]}return null})).filter((function(e){return e})).sort((function(e,t){return e[0]-t[0]})).forEach((function(t){e._offsets.push(t[0]),e._targets.push(t[1])}))},n.dispose=function(){t.removeData(this._element,"bs.scrollspy"),t(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(e){if("string"!=typeof(e=o({},et,"object"==typeof e&&e?e:{})).target&&s.isElement(e.target)){var n=t(e.target).attr("id");n||(n=s.getUID(Ke),t(e.target).attr("id",n)),e.target="#"+n}return s.typeCheckConfig(Ke,e,tt),e},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&e>=this._offsets[o]&&(void 0===this._offsets[o+1]||e<this._offsets[o+1])&&this._activate(this._targets[o])}},n._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",").map((function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'})),i=t([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass("active"),i.addClass("active")):(i.addClass("active"),i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),t(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:e})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(e){return e.classList.contains("active")})).forEach((function(e){return e.classList.remove("active")}))},e._jQueryInterface=function(n){return this.each((function(){var i=t(this).data("bs.scrollspy");if(i||(i=new e(this,"object"==typeof n&&n),t(this).data("bs.scrollspy",i)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return et}}]),e}();t(window).on("load.bs.scrollspy.data-api",(function(){for(var e=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),n=e.length;n--;){var i=t(e[n]);nt._jQueryInterface.call(i,i.data())}})),t.fn[Ke]=nt._jQueryInterface,t.fn[Ke].Constructor=nt,t.fn[Ke].noConflict=function(){return t.fn[Ke]=Ze,nt._jQueryInterface};var it=t.fn.tab,ot=function(){function e(e){this._element=e}var n=e.prototype;return n.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass("active")||t(this._element).hasClass("disabled"))){var n,i,o=t(this._element).closest(".nav, .list-group")[0],r=s.getSelectorFromElement(this._element);if(o){var a="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";i=(i=t.makeArray(t(o).find(a)))[i.length-1]}var l=t.Event("hide.bs.tab",{relatedTarget:this._element}),c=t.Event("show.bs.tab",{relatedTarget:i});if(i&&t(i).trigger(l),t(this._element).trigger(c),!c.isDefaultPrevented()&&!l.isDefaultPrevented()){r&&(n=document.querySelector(r)),this._activate(this._element,o);var u=function(){var n=t.Event("hidden.bs.tab",{relatedTarget:e._element}),o=t.Event("shown.bs.tab",{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(o)};n?this._activate(n,n.parentNode,u):u()}}},n.dispose=function(){t.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(e,n,i){var o=this,r=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?t(n).children(".active"):t(n).find("> li > .active"))[0],a=i&&r&&t(r).hasClass("fade"),l=function(){return o._transitionComplete(e,r,i)};if(r&&a){var c=s.getTransitionDurationFromElement(r);t(r).removeClass("show").one(s.TRANSITION_END,l).emulateTransitionEnd(c)}else l()},n._transitionComplete=function(e,n,i){if(n){t(n).removeClass("active");var o=t(n.parentNode).find("> .dropdown-menu .active")[0];o&&t(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),s.reflow(e),e.classList.contains("fade")&&e.classList.add("show"),e.parentNode&&t(e.parentNode).hasClass("dropdown-menu")){var r=t(e).closest(".dropdown")[0];if(r){var a=[].slice.call(r.querySelectorAll(".dropdown-toggle"));t(a).addClass("active")}e.setAttribute("aria-expanded",!0)}i&&i()},e._jQueryInterface=function(n){return this.each((function(){var i=t(this),o=i.data("bs.tab");if(o||(o=new e(this),i.data("bs.tab",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),e}();t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(e){e.preventDefault(),ot._jQueryInterface.call(t(this),"show")})),t.fn.tab=ot._jQueryInterface,t.fn.tab.Constructor=ot,t.fn.tab.noConflict=function(){return t.fn.tab=it,ot._jQueryInterface};var st=t.fn.toast,rt={animation:"boolean",autohide:"boolean",delay:"number"},at={animation:!0,autohide:!0,delay:500},lt=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var n=e.prototype;return n.show=function(){var e=this,n=t.Event("show.bs.toast");if(t(this._element).trigger(n),!n.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var i=function(){e._element.classList.remove("showing"),e._element.classList.add("show"),t(e._element).trigger("shown.bs.toast"),e._config.autohide&&(e._timeout=setTimeout((function(){e.hide()}),e._config.delay))};if(this._element.classList.remove("hide"),s.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=s.getTransitionDurationFromElement(this._element);t(this._element).one(s.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var e=t.Event("hide.bs.toast");t(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},n.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),t(this._element).off("click.dismiss.bs.toast"),t.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(e){return e=o({},at,t(this._element).data(),"object"==typeof e&&e?e:{}),s.typeCheckConfig("toast",e,this.constructor.DefaultType),e},n._setListeners=function(){var e=this;t(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return e.hide()}))},n._close=function(){var e=this,n=function(){e._element.classList.add("hide"),t(e._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=s.getTransitionDurationFromElement(this._element);t(this._element).one(s.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},n._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},e._jQueryInterface=function(n){return this.each((function(){var i=t(this),o=i.data("bs.toast");if(o||(o=new e(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},i(e,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"DefaultType",get:function(){return rt}},{key:"Default",get:function(){return at}}]),e}();t.fn.toast=lt._jQueryInterface,t.fn.toast.Constructor=lt,t.fn.toast.noConflict=function(){return t.fn.toast=st,lt._jQueryInterface},e.Alert=l,e.Button=u,e.Carousel=m,e.Collapse=w,e.Dropdown=ke,e.Modal=Ne,e.Popover=Ge,e.Scrollspy=nt,e.Tab=ot,e.Toast=lt,e.Tooltip=Ue,e.Util=s,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],(function(n){return t(e,n)})):"object"==typeof module&&module.exports?module.exports=t(e,require("jquery")):e.jQueryBridget=t(e,e.jQuery)}(window,(function(e,t){"use strict";var n=Array.prototype.slice,i=e.console,o=void 0===i?function(){}:function(e){i.error(e)};function s(i,s,a){function l(e,t,n){var s,r="$()."+i+'("'+t+'")';return e.each((function(e,l){var c=a.data(l,i);if(c){var u=c[t];if(u&&"_"!=t.charAt(0)){var d=u.apply(c,n);s=void 0===s?d:s}else o(r+" is not a valid method")}else o(i+" not initialized. Cannot call methods, i.e. "+r)})),void 0!==s?s:e}function c(e,t){e.each((function(e,n){var o=a.data(n,i);o?(o.option(t),o._init()):(o=new s(n,t),a.data(n,i,o))}))}(a=a||t||e.jQuery)&&(s.prototype.option||(s.prototype.option=function(e){a.isPlainObject(e)&&(this.options=a.extend(!0,this.options,e))}),a.fn[i]=function(e){if("string"==typeof e){var t=n.call(arguments,1);return l(this,e,t)}return c(this,e),this},r(a))}function r(e){!e||e&&e.bridget||(e.bridget=s)}return r(t||e.jQuery),s})),function(e,t){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],(function(){return t()})):"object"==typeof module&&module.exports?module.exports=t():e.getSize=t()}(window,(function(){"use strict";function e(e){var t=parseFloat(e);return-1==e.indexOf("%")&&!isNaN(t)&&t}var t="undefined"==typeof console?function(){}:function(e){console.error(e)},n=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],i=n.length;function o(e){var n=getComputedStyle(e);return n||t("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),n}var s,r=!1;function a(){if(!r){r=!0;var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";var n=document.body||document.documentElement;n.appendChild(t);var i=o(t);l.isBoxSizeOuter=s=200==e(i.width),n.removeChild(t)}}function l(t){if(a(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var r=o(t);if("none"==r.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<i;t++){e[n[t]]=0}return e}();var l={};l.width=t.offsetWidth,l.height=t.offsetHeight;for(var c=l.isBorderBox="border-box"==r.boxSizing,u=0;u<i;u++){var d=n[u],h=r[d],f=parseFloat(h);l[d]=isNaN(f)?0:f}var p=l.paddingLeft+l.paddingRight,g=l.paddingTop+l.paddingBottom,m=l.marginLeft+l.marginRight,v=l.marginTop+l.marginBottom,y=l.borderLeftWidth+l.borderRightWidth,_=l.borderTopWidth+l.borderBottomWidth,b=c&&s,w=e(r.width);!1!==w&&(l.width=w+(b?0:p+y));var C=e(r.height);return!1!==C&&(l.height=C+(b?0:g+_)),l.innerWidth=l.width-(p+y),l.innerHeight=l.height-(g+_),l.outerWidth=l.width+m,l.outerHeight=l.height+v,l}}return l})),function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,(function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},i=n[e]=n[e]||[];return-1==i.indexOf(t)&&i.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var i=n.indexOf(t);return-1!=i&&n.splice(i,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var i=this._onceEvents&&this._onceEvents[e],o=0;o<n.length;o++){var s=n[o];i&&i[s]&&(this.off(e,s),delete i[s]),s.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e})),function(e,t){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],(function(n){return t(e,n)})):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.Unipointer=t(e,e.EvEmitter)}(window,(function(e,t){function n(){}var i=n.prototype=Object.create(t.prototype);i.bindStartEvent=function(e){this._bindStartEvent(e,!0)},i.unbindStartEvent=function(e){this._bindStartEvent(e,!1)},i._bindStartEvent=function(t,n){var i=(n=void 0===n||n)?"addEventListener":"removeEventListener",o="mousedown";e.PointerEvent?o="pointerdown":"ontouchstart"in e&&(o="touchstart"),t[i](o,this)},i.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},i.getTouch=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.identifier==this.pointerIdentifier)return n}},i.onmousedown=function(e){var t=e.button;t&&0!==t&&1!==t||this._pointerDown(e,e)},i.ontouchstart=function(e){this._pointerDown(e,e.changedTouches[0])},i.onpointerdown=function(e){this._pointerDown(e,e)},i._pointerDown=function(e,t){e.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,this.pointerDown(e,t))},i.pointerDown=function(e,t){this._bindPostStartEvents(e),this.emitEvent("pointerDown",[e,t])};var o={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};return i._bindPostStartEvents=function(t){if(t){var n=o[t.type];n.forEach((function(t){e.addEventListener(t,this)}),this),this._boundPointerEvents=n}},i._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach((function(t){e.removeEventListener(t,this)}),this),delete this._boundPointerEvents)},i.onmousemove=function(e){this._pointerMove(e,e)},i.onpointermove=function(e){e.pointerId==this.pointerIdentifier&&this._pointerMove(e,e)},i.ontouchmove=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerMove(e,t)},i._pointerMove=function(e,t){this.pointerMove(e,t)},i.pointerMove=function(e,t){this.emitEvent("pointerMove",[e,t])},i.onmouseup=function(e){this._pointerUp(e,e)},i.onpointerup=function(e){e.pointerId==this.pointerIdentifier&&this._pointerUp(e,e)},i.ontouchend=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerUp(e,t)},i._pointerUp=function(e,t){this._pointerDone(),this.pointerUp(e,t)},i.pointerUp=function(e,t){this.emitEvent("pointerUp",[e,t])},i._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},i._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},i.pointerDone=function(){},i.onpointercancel=function(e){e.pointerId==this.pointerIdentifier&&this._pointerCancel(e,e)},i.ontouchcancel=function(e){var t=this.getTouch(e.changedTouches);t&&this._pointerCancel(e,t)},i._pointerCancel=function(e,t){this._pointerDone(),this.pointerCancel(e,t)},i.pointerCancel=function(e,t){this.emitEvent("pointerCancel",[e,t])},n.getPointerPoint=function(e){return{x:e.pageX,y:e.pageY}},n})),function(e,t){"function"==typeof define&&define.amd?define("unidragger/unidragger",["unipointer/unipointer"],(function(n){return t(e,n)})):"object"==typeof module&&module.exports?module.exports=t(e,require("unipointer")):e.Unidragger=t(e,e.Unipointer)}(window,(function(e,t){function n(){}var i=n.prototype=Object.create(t.prototype);i.bindHandles=function(){this._bindHandles(!0)},i.unbindHandles=function(){this._bindHandles(!1)},i._bindHandles=function(t){for(var n=(t=void 0===t||t)?"addEventListener":"removeEventListener",i=t?this._touchActionValue:"",o=0;o<this.handles.length;o++){var s=this.handles[o];this._bindStartEvent(s,t),s[n]("click",this),e.PointerEvent&&(s.style.touchAction=i)}},i._touchActionValue="none",i.pointerDown=function(e,t){this.okayPointerDown(e)&&(this.pointerDownPointer=t,e.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(e),this.emitEvent("pointerDown",[e,t]))};var o={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},s={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return i.okayPointerDown=function(e){var t=o[e.target.nodeName],n=s[e.target.type],i=!t||n;return i||this._pointerReset(),i},i.pointerDownBlur=function(){var e=document.activeElement;e&&e.blur&&e!=document.body&&e.blur()},i.pointerMove=function(e,t){var n=this._dragPointerMove(e,t);this.emitEvent("pointerMove",[e,t,n]),this._dragMove(e,t,n)},i._dragPointerMove=function(e,t){var n={x:t.pageX-this.pointerDownPointer.pageX,y:t.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this._dragStart(e,t),n},i.hasDragStarted=function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3},i.pointerUp=function(e,t){this.emitEvent("pointerUp",[e,t]),this._dragPointerUp(e,t)},i._dragPointerUp=function(e,t){this.isDragging?this._dragEnd(e,t):this._staticClick(e,t)},i._dragStart=function(e,t){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(e,t)},i.dragStart=function(e,t){this.emitEvent("dragStart",[e,t])},i._dragMove=function(e,t,n){this.isDragging&&this.dragMove(e,t,n)},i.dragMove=function(e,t,n){e.preventDefault(),this.emitEvent("dragMove",[e,t,n])},i._dragEnd=function(e,t){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(e,t)},i.dragEnd=function(e,t){this.emitEvent("dragEnd",[e,t])},i.onclick=function(e){this.isPreventingClicks&&e.preventDefault()},i._staticClick=function(e,t){this.isIgnoringMouseUp&&"mouseup"==e.type||(this.staticClick(e,t),"mouseup"!=e.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},i.staticClick=function(e,t){this.emitEvent("staticClick",[e,t])},n.getPointerPoint=t.getPointerPoint,n})),function(e,t){"function"==typeof define&&define.amd?define(["get-size/get-size","unidragger/unidragger"],(function(n,i){return t(e,n,i)})):"object"==typeof module&&module.exports?module.exports=t(e,require("get-size"),require("unidragger")):e.Draggabilly=t(e,e.getSize,e.Unidragger)}(window,(function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}var o=e.jQuery;function s(e,t){this.element="string"==typeof e?document.querySelector(e):e,o&&(this.$element=o(this.element)),this.options=i({},this.constructor.defaults),this.option(t),this._create()}var r=s.prototype=Object.create(n.prototype);s.defaults={},r.option=function(e){i(this.options,e)};var a={relative:!0,absolute:!0,fixed:!0};function l(e,t,n){return n=n||"round",t?Math[n](e/t)*t:e}return r._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=i({},this.position);var e=getComputedStyle(this.element);a[e.position]||(this.element.style.position="relative"),this.on("pointerMove",this.onPointerMove),this.on("pointerUp",this.onPointerUp),this.enable(),this.setHandles()},r.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element],this.bindHandles()},r.dispatchEvent=function(e,t,n){var i=[t].concat(n);this.emitEvent(e,i),this.dispatchJQueryEvent(e,t,n)},r.dispatchJQueryEvent=function(t,n,i){var o=e.jQuery;if(o&&this.$element){var s=o.Event(n);s.type=t,this.$element.trigger(s,i)}},r._getPosition=function(){var e=getComputedStyle(this.element),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=isNaN(t)?0:t,this.position.y=isNaN(n)?0:n,this._addTransformPosition(e)},r._getPositionCoord=function(e,n){if(-1!=e.indexOf("%")){var i=t(this.element.parentNode);return i?parseFloat(e)/100*i[n]:0}return parseInt(e,10)},r._addTransformPosition=function(e){var t=e.transform;if(0===t.indexOf("matrix")){var n=t.split(","),i=0===t.indexOf("matrix3d")?12:4,o=parseInt(n[i],10),s=parseInt(n[i+1],10);this.position.x+=o,this.position.y+=s}},r.onPointerDown=function(e,t){this.element.classList.add("is-pointer-down"),this.dispatchJQueryEvent("pointerDown",e,[t])},r.pointerDown=function(e,t){this.okayPointerDown(e)&&this.isEnabled?(this.pointerDownPointer={pageX:t.pageX,pageY:t.pageY},e.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(e),this.element.classList.add("is-pointer-down"),this.dispatchEvent("pointerDown",e,[t])):this._pointerReset()},r.dragStart=function(e,t){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.dispatchEvent("dragStart",e,[t]),this.animate())},r.measureContainment=function(){var e=this.getContainer();if(e){var n=t(this.element),i=t(e),o=this.element.getBoundingClientRect(),s=e.getBoundingClientRect(),r=i.borderLeftWidth+i.borderRightWidth,a=i.borderTopWidth+i.borderBottomWidth,l=this.relativeStartPosition={x:o.left-(s.left+i.borderLeftWidth),y:o.top-(s.top+i.borderTopWidth)};this.containSize={width:i.width-r-l.x-n.width,height:i.height-a-l.y-n.height}}},r.getContainer=function(){var e=this.options.containment;if(e)return e instanceof HTMLElement?e:"string"==typeof e?document.querySelector(e):this.element.parentNode},r.onPointerMove=function(e,t,n){this.dispatchJQueryEvent("pointerMove",e,[t,n])},r.dragMove=function(e,t,n){if(this.isEnabled){var i=n.x,o=n.y,s=this.options.grid,r=s&&s[0],a=s&&s[1];i=l(i,r),o=l(o,a),i=this.containDrag("x",i,r),o=this.containDrag("y",o,a),i="y"==this.options.axis?0:i,o="x"==this.options.axis?0:o,this.position.x=this.startPosition.x+i,this.position.y=this.startPosition.y+o,this.dragPoint.x=i,this.dragPoint.y=o,this.dispatchEvent("dragMove",e,[t,n])}},r.containDrag=function(e,t,n){if(!this.options.containment)return t;var i="x"==e?"width":"height",o=l(-this.relativeStartPosition[e],n,"ceil"),s=this.containSize[i];return s=l(s,n,"floor"),Math.max(o,Math.min(s,t))},r.onPointerUp=function(e,t){this.element.classList.remove("is-pointer-down"),this.dispatchJQueryEvent("pointerUp",e,[t])},r.dragEnd=function(e,t){this.isEnabled&&(this.element.style.transform="",this.setLeftTop(),this.element.classList.remove("is-dragging"),this.dispatchEvent("dragEnd",e,[t]))},r.animate=function(){if(this.isDragging){this.positionDrag();var e=this;requestAnimationFrame((function(){e.animate()}))}},r.setLeftTop=function(){this.element.style.left=this.position.x+"px",this.element.style.top=this.position.y+"px"},r.positionDrag=function(){this.element.style.transform="translate3d( "+this.dragPoint.x+"px, "+this.dragPoint.y+"px, 0)"},r.staticClick=function(e,t){this.dispatchEvent("staticClick",e,[t])},r.setPosition=function(e,t){this.position.x=e,this.position.y=t,this.setLeftTop()},r.enable=function(){this.isEnabled=!0},r.disable=function(){this.isEnabled=!1,this.isDragging&&this.dragEnd()},r.destroy=function(){this.disable(),this.element.style.transform="",this.element.style.left="",this.element.style.top="",this.element.style.position="",this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},r._init=function(){},o&&o.bridget&&o.bridget("draggabilly",s),s})),window.Modernizr=function(e,t,n){function i(e){u.cssText=e}function o(e,t){return typeof e===t}var s,r,a={},l=t.documentElement,c=t.createElement("modernizr"),u=c.style,d={},h=[],f=h.slice,p={}.hasOwnProperty;for(var g in r=o(p,"undefined")||o(p.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return p.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=f.call(arguments,1),i=function(){if(this instanceof i){var o=function(){};o.prototype=t.prototype;var s=new o,r=t.apply(s,n.concat(f.call(arguments)));return Object(r)===r?r:s}return t.apply(e,n.concat(f.call(arguments)))};return i}),d.audio=function(){var e=t.createElement("audio"),n=!1;try{(n=!!e.canPlayType)&&((n=new Boolean(n)).ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(e){}return n},d)r(d,g)&&(s=g.toLowerCase(),a[s]=d[g](),h.push((a[s]?"":"no-")+s));return a.addTest=function(e,t){if("object"==typeof e)for(var i in e)r(e,i)&&a.addTest(i,e[i]);else{if(e=e.toLowerCase(),a[e]!==n)return a;t="function"==typeof t?t():t,"undefined"!=typeof enableClasses&&enableClasses&&(l.className+=" "+(t?"":"no-")+e),a[e]=t}return a},i(""),c=null,a._version="2.6.2",a}(0,this.document);var lhcError={log:function(e,t,n,i,o){var s;(s={}).message=e||"",s.location=location&&location.href?location.href:"",s.message+="\n"+window.navigator.userAgent,s.file=t||"",s.line=n||"",s.column=o||"",s.stack=i?JSON.stringify(i):"",s.stack=s.stack.replace(/(\r\n|\n|\r)/gm,"");var r=new XMLHttpRequest;r.open("POST",WWW_DIR_JAVASCRIPT+"/audit/logjserror",!0),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send("data="+encodeURIComponent(JSON.stringify(s)))}};window.addEventListener("error",(function(e){!lhcError||-1===e.filename.indexOf("js_static")&&-1===e.filename.indexOf("compiledtemplates")&&-1===e.filename.indexOf("defaulttheme")||lhcError.log(e.message,e.filename,e.lineNumber||e.lineno,e.error.stack,e.colno)}));try{function csrfSafeMethod(e){return/^(GET|HEAD|OPTIONS|TRACE)$/.test(e)}$.ajaxSetup({crossDomain:!1,cache:!1,beforeSend:function(e,t){csrfSafeMethod(t.type)||e.setRequestHeader("X-CSRFToken",confLH.csrf_token)}}),$.postJSON=function(e,t,n){return $.post(e,t,n,"json")};var LHCCallbacks={};function lh(){this.wwwDir=WWW_DIR_JAVASCRIPT,this.addmsgurl="chat/addmsgadmin/",this.syncadmin="chat/syncadmin/",this.closechatadmin="chat/closechatadmin/",this.deletechatadmin="chat/deletechatadmin/",this.syncadmininterfaceurl="chat/syncadmininterface/",this.accepttransfer="chat/accepttransfer/",this.trasnsferuser="chat/transferuser/",this.disableremember=!1,this.operatorTyping=!1,this.forceBottomScroll=!1,this.appendSyncArgument="",this.nodeJsMode=!1,this.previous_chat_id=0,this.gmaps_loaded=!1,this.disableSync=!1,this.chat_id=null,this.hash=null,this.soundIsPlaying=!1,this.soundPlayedTimes=0,this.last_message_id=0,this.isSinchronizing=!1,this.isWidgetMode=!1,this.isEmbedMode=!1,this.syncroRequestSend=!1,this.currentMessageText="",this.setSynchronizationRequestSend=function(e){this.syncroRequestSend=e},this.chatsSynchronising=[],this.chatsSynchronisingMsg=[],this.notificationsArray=[],this.speechHandler=!1,this.underMessageAdd=!1,this.closeWindowOnChatCloseDelete=!1,this.userTimeout=!1,this.lastOnlineSyncTimeout=!1,this.setwwwDir=function(e){this.wwwDir=e},this.setDisableRemember=function(e){this.disableremember=e},this.setSynchronizationStatus=function(e){this.underMessageAdd=e},this.tabIconContent="face",this.tabIconClass="icon-user-status material-icons icon-user-online",this.audio=void 0!==window.Audio?new Audio:null,null!==this.audio&&(this.audio.autoplay="autoplay"),this.reloadTab=function(e,t,n){$("#ntab-chat-"+e).text(n),0!=$("#CSChatMessage-"+e).length&&($("#CSChatMessage-"+e).unbind("keydown",(function(){})),$("#CSChatMessage-"+e).unbind("keyup",(function(){}))),this.removeSynchroChat(e),this.removeBackgroundChat(e),this.hideNotification(e);var i=this;$.get(this.wwwDir+"chat/adminchat/"+e+"/(remember)/true",(function(t){$("#chat-id-"+e).html(t),$("#CSChatMessage-"+e).focus(),i.rememberTab(e),i.addQuateHandler(e),i.loadMainData(e),ee.emitEvent("chatTabLoaded",[e]),ee.emitEvent("chatStartTab",[e,{name:n,focus:!0}])}))},this.loadMainData=function(e){$.getJSON(this.wwwDir+"chat/loadmaindata/"+e,{},(function(t){$.each(t.items,(function(e,t){var n=$(t.selector);void 0!==t.attr&&$.each(t.attr,(function(e,t){"text"==e?n.text(t):n.attr(e,t)})),void 0!==t.action&&("hide"==t.action?n.hide():"show"==t.action?n.show():"remove"==t.action?n.remove():"event"==t.action?ee.emitEvent(t.event_name,t.event_value):"click"==t.action&&(1!==confLH.no_scroll_bottom&&n.attr("auto-scroll",1),n.click()))})),ee.emitEvent("mainChatDataLoaded",[e,t])})).fail((function(){}))},this.getSelectedText=function(){var e,t="";return window.getSelection?t=(e=window.getSelection()).toString():document.selection&&"Control"!==document.selection.type&&(t=(e=document.selection.createRange()).text),{selection:e,text:t}},this.popoverShown=!1,this.popoverShownNow=!1,this.selection=null,this.mouseContextMenu=function(e){if(3==e.which&&void 0!==$(this).attr("id")){$(".popover-copy").popover("dispose");var t=e.data.that.getSelectedText(),n=!1;!t.text.length||null!==e.data.that.selection&&e.data.that.selection.text===t.text||(n=!0,e.data.that.selection=t);var i=$(this).attr("id").replace("msg-",""),o=$(this).attr("data-op-id")==confLH.user_id,s={placement:"right",trigger:"manual",animation:!1,html:!0,container:"#chat-id-"+e.data.chat_id,template:'<div class="popover" role="tooltip"><div class="arrow"></div><div class="popover-body"></div></div>',content:function(){return'<a href="#" id="copy-popover-'+e.data.chat_id+'" ><i class="material-icons">&#xE244;</i>'+confLH.transLation.quote+"</a>"+(o?'<br/><a href="#" id="edit-popover-'+e.data.chat_id+'" ><i class="material-icons">edit</i>'+confLH.transLation.edit+"</a>":"")+'<br/><a href="#" id="ask-help-popover-'+e.data.chat_id+'" ><i class="material-icons">supervisor_account</i>'+confLH.transLation.ask_help+"</a>"+(n?'<br/><a href="#" id="copy-text-popover-'+e.data.chat_id+'" ><i class="material-icons">content_copy</i>'+confLH.transLation.copy+" (Ctrl+C)</a>":"")+(n?"":'<br/><a href="#" id="copy-all-text-popover-'+e.data.chat_id+'" ><i class="material-icons">content_copy</i>'+confLH.transLation.copy+' (Ctrl+C)</a><br/><a href="#" id="copy-group-text-popover-'+e.data.chat_id+'" ><i class="material-icons">content_copy</i>'+confLH.transLation.copy_group+"</a>")+(n?"":'<br/><a href="#" id="translate-msg-'+e.data.chat_id+'" ><i class="material-icons">language</i>'+confLH.transLation.translate+"</a>")}},r=$("#messagesBlock-"+e.data.chat_id+" > #msg-"+i+" > .msg-body");if(0==r.length)return;return ee.emitEvent("quoteActionRight",[s,e.data.chat_id,i]),r.popover(s).popover("show").addClass("popover-copy"),$("#copy-popover-"+e.data.chat_id).click((function(t){t.stopPropagation(),t.preventDefault(),$.getJSON(e.data.that.wwwDir+"chat/quotemessage/"+i,(function(t){t.msg&&e.data.that.insertTextToMessageArea(e.data.chat_id,t.msg),e.data.that.hidePopover()}))})),$("#ask-help-popover-"+e.data.chat_id).click((function(t){t.stopPropagation(),t.preventDefault(),$.getJSON(e.data.that.wwwDir+"chat/quotemessage/"+i,(function(t){$("#private-chat-tab-link-"+e.data.chat_id).attr("private-loaded")?($("#private-chat-tab-link-"+e.data.chat_id).attr("private-loaded",!0).click(),ee.emitEvent("groupChatPrefillMessage",[e.data.chat_id,t.msg])):($("#private-chat-tab-link-"+e.data.chat_id).attr("private-loaded",!0).click(),ee.emitEvent("privateChatStart",[e.data.chat_id,{default_message:t.msg}])),e.data.that.hidePopover()}))})),!n&&$("#translate-msg-"+e.data.chat_id).click((function(t){t.stopPropagation(),t.preventDefault(),lhc.methodCall("lhc.translation","translateMessageVisitor",{msg_id:i,chat_id:e.data.chat_id}),e.data.that.hidePopover()})),!n&&$("#copy-all-text-popover-"+e.data.chat_id).click((function(t){t.stopPropagation(),t.preventDefault(),$.getJSON(e.data.that.wwwDir+"chat/quotemessage/"+i,(function(t){var n=$("#CSChatMessage-"+e.data.chat_id),i=n.val();n.val(t.msg),n.select(),document.execCommand("copy"),n.val(i),e.data.that.hidePopover()}))})),!n&&$("#copy-group-text-popover-"+e.data.chat_id).click((function(t){t.stopPropagation(),t.preventDefault(),$.getJSON(e.data.that.wwwDir+"chat/quotemessage/"+i+"/(type)/group",(function(t){var n=$("#CSChatMessage-"+e.data.chat_id),i=n.val();n.val(t.msg),n.select(),document.execCommand("copy"),n.val(i),e.data.that.hidePopover()}))})),o&&$("#edit-popover-"+e.data.chat_id).click((function(t){t.stopPropagation(),t.preventDefault(),$.getJSON(e.data.that.wwwDir+"chat/editprevious/"+e.data.chat_id+"/"+i,(function(t){if("f"==t.error){var n=$("#CSChatMessage-"+e.data.chat_id);n.val(t.msg).attr("data-msgid",t.id).addClass("edit-mode"),$("#msg-"+t.id).addClass("edit-mode"),n.focus()}else alert(t.error)})),e.data.that.hidePopover()})),n&&$("#copy-text-popover-"+e.data.chat_id).click((function(t){t.stopPropagation(),t.preventDefault();var n=e.data.that.getSelectedTextPlain(),i=$("#CSChatMessage-"+e.data.chat_id),o=i.val();i.val(n),i.select(),document.execCommand("copy"),i.val(o),e.data.that.hidePopover()})),e.data.that.popoverShown=!0,e.data.that.popoverShownNow=!1,!1}},this.insertTextToMessageArea=function(e,t){var n=$("#CSChatMessage-"+e),i=n.val().replace(/^\s*\n/g,"");n.val((""!=i?i+"[quote]"+t+"[/quote]":"[quote]"+t+"[/quote]")+"\n").focus();var o=n[0];for(o.clientHeight,o.rows;o.scrollHeight>o.clientHeight&&!window.opera&&o.rows<30;)o.style.overflow="hidden",o.rows+=1;o.scrollHeight>o.clientHeight&&(o.style.overflow="auto")},this.mouseClicked=function(e){if(selected=e.data.that.getSelectedText(),$(".popover-copy").popover("dispose"),!selected.text.length||null!==e.data.that.selection&&e.data.that.selection.text===selected.text)e.data.that.selection=null;else{e.data.that.selection=selected;var t={placement:"right",trigger:"manual",animation:!1,html:!0,container:"#chat-id-"+e.data.chat_id,template:'<div class="popover" role="tooltip"><div class="arrow"></div><div class="popover-body"></div></div>',content:function(){return'<a href="#" id="copy-popover-'+e.data.chat_id+'" ><i class="material-icons">&#xE244;</i>'+confLH.transLation.quote+"</a>"}},n=void 0!==$(this).attr("id")?"#messagesBlock-"+e.data.chat_id+" > #msg-"+$(this).attr("id").replace("msg-","")+" > .msg-body":this,i=$(n);if(0==i.length)return;ee.emitEvent("quoteAction",[t,e.data.chat_id]),i.popover(t).popover("show").addClass("popover-copy"),$("#copy-popover-"+e.data.chat_id).click((function(){lhinst.quateSelection(e.data.chat_id)})),e.data.that.popoverShown=!0,e.data.that.popoverShownNow=!0}},this.addQuateHandler=function(e){this.popoverShown=!1,$("#messagesBlock-"+e+" > .message-row:not([qt])").on("mouseup",{chat_id:e,that:this},lhinst.mouseClicked).on("contextmenu",{chat_id:e,that:this},lhinst.mouseContextMenu).attr("qt",1)},this.getSelectedTextPlain=function(){var e=this.selection.text.replace(/[\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA]/g,"");return e=(e=(e=(e=e.replace(/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}(.*)/gm,"")).replace(/^[0-9]{2}:[0-9]{2}:[0-9]{2}(.*)/gm,"")).replace(/^\s*\n/gm,"")).replace(/^ /gm,"")},this.quateSelection=function(e){$(".popover-copy").popover("dispose");var t=this.getSelectedTextPlain();window.textreplace=t,this.insertTextToMessageArea(e,t),this.popoverShown=!1},this.hidePopover=function(){!0===this.popoverShownNow?this.popoverShownNow=!1:!0===this.popoverShown&&(this.popoverShown=!1,$(".popover-copy").popover("dispose"))},this.addTab=function(e,t,n,i,o,s){if(!(e.find("#chat-tab-link-"+i).length>0)){var r=confLH.new_dashboard&&confLH.hide_tabs&&null!==document.getElementById("tabs-dashboard")?" d-none":"",a='<li role="presentation" id="chat-tab-li-'+i+'" class="nav-item'+r+'"><a class="nav-link" href="#chat-id-'+i+'" id="chat-tab-link-'+i+'" aria-controls="chat-id-'+i+'" role="tab" data-toggle="tab"><i id="msg-send-status-'+i+'" class="material-icons send-status-icon icon-user-online">send</i><i id="user-chat-status-'+i+'" class="'+this.tabIconClass+'">'+this.tabIconContent+'</i><span class="ntab" id="ntab-chat-'+i+'">'+n.replace(/</g,"&lt;").replace(/>/g,"&gt;")+'</span><span onclick="return lhinst.removeDialogTab('+i+',$(\'#tabs\'),true)" class="material-icons icon-close-chat">close</span></a></li>';void 0===s||0==parseInt(s)?e.find("> ul").append(a):e.find("> ul > li:eq("+(s-1)+")").after(a),$("#chat-tab-link-"+i).click((function(){lhinst.previous_chat_id>0&&$("#unread-separator-"+lhinst.previous_chat_id).remove(),lhinst.previous_chat_id=i,setTimeout((function(){$("#CSChatMessage-"+i).focus()}),2);var e=$(this);setTimeout((function(){e.find(".msg-nm").remove();var t=!1;e.hasClass("has-pm")&&(t=!0,e.removeClass("has-pm")),1==t&&$("#messagesBlock-"+i).prop("scrollTop",$("#messagesBlock-"+i).prop("scrollHeight"))}),500),ee.emitEvent("chatTabClicked",[i,e])}));var l=window.location.hash.replace("#/","#"),c=this;$.get(t,(function(t){""!=t?(void 0===o||!0===o||l=="#chat-id-"+i?(e.find("> ul > li > a.active").removeClass("active"),e.find("> ul > #chat-tab-li-"+i+" > a").addClass("active"),e.find("> div.tab-content > div.active").removeClass("active"),e.find("> div.tab-content").append('<div role="tabpanel" class="tab-pane active" id="chat-id-'+i+'"></div>'),window.location.hash="#/chat-id-"+i):e.find("> div.tab-content").append('<div role="tabpanel" class="tab-pane" id="chat-id-'+i+'"></div>'),$("#chat-id-"+i).html(t),$("#CSChatMessage-"+i).focus(),0==c.disableremember&&c.rememberTab(i),c.addQuateHandler(i),c.loadMainData(i),ee.emitEvent("chatTabLoaded",[i])):c.removeDialogTab(i,e,!0)}))}},this.rememberTab=function(e){if(localStorage)try{e=parseInt(e);var t=localStorage.getItem("achat_id"),n=new Array;if(null!==t)n=t.split(",").map(Number);-1===n.indexOf(e)&&n.push(e),localStorage.setItem("achat_id",n.join(","))}catch(e){console.log(e)}},this.forgetChat=function(e,t){if(localStorage)try{e=parseInt(e);var n=localStorage.getItem(t),i=new Array;null!==n&&(i=n.split(",").map(Number)),-1!==i.indexOf(e)&&i.splice(i.indexOf(e),1),localStorage.setItem(t,i.join(","))}catch(e){console.log(e)}},this.attachTabNavigator=function(){$("#tabs > ul.nav > li > a").click((function(){$(this).find(".msg-nm").remove(),$(this).removeClass("has-pm")}))},this.holdAction=function(e,t){if(!$("#CSChatMessage-"+e).is("[readonly]")){var n=this;$.postJSON(this.wwwDir+"chat/holdaction/"+e,(function(i){0==i.error?(1==i.hold?t.addClass("btn-outline-info"):t.removeClass("btn-outline-info"),""!=i.msg&&$("#messagesBlock-"+e).append(i.msg).scrollTop($("#messagesBlock-"+e).prop("scrollHeight")),n.syncadmincall()):alert(i.msg)}))}},this.copyContent=function(e){var t,n=document.createElement("textarea");n.value=e.attr("data-copy"),n.style.top="0",n.style.left="0",n.style.position="fixed",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}catch(e){alert("Oops, unable to copy")}document.body.removeChild(n),e.tooltip({trigger:"click",placement:"top"}),t=e.attr("data-success"),e.tooltip("hide").attr("data-original-title",t).tooltip("show"),setTimeout((function(){e.tooltip("hide")}),1e3)},this.copyMessages=function(e){var t;return $("#chat-copy-messages").select(),document.execCommand("copy"),e.tooltip({trigger:"click",placement:"top"}),t=e.attr("data-success"),e.tooltip("hide").attr("data-original-title",t).tooltip("show"),setTimeout((function(){e.tooltip("hide")}),3e3),!1},this.removeDialogTabGroup=function(e,t){ee.emitEvent("unloadGroupChat",[e]);this.smartTabFocus(t,e)},this.addGroupTab=function(e,t,n,i){if(e.find("#chat-tab-link-"+n).length>0)return e.find("> ul > li > a.active").removeClass("active"),e.find("> ul > li#chat-tab-li-"+n+" > a").addClass("active"),e.find("> div.tab-content > div.active").removeClass("active"),e.find("> div.tab-content > #chat-id-"+n).addClass("active"),void ee.emitEvent("groupChatTabClicked",[n]);var o='<li role="presentation" id="chat-tab-li-'+n+'" class="nav-item"><a class="nav-link" href="#chat-id-'+n+'" id="chat-tab-link-'+n+'" aria-controls="chat-id-'+n+'" role="tab" data-toggle="tab"><i id="msg-send-status-'+n+'" class="material-icons send-status-icon icon-user-online">send</i><i class="whatshot blink-ani d-none text-warning material-icons">whatshot</i><i id="user-chat-status-'+n+'" class="'+this.tabIconClass+'">group</i><span class="ntab" id="ntab-chat-'+n+'">'+t.replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</span><span onclick=\"return lhinst.removeDialogTabGroup('"+n+"',$('#tabs'),true)\" class=\"material-icons icon-close-chat\">close</span></a></li>";e.find("> ul").append(o);window.location.hash.replace("#/","#");!0!==i?(e.find("> ul > li > a.active").removeClass("active"),e.find("> ul > #chat-tab-li-"+n+" > a").addClass("active"),e.find("> div.tab-content > div.active").removeClass("active"),e.find("> div.tab-content").append('<div role="tabpanel" class="tab-pane active" id="chat-id-'+n+'"></div>')):e.find("> div.tab-content").append('<div role="tabpanel" class="tab-pane" id="chat-id-'+n+'"></div>'),ee.emitEvent("groupChatTabLoaded",[n]),$("#chat-tab-link-"+n).click((function(){ee.emitEvent("groupChatTabClicked",[n.replace("gc","")])}))},this.startGroupChat=function(e,t,n,i){this.addGroupTab(t,n,"gc"+e,i)},this.hideShowAction=function(e){var t=$("#messagesBlock-"+e.chat_id),n=t.prop("scrollTop")+t.height()+30>t.prop("scrollHeight"),i=$("#message-more-"+e.id);i.hasClass("hide")?(i.removeClass("hide"),0==e.hide_show?$("#hide-show-action-"+e.id).remove():$("#hide-show-action-"+e.id).text(e.hide_text)):(i.addClass("hide"),1==e.hide_show&&$("#hide-show-action-"+e.id).text(e.show_text)),n&&t.scrollTop(t.prop("scrollHeight"))},this.buttonAction=function(e,t){var n=e.closest(".message-row");$.getJSON(this.wwwDir+"chat/abstractclick/"+n.attr("id").replace("msg-","")+"/"+t,(function(e){if(e.error)alert(e.error);else if(e.replace_id&&e.html){var t=$("#messagesBlock-"+e.chat_id),n=t.prop("scrollTop")+t.height()+30>t.prop("scrollHeight");$(e.replace_id).replaceWith(e.html),lhinst.addQuateHandler(e.chat_id),n&&t.scrollTop(t.prop("scrollHeight"))}else e.modal&&lhc.revealModal({url:WWW_DIR_JAVASCRIPT+e.modal})}))},this.startChat=function(e,t,n,i,o){if(this.removeBackgroundChat(e),this.hideNotification(e),$("#sub-tabs").length>0&&$("#sub-tabs a[href='#sub-tabs-open']").tab("show"),0==this.chatUnderSynchronization(e)){var s=void 0===i||i,r=0==this.disableremember?"/(remember)/true":"";this.addTab(t,this.wwwDir+"chat/adminchat/"+e+r,n,e,s,o);var a=this;setTimeout((function(){a.syncadmininterfacestatic()}),1e3)}else t.find("> ul > li > a.active").removeClass("active"),t.find("> ul > li#chat-tab-li-"+e+" > a").addClass("active"),t.find("> div.tab-content > div.active").removeClass("active"),t.find("> div.tab-content > #chat-id-"+e).addClass("active"),window.location.hash="#/chat-id-"+e;ee.emitEvent("chatStartTab",[e,{name:n,focus:void 0===i||i,position:o}])},this.backgroundChats=[],this.startChatBackground=function(e,t,n,i){if(0==this.chatUnderSynchronization(e)){this.backgroundChats.push(parseInt(e));var o=0==this.disableremember?"/(remember)/true":"";return i||(i="background"),this.addTab(t,this.wwwDir+"chat/adminchat/"+e+o+"/(arg)/"+i,n,e,!1),ee.emitEvent("chatStartBackground",[e,{name:n}]),!0}return!1},this.protectCSFR=function(){$("a.csfr-required").click((function(){var e=$(this);e.attr("data-secured")||(e.attr("href",e.attr("href")+"/(csfr)/"+confLH.csrf_token),e.attr("data-secured",1))}))},this.addSynchroChat=function(e,t){this.chatsSynchronising.push(e),this.chatsSynchronisingMsg.push(e+","+t),LHCCallbacks.addSynchroChat&&LHCCallbacks.addSynchroChat(e,t)},this.removeSynchroChat=function(e){for(var t=0;t<this.chatsSynchronising.length;)this.chatsSynchronising[t]==e?(this.chatsSynchronising.splice(t,1),this.chatsSynchronisingMsg.splice(t,1)):t++;this.forgetChat(e,"achat_id"),ee.emitEvent("removeSynchroChat",[e]),LHCCallbacks.removeSynchroChat&&LHCCallbacks.removeSynchroChat(e)},this.is_typing=!1,this.typing_timeout=null,this.operatorTypingCallback=function(e){var t=this.wwwDir,n=this;0==n.is_typing?(n.is_typing=!0,clearTimeout(n.typing_timeout),1==n.nodeJsMode?(n.typing_timeout=setTimeout((function(){n.typingStoppedOperator(e)}),3e3),ee.emitEvent("operatorTyping",[{chat_id:e,status:!0}])):$.getJSON(t+"chat/operatortyping/"+e+"/true",{},(function(t){n.typing_timeout=setTimeout((function(){n.typingStoppedOperator(e)}),3e3),LHCCallbacks.initTypingMonitoringAdmin&&LHCCallbacks.initTypingMonitoringAdmin(e,!0)})).fail((function(){n.typing_timeout=setTimeout((function(){n.typingStoppedOperator(e)}),3e3)}))):(clearTimeout(n.typing_timeout),n.typing_timeout=setTimeout((function(){n.typingStoppedOperator(e)}),3e3))},this.initTypingMonitoringAdmin=function(e){var t=this;jQuery("#CSChatMessage-"+e).bind("keyup",(function(n){t.operatorTypingCallback(e)}))},this.remarksTimeout=null,this.saveRemarks=function(e){clearTimeout(this.remarksTimeout),$("#remarks-status-"+e).addClass("text-warning"),$("#main-user-info-remarks-"+e+" .alert").remove();var t=this;this.remarksTimeout=setTimeout((function(){$.postJSON(t.wwwDir+"chat/saveremarks/"+e,{data:$("#ChatRemarks-"+e).val()},(function(t){"false"==t.error?$("#remarks-status-"+e).removeClass("text-warning"):$("#main-user-info-remarks-"+e).prepend(t.result)}))}),500)},this.saveNotes=function(e){clearTimeout(this.remarksTimeout),$("#remarks-status-online-"+e).addClass("text-warning");var t=this;this.remarksTimeout=setTimeout((function(){$.postJSON(t.wwwDir+"chat/saveonlinenotes/"+e,{data:$("#OnlineRemarks-"+e).val()},(function(t){$("#remarks-status-online-"+e).removeClass("text-warning")}))}),500)},this.surveyShowed=!1,this.typingStoppedOperator=function(e){var t=this;1==t.is_typing&&(1==lhinst.nodeJsMode?(t.is_typing=!1,ee.emitEvent("operatorTyping",[{chat_id:e,status:!1}])):$.getJSON(this.wwwDir+"chat/operatortyping/"+e+"/false",{},(function(n){t.is_typing=!1,LHCCallbacks.initTypingMonitoringAdmin&&LHCCallbacks.initTypingMonitoringAdmin(e,!1)})).fail((function(){t.is_typing=!1})))},this.refreshFootPrint=function(e){e.addClass("disabled"),$.get(this.wwwDir+"chat/chatfootprint/"+e.attr("rel"),{},(function(t){$("#footprint-"+e.attr("rel")).html(t),e.removeClass("disabled")}))},this.makeAbstractRequest=function(e,t){return $.get(t.attr("href"),(function(t){lhinst.syncadmininterfacestatic(),LHCCallbacks.userRedirectedSurvey&&LHCCallbacks.userRedirectedSurvey(e)})),!1},this.refreshOnlineUserInfo=function(e){e.addClass("disabled"),$.get(this.wwwDir+"chat/refreshonlineinfo/"+e.attr("rel"),{},(function(t){$("#online-user-info-"+e.attr("rel")).html(t),e.removeClass("disabled")}))},this.processCollapse=function(e){if("chevron_right"==$("#chat-main-column-"+e+" .collapse-right").text()){$("#chat-right-column-"+e).hide(),$("#chat-main-column-"+e).removeClass("col-sm-7").addClass("col-sm-12"),$("#chat-main-column-"+e+" .collapse-right").text("chevron_left");try{localStorage&&localStorage.setItem("lhc_rch",1)}catch(e){}}else{$("#chat-right-column-"+e).show(),$("#chat-main-column-"+e).removeClass("col-sm-12").addClass("col-sm-7"),$("#chat-main-column-"+e+" .collapse-right").text("chevron_right");try{localStorage&&localStorage.removeItem("lhc_rch")}catch(e){}}},this.chatUnderSynchronization=function(e){for(var t=0;t<this.chatsSynchronising.length;){if(this.chatsSynchronising[t]==e)return!0;t++}return!1},this.getChatIndex=function(e){for(var t=0;t<this.chatsSynchronising.length;){if(this.chatsSynchronising[t]==e)return t;t++}return!1},this.closeActiveChatDialog=function(e,t,n){if(ee.emitEvent("angularSyncDisabled",[!0]),$.postJSON(this.wwwDir+this.closechatadmin+e,(function(e){ee.emitEvent("angularSyncDisabled",[!1]),0==e.error?ee.emitEvent("angularLoadChatList"):alert(e.result)})).fail((function(e,t,n){ee.emitEvent("angularSyncDisabled",[!1]),console.dir(e)})),0!=$("#CSChatMessage-"+e).length&&($("#CSChatMessage-"+e).unbind("keydown",(function(){})),$("#CSChatMessage-"+e).unbind("keyup",(function(){}))),window.postMessage&&window.opener&&window.opener.postMessage("lhc_ch:chatclosed:"+e,"*"),this.removeSynchroChat(e),1==n){var i=this.smartTabFocus(t,e);setTimeout((function(){window.location.hash=i}),500),1==this.closeWindowOnChatCloseDelete&&window.close()}LHCCallbacks.chatClosedCallback&&LHCCallbacks.chatClosedCallback(e)},this.smartTabFocus=function(e,t,n){var i=e.find("> ul > #chat-tab-li-"+t).index();n||(n={});var o=1==n.up||void 0===n.up?1:-1;n.keep?e.find("> ul > li > a.active").removeClass("active"):(e.find("> ul > #chat-tab-li-"+t).remove(),e.find("#chat-id-"+t).remove());var s=e.find("> ul > li:eq("+(i-o)+")");if(void 0!==s.attr("id"))var r=s.find("> a");else if(linkTabRight=e.find("> ul > li:eq("+i+")"),linkTabRight.length>0)r=linkTabRight.find("> a");else r=s.find("> a");if(e.find("> ul > li > a.active").length)console.log("bbb");else{for(var a=!0;a;)if(r.hasClass("non-focus")){a=!0;var l=r.parent().prev();l.find(" > a").length&&(r=l.find(" > a"))}else a=!1;if(r.tab("show"),void 0!==r.attr("id")){var c=r.attr("href").replace("#chat-id-","");this.removeBackgroundChat(c),this.hideNotification(c),n.keep||ee.emitEvent("chatTabFocused",[c])}}return void 0!==r.attr("href")?r.attr("href").replace("#","#/"):"#"},this.startChatCloseTabNewWindow=function(e,t,n){return window.open(this.wwwDir+"chat/single/"+e,"chatwindow-chat-id-"+e,"menubar=1,resizable=1,width=800,height=650"),this.smartTabFocus(t,e),1==this.closeWindowOnChatCloseDelete&&window.close(),this.removeSynchroChat(e),this.syncadmininterfacestatic(),!1},this.removeDialogTab=function(e,t,n){if(0!=$("#CSChatMessage-"+e).length&&($("#CSChatMessage-"+e).unbind("keydown",(function(){})),$("#CSChatMessage-"+e).unbind("keyup",(function(){}))),this.removeSynchroChat(e),1==n){var i=this.smartTabFocus(t,e);setTimeout((function(){window.location.hash=i}),500),1==this.closeWindowOnChatCloseDelete&&window.close()}this.syncadmininterfacestatic()},this.removeActiveDialogTag=function(e){1==this.closeWindowOnChatCloseDelete&&window.close()},this.deleteChat=function(e,t,n){if(confirm(confLH.transLation.delete_confirm)){var i=this;$.postJSON(this.wwwDir+this.deletechatadmin+e,(function(o){if(1==o.error)alert(o.result);else{if(0!=$("#CSChatMessage-"+e).length&&($("#CSChatMessage-"+e).unbind("keydown",(function(){})),$("#CSChatMessage-"+e).unbind("keyup",(function(){}))),i.removeSynchroChat(e),1==n){var s=i.smartTabFocus(t,e);setTimeout((function(){window.location.hash=s}),500),1==i.closeWindowOnChatCloseDelete&&window.close()}LHCCallbacks.chatDeletedCallback&&LHCCallbacks.chatDeletedCallback(e),i.syncadmininterfacestatic()}})).fail((function(e,t,n){console.dir(e),alert("getJSON request failed! "+t+":"+n+":"+e.responseText)}))}},this.rejectPendingChat=function(e,t){var n=this;$.postJSON(this.wwwDir+this.deletechatadmin+e,{},(function(e){n.syncadmininterfacestatic()})).fail((function(e,t,n){console.dir(e),alert("getJSON request failed! "+t+":"+n+":"+e.responseText)}))},this.startChatNewWindowArchive=function(e,t,n){var i=window.open(this.wwwDir+"chatarchive/viewarchivedchat/"+e+"/"+t+"/(mode)/popup","chatwindow-chat-id-"+t,"menubar=1,resizable=1,width=800,height=650");null!==i&&(i.focus(),ee.emitEvent("chatStartOpenWindowArchive",[e,t]))},this.speechToText=function(e){0==this.speechHandler&&(this.speechHandler=new LHCSpeechToText),this.speechHandler.listen({chat_id:e})},this.startChatTransfer=function(e,t,n,i,o){var s=this;$.getJSON(this.wwwDir+this.accepttransfer+i,{},(function(i){0==$("#chat-tab-link-"+e).length?o?(s.removeSynchroChat(e),s.startChatBackground(e,t,n)):s.startChat(e,t,n):s.updateVoteStatus(e),LHCCallbacks.operatorAcceptedTransfer&&LHCCallbacks.operatorAcceptedTransfer(e)})).fail((function(){s.startChat(e,t,n)}))},this.startChatNewWindowTransfer=function(e,t,n){return $.getJSON(this.wwwDir+this.accepttransfer+n,{},(function(t){LHCCallbacks.operatorAcceptedTransfer&&LHCCallbacks.operatorAcceptedTransfer(e)})),this.startChatNewWindow(e,t)},this.startChatNewWindowTransferByTransfer=function(e,t,n){var i=this;return $.ajax({type:"GET",url:this.wwwDir+this.accepttransfer+e+"/(mode)/chat",cache:!1,dataType:"json"}).done((function(e){$("#tabs").length>0?void 0!==n&&!0===n?i.startChatBackground(e.chat_id,$("#tabs"),t):(window.focus(),i.startChat(e.chat_id,$("#tabs"),t)):i.startChatNewWindow(e.chat_id,""),LHCCallbacks.operatorAcceptedTransfer&&LHCCallbacks.operatorAcceptedTransfer(e.chat_id)})),this.syncadmininterfacestatic(),!1},this.switchLang=function(e,t){var n='<input type="hidden" value="'+t+'" name="switchLang" />';return e.append(n),e.submit(),!1},this.sendLinkToMail=function(e,t){var n=window.parent.$("#MailMessage").val();window.parent.$("#MailMessage").val((""!=n?n+"\n":n)+e),$("#embed-button-"+t).addClass("btn-success")},this.sendLinkToEditor=function(e,t,n){var i=window.parent.$("#CSChatMessage-"+e).val();window.parent.$("#CSChatMessage-"+e).val((""!=i?i+"\n":i)+t),$("#embed-button-"+n).addClass("btn-success")},this.sendLinkToGeneralEditor=function(e,t){var n=window.parent.$(".embed-into"),i=n.val();n.val((""!=i?i+"\n":i)+e),$("#embed-button-"+t).addClass("btn-success")},this.hideTransferModal=function(e){var t=this;setTimeout((function(){$("#myModal").modal("hide"),$("#tabs").length>0&&t.removeDialogTab(e,$("#tabs"),!0)}),1e3)},this.transferChat=function(e){var t=this,n=$("[name=TransferTo"+e+"]:checked").val();$.postJSON(this.wwwDir+this.trasnsferuser+e+"/"+n,{type:"user"},(function(n){"false"==n.error&&($("#transfer-block-"+n.chat_id).html(n.result),t.hideTransferModal(e))}))},this.changeOwner=function(e){var t=this,n=$("#id_new_user_id").val();$.postJSON(this.wwwDir+this.trasnsferuser+e+"/"+n,{type:"change_owner"},(function(n){"false"==n.error&&($("#transfer-block-"+n.chat_id).html(n.result),t.hideTransferModal(e))}))},this.changeDep=function(e){var t=this,n=$("#id_new_dep_id").val();$.postJSON(this.wwwDir+this.trasnsferuser+e+"/"+n,{type:"change_dep"},(function(n){"false"==n.error&&($("#transfer-block-"+n.chat_id).html(n.result),$("#myModal").modal("hide"),t.updateVoteStatus(e))}))},this.chooseSurvey=function(e){var t=$("[name=SurveyItem"+e+"]:checked").val();$.postJSON(this.wwwDir+"survey/choosesurvey/"+e+"/"+t,(function(e){"false"==e.error&&$("#survey-block-"+e.chat_id).html(e.result)}))},this.redirectContact=function(e,t){(void 0===t||confirm(t))&&$.postJSON(this.wwwDir+"chat/redirectcontact/"+e,(function(t){lhinst.syncadmininterfacestatic(),LHCCallbacks.userRedirectedContact&&LHCCallbacks.userRedirectedContact(e)}))},this.redirectToURL=function(e,t){var n=prompt(t,"");null!=n&&lhinst.addRemoteCommand(e,"lhc_chat_redirect:"+n.replace(new RegExp(":","g"),"__SPLIT__"))},this.redirectToURLOnline=function(e,t){var n=prompt(t,"");null!=n&&(lhinst.addRemoteOnlineCommand(e,"lhc_chat_redirect:"+n.replace(new RegExp(":","g"),"__SPLIT__")),lhinst.addExecutionCommand(e,"lhc_cobrowse_multi_command__lhc_chat_redirect:"+n.replace(new RegExp(":","g"),"__SPLIT__")))},this.transferChatDep=function(e){var t=this,n=$("[name=DepartamentID"+e+"]:checked").val();$.postJSON(this.wwwDir+this.trasnsferuser+e+"/"+n,{type:"dep"},(function(n){"false"==n.error&&($("#transfer-block-"+n.chat_id).html(n.result),t.hideTransferModal(e))}))},this.chatTabsOpen=function(){return window.open(this.wwwDir+"chat/chattabs/","chatwindows","menubar=1,resizable=1,width=800,height=650"),!1},this.explicitClose=!1,this.sendCannedMessage=function(e,t){if($("#id_CannedMessage-"+e).val()>0){t.addClass("secondary");var n=1e3*parseInt($("#id_CannedMessage-"+e).find(":selected").attr("data-delay")),i=this.wwwDir,o=this;if(0==o.is_typing?(o.is_typing=!0,clearTimeout(o.typing_timeout),LHCCallbacks.initTypingMonitoringAdminInform&&LHCCallbacks.initTypingMonitoringAdminInform({chat_id:e,status:!0}),$.getJSON(i+"chat/operatortyping/"+e+"/true",{},(function(i){LHCCallbacks.initTypingMonitoringAdmin&&LHCCallbacks.initTypingMonitoringAdmin(e,!0),o.typing_timeout=setTimeout((function(){o.typingStoppedOperator(e),t.removeClass("secondary")}),n>3e3?n:3e3)})).fail((function(){o.typing_timeout=setTimeout((function(){o.typingStoppedOperator(e)}),3e3)}))):(clearTimeout(o.typing_timeout),o.typing_timeout=setTimeout((function(){o.typingStoppedOperator(e)}),3e3),t.removeClass("secondary")),n>0)setTimeout((function(){var t={msg:$("#id_CannedMessage-"+e).find(":selected").attr("data-msg")};$("#CSChatMessage-"+e).val(""),$.postJSON(i+o.addmsgurl+e,t,(function(t){return LHCCallbacks.addmsgadmin&&LHCCallbacks.addmsgadmin(e),ee.emitEvent("chatAddMsgAdmin",[e]),lhinst.syncadmincall(),!0}))}),n);else{var s={msg:$("#id_CannedMessage-"+e).find(":selected").attr("data-msg")};$("#CSChatMessage-"+e).val(""),$.postJSON(this.wwwDir+this.addmsgurl+e,s,(function(t){return LHCCallbacks.addmsgadmin&&LHCCallbacks.addmsgadmin(e),ee.emitEvent("chatAddMsgAdmin",[e]),lhinst.syncadmincall(),!0}))}}return!1},this.theme=null,this.chatStatus=null,this.survey=null,this.isBlinking=!1,this.startBlinking=function(){if(0==this.isBlinking){var e=this;(n=document.title,i="!!! "+document.title,o=function(){document.title=document.title==i?" ":i},s=function(){clearInterval(t),document.title=n,window.onmousemove=null,t=null,e.isBlinking=!1},function(){t||(t=setInterval(o,1e3),window.onmousemove=s)})(),this.isBlinking=!0}var t,n,i,o,s},this.playNewMessageSound=function(){Modernizr.audio&&null!==this.audio&&(this.audio.src=Modernizr.audio.ogg?WWW_DIR_JAVASCRIPT_FILES+"/new_message.ogg?v=3":Modernizr.audio.mp3?WWW_DIR_JAVASCRIPT_FILES+"/new_message.mp3?v=3":WWW_DIR_JAVASCRIPT_FILES+"/new_message.wav?v=3",this.audio.load()),$("textarea[name=ChatMessage]").is(":focus")||this.startBlinking()},this.playInvitationSound=function(){Modernizr.audio&&null!==this.audio&&(this.audio.src=Modernizr.audio.ogg?WWW_DIR_JAVASCRIPT_FILES+"/invitation.ogg":Modernizr.audio.mp3?WWW_DIR_JAVASCRIPT_FILES+"/invitation.mp3":WWW_DIR_JAVASCRIPT_FILES+"/invitation.wav",this.audio.load())},this.playPreloadSound=function(){Modernizr.audio&&null!==this.audio&&(this.audio.src=Modernizr.audio.ogg?WWW_DIR_JAVASCRIPT_FILES+"/silence.ogg":Modernizr.audio.mp3?WWW_DIR_JAVASCRIPT_FILES+"/silence.mp3":WWW_DIR_JAVASCRIPT_FILES+"/silence.wav",this.audio.load())},this.scrollLoading=!1,this.scrollPending=!1,this.loadPreviousMessages=function(e,t){if(0==this.scrollLoading){this.scrollLoading=!0;var n=this;$.getJSON(this.wwwDir+"chat/loadpreviousmessages/"+e.attr("chat-id")+"/"+e.attr("message-id")+"/(initial)/"+e.attr("data-initial")+"/(original)/"+e.attr("chat-original-id"),(function(i){if(0==i.error){e.attr("data-initial",0);var o=$("#messagesBlock-"+e.attr("chat-original-id"));if(o.prepend(i.result),1==e.attr("auto-scroll"))e.attr("auto-scroll",0),o.scrollTop(o.prop("scrollHeight"));else if(!t){var s=document.getElementById("scroll-to-chat-"+e.attr("chat-id")+"-"+e.attr("message-id"));s&&(o[0].scrollTop=s.offsetTop)}1==i.has_messages?(e.attr("message-id",i.message_id),e.attr("chat-id",i.chat_id),n.scrollLoading=!1,1==n.scrollPending&&(n.scrollPending=!1,n.loadPreviousMessages(e,t))):(e.remove(),n.scrollLoading=!1,n.scrollPending=!1)}else n.scrollLoading=!1,n.scrollPending=!1}))}else this.scrollPending=!0},this.hidenicknamesstatus=null,this.onScrollAdmin=function(e){var t=$("#messagesBlock-"+e),n=t.prop("scrollHeight");Math.abs(n-t.prop("scrollTop")-t.prop("clientHeight"))>20?$("#scroll-button-admin-"+e).removeClass("d-none"):$("#scroll-button-admin-"+e).addClass("d-none").find("> button").text($("#scroll-button-admin-"+e+" > button").attr("data-default"))},this.scrollToTheBottomMessage=function(e){var t=$("#unread-separator-"+e);if(t.length>0)t[0].scrollIntoView(),setTimeout((function(){t.remove()}),1e3);else{var n=$("#messagesBlock-"+e);n.scrollTop(n.prop("scrollHeight"))}},this.syncadmincall=function(){this.chatsSynchronising.length>0?0==this.underMessageAdd&&0==this.syncroRequestSend?(this.syncroRequestSend=!0,$.postJSON(this.wwwDir+this.syncadmin,{"chats[]":this.chatsSynchronisingMsg},(function(e){void 0!==e.error_url&&document.location.replace(e.error_url);try{if("false"==e.error){if("false"!=e.result){var t=!1;$.each(e.result,(function(n,i){var o=$("#messagesBlock-"+i.chat_id),s=o.prop("scrollHeight"),r=Math.abs(s-o.prop("scrollTop")-o.prop("clientHeight"));o.find(".pending-storage").slice(0,i.mn).remove();var a=$("#chat-tab-link-"+i.chat_id),l=!focused;if(!a.hasClass("active"))if(a.find("span.msg-nm").length>0){var c=parseInt(a.find("span.msg-nm").attr("rel"))+i.mn;a.find("span.msg-nm").html(" ("+c+")").attr("rel",c)}else l=!0,a.append('<span rel="'+i.mn+'" class="msg-nm"> ('+i.mn+")</span>"),a.addClass("has-pm");r>20&&(l=!0,$("#scroll-button-admin-"+i.chat_id+" > button").text($("#scroll-button-admin-"+i.chat_id+" > button").attr("data-new"))),1==l&&null===document.getElementById("unread-separator-"+i.chat_id)&&(i.content=i.content.replace('<span class="usr-tit','<div id="unread-separator-'+i.chat_id+'" class="new-msg-holder border-bottom border-danger text-center"><span class="new-msg bg-danger text-white d-inline-block fs12 rounded-top">'+confLH.transLation.new+'</span></div><span class="usr-tit')),o.append(i.content),o.find(".pending-storage").appendTo(o),lhinst.addQuateHandler(i.chat_id),r<20&&o.scrollTop(s),lhinst.updateChatLastMessageID(i.chat_id,i.message_id),0!=t||"false"!=e.uw||void 0!==i.ignore&&!1!==typeof i.ignore||(t=!0),1!=confLH.new_message_browser_notification||"false"!=e.uw||void 0!==i.ignore&&!1!==typeof i.ignore||lhinst.showNewMessageNotification(i.chat_id,i.msg,i.nck),i.msfrom>0&&$("#msg-"+i.msfrom).attr("data-op-id")!=i.msop&&$("#msg-"+i.msfrom).next().addClass("operator-changes"),ee.emitEvent("eventSyncAdmin",[i,n])})),1==confLH.new_message_sound_admin_enabled&&"false"==e.uw&&1==t&&lhinst.playNewMessageSound()}if("false"!=e.result_status){var n=$("#group-chats-status").hasClass("chat-active");$.each(e.result_status,(function(e,t){var i=$("#user-is-typing-"+t.chat_id);"true"==t.tp?(0==lhinst.nodeJsMode&&i.html(t.tx),"hidden"==i.css("visibility")&&i.css("visibility","visible")):0==lhinst.nodeJsMode&&i.css("visibility","hidden"),$("#last-msg-chat-"+t.chat_id).text(t.lmsg);var o=$("#user-chat-status-"+t.chat_id),s=o.hasClass("icon-user-online");$("#chat-duration-"+t.chat_id).text(t.cdur),o.removeClass("icon-user-online icon-user-away icon-user-pageview"),$("#msg-send-status-"+t.chat_id).removeClass("icon-user-online icon-user-offline"),0==t.us?o.addClass("icon-user-online"):2==t.us?o.addClass("icon-user-away"):3==t.us&&o.addClass("icon-user-pageview"),1==n?1==s&&0!=t.us||lhinst.hidenicknamesstatus!=n&&0!=t.us?$("#ntab-chat-"+t.chat_id).hide():(0==s&&0==t.us||lhinst.hidenicknamesstatus!=n&&0==t.us)&&$("#ntab-chat-"+t.chat_id).show():lhinst.hidenicknamesstatus!=n&&$("#ntab-chat-"+t.chat_id).show();var r=$("#chat-id-"+t.chat_id+"-mds");if(r.attr("data-chat-status")==t.cs&&r.attr("data-chat-user")==t.co||lhinst.updateVoteStatus(t.chat_id),1==t.um?(r.addClass("chat-unread"),$("#msg-send-status-"+t.chat_id).addClass("icon-user-offline")):($("#msg-send-status-"+t.chat_id).addClass("icon-user-online"),r.removeClass("chat-unread")),!1!==t.lp?r.attr("title",t.lp+" s."):r.attr("title",""),void 0!==t.oad&&1==t.oad){$("#lhc_sync_operation").remove();var a=document.getElementsByTagName("head")[0],l=document.createElement("script");l.setAttribute("id","lhc_sync_operation"),l.setAttribute("type","text/javascript"),l.setAttribute("src",WWW_DIR_JAVASCRIPT+"chat/loadoperatorjs/(type)/chat/(id)/"+t.chat_id),a.appendChild(l)}}))}e.cg&&$.each(e.cg,(function(e,t){return lhinst.removeDialogTab(t,$("#tabs"),!0)})),lhinst.hidenicknamesstatus=n,clearTimeout(lhinst.userTimeout),lhinst.userTimeout=setTimeout(chatsyncadmin,confLH.chat_message_sinterval),ee.emitEvent("chatAdminSync",[e])}}catch(e){clearTimeout(lhinst.userTimeout),lhinst.userTimeout=setTimeout(chatsyncadmin,confLH.chat_message_sinterval)}lhinst.setSynchronizationRequestSend(!1),LHCCallbacks.syncadmincall&&LHCCallbacks.syncadmincall(lhinst,e)})).fail((function(){clearTimeout(lhinst.userTimeout),lhinst.userTimeout=setTimeout(chatsyncadmin,confLH.chat_message_sinterval),lhinst.setSynchronizationRequestSend(!1)}))):(clearTimeout(lhinst.userTimeout),lhinst.userTimeout=setTimeout(chatsyncadmin,confLH.chat_message_sinterval)):this.isSinchronizing=!1},this.updateVoteStatus=function(e){$.getJSON(this.wwwDir+"chat/updatechatstatus/"+e,{},(function(t){$("#main-user-info-tab-"+e).html(t.result),$("#messagesBlock-"+e+" span.vis-tit").each((function(e){var n=$(this).children();$(this).text(" "+t.nick).prepend(n)})),$("#ntab-chat-"+e).text(t.nick),ee.emitEvent("chatTabInfoReload",[e])}))},this.updateChatLastMessageID=function(e,t){this.chatsSynchronisingMsg[this.getChatIndex(e)]=e+","+t},this.requestNotificationPermission=function(){window.webkitNotifications?window.webkitNotifications.requestPermission():window.Notification?Notification.requestPermission((function(e){})):alert("Notification API in your browser is not supported.")},this.playNewChatAudio=function(e){if(clearTimeout(this.soundIsPlaying),this.soundPlayedTimes++,Modernizr.audio&&null!==this.audio&&(this.audio.src=Modernizr.audio.ogg?WWW_DIR_JAVASCRIPT_FILES+"/"+e+".ogg?v=4":Modernizr.audio.mp3?WWW_DIR_JAVASCRIPT_FILES+"/"+e+".mp3?v=4":WWW_DIR_JAVASCRIPT_FILES+"/"+e+".wav?v=4",this.audio.load(),confLH.repeat_sound>this.soundPlayedTimes)){var t=this;this.soundIsPlaying=setTimeout((function(){t.playNewChatAudio(e)}),1e3*confLH.repeat_sound_delay)}},this.focusChanged=function(e){if(1==confLH.new_message_browser_notification&&1==e&&(window.webkitNotifications||window.Notification)){var t=this;$.each(this.chatsSynchronising,(function(e,n){void 0!==t.notificationsArrayMessages[n]&&(window.webkitNotifications?t.notificationsArrayMessages[n].cancel():t.notificationsArrayMessages[n].close(),delete t.notificationsArrayMessages[n])}))}parseInt(this.chat_id)>0&&this.scheduleSync()},this.notificationsArrayMessages=[],this.showNewMessageNotification=function(e,t,n){try{if(window.Notification&&0==focused&&"granted"==window.Notification.permission){void 0!==this.notificationsArrayMessages[e]&&(this.notificationsArrayMessages[e].close(),delete this.notificationsArrayMessages[e]);var i=new Notification(n,{icon:WWW_DIR_JAVASCRIPT_FILES_NOTIFICATION+"/notification.png",body:t}),o=this;i.onclick=function(){window.focus(),i.close(),delete o.notificationsArrayMessages[e]},i.onclose=function(){void 0!==o.notificationsArrayMessages[e]&&delete o.notificationsArrayMessages[e]},this.notificationsArrayMessages[e]=i,this.scheduleNewMessageClose(i,e)}}catch(e){console.log(e)}},this.scheduleNewMessageClose=function(e,t){var n=this;setTimeout((function(){window.webkitNotifications?e.cancel():e.close(),void 0!==n.notificationsArrayMessages[t]&&delete n.notificationsArrayMessages[t]}),1e4)},this.playSoundNewAction=function(e,t,n,i,o){if(-1==this.backgroundChats.indexOf(parseInt(t))){1!=confLH.new_chat_sound_enabled||1!=confLH.sn_off&&"flash_on"!=$("#online-offline-user").text()||"active_chats"!=e&&"bot_chats"!=e&&"pending_chat"!=e&&"transfer_chat"!=e&&"unread_chat"!=e&&"pending_transfered"!=e||(this.soundPlayedTimes=0,this.playNewChatAudio("active_chats"==e?"alert":"new_chat")),$("textarea[name=ChatMessage]").is(":focus")||1!=confLH.sn_off&&"flash_on"!=$("#online-offline-user").text()||"subject_chats"!=e&&"active_chats"!=e&&"bot_chats"!=e&&"pending_chat"!=e&&"transfer_chat"!=e&&"unread_chat"!=e&&"pending_transfered"!=e||this.startBlinking(),"subject_chats"==e&&(this.soundPlayedTimes=0,this.playNewChatAudio("subject_chat"));var s=this;if(("subject_chats"==e||"active_chats"==e||"pending_chat"==e||"transfer_chat"==e||"unread_chat"==e||"bot_chats"==e||"pending_transfered"==e)&&(1==confLH.sn_off||"flash_on"==$("#online-offline-user").text())&&window.Notification&&"granted"==window.Notification.permission){var r=new Notification(n,{icon:WWW_DIR_JAVASCRIPT_FILES_NOTIFICATION+"/notification.png",body:i,requireInteraction:!0});r.onclick=function(){"subject_chats"==e||"active_chats"==e||"pending_chat"==e||"unread_chat"==e||"pending_transfered"==e||"bot_chats"==e?$("#tabs").length>0?(window.focus(),s.startChat(t,$("#tabs"),o)):s.startChatNewWindow(t,"ChatRequest"):s.startChatNewWindowTransferByTransfer(t,o),r.close()},"pending_transfered"!=e&&("undefined"!==this.notificationsArray[t]&&r.close(),this.notificationsArray[t]=r)}"transfer_chat"==e&&confLH.accept_chats?s.startChatNewWindowTransferByTransfer(t,o,!0):"transfer_chat"==e&&1==confLH.show_alert_transfer&&confirm(confLH.transLation.transfered+"\n\n"+i)&&s.startChatNewWindowTransferByTransfer(t,o),1==confLH.show_alert&&confirm(confLH.transLation.new_chat+"\n\n"+i)&&("pending_chat"==e||"unread_chat"==e||"pending_transfered"==e||"bot_chats"==e?$("#tabs").length>0?(window.focus(),s.startChat(t,$("#tabs"),o)):s.startChatNewWindow(t,"ChatRequest"):s.startChatNewWindowTransferByTransfer(t,o))}},this.syncadmininterfacestatic=function(){try{ee.emitEvent("angularLoadChatList")}catch(e){}},this.addingUserMessage=!1,this.addUserMessageQueue=[],this.addDelayedTimeout=null,this.addmsgadmin=function(e,t){$("#unread-separator-"+e).remove();var n=$("#CSChatMessage-"+e);if(!n.is("[readonly]")){var i={msg:t||n.val()};if(n.attr("meta-msg")&&(i.meta_msg=n.attr("meta-msg"),n.removeAttr("meta-msg")),""!=i.msg){!1!==this.speechHandler&&this.speechHandler.messageSend(),t||n.val("");var o=n.attr("placeholder");if(n.attr("placeholder",confLH.transLation.sending||"Sending..."),n.hasClass("edit-mode"))i.msgid=n.attr("data-msgid"),$.postJSON(this.wwwDir+"chat/updatemsg/"+e,i,(function(t){if(n.attr("placeholder",o),"f"==t.error)return n.removeClass("edit-mode"),n.removeAttr("data-msgid"),$("#msg-"+i.msgid).replaceWith(t.msg),LHCCallbacks.addmsgadmin&&LHCCallbacks.addmsgadmin(e),ee.emitEvent("chatAddMsgAdmin",[e]),lhinst.addQuateHandler(e),!0}));else{var s=this,r=$("#messagesBlock-"+e);if(t||r.append('<div class="message-row message-admin pending-storage"><div class="msg-body"><span class="material-icons lhc-spin">autorenew</span>'+$("<div>").text(i.msg).html()+"</div></div>"),r.scrollTop(r.prop("scrollHeight")),0==this.addingUserMessage){this.addingUserMessage=!0;var a=!1;n.attr("subjects_ids")&&(i.subjects_ids=n.attr("subjects_ids"),n.removeAttr("subjects_ids"),a=!0),n.attr("canned_id")&&(i.canned_id=n.attr("canned_id"),n.removeAttr("canned_id")),$.postJSON(this.wwwDir+this.addmsgurl+e,i,(function(t){if(n.removeAttr("readonly").attr("placeholder",o),"false"==t.error)LHCCallbacks.addmsgadmin&&LHCCallbacks.addmsgadmin(e),ee.emitEvent("chatAddMsgAdmin",[e]),""!=t.r&&$("#messagesBlock-"+e).append(t.r).scrollTop($("#messagesBlock-"+e).prop("scrollHeight")),!0===t.hold_removed?$("#hold-action-"+e).removeClass("btn-outline-info"):!0===t.hold_added&&$("#hold-action-"+e).addClass("btn-outline-info"),1==a&&s.updateVoteStatus(e),lhinst.syncadmincall();else{void 0!==t.token&&(confLH.csrf_token=t.token),n.attr("placeholder",o).val((n.val()+" "+i.msg).trim()),$(".pending-storage").first().remove();var r='<div style="margin:10px 10px 30px 10px;" class="alert alert-warning" role="alert">'+$("<div>").text(t.r).html()+"</div>";$("#messagesBlock-"+e).append(r).scrollTop($("#messagesBlock-"+e).prop("scrollHeight"))}if(s.addingUserMessage=!1,s.addUserMessageQueue.length>0){var l=s.addUserMessageQueue.shift();s.addmsgadmin(l.chat_id,l.msg)}return!0})).fail((function(t){n.attr("placeholder",o).val(n.val()+" "+i.msg);var r='<div style="margin:10px 10px 30px 10px;" class="alert alert-warning" role="alert">'+$("<div>").text("You have weak internet connection or the server has problems. Try to refresh the page or send the message again."+(void 0!==t.status?" Error code ["+t.status+"]":"")+(void 0!==t.responseText?t.responseText:"")).html()+"</div>";if($("#messagesBlock-"+e).append(r).scrollTop($("#messagesBlock-"+e).prop("scrollHeight")),$(".pending-storage").first().remove(),s.addingUserMessage=!1,s.addUserMessageQueue.length>0){var a=s.addUserMessageQueue.shift();s.addmsgadmin(a.chat_id,a.msg)}}))}else n.attr("placeholder",o),this.addUserMessageQueue.push({chat_id:e,msg:i.msg})}}}},this.editPrevious=function(e){var t=$("#CSChatMessage-"+e);""==t.val()&&$.getJSON(this.wwwDir+"chat/editprevious/"+e,(function(n){"f"==n.error&&(t.val(n.msg),t.attr("data-msgid",n.id),t.addClass("edit-mode"),$("#msg-"+n.id).addClass("edit-mode"),LHCCallbacks.editPrevious&&LHCCallbacks.editPrevious(e,n))}))},this.afterAdminChatInit=function(e){LHCCallbacks.afterAdminChatInit&&LHCCallbacks.afterAdminChatInit(e)},this.getInputSelection=function(t){return void 0!==t?(s=t[0].selectionStart,e=t[0].selectionEnd,t.val().substring(s,e)):""},this.handleBBCode=function(e){var t=$(e.attr("data-selector")).val(),n=$(e.attr("data-selector"));if(void 0!==n)var i=n[0].selectionStart,o=n[0].selectionEnd,s=t.substring(i,o);else s="";var r=void 0!==e.attr("data-bbcode-end")?e.attr("data-bbcode-end"):e.attr("data-bbcode");return s.length>0?$(e.attr("data-selector")).val(t.substr(0,i)+"["+e.attr("data-bbcode")+"]"+s+"[/"+r+"]"+t.substring(o)):$(e.attr("data-selector")).val(t+"["+e.attr("data-bbcode")+"][/"+r+"]"),!1},this.addAdminChatFinished=function(e,t,n){var i=this,o=jQuery("#CSChatMessage-"+e);new LHCCannedMessageAutoSuggest({chat_id:e,uppercase_enabled:confLH.auto_uppercase});if(null!==document.getElementById("color-picker-chat-"+e)){var s=new ColorPicker({dom:document.getElementById("color-picker-chat-"+e),value:"#0F0"});s.addEventListener("change",(function(t){$("#color-apply-"+e).attr("data-bbcode","color="+s.getValue("hex"))})),$(".downdown-menu-color-"+e).on("click",(function(e){if($(this).parent().is(".show")){var t=$(e.target);return!t.hasClass("keepopen")&&!t.parents(".keepopen").length}})),$(".downdown-menu-color-"+e+" .color-item").on("click",(function(){s.setValue($(this).attr("data-color"))}))}o.bind("keydown","return",(function(t){return i.addmsgadmin(e),ee.emitEvent("afterAdminMessageSent",[e]),o[0].rows=2,!1})),o.bind("keyup","up",(function(t){i.editPrevious(e)})),o.bind("keyup",(function(t){if(""==o.val()&&(o.removeAttr("subjects_ids"),o.removeAttr("canned_id")),""!=o.val()||!t.altKey||38!=t.which&&40!=t.which){var n=o[0];for(n.clientHeight,n.rows;n.scrollHeight>n.clientHeight&&!window.opera&&n.rows<30;)n.style.overflow="hidden",n.rows+=1;n.scrollHeight>n.clientHeight&&(n.style.overflow="auto")}else if(1==confLH.new_dashboard)ee.emitEvent("activateNextTab",[e,38==t.which]);else{if(38==t.which)var i=lhinst.smartTabFocus($("#tabs"),e,{keep:!0,up:!0});else i=lhinst.smartTabFocus($("#tabs"),e,{keep:!0,up:!1});var s=i.split("chat-id-");s[1]&&!isNaN(s[1])&&$("#chat-tab-link-"+s[1]).click()}})),$messageBlock=$("#messagesBlock-"+e),$messageBlock.css("height",this.getLocalValue("lhc_mheight",confLH.defaultm_hegiht)),$messageBlock.data("resized",!1),$messageBlock.data("y",$messageBlock.outerHeight()),$messageBlock.bind("mouseup mousemove",(function(e){var t=jQuery(this);t.outerHeight()!=t.data("y")&&(0==t.data("resized")&&(t.css("height","1px"),t.data("resized",!0)),this.resize_timeout&&clearTimeout(this.resize_timeout),this.resize_timeout=setTimeout((function(){i.setLocalValue("lhc_mheight",t.outerHeight()),t.data("y",t.outerHeight())}),100))})),1==confLH.scroll_load&&($messageBlock[0].oldScrollTop=$messageBlock[0].scrollTop,$messageBlock.bind("scroll",(function(t){var n=jQuery(this);n[0].oldScrollTop>n[0].scrollTop&&n[0].scrollTop<300&&1==$("#load-prev-btn-"+e).length&&i.loadPreviousMessages($("#load-prev-btn-"+e),!0),n[0].oldScrollTop=n[0].scrollTop}))),this.initTypingMonitoringAdmin(e),this.afterAdminChatInit(e),this.addSynchroChat(e,t),1!==confLH.no_scroll_bottom&&$messageBlock.prop("scrollTop",$messageBlock.prop("scrollHeight")),this.startSyncAdmin(),null===n||"object"!=typeof n||-1===n.indexOf("background")?this.hideNotification(e):$("#chat-tab-link-"+e).click((function(){i.removeBackgroundChat(parseInt(e)),i.hideNotification(parseInt(e))}));try{localStorage&&1==localStorage.getItem("lhc_rch")&&this.processCollapse(e)}catch(e){}$("#chat-tab-items-"+e+" > li > a").click((function(){ee.emitEvent("adminChatTabSubtabClicked",[e,$(this)])})),$("#chat-write-button-"+e).click((function(){$("#CSChatMessage-"+e).show().focus(),$(this).removeClass("btn-outline-secondary").addClass("btn-outline-primary"),$("#chat-preview-button-"+e).removeClass("btn-outline-primary").addClass("btn-outline-secondary"),$("#chat-preview-container-"+e).hide()})),$("#chat-preview-button-"+e).click((function(){$("#chat-preview-container-"+e).html("...").show(),$("#CSChatMessage-"+e).hide(),$(this).removeClass("btn-outline-secondary").addClass("btn-outline-primary"),$("#chat-write-button-"+e).removeClass("btn-outline-primary").addClass("btn-outline-secondary"),jQuery.post(WWW_DIR_JAVASCRIPT+"chat/previewmessage",{msg_body:!0,msg:$("#CSChatMessage-"+e).val()},(function(t){$("#chat-preview-container-"+e).html(t)}))})),ee.emitEvent("adminChatLoaded",[e,t,n])},this.removeBackgroundChat=function(e){var t=this.backgroundChats.indexOf(parseInt(e));-1!==t&&delete this.backgroundChats[t]},this.getLocalValue=function(e,t){try{if(localStorage){var n=localStorage.getItem(e);return null!==n?n:t}}catch(e){}return t},this.setLocalValue=function(e,t){try{localStorage&&localStorage.setItem(e,t)}catch(e){}},this.hideNotification=function(e){e=parseInt(e),void 0!==this.notificationsArray[e]&&-1==this.backgroundChats.indexOf(e)&&(this.notificationsArray[e].close(),delete this.notificationsArray[e]),clearTimeout(this.soundIsPlaying)},this.showMyPermissions=function(e){$.get(this.wwwDir+"permission/getpermissionsummary/"+e,(function(e){$("#permissions-summary").html(e)}))},this.updateMessageRowAdmin=function(e,t){$.getJSON(this.wwwDir+"chat/getmessageadmin/"+e+"/"+t,(function(n){if("f"==n.error){var i=$("#messagesBlock-"+e),o=i.prop("scrollTop")+i.height()+30>i.prop("scrollHeight");$("#msg-"+t).replaceWith(n.msg),lhinst.addQuateHandler(e),$("#msg-"+t).addClass("bg-success"),setTimeout((function(){$("#msg-"+t).removeClass("bg-success")}),2e3),o&&i.scrollTop(i.prop("scrollHeight"))}}))},this.startSyncAdmin=function(){0==this.isSinchronizing&&(this.isSinchronizing=!0,this.syncadmincall())},this.disableChatSoundAdmin=function(e){return"I"!=e.prop("tagName")&&(e=e.find("> i.material-icons")),"volume_off"==e.text()?($.post(this.wwwDir+"user/setsettingajax/chat_message/1"),confLH.new_message_sound_admin_enabled=1,e.text("volume_up")):($.post(this.wwwDir+"user/setsettingajax/chat_message/0"),confLH.new_message_sound_admin_enabled=0,e.text("volume_off")),!1},this.disableNewChatSoundAdmin=function(e){return"I"!=e.prop("tagName")&&(e=e.find("> i.material-icons")),"volume_off"==e.text()?($.post(this.wwwDir+"user/setsettingajax/new_chat_sound/1"),confLH.new_chat_sound_enabled=1,e.text("volume_up")):($.post(this.wwwDir+"user/setsettingajax/new_chat_sound/0"),confLH.new_chat_sound_enabled=0,e.text("volume_off")),!1},this.changeUserSettings=function(e,t){$.post(this.wwwDir+"user/setsettingajax/"+e+"/"+t)},this.changeUserSettingsIndifferent=function(e,t){$.post(this.wwwDir+"user/setsettingajax/"+e+"/"+encodeURIComponent(t)+"/(indifferent)/true")},this.changeStatusAction=function(e,t){var n=this;return $.postJSON(e.attr("action"),e.serialize(),(function(e){"false"==e.error?($("#myModal").modal("hide"),n.updateVoteStatus(t),!0===e.is_owner&&($("#CSChatMessage-"+t).attr("placeholder",""),$("#CSChatMessage-"+t).focus())):alert(e.result)})),!1},this.submitModalForm=function(e){return $.post(e.attr("action"),e.serialize(),(function(e){var t=$("#myModal > .modal-dialog")[0].style.cssText;$("#myModal").html(e),$("#myModal > .modal-dialog")[0].style.cssText=t})),!1},this.pendingMessagesToStore=[],this.setSubject=function(e,t){$("#subject-message-"+t).text("..."),$.postJSON(this.wwwDir+"chat/subject/"+t+"/(subject)/"+e.val()+"/(status)/"+e.is(":checked"),{update:!0},(function(e){lhinst.updateVoteStatus(t),$("#subject-message-"+t).text(e.message)}))},this.deleteChatfile=function(e){$.postJSON(this.wwwDir+"file/deletechatfile/"+e,(function(t){"false"==t.error?$("#file-id-"+e).remove():alert(t.result)}))},this.updateChatFiles=function(e){$.postJSON(this.wwwDir+"file/chatfileslist/"+e,(function(t){$("#chat-files-list-"+e).html(t.result)}))},this.updateOnlineFiles=function(e){$.postJSON(this.wwwDir+"file/onlinefileslist/"+e,(function(t){$("#online-user-files-list-"+e).html(t.result)}))},this.updateOnlineFilesUser=function(e){$.postJSON(this.wwwDir+"file/useronlinefileslist/"+e,(function(e){$("#user-online-files-list").html(e.result)}))},this.addFileUpload=function(e){$("#fileupload-"+e.chat_id).fileupload({url:this.wwwDir+"file/uploadfileadmin/"+e.chat_id,dataType:"json",add:function(t,n){var i=[],o=e.ft_op;o.test(n.originalFiles[0].type)||o.test(n.originalFiles[0].name)||i.push(e.ft_msg),n.originalFiles[0].size>e.fs&&i.push(e.fs_msg),i.length>0?alert(i.join("\n")):n.submit()},done:function(t,n){var i=n.response();if(null!=i&&null!=i.result&&"true"==i.result.error&&null!=i.result.error_msg)alert(i.result.error_msg);else{lhinst.updateChatFiles(e.chat_id);var o=$("#CSChatMessage-"+e.chat_id),s=jQuery.trim(o.val());o.val(s+(""!=s?"\n":"")+i.result.msg+"\n")}LHCCallbacks.addFileUpload&&LHCCallbacks.addFileUpload(e.chat_id)},dropZone:$("#CSChatMessage-"+e.chat_id),pasteZone:$("#CSChatMessage-"+e.chat_id),progressall:function(t,n){var i=parseInt(n.loaded/n.total*100,10);$("#user-is-typing-"+e.chat_id).css("visibility","visible"),$("#user-is-typing-"+e.chat_id).html(i+"%")}}).prop("disabled",!$.support.fileInput).parent().addClass($.support.fileInput?void 0:"disabled")},this.addExecutionCommand=function(e,t){if($.postJSON(this.wwwDir+"chat/addonlineoperation/"+e,{operation:t},(function(t){LHCCallbacks.addExecutionCommand&&LHCCallbacks.addExecutionCommand(e)})),"lhc_screenshot"==t){$("#user-screenshot-container").html("").addClass("screenshot-pending");var n=this;setTimeout((function(){n.updateScreenshotOnline(e)}),15e3)}},this.addRemoteCommand=function(e,t){if($.postJSON(this.wwwDir+"chat/addoperation/"+e,{operation:t},(function(t){LHCCallbacks.addRemoteCommand&&LHCCallbacks.addRemoteCommand(e),"true"==t.error&&null!=t.errors&&alert(t.errors.join("\n"))})),"lhc_screenshot"==t){$("#user-screenshot-container").html("").addClass("screenshot-pending");var n=this;setTimeout((function(){n.updateScreenshot(e)}),5e3)}},this.addRemoteOnlineCommand=function(e,t){$.postJSON(this.wwwDir+"chat/addonlineoperationiframe/"+e,{operation:t},(function(t){LHCCallbacks.addRemoteOnlineCommand&&LHCCallbacks.addRemoteOnlineCommand(e)}))},this.updateScreenshot=function(e){$("#user-screenshot-container").html("").addClass("screenshot-pending"),$.get(this.wwwDir+"chat/checkscreenshot/"+e,(function(t){$("#user-screenshot-container-"+e).html(t),$("#user-screenshot-container-"+e).removeClass("screenshot-pending")}))},this.updateScreenshotOnline=function(e){$("#user-screenshot-container").html("").addClass("screenshot-pending"),$.get(this.wwwDir+"chat/checkscreenshotonline/"+e,(function(t){$("#user-screenshot-container-"+e).html(t),$("#user-screenshot-container-"+e).removeClass("screenshot-pending")}))},this.delayQueue=[],this.delayed=!1,this.intervalPending=null,this.gmaps_loading=!1,this.queue_render=[],this.showMessageLocation=function(e,t,n){var i={lat:t,lng:n};if(1==this.gmaps_loaded){var o=new google.maps.Map(document.getElementById("msg-location-"+e),{zoom:13,center:i});new google.maps.Marker({position:i,map:o,title:t+","+n})}else if(0==this.gmaps_loading){this.gmaps_loading=!0;var s=document.createElement("script");s.type="text/javascript",s.async=!0,s.src="https://maps.googleapis.com/maps/api/js?key="+confLH.gmaps_api_key+"&callback=chatMapLoaded";var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(s,r),lhinst.queue_render.push({id:e,lat:t,lon:n})}else lhinst.queue_render.push({id:e,lat:t,lon:n})}}function chatMapLoaded(){if(lhinst.queue_render.length>0){lhinst.gmaps_loaded=!0;var e=lhinst.queue_render.pop(),t={lat:e.lat,lng:e.lon},n=new google.maps.Map(document.getElementById("msg-location-"+e.id),{zoom:13,center:t});new google.maps.Marker({position:t,map:n,title:e.lat+","+e.lon});lhinst.queue_render.length>0&&chatMapLoaded()}}var lhinst=new lh;function preloadSound(){lhinst.playPreloadSound(),jQuery(document).off("click",preloadSound),jQuery(document).off("touchstart",preloadSound)}function gMapsCallback(){lhinst.gmaps_loaded=!0;var e=$("#map_canvas"),t=new google.maps.Map(e[0],{zoom:GeoLocationData.zoom,center:new google.maps.LatLng(GeoLocationData.lat,GeoLocationData.lng),mapTypeId:google.maps.MapTypeId.ROADMAP,disableDefaultUI:!0,options:{zoomControl:!0,scrollwheel:!0,streetViewControl:!0}}),n=!1,i=!1,o=!1,s=!1;google.maps.event.addListener(t,"idle",a);var r=$("#map-activator");function a(){0==i?r.hasClass("active")?(i=!0,$.ajax({url:WWW_DIR_JAVASCRIPT+"chat/jsononlineusers"+(parseInt($("#id_department_map_id").val())>0?"/(department)/"+parseInt($("#id_department_map_id").val()):"")+(parseInt($("#maxRows").val())>0?"/(maxrows)/"+parseInt($("#maxRows").val()):"")+(parseInt($("#userTimeout").val())>0?"/(timeout)/"+parseInt($("#userTimeout").val()):""),dataType:"json",error:function(){clearTimeout(s),s=setTimeout((function(){a()}),1e4)},success:function(e){$(e.result).each((function(e,n){if(-1==$.inArray(n.Id,l)){var i=new google.maps.LatLng(n.Latitude,n.Longitude),o=new google.maps.Marker({position:i,icon:n.icon,map:t});google.maps.event.addListener(o,"click",(function(){lhc.revealModal({url:WWW_DIR_JAVASCRIPT+"chat/getonlineuserinfo/"+n.Id})})),o.setVisible(!0),o.setAnimation(google.maps.Animation.DROP),c[n.Id]=o,l.push(n.Id),clearTimeout(c[n.Id].timeOutMarker),c[n.Id].timeOutMarker=setTimeout((function(){l.splice($.inArray(n.Id,l),1),google.maps.event.clearInstanceListeners(c[n.Id]),c[n.Id].setMap(null),c[n.Id]=null}),1e3*parseInt($("#markerTimeout option:selected").val()))}else c[n.Id].setIcon(n.icon),clearTimeout(c[n.Id].timeOutMarker),c[n.Id].timeOutMarker=setTimeout((function(){l.splice($.inArray(n.Id,l),1),google.maps.event.clearInstanceListeners(c[n.Id]),c[n.Id].setMap(null),c[n.Id]=null}),1e3*parseInt($("#markerTimeout option:selected").val()))})),i=!1,clearTimeout(s),1==o?(o=!1,a()):s=setTimeout((function(){a()}),1e4)}})):s=setTimeout((function(){a()}),1e4):o=!0}var l=[],c=[];new google.maps.InfoWindow({content:"Loading..."});$("#id_department_map_id").change((function(){a(),lhinst.changeUserSettingsIndifferent("omap_depid",$(this).val())})),$("#markerTimeout").change((function(){a(),lhinst.changeUserSettingsIndifferent("omap_mtimeout",$(this).val())})),$("#map-activator").click((function(){setTimeout((function(){google.maps.event.trigger(t,"resize"),0==n&&(n=!0,t.setCenter(new google.maps.LatLng(GeoLocationData.lat,GeoLocationData.lng)))}),500),a()}))}lhinst.playPreloadSound(),jQuery(document).on("click",preloadSound),jQuery(document).on("touchstart",preloadSound),jQuery(document).on("click",(function(){lhinst.hidePopover()}));var focused=!0;function chatsyncadmin(){lhinst.syncadmincall()}window.onfocus=window.onblur=function(e){focused="focus"===(e||event).type,lhinst.focusChanged(focused)},window.lhcSelector=null,$(document).ready((function(){lhinst.protectCSFR()}))}catch(e){if(!lhcError)throw Error("lhc : "+e.message);lhcError.log(e.message,"lh.js",e.lineNumber||e.line,e.stack)}function chatsyncuser(){lhinst.syncusercall()}function chatsyncuserpending(){lhinst.chatsyncuserpending()}lhinst.addmsgurluser="chat/addmsguser/",lhinst.addmsgurluserchatbox="chatbox/addmsguser/",lhinst.syncuser="chat/syncuser/",lhinst.userclosechaturl="chat/userclosechat/",lhinst.checkchatstatus="chat/checkchatstatus/",lhinst.checkChatStatusTimeout=null,lhinst.addmsguserchatbox=function(e){var t=!1,n={msg:$("#CSChatMessage").val(),nick:$("#CSChatNick").val()},i=1==this.isWidgetMode?"/(mode)/widget":"";$("#CSChatMessage").val("");var o=this;$.postJSON(this.wwwDir+this.addmsgurluserchatbox+this.chat_id+"/"+this.hash+i+this.appendSyncArgument,n,(function(e){"f"==e.error?(LHCCallbacks.addmsguserchatbox&&LHCCallbacks.addmsguserchatbox(o,{chat_id:o.chat_id,data:e}),o.syncusercall()):alert(e.or)})),t!=$("#CSChatNick").val()&&window.postMessage&&parent&&(parent.postMessage("lhc_chb:nick:"+$("#CSChatNick").val(),"*"),t=$("#CSChatNick").val())},lhinst.updateMessageRow=function(e){var t=1==this.isWidgetMode?"/(mode)/widget":"";$.getJSON(this.wwwDir+"chat/getmessage/"+this.chat_id+"/"+this.hash+"/"+e+t,(function(t){"f"==t.error&&($("#msg-"+e).replaceWith(t.msg),$("#msg-"+e).addClass("bg-success"),setTimeout((function(){$("#msg-"+e).removeClass("bg-success")}),2e3))}))},lhinst.addmsguser=function(e){LHCCallbacks.addmsguserbefore&&LHCCallbacks.addmsguserbefore(this);var t=$("#CSChatMessage"),n={msg:t.val()},i=1==this.isWidgetMode?"/(mode)/widget":"";t.val("");var o=this;$("#lhc-mic-icon").length>0&&($("#lhc-send-icon").hide(),$("#lhc-mic-icon").show(),$("#voice-control-message").hide());try{ee.emitEvent("messageSend",[{chat_id:this.chat_id,hash:this.hash,msg:n.msg}]),sessionStorage&&sessionStorage.setItem("lhc_ttxt","")}catch(e){}if(t.hasClass("edit-mode"))n.msgid=t.attr("data-msgid"),$.postJSON(this.wwwDir+"chat/updatemsguser/"+this.chat_id+"/"+this.hash+i,n,(function(e){if("f"==e.error)return t.removeClass("edit-mode"),t.removeAttr("data-msgid"),$("#msg-"+n.msgid).replaceWith(e.msg),!0}));else{var s=$("#messagesBlock");s.append('<div class="message-row response pending-storage"><div class="msg-body">'+$("<div>").text(n.msg).html()+"</div></div>"),s.scrollTop(s.prop("scrollHeight")),0==this.addingUserMessage&&0==this.addUserMessageQueue.length?(this.addingUserMessage=!0,$.postJSON(this.wwwDir+this.addmsgurluser+this.chat_id+"/"+this.hash+i,n,(function(e){if("f"==e.error)LHCCallbacks.addmsguser&&LHCCallbacks.addmsguser(o,e),o.syncusercall();else{$(".pending-storage").remove(),$("#CSChatMessage").val(n.msg);var t=$("#id-operator-typing");t.html(e.r),t.css("visibility","visible"),setTimeout((function(){0==o.operatorTyping&&$("#id-operator-typing").css("visibility","hidden")}),3e3)}o.addingUserMessage=!1})).fail((function(e){$("#CSChatMessage").val(t.val()+" "+n.msg);var i=$("#id-operator-typing");i.html("You have weak internet connection or the server has problems. Try to send the message again."),i.css("visibility","visible"),setTimeout((function(){0==o.operatorTyping&&$("#id-operator-typing").html("").css("visibility","hidden")}),5e3),$(".pending-storage").remove(),o.addingUserMessage=!1,o.addUserMessageQueue.length>0&&o.addDelayedMessage()}))):(this.addUserMessageQueue.push({retries:0,pdata:n,url:this.wwwDir+this.addmsgurluser+this.chat_id+"/"+this.hash+i}),clearTimeout(this.addDelayedTimeout),this.addDelayedTimeout=setTimeout((function(){o.addDelayedMessage()}),50))}},lhinst.addMessagesToStore=function(e){for(var t=1==this.isWidgetMode?"/(mode)/widget":"",n=e.length,i=0;i<n;i++)this.addUserMessageQueue.push({retries:0,pdata:{msg:e[i]},url:this.wwwDir+this.addmsgurluser+this.chat_id+"/"+this.hash+t});this.addDelayedMessage()},lhinst.addDelayedMessage=function(){var e=this;if(0==this.addingUserMessage){if(this.addUserMessageQueue.length>0){var t=this.addUserMessageQueue.shift();this.addingUserMessage=!0;var n=[];n.push(t.pdata.msg);for(var i=this.addUserMessageQueue.length,o=0;o<i;o++)n.push(this.addUserMessageQueue[o].pdata.msg);this.addUserMessageQueue=[],$.postJSON(t.url,{msg:n.join("[[msgitm]]")},(function(t){"f"==t.error&&(LHCCallbacks.addmsguser&&LHCCallbacks.addmsguser(e,t),e.syncusercall()),e.addingUserMessage=!1,e.addUserMessageQueue.length>0&&(clearTimeout(e.addDelayedTimeout),e.addDelayedMessage())})).fail((function(){e.addingUserMessage=!1}))}}else clearTimeout(this.addDelayedTimeout),this.addDelayedTimeout=setTimeout((function(){e.addDelayedMessage()}),50)},lhinst.switchToOfflineForm=function(){var e=$("#form-start-chat");return e.attr("action",$("#form-start-chat").attr("action")+"/(switchform)/true/(offline)/true/(leaveamessage)/true/(department)/"+$("#id_DepartamentID").val()),e.submit(),!1},lhinst.disableChatSoundUser=function(e){return"volume_off"==e.find("> i").text()?($.post(this.wwwDir+"user/setsettingajax/chat_message/1"),confLH.new_message_sound_user_enabled=1,e.find("> i").text("volume_up")):($.post(this.wwwDir+"user/setsettingajax/chat_message/0"),confLH.new_message_sound_user_enabled=0,e.find("> i").text("volume_off")),window.postMessage&&parent&&("volume_off"==e.find("> i").text()?parent.postMessage("lhc_ch:s:0","*"):parent.postMessage("lhc_ch:s:1","*")),!1},lhinst.prestartChat=function(e,t){if(0==t.find(".form-protected").length)return 1!=t.attr("lhc-captcha-submitted")?(t.attr("lhc-captcha-submitted",1),t.find('input[type="submit"]').attr("disabled","disabled"),$.getJSON(this.wwwDir+"captcha/captchastring/form/"+e,(function(n){t.append('<input type="hidden" value="'+e+'" name="captcha_'+n.result+'" /><input type="hidden" value="'+e+'" name="tscaptcha" /><input type="hidden" class="form-protected" value="1" />'),t.submit()})),1==(n=1==t.attr("key-up-started"))&&(jQuery("<div/>",{class:"message-row response",text:$("#id_Question").val()}).appendTo("#messagesBlock").prepend('<span class="usr-tit vis-tit">'+visitorTitle+"</span>"),$("#messagesBlock").scrollTop($("#messagesBlock").prop("scrollHeight")),this.pendingMessagesToStore.push($("#id_Question").val()),$("#id_Question").val(""))):($("#messagesBlock").length>0&&(jQuery("<div/>",{class:"message-row response",text:$("#id_Question").val()}).appendTo("#messagesBlock").prepend('<span class="usr-tit vis-tit">'+visitorTitle+"</span>"),$("#messagesBlock").scrollTop($("#messagesBlock").prop("scrollHeight"))),this.pendingMessagesToStore.push($("#id_Question").val()),$("#id_Question").val("")),!1;if(1==t.find("#hasFormExtraField").length)return!0;if(1!=t.attr("lhc-form-submitted")){t.attr("lhc-form-submitted",1);var n,i=this;1==(n=1==t.attr("key-up-started"))&&t.append('<input type="hidden" value="1" name="keyUpStarted" />'),$.post(t.attr("action"),t.serialize(),(function(e){var t=$("#id_Question").val();try{sessionStorage&&sessionStorage.setItem("lhc_ttxt",t)}catch(e){}$("head > script");var n=$("head"),o=[];$("head > script").each((function(){var e=$(this);void 0!==e.attr("src")&&o.push(e.attr("src"))})),$("<div>").html(e).find("> script").each((function(){var e=$(this);void 0===e.attr("src")?n.append(e):-1==o.indexOf(e.attr("src"))&&n.append('<script src="'+e.attr("src")+'"><\/script>')})),paramsDocument="<script>lhinst.addMessagesToStore("+JSON.stringify(i.pendingMessagesToStore)+")<\/script>",$("#widget-layout").html($("<div>").html(e).find("#widget-layout").html()),$("#widget-layout-js").html($("<div>").html(e).find("#widget-layout-js").html()+paramsDocument)})),0==n&&$("#id_Question").val("")}else $("#messagesBlock").length>0&&(jQuery("<div/>",{class:"message-row response",text:$("#id_Question").val()}).appendTo("#messagesBlock").prepend('<span class="usr-tit vis-tit">'+visitorTitle+"</span>"),$("#messagesBlock").scrollTop($("#messagesBlock").prop("scrollHeight"))),this.pendingMessagesToStore.push($("#id_Question").val()),$("#id_Question").val("");return!1},lhinst.addCaptcha=function(e,t){return 0!=t.find(".form-protected").length||(t.find('input[type="submit"]').attr("disabled","disabled"),$.getJSON(this.wwwDir+"captcha/captchastring/form/"+e,(function(n){t.append('<input type="hidden" value="'+e+'" name="captcha_'+n.result+'" /><input type="hidden" value="'+e+'" name="tscaptcha" /><input type="hidden" class="form-protected" value="1" />'),t.submit()})),!1)},lhinst.addCaptchaSubmit=function(e,t){return 0==t.find(".form-protected").length&&(t.find('input[type="submit"]').attr("disabled","disabled"),t.find("#ChatSendButtonContainer").remove(),t.find("#id_Question").attr("readonly","readonly"),"undefined"!=typeof formSubmitted&&(formSubmitted=!0),$.getJSON(this.wwwDir+"captcha/captchastring/form/"+e,(function(n){if(t.append('<input type="hidden" value="'+e+'" name="captcha_'+n.result+'" /><input type="hidden" value="'+e+'" name="tscaptcha" /><input type="hidden" class="form-protected" value="1" />'),window.FormData)try{var i=new FormData(t[0]),o=new XMLHttpRequest;o.addEventListener("readystatechange",(function(e){var t,n;try{n=e.target.readyState,e.target.responseText,t=e.target.status}catch(e){return}4==n&&"200"==t&&e.target.responseText&&(-1==o.getResponseHeader("Content-Type").indexOf("application/json")?$("#widget-content-body").html(e.target.responseText):location.replace(jQuery.parseJSON(e.target.responseText).location))}),!1);var s=t.attr("action");""!=s?o.open("POST",s+"/(ajaxmode)/true",!0):o.open("POST",document.location+"&ajaxmode=true",!0),o.send(i)}catch(e){return!1}else t.submit()})),!1)},lhinst.addFileUserUploadOnline=function(e,t){var n=this;$("#fileuploadonline").fileupload({url:this.wwwDir+"file/uploadfileonline/"+e.online_user_vid,dataType:"json",add:function(t,n){var i=[],o=e.ft_us;o.test(n.originalFiles[0].type)||o.test(n.originalFiles[0].name)||i.push(e.ft_msg),n.originalFiles[0].size>e.fs&&i.push(e.fs_msg),i.length>0?alert(i.join("\n")):n.submit()},done:function(i,o){n.updateOnlineFilesUser(e.online_user_vid),t&&t(e.online_user_vid)},progressall:function(e,t){var n=parseInt(t.loaded/t.total*100,10);$("#upload-status-user-online").html(n+"%")}}).prop("disabled",!$.support.fileInput).parent().addClass($.support.fileInput?void 0:"disabled")},lhinst.addFileUploadOnlineUser=function(e,t){var n=this;$("#fileupload-online-user-"+e.online_user_id).fileupload({url:this.wwwDir+"file/uploadfileadminonlineuser/"+e.online_user_id,dataType:"json",add:function(t,n){var i=[],o=e.ft_op;o.test(n.originalFiles[0].type)||o.test(n.originalFiles[0].name)||i.push(e.ft_msg),n.originalFiles[0].size>e.fs&&i.push(e.fs_msg),i.length>0?alert(i.join("\n")):n.submit()},done:function(i,o){t&&t(e.online_user_id),n.updateOnlineFiles(e.online_user_id)},dropZone:$("#drop-zone-online-user-"+e.online_user_id),progressall:function(t,n){var i=parseInt(n.loaded/n.total*100,10);$("#upload-status-admin-"+e.online_user_id).html(i+"%")}}).prop("disabled",!$.support.fileInput).parent().addClass($.support.fileInput?void 0:"disabled")},lhinst.eNick=function(){lhc.revealModal({url:WWW_DIR_JAVASCRIPT+"chat/editnick/"+this.chat_id+"/"+this.hash})},lhinst.enableVisitorEditor=function(){$("#ChatMessageContainer").removeClass("hide"),$("#CSChatMessage").focus()},lhinst.disableVisitorEditor=function(){$("#ChatMessageContainer").addClass("hide")},lhinst.buttonClicked=function(e,t,n,i){null==n.attr("data-no-change")&&(n.attr("disabled","disabled"),n.prepend('<i class="material-icons lhc-spin">loop</i>'));var o=$("#messagesBlock"),s=o.prop("scrollHeight");o.scrollTop(s),this.syncroRequestSend=!0,clearTimeout(this.userTimeout),$.get(this.wwwDir+"genericbot/buttonclicked/"+this.chat_id+"/"+this.hash,{payload:e,id:t,processed:void 0===i||0==i},(function(e){void 0!==i&&!1!==i||$(".meta-message-"+t).remove();var n=o.prop("scrollHeight");o.scrollTop(n),lhinst.forceBottomScroll=!0,lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})).fail((function(){lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})),lhinst.focusUserText()},lhinst.editGenericStep=function(e,t){var n=$("#messagesBlock"),i=n.prop("scrollHeight");n.scrollTop(i),this.syncroRequestSend=!0,clearTimeout(this.userTimeout),$.get(this.wwwDir+"genericbot/buttonclicked/"+this.chat_id+"/"+this.hash+"/(type)/editgenericstep",{payload:e,id:t},(function(e){var t=n.prop("scrollHeight");n.scrollTop(t),lhinst.forceBottomScroll=!0,lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})).fail((function(){lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})),lhinst.focusUserText()},lhinst.updateTriggerClicked=function(e,t,n,i){null==n.attr("data-no-change")&&(n.attr("disabled","disabled"),n.prepend('<i class="material-icons lhc-spin">loop</i>'));var o=$("#messagesBlock"),s=o.prop("scrollHeight");o.scrollTop(s),this.syncroRequestSend=!0,clearTimeout(this.userTimeout),$.get(this.wwwDir+"genericbot/buttonclicked/"+this.chat_id+"/"+this.hash+"/(type)/triggerclicked",{payload:e,id:t,processed:void 0===i||0==i},(function(e){void 0!==i&&!1!==i||$(".meta-message-"+t).remove();var n=o.prop("scrollHeight");o.scrollTop(n),lhinst.forceBottomScroll=!0,lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})).fail((function(){lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})),lhinst.focusUserText()},lhinst.updateChatClicked=function(e,t,n,i){null==n.attr("data-no-change")&&(n.attr("disabled","disabled"),n.prepend('<i class="material-icons lhc-spin">loop</i>'));var o=$("#messagesBlock"),s=o.prop("scrollHeight");o.scrollTop(s),lhinst.syncroRequestSend=!0,clearTimeout(this.userTimeout),$.get(this.wwwDir+"genericbot/updatebuttonclicked/"+this.chat_id+"/"+this.hash,{payload:e,id:t,processed:void 0===i||0==i},(function(e){void 0!==i&&!1!==i||$(".meta-message-"+t).remove();var n=o.prop("scrollHeight");o.scrollTop(n),lhinst.forceBottomScroll=!0,lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})).fail((function(){lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})),lhinst.focusUserText()},lhinst.dropdownClicked=function(e,t){null==t.attr("data-no-change")&&(t.attr("disabled","disabled"),t.prepend('<i class="material-icons lhc-spin">loop</i>'));var n=$("#messagesBlock"),i=n.prop("scrollHeight");n.scrollTop(i),""!=$("#generic_list-"+e).val()?(this.syncroRequestSend=!0,clearTimeout(this.userTimeout),$.get(this.wwwDir+"genericbot/buttonclicked/"+this.chat_id+"/"+this.hash+"/(type)/valueclicked",{payload:$("#id_generic_list-"+e).val(),id:e},(function(t){$(".meta-message-"+e).remove();var i=n.prop("scrollHeight");n.scrollTop(i),lhinst.forceBottomScroll=!0,lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})).fail((function(){lhinst.syncroRequestSend=!1,lhinst.enableVisitorEditor(),lhinst.syncusercall()})),lhinst.focusUserText()):alert("Please choose!")},lhinst.focusUserText=function(){$("#CSChatMessage").focus()},lhinst.unhideDelayed=function(e){var t=$("#messagesBlock > #msg-"+e);t.nextUntil(".meta-hider").removeClass("hide"),t.remove();var n=$("#messagesBlock"),i=n.prop("scrollHeight");if(n.find(".meta-auto-hide").hide(),n.find(".message-row").last().find(".meta-auto-hide").show(),i=n.prop("scrollHeight"),n.find(".pending-storage").remove(),n.scrollTop(i+2e3),this.delayQueue.length>0){var o=lhinst.delayQueue.pop();setTimeout((function(){lhinst.unhideDelayed(o.id)}),1e3*o.delay),$("#msg-"+o.id).removeClass("hide"),$("#msg-"+o.id+" .msg-body").removeClass("hide")}else lhinst.delayed=!1},lhinst.chatsyncuserpending=function(){var e=1==this.isWidgetMode?"/(mode)/widget":"",t=null!==this.theme?"/(theme)/"+this.theme:"";clearTimeout(this.checkChatStatusTimeout);var n=this;$.getJSON(this.wwwDir+this.checkchatstatus+this.chat_id+"/"+this.hash+e+t,{},(function(e){ee.emitEvent("checkChatStatus",[n.chat_id,e]),n.chatStatus=e.status,"false"==e.error&&("false"==e.activated?("false"!=e.result&&$("#status-chat").html(e.result),""!=e.ru&&document.location.replace(e.ru),n.checkChatStatusTimeout=setTimeout(chatsyncuserpending,confLH.chat_message_sinterval)):($("#status-chat").html(e.result),e.closed&&1==e.closed&&(ee.emitEvent("chatClosedCheckStatus",[n.chat_id]),n.isWidgetMode&&"undefined"!=typeof parent&&window.location!==window.parent.location?parent.postMessage("lhc_chat_closed","*"):n.chatClosed())))})).fail((function(){setTimeout(chatsyncuserpending,confLH.chat_message_sinterval)}))},lhinst.setTheme=function(e){this.theme=e},lhinst.setSurvey=function(e){this.survey=e},lhinst.voteAction=function(e){var t=this.chat_id;$.postJSON(this.wwwDir+"chat/voteaction/"+this.chat_id+"/"+this.hash+"/"+e.attr("data-id"),{},(function(e){"false"==e.error&&(LHCCallbacks.uservoted&&LHCCallbacks.uservoted(t),0==e.status?($(".up-vote-action").removeClass("up-voted"),$(".down-vote-action").removeClass("down-voted")):1==e.status?($(".up-vote-action").addClass("up-voted"),$(".down-vote-action").removeClass("down-voted")):2==e.status&&($(".up-vote-action").removeClass("up-voted"),$(".down-vote-action").addClass("down-voted")))}))},lhinst.sendemail=function(){$.postJSON(this.wwwDir+"chat/sendchat/"+this.chat_id+"/"+this.hash,{csfr_token:confLH.csrf_token,email:$('input[name="UserEmail"]').val()},(function(e){"false"==e.error?$("#myModal").modal("hide"):($("#user-action .alert-box").remove(),$("#user-action").prepend(e.result))}))},lhinst.closeWindow=function(){null!==this.survey&&0==this.surveyShowed?(this.surveyShowed=!0,this.chatClosed()):(window.open("","_self",""),window.close(),parent.postMessage("lhc_chat_closed_explicit","*"))},lhinst.setLastUserMessageID=function(e){this.last_message_id=e},lhinst.setChatID=function(e){this.chat_id=e},lhinst.setCloseWindowOnEvent=function(e){this.closeWindowOnChatCloseDelete=e},lhinst.setWidgetMode=function(e){this.isWidgetMode=e},lhinst.setEmbedMode=function(e){this.isEmbedMode=e},lhinst.setSyncUserURL=function(e){this.syncuser=e},lhinst.editPreviousUser=function(){var e=$("#CSChatMessage");""==e.val()&&$.getJSON(this.wwwDir+"chat/editprevioususer/"+this.chat_id+"/"+this.hash,(function(t){"f"==t.error&&(e.val(t.msg),e.attr("data-msgid",t.id),e.addClass("edit-mode"),$("#msg-"+t.id).addClass("edit-mode"),LHCCallbacks.editPreviousUser&&LHCCallbacks.editPreviousUser(t))}))},lhinst.addFileUserUpload=function(e){$("#fileupload").fileupload({url:this.wwwDir+"file/uploadfile/"+e.chat_id+"/"+e.hash,dataType:"json",add:function(t,n){var i=[],o=e.ft_us;o.test(n.originalFiles[0].type)||o.test(n.originalFiles[0].name)||i.push(e.ft_msg),n.originalFiles[0].size>e.fs&&i.push(e.fs_msg),i.length>0?alert(i.join("\n")):n.submit()},done:function(t,n){var i=n.response();null!=i&&null!=i.result&&"true"==i.result.error&&null!=i.result.error_msg&&alert(i.result.error_msg),LHCCallbacks.addFileUserUpload&&LHCCallbacks.addFileUserUpload(e.chat_id)},progressall:function(e,t){var n=parseInt(t.loaded/t.total*100,10);$("#id-operator-typing").css("visibility","visible"),$("#id-operator-typing").html(n+"%")}}).prop("disabled",!$.support.fileInput).parent().addClass($.support.fileInput?void 0:"disabled")},lhinst.setChatHash=function(e){this.hash=e},lhinst.updateUserSyncInterface=function(e,t){try{if("false"==t.error)if("true"!=t.blocked){if("false"!=t.result&&"true"==t.status){var n=$("#messagesBlock"),i=n.prop("scrollHeight"),o=Math.abs(i-n.prop("scrollTop")-n.prop("clientHeight"));i=n.prop("scrollHeight"),n.find(".pending-storage").remove(),n.append(t.result),n.find(".meta-auto-hide").hide(),n.find(".message-row").last().find(".meta-auto-hide").show(),(o<20||1==e.forceBottomScroll)&&(e.forceBottomScroll=!1,n.scrollTop(i+2e3)),1==confLH.new_message_sound_user_enabled&&"false"==t.uw&&e.playNewMessageSound(),e.last_message_id>0&&($("#msg-"+e.last_message_id).attr("data-op-id")==t.msop&&$("#msg-"+e.last_message_id+" > .usr-tit").text()===$("#msg-"+t.message_id+" > .usr-tit").text()||$("#msg-"+e.last_message_id).next().addClass("operator-changes")),e.last_message_id=t.message_id,"false"==t.uw&&e.isWidgetMode&&"undefined"!=typeof parent&&parent.postMessage("lhc_newopmsg","*")}else"true"!=t.status&&$("#status-chat").html(t.status);if(e.userTimeout=setTimeout(chatsyncuser,confLH.chat_message_sinterval),"t"==t.cs&&e.chatsyncuserpending(),""!=t.ott&&"f"!=t.ott){var s=$("#id-operator-typing");s.text(t.ott),s.css("visibility","visible"),e.operatorTyping=!0}else"f"==t.ott&&(e.operatorTyping=!1,$("#id-operator-typing").css("visibility","hidden"));""!=t.op&&e.executeRemoteCommands(t.op)}else $("#status-chat").html(t.status),$("#ChatMessageContainer").remove(),$("#ChatSendButtonContainer").remove(),$("#id-operator-typing").css("visibility","hidden"),e.operatorTyping=!1,void 0!==t.op&&""!=t.op&&e.executeRemoteCommands(t.op),t.closed&&1==t.closed&&(ee.emitEvent("chatClosedSyncUser",[e.chat_id]),e.isWidgetMode&&"undefined"!=typeof parent&&window.location!==window.parent.location?parent.postMessage("lhc_chat_closed"+(void 0!==t.closed_arg?":"+t.closed_arg:""),"*"):(void 0!==t.closed_arg&&e.parseCloseArgs(t.closed_arg.split(":")),e.chatClosed()))}catch(t){e.userTimeout=setTimeout(chatsyncuser,confLH.chat_message_sinterval)}e.syncroRequestSend=!1},lhinst.parseCloseArgs=function(e){var t=e.length/2;for(i=0;i<t;i++){var n=e[2*i],o=e[2*i+1];"survey_id"==n&&(this.survey=o)}},lhinst.chatClosed=function(){if(null!==this.survey){var e=1==this.isWidgetMode?"/(mode)/widget":"",t=1==this.operatorTyping?"/(ot)/t":"",n=null!==this.theme?"/(theme)/"+this.theme:"",i=1==this.isEmbedMode?"/(modeembed)/embed":"",o=1==this.isWidgetMode?"fillwidget":"fill",s=1==this.explicitClose?"/(eclose)/t":"";return document.location.replace(this.wwwDir+"survey/"+o+"/(survey)/"+this.survey+"/(chatid)/"+this.chat_id+"/(hash)/"+this.hash+e+t+n+i+s),!0}return!1},lhinst.syncusercall=function(){var e=this;if(0==this.syncroRequestSend){clearTimeout(this.userTimeout),this.syncroRequestSend=!0;var t=1==this.isWidgetMode?"/(mode)/widget":"",n=1==this.operatorTyping?"/(ot)/t":"",i=null!==this.theme?"/(theme)/"+this.theme:"",o=1==this.isEmbedMode?"/(modeembed)/embed":"";$.getJSON(this.wwwDir+this.syncuser+this.chat_id+"/"+this.last_message_id+"/"+this.hash+t+n+i+o,{},(function(t){e.updateUserSyncInterface(e,t),LHCCallbacks.syncusercall&&LHCCallbacks.syncusercall(e,t),ee.emitEvent("syncUserCall",[e,t])})).fail((function(){e.syncroRequestSend=!1,e.userTimeout=setTimeout(chatsyncuser,confLH.chat_message_sinterval)}))}},lhinst.scheduleSync=function(){this.syncroRequestSend=!1,clearTimeout(this.userTimeout),this.userTimeout=setTimeout(chatsyncuser,confLH.chat_message_sinterval)},lhinst.executeRemoteCommands=function(operations){var inst=this;$.each(operations,(function(i,item){if(-1!=item.indexOf("lhinst."))try{eval(item)}catch(e){console.log(e)}else if(-1!=item.indexOf("lhc_ui_refresh")){var option=item.split(":")[1];1==option?lhinst.enableFileUpload():lhinst.disableFileUpload()}else inst.isWidgetMode?parent.postMessage(item,"*"):window.opener&&window.opener.postMessage(item,"*")}))},lhinst.disableFileUpload=function(){$("#fileupload").fileupload("destroy"),$("#ChatMessageContainer .dropdown-menu .flex-row .file-uploader").remove()},lhinst.startChatNewWindow=function(e,t){var n=window.open(this.wwwDir+"chat/single/"+e,"chatwindow-chat-id-"+e,"menubar=1,resizable=1,width=800,height=650");if(null!==n){n.focus();var i=this;setTimeout((function(){i.syncadmininterfacestatic()}),1e3),ee.emitEvent("chatStartOpenWindow",[e])}},lhinst.startCoBrowse=function(e){return popupWindow=window.open(this.wwwDir+"cobrowse/browse/"+e,"chatwindow-cobrowse-chat-id-"+e,"menubar=1,resizable=1,width=800,height=650"),null!==popupWindow&&popupWindow.focus(),!1},lhinst.userclosedchat=function(){LHCCallbacks.userleftchatNotification&&LHCCallbacks.userleftchatNotification(this.chat_id),$.ajax({type:"GET",url:this.wwwDir+this.userclosechaturl+this.chat_id+"/"+this.hash,cache:!1})},lhinst.userclosedchatembed=function(){window.postMessage&&"undefined"!=typeof parent&&window.location!==window.parent.location?parent.postMessage("lhc_chat_closed_explicit","*"):0==this.chatClosed()&&window.close()},lhinst.continueChatFromSurvey=function(e){return this.isWidgetMode&&"undefined"!=typeof parent&&window.location!==window.parent.location?$.postJSON(this.wwwDir+"survey/backtochat/"+this.chat_id+"/"+this.hash+"/"+e,(function(e){e.closed?lhinst.userclosedchatembed():parent.postMessage("lhc_continue_chat","*")})):this.chatClosed(),!1},lhinst.explicitChatCloseByUser=function(){return this.explicitClose=!0,ee.emitEvent("endedChat",[]),this.isWidgetMode&&"undefined"!=typeof parent&&window.location!==window.parent.location?parent.postMessage("lhc_chat_closed_explicit","*"):0==this.chatClosed()&&window.close(),!1},lhinst.restoreWidget=function(e){window.postMessage&&window.opener&&(window.opener.postMessage("lhc_ch:hash:"+e,"*"),window.opener.postMessage("lhc_ch:hash_resume:"+e,"*"),window.opener.postMessage("lhc_open_restore","*"),window.close())},lhinst.userclosedchatandbrowser=function(){LHCCallbacks.userleftchatNotification&&LHCCallbacks.userleftchatNotification(this.chat_id),$.get(this.wwwDir+this.userclosechaturl+this.chat_id+"/"+this.hash+"/(eclose)/t",(function(e){lhinst.closeWindow()}))},lhinst.afterUserChatInit=function(){LHCCallbacks.afterUserChatInit&&LHCCallbacks.afterUserChatInit()},lhinst.sendHTML=function(e,t){"undefined"!=typeof parent&&window.location!==window.parent.location&&parent.postMessage("lhc_html_snippet:"+e+":"+t.type+"_"+t.id,"*")},lhinst.setDelay=function(e){var t=e.id,n=e.duration,i=e.delay,o=e.untill_message;i>0&&$("#msg-"+t).addClass("hide"),1==o&&$("#msg-"+t).nextUntil("message-admin").length>0||setTimeout((function(){if(0==lhinst.delayed){if(1==o)clearInterval(lhinst.intervalPending),lhinst.intervalPending=setInterval((function(){if($("#msg-"+t).nextUntil("message-admin").length>0)lhinst.unhideDelayed(t),$("#messagesBlock > #msg-"+t).remove(),clearInterval(lhinst.intervalPending);else if(!$("#msg-"+t).hasClass("meta-hider")){$("#msg-"+t).addClass("meta-hider message-row-typing"),$("#msg-"+t).removeClass("hide"),$("#msg-"+t+" .msg-body").removeClass("hide");var e=$("#messagesBlock"),n=e.prop("scrollHeight");e.find(".meta-auto-hide").hide(),e.find(".message-row").last().find(".meta-auto-hide").show(),n=e.prop("scrollHeight"),e.find(".pending-storage").remove(),e.scrollTop(n+2e3)}}),500);else if(lhinst.delayed=!0,$("#msg-"+t).addClass("meta-hider message-row-typing").nextUntil("meta-hider").addClass("hide"),setTimeout((function(){lhinst.unhideDelayed(t)}),1e3*n),$("#msg-"+t).removeClass("hide"),$("#msg-"+t+" .msg-body").removeClass("hide"),i>0){var e=$("#messagesBlock"),s=e.prop("scrollHeight");e.find(".meta-auto-hide").hide(),e.find(".message-row").last().find(".meta-auto-hide").show(),s=e.prop("scrollHeight"),e.find(".pending-storage").remove(),e.scrollTop(s+2e3)}}else lhinst.delayQueue.push({id:t,delay:n})}),1e3*i)},lhinst.enableFileUpload=function(){$.getJSON(this.wwwDir+"file/fileoptions/"+this.chat_id+"/"+this.hash,(function(e){$("#ChatMessageContainer .dropdown-menu .flex-row").prepend(e.html),e.options.ft_us=new RegExp("(.|/)("+e.options.ft_us+")$","i"),lhinst.addFileUserUpload(e.options)}))},lhinst.chooseFile=function(){document.getElementById("fileupload")&&document.getElementById("fileupload").click()},lhinst.executeExtension=function(e,t){if(null===document.getElementById("ext-"+e)){var n=document.getElementsByTagName("head")[0],i=document.createElement("script"),o=new Date;i.setAttribute("type","text/javascript"),i.setAttribute("src",WWW_DIR_LHC_WEBPACK_ADMIN.replace("/design/defaulttheme/js/admin/dist/","")+"/extension/"+e+"/design/"+e+"theme/js/"+e+".legacy.js?v="+o.getFullYear()+o.getMonth()+o.getDate()),i.setAttribute("id","ext-"+e),n.appendChild(i),i.onreadystatechange=i.onload=function(){ee.emitEvent(e+".init",[t])}}else ee.emitEvent(e+".init",[t])},lhinst.initTypingMonitoringUser=function(e){var t=this.wwwDir,n=this;try{sessionStorage&&sessionStorage.getItem("lhc_ttxt")&&""!=sessionStorage.getItem("lhc_ttxt")&&jQuery("#CSChatMessage").val(sessionStorage.getItem("lhc_ttxt"))}catch(e){}var i=!1;""!=jQuery("#CSChatMessage").val()?($("#lhc-send-icon").show(),$("#lhc-mic-icon").hide()):$("#lhc-mic-icon").length>0&&($("#lhc-send-icon").hide(),$("#lhc-mic-icon").show(),i=!0),jQuery("#CSChatMessage").bind("keyup",(function(o){try{sessionStorage&&sessionStorage.setItem("lhc_ttxt",$(this).val())}catch(e){}var s=$(this)[0];s.style.height="5px",1==i&&(""!=$(this).val()?($("#lhc-send-icon").show(),$("#lhc-mic-icon").hide(),$("#voice-control-message").hide()):($("#lhc-send-icon").hide(),$("#lhc-mic-icon").show()));var r=s.scrollHeight+3;if(r>48&&(r+=10,s.style.overflowY=r>90?"auto":"hidden"),s.style.height=r+"px",0==n.is_typing)clearTimeout(n.typing_timeout),LHCCallbacks.initTypingMonitoringUserInform?(n.typing_timeout=setTimeout((function(){ee.emitEvent("visitorTypingStopped",[{chat_id:e,hash:n.hash}])}),3e3),ee.emitEvent("visitorTyping",[{chat_id:e,hash:n.hash,status:!0,msg:$(this).val()}])):(n.is_typing=!0,$.postJSON(t+"chat/usertyping/"+e+"/"+n.hash+"/true",{msg:$(this).val()},(function(t){n.typing_timeout=setTimeout((function(){n.typingStoppedUser(e)}),3e3),LHCCallbacks.initTypingMonitoringUser&&ee.emitEvent("initVisitorTyping",[e,!0])})).fail((function(){n.typing_timeout=setTimeout((function(){n.typingStoppedUser(e)}),3e3)})));else{clearTimeout(n.typing_timeout),n.typing_timeout=setTimeout((function(){n.typingStoppedUser(e)}),3e3);var a=$(this).val();n.currentMessageText!=a&&Math.abs(n.currentMessageText.length-a.length)>6&&(n.currentMessageText=a,LHCCallbacks.initTypingMonitoringUserInform?ee.emitEvent("visitorTyping",[{chat_id:e,hash:n.hash,status:!0,msg:$(this).val()}]):$.postJSON(t+"chat/usertyping/"+e+"/"+n.hash+"/true",{msg:a},(function(t){LHCCallbacks.initTypingMonitoringUser&&ee.emitEvent("initVisitorTyping",[e,!0])})))}}))},lhinst.typingStoppedUser=function(e){var t=this;1==t.is_typing&&(LHCCallbacks.typingStoppedUserInform?(t.is_typing=!1,ee.emitEvent("visitorTypingStopped",[{chat_id:e,hash:this.hash,status:!1}])):$.getJSON(this.wwwDir+"chat/usertyping/"+e+"/"+this.hash+"/false",{},(function(n){t.is_typing=!1,LHCCallbacks.initTypingMonitoringUser&&ee.emitEvent("initVisitorTyping",[e,!1])})).fail((function(){t.is_typing=!1})))},this.afterChatWidgetInit=function(){LHCCallbacks.afterChatWidgetInit&&LHCCallbacks.afterChatWidgetInit()},function(e){function t(t){if("string"==typeof t.data&&(t.data={keys:t.data}),t.data&&t.data.keys&&"string"==typeof t.data.keys){var n=t.handler,i=t.data.keys.toLowerCase().split(" ");t.handler=function(t){if(this===t.target||!(e.hotkeys.options.filterInputAcceptingElements&&e.hotkeys.textInputTypes.test(t.target.nodeName)||e.hotkeys.options.filterContentEditable&&e(t.target).attr("contenteditable")||e.hotkeys.options.filterTextInputs&&e.inArray(t.target.type,e.hotkeys.textAcceptingInputTypes)>-1)){var o="keypress"!==t.type&&e.hotkeys.specialKeys[t.which],s=String.fromCharCode(t.which).toLowerCase(),r="",a={};e.each(["alt","ctrl","shift"],(function(e,n){t[n+"Key"]&&o!==n&&(r+=n+"+")})),t.metaKey&&!t.ctrlKey&&"meta"!==o&&(r+="meta+"),t.metaKey&&"meta"!==o&&r.indexOf("alt+ctrl+shift+")>-1&&(r=r.replace("alt+ctrl+shift+","hyper+")),o?a[r+o]=!0:(a[r+s]=!0,a[r+e.hotkeys.shiftNums[s]]=!0,"shift+"===r&&(a[e.hotkeys.shiftNums[s]]=!0));for(var l=0,c=i.length;c>l;l++)if(a[i[l]])return n.apply(this,arguments)}}}}e.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",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",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},e.each(["keydown","keyup","keypress"],(function(){e.event.special[this]={add:t}}))}(jQuery||this.jQuery||window.jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}((function(e,t){var n=0,i=Array.prototype.slice,o=e.cleanData;e.cleanData=function(t){for(var n,i=0;null!=(n=t[i]);i++)try{e(n).triggerHandler("remove")}catch(e){}o(t)},e.widget=function(t,n,i){var o,s,r,a,l={},c=t.split(".")[0];t=t.split(".")[1],o=c+"-"+t,i||(i=n,n=e.Widget),e.expr[":"][o.toLowerCase()]=function(t){return!!e.data(t,o)},e[c]=e[c]||{},s=e[c][t],r=e[c][t]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,s,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),(a=new n).options=e.widget.extend({},a.options),e.each(i,(function(t,i){var o,s;e.isFunction(i)?l[t]=(o=function(){return n.prototype[t].apply(this,arguments)},s=function(e){return n.prototype[t].apply(this,e)},function(){var e,t=this._super,n=this._superApply;return this._super=o,this._superApply=s,e=i.apply(this,arguments),this._super=t,this._superApply=n,e}):l[t]=i})),r.prototype=e.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix:t},l,{constructor:r,namespace:c,widgetName:t,widgetFullName:o}),s?(e.each(s._childConstructors,(function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)})),delete s._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r)},e.widget.extend=function(n){for(var o,s,r=i.call(arguments,1),a=0,l=r.length;a<l;a++)for(o in r[a])s=r[a][o],r[a].hasOwnProperty(o)&&s!==t&&(e.isPlainObject(s)?n[o]=e.isPlainObject(n[o])?e.widget.extend({},n[o],s):e.widget.extend({},s):n[o]=s);return n},e.widget.bridge=function(n,o){var s=o.prototype.widgetFullName||n;e.fn[n]=function(r){var a="string"==typeof r,l=i.call(arguments,1),c=this;return r=!a&&l.length?e.widget.extend.apply(null,[r].concat(l)):r,a?this.each((function(){var i,o=e.data(this,s);return o?e.isFunction(o[r])&&"_"!==r.charAt(0)?(i=o[r].apply(o,l))!==o&&i!==t?(c=i&&i.jquery?c.pushStack(i.get()):i,!1):void 0:e.error("no such method '"+r+"' for "+n+" widget instance"):e.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+r+"'")})):this.each((function(){var t=e.data(this,s);t?t.option(r||{})._init():e.data(this,s,new o(r,this))})),c}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,i){var o,s,r,a=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n)if(a={},o=n.split("."),n=o.shift(),o.length){for(s=a[n]=e.widget.extend({},this.options[n]),r=0;r<o.length-1;r++)s[o[r]]=s[o[r]]||{},s=s[o[r]];if(n=o.pop(),i===t)return s[n]===t?null:s[n];s[n]=i}else{if(i===t)return this.options[n]===t?null:this.options[n];a[n]=i}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(t,n,i){var o,s=this;"boolean"!=typeof t&&(i=n,n=t,t=!1),i?(n=o=e(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,o=this.widget()),e.each(i,(function(i,r){function a(){if(t||!0!==s.options.disabled&&!e(this).hasClass("ui-state-disabled"))return("string"==typeof r?s[r]:r).apply(s,arguments)}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||e.guid++);var l=i.match(/^(\w+)\s*(.*)$/),c=l[1]+s.eventNamespace,u=l[2];u?o.delegate(u,c,a):n.bind(c,a)}))},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){var n=this;return setTimeout((function(){return("string"==typeof e?n[e]:e).apply(n,arguments)}),t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,n,i){var o,s,r=this.options[t];if(i=i||{},(n=e.Event(n)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),n.target=this.element[0],s=n.originalEvent)for(o in s)o in n||(n[o]=s[o]);return this.element.trigger(n,i),!(e.isFunction(r)&&!1===r.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,n){e.Widget.prototype["_"+t]=function(i,o,s){"string"==typeof o&&(o={effect:o});var r,a=o?!0===o||"number"==typeof o?n:o.effect||n:t;"number"==typeof(o=o||{})&&(o={duration:o}),r=!e.isEmptyObject(o),o.complete=s,o.delay&&i.delay(o.delay),r&&e.effects&&e.effects.effect[a]?i[t](o):a!==t&&i[a]?i[a](o.duration,o.easing,s):i.queue((function(n){e(this)[t](),s&&s.call(i[0]),n()}))}}))})),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(window.jQuery)}((function(e){"use strict";var t=0;e.ajaxTransport("iframe",(function(n){if(n.async){var i,o,s,r=n.initialIframeSrc||"javascript:false;";return{send:function(a,l){(i=e('<form style="display:none;"></form>')).attr("accept-charset",n.formAcceptCharset),s=/\?/.test(n.url)?"&":"?","DELETE"===n.type?(n.url=n.url+s+"_method=DELETE",n.type="POST"):"PUT"===n.type?(n.url=n.url+s+"_method=PUT",n.type="POST"):"PATCH"===n.type&&(n.url=n.url+s+"_method=PATCH",n.type="POST"),o=e('<iframe src="'+r+'" name="iframe-transport-'+(t+=1)+'"></iframe>').bind("load",(function(){var t,s=e.isArray(n.paramName)?n.paramName:[n.paramName];o.unbind("load").bind("load",(function(){var t;try{if(!(t=o.contents()).length||!t[0].firstChild)throw new Error}catch(e){t=void 0}l(200,"success",{iframe:t}),e('<iframe src="'+r+'"></iframe>').appendTo(i),window.setTimeout((function(){i.remove()}),0)})),i.prop("target",o.prop("name")).prop("action",n.url).prop("method",n.type),n.formData&&e.each(n.formData,(function(t,n){e('<input type="hidden"/>').prop("name",n.name).val(n.value).appendTo(i)})),n.fileInput&&n.fileInput.length&&"POST"===n.type&&(t=n.fileInput.clone(),n.fileInput.after((function(e){return t[e]})),n.paramName&&n.fileInput.each((function(t){e(this).prop("name",s[t]||n.paramName)})),i.append(n.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")),i.submit(),t&&t.length&&n.fileInput.each((function(n,i){var o=e(t[n]);e(i).prop("name",o.prop("name")),o.replaceWith(i)}))})),i.append(o).appendTo(document.body)},abort:function(){o&&o.unbind("load").prop("src",r),i&&i.remove()}}}})),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&e.parseJSON(e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var n=t&&t[0];return n&&e.isXMLDoc(n)?n:e.parseXML(n.XMLDocument&&n.XMLDocument.xml||e(n.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})})),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery.ui.widget"],e):e(window.jQuery)}((function(e){"use strict";e.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||e('<input type="file">').prop("disabled")),e.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),e.support.xhrFormDataFileUpload=!!window.FormData,e.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:e(document),fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(t,n){return t=this.messages[t]||t.toString(),n&&e.each(n,(function(e,n){t=t.replace("{"+e+"}",n)})),t},formData:function(e){return e.serializeArray()},add:function(t,n){if(t.isDefaultPrevented())return!1;(n.autoUpload||!1!==n.autoUpload&&e(this).fileupload("option","autoUpload"))&&n.process().done((function(){n.submit()}))},processData:!1,contentType:!1,cache:!1},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:e.support.blobSlice&&function(){var e=this.slice||this.webkitSlice||this.mozSlice;return e.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,n){var i=e-this.timestamp;return(!this.bitrate||!n||i>n)&&(this.bitrate=(t-this.loaded)*(1e3/i)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var n;return"function"==typeof t.formData?t.formData(t.form):e.isArray(t.formData)?t.formData:"object"===e.type(t.formData)?(n=[],e.each(t.formData,(function(e,t){n.push({name:e,value:t})})),n):[]},_getTotal:function(t){var n=0;return e.each(t,(function(e,t){n+=t.size||1})),n},_initProgressObject:function(t){var n={loaded:0,total:0,bitrate:0};t._progress?e.extend(t._progress,n):t._progress=n},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)e._response.hasOwnProperty(t)&&delete e._response[t];else e._response={}},_onProgress:function(t,n){if(t.lengthComputable){var i,o=Date.now?Date.now():(new Date).getTime();if(n._time&&n.progressInterval&&o-n._time<n.progressInterval&&t.loaded!==t.total)return;n._time=o,i=Math.floor(t.loaded/t.total*(n.chunkSize||n._progress.total))+(n.uploadedBytes||0),this._progress.loaded+=i-n._progress.loaded,this._progress.bitrate=this._bitrateTimer.getBitrate(o,this._progress.loaded,n.bitrateInterval),n._progress.loaded=n.loaded=i,n._progress.bitrate=n.bitrate=n._bitrateTimer.getBitrate(o,i,n.bitrateInterval),this._trigger("progress",e.Event("progress",{delegatedEvent:t}),n),this._trigger("progressall",e.Event("progressall",{delegatedEvent:t}),this._progress)}},_initProgressListener:function(t){var n=this,i=t.xhr?t.xhr():e.ajaxSettings.xhr();i.upload&&(e(i.upload).bind("progress",(function(e){var i=e.originalEvent;e.lengthComputable=i.lengthComputable,e.loaded=i.loaded,e.total=i.total,n._onProgress(e,t)})),t.xhr=function(){return i})},_isInstanceOf:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},_initXHRData:function(t){var n,i=this,o=t.files[0],s=t.multipart||!e.support.xhrFileUpload,r=t.paramName[0];t.headers=e.extend({},t.headers),t.contentRange&&(t.headers["Content-Range"]=t.contentRange),s&&!t.blob&&this._isInstanceOf("File",o)||(t.headers["Content-Disposition"]='attachment; filename="'+encodeURI(o.name)+'"'),s?e.support.xhrFormDataFileUpload&&(t.postMessage?(n=this._getFormData(t),t.blob?n.push({name:r,value:t.blob}):e.each(t.files,(function(e,i){n.push({name:t.paramName[e]||r,value:i})}))):(i._isInstanceOf("FormData",t.formData)?n=t.formData:(n=new FormData,e.each(this._getFormData(t),(function(e,t){n.append(t.name,t.value)}))),t.blob?n.append(r,t.blob,o.name):e.each(t.files,(function(e,o){(i._isInstanceOf("File",o)||i._isInstanceOf("Blob",o))&&n.append(t.paramName[e]||r,o,o.name)}))),t.data=n):(t.contentType=o.type,t.data=t.blob||o),t.blob=null},_initIframeSettings:function(t){var n=e("<a></a>").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&n&&n!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(t){var n=e(t.fileInput),i=t.paramName;return i?e.isArray(i)||(i=[i]):(i=[],n.each((function(){for(var t=e(this),n=t.prop("name")||"files[]",o=(t.prop("files")||[1]).length;o;)i.push(n),o-=1})),i.length||(i=[n.prop("name")||"files[]"])),i},_initFormSettings:function(t){t.form&&t.form.length||(t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||"string"===e.type(t.form.prop("method"))&&t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&"PATCH"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var n=e.extend({},this.options,t);return this._initFormSettings(n),this._initDataSettings(n),n},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,n,i){var o=e.Deferred(),s=o.promise();return n=n||this.options.context||s,!0===t?o.resolveWith(n,i):!1===t&&o.rejectWith(n,i),s.abort=o.promise,this._enhancePromise(s)},_addConvenienceMethods:function(t,n){var i=this,o=function(t){return e.Deferred().resolveWith(i,t).promise()};n.process=function(t,s){return(t||s)&&(n._processQueue=this._processQueue=(this._processQueue||o([this])).pipe((function(){return n.errorThrown?e.Deferred().rejectWith(i,[n]).promise():o(arguments)})).pipe(t,s)),this._processQueue||o([this])},n.submit=function(){return"pending"!==this.state()&&(n.jqXHR=this.jqXHR=!1!==i._trigger("submit",e.Event("submit",{delegatedEvent:t}),this)&&i._onSend(t,this)),this.jqXHR||i._getXHRPromise()},n.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",i._getXHRPromise())},n.state=function(){return this.jqXHR?i._getDeferredState(this.jqXHR):this._processQueue?i._getDeferredState(this._processQueue):void 0},n.progress=function(){return this._progress},n.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),n=t&&t.split("-"),i=n&&n.length>1&&parseInt(n[1],10);return i&&i+1},_chunkedUpload:function(t,n){t.uploadedBytes=t.uploadedBytes||0;var i,o,s=this,r=t.files[0],a=r.size,l=t.uploadedBytes,c=t.maxChunkSize||a,u=this._blobSlice,d=e.Deferred(),h=d.promise();return!(!(this._isXHRUpload(t)&&u&&(l||c<a))||t.data)&&(!!n||(l>=a?(r.error=t.i18n("uploadedBytes"),this._getXHRPromise(!1,t.context,[null,"error",r.error])):(o=function(){var n=e.extend({},t),h=n._progress.loaded;n.blob=u.call(r,l,l+c,r.type),n.chunkSize=n.blob.size,n.contentRange="bytes "+l+"-"+(l+n.chunkSize-1)+"/"+a,s._initXHRData(n),s._initProgressListener(n),i=(!1!==s._trigger("chunksend",null,n)&&e.ajax(n)||s._getXHRPromise(!1,n.context)).done((function(i,r,c){l=s._getUploadedBytes(c)||l+n.chunkSize,h+n.chunkSize-n._progress.loaded&&s._onProgress(e.Event("progress",{lengthComputable:!0,loaded:l-n.uploadedBytes,total:l-n.uploadedBytes}),n),t.uploadedBytes=n.uploadedBytes=l,n.result=i,n.textStatus=r,n.jqXHR=c,s._trigger("chunkdone",null,n),s._trigger("chunkalways",null,n),l<a?o():d.resolveWith(n.context,[i,r,c])})).fail((function(e,t,i){n.jqXHR=e,n.textStatus=t,n.errorThrown=i,s._trigger("chunkfail",null,n),s._trigger("chunkalways",null,n),d.rejectWith(n.context,[e,t,i])}))},this._enhancePromise(h),h.abort=function(){return i.abort()},o(),h)))},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(t,n,i,o){var s=o._progress.total,r=o._response;o._progress.loaded<s&&this._onProgress(e.Event("progress",{lengthComputable:!0,loaded:s,total:s}),o),r.result=o.result=t,r.textStatus=o.textStatus=n,r.jqXHR=o.jqXHR=i,this._trigger("done",null,o)},_onFail:function(e,t,n,i){var o=i._response;i.recalculateProgress&&(this._progress.loaded-=i._progress.loaded,this._progress.total-=i._progress.total),o.jqXHR=i.jqXHR=e,o.textStatus=i.textStatus=t,o.errorThrown=i.errorThrown=n,this._trigger("fail",null,i)},_onAlways:function(e,t,n,i){this._trigger("always",null,i)},_onSend:function(t,n){n.submit||this._addConvenienceMethods(t,n);var i,o,s,r,a=this,l=a._getAJAXSettings(n),c=function(){return a._sending+=1,l._bitrateTimer=new a._BitrateTimer,i=i||((o||!1===a._trigger("send",e.Event("send",{delegatedEvent:t}),l))&&a._getXHRPromise(!1,l.context,o)||a._chunkedUpload(l)||e.ajax(l)).done((function(e,t,n){a._onDone(e,t,n,l)})).fail((function(e,t,n){a._onFail(e,t,n,l)})).always((function(e,t,n){if(a._onAlways(e,t,n,l),a._sending-=1,a._active-=1,l.limitConcurrentUploads&&l.limitConcurrentUploads>a._sending)for(var i=a._slots.shift();i;){if("pending"===a._getDeferredState(i)){i.resolve();break}i=a._slots.shift()}0===a._active&&a._trigger("stop")}))};return this._beforeSend(t,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(s=e.Deferred(),this._slots.push(s),r=s.pipe(c)):(this._sequence=this._sequence.pipe(c,c),r=this._sequence),r.abort=function(){return o=[void 0,"abort","abort"],i?i.abort():(s&&s.rejectWith(l.context,o),c())},this._enhancePromise(r)):c()},_onAdd:function(t,n){var i,o,s,r,a=this,l=!0,c=e.extend({},this.options,n),u=c.limitMultiFileUploads,d=this._getParamName(c);if((c.singleFileUploads||u)&&this._isXHRUpload(c))if(!c.singleFileUploads&&u)for(s=[],i=[],r=0;r<n.files.length;r+=u)s.push(n.files.slice(r,r+u)),(o=d.slice(r,r+u)).length||(o=d),i.push(o);else i=d;else s=[n.files],i=[d];return n.originalFiles=n.files,e.each(s||n.files,(function(o,r){var c=e.extend({},n);return c.files=s?r:[r],c.paramName=i[o],a._initResponseObject(c),a._initProgressObject(c),a._addConvenienceMethods(t,c),l=a._trigger("add",e.Event("add",{delegatedEvent:t}),c)})),l},_replaceFileInput:function(t){var n=t.clone(!0);e("<form></form>").append(n)[0].reset(),t.after(n).detach(),e.cleanData(t.unbind("remove")),this.options.fileInput=this.options.fileInput.map((function(e,i){return i===t[0]?n[0]:i})),t[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(t,n){var i=this,o=e.Deferred(),s=function(e){e&&!e.entry&&(e.entry=t),o.resolve([e])};return n=n||"",t.isFile?t._file?(t._file.relativePath=n,o.resolve(t._file)):t.file((function(e){e.relativePath=n,o.resolve(e)}),s):t.isDirectory?t.createReader().readEntries((function(e){i._handleFileTreeEntries(e,n+t.name+"/").done((function(e){o.resolve(e)})).fail(s)}),s):o.resolve([]),o.promise()},_handleFileTreeEntries:function(t,n){var i=this;return e.when.apply(e,e.map(t,(function(e){return i._handleFileTreeEntry(e,n)}))).pipe((function(){return Array.prototype.concat.apply([],arguments)}))},_getDroppedFiles:function(t){var n=(t=t||{}).items;return n&&n.length&&(n[0].webkitGetAsEntry||n[0].getAsEntry)?this._handleFileTreeEntries(e.map(n,(function(e){var t;return e.webkitGetAsEntry?((t=e.webkitGetAsEntry())&&(t._file=e.getAsFile()),t):e.getAsEntry()}))):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){var n,i,o=(t=e(t)).prop("webkitEntries")||t.prop("entries");if(o&&o.length)return this._handleFileTreeEntries(o);if((n=e.makeArray(t.prop("files"))).length)void 0===n[0].name&&n[0].fileName&&e.each(n,(function(e,t){t.name=t.fileName,t.size=t.fileSize}));else{if(!(i=t.prop("value")))return e.Deferred().resolve([]).promise();n=[{name:i.replace(/^.*\\/,"")}]}return e.Deferred().resolve(n).promise()},_getFileInputFiles:function(t){return t instanceof e&&1!==t.length?e.when.apply(e,e.map(t,this._getSingleFileInputFiles)).pipe((function(){return Array.prototype.concat.apply([],arguments)})):this._getSingleFileInputFiles(t)},_onChange:function(t){var n=this,i={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(i.fileInput).always((function(o){i.files=o,n.options.replaceFileInput&&n._replaceFileInput(i.fileInput),!1!==n._trigger("change",e.Event("change",{delegatedEvent:t}),i)&&n._onAdd(t,i)}))},_onPaste:function(t){var n=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,i={files:[]};n&&n.length&&(e.each(n,(function(e,t){var n=t.getAsFile&&t.getAsFile();n&&i.files.push(n)})),!1!==this._trigger("paste",e.Event("paste",{delegatedEvent:t}),i)&&this._onAdd(t,i))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var n=this,i=t.dataTransfer,o={};i&&i.files&&i.files.length&&(t.preventDefault(),this._getDroppedFiles(i).always((function(i){o.files=i,!1!==n._trigger("drop",e.Event("drop",{delegatedEvent:t}),o)&&n._onAdd(t,o)})))},_onDragOver:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var n=t.dataTransfer;n&&-1!==e.inArray("Files",n.types)&&!1!==this._trigger("dragover",e.Event("dragover",{delegatedEvent:t}))&&(t.preventDefault(),n.dropEffect="copy")},_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop}),this._on(this.options.pasteZone,{paste:this._onPaste})),e.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(t,n){var i=-1!==e.inArray(t,this._specialOptions);i&&this._destroyEventHandlers(),this._super(t,n),i&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;void 0===t.fileInput?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_getRegExp:function(e){var t=e.split("/"),n=t.pop();return t.shift(),new RegExp(t.join("/"),n)},_isRegExpOption:function(t,n){return"url"!==t&&"string"===e.type(n)&&/^\/.*\/[igm]{0,3}$/.test(n)},_initDataAttributes:function(){var t=this,n=this.options;e.each(e(this.element[0].cloneNode(!1)).data(),(function(e,i){t._isRegExpOption(e,i)&&(i=t._getRegExp(i)),n[e]=i}))},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var n=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always((function(e){t.files=e,n._onAdd(null,t)})):(t.files=e.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var n,i,o=this,s=e.Deferred(),r=s.promise();return r.abort=function(){return i=!0,n?n.abort():(s.reject(null,"abort","abort"),r)},this._getFileInputFiles(t.fileInput).always((function(e){i||(e.length?(t.files=e,n=o._onSend(null,t).then((function(e,t,n){s.resolve(e,t,n)}),(function(e,t,n){s.reject(e,t,n)}))):s.reject())})),this._enhancePromise(r)}if(t.files=e.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})})),(()=>{var e,t={},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,i),s.exports}i.m=t,i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((t,n)=>(i.f[n](e,t),t),[])),i.u=e=>e+"-"+{49:"7801a3ac3cd7e69036bc",482:"3c0f1aafb370310ea978",737:"f2ef8981e32974c33f6e"}[e]+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},i.l=(t,n,o,s)=>{if(e[t])e[t].push(n);else{var r,a;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var u=l[c];if(u.getAttribute("src")==t){r=u;break}}r||(a=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,i.nc&&r.setAttribute("nonce",i.nc),r.src=t),e[t]=[n];var d=(n,i)=>{r.onerror=r.onload=null,clearTimeout(h);var o=e[t];if(delete e[t],r.parentNode&&r.parentNode.removeChild(r),o&&o.forEach(e=>e(i)),n)return n(i)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=d.bind(null,r.onerror),r.onload=d.bind(null,r.onload),a&&document.head.appendChild(r)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="/",(()=>{var e={179:0};i.f.j=(t,n)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var s=new Promise((n,i)=>o=e[t]=[n,i]);n.push(o[2]=s);var r=i.p+i.u(t),a=new Error;i.l(r,n=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var s=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;a.message="Loading chunk "+t+" failed.\n("+s+": "+r+")",a.name="ChunkLoadError",a.type=s,a.request=r,o[1](a)}},"chunk-"+t,t)}};var t=(t,n)=>{var o,s,[r,a,l]=n,c=0;if(r.some(t=>0!==e[t])){for(o in a)i.o(a,o)&&(i.m[o]=a[o]);l&&l(i)}for(t&&t(n);c<r.length;c++)s=r[c],i.o(e,s)&&e[s]&&e[s][0](),e[r[c]]=0},n=self.webpackChunk=self.webpackChunk||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.p=window.WWW_DIR_LHC_WEBPACK,i.g.lhc={previewChat:function(e){this.revealModal({url:WWW_DIR_JAVASCRIPT+"chat/previewchat/"+e})},previewChatArchive:function(e,t){this.revealModal({url:WWW_DIR_JAVASCRIPT+"chatarchive/previewchat/"+e+"/"+t})},revealModal:function(e){i.e(737).then(function(){var t=i(737);t.initializeModal(),t.revealModal(e)}.bind(null,i)).catch(i.oe)},methodCall:function(e,t,n){Promise.all([i.e(49),i.e(482)]).then((function(){(function(){i(482)("./"+e+".js")[t](n)}).apply(null,[])})).catch(i.oe)}}})(),function(e){"use strict";function t(){}function n(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function i(e){return function(){return this[e].apply(this,arguments)}}var o=t.prototype,s=e.EventEmitter;o.getListeners=function(e){var t,n,i=this._getEvents();if(e instanceof RegExp)for(n in t={},i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n]);else t=i[e]||(i[e]=[]);return t},o.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},o.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},o.addListener=function(e,t){if(!function e(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&e(t.listener)}(t))throw new TypeError("listener must be a function");var i,o=this.getListenersAsObject(e),s="object"==typeof t;for(i in o)o.hasOwnProperty(i)&&-1===n(o[i],t)&&o[i].push(s?t:{listener:t,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(e){return this.getListeners(e),this},o.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},o.removeListener=function(e,t){var i,o,s=this.getListenersAsObject(e);for(o in s)s.hasOwnProperty(o)&&-1!==(i=n(s[o],t))&&s[o].splice(i,1);return this},o.off=i("removeListener"),o.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},o.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},o.manipulateListeners=function(e,t,n){var i,o,s=e?this.removeListener:this.addListener,r=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)s.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(o=t[i])&&("function"==typeof o?s.call(this,i,o):r.call(this,i,o));return this},o.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if(e instanceof RegExp)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(e,t){var n,i,o,s,r=this.getListenersAsObject(e);for(s in r)if(r.hasOwnProperty(s))for(n=r[s].slice(0),o=0;o<n.length;o++)!0===(i=n[o]).once&&this.removeListener(e,i.listener),i.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},o.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},o._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return e.EventEmitter=s,t},"function"==typeof define&&define.amd?define((function(){return t})):"object"==typeof module&&module.exports?module.exports=t:e.EventEmitter=t}("undefined"!=typeof window?window:this||{});var ee=new EventEmitter,notificationsLHC={sendNotification:function(){window.postMessage&&"undefined"!=typeof parent&&parent.postMessage("lhc_notification:just_testing","*")}};
//# sourceMappingURL=92c662aef48d161414ff30d7179a89cc.js.map
