PageSourceSearch

https://tmetric.com/js/v3/site.min.js

js tmetric.com collected 2026-09-24 10:04:56 UTC 292,355 bytes, 3,920 lines download raw bytes

vendor: 15,125 bytes, lines 1-2
1/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}
vendor: 4,356 bytes, line 2
2:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];
vendor: 10,068 bytes, line 2
2if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pe
vendor: 8,547 bytes, line 2
2nding",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone
vendor: 51,404 bytes, line 2
2=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
2
3
4/*!
5  * Bootstrap v4.6.1 (https://getbootstrap.com/)
6  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
7  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8  */
9!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=n(e);function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}function a(){return a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},a.apply(this,arguments)}
vendor: 4,200 bytes, line 9
9function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var l="transitionend";var u={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=i.default(t).css("transition-duration"),n=i.default(t).css("transition-delay"),o=parseFloat(e),r=parseFloat(n);return o||r?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i.default(t).trigger(l)},supportsTransitionEnd:function(){return Boolean(l)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],a=r&&u.isElement(r)?"element":null===(s=r)||"undefined"==typeof s?""+s:{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(a))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+o+'".')}var s},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof i.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=i.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};u.jQueryDetection(),i.default.fn.emulateTransitionEnd=function(t){var e=this,n=!1;return i.default(this).one(u.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||u.triggerTransitionEnd(e)}),t),this},i.default.event.special[u.TRANSITION_END]={bindType:l,delegateType:l,handle:function(t){if(i.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var f="bs.alert",d=i.default.fn.alert,c=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){i.default.removeData(this._element,f),this._element=null},e._getRootElement=function(t){var e=u.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=i.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=i.default.Event("close.bs.alert");return i.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(i.default(t).removeClass("show"),i.default(t).hasClass("fade")){var n=u.getTransitionDurationFromElement(t);i.default(t).one(u.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){i.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(f);o||(o=new t(this),n.data(f,o)),"close"===e&&o[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',c._handleDismiss(new c)),i.default.fn.alert=c._jQueryInterface,i.default.fn.alert.Constructor=c,i.default.fn.alert.noConflict=function(){return i.default.fn.alert=d,c._jQueryInterface};var h="bs.button",p=i.default.fn.button,m="active",g='[data-toggle^="button"]',_='input:not([type="hidden"])',v=".btn",b=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=i.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var o=this._element.querySelector(_);
9if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains(m))t=!1;else{var r=n.querySelector(".active");r&&i.default(r).removeClass(m)}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains(m)),this.shouldAvoidTriggerChange||i.default(o).trigger("change")),o.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(m)),t&&i.default(this._element).toggleClass(m))},e.dispose=function(){i.default.removeData(this._element,h),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this),r=o.data(h);r||(r=new t(this),o.data(h,r)),r.shouldAvoidTriggerChange=n,"toggle"===e&&r[e]()}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.button.data-api",g,(function(t){var e=t.target,n=e;if(i.default(e).hasClass("btn")||(e=i.default(e).closest(v)[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var o=e.querySelector(_);if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||b._jQueryInterface.call(i.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",g,(function(t){var e=i.default(t.target).closest(v)[0];i.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),i.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector(_);o.checked||o.hasAttribute("checked")?i.classList.add(m):i.classList.remove(m)}for(var r=0,a=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;r<a;r++){var s=t[r];"true"===s.getAttribute("aria-pressed")?s.classList.add(m):s.classList.remove(m)}})),i.default.fn.button=b._jQueryInterface,i.default.fn.button.Constructor=b,i.default.fn.button.noConflict=function(){return i.default.fn.button=p,b._jQueryInterface};var y="carousel",E="bs.carousel",w=i.default.fn[y],T="active",C="next",S="prev",N="slid.bs.carousel",D=".active.carousel-item",A={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},k={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},I={TOUCH:"touch",PEN:"pen"},O=function(){function t(t,e){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(e),this._element=t,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 e=t.prototype;return e.next=function(){this._isSliding||this._slide(C)},e.nextWhenVisible=function(){var t=i.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(S)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(u.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(D);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)i.default(this._element).one(N,(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var o=t>n?C:S;this._slide(o,this._items[t])}}
vendor: 5,111 bytes, line 9
9,e.dispose=function(){i.default(this._element).off(".bs.carousel"),i.default.removeData(this._element,E),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=a({},A,t),u.typeCheckConfig(y,t,k),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&i.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&i.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&I[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&I[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};i.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(i.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(i.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),i.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),i.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===C,i=t===S,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var a=(o+(t===S?-1:1))%this._items.length;return-1===a?this._items[this._items.length-1]:this._items[a]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(D)),r=i.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:o,to:n});return i.default(this._element).trigger(r),r},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));i.default(e).removeClass(T);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&i.default(n).addClass(T)}},e._updateInterval=function(){var t=this._activeElement||this._element.querySelector(D);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},e._slide=function(t,e){var n,o,r,a=this,s=this._element.querySelector(D),l=this._getItemIndex(s),f=e||s&&this._getItemByDirection(t,s),d=this._getItemIndex(f),c=Boolean(this._interval);if(t===C?(n="carousel-item-left",o="carousel-item-next",r="left"):(n="carousel-item-right",o="carousel-item-prev",r="right"),f&&i.default(f).hasClass(T))this._isSliding=!1;else if(!this._triggerSlideEvent(f,r).isDefaultPrevented()&&s&&f){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(f),this._activeElement=f;var h=i.default.Event(N,{relatedTarget:f,direction:r,from:l,to:d});if(i.default(this._element).hasClass("slide")){i.default(f).addClass(o),u.reflow(f),i.default(s).addClass(n),i.default(f).addClass(n);var p=u.getTransitionDurationFromElement(s);i.default(s).one(u.TRANSITION_END,(function(){i.default(f).removeClass(n+" "+o).addClass(T),i.default(s).removeClass("active "+o+" "+n),a._isSliding=!1,setTimeout((function(){return i.default(a._element).trigger(h)}),0)})).emulateTransitionEnd(p)}else i.default(s).removeClass(T),i.default(f).addClass(T),this._isSliding=!1,i.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(E),o=a({},A,i.default(this).data());"object"==typeof e&&(o=a({},o,e));var r="string"==typeof e?e:o.slide;if(n||(n=new t(this,o),i.default(this).data(E,n)),"number"==typeof e)n.to(e);else if("string"==typeof r){if("undefined"==typeof n[r])throw new TypeError('No method n
9amed "'+r+'"');n[r]()}else o.interval&&o.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=u.getSelectorFromElement(this);if(n){var o=i.default(n)[0];if(o&&i.default(o).hasClass("carousel")){var r=a({},i.default(o).data(),i.default(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),t._jQueryInterface.call(i.default(o),r),s&&i.default(o).data(E).to(s),e.preventDefault()}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return A}}]),t}();i.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",O._dataApiClickHandler),i.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e<n;e++){var o=i.default(t[e]);O._jQueryInterface.call(o,o.data())}})),i.default.fn[y]=O._jQueryInterface,i.default.fn[y].Constructor=O,i.default.fn[y].noConflict=function(){return i.default.fn[y]=w,O._jQueryInterface};var x="collapse",j="bs.collapse",L=i.default.fn[x],P="show",F="collapse",R="collapsing",H="collapsed",M="width",q='[data-toggle="collapse"]',B={toggle:!0,parent:""},Q={toggle:"boolean",parent:"(string|element)"},W=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(q)),i=0,o=n.length;i<o;i++){var r=n[i],a=u.getSelectorFromElement(r),s=[].slice.call(document.querySelectorAll(a)).filter((function(e){return e===t}));null!==a&&s.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 e=t.prototype;return e.toggle=function(){i.default(this._element).hasClass(P)?this.hide():this.show()},e.show=function(){var e,n,o=this;if(!(this._isTransitioning||i.default(this._element).hasClass(P)||(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains(F)}))).length&&(e=null),e&&(n=i.default(e).not(this._selector).data(j))&&n._isTransitioning))){var r=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(r),!r.isDefaultPrevented()){e&&(t._jQueryInterface.call(i.default(e).not(this._selector),"hide"),n||i.default(e).data(j,null));var a=this._getDimension();i.default(this._element).removeClass(F).addClass(R),this._element.style[a]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass(H).attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(a[0].toUpperCase()+a.slice(1)),l=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(){i.default(o._element).removeClass(R).addClass("collapse show"),o._element.style[a]="",o.setTransitioning(!1),i.default(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(l),this._element.style[a]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&i.default(this._element).hasClass(P)){var e=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",u.reflow(this._element),i.default(this._element).addClass(R).removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var r=0;r<o;r++){var a=this._triggerArray[r],s=u.getSelectorFromElement(a);null!==s&&(i.default([].slice.call(document.querySelectorAll(s))).hasClass(P)||i.default(a).addClass(H).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[n]="";var l=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(){t.setTransitioning(!1),i.default(t._element).removeClass(R).addClass(F).trigger("hidden.bs.collapse")})).emulateTransitionEnd(l)}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){i.default.removeData(this._element,j),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=a({},B,t)).toggle=Boolean(t.toggle),u.typeCheckConfig(x,t,Q),t},e._getDimension=function(){return i.default(this._element).hasClass(M)?M:"height"},e._getParent=function(){var e,n=this;u.isElement(this._config.parent)?(e=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',r=[].slice.call(e.querySelectorAll(
9o));return i.default(r).each((function(e,i){n._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])})),e},e._addAriaAndCollapsedClass=function(t,e){var n=i.default(t).hasClass(P);e.length&&i.default(e).toggleClass(H,!n).attr("aria-expanded",n)},t._getTargetFromElement=function(t){var e=u.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(j),r=a({},B,n.data(),"object"==typeof e&&e?e:{});if(!o&&r.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(r.toggle=!1),o||(o=new t(this,r),n.data(j,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return B}}]),t}();i.default(document).on("click.bs.collapse.data-api",q,(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=i.default(this),n=u.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(n));i.default(o).each((function(){var t=i.default(this),n=t.data(j)?"toggle":e.data();W._jQueryInterface.call(t,n)}))})),i.default.fn[x]=W._jQueryInterface,i.default.fn[x].Constructor=W,i.default.fn[x].noConflict=function(){return i.default.fn[x]=L,W._jQueryInterface};var U="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,V=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(U&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}(),Y=U&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),V))}};function z(t){return t&&"[object Function]"==={}.toString.call(t)}function K(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function X(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function G(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=K(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:G(X(t))}function $(t){return t&&t.referenceNode?t.referenceNode:t}var J=U&&!(!window.MSInputMethodContext||!document.documentMode),Z=U&&/MSIE 10/.test(navigator.userAgent);function tt(t){return 11===t?J:10===t?Z:J||Z}function et(t){if(!t)return document.documentElement;for(var e=tt(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===K(n,"position")?et(n):n:t?t.ownerDocument.documentElement:document.documentElement}function nt(t){return null!==t.parentNode?nt(t.parentNode):t}function it(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var a,s,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&et(a.firstElementChild)!==a?et(l):l;var u=nt(t);return u.host?it(u.host,e):it(t,nt(e).host)}function ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement,r=t.ownerDocument.scrollingElement||o;return r[n]}return t[n]}function rt(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=ot(e,"top"),o=ot(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}function at(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function st(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],tt(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function lt(t){var e=t.body,n=t.documentElement,i=tt(10)&&getComputedStyle(n);return{height:st("Height",e,n,i),width:st("Width",e,n,i)}}var ut=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ft=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),dt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},ct=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function ht(t){return ct({},t,{right:t.left+t.width,bottom:t.top+t.height})}function pt(t){var e={};try{if(tt(10)){e=t.getBoundingClientRect();var n=ot(t,"top"),i=ot(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?lt(t.ownerDocument):{},a=r.width||t.clientWidth||o.width,s=r.height||t.clientHeight||o.height,l=t.offsetWidth-a,u=t.offsetHeight-s;if(l||u){var f=K(t);l-=at(f,"x"),u-=at(f,"y"),o.width-=l,o.height-=u}return ht(o)}function mt(t,e){var n=arguments.length>
vendor: 14,703 bytes, line 9
92&&void 0!==arguments[2]&&arguments[2],i=tt(10),o="HTML"===e.nodeName,r=pt(t),a=pt(e),s=G(t),l=K(e),u=parseFloat(l.borderTopWidth),f=parseFloat(l.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=ht({top:r.top-a.top-u,left:r.left-a.left-f,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!i&&o){var c=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=u-c,d.bottom-=u-c,d.left-=f-h,d.right-=f-h,d.marginTop=c,d.marginLeft=h}return(i&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(d=rt(d,e)),d}function gt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=mt(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:ot(n),s=e?0:ot(n,"left"),l={top:a-i.top+i.marginTop,left:s-i.left+i.marginLeft,width:o,height:r};return ht(l)}function _t(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===K(t,"position"))return!0;var n=X(t);return!!n&&_t(n)}function vt(t){if(!t||!t.parentElement||tt())return document.documentElement;for(var e=t.parentElement;e&&"none"===K(e,"transform");)e=e.parentElement;return e||document.documentElement}function bt(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},a=o?vt(t):it(t,$(e));if("viewport"===i)r=gt(a,o);else{var s=void 0;"scrollParent"===i?"BODY"===(s=G(X(e))).nodeName&&(s=t.ownerDocument.documentElement):s="window"===i?t.ownerDocument.documentElement:i;var l=mt(s,a,o);if("HTML"!==s.nodeName||_t(a))r=l;else{var u=lt(t.ownerDocument),f=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=f+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}var c="number"==typeof(n=n||0);return r.left+=c?n:n.left||0,r.top+=c?n:n.top||0,r.right-=c?n:n.right||0,r.bottom-=c?n:n.bottom||0,r}function yt(t){return t.width*t.height}function Et(t,e,n,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=bt(n,i,r,o),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return ct({key:t},s[t],{area:yt(s[t])})})).sort((function(t,e){return e.area-t.area})),u=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),f=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return f+(d?"-"+d:"")}function wt(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=i?vt(e):it(e,$(n));return mt(n,o,i)}function Tt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function Ct(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function St(t,e,n){n=n.split("-")[0];var i=Tt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",u=r?"width":"height";return o[a]=e[a]+e[l]/2-i[l]/2,o[s]=n===s?e[s]-i[u]:e[Ct(s)],o}function Nt(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function Dt(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t.name===n}));var i=Nt(t,(function(t){return t.name===n}));return t.indexOf(i)}(t,0,n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&z(n)&&(e.offsets.popper=ht(e.offsets.popper),e.offsets.reference=ht(e.offsets.reference),e=n(e,t))})),e}function At(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=wt(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=Et(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=St(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=Dt(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function kt(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))}function It(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function Ot(){return this.state.isDestroyed=!0,kt(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[It("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function xt(t){var e=t.ownerDocument;return e?e.defaultView:window}function jt(t,e,n,i){var o="BODY"===t.nodeName,r=o?t.ownerDocument.defaultView:t;r.addEventListener(e,n,{passive:!0}),o||jt(G(r.parentNode),e,n,i),i.push(r)}function Lt(t,e,n,i){n.updateBound=i,xt(t).addEventListener("resize",n.updateBound,{passive:!0});var o=G(t);return jt(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function Pt(){this.state.eventsEnabled||(this.state=Lt(this.reference,this.options,this.state,this.scheduleUpdate))}function Ft(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,xt(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function Rt(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function Ht(t,e){Object.keys(e).forEach((function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Rt(e[n])&&(i="px"),t.style[n]=e[n]+i}))}var Mt=U&&/Firefox/i.test(navigator.userAgent);function qt(t,e,n){var i=Nt(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order<i.order}));if(!o){var r="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}var Bt=["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"],Qt=Bt.slice(3);function Wt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Qt.indexOf(t),i=Qt.slice(n+1).concat(Qt.slice(0,n));return e?i.reverse():i}var Ut={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",u=s?"width":"height",f={start:dt({},l,r[l]),end:dt({},l,r[l]+r[u]-a[u])};t.offsets.popper=ct({},a,f[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n,i=e.offset,o=t.placement,r=t.offsets,a=r.popper,s=r.reference,l=o.split("-")[0];return n=Rt(+i)?[+i,0]:function(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(Nt(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return u=u.map((function(t,i){var o=(1===i?!r:r)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],a=o[2];return r?0===a.indexOf("%")?ht("%p"===a?n:i)[e]/100*r:"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r:r:t}(t,o,e,n)}))})),u.forEach((function(t,e){t.forEach((function(n,i){Rt(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o}(i,a,s,l),"left"===l?(a.top+=n[0],a.left-=n[1]):"right"===l?(a.top+=n[0],a.left+=n[1]):"top"===l?(a.left+=n[0],a.top-=n[1]):"bottom"===l&&(a.left+=n[0],a.top+=n[1]),t.popper=a,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||et(t.instance.popper);t.instance.reference===n&&(n=et(n));var i=It("transform"),o=t.instance.popper.style,r=o.top,a=o.left,s=o[i];o.top="",o.left="",o[i]="";var l=bt(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);o.top=r,o.left=a,o[i]=s,e.boundaries=l;var u=e.priority,f=t.offsets.popper,d={primary:function(t){var n=f[t];return f[t]<l[t]&&!e.escapeWithReference&&(n=Math.max(f[t],l[t])),dt({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=f[n];return f[t]>l[t]&&!e.escapeWithReference&&(i=Math.min(f[n],l[t]-("right"===t?f.width:f.height))),dt({},n,i)}};return u.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";f=ct({},f,d[e](t))})),t.offsets.popper=f,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return n[s]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[u]),n[l]>r(i[s])&&(t.offsets.popper[l]=r(i[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!qt(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,a=r.popper,s=r.reference,l=-1!==["left","right"].indexOf(o),u=l?"height":"width",f=l?"Top":"Left",d=f.toLowerCase(),c=l?"left":"top",h=l?"bottom":"right",p=Tt(i)[u];s[h]-p<a[d]&&(t.offsets.popper[d]-=a[d]-(s[h]-p)),s[d]+p>a[h]&&(t.offsets.popper[d]+=s[d]+p-a[h]),t.offsets.popper=ht(t.offsets.popper);var m=s[d]+s[u]/2-p/2,g=K(t.instance.popper),_=parseFloat(g["margin"+f]),v=parseFloat(g["border"+f+"Width"]),b=m-t.offsets.popper[d]-_-v;return b=Math.max(Math.min(a[u]-p,b),0),t.arrowElement=i,t.offsets.arrow=(dt(n={},d,Math.round(b)),dt(n,c,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(kt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=bt(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=Ct(i),r=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case"flip":a=[i,o];break;case"clockwise":a=Wt(i);break;case"counterclockwise":a=Wt(i,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(i!==s||a.length===l+1)return t;i=t.placement.split("-")[0],o=Ct(i);var u=t.offsets.popper,f=t.offsets.reference,d=Math.floor,c="left"===i&&d(u.right)>d(f.left)||"right"===i&&d(u.left)<d(f.right)||"top"===i&&d(u.bottom)>d(f.top)||"bottom"===i&&d(u.top)<d(f.bottom),h=d(u.left)<d(n.left),p=d(u.right)>d(n.right),m=d(u.top)<d(n.top),g=d(u.bottom)>d(n.bottom),_="left"===i&&h||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,v=-1!==["top","bottom"].indexOf(i),b=!!e.flipVariations&&(v&&"start"===r&&h||v&&"end"===r&&p||!v&&"start"===r&&m||!v&&"end"===r&&g),y=!!e.flipVariationsByContent&&(v&&"start"===r&&p||v&&"end"===r&&h||!v&&"start"===r&&g||!v&&"end"===r&&m),E=b||y;(c||_||E)&&(t.flipped=!0,(c||_)&&(i=a[l+1]),E&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""),t.offsets.popper=ct({},t.offsets.popper,St(t.instance.popper,t.offsets.reference,t.placement)),t=Dt(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=r[n]-(s?o[a?"width":"height"]:0),t.placement=Ct(e),t.offsets.popper=ht(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!qt(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=Nt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=Nt(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,s,l=void 0!==r?r:e.gpuAcceleration,u=et(t.instance.popper),f=pt(u),d={position:o.position},c=function(t,e){var n=t.offsets,i=n.popper,o=n.reference,r=Math.round,a=Math.floor,s=function(t){return t},l=r(o.width),u=r(i.width),f=-1!==["left","right"].indexOf(t.placement),d=-1!==t.placement.indexOf("-"),c=e?f||d||l%2==u%2?r:a:s,h=e?r:s;return{left:c(l%2==1&&u%2==1&&!d&&e?i.left-1:i.left),top:h(i.top),bottom:h(i.bottom),right:c(i.right)}}(t,window.devicePixelRatio<2||!Mt),h="bottom"===n?"top":"bottom",p="right"===i?"left":"right",m=It("transform");if(s="bottom"===h?"HTML"===u.nodeName?-u.clientHeight+c.bottom:-f.height+c.bottom:c.top,a="right"===p?"HTML"===u.nodeName?-u.clientWidth+c.right:-f.width+c.right:c.left,l&&m)d[m]="translate3d("+a+"px, "+s+"px, 0)",d[h]=0,d[p]=0,d.willChange="transform";else{var g="bottom"===h?-1:1,_="right"===p?-1:1;d[h]=s*g,d[p]=a*_,d.willChange=h+", "+p}var v={"x-placement":t.placement};return t.attributes=ct({},v,t.attributes),t.styles=ct({},d,t.styles),t.arrowStyles=ct({},t.offsets.arrow,t.arrowStyles),t}
9,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return Ht(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&Ht(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,o){var r=wt(o,e,t,n.positionFixed),a=Et(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),Ht(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},Vt=function(){function t(e,n){var i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ut(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=Y(this.update.bind(this)),this.options=ct({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(ct({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){i.options.modifiers[e]=ct({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return ct({name:t},i.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&z(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)})),this.update();var r=this.options.eventsEnabled;r&&this.enableEventListeners(),this.state.eventsEnabled=r}return ft(t,[{key:"update",value:function(){return At.call(this)}},{key:"destroy",value:function(){return Ot.call(this)}},{key:"enableEventListeners",value:function(){return Pt.call(this)}},{key:"disableEventListeners",value:function(){return Ft.call(this)}}]),t}();Vt.Utils=("undefined"!=typeof window?window:global).PopperUtils,Vt.placements=Bt,Vt.Defaults=Ut;var Yt=Vt,zt="dropdown",Kt="bs.dropdown",Xt=i.default.fn[zt],Gt=new RegExp("38|40|27"),$t="disabled",Jt="show",Zt="dropdown-menu-right",te="hide.bs.dropdown",ee="hidden.bs.dropdown",ne="click.bs.dropdown.data-api",ie="keydown.bs.dropdown.data-api",oe='[data-toggle="dropdown"]',re=".dropdown-menu",ae={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},se={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},le=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!i.default(this._element).hasClass($t)){var e=i.default(this._menu).hasClass(Jt);t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||i.default(this._element).hasClass($t)||i.default(this._menu).hasClass(Jt))){var n={relatedTarget:this._element},o=i.default.Event("show.bs.dropdown",n),r=t._getParentFromElement(this._element);if(i.default(r).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar&&e){if("undefined"==typeof Yt)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var a=this._element;"parent"===this._config.reference?a=r:u.isElement(this._config.reference)&&(a=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(a=this._config.reference[0])),"scrollParent"!==this._config.boundary&&i.default(r).addClass("position-static"),this._popper=new Yt(a,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===i.default(r).closest(".navbar-nav").length&&i.default(document.body).children().on("mouseover",null,i.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),i.default(this._menu).toggleClass(Jt),i.default(r).toggleClass(Jt).trigger(i.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!i.default(this._element).hasClass($t)&&i.default(this._menu).hasClass(Jt)){var e={relatedTarget:this._element},n=i.default.Event(te,e),o=t._getParentFromElement(this._element);i.default(o).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),i.default(this._menu).toggleClass(Jt),i.default(o).toggleClass(Jt).trigger(i.default.Event(ee,e)))}},e.dispose=function(){i.default.removeData(this._element,Kt),i.default(this._element).off(".b
9s.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;i.default(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=a({},this.constructor.Default,i.default(this._element).data(),t),u.typeCheckConfig(zt,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(re))}return this._menu},e._getPlacement=function(){var t=i.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=i.default(this._menu).hasClass(Zt)?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":i.default(this._menu).hasClass(Zt)&&(e="bottom-end"),e},e._detectNavbar=function(){return i.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),a({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(Kt);if(n||(n=new t(this,"object"==typeof e?e:null),i.default(this).data(Kt,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll(oe)),o=0,r=n.length;o<r;o++){var a=t._getParentFromElement(n[o]),s=i.default(n[o]).data(Kt),l={relatedTarget:n[o]};if(e&&"click"===e.type&&(l.clickEvent=e),s){var u=s._menu;if(i.default(a).hasClass(Jt)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&i.default.contains(a,e.target))){var f=i.default.Event(te,l);i.default(a).trigger(f),f.isDefaultPrevented()||("ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),n[o].setAttribute("aria-expanded","false"),s._popper&&s._popper.destroy(),i.default(u).removeClass(Jt),i.default(a).removeClass(Jt).trigger(i.default.Event(ee,l)))}}}},t._getParentFromElement=function(t){var e,n=u.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if(!(/input|textarea/i.test(e.target.tagName)?32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||i.default(e.target).closest(re).length):!Gt.test(e.which))&&!this.disabled&&!i.default(this).hasClass($t)){var n=t._getParentFromElement(this),o=i.default(n).hasClass(Jt);if(o||27!==e.which){if(e.preventDefault(),e.stopPropagation(),!o||27===e.which||32===e.which)return 27===e.which&&i.default(n.querySelector(oe)).trigger("focus"),void i.default(this).trigger("click");var r=[].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return i.default(t).is(":visible")}));if(0!==r.length){var a=r.indexOf(e.target);38===e.which&&a>0&&a--,40===e.which&&a<r.length-1&&a++,a<0&&(a=0),r[a].focus()}}}},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return ae}},{key:"DefaultType",get:function(){return se}}]),t}();i.default(document).on(ie,oe,le._dataApiKeydownHandler).on(ie,re,le._dataApiKeydownHandler).on(ne+" keyup.bs.dropdown.data-api",le._clearMenus).on(ne,oe,(function(t){t.preventDefault(),t.stopPropagation(),le._jQueryInterface.call(i.default(this),"toggle")})).on(ne,".dropdown form",(function(t){t.stopPropagation()})),i.default.fn[zt]=le._jQueryInterface,i.default.fn[zt].Constructor=le,i.default.fn[zt].noConflict=function(){return i.default.fn[zt]=Xt,le._jQueryInterface};var ue="bs.modal",fe=i.default.fn.modal,de="modal-open",ce="fade",he="show",pe="modal-static",me="hidden.bs.modal",ge="show.bs.modal",_e="focusin.bs.modal",ve="resize.bs.modal",be="click.dismiss.bs.modal",ye="keydown.dismiss.bs.modal",Ee="mousedown.dismiss.bs.modal",we=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Te={backdrop:!0,keyboard:!0,focus:!0,show:!0},Ce={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Se=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){var n=i.default.Event(ge,{relatedTarget:t});i.default(this._element).trigger(n),n.isDefaultPrevented()||(this._isShown=!0,i.default(this._element).hasClass(ce)&&(this._isTransitioning=!0),this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),i.default(this._element).on(be,'[data-dismiss="modal"]',(function(t){return e.hide(t)})),i.default(this._dialog).on(Ee,(function(){i.default(e._element).one("mouseup.dismiss.bs.modal",(function(t){i.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=i.default.Event("hide.bs.modal");if(i.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var o=i.default(this._element).hasClass(ce);if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),i.default(document).off(_e),i.default(this._element).removeClass(he),i.default(this._element).off(be),i.default(this._dialog).off(Ee),o){var r=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,(function(t){return e._hideModal(t)})).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return i.default(t).off(".b
9s.modal")})),i.default(document).off(_e),i.default.removeData(this._element,ue),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},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=a({},Te,t),u.typeCheckConfig("modal",t,Ce),t},e._triggerBackdropTransition=function(){var t=this,e=i.default.Event("hidePrevented.bs.modal");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add(pe);var o=u.getTransitionDurationFromElement(this._dialog);i.default(this._element).off(u.TRANSITION_END),i.default(this._element).one(u.TRANSITION_END,(function(){t._element.classList.remove(pe),n||i.default(t._element).one(u.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},e._showElement=function(t){var e=this,n=i.default(this._element).hasClass(ce),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"),i.default(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,n&&u.reflow(this._element),i.default(this._element).addClass(he),this._config.focus&&this._enforceFocus();var r=i.default.Event("shown.bs.modal",{relatedTarget:t}),a=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,i.default(e._element).trigger(r)};if(n){var s=u.getTransitionDurationFromElement(this._dialog);i.default(this._dialog).one(u.TRANSITION_END,a).emulateTransitionEnd(s)}else a()},e._enforceFocus=function(){var t=this;i.default(document).off(_e).on(_e,(function(e){document!==e.target&&t._element!==e.target&&0===i.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?i.default(this._element).on(ye,(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||i.default(this._element).off(ye)},e._setResizeEvent=function(){var t=this;this._isShown?i.default(window).on(ve,(function(e){return t.handleUpdate(e)})):i.default(window).off(ve)},e._hideModal=function(){var t=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(){i.default(document.body).removeClass(de),t._resetAdjustments(),t._resetScrollbar(),i.default(t._element).trigger(me)}))},e._removeBackdrop=function(){this._backdrop&&(i.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=i.default(this._element).hasClass(ce)?ce:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),i.default(this._backdrop).appendTo(document.body),i.default(this._element).on(be,(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._triggerBackdropTransition():e.hide())})),n&&u.reflow(this._backdrop),i.default(this._backdrop).addClass(he),!t)return;if(!n)return void t();var o=u.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(u.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){i.default(this._backdrop).removeClass(he);var r=function(){e._removeBackdrop(),t&&t()};if(i.default(this._element).hasClass(ce)){var a=u.getTransitionDurationFromElement(this._backdrop);i.default(this._backdrop).one(u.TRANSITION_END,r).emulateTransitionEnd(a)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(we)),n=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(e,n){var o=n.style.paddingRight,r=i.default(n).css("padding-right");i.default(n).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")})),i.default(n).each((function(e,n){var o=n.style.marginRight,r=i.default(n).css("margin-right");i.default(n).data("margin-right",o).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,r=i.default(document.body).css("padding-right");i.default(document.body).data("padding-right",o).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px")}i.default(document.body).addClass(de)},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(we));i.default(t).each((function(t,e){var n=i.default(e).data("padding-right");i.default(e).removeData("padding-right"),e.style.paddingRight=n||""}));var e=[].slice.call(document.querySelectorAll(".sticky-top"));i.default(e).each((function(t,e){var n=i.default(e).data("margin-right");"undefined"!=typeof n&&i.default(e).css("margin-right",n).removeData("margin-right")}));var n=i.default(document.body).data("padding-right");i.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each((function(){var o=i.default(this).data(ue),r=a({},Te,i.default(this).data(),"object"==typeof e&&e?e:{});if(o||(o=new t(this,r),i.default(this).data(ue,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method n
vendor: 12,807 bytes, line 9
9amed "'+e+'"');o[e](n)}else r.show&&o.show(n)}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Te}}]),t}();i.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var e,n=this,o=u.getSelectorFromElement(this);o&&(e=document.querySelector(o));var r=i.default(e).data(ue)?"toggle":a({},i.default(e).data(),i.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=i.default(e).one(ge,(function(t){t.isDefaultPrevented()||s.one(me,(function(){i.default(n).is(":visible")&&n.focus()}))}));Se._jQueryInterface.call(i.default(e),r,this)})),i.default.fn.modal=Se._jQueryInterface,i.default.fn.modal.Constructor=Se,i.default.fn.modal.noConflict=function(){return i.default.fn.modal=fe,Se._jQueryInterface};var Ne=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],De=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ae=/^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 ke(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),r=[].slice.call(i.body.querySelectorAll("*")),a=function(t,n){var i=r[t],a=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var s=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[a]||[]);s.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===Ne.indexOf(n)||Boolean(De.test(t.nodeValue)||Ae.test(t.nodeValue));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,r=i.length;o<r;o++)if(i[o].test(n))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},s=0,l=r.length;s<l;s++)a(s);return i.body.innerHTML}var Ie="tooltip",Oe="bs.tooltip",xe=i.default.fn.tooltip,je=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Le=["sanitize","whiteList","sanitizeFn"],Pe="fade",Fe="show",Re="show",He="out",Me="hover",qe="focus",Be={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Qe={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",customClass:"",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},We={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)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Ue={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"},Ve=function(){function t(t,e){if("undefined"==typeof Yt)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=i.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(i.default(this.getTipElement()).hasClass(Fe))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),i.default.removeData(this.element,this.constructor.DATA_KEY),i.default(this.element).off(this.constructor.EVENT_KEY),i.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&i.default(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},e.show=function(){var t=this;if("none"===i.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=i.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){i.default(this.element).trigger(e);var n=u.findShadowRoot(this.element),o=i.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=u.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&i.default(r).addClass(Pe);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(s);this.addAttachmentClass(l);var f=this._getContainer();i.default(r).data(this.constructor.DATA_KEY,this),i.default.contains(this.element.ownerDocument.documentElement,this.tip)||i.default(r).appendTo(f),i.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Yt(this.element,r,this._getPopperConfig(l)),i.default(r).addClass(Fe),i.default(r).addClass(this.config.customClass),"ontouchstart"in document.documentElement&&i.default(document.body).children().on("mouseover",null,i.default.noop);var d=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,i.default(t.element).trigger(t.constructor.Event.SHOWN),e===He&&t._leave(null,t)};if(i.default(this.tip).hasClass(Pe)){var c=u.getTransitionDurationFromElement(this.tip);i.default(this.tip).one(u.TRANSITION_END,d).emulateTransitionEnd(c)}else d()}},e.hide=function(t){var e=this,n=this.getTipElement(),o=i.default.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==Re&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),i.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(i.default(this.element).trigger(o),!o.isDefaultPrevented()){if(i.default(n).removeClass(Fe),"ontouchstart"in document.documentElement&&i.default(document.body).children().off("mouseover",null,i.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,i.default(this.tip).hasClass(Pe)){var a=u.getTransitionDurationFromElement(n);i.default(n).one(u.TRANSITION_END,r).emulateTransitionEnd(a)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(i.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),i.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=ke(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?i.default(e).parent().is(t)||t.empty().append(e):t.text(i.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return a({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=a({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:u.isElement(this.config.container)?i.default(this.config.container):i.default(document).find(this.config.container)},e._getAttachment=function(t){return Be[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)i.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n=e===Me?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=e===Me?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;i.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},i.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=a({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?qe:Me]=!0),i.default(e.getTipElement()).hasClass(Fe)||e._hoverState===Re?e._hoverState=Re:(clearTimeout(e._timeout),e._hoverState=Re,e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){e._hoverState===Re&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||i.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),i.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?qe:Me]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=He,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){e._hoverState===He&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=i.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==Le.indexOf(t)&&delete e[t]})),"number"==typeof(t=a({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),u.typeCheckConfig(Ie,t,this.constructor.DefaultType),t.sanitize&&(t.template=ke(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(je);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(i.default(t).removeClass(Pe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(Oe),r="object"==typeof e&&e;if((o||!/dispose|hide/.test(e))&&(o||(o=new t(this,r),n.data(Oe,o)),"string"==typeof e)){if("undefined"==typeof o[e])throw new TypeError('No method n
9amed "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Qe}},{key:"NAME",get:function(){return Ie}},{key:"DATA_KEY",get:function(){return Oe}},{key:"Event",get:function(){return Ue}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return We}}]),t}();i.default.fn.tooltip=Ve._jQueryInterface,i.default.fn.tooltip.Constructor=Ve,i.default.fn.tooltip.noConflict=function(){return i.default.fn.tooltip=xe,Ve._jQueryInterface};var Ye="bs.popover",ze=i.default.fn.popover,Ke=new RegExp("(^|\\s)bs-popover\\S+","g"),Xe=a({},Ve.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>'}),Ge=a({},Ve.DefaultType,{content:"(string|element|function)"}),$e={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"},Je=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,s(e,n);var a=o.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){i.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||i.default(this.config.template)[0],this.tip},a.setContent=function(){var t=i.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=i.default(this.getTipElement()),e=t.attr("class").match(Ke);null!==e&&e.length>0&&t.removeClass(e.join(""))},o._jQueryInterface=function(t){return this.each((function(){var e=i.default(this).data(Ye),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,n),i.default(this).data(Ye,e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},r(o,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return Xe}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return Ye}},{key:"Event",get:function(){return $e}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Ge}}]),o}(Ve);i.default.fn.popover=Je._jQueryInterface,i.default.fn.popover.Constructor=Je,i.default.fn.popover.noConflict=function(){return i.default.fn.popover=ze,Je._jQueryInterface};var Ze="scrollspy",tn="bs.scrollspy",en=i.default.fn[Ze],nn="active",on="position",rn=".nav, .list-group",an={offset:10,method:"auto",target:""},sn={offset:"number",method:"string",target:"(string|element)"},ln=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),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,i.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":on,n="auto"===this._config.method?e:this._config.method,o=n===on?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,r=u.getSelectorFromElement(t);if(r&&(e=document.querySelector(r)),e){var a=e.getBoundingClientRect();if(a.width||a.height)return[i.default(e)[n]().top+o,r]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]}
vendor: 5,559 bytes, line 9
9)).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){i.default.removeData(this._element,tn),i.default(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},e._getConfig=function(t){if("string"!=typeof(t=a({},an,"object"==typeof t&&t?t:{})).target&&u.isElement(t.target)){var e=i.default(t.target).attr("id");e||(e=u.getUID(Ze),i.default(t.target).attr("id",e)),t.target="#"+e}return u.typeCheckConfig(Ze,t,sn),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<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]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=i.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(nn),n.addClass(nn)):(n.addClass(nn),n.parents(rn).prev(".nav-link, .list-group-item").addClass(nn),n.parents(rn).prev(".nav-item").children(".nav-link").addClass(nn)),i.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains(nn)})).forEach((function(t){return t.classList.remove(nn)}))},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this).data(tn);if(n||(n=new t(this,"object"==typeof e&&e),i.default(this).data(tn,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return an}}]),t}();i.default(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=i.default(t[e]);ln._jQueryInterface.call(n,n.data())}})),i.default.fn[Ze]=ln._jQueryInterface,i.default.fn[Ze].Constructor=ln,i.default.fn[Ze].noConflict=function(){return i.default.fn[Ze]=en,ln._jQueryInterface};var un="bs.tab",fn=i.default.fn.tab,dn="active",cn="fade",hn="show",pn=".active",mn="> li > .active",gn=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&i.default(this._element).hasClass(dn)||i.default(this._element).hasClass("disabled"))){var e,n,o=i.default(this._element).closest(".nav, .list-group")[0],r=u.getSelectorFromElement(this._element);if(o){var a="UL"===o.nodeName||"OL"===o.nodeName?mn:pn;n=(n=i.default.makeArray(i.default(o).find(a)))[n.length-1]}var s=i.default.Event("hide.bs.tab",{relatedTarget:this._element}),l=i.default.Event("show.bs.tab",{relatedTarget:n});if(n&&i.default(n).trigger(s),i.default(this._element).trigger(l),!l.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=document.querySelector(r)),this._activate(this._element,o);var f=function(){var e=i.default.Event("hidden.bs.tab",{relatedTarget:t._element}),o=i.default.Event("shown.bs.tab",{relatedTarget:n});i.default(n).trigger(e),i.default(t._element).trigger(o)};e?this._activate(e,e.parentNode,f):f()}}},e.dispose=function(){i.default.removeData(this._element,un),this._element=null},e._activate=function(t,e,n){var o=this,r=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?i.default(e).children(pn):i.default(e).find(mn))[0],a=n&&r&&i.default(r).hasClass(cn),s=function(){return o._transitionComplete(t,r,n)};if(r&&a){var l=u.getTransitionDurationFromElement(r);i.default(r).removeClass(hn).one(u.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._transitionComplete=function(t,e,n){if(e){i.default(e).removeClass(dn);var o=i.default(e.parentNode).find("> .dropdown-menu .active")[0];o&&i.default(o).removeClass(dn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}i.default(t).addClass(dn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),u.reflow(t),t.classList.contains(cn)&&t.classList.add(hn);var r=t.parentNode;if(r&&"LI"===r.nodeName&&(r=r.parentNode),r&&i.default(r).hasClass("dropdown-menu")){var a=i.default(t).closest(".dropdown")[0];if(a){var s=[].slice.call(a.querySelectorAll(".dropdown-toggle"));i.default(s).addClass(dn)}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(un);if(o||(o=new t(this),n.data(un,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method n
vendor: 7,087 bytes, lines 9-125
9amed "'+e+'"');o[e]()}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}}]),t}();i.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),gn._jQueryInterface.call(i.default(this),"show")})),i.default.fn.tab=gn._jQueryInterface,i.default.fn.tab.Constructor=gn,i.default.fn.tab.noConflict=function(){return i.default.fn.tab=fn,gn._jQueryInterface};var _n="bs.toast",vn=i.default.fn.toast,bn="hide",yn="show",En="showing",wn="click.dismiss.bs.toast",Tn={animation:!0,autohide:!0,delay:500},Cn={animation:"boolean",autohide:"boolean",delay:"number"},Sn=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=i.default.Event("show.bs.toast");if(i.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove(En),t._element.classList.add(yn),i.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove(bn),u.reflow(this._element),this._element.classList.add(En),this._config.animation){var o=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,n).emulateTransitionEnd(o)}else n()}},e.hide=function(){if(this._element.classList.contains(yn)){var t=i.default.Event("hide.bs.toast");i.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains(yn)&&this._element.classList.remove(yn),i.default(this._element).off(wn),i.default.removeData(this._element,_n),this._element=null,this._config=null},e._getConfig=function(t){return t=a({},Tn,i.default(this._element).data(),"object"==typeof t&&t?t:{}),u.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;i.default(this._element).on(wn,'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add(bn),i.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(yn),this._config.animation){var n=u.getTransitionDurationFromElement(this._element);i.default(this._element).one(u.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=i.default(this),o=n.data(_n);if(o||(o=new t(this,"object"==typeof e&&e),n.data(_n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e](this)}}))},r(t,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"DefaultType",get:function(){return Cn}},{key:"Default",get:function(){return Tn}}]),t}();i.default.fn.toast=Sn._jQueryInterface,i.default.fn.toast.Constructor=Sn,i.default.fn.toast.noConflict=function(){return i.default.fn.toast=vn,Sn._jQueryInterface},t.Alert=c,t.Button=b,t.Carousel=O,t.Collapse=W,t.Dropdown=le,t.Modal=Se,t.Popover=Je,t.Scrollspy=ln,t.Tab=gn,t.Toast=Sn,t.Tooltip=Ve,t.Util=u,Object.defineProperty(t,"__esModule",{value:!0})}));
10//# sourceMappingURL=bootstrap.bundle.min.js.map
11/**
12 * Copyright 2016 Google Inc. All Rights Reserved.
13 *
14 * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
15 *
16 *  https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
17 *
18 */
19(function() {
20'use strict';
21
22// Exit early if we're not running in a browser.
23if (typeof window !== 'object') {
24  return;
25}
26
27// Exit early if all IntersectionObserver and IntersectionObserverEntry
28// features are natively supported.
29if ('IntersectionObserver' in window &&
30    'IntersectionObserverEntry' in window &&
31    'intersectionRatio' in window.IntersectionObserverEntry.prototype) {
32
33  // Minimal polyfill for Edge 15's lack of `isIntersecting`
34  // See: https://github.com/w3c/IntersectionObserver/issues/211
35  if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
36    Object.defineProperty(window.IntersectionObserverEntry.prototype,
37      'isIntersecting', {
38      get: function () {
39        return this.intersectionRatio > 0;
40      }
41    });
42  }
43  return;
44}
45
46
47/**
48 * A local reference to the document.
49 */
50var document = window.document;
51
52
53/**
54 * An IntersectionObserver registry. This registry exists to hold a strong
55 * reference to IntersectionObserver instances currently observing a target
56 * element. Without this registry, instances without another reference may be
57 * garbage collected.
58 */
59var registry = [];
60
61/**
62 * The signal updater for cross-origin intersection. When not null, it means
63 * that the polyfill is configured to work in a cross-origin mode.
64 * @type {function(DOMRect|ClientRect, DOMRect|ClientRect)}
65 */
66var crossOriginUpdater = null;
67
68/**
69 * The current cross-origin intersection. Only used in the cross-origin mode.
70 * @type {DOMRect|ClientRect}
71 */
72var crossOriginRect = null;
73
74
75/**
76 * Creates the global IntersectionObserverEntry constructor.
77 * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
78 * @param {Object} entry A dictionary of instance properties.
79 * @constructor
80 */
81function IntersectionObserverEntry(entry) {
82  this.time = entry.time;
83  this.target = entry.target;
84  this.rootBounds = ensureDOMRect(entry.rootBounds);
85  this.boundingClientRect = ensureDOMRect(entry.boundingClientRect);
86  this.intersectionRect = ensureDOMRect(entry.intersectionRect || getEmptyRect());
87  this.isIntersecting = !!entry.intersectionRect;
88
89  // Calculates the intersection ratio.
90  var targetRect = this.boundingClientRect;
91  var targetArea = targetRect.width * targetRect.height;
92  var intersectionRect = this.intersectionRect;
93  var intersectionArea = intersectionRect.width * intersectionRect.height;
94
95  // Sets intersection ratio.
96  if (targetArea) {
97    // Round the intersection ratio to avoid floating point math issues:
98    // https://github.com/w3c/IntersectionObserver/issues/324
99    this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));
100  } else {
101    // If area is zero and is intersecting, sets to 1, otherwise to 0
102    this.intersectionRatio = this.isIntersecting ? 1 : 0;
103  }
104}
105
106
107/**
108 * Creates the global IntersectionObserver constructor.
109 * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
110 * @param {Function} callback The function to be invoked after intersection
111 *     changes have queued. The function is not invoked if the queue has
112 *     been emptied by calling the `takeRecords` method.
113 * @param {Object=} opt_options Optional configuration options.
114 * @constructor
115 */
116function IntersectionObserver(callback, opt_options) {
117
118  var options = opt_options || {};
119
120  if (typeof callback != 'function') {
121    throw new Error('callback must be a function');
122  }
123
124  if (options.root && options.root.nodeType != 1) {
125    throw new Error('root must be an
vendor: 7,967 bytes, lines 125-388
125 Element');
126  }
127
128  // Binds and throttles `this._checkForIntersections`.
129  this._checkForIntersections = throttle(
130      this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);
131
132  // Private properties.
133  this._callback = callback;
134  this._observationTargets = [];
135  this._queuedEntries = [];
136  this._rootMarginValues = this._parseRootMargin(options.rootMargin);
137
138  // Public properties.
139  this.thresholds = this._initThresholds(options.threshold);
140  this.root = options.root || null;
141  this.rootMargin = this._rootMarginValues.map(function(margin) {
142    return margin.value + margin.unit;
143  }).join(' ');
144
145  /** @private @const {!Array<!Document>} */
146  this._monitoringDocuments = [];
147  /** @private @const {!Array<function()>} */
148  this._monitoringUnsubscribes = [];
149}
150
151
152/**
153 * The minimum interval within which the document will be checked for
154 * intersection changes.
155 */
156IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;
157
158
159/**
160 * The frequency in which the polyfill polls for intersection changes.
161 * this can be updated on a per instance basis and must be set prior to
162 * calling `observe` on the first target.
163 */
164IntersectionObserver.prototype.POLL_INTERVAL = null;
165
166/**
167 * Use a mutation observer on the root element
168 * to detect intersection changes.
169 */
170IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;
171
172
173/**
174 * Sets up the polyfill in the cross-origin mode. The result is the
175 * updater function that accepts two arguments: `boundingClientRect` and
176 * `intersectionRect` - just as these fields would be available to the
177 * parent via `IntersectionObserverEntry`. This function should be called
178 * each time the iframe receives intersection information from the parent
179 * window, e.g. via messaging.
180 * @return {function(DOMRect|ClientRect, DOMRect|ClientRect)}
181 */
182IntersectionObserver._setupCrossOriginUpdater = function() {
183  if (!crossOriginUpdater) {
184    /**
185     * @param {DOMRect|ClientRect} boundingClientRect
186     * @param {DOMRect|ClientRect} intersectionRect
187     */
188    crossOriginUpdater = function(boundingClientRect, intersectionRect) {
189      if (!boundingClientRect || !intersectionRect) {
190        crossOriginRect = getEmptyRect();
191      } else {
192        crossOriginRect = convertFromParentRect(boundingClientRect, intersectionRect);
193      }
194      registry.forEach(function(observer) {
195        observer._checkForIntersections();
196      });
197    };
198  }
199  return crossOriginUpdater;
200};
201
202
203/**
204 * Resets the cross-origin mode.
205 */
206IntersectionObserver._resetCrossOriginUpdater = function() {
207  crossOriginUpdater = null;
208  crossOriginRect = null;
209};
210
211
212/**
213 * Starts observing a target element for intersection changes based on
214 * the thresholds values.
215 * @param {Element} target The DOM element to observe.
216 */
217IntersectionObserver.prototype.observe = function(target) {
218  var isTargetAlreadyObserved = this._observationTargets.some(function(item) {
219    return item.element == target;
220  });
221
222  if (isTargetAlreadyObserved) {
223    return;
224  }
225
226  if (!(target && target.nodeType == 1)) {
227    throw new Error('target must be an Element');
228  }
229
230  this._registerInstance();
231  this._observationTargets.push({element: target, entry: null});
232  this._monitorIntersections(target.ownerDocument);
233  this._checkForIntersections();
234};
235
236
237/**
238 * Stops observing a target element for intersection changes.
239 * @param {Element} target The DOM element to observe.
240 */
241IntersectionObserver.prototype.unobserve = function(target) {
242  this._observationTargets =
243      this._observationTargets.filter(function(item) {
244        return item.element != target;
245      });
246  this._unmonitorIntersections(target.ownerDocument);
247  if (this._observationTargets.length == 0) {
248    this._unregisterInstance();
249  }
250};
251
252
253/**
254 * Stops observing all target elements for intersection changes.
255 */
256IntersectionObserver.prototype.disconnect = function() {
257  this._observationTargets = [];
258  this._unmonitorAllIntersections();
259  this._unregisterInstance();
260};
261
262
263/**
264 * Returns any queue entries that have not yet been reported to the
265 * callback and clears the queue. This can be used in conjunction with the
266 * callback to obtain the absolute most up-to-date intersection information.
267 * @return {Array} The currently queued entries.
268 */
269IntersectionObserver.prototype.takeRecords = function() {
270  var records = this._queuedEntries.slice();
271  this._queuedEntries = [];
272  return records;
273};
274
275
276/**
277 * Accepts the threshold value from the user configuration object and
278 * returns a sorted array of unique threshold values. If a value is not
279 * between 0 and 1 and error is thrown.
280 * @private
281 * @param {Array|number=} opt_threshold An optional threshold value or
282 *     a list of threshold values, defaulting to [0].
283 * @return {Array} A sorted list of unique and valid threshold values.
284 */
285IntersectionObserver.prototype._initThresholds = function(opt_threshold) {
286  var threshold = opt_threshold || [0];
287  if (!Array.isArray(threshold)) threshold = [threshold];
288
289  return threshold.sort().filter(function(t, i, a) {
290    if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {
291      throw new Error('threshold must be a number between 0 and 1 inclusively');
292    }
293    return t !== a[i - 1];
294  });
295};
296
297
298/**
299 * Accepts the rootMargin value from the user configuration object
300 * and returns an array of the four margin values as an object containing
301 * the value and unit properties. If any of the values are not properly
302 * formatted or use a unit other than px or %, and error is thrown.
303 * @private
304 * @param {string=} opt_rootMargin An optional rootMargin value,
305 *     defaulting to '0px'.
306 * @return {Array<Object>} An array of margin objects with the keys
307 *     value and unit.
308 */
309IntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {
310  var marginString = opt_rootMargin || '0px';
311  var margins = marginString.split(/\s+/).map(function(margin) {
312    var parts = /^(-?\d*\.?\d+)(px|%)$/.exec(margin);
313    if (!parts) {
314      throw new Error('rootMargin must be specified in pixels or percent');
315    }
316    return {value: parseFloat(parts[1]), unit: parts[2]};
317  });
318
319  // Handles shorthand.
320  margins[1] = margins[1] || margins[0];
321  margins[2] = margins[2] || margins[0];
322  margins[3] = margins[3] || margins[1];
323
324  return margins;
325};
326
327
328/**
329 * Starts polling for intersection changes if the polling is not already
330 * happening, and if the page's visibility state is visible.
331 * @param {!Document} doc
332 * @private
333 */
334IntersectionObserver.prototype._monitorIntersections = function(doc) {
335  var win = doc.defaultView;
336  if (!win) {
337    // Already destroyed.
338    return;
339  }
340  if (this._monitoringDocuments.indexOf(doc) != -1) {
341    // Already monitoring.
342    return;
343  }
344
345  // Private state for monitoring.
346  var callback = this._checkForIntersections;
347  var monitoringInterval = null;
348  var domObserver = null;
349
350  // If a poll interval is set, use polling instead of listening to
351  // resize and scroll events or DOM mutations.
352  if (this.POLL_INTERVAL) {
353    monitoringInterval = win.setInterval(callback, this.POLL_INTERVAL);
354  } else {
355    addEvent(win, 'resize', callback, true);
356    addEvent(doc, 'scroll', callback, true);
357    if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in win) {
358      domObserver = new win.MutationObserver(callback);
359      domObserver.observe(doc, {
360        attributes: true,
361        childList: true,
362        characterData: true,
363        subtree: true
364      });
365    }
366  }
367
368  this._monitoringDocuments.push(doc);
369  this._monitoringUnsubscribes.push(function() {
370    // Get the window object again. When a friendly iframe is destroyed, it
371    // will be null.
372    var win = doc.defaultView;
373
374    if (win) {
375      if (monitoringInterval) {
376        win.clearInterval(monitoringInterval);
377      }
378      removeEvent(win, 'resize', callback, true);
379    }
380
381    removeEvent(doc, 'scroll', callback, true);
382    if (domObserver) {
383      domObserver.disconnect();
384    }
385  });
386
387  // Also monitor the parent.
388  
vendor: 14,255 bytes, lines 388-838
388if (doc != (this.root && this.root.ownerDocument || document)) {
389    var frame = getFrameElement(doc);
390    if (frame) {
391      this._monitorIntersections(frame.ownerDocument);
392    }
393  }
394};
395
396
397/**
398 * Stops polling for intersection changes.
399 * @param {!Document} doc
400 * @private
401 */
402IntersectionObserver.prototype._unmonitorIntersections = function(doc) {
403  var index = this._monitoringDocuments.indexOf(doc);
404  if (index == -1) {
405    return;
406  }
407
408  var rootDoc = (this.root && this.root.ownerDocument || document);
409
410  // Check if any dependent targets are still remaining.
411  var hasDependentTargets =
412      this._observationTargets.some(function(item) {
413        var itemDoc = item.element.ownerDocument;
414        // Target is in this context.
415        if (itemDoc == doc) {
416          return true;
417        }
418        // Target is nested in this context.
419        while (itemDoc && itemDoc != rootDoc) {
420          var frame = getFrameElement(itemDoc);
421          itemDoc = frame && frame.ownerDocument;
422          if (itemDoc == doc) {
423            return true;
424          }
425        }
426        return false;
427      });
428  if (hasDependentTargets) {
429    return;
430  }
431
432  // Unsubscribe.
433  var unsubscribe = this._monitoringUnsubscribes[index];
434  this._monitoringDocuments.splice(index, 1);
435  this._monitoringUnsubscribes.splice(index, 1);
436  unsubscribe();
437
438  // Also unmonitor the parent.
439  if (doc != rootDoc) {
440    var frame = getFrameElement(doc);
441    if (frame) {
442      this._unmonitorIntersections(frame.ownerDocument);
443    }
444  }
445};
446
447
448/**
449 * Stops polling for intersection changes.
450 * @param {!Document} doc
451 * @private
452 */
453IntersectionObserver.prototype._unmonitorAllIntersections = function() {
454  var unsubscribes = this._monitoringUnsubscribes.slice(0);
455  this._monitoringDocuments.length = 0;
456  this._monitoringUnsubscribes.length = 0;
457  for (var i = 0; i < unsubscribes.length; i++) {
458    unsubscribes[i]();
459  }
460};
461
462
463/**
464 * Scans each observation target for intersection changes and adds them
465 * to the internal entries queue. If new entries are found, it
466 * schedules the callback to be invoked.
467 * @private
468 */
469IntersectionObserver.prototype._checkForIntersections = function() {
470  if (!this.root && crossOriginUpdater && !crossOriginRect) {
471    // Cross origin monitoring, but no initial data available yet.
472    return;
473  }
474
475  var rootIsInDom = this._rootIsInDom();
476  var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();
477
478  this._observationTargets.forEach(function(item) {
479    var target = item.element;
480    var targetRect = getBoundingClientRect(target);
481    var rootContainsTarget = this._rootContainsTarget(target);
482    var oldEntry = item.entry;
483    var intersectionRect = rootIsInDom && rootContainsTarget &&
484        this._computeTargetAndRootIntersection(target, targetRect, rootRect);
485
486    var newEntry = item.entry = new IntersectionObserverEntry({
487      time: now(),
488      target: target,
489      boundingClientRect: targetRect,
490      rootBounds: crossOriginUpdater && !this.root ? null : rootRect,
491      intersectionRect: intersectionRect
492    });
493
494    if (!oldEntry) {
495      this._queuedEntries.push(newEntry);
496    } else if (rootIsInDom && rootContainsTarget) {
497      // If the new entry intersection ratio has crossed any of the
498      // thresholds, add a new entry.
499      if (this._hasCrossedThreshold(oldEntry, newEntry)) {
500        this._queuedEntries.push(newEntry);
501      }
502    } else {
503      // If the root is not in the DOM or target is not contained within
504      // root but the previous entry for this target had an intersection,
505      // add a new record indicating removal.
506      if (oldEntry && oldEntry.isIntersecting) {
507        this._queuedEntries.push(newEntry);
508      }
509    }
510  }, this);
511
512  if (this._queuedEntries.length) {
513    this._callback(this.takeRecords(), this);
514  }
515};
516
517
518/**
519 * Accepts a target and root rect computes the intersection between then
520 * following the algorithm in the spec.
521 * TODO(philipwalton): at this time clip-path is not considered.
522 * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
523 * @param {Element} target The target DOM element
524 * @param {Object} targetRect The bounding rect of the target.
525 * @param {Object} rootRect The bounding rect of the root after being
526 *     expanded by the rootMargin value.
527 * @return {?Object} The final intersection rect object or undefined if no
528 *     intersection is found.
529 * @private
530 */
531IntersectionObserver.prototype._computeTargetAndRootIntersection =
532    function(target, targetRect, rootRect) {
533  // If the element isn't displayed, an intersection can't happen.
534  if (window.getComputedStyle(target).display == 'none') return;
535
536  var intersectionRect = targetRect;
537  var parent = getParentNode(target);
538  var atRoot = false;
539
540  while (!atRoot && parent) {
541    var parentRect = null;
542    var parentComputedStyle = parent.nodeType == 1 ?
543        window.getComputedStyle(parent) : {};
544
545    // If the parent isn't displayed, an intersection can't happen.
546    if (parentComputedStyle.display == 'none') return null;
547
548    if (parent == this.root || parent.nodeType == /* DOCUMENT */ 9) {
549      atRoot = true;
550      if (parent == this.root || parent == document) {
551        if (crossOriginUpdater && !this.root) {
552          if (!crossOriginRect ||
553              crossOriginRect.width == 0 && crossOriginRect.height == 0) {
554            // A 0-size cross-origin intersection means no-intersection.
555            parent = null;
556            parentRect = null;
557            intersectionRect = null;
558          } else {
559            parentRect = crossOriginRect;
560          }
561        } else {
562          parentRect = rootRect;
563        }
564      } else {
565        // Check if there's a frame that can be navigated to.
566        var frame = getParentNode(parent);
567        var frameRect = frame && getBoundingClientRect(frame);
568        var frameIntersect =
569            frame &&
570            this._computeTargetAndRootIntersection(frame, frameRect, rootRect);
571        if (frameRect && frameIntersect) {
572          parent = frame;
573          parentRect = convertFromParentRect(frameRect, frameIntersect);
574        } else {
575          parent = null;
576          intersectionRect = null;
577        }
578      }
579    } else {
580      // If the element has a non-visible overflow, and it's not the <body>
581      // or <html> element, update the intersection rect.
582      // Note: <body> and <html> cannot be clipped to a rect that's not also
583      // the document rect, so no need to compute a new intersection.
584      var doc = parent.ownerDocument;
585      if (parent != doc.body &&
586          parent != doc.documentElement &&
587          parentComputedStyle.overflow != 'visible') {
588        parentRect = getBoundingClientRect(parent);
589      }
590    }
591
592    // If either of the above conditionals set a new parentRect,
593    // calculate new intersection data.
594    if (parentRect) {
595      intersectionRect = computeRectIntersection(parentRect, intersectionRect);
596    }
597    if (!intersectionRect) break;
598    parent = parent && getParentNode(parent);
599  }
600  return intersectionRect;
601};
602
603
604/**
605 * Returns the root rect after being expanded by the rootMargin value.
606 * @return {ClientRect} The expanded root rect.
607 * @private
608 */
609IntersectionObserver.prototype._getRootRect = function() {
610  var rootRect;
611  if (this.root) {
612    rootRect = getBoundingClientRect(this.root);
613  } else {
614    // Use <html>/<body> instead of window since scroll bars affect size.
615    var html = document.documentElement;
616    var body = document.body;
617    rootRect = {
618      top: 0,
619      left: 0,
620      right: html.clientWidth || body.clientWidth,
621      width: html.clientWidth || body.clientWidth,
622      bottom: html.clientHeight || body.clientHeight,
623      height: html.clientHeight || body.clientHeight
624    };
625  }
626  return this._expandRectByRootMargin(rootRect);
627};
628
629
630/**
631 * Accepts a rect and expands it by the rootMargin value.
632 * @param {DOMRect|ClientRect} rect The rect object to expand.
633 * @return {ClientRect} The expanded rect.
634 * @private
635 */
636IntersectionObserver.prototype._expandRectByRootMargin = function(rect) {
637  var margins = this._rootMarginValues.map(function(margin, i) {
638    return margin.unit == 'px' ? margin.value :
639        margin.value * (i % 2 ? rect.width : rect.height) / 100;
640  });
641  var newRect = {
642    top: rect.top - margins[0],
643    right: rect.right + margins[1],
644    bottom: rect.bottom + margins[2],
645    left: rect.left - margins[3]
646  };
647  newRect.width = newRect.right - newRect.left;
648  newRect.height = newRect.bottom - newRect.top;
649
650  return newRect;
651};
652
653
654/**
655 * Accepts an old and new entry and returns true if at least one of the
656 * threshold values has been crossed.
657 * @param {?IntersectionObserverEntry} oldEntry The previous entry for a
658 *    particular target element or null if no previous entry exists.
659 * @param {IntersectionObserverEntry} newEntry The current entry for a
660 *    particular target element.
661 * @return {boolean} Returns true if a any threshold has been crossed.
662 * @private
663 */
664IntersectionObserver.prototype._hasCrossedThreshold =
665    function(oldEntry, newEntry) {
666
667  // To make comparing easier, an entry that has a ratio of 0
668  // but does not actually intersect is given a value of -1
669  var oldRatio = oldEntry && oldEntry.isIntersecting ?
670      oldEntry.intersectionRatio || 0 : -1;
671  var newRatio = newEntry.isIntersecting ?
672      newEntry.intersectionRatio || 0 : -1;
673
674  // Ignore unchanged ratios
675  if (oldRatio === newRatio) return;
676
677  for (var i = 0; i < this.thresholds.length; i++) {
678    var threshold = this.thresholds[i];
679
680    // Return true if an entry matches a threshold or if the new ratio
681    // and the old ratio are on the opposite sides of a threshold.
682    if (threshold == oldRatio || threshold == newRatio ||
683        threshold < oldRatio !== threshold < newRatio) {
684      return true;
685    }
686  }
687};
688
689
690/**
691 * Returns whether or not the root element is an element and is in the DOM.
692 * @return {boolean} True if the root element is an element and is in the DOM.
693 * @private
694 */
695IntersectionObserver.prototype._rootIsInDom = function() {
696  return !this.root || containsDeep(document, this.root);
697};
698
699
700/**
701 * Returns whether or not the target element is a child of root.
702 * @param {Element} target The target element to check.
703 * @return {boolean} True if the target element is a child of root.
704 * @private
705 */
706IntersectionObserver.prototype._rootContainsTarget = function(target) {
707  return containsDeep(this.root || document, target) &&
708    (!this.root || this.root.ownerDocument == target.ownerDocument);
709};
710
711
712/**
713 * Adds the instance to the global IntersectionObserver registry if it isn't
714 * already present.
715 * @private
716 */
717IntersectionObserver.prototype._registerInstance = function() {
718  if (registry.indexOf(this) < 0) {
719    registry.push(this);
720  }
721};
722
723
724/**
725 * Removes the instance from the global IntersectionObserver registry.
726 * @private
727 */
728IntersectionObserver.prototype._unregisterInstance = function() {
729  var index = registry.indexOf(this);
730  if (index != -1) registry.splice(index, 1);
731};
732
733
734/**
735 * Returns the result of the performance.now() method or null in browsers
736 * that don't support the API.
737 * @return {number} The elapsed time since the page was requested.
738 */
739function now() {
740  return window.performance && performance.now && performance.now();
741}
742
743
744/**
745 * Throttles a function and delays its execution, so it's only called at most
746 * once within a given time period.
747 * @param {Function} fn The function to throttle.
748 * @param {number} timeout The amount of time that must pass before the
749 *     function can be called again.
750 * @return {Function} The throttled function.
751 */
752function throttle(fn, timeout) {
753  var timer = null;
754  return function () {
755    if (!timer) {
756      timer = setTimeout(function() {
757        fn();
758        timer = null;
759      }, timeout);
760    }
761  };
762}
763
764
765/**
766 * Adds an event handler to a DOM node ensuring cross-browser compatibility.
767 * @param {Node} node The DOM node to add the event handler to.
768 * @param {string} event The event name.
769 * @param {Function} fn The event handler to add.
770 * @param {boolean} opt_useCapture Optionally adds the even to the capture
771 *     phase. Note: this only works in modern browsers.
772 */
773function addEvent(node, event, fn, opt_useCapture) {
774  if (typeof node.addEventListener == 'function') {
775    node.addEventListener(event, fn, opt_useCapture || false);
776  }
777  else if (typeof node.attachEvent == 'function') {
778    node.attachEvent('on' + event, fn);
779  }
780}
781
782
783/**
784 * Removes a previously added event handler from a DOM node.
785 * @param {Node} node The DOM node to remove the event handler from.
786 * @param {string} event The event name.
787 * @param {Function} fn The event handler to remove.
788 * @param {boolean} opt_useCapture If the event handler was added with this
789 *     flag set to true, it should be set to true here in order to remove it.
790 */
791function removeEvent(node, event, fn, opt_useCapture) {
792  if (typeof node.removeEventListener == 'function') {
793    node.removeEventListener(event, fn, opt_useCapture || false);
794  }
795  else if (typeof node.detatchEvent == 'function') {
796    node.detatchEvent('on' + event, fn);
797  }
798}
799
800
801/**
802 * Returns the intersection between two rect objects.
803 * @param {Object} rect1 The first rect.
804 * @param {Object} rect2 The second rect.
805 * @return {?Object|?ClientRect} The intersection rect or undefined if no
806 *     intersection is found.
807 */
808function computeRectIntersection(rect1, rect2) {
809  var top = Math.max(rect1.top, rect2.top);
810  var bottom = Math.min(rect1.bottom, rect2.bottom);
811  var left = Math.max(rect1.left, rect2.left);
812  var right = Math.min(rect1.right, rect2.right);
813  var width = right - left;
814  var height = bottom - top;
815
816  return (width >= 0 && height >= 0) && {
817    top: top,
818    bottom: bottom,
819    left: left,
820    right: right,
821    width: width,
822    height: height
823  } || null;
824}
825
826
827/**
828 * Shims the native getBoundingClientRect for compatibility with older IE.
829 * @param {Element} el The element whose bounding rect to get.
830 * @return {DOMRect|ClientRect} The (possibly shimmed) rect of the element.
831 */
832function getBoundingClientRect(el) {
833  var rect;
834
835  try {
836    rect = el.getBoundingClientRect();
837  } catch (err) {
838    // Ignore Windows 7 IE11 "Unspecified error"
839    // https://github.com/w3c/IntersectionObserver/pull/205
840  }
841
842  if (!rect) return getEmptyRect();
843
844  // Older IE
845  if (!(rect.width && rect.height)) {
846    rect = {
847      top: rect.top,
848      right: rect.right,
849      bottom: rect.bottom,
850      left: rect.left,
851      width: rect.right - rect.left,
852      height: rect.bottom - rect.top
853    };
854  }
855  return rect;
856}
857
858
859/**
860 * Returns an empty rect object. An empty rect is returned when an element
861 * is not in the DOM.
862 * @return {ClientRect} The empty rect.
863 */
864function getEmptyRect() {
865  return {
866    top: 0,
867    bottom: 0,
868    left: 0,
869    right: 0,
870    width: 0,
871    height: 0
872  };
873}
874
875
876/**
877 * Ensure that the result has all of the necessary fields of the DOMRect.
878 * Specifically this ensures that `x` and `y` fields are set.
879 *
880 * @param {?DOMRect|?ClientRect} rect
881 * @return {?DOMRect}
882 */
883function ensureDOMRect(rect) {
884  // A `DOMRect` object has `x` and `y` fields.
885  if (!rect || 'x' in rect) {
886    return rect;
887  }
888  // A IE's `ClientRect` type does not have `x` and `y`. The same is the case
889  // for internally calculated Rect objects. For the purposes of
890  // `IntersectionObserver`, it's sufficient to simply mirror `left` and `top`
891  // for these fields.
892  return {
893    top: rect.top,
894    y: rect.top,
895    bottom: rect.bottom,
896    left: rect.left,
897    x: rect.left,
898    right: rect.right,
899    width: rect.width,
900    height: rect.height
901  };
902}
903
904
905/**
906 * Inverts the intersection and bounding rect from the parent (frame) BCR to
907 * the local BCR space.
908 * @param {DOMRect|ClientRect} parentBoundingRect The parent's bound client rect.
909 * @param {DOMRect|ClientRect} parentIntersectionRect The parent's own intersection rect.
910 * @return {ClientRect} The local root bounding rect for the parent's children.
911 */
912function convertFromParentRect(parentBoundingRect, parentIntersectionRect) {
913  var top = parentIntersectionRect.top - parentBoundingRect.top;
914  var left = parentIntersectionRect.left - parentBoundingRect.left;
915  return {
916    top: top,
917    left: left,
918    height: parentIntersectionRect.height,
919    width: parentIntersectionRect.width,
920    bottom: top + parentIntersectionRect.height,
921    right: left + parentIntersectionRect.width
922  };
923}
924
925
926/**
927 * Checks to see if a parent element contains a child element (including inside
928 * shadow DOM).
929 * @param {Node} parent The parent element.
930 * @param {Node} child The child element.
931 * @return {boolean} True if the parent node contains the child node.
932 */
933function containsDeep(parent, child) {
934  var node = child;
935  while (node) {
936    if (node == parent) return true;
937
938    node = getParentNode(node);
939  }
940  return false;
941}
942
943
944/**
945 * Gets the parent node of an element or its host element if the parent node
946 * is a shadow root.
947 * @param {Node} node The node whose parent to get.
948 * @return {Node|null} The parent node or null if no parent exists.
949 */
950function getParentNode(node) {
951  var parent = node.parentNode;
952
953  if (node.nodeType == /* DOCUMENT */ 9 && node != document) {
954    // If this node is a document node, look for the embedding frame.
955    return getFrameElement(node);
956  }
957
958  if (parent && parent.nodeType == 11 && parent.host) {
959    // If the parent is a shadow root, return the host element.
960    return parent.host;
961  }
962
963  if (parent && parent.assignedSlot) {
964    // If the parent is distributed in a <slot>, return the parent of a slot.
965    return parent.assignedSlot.parentNode;
966  }
967
968  return parent;
969}
970
971
972/**
973 * Returns the embedding frame element, if any.
974 * @param {!Document} doc
975 * @return {!Element}
976 */
977function getFrameElement(doc) {
978  try {
979    return doc.defaultView && doc.defaultView.frameElement || null;
980  } catch (e) {
981    // Ignore the error.
982    return null;
983  }
984}
985
986
987// Exposes the constructors globally.
988window.IntersectionObserver = IntersectionObserver;
989window.IntersectionObserverEntry = IntersectionObserverEntry;
990
991}());
992
993/* =========================================================
994 * bootstrap-treeview.js v1.2.0
995 * =========================================================
996 * Copyright 2013 Jonathan Miles
997 * Project URL : http://www.jondmiles.com/bootstrap-treeview
998 *
999 * Licensed under the Apache License, Version 2.0 (the "License");
1000 * you may not use this file except in compliance with the License.
1001 * You may obtain a copy of the License at
1002 *
1003 * http://www.apache.org/licenses/LICENSE-2.0
1004 *
1005 * Unless required by applicable law or agreed to in writing, software
1006 * distributed under the License is distributed on an "AS IS" BASIS,
1007 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1008 * See the License for the specific language governing permissions and
1009 * limitations under the License.
1010 * ========================================================= */
1011
1012;(function ($, window, document, undefined) {
1013
1014	/*global jQuery, console*/
1015
1016	'use strict';
1017
1018	var pluginName = 'treeview';
1019
1020	var _default = {};
1021
1022	_default.settings = {
1023
1024		injectStyle: true,
1025
1026		levels: 2,
1027
1028		expandIcon: 'glyphicon glyphicon-plus',
1029		collapseIcon: 'glyphicon glyphicon-minus',
1030		emptyIcon: 'glyphicon',
1031		nodeIcon: '',
1032		selectedIcon: '',
1033		checkedIcon: 'glyphicon glyphicon-check',
1034		uncheckedIcon: 'glyphicon glyphicon-unchecked',
1035
1036		color: undefined, // '#000000',
1037		backColor: undefined, // '#FFFFFF',
1038		borderColor: undefined, // '#dddddd',
1039		onhoverColor: '#F5F5F5',
1040		selectedColor: '#FFFFFF',
1041		selectedBackColor: '#428bca',
1042		searchResultColor: '#D9534F',
1043		searchResultBackColor: undefined, //'#FFFFFF',
1044
1045		enableLinks: false,
1046		highlightSelected: true,
1047		highlightSearchResults: true,
1048		showBorder: true,
1049		showIcon: true,
1050		showCheckbox: false,
1051		showTags: false,
1052		multiSelect: false,
1053
1054		// Event handlers
1055		onNodeChecked: undefined,
1056		onNodeCollapsed: undefined,
1057		onNodeDisabled: undefined,
1058		onNodeEnabled: undefined,
1059		onNodeExpanded: undefined,
1060		onNodeSelected: undefined,
1061		onNodeUnchecked: undefined,
1062		onNodeUnselected: undefined,
1063		onSearchComplete: undefined,
1064		onSearchCleared: undefined
1065	};
1066
1067	_default.options = {
1068		silent: false,
1069		ignoreChildren: false
1070	};
1071
1072	_default.searchOptions = {
1073		ignoreCase: true,
1074		exactMatch: false,
1075		revealResults: true
1076	};
1077
1078	var Tree = function (element, options) {
1079
1080		this.$element = $(element);
1081		this.elementId = element.id;
1082		this.styleId = this.elementId + '-style';
1083
1084		this.init(options);
1085
1086		return {
1087
1088			// Options (public access)
1089			options: this.options,
1090
1091			// Initialize / destroy methods
1092			init: $.proxy(this.init, this),
1093			remove: $.proxy(this.remove, this),
1094
1095			// Get methods
1096			getNode: $.proxy(this.getNode, this),
1097			getParent: $.proxy(this.getParent, this),
1098			getSiblings: $.proxy(this.getSiblings, this),
1099			getSelected: $.proxy(this.getSelected, this),
1100			getUnselected: $.proxy(this.getUnselected, this),
1101			getExpanded: $.proxy(this.getExpanded, this),
1102			getCollapsed: $.proxy(this.getCollapsed, this),
1103			getChecked: $.proxy(this.getChecked, this),
1104			getUnchecked: $.proxy(this.getUnchecked, this),
1105			getDisabled: $.proxy(this.getDisabled, this),
1106			getEnabled: $.proxy(this.getEnabled, this),
1107
1108			// Select methods
1109			selectNode: $.proxy(this.selectNode, this),
1110			unselectNode: $.proxy(this.unselectNode, this),
1111			toggleNodeSelected: $.proxy(this.toggleNodeSelected, this),
1112
1113			// Expand / collapse methods
1114			collapseAll: $.proxy(this.collapseAll, this),
1115			collapseNode: $.proxy(this.collapseNode, this),
1116			expandAll: $.proxy(this.expandAll, this),
1117			expandNode: $.proxy(this.expandNode, this),
1118			toggleNodeExpanded: $.proxy(this.toggleNodeExpanded, this),
1119			revealNode: $.proxy(this.revealNode, this),
1120
1121			// Expand / collapse methods
1122			checkAll: $.proxy(this.checkAll, this),
1123			checkNode: $.proxy(this.checkNode, this),
1124			uncheckAll: $.proxy(this.uncheckAll, this),
1125			uncheckNode: $.proxy(this.uncheckNode, this),
1126			toggleNodeChecked: $.proxy(this.toggleNodeChecked, this),
1127
1128			// Disable / enable methods
1129			disableAll: $.proxy(this.disableAll, this),
1130			disableNode: $.proxy(this.disableNode, this),
1131			enableAll: $.proxy(this.enableAll, this),
1132			enableNode: $.proxy(this.enableNode, this),
1133			toggleNodeDisabled: $.proxy(this.toggleNodeDisabled, this),
1134
1135			// Search methods
1136			search: $.proxy(this.search, this),
1137			clearSearch: $.proxy(this.clearSearch, this)
1138		};
1139	};
1140
1141	Tree.prototype.init = function (options) {
1142
1143		this.tree = [];
1144		this.nodes = [];
1145
1146		if (options.data) {
1147			if (typeof options.data === 'string') {
1148				options.data = $.parseJSON(options.data);
1149			}
1150			this.tree = $.extend(true, [], options.data);
1151			delete options.data;
1152		}
1153		this.options = $.extend({}, _default.settings, options);
1154
1155		this.destroy();
1156		this.subscribeEvents();
1157		this.setInitialStates({ nodes: this.tree }, 0);
1158		this.render();
1159	};
1160
1161	Tree.prototype.remove = function () {
1162		this.destroy();
1163		$.removeData(this, pluginName);
1164		$('#' + this.styleId).remove();
1165	};
1166
1167	Tree.prototype.destroy = function () {
1168
1169		if (!this.initialized) return;
1170
1171		this.$wrapper.remove();
1172		this.$wrapper = null;
1173
1174		// Switch off events
1175		this.unsubscribeEvents();
1176
1177		// Reset this.initialized flag
1178		this.initialized = false;
1179	};
1180
1181	Tree.prototype.unsubscribeEvents = function () {
1182
1183		this.$element.off('click');
1184		this.$element.off('nodeChecked');
1185		this.$element.off('nodeCollapsed');
1186		this.$element.off('nodeDisabled');
1187		this.$element.off('nodeEnabled');
1188		this.$element.off('nodeExpanded');
1189		this.$element.off('nodeSelected');
1190		this.$element.off('nodeUnchecked');
1191		this.$element.off('nodeUnselected');
1192		this.$element.off('searchComplete');
1193		this.$element.off('searchCleared');
1194	};
1195
1196	Tree.prototype.subscribeEvents = function () {
1197
1198		this.unsubscribeEvents();
1199
1200		this.$element.on('click', $.proxy(this.clickHandler, this));
1201
1202		if (typeof (this.options.onNodeChecked) === 'function') {
1203			this.$element.on('nodeChecked', this.options.onNodeChecked);
1204		}
1205
1206		if (typeof (this.options.onNodeCollapsed) === 'function') {
1207			this.$element.on('nodeCollapsed', this.options.onNodeCollapsed);
1208		}
1209
1210		if (typeof (this.options.onNodeDisabled) === 'function') {
1211			this.$element.on('nodeDisabled', this.options.onNodeDisabled);
1212		}
1213
1214		if (typeof (this.options.onNodeEnabled) === 'function') {
1215			this.$element.on('nodeEnabled', this.options.onNodeEnabled);
1216		}
1217
1218		if (typeof (this.options.onNodeExpanded) === 'function') {
1219			this.$element.on('nodeExpanded', this.options.onNodeExpanded);
1220		}
1221
1222		if (typeof (this.options.onNodeSelected) === 'function') {
1223			this.$element.on('nodeSelected', this.options.onNodeSelected);
1224		}
1225
1226		if (typeof (this.options.onNodeUnchecked) === 'function') {
1227			this.$element.on('nodeUnchecked', this.options.onNodeUnchecked);
1228		}
1229
1230		if (typeof (this.options.onNodeUnselected) === 'function') {
1231			this.$element.on('nodeUnselected', this.options.onNodeUnselected);
1232		}
1233
1234		if (typeof (this.options.onSearchComplete) === 'function') {
1235			this.$element.on('searchComplete', this.options.onSearchComplete);
1236		}
1237
1238		if (typeof (this.options.onSearchCleared) === 'function') {
1239			this.$element.on('searchCleared', this.options.onSearchCleared);
1240		}
1241	};
1242
1243	/*
1244		Recurse the tree structure and ensure all nodes have
1245		valid initial states.  User defined states will be preserved.
1246		For performance we also take this opportunity to
1247		index nodes in a flattened structure
1248	*/
1249	Tree.prototype.setInitialStates = function (node, level) {
1250
1251		if (!node.nodes) return;
1252		level += 1;
1253
1254		var parent = node;
1255		var _this = this;
1256		$.each(node.nodes, function checkStates(index, node) {
1257
1258			// nodeId : unique, incremental identifier
1259			node.nodeId = _this.nodes.length;
1260
1261			// parentId : transversing up the tree
1262			node.parentId = parent.nodeId;
1263
1264			// if not provided set selectable default value
1265			if (!node.hasOwnProperty('selectable')) {
1266				node.selectable = true;
1267			}
1268
1269			// where provided we should preserve states
1270			node.state = node.state || {};
1271
1272			// set checked state; unless set always false
1273			if (!node.state.hasOwnProperty('checked')) {
1274				node.state.checked = false;
1275			}
1276
1277			// set enabled state; unless set always false
1278			if (!node.state.hasOwnProperty('disabled')) {
1279				node.state.disabled = false;
1280			}
1281
1282			// set expanded state; if not provided based on levels
1283			if (!node.state.hasOwnProperty('expanded')) {
1284				if (!node.state.disabled &&
1285						(level < _this.options.levels) &&
1286						(node.nodes && node.nodes.length > 0)) {
1287					node.state.expanded = true;
1288				}
1289				else {
1290					node.state.expanded = false;
1291				}
1292			}
1293
1294			// set selected state; unless set always false
1295			if (!node.state.hasOwnProperty('selected')) {
1296				node.state.selected = false;
1297			}
1298
1299			// index nodes in a flattened structure for use later
1300			_this.nodes.push(node);
1301
1302			// recurse child nodes and transverse the tree
1303			if (node.nodes) {
1304				_this.setInitialStates(node, level);
1305			}
1306		});
1307	};
1308
1309	Tree.prototype.clickHandler = function (event) {
1310
1311		if (!this.options.enableLinks) event.preventDefault();
1312
1313		var target = $(event.target);
1314		var node = this.findNode(target);
1315		if (!node || node.state.disabled) return;
1316
1317		var classList = target.attr('class') ? target.attr('class').split(' ') : [];
1318		if ((classList.indexOf('expand-icon') !== -1)) {
1319
1320			this.toggleExpandedState(node, _default.options);
1321			this.render();
1322		}
1323		else if ((classList.indexOf('check-icon') !== -1)) {
1324
1325			this.toggleCheckedState(node, _default.options);
1326			this.render();
1327		}
1328		else {
1329
1330			if (node.selectable) {
1331				this.toggleSelectedState(node, _default.options);
1332			} else {
1333				this.toggleExpandedState(node, _default.options);
1334			}
1335
1336			this.render();
1337		}
1338	};
1339
1340	// Looks up the DOM for the closest parent list item to retrieve the
1341	// data attribute nodeid, which is used to lookup the node in the flattened structure.
1342	Tree.prototype.findNode = function (target) {
1343
1344		var nodeId = target.closest('li.list-group-item').attr('data-nodeid');
1345		var node = this.nodes[nodeId];
1346
1347		if (!node) {
1348			console.log('Error: node does not exist');
1349		}
1350		return node;
1351	};
1352
1353	Tree.prototype.toggleExpandedState = function (node, options) {
1354		if (!node) return;
1355		this.setExpandedState(node, !node.state.expanded, options);
1356	};
1357
1358	Tree.prototype.setExpandedState = function (node, state, options) {
1359
1360		if (state === node.state.expanded) return;
1361
1362		if (state && node.nodes) {
1363
1364			// Expand a node
1365			node.state.expanded = true;
1366			if (!options.silent) {
1367				this.$element.trigger('nodeExpanded', $.extend(true, {}, node));
1368			}
1369		}
1370		else if (!state) {
1371
1372			// Collapse a node
1373			node.state.expanded = false;
1374			if (!options.silent) {
1375				this.$element.trigger('nodeCollapsed', $.extend(true, {}, node));
1376			}
1377
1378			// Collapse child nodes
1379			if (node.nodes && !options.ignoreChildren) {
1380				$.each(node.nodes, $.proxy(function (index, node) {
1381					this.setExpandedState(node, false, options);
1382				}, this));
1383			}
1384		}
1385	};
1386
1387	Tree.prototype.toggleSelectedState = function (node, options) {
1388		if (!node) return;
1389		this.setSelectedState(node, !node.state.selected, options);
1390	};
1391
1392	Tree.prototype.setSelectedState = function (node, state, options) {
1393
1394		if (state === node.state.selected) return;
1395
1396		if (state) {
1397
1398			// If multiSelect false, unselect previously selected
1399			if (!this.options.multiSelect) {
1400				$.each(this.findNodes('true', 'g', 'state.selected'), $.proxy(function (index, node) {
1401					this.setSelectedState(node, false, options);
1402				}, this));
1403			}
1404
1405			// Continue selecting node
1406			node.state.selected = true;
1407			if (!options.silent) {
1408				this.$element.trigger('nodeSelected', $.extend(true, {}, node));
1409			}
1410		}
1411		else {
1412
1413			// Unselect node
1414			node.state.selected = false;
1415			if (!options.silent) {
1416				this.$element.trigger('nodeUnselected', $.extend(true, {}, node));
1417			}
1418		}
1419	};
1420
1421	Tree.prototype.toggleCheckedState = function (node, options) {
1422		if (!node) return;
1423		this.setCheckedState(node, !node.state.checked, options);
1424	};
1425
1426	Tree.prototype.setCheckedState = function (node, state, options) {
1427
1428		if (state === node.state.checked) return;
1429
1430		if (state) {
1431
1432			// Check node
1433			node.state.checked = true;
1434
1435			if (!options.silent) {
1436				this.$element.trigger('nodeChecked', $.extend(true, {}, node));
1437			}
1438		}
1439		else {
1440
1441			// Uncheck node
1442			node.state.checked = false;
1443			if (!options.silent) {
1444				this.$element.trigger('nodeUnchecked', $.extend(true, {}, node));
1445			}
1446		}
1447	};
1448
1449	Tree.prototype.setDisabledState = function (node, state, options) {
1450
1451		if (state === node.state.disabled) return;
1452
1453		if (state) {
1454
1455			// Disable node
1456			node.state.disabled = true;
1457
1458			// Disable all other states
1459			this.setExpandedState(node, false, options);
1460			this.setSelectedState(node, false, options);
1461			this.setCheckedState(node, false, options);
1462
1463			if (!options.silent) {
1464				this.$element.trigger('nodeDisabled', $.extend(true, {}, node));
1465			}
1466		}
1467		else {
1468
1469			// Enabled node
1470			node.state.disabled = false;
1471			if (!options.silent) {
1472				this.$element.trigger('nodeEnabled', $.extend(true, {}, node));
1473			}
1474		}
1475	};
1476
1477	Tree.prototype.render = function () {
1478
1479		if (!this.initialized) {
1480
1481			// Setup first time only components
1482			this.$element.addClass(pluginName);
1483			this.$wrapper = $(this.template.list);
1484
1485			this.injectStyle();
1486
1487			this.initialized = true;
1488		}
1489
1490		this.$element.empty().append(this.$wrapper.empty());
1491
1492		// Build tree
1493		this.buildTree(this.tree, 0);
1494
1495		$('#help-tree .list-group-item').each(function() {
1496			if (!$(this).find('.indent').length) {
1497				$(this).addClass('main-node');
1498			}
1499		});
1500	};
1501
1502	// Starting from the root node, and recursing down the
1503	// structure we build the tree one node at a time
1504	Tree.prototype.buildTree = function (nodes, level) {
1505
1506		if (!nodes) return;
1507		level += 1;
1508
1509		var _this = this;
1510		$.each(nodes, function addNodes(id, node) {
1511
1512			var treeItem = $(_this.template.item)
1513				.addClass('node-' + _this.elementId)
1514				.addClass(node.state.checked ? 'node-checked' : '')
1515				.addClass(node.state.disabled ? 'node-disabled': '')
1516				.addClass(node.state.selected ? 'node-selected' : '')
1517				.addClass(node.searchResult ? 'search-result' : '')
1518				.attr('data-nodeid', node.nodeId)
1519				.attr('style', _this.buildStyleOverride(node));
1520
1521			// Add indent/spacer to mimic tree structure
1522			for (var i = 0; i < (level - 1); i++) {
1523				treeItem.append(_this.template.indent);
1524			}
1525
1526			// Add expand, collapse or empty spacer icons
1527			var classList = [];
1528			if (node.nodes) {
1529				classList.push('expand-icon');
1530				if (node.state.expanded) {
1531					classList.push(_this.options.collapseIcon);
1532				}
1533				else {
1534					classList.push(_this.options.expandIcon);
1535				}
1536			}
1537			else {
1538				classList.push(_this.options.emptyIcon);
1539			}
1540
1541			treeItem
1542				.append($(_this.template.icon)
1543					.addClass(classList.join(' '))
1544				);
1545
1546
1547			// Add node icon
1548			if (_this.options.showIcon) {
1549
1550				var classList = ['node-icon'];
1551
1552				classList.push(node.icon || _this.options.nodeIcon);
1553				if (node.state.selected) {
1554					classList.pop();
1555					classList.push(node.selectedIcon || _this.options.selectedIcon ||
1556									node.icon || _this.options.nodeIcon);
1557				}
1558
1559				treeItem
1560					.append($(_this.template.icon)
1561						.addClass(classList.join(' '))
1562					);
1563			}
1564
1565			// Add check / unchecked icon
1566			if (_this.options.showCheckbox) {
1567
1568				var classList = ['check-icon'];
1569				if (node.state.checked) {
1570					classList.push(_this.options.checkedIcon);
1571				}
1572				else {
1573					classList.push(_this.options.uncheckedIcon);
1574				}
1575
1576				treeItem
1577					.append($(_this.template.icon)
1578						.addClass(classList.join(' '))
1579					);
1580			}
1581
1582			// Add text
1583			if (_this.options.enableLinks) {
1584				// Add hyperlink
1585				treeItem
1586					.append($(_this.template.link)
1587						.attr('href', node.href)
1588						.append(node.text)
1589					);
1590			}
1591			else {
1592				// otherwise just text
1593				treeItem
1594					.append(node.text);
1595			}
1596
1597			// Add tags as badges
1598			if (_this.options.showTags && node.tags) {
1599				$.each(node.tags, function addTag(id, tag) {
1600					treeItem
1601						.append($(_this.template.badge)
1602							.append(tag)
1603						);
1604				});
1605			}
1606
1607			// Add item to the tree
1608			_this.$wrapper.append(treeItem);
1609
1610			// Recursively add child ndoes
1611			if (node.nodes && node.state.expanded && !node.state.disabled) {
1612				return _this.buildTree(node.nodes, level);
1613			}
1614		});
1615	};
1616
1617	// Define any node level style override for
1618	// 1. selectedNode
1619	// 2. node|data assigned color overrides
1620	Tree.prototype.buildStyleOverride = function (node) {
1621
1622		if (node.state.disabled) return '';
1623
1624		var color = node.color;
1625		var backColor = node.backColor;
1626
1627		if (this.options.highlightSelected && node.state.selected) {
1628			if (this.options.selectedColor) {
1629				color = this.options.selectedColor;
1630			}
1631			if (this.options.selectedBackColor) {
1632				backColor = this.options.selectedBackColor;
1633			}
1634		}
1635
1636		if (this.options.highlightSearchResults && node.searchResult && !node.state.disabled) {
1637			if (this.options.searchResultColor) {
1638				color = this.options.searchResultColor;
1639			}
1640			if (this.options.searchResultBackColor) {
1641				backColor = this.options.searchResultBackColor;
1642			}
1643		}
1644
1645		return 'color:' + color +
1646			';background-color:' + backColor + ';';
1647	};
1648
1649	// Add inline style into head
1650	Tree.prototype.injectStyle = function () {
1651
1652		if (this.options.injectStyle && !document.getElementById(this.styleId)) {
1653			$('<style type="text/css" id="' + this.styleId + '"> ' + this.buildStyle() + ' </style>').appendTo('head');
1654		}
1655	};
1656
1657	// Construct trees style based on user options
1658	Tree.prototype.buildStyle = function () {
1659
1660		var style = '.node-' + this.elementId + '{';
1661
1662		if (this.options.color) {
1663			style += 'color:' + this.options.color + ';';
1664		}
1665
1666		if (this.options.backColor) {
1667			style += 'background-color:' + this.options.backColor + ';';
1668		}
1669
1670		if (!this.options.showBorder) {
1671			style += 'border:none;';
1672		}
1673		else if (this.options.borderColor) {
1674			style += 'border:1px solid ' + this.options.borderColor + ';';
1675		}
1676		style += '}';
1677
1678		if (this.options.onhoverColor) {
1679			style += '.node-' + this.elementId + ':not(.node-disabled):hover{' +
1680				'background-color:' + this.options.onhoverColor + ';' +
1681			'}';
1682		}
1683
1684		return this.css + style;
1685	};
1686
1687	Tree.prototype.template = {
1688		list: '<ul class="list-group"></ul>',
1689		item: '<li class="list-group-item"></li>',
1690		indent: '<span class="indent"></span>',
1691		icon: '<span class="icon"></span>',
1692		link: '<a href="#" style="color:inherit;"></a>',
1693		badge: '<span class="badge"></span>'
1694	};
1695
1696	Tree.prototype.css = '.treeview .list-group-item{cursor:pointer}.treeview span.indent{margin-left:10px;margin-right:10px}.treeview span.icon{width:12px;margin-right:5px}.treeview .node-disabled{color:silver;cursor:not-allowed}'
1697
1698
1699	/**
1700		Returns a single node object that matches the given node id.
1701		@param {Number} nodeId - A node's unique identifier
1702		@return {Object} node - Matching node
1703	*/
1704	Tree.prototype.getNode = function (nodeId) {
1705		return this.nodes[nodeId];
1706	};
1707
1708	/**
1709		Returns the parent node of a given node, if valid otherwise returns undefined.
1710		@param {Object|Number} identifier - A valid node or node id
1711		@returns {Object} node - The parent node
1712	*/
1713	Tree.prototype.getParent = function (identifier) {
1714		var node = this.identifyNode(identifier);
1715		return this.nodes[node.parentId];
1716	};
1717
1718	/**
1719		Returns an array of sibling nodes for a given node, if valid otherwise returns undefined.
1720		@param {Object|Number} identifier - A valid node or node id
1721		@returns {Array} nodes - Sibling nodes
1722	*/
1723	Tree.prototype.getSiblings = function (identifier) {
1724		var node = this.identifyNode(identifier);
1725		var parent = this.getParent(node);
1726		var nodes = parent ? parent.nodes : this.tree;
1727		return nodes.filter(function (obj) {
1728				return obj.nodeId !== node.nodeId;
1729			});
1730	};
1731
1732	/**
1733		Returns an array of selected nodes.
1734		@returns {Array} nodes - Selected nodes
1735	*/
1736	Tree.prototype.getSelected = function () {
1737		return this.findNodes('true', 'g', 'state.selected');
1738	};
1739
1740	/**
1741		Returns an array of unselected nodes.
1742		@returns {Array} nodes - Unselected nodes
1743	*/
1744	Tree.prototype.getUnselected = function () {
1745		return this.findNodes('false', 'g', 'state.selected');
1746	};
1747
1748	/**
1749		Returns an array of expanded nodes.
1750		@returns {Array} nodes - Expanded nodes
1751	*/
1752	Tree.prototype.getExpanded = function () {
1753		return this.findNodes('true', 'g', 'state.expanded');
1754	};
1755
1756	/**
1757		Returns an array of collapsed nodes.
1758		@returns {Array} nodes - Collapsed nodes
1759	*/
1760	Tree.prototype.getCollapsed = function () {
1761		return this.findNodes('false', 'g', 'state.expanded');
1762	};
1763
1764	/**
1765		Returns an array of checked nodes.
1766		@returns {Array} nodes - Checked nodes
1767	*/
1768	Tree.prototype.getChecked = function () {
1769		return this.findNodes('true', 'g', 'state.checked');
1770	};
1771
1772	/**
1773		Returns an array of unchecked nodes.
1774		@returns {Array} nodes - Unchecked nodes
1775	*/
1776	Tree.prototype.getUnchecked = function () {
1777		return this.findNodes('false', 'g', 'state.checked');
1778	};
1779
1780	/**
1781		Returns an array of disabled nodes.
1782		@returns {Array} nodes - Disabled nodes
1783	*/
1784	Tree.prototype.getDisabled = function () {
1785		return this.findNodes('true', 'g', 'state.disabled');
1786	};
1787
1788	/**
1789		Returns an array of enabled nodes.
1790		@returns {Array} nodes - Enabled nodes
1791	*/
1792	Tree.prototype.getEnabled = function () {
1793		return this.findNodes('false', 'g', 'state.disabled');
1794	};
1795
1796
1797	/**
1798		Set a node state to selected
1799		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1800		@param {optional Object} options
1801	*/
1802	Tree.prototype.selectNode = function (identifiers, options) {
1803		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1804			this.setSelectedState(node, true, options);
1805		}, this));
1806
1807		this.render();
1808	};
1809
1810	/**
1811		Set a node state to unselected
1812		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1813		@param {optional Object} options
1814	*/
1815	Tree.prototype.unselectNode = function (identifiers, options) {
1816		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1817			this.setSelectedState(node, false, options);
1818		}, this));
1819
1820		this.render();
1821	};
1822
1823	/**
1824		Toggles a node selected state; selecting if unselected, unselecting if selected.
1825		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1826		@param {optional Object} options
1827	*/
1828	Tree.prototype.toggleNodeSelected = function (identifiers, options) {
1829		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1830			this.toggleSelectedState(node, options);
1831		}, this));
1832
1833		this.render();
1834	};
1835
1836
1837	/**
1838		Collapse all tree nodes
1839		@param {optional Object} options
1840	*/
1841	Tree.prototype.collapseAll = function (options) {
1842		var identifiers = this.findNodes('true', 'g', 'state.expanded');
1843		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1844			this.setExpandedState(node, false, options);
1845		}, this));
1846
1847		this.render();
1848	};
1849
1850	/**
1851		Collapse a given tree node
1852		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1853		@param {optional Object} options
1854	*/
1855	Tree.prototype.collapseNode = function (identifiers, options) {
1856		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1857			this.setExpandedState(node, false, options);
1858		}, this));
1859
1860		this.render();
1861	};
1862
1863	/**
1864		Expand all tree nodes
1865		@param {optional Object} options
1866	*/
1867	Tree.prototype.expandAll = function (options) {
1868		options = $.extend({}, _default.options, options);
1869
1870		if (options && options.levels) {
1871			this.expandLevels(this.tree, options.levels, options);
1872		}
1873		else {
1874			var identifiers = this.findNodes('false', 'g', 'state.expanded');
1875			this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1876				this.setExpandedState(node, true, options);
1877			}, this));
1878		}
1879
1880		this.render();
1881	};
1882
1883	/**
1884		Expand a given tree node
1885		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1886		@param {optional Object} options
1887	*/
1888	Tree.prototype.expandNode = function (identifiers, options) {
1889		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1890			this.setExpandedState(node, true, options);
1891			if (node.nodes && (options && options.levels)) {
1892				this.expandLevels(node.nodes, options.levels-1, options);
1893			}
1894		}, this));
1895
1896		this.render();
1897	};
1898
1899	Tree.prototype.expandLevels = function (nodes, level, options) {
1900		options = $.extend({}, _default.options, options);
1901
1902		$.each(nodes, $.proxy(function (index, node) {
1903			this.setExpandedState(node, (level > 0) ? true : false, options);
1904			if (node.nodes) {
1905				this.expandLevels(node.nodes, level-1, options);
1906			}
1907		}, this));
1908	};
1909
1910	/**
1911		Reveals a given tree node, expanding the tree from node to root.
1912		@param {Object|Number|Array} identifiers - A valid node, node id or array of node identifiers
1913		@param {optional Object} options
1914	*/
1915	Tree.prototype.revealNode = function (identifiers, options) {
1916		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1917			var parentNode = this.getParent(node);
1918			while (parentNode) {
1919				this.setExpandedState(parentNode, true, options);
1920				parentNode = this.getParent(parentNode);
1921			};
1922		}, this));
1923
1924		this.render();
1925	};
1926
1927	/**
1928		Toggles a nodes expanded state; collapsing if expanded, expanding if collapsed.
1929		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1930		@param {optional Object} options
1931	*/
1932	Tree.prototype.toggleNodeExpanded = function (identifiers, options) {
1933		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1934			this.toggleExpandedState(node, options);
1935		}, this));
1936
1937		this.render();
1938	};
1939
1940
1941	/**
1942		Check all tree nodes
1943		@param {optional Object} options
1944	*/
1945	Tree.prototype.checkAll = function (options) {
1946		var identifiers = this.findNodes('false', 'g', 'state.checked');
1947		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1948			this.setCheckedState(node, true, options);
1949		}, this));
1950
1951		this.render();
1952	};
1953
1954	/**
1955		Check a given tree node
1956		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1957		@param {optional Object} options
1958	*/
1959	Tree.prototype.checkNode = function (identifiers, options) {
1960		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1961			this.setCheckedState(node, true, options);
1962		}, this));
1963
1964		this.render();
1965	};
1966
1967	/**
1968		Uncheck all tree nodes
1969		@param {optional Object} options
1970	*/
1971	Tree.prototype.uncheckAll = function (options) {
1972		var identifiers = this.findNodes('true', 'g', 'state.checked');
1973		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1974			this.setCheckedState(node, false, options);
1975		}, this));
1976
1977		this.render();
1978	};
1979
1980	/**
1981		Uncheck a given tree node
1982		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1983		@param {optional Object} options
1984	*/
1985	Tree.prototype.uncheckNode = function (identifiers, options) {
1986		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
1987			this.setCheckedState(node, false, options);
1988		}, this));
1989
1990		this.render();
1991	};
1992
1993	/**
1994		Toggles a nodes checked state; checking if unchecked, unchecking if checked.
1995		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
1996		@param {optional Object} options
1997	*/
1998	Tree.prototype.toggleNodeChecked = function (identifiers, options) {
1999		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
2000			this.toggleCheckedState(node, options);
2001		}, this));
2002
2003		this.render();
2004	};
2005
2006
2007	/**
2008		Disable all tree nodes
2009		@param {optional Object} options
2010	*/
2011	Tree.prototype.disableAll = function (options) {
2012		var identifiers = this.findNodes('false', 'g', 'state.disabled');
2013		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
2014			this.setDisabledState(node, true, options);
2015		}, this));
2016
2017		this.render();
2018	};
2019
2020	/**
2021		Disable a given tree node
2022		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
2023		@param {optional Object} options
2024	*/
2025	Tree.prototype.disableNode = function (identifiers, options) {
2026		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
2027			this.setDisabledState(node, true, options);
2028		}, this));
2029
2030		this.render();
2031	};
2032
2033	/**
2034		Enable all tree nodes
2035		@param {optional Object} options
2036	*/
2037	Tree.prototype.enableAll = function (options) {
2038		var identifiers = this.findNodes('true', 'g', 'state.disabled');
2039		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
2040			this.setDisabledState(node, false, options);
2041		}, this));
2042
2043		this.render();
2044	};
2045
2046	/**
2047		Enable a given tree node
2048		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
2049		@param {optional Object} options
2050	*/
2051	Tree.prototype.enableNode = function (identifiers, options) {
2052		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
2053			this.setDisabledState(node, false, options);
2054		}, this));
2055
2056		this.render();
2057	};
2058
2059	/**
2060		Toggles a nodes disabled state; disabling is enabled, enabling if disabled.
2061		@param {Object|Number} identifiers - A valid node, node id or array of node identifiers
2062		@param {optional Object} options
2063	*/
2064	Tree.prototype.toggleNodeDisabled = function (identifiers, options) {
2065		this.forEachIdentifier(identifiers, options, $.proxy(function (node, options) {
2066			this.setDisabledState(node, !node.state.disabled, options);
2067		}, this));
2068
2069		this.render();
2070	};
2071
2072
2073	/**
2074		Common code for processing multiple identifiers
2075	*/
2076	Tree.prototype.forEachIdentifier = function (identifiers, options, callback) {
2077
2078		options = $.extend({}, _default.options, options);
2079
2080		if (!(identifiers instanceof Array)) {
2081			identifiers = [identifiers];
2082		}
2083
2084		$.each(identifiers, $.proxy(function (index, identifier) {
2085			callback(this.identifyNode(identifier), options);
2086		}, this));
2087	};
2088
2089	/*
2090		Identifies a node from either a node id or object
2091	*/
2092	Tree.prototype.identifyNode = function (identifier) {
2093		return ((typeof identifier) === 'number') ?
2094						this.nodes[identifier] :
2095						identifier;
2096	};
2097
2098	/**
2099		Searches the tree for nodes (text) that match given criteria
2100		@param {String} pattern - A given string to match against
2101		@param {optional Object} options - Search criteria options
2102		@return {Array} nodes - Matching nodes
2103	*/
2104	Tree.prototype.search = function (pattern, options) {
2105		options = $.extend({}, _default.searchOptions, options);
2106
2107		this.clearSearch({ render: false });
2108
2109		var results = [];
2110		if (pattern && pattern.length > 0) {
2111
2112			if (options.exactMatch) {
2113				pattern = '^' + pattern + '$';
2114			}
2115
2116			var modifier = 'g';
2117			if (options.ignoreCase) {
2118				modifier += 'i';
2119			}
2120
2121			results = this.findNodes(pattern, modifier);
2122
2123			// Add searchResult property to all matching nodes
2124			// This will be used to apply custom styles
2125			// and when identifying result to be cleared
2126			$.each(results, function (index, node) {
2127				node.searchResult = true;
2128			})
2129		}
2130
2131		// If revealResults, then render is triggered from revealNode
2132		// otherwise we just call render.
2133		if (options.revealResults) {
2134			this.revealNode(results);
2135		}
2136		else {
2137			this.render();
2138		}
2139
2140		this.$element.trigger('searchComplete', $.extend(true, {}, results));
2141
2142		return results;
2143	};
2144
2145	/**
2146		Clears previous search results
2147	*/
2148	Tree.prototype.clearSearch = function (options) {
2149
2150		options = $.extend({}, { render: true }, options);
2151
2152		var results = $.each(this.findNodes('true', 'g', 'searchResult'), function (index, node) {
2153			node.searchResult = false;
2154		});
2155
2156		if (options.render) {
2157			this.render();
2158		}
2159
2160		this.$element.trigger('searchCleared', $.extend(true, {}, results));
2161	};
2162
2163	/**
2164		Find nodes that match a given criteria
2165		@param {String} pattern - A given string to match against
2166		@param {optional String} modifier - Valid RegEx modifiers
2167		@param {optional String} attribute - Attribute to compare pattern against
2168		@return {Array} nodes - Nodes that match your criteria
2169	*/
2170	Tree.prototype.findNodes = function (pattern, modifier, attribute) {
2171
2172		modifier = modifier || 'g';
2173		attribute = attribute || 'text';
2174
2175		var _this = this;
2176		return $.grep(this.nodes, function (node) {
2177			var val = _this.getNodeValue(node, attribute);
2178			if (typeof val === 'string') {
2179				return val.match(new RegExp(pattern, modifier));
2180			}
2181		});
2182	};
2183
2184	/**
2185		Recursive find for retrieving nested attributes values
2186		All values are return as strings, unless invalid
2187		@param {Object} obj - Typically a node, could be any object
2188		@param {String} attr - Identifies an object property using dot notation
2189		@return {String} value - Matching attributes string representation
2190	*/
2191	Tree.prototype.getNodeValue = function (obj, attr) {
2192		var index = attr.indexOf('.');
2193		if (index > 0) {
2194			var _obj = obj[attr.substring(0, index)];
2195			var _attr = attr.substring(index + 1, attr.length);
2196			return this.getNodeValue(_obj, _attr);
2197		}
2198		else {
2199			if (obj.hasOwnProperty(attr)) {
2200				return obj[attr].toString();
2201			}
2202			else {
2203				return undefined;
2204			}
2205		}
2206	};
2207
2208	var logError = function (message) {
2209		if (window.console) {
2210			window.console.error(message);
2211		}
2212	};
2213
2214	// Prevent against multiple instantiations,
2215	// handle updates and method calls
2216	$.fn[pluginName] = function (options, args) {
2217
2218		var result;
2219
2220		this.each(function () {
2221			var _this = $.data(this, pluginName);
2222			if (typeof options === 'string') {
2223				if (!_this) {
2224					logError('Not initialized, can not call method : ' + options);
2225				}
2226				else if (!$.isFunction(_this[options]) || options.charAt(0) === '_') {
2227					logError('No such method : ' + options);
2228				}
2229				else {
2230					if (!(args instanceof Array)) {
2231						args = [ args ];
2232					}
2233					result = _this[options].apply(_this, args);
2234				}
2235			}
2236			else if (typeof options === 'boolean') {
2237				result = _this;
2238			}
2239			else {
2240				$.data(this, pluginName, new Tree(this, $.extend(true, {}, options)));
2241			}
2242		});
2243
2244		return result || this;
2245	};
2246
2247})(jQuery, window, document);
2248
2249function initBlogViewer(options) {
2250
2251    $(document).ready(function () {
2252
2253        $.get('https://blog.tmetric.com/ghost/api/v2/content/posts/?key=da7a93d1a7512121b5a4b24657&filter=tag:tmetric-updates&limit=3', function (result) {
2254
2255            var holder = $('.blog-entries .card-deck')[0];
2256            if (!holder) {
2257                return;
2258            }
2259
2260            var template = $('.card', holder)[0];
2261            if (!template) {
2262                return;
2263            }
2264
2265            var posts = result.posts;
2266            if (!posts.length) {
2267                return;
2268            }
2269
2270            holder.innerHTML = '';
2271
2272            for (var index in posts) {
2273                var post = posts[index];
2274                var item = $(template).clone();
2275                $('.card-img-bg', item).css('background-image', 'url(' + post.feature_image + ')');
2276                $('.card-title', item).text(post.title);
2277                $('.card-text', item).text(post.excerpt);
2278                $(item).prop('href', post.url);
2279                holder.appendChild(item[0]);
2280            }
2281        });
2282    });
2283}
2284
2285function initYouTubeVideoModal(options) {
2286
2287    $(document).ready(function () {
2288
2289        $('#youTubeVideoModal')
2290            .on('show.bs.modal', function (event) {
2291                let button = $(event.relatedTarget);
2292                let url = button.data('video-url');
2293                let iframe = '<iframe id="ytplayer" src="' + url + '" allow="autoplay; fullscreen; encrypted-media" allowfullscreen></iframe>';
2294
2295                $('#youTubeVideoModal .modal-content').append(iframe);
2296            })
2297            .on('hide.bs.modal', function (event) {
2298                let iframe = $(this).find('iframe')[0];
2299
2300                if (iframe) {
2301                    iframe.parentNode.removeChild(iframe);
2302                }
2303            });
2304    });
2305}
2306
2307function parseMenuItemsFromContent(options) {
2308
2309    var contentContainer = options.contentContainer || 'body';
2310    var itemSelectors = options.itemSelectors || 'h2';
2311    if (typeof itemSelectors == 'string') {
2312        itemSelectors = [itemSelectors];
2313    }
2314
2315    var menuItems = [];
2316
2317    var levelIds = [];
2318
2319    $(itemSelectors.join(','), $(contentContainer)).each(function (index, itemElement) {
2320
2321        var item = $(itemElement);
2322
2323        var selector = itemSelectors.reduce(function (result, selector, index) {
2324            return result || (item.is(selector) ? selector : result);
2325        }, null);
2326        var level = itemSelectors.indexOf(selector);
2327
2328        var text = item.text();
2329
2330        var id = item.prop('id');
2331        if (!id) {
2332            var levelId = text.toLowerCase().replace(/ /g, '-').replace(/[^_\w\d-]/g, '_');
2333            levelIds[level] = levelId;
2334
2335            id = levelIds.slice(0, level + 1).join('--');
2336
2337            item.prop('id', id);
2338        }
2339
2340        var menuItem = {
2341            id: id,
2342            text: text,
2343            level: level
2344        };
2345
2346        menuItems.push(menuItem);
2347
2348    });
2349
2350    return menuItems;
2351
2352}
2353
2354function initScrollMenu(options) {
2355
2356    var menuContainer = options.menuContainer || 'body';
2357    var menuTopOffset = options.menuTopOffset || 0;
2358    var menuItems = options.menuItems || [];
2359
2360    var menuAlwaysVisible = typeof options.menuAlwaysVisible == 'boolean' ? options.menuAlwaysVisible : true;
2361    var scrollDuration = options.scrollDuration || 300;
2362    var scrollTopOffset = options.scrollTopOffset || 0;
2363    var scrollBottomOffset = options.scrollBottomOffset || 0;
2364
2365    var menuId = 'scroll-menu-' + Date.now() + '-' + Math.round(Math.random() * Date.now());
2366    var menuSelector = '#' + menuId;
2367    var itemIds = [];
2368    var itemPositions = {};
2369
2370    var skipHandleIntersectAfterAfterHashChange = false;
2371    var isInScrollAnimation = false;
2372
2373    function buildMenu() {
2374
2375        var menu = $('<ul></ul>').attr('data-menu-level', 0).prop({
2376            'id': menuId,
2377            'class': 'scroll-menu'
2378        });
2379
2380        $(menuContainer).toggleClass('visible', menuAlwaysVisible);
2381        $(menuContainer).toggleClass('hidden', !menuAlwaysVisible);
2382
2383        menuItems.forEach(function (item) {
2384
2385            var anchor = $('<a></a>', { href: '#' + item.id }).text(item.text);
2386            var menuItem = $('<li></li>').append(anchor);
2387
2388            var lastMenuItem = $('li', menu).last();
2389
2390            // Check any items was added
2391            if (lastMenuItem.length) {
2392
2393                // Find parent menu with item's level
2394                var menuToAppend = $(lastMenuItem).parents('ul[data-menu-level="' + item.level + '"]');
2395
2396                // If not found create new menu under last item
2397                if (!menuToAppend.length) {
2398                    menuToAppend = $('<ul></ul>').attr('data-menu-level', item.level);
2399                    lastMenuItem.append(menuToAppend);
2400                }
2401
2402                // Add item to menu with item's level
2403                menuToAppend.append(menuItem);
2404
2405            } else {
2406
2407                // Add first item
2408                menu.append(menuItem);
2409            }
2410
2411            itemIds.push(item.id);
2412
2413        });
2414
2415        $(menuContainer).append(menu);
2416
2417    }
2418
2419    function updateMenuAndContent(activeItemId) {
2420        $(itemIds).each(function (index, itemId) {
2421            var itemSelector = '#' + itemId;
2422            var isSelectedItem = itemId == activeItemId;
2423            $(itemSelector).toggleClass('active', isSelectedItem);
2424            $(menuSelector + ' li a[href="' + itemSelector + '"]').closest('li').toggleClass('active', isSelectedItem);
2425        });
2426    }
2427
2428    function updateMenuPosition(viewportHeight) {
2429
2430        if (!viewportHeight) {
2431            var windowScrollTop = $(window).scrollTop();
2432            var windowHeight = $(window).height();
2433            var viewportTop = Math.round(windowScrollTop);
2434            var viewportBottom = Math.round(windowScrollTop + windowHeight);
2435            viewportHeight = viewportBottom - viewportTop;
2436        }
2437
2438        var menu = $(menuSelector);
2439
2440        var width = menu.parent().parent().width();
2441
2442        var top = menuTopOffset;
2443        
2444        var container = $(menuContainer).parent().get(0);
2445        var containerRect = container.getBoundingClientRect();
2446        var bottom = viewportHeight - containerRect.bottom;
2447
2448        if (bottom <= 0) {
2449            bottom = '';
2450        }
2451
2452        menu.parent().css({ top: top, bottom: bottom, width: width });
2453
2454    }
2455
2456    function scrollToItem(hash) {
2457
2458        var item = $(hash);
2459        if (!item.length) {
2460            return;
2461        }
2462
2463        isInScrollAnimation = true;
2464
2465        $('html, body').animate({
2466            scrollTop: Math.round(item.offset().top - scrollTopOffset)
2467        }, scrollDuration).promise().then(function () {
2468
2469            updateMenuAndContent(hash.replace('#', ''));
2470
2471            updateMenuPosition();
2472
2473            isInScrollAnimation = false;
2474        });
2475    }
2476
2477    function onScroll(event) {
2478
2479        // Skip scroll animation
2480        if (isInScrollAnimation) {
2481            return;
2482        }
2483
2484        // Get viewport position
2485        var windowScrollTop = $(window).scrollTop();
2486        var windowHeight = $(window).height();
2487        var viewportTop = Math.round(windowScrollTop);
2488        var viewportBottom = Math.round(windowScrollTop + windowHeight);
2489
2490        // Get content item positions
2491        var items = itemIds
2492            .map(function (id) {
2493
2494                var top;
2495
2496                var item = $('#' + id);
2497                if (item && item.length == 1) {
2498                    top = Math.round(item.offset().top);
2499                }
2500
2501                return { id: id, top: top };
2502            })
2503            .sort(function (a, b) {
2504                return a.top - b.top;
2505            });
2506
2507        // Find item in viewport to activate
2508        var itemToActivate = items.filter(function (item, index) {
2509            var nextItem = items[index + 1];
2510            var itemBottom = nextItem && nextItem.top || (viewportBottom - scrollBottomOffset);
2511            return item.top < viewportBottom && itemBottom > (viewportTop + scrollTopOffset);
2512        })[0];
2513
2514        var itemToActivateId = itemToActivate && itemToActivate.id;
2515
2516        // Update classes of menu items and corresponding content items
2517        updateMenuAndContent(itemToActivateId);
2518
2519        // Update position
2520        updateMenuPosition(viewportBottom - viewportTop);
2521    }
2522
2523    function onResize() {
2524        updateMenuPosition();
2525    }
2526
2527    function onMenuItemClick(event) {
2528        if (!this.hash) {
2529            return;
2530        }
2531
2532        event.preventDefault();
2533
2534        var hash = this.hash;
2535
2536        scrollToItem(hash);
2537
2538        location.hash = hash;
2539
2540    }
2541
2542    $(document).ready(function () {
2543
2544        // Build menu
2545        if (!menuItems.length) {
2546            return;
2547        }
2548
2549        buildMenu();
2550
2551        // Set resize handler to sync menu size with available space
2552        $(window).on('resize', onResize);
2553        onResize();
2554
2555        // Scroll to item with id from hash or sync menu with scroll position
2556        if (location.hash) {
2557            scrollToItem(location.hash);
2558        } else {
2559            onScroll();
2560        }
2561
2562        // Set scroll and resize handler to sync menu with scroll position
2563        $(document).on('scroll resize', onScroll);
2564
2565        // Set menu item click handler
2566        $(itemIds).each(function (index, id) {
2567            $('a[href="#' + id + '"]').on('click', onMenuItemClick);
2568        });
2569
2570        // Add hash change listener to update menu after navigation
2571        $(window).on('hashchange', function (event) {
2572
2573            if (isInScrollAnimation) {
2574                return;
2575            }
2576
2577            skipHandleIntersectAfterAfterHashChange = true;
2578
2579            scrollToItem(location.hash);
2580        });
2581    });
2582}
2583
2584function displayScrollMenuWhileContentVisible(options) {
2585
2586    var menuContainer = options.menuContainer || 'body';
2587    var contentContainer = options.contentContainer || 'body';
2588
2589    var menuSelector = menuContainer + ' .scroll-menu';
2590
2591    var anchorBeforeContentClass = 'scroll-menu-anchor-before-content';
2592    var anchorAfterContentClass = 'scroll-menu-anchor-after-content';
2593    var anchorEntries = {};
2594
2595    function handleIntersect(entries) {
2596
2597        entries.forEach(function (entry) {
2598            anchorEntries[entry.target.className] = entry;
2599        });
2600
2601        var before = anchorEntries[anchorBeforeContentClass];
2602        var after = anchorEntries[anchorAfterContentClass];
2603
2604        var isMenuVisible = before.boundingClientRect.bottom <= before.rootBounds.top &&
2605            after.boundingClientRect.top >= after.rootBounds.bottom;
2606
2607        $(menuContainer).toggleClass('visible', isMenuVisible);
2608        $(menuContainer).toggleClass('hidden', !isMenuVisible);
2609    }
2610
2611    $(document).ready(function () {
2612
2613        $(menuContainer).addClass('hidden');
2614
2615        var anchorBeforeContent = $('<div class="' + anchorBeforeContentClass + '"></div>').css({ height: 1 }).insertBefore(contentContainer);
2616        var anchorAfterContent = $('<div class="' + anchorAfterContentClass + '"></div>').css({ height: 1 }).insertAfter(contentContainer);
2617
2618        // Setup intersection observer
2619        var options = {
2620            threshold: [0, 1]
2621        };
2622
2623        var observer = new IntersectionObserver(handleIntersect, options);
2624        observer.observe(anchorBeforeContent[0]);
2625        observer.observe(anchorAfterContent[0]);
2626
2627    });
2628}
2629
2630function initPricingCalculator(options) {
2631
2632    $(document).ready(function () {
2633
2634        var pricing = options.pricing;
2635        var promoDiscounts = options.promoDiscounts;
2636        var paymentPeriodCheckbox = $('#paymentPeriod');
2637
2638        // prevent toggle switch when label clicked second time
2639        $('.payment-period-label.monthly').on('click', function (event) {
2640            event.preventDefault();
2641            event.stopPropagation();
2642            paymentPeriodCheckbox.attr('checked', false);
2643            $('.period-switcher').removeClass('annually');
2644
2645            updateUI();
2646        });
2647        $('.payment-period-label.annually').on('click', function (event) {
2648            event.preventDefault();
2649            event.stopPropagation();
2650            paymentPeriodCheckbox.attr('checked', true);
2651            $('.period-switcher').addClass('annually');
2652
2653            updateUI();
2654        });
2655
2656        $('.period-switcher label').on('click', function (event) {
2657            event.preventDefault();
2658            event.stopPropagation();
2659
2660            var isAnnual = paymentPeriodCheckbox.prop('checked');
2661
2662            if (isAnnual) {
2663                paymentPeriodCheckbox.attr('checked', false);
2664                $('.period-switcher').removeClass('annually');
2665            } else {
2666                paymentPeriodCheckbox.attr('checked', true);
2667                $('.period-switcher').addClass('annually');
2668            }
2669
2670            updateUI();
2671        });
2672
2673        function applyDiscounts(value, promoDiscount) {
2674            value = Math.round(value * (100 - (promoDiscount || 0))) / 100;
2675
2676            return value;
2677        }
2678
2679        function numberWithSpaces(value) {
2680            var parts = value.toString().split(".");
2681            parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, " ");
2682            return parts.join(".");
2683        }
2684
2685        function updateUI(event) {
2686            var isAnnual = paymentPeriodCheckbox.attr('checked');
2687
2688            // update subscription plan
2689            pricing.forEach(function (item) {
2690
2691                var itemPromoDiscounts = promoDiscounts[item.plan];
2692                var promoMonthlyDiscount = itemPromoDiscounts ? itemPromoDiscounts.monthlyDiscount : 0;
2693                var promoAnnualDiscount = itemPromoDiscounts ? itemPromoDiscounts.annualDiscount : 0;
2694
2695                var cost = (isAnnual ? item.annualPrice / 12 : item.monthlyPrice);
2696                var promoDiscount = isAnnual ? promoAnnualDiscount : promoMonthlyDiscount;
2697                var costWithPromoDiscount = applyDiscounts(cost, promoDiscount);
2698                var isPromo = promoDiscount > 0;
2699
2700                var costAnnualPerYearInitial = item.annualPrice / 12;
2701                var costMonthlyPerYearInitial = item.monthlyPrice;
2702
2703                let costAnnualPerYear = applyDiscounts(costAnnualPerYearInitial);
2704                let costMonthlyPerYear = applyDiscounts(costMonthlyPerYearInitial);
2705
2706                var planElement = $('.' + item.plan);
2707                $(planElement).toggleClass('promo', isPromo);
2708
2709                let subscriptionCost = isPromo ? costWithPromoDiscount : cost;
2710                let subscriptionCostPartial = ('00' + ((subscriptionCost % 1).toFixed(2) * 100)).substr(-2);
2711                subscriptionCostPartial = subscriptionCostPartial > 0 ? '.' + subscriptionCostPartial : '';
2712
2713                $('.subscription-cost-value', planElement).text(numberWithSpaces(Math.floor(subscriptionCost)));
2714                $('.subscription-cost-partial', planElement).text(subscriptionCostPartial);
2715
2716                $('.features-subscription-cost-value', planElement).text(numberWithSpaces(Math.floor(subscriptionCost)));
2717                $('.features-subscription-cost-partial', planElement).text(subscriptionCostPartial);
2718
2719                let initialAnnualSubscription = costMonthlyPerYearInitial;
2720
2721                if (isAnnual) {
2722                    $('.subscription-period-month', planElement).hide();
2723                    $('.subscription-period-year', planElement).show();
2724
2725                    $('.features-subscription-period-month', planElement).hide();
2726                    $('.features-subscription-period-year', planElement).show();
2727                } else {
2728                    $('.subscription-period-month', planElement).show();
2729                    $('.subscription-period-year', planElement).hide();
2730
2731                    $('.features-subscription-period-month', planElement).show();
2732                    $('.features-subscription-period-year', planElement).hide();
2733                }
2734
2735                if (initialAnnualSubscription) {
2736                    if (isAnnual) {
2737                        $('.subscription-cost-initial', planElement).text('$' + initialAnnualSubscription).show();
2738                        $('.features-subscription-cost-initial', planElement).text('$' + initialAnnualSubscription).show();
2739                    } else {
2740                        $('.subscription-cost-initial', planElement).text('$' + initialAnnualSubscription).hide();
2741                        $('.features-subscription-cost-initial', planElement).text('$' + initialAnnualSubscription).hide();
2742                    }
2743
2744                    if (promoDiscount > 0) {
2745
2746                        if (isAnnual) {
2747                            $('.subscription-cost-without-promo', planElement).text('$' + costMonthlyPerYearInitial).hide();
2748                            $('.features-subscription-cost-without-promo', planElement).text('$' + costMonthlyPerYearInitial).hide();
2749                        } else {
2750                            $('.subscription-cost-without-promo', planElement).text('$' + costMonthlyPerYearInitial).show();
2751                            $('.features-subscription-cost-without-promo', planElement).text('$' + costMonthlyPerYearInitial).show();
2752                        }
2753                    }
2754                }
2755            });
2756        }
2757
2758        paymentPeriodCheckbox.on('change', updateUI);
2759
2760        updateUI();
2761
2762    });
2763}
2764
2765function initItemToViewportScrollPositionWatcher(watchItems) {
2766
2767    $(document).ready(function () {
2768
2769        function offsetToPixels(offset, height) {
2770
2771            if (!offset) {
2772                return 0;
2773            }
2774
2775            // absolute offset in pixels
2776            if (/px$/.test(offset)) {
2777                return (parseInt(offset) || 0);
2778            }
2779
2780            // relative offset to height
2781            return height * (parseFloat(offset) || 0);
2782        }
2783
2784        function onScroll() {
2785
2786            // Get viewport position
2787            var windowScrollTop = $(window).scrollTop();
2788            var windowHeight = $(window).height();
2789            var viewportTop = Math.round(windowScrollTop);
2790            var viewportBottom = Math.round(windowScrollTop + windowHeight);
2791
2792            watchItems.forEach(function (watchItem) {
2793
2794                var selector = watchItem.selector;
2795                var viewportTopOffset = watchItem.viewportTopOffset;
2796                var viewportBottomOffset = watchItem.viewportBottomOffset;
2797
2798                $(selector).each(function (index, item) {
2799
2800                    var jqItem = $(item);
2801
2802                    var height = jqItem.outerHeight();
2803                    var offset = jqItem.offset();
2804
2805                    var itemTop = offset.top;
2806                    var itemBottom = itemTop + height;
2807
2808                    var viewportTopWithOffset = viewportTop + offsetToPixels(viewportTopOffset, viewportBottom - viewportTop);
2809                    var viewportBottomWithOffset = viewportBottom + offsetToPixels(viewportBottomOffset, viewportBottom - viewportTop);
2810
2811                    jqItem.toggleClass('item-top-above-viewport-top', itemTop < viewportTopWithOffset);
2812                    jqItem.toggleClass('item-top-above-viewport-bottom', itemTop < viewportBottomWithOffset);
2813                    jqItem.toggleClass('item-bottom-above-viewport-top', itemBottom < viewportTopWithOffset);
2814                    jqItem.toggleClass('item-bottom-above-viewport-bottom', itemBottom < viewportBottomWithOffset);
2815
2816                });
2817
2818            });
2819
2820        }
2821
2822        $(document).on('scroll resize', onScroll);
2823        onScroll();
2824
2825    });
2826
2827}
2828
2829function initItemToHorizonScrollPositionWatcher(watchItems) {
2830
2831    $(document).ready(function () {
2832
2833        function toPixels(value) {
2834
2835            if (!value) {
2836                return 0;
2837            }
2838
2839            if (/px$/.test(value)) {
2840                return (parseInt(value) || 0);
2841            }
2842
2843            return 0;
2844        }
2845
2846        function onScroll() {
2847
2848            // Get viewport position
2849            var windowScrollTop = $(window).scrollTop();
2850            var windowHeight = $(window).height();
2851            var viewportTop = Math.round(windowScrollTop);
2852            var viewportBottom = Math.round(windowScrollTop + windowHeight);
2853
2854            watchItems.forEach(function (watchItem) {
2855
2856                var selector = watchItem.selector;
2857                var horizonPosition = watchItem.horizonPosition;
2858                var horizonOffsetTop = watchItem.horizonOffsetTop;
2859                var horizonOffsetBottom = watchItem.horizonOffsetBottom;
2860
2861                $(selector).each(function (index, item) {
2862
2863                    var jqItem = $(item);
2864
2865                    var height = jqItem.outerHeight();
2866                    var offset = jqItem.offset();
2867
2868                    var itemTop = offset.top;
2869                    var itemBottom = itemTop + height;
2870
2871                    var horizonPositionWithTopOffset = toPixels(horizonPosition) + toPixels(horizonOffsetTop);
2872                    var horizonPositionWithBottomOffset = toPixels(horizonPosition) + toPixels(horizonOffsetBottom);
2873
2874                    jqItem.toggleClass('item-top-above-horizon', itemTop - viewportTop < horizonPositionWithTopOffset);
2875                    jqItem.toggleClass('item-bottom-above-horizon', itemBottom - viewportTop < horizonPositionWithBottomOffset);
2876
2877                });
2878
2879            });
2880
2881        }
2882
2883        $(document).on('scroll resize', onScroll);
2884        onScroll();
2885
2886    });
2887
2888}
2889function initTimer(options) {
2890
2891    var initTime = Date.now();
2892
2893    var format = options && options.format || '{0} min {1} s';
2894
2895    $(document).ready(function () {
2896
2897        function renderTimeText(text) {
2898            return text
2899                .split('')
2900                .map(function (char) {
2901                    return '<span style="display: inline-block; width: 1.25ex; text-align: center">' + char + '</span>';
2902                })
2903                .join('');
2904        }
2905
2906        setInterval(function () {
2907
2908            var holder = $('.timer');
2909            if (!holder) {
2910                return;
2911            }
2912
2913            var delta = Date.now() - initTime;
2914            var min = Math.floor(delta / 60000);
2915            var sec = Math.floor(delta / 1000) - min * 60;
2916
2917            var minText = '' + min;
2918            var secText = (sec < 10 ? '0' : '') + sec;
2919
2920            var html = format
2921                .replace('{0}', renderTimeText(minText))
2922                .replace('{1}', renderTimeText(secText));
2923            
2924            holder.html(html);
2925
2926        }, 500);
2927    });
2928}
2929/* 
2930 *  carousel (testimonials)
2931 *
2932 */
2933
2934function initTestimonials() {
2935
2936    let testimonialsCarouselSelector = '#testimonialsCarousel';
2937    // actually we don't need bootstrap carousel for avatars.
2938    // Just using simple jquery
2939    let avatarsCarouselSelector = '#avatarsCarousel';
2940    let activeClass = 'active';
2941    let notActiveClass = 'not-active';
2942
2943    let alreadyClicked = false;
2944
2945    $(document).ready(function () {
2946
2947        let items = $(avatarsCarouselSelector + ' .carousel-item');
2948
2949        // using 3 args for .on() method because of delegation
2950        $(avatarsCarouselSelector + ' .carousel-inner').on('click', '.testimonial-avatar img.image', function (e) {
2951
2952            // prevent multiple times script call
2953            if (alreadyClicked) {
2954                return;
2955            }
2956
2957            alreadyClicked = true;
2958
2959            let clickedItem = $(e.target).closest('.carousel-item');
2960
2961            //$(`${avatarsCarouselSelector} .carousel-inner`).css('maxWidth', maxWidth);
2962
2963            // currently transition animation depends on two states: active and not-active.
2964            // This states sets by '.active' and '.not-active' classes
2965            // https://stackoverflow.com/a/9509072
2966            $(avatarsCarouselSelector + ' .carousel-item').each(function (i, elem) { $(elem).removeClass(activeClass).addClass(notActiveClass) });
2967            clickedItem.addClass(activeClass).removeClass(notActiveClass);
2968
2969            // #testimonialsCarousel and #avatarsCarousel communicate with id attr
2970            let testimonialId = clickedItem.attr('data-testimonial');
2971            let testimonialCommentBlock = $(testimonialsCarouselSelector).find('.carousel-item[data-testimonial=' + testimonialId + ']');
2972
2973            // go to author data binded to the current avatar
2974            $(testimonialsCarouselSelector).carousel(testimonialCommentBlock.index());
2975
2976            // also move active item to the left replacing it with first item
2977            let currentFirstItem = $(avatarsCarouselSelector).find('.carousel-item').first();
2978            let itemsBeforeClickedItem = clickedItem.prevAll();
2979
2980            // 120px - size of active image and also size of not-active image + margin-right (40px)
2981            let offsetLeft = 120 * clickedItem.index();
2982
2983            // remove active class for cloned items
2984            itemsBeforeClickedItem.each(function () {
2985                $(this).removeClass(activeClass).addClass(notActiveClass);
2986            });
2987
2988            $(avatarsCarouselSelector + ' .carousel-inner').animate({
2989                left: -offsetLeft
2990            }, 500, function () {
2991                let containerWithOffset = $(avatarsCarouselSelector + ' .carousel-inner');
2992                let staticContainer = $(avatarsCarouselSelector);
2993                let isOffsetOutStatic = containerWithOffset.offset().left < staticContainer.offset().left;
2994
2995                if (isOffsetOutStatic) {
2996                    //containerWithOffset.append(itemsBeforeClickedItem.clone());
2997                    console.log(offsetLeft);
2998                }
2999
3000                alreadyClicked = false;
3001            });
3002
3003        });
3004
3005    });
3006
3007}
3008
3009// jQuery Page init function
3010$(document).ready(initPage);
3011
3012function initPage() {
3013    scrollHeading();
3014    showTabsText();
3015    showNavDrop();
3016    showMobileMenu();
3017    showTestimonialsTabs();
3018    lazyLoad();
3019    scrollTableHead();
3020    checkStickyElement();
3021    filterIntegrations();
3022    billableHoursCalculator();
3023    customersListSlider();
3024    slideSection();
3025    showSchedulesTabs();
3026    setHelpMenuHeight();
3027    filterCategoryBlocks();
3028    showMobileGuideMenu();
3029    animateAnchorLinks();
3030    listenAndRemoveElement('#kayako-messenger');
3031    slickCarousel();
3032    animatedIntegrations();
3033    setSameHeight();
3034    featuresTableSlider();
3035    initTimeCalculator();
3036}
3037
3038// Check resize
3039$(window).resize(function() {
3040    $('#main-menu .parent').removeClass('drop-visible').children('.drop').removeClass('visible');
3041    $('#header').removeClass('drop-visible');
3042    $('#main-menu .drop').show();
3043
3044    $('.pricing-offer-banners').show();
3045    $('body, #header').removeClass('mobile-menu-opened');
3046    $('.navbar-toggler').addClass('collapsed');
3047    $('.navbar-collapse').removeClass('show');
3048
3049    $('#main-menu .tab-content .tab-pane').removeClass('show active');
3050    $('#main-menu .nav .nav-item .nav-link').removeClass('active');
3051
3052    $('#main-menu .tab-content .tab-pane:first-child').addClass('show active');
3053    $('#main-menu .nav .nav-item:first-child .nav-link').addClass('active');
3054
3055    if ($(window).width() < 1024) {
3056        $('#main-menu .drop').hide();
3057    }
3058
3059    setSameHeight();
3060});
3061
3062// Check page scrolling
3063function scrollHeading() {
3064    checkHeadingScroll();
3065
3066    $(window).scroll(function () {
3067        checkHeadingScroll();
3068    });
3069
3070    function checkHeadingScroll() {
3071        if ($(window).scrollTop() > 10) {
3072            $('#header').addClass('scrolled-down');
3073        }
3074        else {
3075            $('#header').removeClass('scrolled-down');
3076        }
3077    }
3078}
3079
3080// Show navigation dropdown
3081function showNavDrop() {
3082    $('#main-menu .parent > a').click(function(e) {
3083        e.preventDefault();
3084        if ($(this).parent('li').hasClass('drop-visible')) {
3085            $(this).parent('li').removeClass('drop-visible');
3086            $(this).parent('li').children('.drop').removeClass('visible');
3087            $('#header').removeClass('drop-visible');
3088
3089            if ($(window).width() < 1024) {
3090                $(this).parent('li').children('.drop').slideUp();
3091            }
3092        } else {
3093            if ($(window).width() < 1024) {
3094                $('#main-menu .drop.visible').slideUp();
3095            }
3096            $('#main-menu .parent').removeClass('drop-visible');
3097            $(this).parent('li').addClass('drop-visible');
3098            $('#main-menu .drop').removeClass('visible');
3099            $(this).parent('li').children('.drop').addClass('visible');
3100            $('#header').addClass('drop-visible');
3101
3102            if ($(window).width() < 1024) {
3103                $(this).parent('li').children('.drop').slideDown();
3104            }
3105        };
3106    });
3107
3108    $('#main-menu .drop a').click(function() {
3109        if ($(this).attr("href").indexOf("#") + 1) {
3110            $('#header, #main-menu .parent').removeClass('drop-visible');
3111            if ($(window).width() < 1024) {
3112                $('#main-menu .drop.visible').slideUp();
3113                $('.navbar-toggler-right').click();
3114            }
3115            $('#header .drop').removeClass('visible');
3116        }
3117    });
3118
3119    $(document).bind( "mouseup touchend", function(e){
3120        if (!$("#header").is(e.target) && $("#header").has(e.target).length === 0) {
3121
3122            if ($(window).width() >= 1024) {
3123                $('#main-menu .parent').removeClass('drop-visible');
3124                $('#main-menu .drop').removeClass('visible');
3125                $('#header').removeClass('drop-visible');
3126            } else {
3127                if ($('#header').hasClass('mobile-menu-opened')) {
3128                    $('.navbar-toggler').trigger('click');
3129                }
3130            }
3131        };
3132    });
3133}
3134
3135// Show mobile menu
3136function showMobileMenu() {
3137    $('#main-menu .tab-content .tab-pane:first-child').addClass('show active');
3138    $('#main-menu .nav .nav-item:first-child .nav-link').addClass('active');
3139
3140    $('.navbar-toggler-right').click(function() {
3141        if ($(window).width() < 1024) {
3142            $('#main-menu .tab-content .tab-pane').removeClass('show active');
3143            $('#main-menu .nav .nav-item .nav-link').removeClass('active');
3144        }
3145        setTimeout(checkClass,50);
3146    });
3147
3148    function checkClass() {
3149        if ($('.navbar-toggler-right').hasClass('collapsed')) {
3150            $('header').removeClass('mobile-menu-opened drop-visible');
3151            $('body').removeClass('mobile-menu-opened');
3152            $('.pricing-offer-banners').slideDown();
3153        } else {
3154            $('header').addClass('mobile-menu-opened');
3155            $('body').addClass('mobile-menu-opened');
3156            $('.pricing-offer-banners').slideUp();
3157        }
3158    };
3159
3160    $('#main-menu .link-back').click(function() {
3161        $('#main-menu .tab-content .tab-pane').removeClass('show active');
3162        $('#main-menu .nav .nav-item .nav-link').removeClass('active');
3163    });
3164}
3165
3166// Show text in features tabs
3167function showTabsText() {
3168    $('.features-info .tab-content .tab-pane:first-child').addClass('show active');
3169    $('.features-info .nav .nav-item:first-child .nav-link').addClass('active text-visible');
3170
3171    $( ".features-info .nav-link" ).each(function() {
3172        if (!$(this).hasClass('text-visible')) {
3173            $(this).find('.text').hide();
3174        }
3175    });
3176
3177    $('.features-info .nav-link').click(function() {
3178        if (!$(this).hasClass('text-visible')) {
3179            $('.features-info .text-visible .text').slideUp(300);
3180            $('.features-info .text-visible').removeClass('text-visible');
3181            $(this).addClass('text-visible').find('.text').slideDown(300);
3182        }
3183    });
3184
3185    $('.features-info .link-more').click(function() {
3186        window.location = $(this).attr('href');
3187    });
3188}
3189
3190// Show testimonials tabs
3191function showTestimonialsTabs() {
3192    $('.testimonials .tab-content .tab-pane:first-child').addClass('show active');
3193    $('.testimonials .nav .nav-item:first-child .nav-link').addClass('active');
3194}
3195
3196// Lazy Load effect
3197function lazyLoad() {
3198
3199    let config = {
3200        threshold: 0.1
3201    };
3202
3203    let observer = new IntersectionObserver(function (entries) {
3204        entries.forEach(function (entry) {
3205            if (entry.intersectionRatio > 0) {
3206                entry.target.classList.add('animate');
3207            }
3208        });
3209    }, config);
3210
3211    $('.lazy').each(function (index, item) {
3212        observer.observe(item);
3213    });
3214}
3215
3216// Tooltip
3217function initTooltips(selector, options) {
3218    $(document).ready(function () {
3219        $(selector).tooltip(options);
3220    });
3221}
3222
3223// Scroll Table Head
3224function scrollTableHead() {
3225    if ($('.features-table-wrapper').length > 0) {
3226
3227        checkFeaturesTableScroll();
3228
3229        $(window).scroll(function () {
3230            checkFeaturesTableScroll();
3231        });
3232
3233        $(window).resize(function(){
3234            checkFeaturesTableScroll();
3235        });
3236    }
3237}
3238
3239function checkFeaturesTableScroll() {
3240    let $table = $('.features-table-wrapper');
3241    let tableHead = $('.features-table-header');
3242    let headerHeight = $('#header').innerHeight();
3243    let tableHeadHeight = $('.features-table-header').innerHeight();
3244    let pageScrollTop = $(window).scrollTop();
3245    let tableOffsetTop = $table.offset().top;
3246    let tableHeight = $table.innerHeight();
3247
3248    if (!$('.features-table-wrapper').hasClass("content-opened")) {
3249        $('.scroll-heading').removeClass('scroll-heading').removeAttr('style');
3250        tableHead.removeAttr('style');
3251    } else if (pageScrollTop >= (tableOffsetTop - headerHeight)
3252      && pageScrollTop < (tableOffsetTop + tableHeight - headerHeight - tableHeadHeight)) {
3253        $table.addClass('scroll-heading').css("padding-top", tableHeadHeight);
3254        tableHead.css("top", headerHeight);
3255    } else {
3256        $('.scroll-heading').removeClass('scroll-heading').removeAttr('style');
3257        tableHead.removeAttr('style');
3258    }
3259}
3260
3261// Check Sticky Element
3262function checkStickyElement() {
3263    if ($('.sticky-element').length > 0) {
3264        $('#wrapper').addClass('has-sticky');
3265    }
3266}
3267
3268// Filter Integrations
3269function filterIntegrations() {
3270    buildCategoryNav();
3271
3272    let inputSearchText = "";
3273    let searchCategory = "all";
3274
3275    $('#integration-search-input').on('input', function (event) {
3276        inputSearchText = event.target.value.toLowerCase();
3277        filterIntegrationsList();
3278    });
3279
3280    $('#integrations-filter .button').click(function() {
3281        $('#integrations-filter .button').removeClass('active');
3282        $(this).addClass('active');
3283        searchCategory = $(this).data('target').toLowerCase();
3284        filterIntegrationsList();
3285
3286        let listTopPosition = $('.integration-thumbs').offset().top - $('#header').innerHeight() - 130;
3287        if ($(window).width() < 768) {
3288            listTopPosition = $('.integration-thumbs').offset().top - 75;
3289        }
3290        $('body,html').animate({scrollTop: listTopPosition }, 500);
3291    });
3292
3293    function filterIntegrationsList() {
3294        $('.integration-thumb-wrapper').each(function () {
3295            if (searchCategory !== 'all' && inputSearchText) {
3296                let thumbCategory = $(this).find('a').data('category').toLowerCase().replace(/\s+/g, '-');
3297                let thumbName = $(this).find('a').data('name').toLowerCase();
3298
3299                if (thumbCategory.indexOf(searchCategory) == -1 || thumbName.indexOf(inputSearchText) == -1) {
3300                    $(this).hide(500);
3301                } else {
3302                    $(this).show(500);
3303                }
3304            } else if (searchCategory !== 'all') {
3305                let thumbCategory = $(this).find('a').data('category').toLowerCase().replace(/\s+/g, '-');
3306
3307                if (thumbCategory.indexOf(searchCategory) == -1) {
3308                    $(this).hide(500);
3309                } else {
3310                    $(this).show(500);
3311                }
3312            } else if (inputSearchText) {
3313                let thumbName = $(this).find('a').data('name').toLowerCase();
3314
3315                if (thumbName.indexOf(inputSearchText) == -1) {
3316                    $(this).hide(500);
3317                } else {
3318                    $(this).show(500);
3319                }
3320            } else {
3321                $(this).show(500);
3322            }
3323        });
3324    }
3325
3326    function buildCategoryNav() {
3327        if ($('#integrations-filter').length > 0) {
3328            let navLinks = [];
3329            let result = '';
3330
3331            $('.integration-thumb').each(function () {
3332                let currentCategory = $(this).data('category');
3333
3334                if (currentCategory !=='' && navLinks.indexOf(currentCategory) == -1) {
3335                    navLinks.push(currentCategory);
3336                }
3337            });
3338            navLinks.sort();
3339
3340            for (var i = 0; i < navLinks.length; i++) {
3341                let linkHref = navLinks[i].toLowerCase().replace(/\s+/g, '-');
3342                let linkText = navLinks[i];
3343                result += '<li><button class="button" data-target="' + linkHref + '">' + linkText + '</button></li>';
3344            }
3345
3346            $('#integrations-filter').append(result);
3347        }
3348    }
3349}
3350
3351var spaceForAttributePrefix = 'data-space-for-';
3352
3353function setSpaceFor(identifier, space) {
3354
3355    var content = document.getElementById('content');
3356    var name = spaceForAttributePrefix + identifier;
3357    content.setAttribute(name, space);
3358}
3359
3360function removeSpaceFor(identifier) {
3361
3362    var content = document.getElementById('content');
3363    var name = spaceForAttributePrefix + identifier;
3364    content.removeAttribute(name);
3365}
3366
3367// Billable Hours Calculator
3368function billableHoursCalculator() {
3369    if ($('.time-calculator').length > 0) {
3370        calculateHours();
3371
3372        $('.time-calculator input').on('keyup change',function(){
3373            if (+$(this).val() <= 0) {
3374                $(this).val("0");
3375            }
3376            calculateHours();
3377        });
3378    }
3379}
3380
3381function calculateHours() {
3382    let annualSalary = +$('#annual-salary').val();
3383    let billableHours = +$('#billable-hours').val();
3384    let overheadMarkup = +$('#overhead-markup').val();
3385    let profitMarkup = +$('#profit-markup').val();
3386    let result = "";
3387
3388    if (billableHours > 0) {
3389        result = ((annualSalary + annualSalary * (overheadMarkup / 100)) * (profitMarkup / 100 + 1)) / billableHours;
3390        result = Math.floor(result * 100) / 100;
3391    }
3392
3393    $('#billable-hour-rate').text(result);
3394}
3395
3396function customersListSlider() {
3397    if ($('.customers-list').length > 0) {
3398        $.getScript("//cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js", function(){
3399            $('.customers-list').slick({
3400                infinite: true,
3401                speed: 8000,
3402                cssEase: 'linear',
3403                autoplay: true,
3404                autoplaySpeed: 0,
3405                dots: false,
3406                arrows: false,
3407                accessibility: false,
3408                draggable: false,
3409                swipe: false,
3410                touchMove: false,
3411                variableWidth: true
3412            });
3413            $('.customers-list').css('opacity', 1);
3414        });
3415    }
3416}
3417
3418function animatedIntegrations() {
3419    if ($('.integrations-slider').length > 0) {
3420        $.getScript("//cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js", function(){
3421            $('.integrations-slider').slick({
3422                infinite: true,
3423                speed: 9000,
3424                cssEase: 'linear',
3425                autoplay: true,
3426                autoplaySpeed: 0,
3427                dots: false,
3428                arrows: false,
3429                accessibility: false,
3430                draggable: false,
3431                swipe: false,
3432                touchMove: false,
3433                variableWidth: true
3434            });
3435            $('.integrations-slider').css('opacity', 1);
3436        });
3437    }
3438
3439    if ($('.integrations-slider-ltr').length > 0) {
3440        $.getScript("//cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js", function(){
3441            $('.integrations-slider-ltr').slick({
3442                infinite: true,
3443                speed: 9000,
3444                cssEase: 'linear',
3445                autoplay: true,
3446                autoplaySpeed: 0,
3447                dots: false,
3448                arrows: false,
3449                accessibility: false,
3450                draggable: false,
3451                swipe: false,
3452                touchMove: false,
3453                variableWidth: true,
3454                rtl: true,
3455            });
3456            $('.integrations-slider-ltr').css('opacity', 1);
3457        });
3458    }
3459}
3460
3461function slickCarousel() {
3462    if ($('.slick-carousel').length > 0) {
3463        $.getScript("//cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js", function(){
3464            $('.slick-carousel').slick({
3465                dots: true,
3466                arrows: true,
3467                accessibility: false,
3468                draggable: false,
3469                swipe: true,
3470                touchMove: true,
3471                fade: true,
3472                autoplay: true,
3473                autoplaySpeed: 5000,
3474            });
3475            $('.slick-carousel').css('opacity', 1);
3476        });
3477    }
3478}
3479
3480// register with email
3481function registerWithEmail(options) {
3482    $('.btn-email-register').click(function() {
3483        let signUpUrl = options.signUpUrl;
3484        let email = $('#email-input').val();
3485
3486        if (!email) {
3487            $('#email-input').removeClass('error');
3488            $('.error-message').hide();
3489            window.location.href = signUpUrl;
3490        }
3491
3492        if (email && validateEmail(email)) {
3493            $('#email-input').removeClass('error');
3494            $('.error-message').hide();
3495            let url = signUpUrl + '?email=' + encodeURIComponent(email);
3496            window.location.href = url;
3497        }
3498
3499        if (email && !validateEmail(email)) {
3500            $('#email-input').addClass('error');
3501            $('.error-message').show();
3502        }
3503    });
3504}
3505
3506function validateEmail(email) {
3507    const emailReg =/^\w+[-+.!$%&'*+-/=#?^_\`{|}~\w]*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
3508    return emailReg.test(email);
3509}
3510
3511function slideSection() {
3512    $('.slide-section-opener').click(function(e) {
3513        e.preventDefault();
3514
3515        $(this).closest('.slide-section').toggleClass('opened');
3516        $(this).closest('.slide-section').find('.slide-content').slideToggle(300);
3517    });
3518}
3519
3520function showSchedulesTabs() {
3521    $('.schedules-types .tab-content .tab-pane:first-child').addClass('show active');
3522    $('.schedules-types .nav .nav-item:first-child .nav-link').addClass('active');
3523
3524    $('.top-features .tab-content .tab-pane:first-child').addClass('show active');
3525    $('.top-features .nav .nav-item:first-child .nav-link').addClass('active');
3526
3527    $('.features-tabs .tab-content .tab-pane:first-child').addClass('show active');
3528    $('.features-tabs .nav .nav-item:first-child .nav-link').addClass('active');
3529
3530    $('.solutions-tabs .tab-content .tab-pane:first-child').addClass('show active');
3531    $('.solutions-tabs .nav .nav-item:first-child .nav-link').addClass('active');
3532}
3533
3534function setHelpMenuHeight() {
3535    if ($('.help-page').length > 0) {
3536        checkHelpMenuHeight();
3537
3538        $(window).scroll(function () {
3539            checkHelpMenuHeight();
3540        });
3541
3542        $(window).resize(function () {
3543            checkHelpMenuHeight();
3544        });
3545
3546        function checkHelpMenuHeight() {
3547            if($('.help-page-sidebar:visible')) {
3548                let headerHeight = $('#header').innerHeight();
3549                let sidebarHeaderHeight = $('.help-page-sidebar .help-page-header').innerHeight();
3550                let sidebarMenuMaxHeight = $(window).height() - headerHeight - sidebarHeaderHeight;
3551
3552                $('#help-tree').css('max-height', sidebarMenuMaxHeight + 'px');
3553            }
3554        }
3555    }
3556}
3557
3558function filterCategoryBlocks() {
3559    if ($('.category-filter').length > 0) {
3560        buildCategoryFilter();
3561
3562        let maxCounter = 4;
3563        let selectedCategory = 'all';
3564
3565        selectCategoryBoxes(selectedCategory, maxCounter);
3566
3567        $(".category-blocks-filter a").click(function(e){
3568            e.preventDefault();
3569
3570            $(".category-blocks-filter a").removeClass('active');
3571            $(this).addClass('active');
3572
3573            selectedCategory = $(this).attr('data-filter');
3574            maxCounter = 4;
3575
3576            selectCategoryBoxes(selectedCategory, maxCounter);
3577        });
3578
3579        $(".category-blocks-section .btn-load-more").click(function(e) {
3580            e.preventDefault();
3581
3582            maxCounter += 4;
3583
3584            selectCategoryBoxes(selectedCategory, maxCounter);
3585
3586            $(this).blur();
3587        });
3588    }
3589}
3590
3591function buildCategoryFilter() {
3592    let filterCategories = [];
3593
3594    $('.category-blocks .box').each(function(index, element){
3595        let currentCategory = $.trim($(element).find('.category').text());
3596
3597        if ($.inArray(currentCategory, filterCategories) == -1) {
3598            filterCategories.push(currentCategory);
3599        }
3600
3601        $(this).attr('data-category', currentCategory.toLowerCase().replaceAll(' ', '-'));
3602    });
3603
3604    $.each(filterCategories,function(index,value){
3605        let anchor = $('<a href="#"></a>').attr('data-filter', value.toLowerCase().replaceAll(' ', '-')).text(value);
3606        let listItem = $('<li></li>').append(anchor);
3607        $('.category-blocks-filter').append(listItem);
3608    });
3609}
3610
3611function selectCategoryBoxes(category, maxCounter) {
3612    $('.category-blocks .box').removeClass('selected').hide();
3613
3614    if (category == "all"){
3615        $('.category-blocks .box').addClass('selected');
3616        showSelectedCategories(maxCounter)
3617        checkLoadMoreBtn(maxCounter);
3618    } else {
3619        $('.category-blocks .box').each(function(index, element) {
3620            if ($(element).attr('data-category') == category) {
3621                $(element).addClass('selected');
3622            }
3623        });
3624
3625        showSelectedCategories(maxCounter)
3626        checkLoadMoreBtn(maxCounter);
3627    }
3628}
3629
3630function showSelectedCategories(maxCounter) {
3631    $('.category-blocks .selected').each(function(index, element){
3632        if (index < maxCounter) {
3633            $(element).show();
3634        } else {
3635            $(element).hide();
3636        }
3637    });
3638}
3639
3640function checkLoadMoreBtn(maxCounter) {
3641    if ($('.category-blocks .selected').length <= maxCounter) {
3642        $(".category-blocks-section .btn-load-holder").hide();
3643    } else {
3644        $(".category-blocks-section .btn-load-holder").show();
3645    }
3646}
3647
3648function showMobileGuideMenu() {
3649    if ($(window).width() <= 1023) {
3650        $('.sidebar').removeClass('nav-visible');
3651        $('.sidebar .sidebar-menu').hide();
3652    };
3653
3654    $('.mobile-menu-opener').click(function () {
3655        if ($(window).width() <= 1023) {
3656            $('.sidebar').toggleClass('nav-visible');
3657
3658            if ($('.sidebar').hasClass('nav-visible')) {
3659                $([document.documentElement, document.body]).animate({
3660                    scrollTop: $(".sidebar").offset().top - 35
3661                }, 300);
3662            }
3663
3664            $('.sidebar .sidebar-menu').slideToggle(300);
3665        }
3666    });
3667}
3668
3669function animateAnchorLinks() {
3670    $("a.anchor-link").click(function(e) {
3671        e.preventDefault();
3672
3673        let id  = $(this).attr('href');
3674        let banner = $('.pricing-offer-banners').length ? $('.pricing-offer-banners').innerHeight() : 0;
3675        let top = $(id).offset().top - 100 - banner;
3676
3677        $('body,html').animate({scrollTop: top}, 500);
3678    });
3679}
3680
3681function listenAndRemoveElement(selector) {
3682    function check() {
3683        let el = document.querySelector(selector);
3684        el && el.remove();
3685    }
3686    check();
3687    typeof MutationObserver !== 'undefined' &&
3688        new MutationObserver(check).observe(document.documentElement, { subtree: true, childList: true });
3689}
3690
3691function setSameHeight() {
3692    if ($('.same-height-row').length > 0) {
3693        let maxHeight = 0;
3694
3695        $(".same-height-row .same-height").css('height','auto');
3696
3697        $(".same-height-row .same-height").each(function () {
3698            let blockHeight = parseInt($(this).height());
3699            if(blockHeight > maxHeight) {
3700                maxHeight = blockHeight;
3701            };
3702        });
3703
3704        $(".same-height-row .same-height").height(maxHeight);
3705    }
3706}
3707
3708function featuresTableSlider() {
3709    if ($('.features-table-body-wrapper').length > 0) {
3710
3711        let tableWrapper = $('.features-table-wrapper');
3712        let item = $('.features-table-body-wrapper');
3713        let button = $('#table-opener');
3714        let customHeight = 700;
3715
3716        if ($(window).width() <= 768) {
3717            customHeight = 560;
3718        }
3719
3720        item.height(customHeight);
3721        item.addClass('hidden');
3722
3723        button.click(function(e) {
3724            e.preventDefault();
3725
3726            if (item.hasClass('hidden')) {
3727                item.removeClass('hidden');
3728                item.css('height','auto');
3729                tableWrapper.addClass('content-opened');
3730                checkFeaturesTableScroll();
3731            } else {
3732                item.addClass('hidden');
3733                tableWrapper.removeClass('content-opened');
3734                item.height(customHeight);
3735                let banner = $('.pricing-offer-banners').length ? $('.pricing-offer-banners').innerHeight() : 0;
3736                let top = $('#features').offset().top - 120 - banner;
3737                $('body,html').animate({scrollTop: top}, 300);
3738                checkFeaturesTableScroll();
3739            }
3740            $(this).blur();
3741        })
3742    }
3743}
3744
3745// Init Time Calculator
3746function initTimeCalculator() {
3747    if ($('.time-card-calculator').length > 0) {
3748
3749        // -- Protected parsing of HH:MM in minutes (returns null on invali
3749d input) --
3750        function timeStrToMinutes(str) {
3751            // Protection against undefined / null / empty string
3752            if (str == null) return null;            // null or undefined
3753            if (typeof str !== 'string') str = String(str);
3754            str = str.trim();
3755            if (str === '') return null;
3756
3757            const parts = str.split(':');
3758            if (parts.length !== 2) return null;
3759
3760            const h = parseInt(parts[0], 10);
3761            const m = parseInt(parts[1], 10);
3762
3763            if (isNaN(h) || isNaN(m)) return null;
3764            if (h < 0 || h > 24) return null;
3765            if (m < 0 || m > 59) return null;
3766            if (h === 24 && m !== 0) return null;
3767
3768            return h * 60 + m;
3769        }
3770
3771        function minutesToTimeStr(mins) {
3772            if (mins == null || isNaN(mins)) mins = 0;
3773            if (mins < 0) mins = 0;
3774            const h = Math.floor(mins / 60);
3775            const m = mins % 60;
3776            return String(h).padStart(2,"0") + ":" + String(m).padStart(2,"0");
3777        }
3778
3779        function updateTimeBlock($el, value) {
3780            $el.text(value);
3781            if (value === "00:00") {
3782                $el.addClass('empty');
3783            } else {
3784                $el.removeClass('empty');
3785            }
3786        }
3787
3788        function calculateRow($row) {
3789            const startStr = $row.find('.start-time').val();
3790            const endStr = $row.find('.end-time').val();
3791            const breakStr = $row.find('.break-time').val();
3792
3793            let startMins = timeStrToMinutes(startStr);
3794            let endMins = timeStrToMinutes(endStr);
3795            let breakMins = timeStrToMinutes(breakStr);
3796
3797            if (breakMins === null) breakMins = 0;
3798
3799            if (startMins === null || endMins === null) {
3800                updateTimeBlock($row.find('.total-time'), "00:00");
3801                updateTimeBlock($row.find('.regular-time'), "00:00");
3802                updateTimeBlock($row.find('.overtime'), "00:00");
3803                return 0;
3804            }
3805
3806            if (endMins < startMins) endMins += 24*60;
3807
3808            let workMins = endMins - startMins - breakMins;
3809            if (workMins < 0) workMins = 0;
3810
3811            const regularMins = Math.min(workMins, 8*60);
3812            const overtimeMins = Math.max(workMins - 8*60, 0);
3813
3814            updateTimeBlock($row.find('.total-time'), minutesToTimeStr(workMins));
3815            updateTimeBlock($row.find('.regular-time'), minutesToTimeStr(regularMins));
3816            updateTimeBlock($row.find('.overtime'), minutesToTimeStr(overtimeMins));
3817
3818            return workMins;
3819        }
3820
3821        function recalcAll() {
3822            let totalWeekMins = 0;
3823            $('#work-time-table tbody tr').each(function(){
3824                totalWeekMins += calculateRow($(this));
3825            });
3826            updateTimeBlock($('.total-time-in-a-week'), minutesToTimeStr(totalWeekMins));
3827        }
3828
3829        function initTimeInputs() {
3830            $('.input-time, .break-time').each(function(){
3831                const $input = $(this);
3832                $input.attr('maxlength', 5);
3833
3834                // Entering a value into input, setting a pattern
3835                $input.on('input', function(){
3836                    let val = $input.val() || '';
3837
3838                    // pattern for input
3839                    val = val.replace(/[^0-9:]/g, '');
3840
3841                    // if the first digit of the hour is greater than 2, set it to 2
3842                    if (val.length >= 1 && parseInt(val[0], 10) > 2) {
3843                        val = '2' + val.slice(1);
3844                    }
3845
3846                    // if 2 digits are entered, a separator is automatically inserted
3847                    if (val.length >= 2 && val[2] !== ':') {
3848                        val = val.slice(0,2) + ':' + val.slice(2);
3849                    }
3850                    val = val.slice(0,5);
3851
3852                    // checking maximum digit values (24:00 / *:5*)
3853                    const parts = val.split(':');
3854                    if (parts.length === 2) {
3855                        let h = parts[0];
3856                        let m = parts[1];
3857
3858                        if (h.length === 1 && parseInt(h,10) > 2) h = '2';
3859                        if (h.length === 2) {
3860                            if (h[0] === '2' && parseInt(h[1],10) > 4) {
3861                                h = '24';
3862                                m = '00';
3863                            }
3864                        }
3865                        if (m.length === 1 && parseInt(m,10) > 5) m = '5';
3866                        if (h.length === 2 && parseInt(h,10) == 24) m = '00';
3867
3868                        val = h + ':' + m;
3869                    }
3870
3871                    $input.val(val);
3872                    recalcAll();
3873                });
3874
3875                // Deleting a value using the Backspace key
3876                $input.on("keydown", function(e){
3877                    if (e.key === "Backspace") {
3878                        let pos = this.selectionStart;
3879                        let val = $input.val();
3880
3881                        if (pos > 0) {
3882                            e.preventDefault();
3883                            $input.val(val.slice(0, pos-1) + val.slice(pos));
3884                            this.setSelectionRange(pos-1, pos-1);
3885                        }
3886                    }
3887                });
3888
3889                // validate value when focus disappears
3890                $input.on('blur', function(){
3891                    let val = $input.val() || '';
3892                    const parts = val.split(':');
3893                    if (parts.length === 2) {
3894                        let h = parts[0].padStart(2, '0');
3895                        let m = parts[1].padStart(2, '0');
3896                        if (h === '24') m = '00';
3897                        $input.val(h + ':' + m);
3898                    }
3899                    recalcAll();
3900                });
3901            });
3902        }
3903
3904        // Reset button
3905        $(document).on('click', '.btn-calculator-reset', function(){
3906            $('.start-time, .end-time, .break-time').val('');
3907            $('.total-time, .regular-time, .overtime, .total-time-in-a-week').each(function(){
3908                updateTimeBlock($(this), "00:00");
3909            });
3910        });
3911
3912        // Initializing empty values by default
3913        $('.total-time, .regular-time, .overtime, .total-time-in-a-week').each(function(){
3914            updateTimeBlock($(this), "00:00");
3915        });
3916
3917        initTimeInputs();
3918        recalcAll();
3919    }
3920}

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