PageSourceSearch

https://kawar.com/sites/default/files/js/js_sj2aR2ZqGROJy9rBB8r0f211FYr_3WEmdnJ8gt4-1-8.js

js kawar.com collected 2026-09-25 05:18:24 UTC 448,090 bytes, 9,774 lines download raw bytes

vendor: 89,476 bytes, lines 1-2
1/*! jQuery v3.5.1 | (c) JS 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},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.5.1",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(),D=function(e,t){return e===t&&(l=!0),0},j={}.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.namespaceURI,n=(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},D=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&&j.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(D),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}: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];if(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(D).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 D(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(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"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,j=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="pending",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=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=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(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)ke(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=Ee;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 Ae(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.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,Ce)}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=Te.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=Te.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")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(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?Ce:Ee,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:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},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:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!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 ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(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=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(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 Pe(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&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(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"),Le)).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,He),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(je,""),u,l))}return n}function Re(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++)Oe(o[r],a[r]);else Oe(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 Re(this,e,!0)},remove:function(e){return Re(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 Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(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&&!Ne.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 Pe(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 Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=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},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.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 $e(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",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=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 Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.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)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(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 Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(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=Je)}),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=Ie(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=et).prototype={constructor:et,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=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=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):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=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[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),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:tt||ut(),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=ft.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,ct,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(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),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],ot.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=ct(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?ft.prefilters.unshift(e):ft.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=ft(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&&at.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(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("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(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=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)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=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)?pt: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)}}),pt={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=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(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):ht.test(e.nodeName)||gt.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,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(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,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(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,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(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<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\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(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(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 bt=/^(?:focusinfocus|focusoutblur)$/,wt=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&&!bt.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,bt.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,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),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 Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(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)Dt(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")&&Nt.test(this.nodeName)&&!At.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(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(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 Bt(t,i,o,a){var s={},u=t===Mt;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 $t(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}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),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=Ht.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||Tt.href)+"").replace(Pt,Tt.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=Wt.protocol+"//"+Wt.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)),Bt(Rt,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=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.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]?", "+It+"; 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=Bt(Mt,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)&&(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 _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!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(_t[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 Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.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(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.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,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.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=vt(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):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),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]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.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 Gt=/^[\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(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
3;
4!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
5//     Underscore.js 1.13.1
6//     https://underscorejs.org
vendor: 4,885 bytes, lines 7-9
7//     (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
8//     Underscore may be freely distributed under the MIT license.
9var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),T=x("Function"),k=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof k&&(T=function(n){return"function"==typeof n||!1});var D=T,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);
vendor: 12,113 bytes, line 9
9if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),dn=V?fn(vn):x("Map"),gn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return _(n)?U(n)?n.slice():xn({},n):n}function Bn(n){return U(n)?n:[n]}function Nn(n){return tn.toPath(n)}function In(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function Tn(n,r,t){var e=In(n,Nn(r));return w(e)?t:e}function kn(n){return n}function Dn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Rn(n){return n=Nn(n),function(r){return In(r,n)}}function Fn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?kn:D(n)?Fn(n,r,t):_(n)&&!U(n)?Dn(n):Rn(n)}function Pn(n,r){return Vn(n,r,1/0)}function qn(n,r,t){return tn.iteratee!==Pn?tn.iteratee(n,r):Vn(n,r,t)}function Un(){}function Wn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Bn,tn.iteratee=Pn;var zn=Date.now||function(){return(new Date).getTime()};function Ln(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var $n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return nr(n,e,this,this,i)};return e}));rr.placeholder=tn;var tr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return nr(n,e,r,this,t.concat(u))}));return e})),er=K(Y);function ur(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(er(a)&&(U(a)||L(a)))if(r>1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var or=j((function(n,r){var t=(r=ur(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=tr(n[e],n)}return n}));var ir=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ar=rr(ir,tn,1);function fr(n){return function(){return!n.apply(this,arguments)}}function cr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function pr(n){return function(r,t,e){t=qn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var vr=pr(1),hr=pr(-1);function yr(n,r,t,e){for(var u=(t=qn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function dr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if("number"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var gr=dr(1,vr,yr),br=dr(-1,hr);function mr(n,r,t){var e=(er(n)?vr:sr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function jr(n,r,t){var e,u;if(r=Fn(r,t),er(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function _r(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function wr(n){var r=function(r,t,e,u){var o=!er(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!r(n[i],i,n))return!1}return!0}function Mr(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Er(n,r,t,e){return er(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),gr(n,r,t)>=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Wn(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function kr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=qn(e,u),jr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Dr=kr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Rr=kr((function(n,r,t){n[t]=r})),Fr=kr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Vr=kr((function(n,r,t){n[t?0:1].push(r)}),!0),Pr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function qr(n,r,t){return r in t}var Ur=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Wr=j((function(n,r){var t,e=r[0];return D(e)?(e=fr(e),r.length>1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Er(o,c)||(o.push(c),u.push(f)):Er(u,f)||u.push(f)}return u}var Gr=j((function(n){return Jr(ur(n,!0,!0))}));function Hr(n){for(var r=n&&Ir(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Nr(n,e);return t}var Qr=j(Hr);function Xr(n,r){return n._chain?tn(r).chain():r}function Yr(n){return jr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Xr(this,t.apply(tn,n))}})),tn}jr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Xr(this,t)}})),jr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Xr(this,n)}}));var Zr=Yr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&d(n)&&!isNaN(parseFloat(n))},isNaN:$,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:dn,isWeakMap:gn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:En,tap:function(n,r){return r(n),n},get:Tn,has:function(n,r){for(var t=(r=Nn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=qn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:kn,constant:C,noop:Un,toPath:Bn,property:Rn,propertyOf:function(n){return null==n?Un:function(r){return Tn(n,r)}},matcher:Dn,matches:Dn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Fn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Wn,now:zn,escape:Cn,unescape:Kn,templateSettings:Jn,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e=RegExp([(r.escape||Gn).source,(r.interpolate||Gn).source,(r.evaluate||Gn).source].join("|")+"|$","g"),u=0,o="__p+='";n.replace(e,(function(r,t,e,i,a){return o+=n.slice(u,a).replace(Qn,Xn),u=a+r.length,t?o+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?o+="'+\n((__t=("+e+"))==null?'':__t)+\n'":i&&(o+="';\n"+i+"\n__p+='"),r})),o+="';\n";var i,a=r.variable;if(a){if(!Yn.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{i=new Function(a,"_",o)}catch(n){throw n.source=o,n}var f=function(n){return i.call(this,n,tn)};return f.source="function("+a+"){\n"+o+"}",f},result:function(n,r,t){var e=(r=Nn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Zn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Pn,partial:rr,bind:tr,bindAll:or,memoize:function(n,r){var t=function(e){var u=t.cache,o=""+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:ir,defer:ar,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:zn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=zn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}}
9,before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return Tr(n,1/0)},sample:Tr,sortBy:function(n,r,t){var e=0;return r=qn(r,t),Nr(_r(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Dr,indexBy:Rr,countBy:Fr,partition:Vr,toArray:function(n){return n?U(n)?i.call(n):S(n)?n.match(Pr):er(n)?_r(n,kn):jn(n):[]},size:function(n){return null==n?0:er(n)?n.length:nn(n).length},pick:Ur,omit:Wr,first:Lr,head:Lr,take:Lr,initial:zr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:$r(n,Math.max(0,n.length-r))},rest:$r,tail:$r,drop:$r,compact:function(n){return Sr(n,Boolean)},flatten:function(n,r){return ur(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:Gr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Er(r,o)){var i;for(i=1;i<t&&Er(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Hr,transpose:Hr,zip:Qr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Yr,default:tn});return Zr._=Zr,Zr}));;
10/*!
11 * jQuery Once v2.2.3 - http://github.com/robloach/jquery-once
12 * @license MIT, GPL-2.0
13 *   http://opensource.org/licenses/MIT
14 *   http://opensource.org/licenses/GPL-2.0
15 */
16(function(e){"use strict";if(typeof exports==="object"&&typeof exports.nodeName!=="string"){e(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(t){"use strict";var r=function(e){e=e||"once";if(typeof e!=="string"){throw new TypeError("The jQuery Once id parameter must be a string")}return e};t.fn.once=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)!==true}).data(n,true)};t.fn.removeOnce=function(e){return this.findOnce(e).removeData("jquery-once-"+r(e))};t.fn.findOnce=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)===true})}});
17
18/**
19* DO NOT EDIT THIS FILE.
20* See the following change record for more information,
21* https://www.drupal.org/node/2815083
22* @preserve
23**/
24
25(function () {
26  var settingsElement = document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]');
27
28  window.drupalSettings = {};
29
30  if (settingsElement !== null) {
31    window.drupalSettings = JSON.parse(settingsElement.textContent);
32  }
33})();;
34/**
35* DO NOT EDIT THIS FILE.
36* See the following change record for more information,
37* https://www.drupal.org/node/2815083
38* @preserve
39**/
40
41window.Drupal = { behaviors: {}, locale: {} };
42
43(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) {
44  Drupal.throwError = function (error) {
45    setTimeout(function () {
46      throw error;
47    }, 0);
48  };
49
50  Drupal.attachBehaviors = function (context, settings) {
51    context = context || document;
52    settings = settings || drupalSettings;
53    var behaviors = Drupal.behaviors;
54
55    Object.keys(behaviors || {}
55).forEach(function (i) {
56      if (typeof behaviors[i].attach === 'function') {
57        try {
58          behaviors[i].attach(context, settings);
59        } catch (e) {
60          Drupal.throwError(e);
61        }
62      }
63    });
64  };
65
66  Drupal.detachBehaviors = function (context, settings, trigger) {
67    context = context || document;
68    settings = settings || drupalSettings;
69    trigger = trigger || 'unload';
70    var behaviors = Drupal.behaviors;
71
72    Object.keys(behaviors || {}).forEach(function (i) {
73      if (typeof behaviors[i].detach === 'function') {
74        try {
75          behaviors[i].detach(context, settings, trigger);
76        } catch (e) {
77          Drupal.throwError(e);
78        }
79      }
80    });
81  };
82
83  Drupal.checkPlain = function (str) {
84    str = str.toString().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
85    return str;
86  };
87
88  Drupal.formatString = function (str, args) {
89    var processedArgs = {};
90
91    Object.keys(args || {}).forEach(function (key) {
92      switch (key.charAt(0)) {
93        case '@':
94          processedArgs[key] = Drupal.checkPlain(args[key]);
95          break;
96
97        case '!':
98          processedArgs[key] = args[key];
99          break;
100
101        default:
102          processedArgs[key] = Drupal.theme('placeholder', args[key]);
103          break;
104      }
105    });
106
107    return Drupal.stringReplace(str, processedArgs, null);
108  };
109
110  Drupal.stringReplace = function (str, args, keys) {
111    if (str.length === 0) {
112      return str;
113    }
114
115    if (!Array.isArray(keys)) {
116      keys = Object.keys(args || {});
117
118      keys.sort(function (a, b) {
119        return a.length - b.length;
120      });
121    }
122
123    if (keys.length === 0) {
124      return str;
125    }
126
127    var key = keys.pop();
128    var fragments = str.split(key);
129
130    if (keys.length) {
131      for (var i = 0; i < fragments.length; i++) {
132        fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0));
133      }
134    }
135
136    return fragments.join(args[key]);
137  };
138
139  Drupal.t = function (str, args, options) {
140    options = options || {};
141    options.context = options.context || '';
142
143    if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) {
144      str = drupalTranslations.strings[options.context][str];
145    }
146
147    if (args) {
148      str = Drupal.formatString(str, args);
149    }
150    return str;
151  };
152
153  Drupal.url = function (path) {
154    return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path;
155  };
156
157  Drupal.url.toAbsolute = function (url) {
158    var urlParsingNode = document.createElement('a');
159
160    try {
161      url = decodeURIComponent(url);
162    } catch (e) {}
163
164    urlParsingNode.setAttribute('href', url);
165
166    return urlParsingNode.cloneNode(false).href;
167  };
168
169  Drupal.url.isLocal = function (url) {
170    var absoluteUrl = Drupal.url.toAbsolute(url);
171    var protocol = window.location.protocol;
172
173    if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) {
174      protocol = 'https:';
175    }
176    var baseUrl = protocol + '//' + window.location.host + drupalSettings.path.baseUrl.slice(0, -1);
177
178    try {
179      absoluteUrl = decodeURIComponent(absoluteUrl);
180    } catch (e) {}
181    try {
182      baseUrl = decodeURIComponent(baseUrl);
183    } catch (e) {}
184
185    return absoluteUrl === baseUrl || absoluteUrl.indexOf(baseUrl + '/') === 0;
186  };
187
188  Drupal.formatPlural = function (count, singular, plural, args, options) {
189    args = args || {};
190    args['@count'] = count;
191
192    var pluralDelimiter = drupalSettings.pluralDelimiter;
193    var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter);
194    var index = 0;
195
196    if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) {
197      index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default;
198    } else if (args['@count'] !== 1) {
199      index = 1;
200    }
201
202    return translations[index];
203  };
204
205  Drupal.encodePath = function (item) {
206    return window.encodeURIComponent(item).replace(/%2F/g, '/');
207  };
208
209  Drupal.deprecationError = function (_ref) {
210    var message = _ref.message;
211
212    if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) {
213      console.warn('[Deprecation] ' + message);
214    }
215  };
216
217  Drupal.deprecatedProperty = function (_ref2) {
218    var target = _ref2.target,
219        deprecatedProperty = _ref2.deprecatedProperty,
220        message = _ref2.message;
221
222    if (!Proxy || !Reflect) {
223      return target;
224    }
225
226    return new Proxy(target, {
227      get: function get(target, key) {
228        for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
229          rest[_key - 2] = arguments[_key];
230        }
231
232        if (key === deprecatedProperty) {
233          Drupal.deprecationError({ message: message });
234        }
235        return Reflect.get.apply(Reflect, [target, key].concat(rest));
236      }
237    });
238  };
239
240  Drupal.theme = function (func) {
241    if (func in Drupal.theme) {
242      var _Drupal$theme;
243
244      for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
245        args[_key2 - 1] = arguments[_key2];
246      }
247
vendor: 4,563 bytes, lines 248-289
248      return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args);
249    }
250  };
251
252  Drupal.theme.placeholder = function (str) {
253    return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
254  };
255})(Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect);;
256/**
257* DO NOT EDIT THIS FILE.
258* See the following change record for more information,
259* https://www.drupal.org/node/2815083
260* @preserve
261**/
262
263if (window.jQuery) {
264  jQuery.noConflict();
265}
266
267document.documentElement.className += ' js';
268
269(function (Drupal, drupalSettings) {
270  var domReady = function domReady(callback) {
271    if (document.readyState !== 'loading') {
272      callback();
273    } else {
274      var listener = function listener() {
275        callback();
276        document.removeEventListener('DOMContentLoaded', listener);
277      };
278      document.addEventListener('DOMContentLoaded', listener);
279    }
280  };
281
282  domReady(function () {
283    Drupal.attachBehaviors(document, drupalSettings);
284  });
285})(Drupal, window.drupalSettings);;
286/*! jQuery UI - v1.12.1 - 2017-03-31
287* http://jqueryui.com
288* Copyright jQuery Foundation and other contributors; Licensed  */
289!function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){var b="ui-effects-",c="ui-effects-style",d="ui-effects-animated",e=a;return a.effects={effect:{}},function(a,b){function c(a,b,c){var d=l[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function d(b){var c=j(),d=c._rgba=[];return b=b.toLowerCase(),o(i,function(a,e){var f,g=e.re.exec(b),h=g&&e.parse(g),i=e.space||"rgba";if(h)return f=c[i](h),c[k[i].cache]=f[k[i].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,f.transparent),c):f[b]}function e(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",h=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],j=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=j.support={},n=a("<p>")[0],o=a.each;n.style.cssText="background-color:rgba(1,1,1,.5)",m.rgba=n.style.backgroundColor.indexOf("rgba")>-1,o(k,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),j.fn=a.extend(j.prototype,{parse:function(e,g,h,i){if(e===b)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(g),g=b);var l=this,m=a.type(e),n=this._rgba=[];return g!==b&&(e=[e,g,h,i],m="array"),"string"===m?this.parse(d(e)||f._default):"array"===m?(o(k.rgba.props,function(a,b){n[b.idx]=c(e[b.idx],b)}),this):"object"===m?(e instanceof j?o(k,function(a,b){e[b.cache]&&(l[b.cache]=e[b.cache].slice())}):o(k,function(b,d){var f=d.cache;o(d.props,function(a,b){if(!l[f]&&d.to){if("alpha"===a||null==e[a])return;l[f]=d.to(l._rgba)}l[f][b.idx]=c(e[a],b,!0)}),l[f]&&a.inArray(null,l[f].slice(0,3))<0&&(l[f][3]=1,d.from&&(l._rgba=d.from(l[f])))}),this):void 0},is:function(a){var b=j(a),c=!0,d=this;return o(k,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],o(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return o(k,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var d=j(a),e=d._space(),f=k[e],g=0===this.alpha()?j("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();
vendor: 6,116 bytes, line 289
289return d=d[f.cache],o(f.props,function(a,e){var f=e.idx,g=h[f],j=d[f],k=l[e.type]||{};null!==j&&(null===g?i[f]=j:(k.mod&&(j-g>k.mod/2?g+=k.mod:g-j>k.mod/2&&(g-=k.mod)),i[f]=c((j-g)*b+g,e)))}),this[e](i)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=j(b)._rgba;return j(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),j.fn.parse.prototype=j.fn,k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b,c,d=a[0]/255,e=a[1]/255,f=a[2]/255,g=a[3],h=Math.max(d,e,f),i=Math.min(d,e,f),j=h-i,k=h+i,l=.5*k;return b=i===h?0:d===h?60*(e-f)/j+360:e===h?60*(f-d)/j+120:60*(d-e)/j+240,c=0===j?0:l<=.5?j/k:j/(2-k),[Math.round(b)%360,c,l,null==g?1:g]},k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],f=a[3],g=d<=.5?d*(1+c):d+c-d*c,h=2*d-g;return[Math.round(255*e(h,g,b+1/3)),Math.round(255*e(h,g,b)),Math.round(255*e(h,g,b-1/3)),f]},o(k,function(d,e){var f=e.props,g=e.cache,i=e.to,k=e.from;j.fn[d]=function(d){if(i&&!this[g]&&(this[g]=i(this._rgba)),d===b)return this[g].slice();var e,h=a.type(d),l="array"===h||"object"===h?d:arguments,m=this[g].slice();return o(f,function(a,b){var d=l["object"===h?a:b.idx];null==d&&(d=m[b.idx]),m[b.idx]=c(d,b)}),k?(e=j(k(m)),e[g]=m,e):j(m)},o(f,function(b,c){j.fn[b]||(j.fn[b]=function(e){var f,g=a.type(e),i="alpha"===b?this._hsla?"hsla":"rgba":d,j=this[i](),k=j[c.idx];return"undefined"===g?k:("function"===g&&(e=e.call(this,k),g=a.type(e)),null==e&&c.empty?this:("string"===g&&(f=h.exec(e),f&&(e=k+parseFloat(f[2])*("+"===f[1]?1:-1))),j[c.idx]=e,this[i](j)))})})}),j.hook=function(b){var c=b.split(" ");o(c,function(b,c){a.cssHooks[c]={set:function(b,e){var f,g,h="";if("transparent"!==e&&("string"!==a.type(e)||(f=d(e)))){if(e=j(f||e),!m.rgba&&1!==e._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(i){}e=e.blend(h&&"transparent"!==h?h:"_default")}e=e.toRgbaString()}try{b.style[c]=e}catch(i){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=j(b.elem,c),b.end=j(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},j.hook(g),a.cssHooks.borderColor={expand:function(a){var b={};return o(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(e),function(){function b(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function c(b,c){var d,e,g={};for(d in c)e=c[d],b[d]!==e&&(f[d]||!a.fx.step[d]&&isNaN(parseFloat(e))||(g[d]=e));return g}var d=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,c){a.fx.step[c]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(e.style(a.elem,c,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(e,f,g,h){var i=a.speed(f,g,h);return this.queue(function(){var f,g=a(this),h=g.attr("class")||"",j=i.children?g.find("*").addBack():g;j=j.map(function(){var c=a(this);return{el:c,start:b(this)}}),f=function(){a.each(d,function(a,b){e[b]&&g[b+"Class"](e[b])})},f(),j=j.map(function(){return this.end=b(this.el[0]),this.diff=c(this.start,this.end),this}),g.attr("class",h),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){f(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(g[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(b){return function(c,d,e,f,g){return"boolean"==typeof d||void 0===d?e?a.effects.animateClass.call(this,d?{add:c}:{remove:c},e,f,g):b.apply(this,arguments):a.effects.animateClass.call(this,{toggle:c},d,e,f)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function e(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function f(b){return!(b&&"number"!=typeof b&&!a.fx.speeds[b])||("string"==typeof b&&!a.effects.effect[b]||(!!a.isFunction(b)||"object"==typeof b&&!b.effect))}
vendor: 5,366 bytes, line 289
289function g(a,b){var c=b.outerWidth(),d=b.outerHeight(),e=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,f=e.exec(a)||["",0,c,d,0];return{top:parseFloat(f[1])||0,right:"auto"===f[2]?c:parseFloat(f[2]),bottom:"auto"===f[3]?d:parseFloat(f[3]),left:parseFloat(f[4])||0}}a.expr&&a.expr.filters&&a.expr.filters.animated&&(a.expr.filters.animated=function(b){return function(c){return!!a(c).data(d)||b(c)}}(a.expr.filters.animated)),a.uiBackCompat!==!1&&a.extend(a.effects,{save:function(a,c){for(var d=0,e=c.length;d<e;d++)null!==c[d]&&a.data(b+c[d],a[0].style[c[d]])},restore:function(a,c){for(var d,e=0,f=c.length;e<f;e++)null!==c[e]&&(d=a.data(b+c[e]),a.css(c[e],d))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(g){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).trigger("focus"),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).trigger("focus")),b}}),a.extend(a.effects,{version:"1.12.1",define:function(b,c,d){return d||(d=c,c="effect"),a.effects.effect[b]=d,a.effects.effect[b].mode=c,d},scaledDimensions:function(a,b,c){if(0===b)return{height:0,width:0,outerHeight:0,outerWidth:0};var d="horizontal"!==c?(b||100)/100:1,e="vertical"!==c?(b||100)/100:1;return{height:a.height()*e,width:a.width()*d,outerHeight:a.outerHeight()*e,outerWidth:a.outerWidth()*d}},clipToBox:function(a){return{width:a.clip.right-a.clip.left,height:a.clip.bottom-a.clip.top,left:a.clip.left,top:a.clip.top}},unshift:function(a,b,c){var d=a.queue();b>1&&d.splice.apply(d,[1,0].concat(d.splice(b,c))),a.dequeue()},saveStyle:function(a){a.data(c,a[0].style.cssText)},restoreStyle:function(a){a[0].style.cssText=a.data(c)||"",a.removeData(c)},mode:function(a,b){var c=a.is(":hidden");return"toggle"===b&&(b=c?"show":"hide"),(c?"hide"===b:"show"===b)&&(b="none"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createPlaceholder:function(c){var d,e=c.css("position"),f=c.position();return c.css({marginTop:c.css("marginTop"),marginBottom:c.css("marginBottom"),marginLeft:c.css("marginLeft"),marginRight:c.css("marginRight")}).outerWidth(c.outerWidth()).outerHeight(c.outerHeight()),/^(static|relative)/.test(e)&&(e="absolute",d=a("<"+c[0].nodeName+">").insertAfter(c).css({display:/^(inline|ruby)/.test(c.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:c.css("marginTop"),marginBottom:c.css("marginBottom"),marginLeft:c.css("marginLeft"),marginRight:c.css("marginRight"),"float":c.css("float")}).outerWidth(c.outerWidth()).outerHeight(c.outerHeight()).addClass("ui-effects-placeholder"),c.data(b+"placeholder",d)),c.css({position:e,left:f.left,top:f.top}),d},removePlaceholder:function(a){var c=b+"placeholder",d=a.data(c);d&&(d.remove(),a.removeData(c))},cleanUp:function(b){a.effects.restoreStyle(b),a.effects.removePlaceholder(b)},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function b(b){function e(){i.removeData(d),a.effects.cleanUp(i),"hide"===c.mode&&i.hide(),h()}function h(){a.isFunction(j)&&j.call(i[0]),a.isFunction(b)&&b()}var i=a(this);c.mode=l.shift(),a.uiBackCompat===!1||g?"none"===c.mode?(i[k](),h()):f.call(i[0],c,e):(i.is(":hidden")?"hide"===k:"show"===k)?(i[k](),h()):f.call(i[0],c,h)}var c=e.apply(this,arguments),f=a.effects.effect[c.effect],g=f.mode,h=c.queue,i=h||"fx",j=c.complete,k=c.mode,l=[],m=function(b){var c=a(this),e=a.effects.mode(c,k)||g;c.data(d,!0),l.push(e),g&&("show"===e||e===g&&"hide"===e)&&c.show(),g&&"none"===e||a.effects.saveStyle(c),a.isFunction(b)&&b()};return a.fx.off||!f?k?this[k](c.duration,j):this.each(function(){j&&j.call(this)}):h===!1?this.each(m).each(b):this.queue(i,m).queue(i,b)},show:function(a){return function(b){if(f(b))return a.apply(this,arguments);var c=e.apply(this,arguments);return c.mode="show",this.effect.call(this,c)}}(a.fn.show),hide:function(a){return function(b){if(f(b))return a.apply(this,arguments);var c=e.apply(this,arguments);return c.mode="hide",this.effect.call(this,c)}}(a.fn.hide),toggle:function(a){return function(b){if(f(b)||"boolean"==typeof b)return a.apply(this,arguments);var c=e.apply(this,arguments);return c.mode="toggle",this.effect.call(this,c)}}
289(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d},cssClip:function(a){return a?this.css("clip","rect("+a.top+"px "+a.right+"px "+a.bottom+"px "+a.left+"px)"):g(this.css("clip"),this)},transfer:function(b,c){var d=a(this),e=a(b.to),f="fixed"===e.css("position"),g=a("body"),h=f?g.scrollTop():0,i=f?g.scrollLeft():0,j=e.offset(),k={top:j.top-h,left:j.left-i,height:e.innerHeight(),width:e.innerWidth()},l=d.offset(),m=a("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(b.className).css({top:l.top-h,left:l.left-i,height:d.innerHeight(),width:d.innerWidth(),position:f?"fixed":"absolute"}).animate(k,b.duration,b.easing,function(){m.remove(),a.isFunction(c)&&c()})}}),a.fx.step.clip=function(b){b.clipInit||(b.start=a(b.elem).cssClip(),"string"==typeof b.end&&(b.end=g(b.end,b.elem)),b.clipInit=!0),a(b.elem).cssClip({top:b.pos*(b.end.top-b.start.top)+b.start.top,right:b.pos*(b.end.right-b.start.right)+b.start.right,bottom:b.pos*(b.end.bottom-b.start.bottom)+b.start.bottom,left:b.pos*(b.end.left-b.start.left)+b.start.left})}}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(2*a)/2:1-c(a*-2+2)/2}})}(),a.effects});;
290/**
291 * @file
292 * Cherries by @toddmotto, @cferdinandi, @adamfschwartz, @daniellmb.
293 *
294 * @todo: Use Cash or Underscore when jQuery is dropped by supported plugins.
295 */
296
297/* global define, module */
298(function (root, factory) {
299
300  'use strict';
301
302  // Inspired by https://github.com/addyosmani/memoize.js/blob/master/memoize.js
303  if (typeof define === 'function' && define.amd) {
304    // AMD. Register as an anonymous module.
305    define([], factory);
306  }
307  else if (typeof exports === 'object') {
308    // Node. Does not work with strict CommonJS, but only CommonJS-like
309    // environments that support module.exports, like Node.
310    module.exports = factory();
311  }
312  else {
313    // Browser globals (root is window).
314    root.dBlazy = factory();
315  }
316})(this, function () {
317
318  'use strict';
319
320  /**
321   * Object for public APIs where dBlazy stands for drupalBlazy.
322   *
323   * @namespace
324   */
325  var dBlazy = {};
326
327  // See https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
328  if (!Element.prototype.matches) {
329    Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
330  }
331
332  /**
333   * Check if the given element matches the selector.
334   *
335   * @name dBlazy.matches
336   *
337   * @param {Element} elem
338   *   The current element.
339   * @param {String} selector
340   *   Selector to match against (class, ID, data attribute, or tag).
341   *
342   * @return {Boolean}
343   *   Returns true if found, else false.
344   *
345   * @see http://caniuse.com/#feat=matchesselector
346   * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
347   */
348  dBlazy.matches = function (elem, selector) {
349    // Check if matches, excluding HTMLDocument, see ::closest().
350    if (elem.matches(selector)) {
351      return true;
352    }
353
354    return false;
355  };
356
357  /**
358   * Returns device pixel ratio.
359   *
360   * @return {Integer}
361   *   Returns the device pixel ratio.
362   */
363  dBlazy.pixelRatio = function () {
364    return window.devicePixelRatio || 1;
365  };
366
367  /**
368   * Returns cross-browser window width.
369   *
370   * @return {Integer}
371   *   Returns the window width.
372   */
373  dBlazy.windowWidth = function () {
374    return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth || window.screen.width;
375  };
376
377  /**
378   * Returns cross-browser window width and height.
379   *
380   * @return {Object}
381   *   Returns the window width and height.
382   */
383  dBlazy.windowSize = function () {
384    return {
385      width: this.windowWidth,
386      height: window.innerHeight
387    };
388  };
389
390  /**
391   * Returns data from the current active window.
392   *
393   * When being resized, the browser gave no data about pixel ratio from desktop
394   * to mobile, not vice versa. Unless delayed for 4s+, not less, which is of
395   * course unacceptable.
396   *
397   * @name dBlazy.activeWidth
398   *
399   * @param {Object} dataset
400   *   The dataset object must be keyed by window width.
401   * @param {Boolean} mobileFirst
402   *   Whether to use min-width, or max-width.
403   *
404   * @return {mixed}
405   *   Returns data from the current active window.
406   */
407  dBlazy.activeWidth = function (dataset, mobileFirst) {
408    var me = this;
409    var keys = Object.keys(dataset);
410    var xs = keys[0];
411    var xl = keys[keys.length - 1];
412    var pr = (me.windowWidth() * me.pixelRatio());
413    var ww = mobileFirst ? me.windowWidth() : pr;
414    var mw = function (w) {
415      // The picture wants <= (approximate), non-picture wants >=, wtf.
416      return mobileFirst ? parseInt(w) <= ww : parseInt(w) >= ww;
417    };
418
419    var data = keys.filter(mw).map(function (v) {
420      return dataset[v];
421    })[mobileFirst ? 'pop' : 'shift']();
422
423    return typeof data === 'undefined' ? dataset[ww >= xl ? xl : xs] : data;
424  };
425
426  /**
427   * Check if the HTML tag matches a specified string.
428   *
429   * @name dBlazy.equal
430   *
431   * @param {Element} el
432   *   The element to compare.
433   * @param {String} str
434   *   HTML tag to match against.
435   *
436   * @return {Boolean}
437   *   Returns true if matches, else false.
438   */
439  dBlazy.equal = function (el, str) {
440    return el !== null && el.nodeName.toLowerCase() === str;
441  };
442
443  /**
444   * Get the closest matching element up the DOM tree.
445   *
446   * Inspired by Chris Ferdinandi, http://github.com/cferdinandi/smooth-scroll.
447   *
448   * @name dBlazy.closest
449   *
450   * @param {Element} el
451   *   Starting element.
452   * @param {String} selector
453   *   Selector to match against (class, ID, data attribute, or tag).
454   *
455   * @return {Boolean|Element}
456   *   Returns null if not match found.
457   *
458   * @see http://caniuse.com/#feat=element-closest
459   * @see http://caniuse.com/#feat=matchesselector
460   * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
461   */
462  dBlazy.closest = function (el, selector) {
463    var parent;
464    while (el) {
465      parent = el.parentElement;
466      if (parent && parent.matches(selector)) {
467        return parent;
468      }
469      el = parent;
470    }
471
472    return null;
473  };
474
475  /**
476   * Returns a new object after merging two, or more objects.
477   *
478   * Inspired by @adamfschwartz, @zackbloom, http://youmightnotneedjquery.com.
479   *
480   * @name dBlazy.extend
481   *
482   * @param {Object} out
483   *   The objects to merge together.
484   *
485   * @return {Object}
486   *   Merged values of defaults and options.
487   */
488  dBlazy.extend = Object.assign || function (out) {
489    out = out || {};
490
491    for (var i = 1, len = arguments.length; i < len; i++) {
492      if (!arguments[i]) {
493        continue;
494      }
495
496      for (var key in arguments[i]) {
497        if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
498          out[key] = arguments[i][key];
499        }
500      }
501    }
502
503    return out;
504  };
505
506  /**
507   * A simple forEach() implementation for Arrays, Objects and NodeLists.
508   *
509   * @name dBlazy.forEach
510   *
511   * @author Todd Motto
512   * @link https://github.com/toddmotto/foreach
513   *
514   * @param {Array|Object|NodeList} collection
515   *   Collection of items to iterate.
516   * @param {Function} callback
517   *   Callback function for each iteration.
518   * @param {Array|Object|NodeList} scope
519   *   Object/NodeList/Array that forEach is iterating over (aka `this`).
520   */
521  dBlazy.forEach = function (collection, callback, scope) {
522    var proto = Object.prototype;
523    if (proto.toString.call(collection) === '[object Object]') {
524      for (var prop in collection) {
525        if (proto.hasOwnProperty.call(collection, prop)) {
526          callback.call(scope, collection[prop], prop, collection);
527        }
528      }
529    }
530    else if (collection) {
531      for (var i = 0, len = collection.length; i < len; i++) {
532        callback.call(scope, collection[i], i, collection);
533      }
534    }
535  };
536
537  /**
538   * A simple hasClass wrapper.
539   *
540   * @name dBlazy.hasClass
541   *
542   * @param {Element} el
543   *   The HTML element.
544   * @param {String} name
545   *   The class name.
546   *
547   * @return {bool}
548   *   True if the method is supported.
549   *
550   * @todo remove for el.classList.contains() alone.
551   */
552  dBlazy.hasClass = function (el, name) {
553    if (el.classList) {
554      return el.classList.contains(name);
555    }
556    else {
557      return el.className.indexOf(name) !== -1;
558    }
559  };
560
561  /**
562   * A forgiving attribute wrapper with fallback.
563   *
564   * @name dBlazy.attr
565   *
566   * @param {Element} el
567   *   The HTML element.
568   * @param {String} attr
569   *   The attr name.
570   * @param {String} def
571   *   The default value.
572   *
573   * @return {String}
574   *   The attribute value, or fallback.
575   */
576  dBlazy.attr = function (el, attr, def) {
577    def = def || '';
578    return el !== null && el.hasAttribute(attr) ? el.getAttribute(attr) : def;
579  };
580
581  /**
582   * A simple attributes wrapper.
583   *
584   * @name dBlazy.setAttr
585   *
586   * @param {Element} el
587   *   The HTML element.
588   * @param {String} attr
589   *   The attr name.
590   * @param {Boolean} remove
591   *   True if should remove.
592   */
593  dBlazy.setAttr = function (el, attr, remove) {
594    if (el && el.hasAttribute('data-' + attr)) {
595      var dataAttr = el.getAttribute('data-' + attr);
596      if (attr === 'src') {
597        el.src = dataAttr;
598      }
599      else {
600        el.setAttribute(attr, dataAttr);
601      }
602
603      if (remove) {
604        el.removeAttribute('data-' + attr);
605      }
606    }
607  };
608
609  /**
610   * A simple attributes wrapper looping based on the given attributes.
611   *
612   * @name dBlazy.setAttrs
613   *
614   * @param {Element} el
615   *   The HTML element.
616   * @param {Array} attrs
617   *   The attr names.
618   * @param {Boolean} remove
619   *   True if should remove.
620   */
621  dBlazy.setAttrs = function (el, attrs, remove) {
622    var me = this;
623
624    me.forEach(attrs, function (src) {
625      me.setAttr(el, src, remove);
626    });
627  };
628
629  /**
630   * A simple attributes wrapper, looping based on sources (picture/ video).
631   *
632   * @name dBlazy.setAttrsWithSources
633   *
634   * @param {Element} el
635   *   The starting HTML element.
636   * @param {String} attr
637   *   The attr name, can be SRC or SRCSET.
638   * @param {Boolean} remove
639   *   True if should remove.
640   */
641  dBlazy.setAttrsWithSources = function (el, attr, remove) {
642    var me = this;
643    var parent = el.parentNode || null;
644    var isPicture = parent && me.equal(parent, 'picture');
645    var targets = isPicture ? parent.getElementsByTagName('source') : el.getElementsByTagName('source');
646
647    attr = attr || (isPicture ? 'srcset' : 'src');
648
649    if (targets.length) {
650      me.forEach(targets, function (source) {
651        me.setAttr(source, attr, remove);
652      });
653    }
654  };
655
656  /**
657   * Checks if image is decoded/ completely loaded.
658   *
659   * @name dBlazy.isDecoded
660   *
661   * @param {Image} img
662   *   The Image object.
663   *
664   * @return {bool}
665   *   True if the image is loaded.
666   */
667  dBlazy.isDecoded = function (img) {
668    if ('decoded' in img) {
669      return img.decoded;
670    }
671
672    return img.complete;
673  };
674
675  /**
676   * Decodes the image.
677   *
678   * @name dBlazy.decode
679   *
680   * @param {Image} img
681   *   The Image object.
682   *
683   * @return {Promise}
684   *   The Promise object.
685   */
686  dBlazy.decode = function (img) {
687    var me = this;
688
689    if (me.isDecoded(img)) {
690      return Promise.resolve(img);
691    }
692
693    if ('decode' in img) {
694      return img.decode();
695    }
696
697    return new Promise(function (resolve, reject) {
698      img.onload = function () {
699        resolve(img);
700      };
701      img.onerror = reject();
702    });
703  };
704
705  /**
706   * Updates CSS background with multi-breakpoint images.
707   *
708   * @name dBlazy.updateBg
709   *
710   * @param {Element} el
711   *   The container HTML element.
712   * @param {Boolean} mobileFirst
713   *   Whether to use min-width or max-width.
714   */
715  dBlazy.updateBg = function (el, mobileFirst) {
716    var me = this;
717    var backgrounds = me.parse(el.getAttribute('data-backgrounds'));
718
719    if (backgrounds) {
720      var bg = me.activeWidth(backgrounds, mobileFirst);
721      if (bg && bg !== 'undefined') {
722        el.style.backgroundImage = 'url("' + bg.src + '")';
723
724        // Allows to disable Aspect ratio if it has known/ fixed heights such as
725        // gridstack multi-size boxes.
726        if (bg.ratio && !el.classList.contains('b-noratio')) {
727          el.style.paddingBottom = bg.ratio + '%';
728        }
729      }
730    }
731  };
732
733  /**
734   * A simple removeAttribute wrapper.
735   *
736   * @name dBlazy.removeAttrs
737   *
738   * @param {Element} el
739   *   The HTML element.
740   * @param {Array} attrs
741   *   The attr names.
742   */
743  dBlazy.removeAttrs = function (el, attrs) {
744    this.forEach(attrs, function (attr) {
745      el.removeAttribute('data-' + attr);
746    });
747  };
748
749  /**
750   * A simple wrapper for [add|remove]EventListener.
751   *
752   * Made public from original bLazy library.
753   *
754   * @name dBlazy.binding
755   *
756   * @param {String} which
757   *   Whether bind or unbind.
758   * @param {Element} el
759   *   The HTML element.
760   * @param {String} eventName
761   *   The event name to add.
762   * @param {Function} fn
763   *   The callback function.
764   * @param {Object|Boolean} params
765   *   The optional param passed into a custom event.
766   *
767   * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
768   * @todo remove old IE references after another check.
769   */
770  dBlazy.binding = function (which, el, eventName, fn, params) {
771    if (el && typeof fn === 'function') {
772      var defaults = {capture: false, passive: true};
773      var extras;
774      if (typeof params === 'boolean') {
775        extras = params;
776      }
777      else {
778        extras = params ? this.extend(defaults, params) : defaults;
779      }
780      var bind = function (e) {
781        if (el.attachEvent) {
782          el[(which === 'bind' ? 'attach' : 'detach') + 'Event']('on' + e, fn, extras);
783        }
784        else {
785          el[(which === 'bind' ? 'add' : 'remove') + 'EventListener'](e, fn, extras);
786        }
787      };
788
789      if (eventName.indexOf(' ') > 0) {
790        this.forEach(eventName.split(' '), bind);
791      }
792      else {
793        bind(eventName);
794      }
795    }
796  };
797
798  /**
799   * A simple wrapper for event delegation like jQuery.on().
800   *
801   * Inspired by http://stackoverflow.com/questions/30880757/
802   * javascript-equivalent-to-on.
803   *
804   * @name dBlazy.onoff
805   *
806   * @param {String} which
807   *   Whether on or off.
808   * @param {Element} elm
809   *   The parent HTML element.
810   * @param {String} eventName
811   *   The event name to trigger.
812   * @param {String} childEl
813   *   Child selector to match against (class, ID, data attribute, or tag).
814   * @param {Function} callback
815   *   The callback function.
816   * @param {Object|Boolean} params
817   *   The optional param passed into a custom event.
818   *
819   * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
820   */
821  dBlazy.onoff = function (which, elm, eventName, childEl, callback, params) {
822    params = params || {capture: true, passive: false};
823    var bind = function (e) {
824      var t = e.target;
825      e.delegateTarget = elm;
826      while (t && t !== this) {
827        if (dBlazy.matches(t, childEl)) {
828          callback.call(t, e);
829        }
830        t = t.parentNode;
831      }
832    };
833
834    this.binding(which === 'on' ? 'bind' : 'unbind', elm, eventName, bind, params);
835  };
836
837  /**
838   * A simple wrapper for event delegation like jQuery.on().
839   *
840   * @name dBlazy.on
841   *
842   * @param {Element} elm
843   *   The parent HTML element.
844   * @param {String} eventName
845   *   The event name to trigger.
846   * @param {String} childEl
847   *   Child selector to match against (class, ID, data attribute, or tag).
848   * @param {Function} callback
849   *   The callback function.
850   * @param {Object|Boolean} params
851   *   The optional param passed into a custom event.
852   */
853  dBlazy.on = function (elm, eventName, childEl, callback, params) {
854    this.onoff('on', elm, eventName, childEl, callback, params);
855  };
856
857  /**
858   * A simple wrapper for event detachment.
859   *
860   * @name dBlazy.off
861   *
862   * @param {Element} elm
863   *   The parent HTML element.
864   * @param {String} eventName
865   *   The event name to trigger.
866   * @param {String} childEl
867   *   Child selector to match against (class, ID, data attribute, or tag).
868   * @param {Function} callback
869   *   The callback function.
870   * @param {Object|Boolean} params
871   *   The optional param passed into a custom event.
872   */
873  dBlazy.off = function (elm, eventName, childEl, callback, params) {
874    this.onoff('off', elm, eventName, childEl, callback, params);
875  };
876
877  /**
878   * A simple wrapper for addEventListener.
879   *
880   * @name dBlazy.bindEvent
881   *
882   * @param {Element} el
883   *   The HTML element.
884   * @param {String} eventName
885   *   The event name to remove.
886   * @param {Function} fn
887   *   The callback function.
888   * @param {Object|Boolean} params
889   *   The optional param passed into a custom event.
890   */
891  dBlazy.bindEvent = function (el, eventName, fn, params) {
892    this.binding('bind', el, eventName, fn, params);
893  };
894
895  /**
896   * A simple wrapper for removeEventListener.
897   *
898   * @name dBlazy.unbindEvent
899   *
900   * @param {Element} el
901   *   The HTML element.
902   * @param {String} eventName
903   *   The event name to remove.
904   * @param {Function} fn
905   *   The callback function.
906   * @param {Object} params
907   *   The optional param passed into a custom event.
908   */
909  dBlazy.unbindEvent = function (el, eventName, fn, params) {
910    this.binding('unbind', el, eventName, fn, params);
911  };
912
913  /**
914   * Executes a function once.
915   *
916   * @name dBlazy.once
917   *
918   * @author Daniel Lamb <[email protected]>
919   * @link https://github.com/daniellmb/once.js
920   *
921   * @param {Function} fn
922   *   The executed function.
923   *
924   * @return {Object}
925   *   The function result.
926   */
927  dBlazy.once = function (fn) {
928    var result;
929    var ran = false;
930    return function proxy() {
931      if (ran) {
932        return result;
933      }
934      ran = true;
935      result = fn.apply(this, arguments);
936      // For garbage collection.
937      fn = null;
938      return result;
939    };
940  };
941
942  /**
943   * A simple wrapper for JSON.parse() for string within data-* attributes.
944   *
945   * @name dBlazy.parse
946   *
947   * @param {String} str
948   *   The string to convert into JSON object.
949   *
950   * @return {Object|Boolean}
951   *   The JSON object, or false in case invalid.
952   */
953  dBlazy.parse = function (str) {
954    try {
955      return JSON.parse(str);
956    }
957    catch (e) {
958      return false;
959    }
960  };
961
962  /**
963   * A simple wrapper to animate anything using animate.css.
964   *
965   * @name dBlazy.animate
966   *
967   * @param {Element} el
968   *   The animated HTML element.
969   * @param {String} animation
970   *   Any custom animation name, fallbacks to [data-animation].
971   */
972  dBlazy.animate = function (el, animation) {
973    var me = this;
974    var props = [
975      'animation',
976      'animation-duration',
977      'animation-delay',
978      'animation-iteration-count'
979    ];
980
981    animation = animation || el.dataset.animation;
982    el.classList.add('animated', animation);
983    me.forEach(['Duration', 'Delay', 'IterationCount'], function (key) {
984      if ('animation' + key in el.dataset) {
985        el.style['animation' + key] = el.dataset['animation' + key];
986      }
987    });
988
989    // Supports both BG and regular image.
990    var cn = me.closest(el, '.media');
991    cn = cn === null ? el : cn;
992    var blur = cn.querySelector('.b-blur--tmp');
993
994    function animationEnd() {
995      me.removeAttrs(el, props);
996
997      el.classList.add('is-b-animated');
998      el.classList.remove('animated', animation);
999
1000      me.forEach(props, function (key) {
1001        el.style.removeProperty(key);
1002      });
1003
1004      if (blur !== null && blur.parentNode !== null) {
1005        blur.parentNode.removeChild(blur);
1006      }
1007
1008      me.unbindEvent(el, 'animationend', animationEnd);
1009    }
1010
1011    me.bindEvent(el, 'animationend', animationEnd);
1012  };
1013
1014  /**
1015   * Removes common loading indicator classes.
1016   *
1017   * @name dBlazy.clearLoading
1018   *
1019   * @param {Element} el
1020   *   The loading HTML element.
1021   */
1022  dBlazy.clearLoading = function (el) {
1023    var me = this;
1024    // The .b-lazy element can be attached to IMG, or DIV as CSS background.
1025    // The .(*)loading can be .media, .grid, .slide__content, .box, etc.
1026    var loaders = [el, me.closest(el, '[class*="loading"]')];
1027
1028    this.forEach(loaders, function (loader) {
1029      if (loader !== null) {
1030        loader.className = loader.className.replace(/(\S+)loading/g, '');
1031      }
1032    });
1033  };
1034
1035  /**
1036   * A simple wrapper to delay callback function, taken out of blazy library.
1037   *
1038   * Alternative to core Drupal.debounce for D7 compatibility, and easy port.
1039   *
1040   * @name dBlazy.throttle
1041   *
1042   * @param {Function} fn
1043   *   The callback function.
1044   * @param {Int} minDelay
1045   *   The execution delay in milliseconds.
1046   * @param {Object} scope
1047   *   The scope of the function to apply to, normally this.
1048   *
1049   * @return {Function}
1050   *   The function executed at the specified minDelay.
1051   */
1052  dBlazy.throttle = function (fn, minDelay, scope) {
1053    var lastCall = 0;
1054    return function () {
1055      var now = +new Date();
1056      if (now - lastCall < minDelay) {
1057        return;
1058      }
1059      lastCall = now;
1060      fn.apply(scope, arguments);
1061    };
1062  };
1063
1064  /**
1065   * A simple wrapper to delay callback function on window resize.
1066   *
1067   * @name dBlazy.resize
1068   *
1069   * @link https://github.com/louisremi/jquery-smartresize
1070   *
1071   * @param {Function} c
1072   *   The callback function.
1073   * @param {Int} t
1074   *   The timeout.
1075   *
1076   * @return {Function}
1077   *   The callback function.
1078   */
1079  dBlazy.resize = function (c, t) {
1080    window.onresize = function () {
1081      window.clearTimeout(t);
1082      t = window.setTimeout(c, 200);
1083    };
1084    return c;
1085  };
1086
1087  /**
1088   * A simple wrapper for triggering event like jQuery.trigger().
1089   *
1090   * @name dBlazy.trigger
1091   *
1092   * @param {Element} elm
1093   *   The HTML element.
1094   * @param {String} eventName
1095   *   The event name to trigger.
1096   * @param {Object} custom
1097   *   The optional object passed into a custom event.
1098   * @param {Object} param
1099   *   The optional param passed into a custom event.
1100   *
1101   * @see https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events
1102   * @todo: See if any consistent way for both custom and native events.
1103   */
1104  dBlazy.trigger = function (elm, eventName, custom, param) {
1105    var event;
1106    var data = {
1107      detail: custom || {}
1108    };
1109
1110    if (typeof param === 'undefined') {
1111      data.bubbles = true;
1112      data.cancelable = true;
1113    }
1114
1115    // Native.
1116    // IE >= 9 compat, else SCRIPT445: Object doesn't support this action.
1117    // https://msdn.microsoft.com/library/ff975299(v=vs.85).aspx
1118    if (typeof window.CustomEvent === 'function') {
1119      event = new CustomEvent(eventName, data);
1120    }
1121    else {
1122      event = document.createEvent('CustomEvent');
1123      event.initCustomEvent(eventName, true, true, data);
1124    }
1125
1126    elm.dispatchEvent(event);
1127  };
1128
1129  return dBlazy;
1130
1131});
1132;
1133/**
1134 * @file
1135 * Provides native, Intersection Observer API, or bLazy lazy loader.
1136 *
1137 * @todo Decouple Native, Aspect ratio, Picture post 2.3+, or 3+.
1138 */
1139
1140(function (Drupal, drupalSettings, _db, window, document) {
1141
1142  'use strict';
1143
1144  var _dataAnimation = 'data-animation';
1145  var _dataDimensions = 'data-dimensions';
1146  var _dataBg = 'data-backgrounds';
1147  var _dataRatio = 'data-ratio';
1148  var _isNativeExecuted = false;
1149  var _resizeTick = 0;
1150
1151  /**
1152   * Blazy public methods.
1153   *
1154   * @namespace
1155   */
1156  Drupal.blazy = Drupal.blazy || {
1157    context: null,
1158    init: null,
1159    instances: [],
1160    items: [],
1161    windowWidth: 0,
1162    blazySettings: drupalSettings.blazy || {},
1163    ioSettings: drupalSettings.blazyIo || {},
1164    revalidate: false,
1165    options: {},
1166    globals: function () {
1167      var me = this;
1168      var commons = {
1169        success: me.clearing.bind(me),
1170        error: me.clearing.bind(me),
1171        selector: '.b-lazy',
1172        errorClass: 'b-error',
1173        successClass: 'b-loaded'
1174      };
1175
1176      return _db.extend(me.blazySettings, me.ioSettings, commons);
1177    },
1178
1179    clearing: function (el) {
1180      var me = this;
1181      var cn = _db.closest(el, '.media');
1182      var an = _db.closest(el, '[' + _dataAnimation + ']');
1183
1184      // Clear loading classes.
1185      _db.clearLoading(el);
1186
1187      // Reevaluate the element.
1188      me.reevaluate(el);
1189
1190      // Container might be the el itself for BG, do not NULL check here.
1191      me.updateContainer(el, cn);
1192
1193      // Supports blur, animate.css for CSS background, picture, image, media.
1194      if (an !== null || me.has(el, _dataAnimation)) {
1195        _db.animate(an !== null ? an : el);
1196      }
1197
1198      // Provides event listeners for easy overrides without full overrides.
1199      // Runs before native to allow native use this on its own onload event.
1200      _db.trigger(el, 'blazy.done', {options: me.options});
1201
1202      // Initializes the native lazy loading once the first found is loaded.
1203      if (!_isNativeExecuted) {
1204        _db.trigger(me.context, 'blazy.native', {options: me.options});
1205
1206        _isNativeExecuted = true;
1207      }
1208    },
1209
1210    isLoaded: function (el) {
1211      return el !== null && el.classList.contains(this.options.successClass);
1212    },
1213
1214    reevaluate: function (el) {
1215      var me = this;
1216      var ie = el.classList.contains('b-responsive') && el.hasAttribute('data-pfsrc');
1217
1218      // In case an error, try forcing it, once.
1219      if (me.init !== null && _db.hasClass(el, me.options.errorClass) && !_db.hasClass(el, 'b-checked')) {
1220        el.classList.add('b-checked');
1221
1222        // This is a rare case, hardly called, just nice to have for errors.
1223        window.setTimeout(function () {
1224          if (me.has(el, _dataBg)) {
1225            _db.updateBg(el, me.options.mobileFirst);
1226          }
1227          else {
1228            me.init.load(el);
1229          }
1230        }, 100);
1231      }
1232
1233      // @see http://scottjehl.github.io/picturefill/
1234      if (window.picturefill && ie) {
1235        window.picturefill({
1236          reevaluate: true,
1237          elements: [el]
1238        });
1239      }
1240    },
1241
1242    has: function (el, attribute) {
1243      return el !== null && el.hasAttribute(attribute);
1244    },
1245
1246    contains: function (el, name) {
1247      return el !== null && el.classList.contains(name);
1248    },
1249
1250    updateContainer: function (el, cn) {
1251      var me = this;
1252      var isPicture = _db.equal(el.parentNode, 'picture') && me.has(cn, _dataDimensions);
1253
1254      // Fixed for effect Blur messes up Aspect ratio Fluid calculation.
1255      window.setTimeout(function () {
1256        if (me.isLoaded(el)) {
1257          // Adds context for effetcs: blur, etc. considering BG, or just media.
1258          (me.contains(cn, 'media') ? cn : el).classList.add('is-b-loaded');
1259
1260          // Only applies to ratio fluid.
1261          if (isPicture) {
1262            me.updatePicture(el, cn);
1263          }
1264
1265          // Basically makes multi-breakpoint BG work for IO or old bLazy once.
1266          if (me.has(el, _dataBg)) {
1267            _db.updateBg(el, me.options.mobileFirst);
1268          }
1269        }
1270      });
1271    },
1272
1273    updatePicture: function (el, cn) {
1274      var me = this;
1275      var pad = Math.round(((el.naturalHeight / el.naturalWidth) * 100), 2);
1276
1277      cn.style.paddingBottom = pad + '%';
1278
1279      // Swap all aspect ratio once to reduce abrupt ratio changes for the rest.
1280      if (me.instances.length > 0) {
1281        var picture = function (elm) {
1282          if (!('blazyInstance' in elm) && !('blazyUniform' in elm)) {
1283            return;
1284          }
1285
1286          if ((elm.blazyInstance === cn.blazyInstance) && (_resizeTick > 1 || !('isBlazyPicture' in elm))) {
1287            _db.trigger(elm, 'blazy.uniform.' + elm.blazyInstance, {pad: pad});
1288            elm.isBlazyPicture = true;
1289          }
1290        };
1291
1292        // Uniform sizes must apply to each instance, not globally.
1293        _db.forEach(me.instances, function (elm) {
1294          Drupal.debounce(picture(elm), 201, true);
1295        }, me.context);
1296      }
1297    },
1298
1299    /**
1300     * Attempts to fix for Views rewrite stripping out data URI causing 404.
1301     *
1302     * E.g.: src="image/jpg;base64 should be src="data:image/jpg;base64.
1303     * The "Placeholder" 1px.gif via Blazy UI costs extra HTTP requests. This is
1304     * a less costly solution, but not bulletproof due to being client-side
1305     * which means too late to the party. Yet not bad for 404s below the fold.
1306     * This must be run before any lazy (native, bLazy or IO) kicks in.
1307     *
1308     * @todo Remove if a permanent non-client available other than Placeholder.
1309     */
1310    fixMissingDataUri: function () {
1311      var me = this;
1312      var doc = me.context;
1313      var sel = me.options.selector + '[src^="image"]:not(.' + me.options.successClass + ')';
1314      var els = doc.querySelector(sel) === null ? [] : doc.querySelectorAll(sel);
1315
1316      var fixDataUri = function (img) {
1317        var src = img.getAttribute('src');
1318        if (src.indexOf('base64') !== -1 || src.indexOf('svg+xml') !== -1) {
1319          img.setAttribute('src', src.replace('image', 'data:image'));
1320        }
1321      };
1322
1323      if (els.length > 0) {
1324        _db.forEach(els, fixDataUri);
1325      }
1326    },
1327
1328    /**
1329     * Updates the dynamic multi-breakpoint aspect ratio: bg, picture or image.
1330     *
1331     * This only applies to Responsive images with aspect ratio fluid.
1332     * Static ratio (media--ratio--169, etc.) is ignored and uses CSS instead.
1333     *
1334     * @param {HTMLElement} cn
1335     *   The .media--ratio--fluid container HTML element.
1336     */
1337    updateRatio: function (cn) {
1338      var me = this;
1339      var el = _db.closest(cn, '.blazy');
1340      var dimensions = _db.parse(cn.getAttribute(_dataDimensions));
1341
1342      if (!dimensions) {
1343        me.updateFallbackRatio(cn);
1344        return;
1345      }
1346
1347      // For picture, this is more a dummy space till the image is downloaded.
1348      var isPicture = cn.querySelector('picture') !== null && _resizeTick > 0;
1349      var pad = _db.activeWidth(dimensions, isPicture);
1350
1351      // Provides marker for grouping between multiple instances.
1352      cn.blazyInstance = el !== null && 'blazyInstance' in el ? el.blazyInstance : null;
1353      if (pad !== 'undefined') {
1354        cn.style.paddingBottom = pad + '%';
1355      }
1356
1357      // Fix for picture or bg element with resizing.
1358      if (_resizeTick > 0 && (isPicture || me.has(cn, _dataBg))) {
1359        me.updateContainer((isPicture ? cn.querySelector('img') : cn), cn);
1360      }
1361    },
1362
1363    updateFallbackRatio: function (cn) {
1364      // Only rewrites if the style is indeed stripped out by Twig, and not set.
1365      if (!cn.hasAttribute('style') && cn.hasAttribute(_dataRatio)) {
1366        cn.style.paddingBottom = cn.getAttribute(_dataRatio) + '%';
1367      }
1368    },
1369
1370    /**
1371     * Swap lazy attributes to let supportive browsers lazy load them.
1372     *
1373     * This means Blazy and even IO should not lazy-load them any more.
1374     * Ensures to not touch lazy-loaded AJAX, or likely non-supported elements:
1375     * Video, DIV, etc. Only IMG and IFRAME are supported for now.
1376     * Due to native init is deferred, the first row is still using IO/ bLazy.
1377     */
1378    doNativeLazy: function () {
1379      var me = this;
1380
1381      if (!me.isNativeLazy()) {
1382        return;
1383      }
1384
1385      var doc = me.context;
1386      var sel = me.options.selector + '[loading]:not(.' + me.options.successClass + ')';
1387
1388      me.items = doc.querySelector(sel) === null ? [] : doc.querySelectorAll(sel);
1389      if (me.items.length === 0) {
1390        return;
1391      }
1392
1393      var onNativeEvent = function (e) {
1394        var el = e.target;
1395        var er = e.type === 'error';
1396
1397        // Refines based on actual result, runs clearing, animation, etc.
1398        el.classList.add(me.options[er ? 'errorClass' : 'successClass']);
1399        me.clearing(el);
1400
1401        _db.unbindEvent(el, e.type, onNativeEvent);
1402      };
1403
1404      var doNative = function (el) {
1405        // Reset attributes, and let supportive browsers lazy load natively.
1406        _db.setAttrs(el, ['srcset', 'src'], true);
1407
1408        // Also supports PICTURE or (future) VIDEO which contains SOURCEs.
1409        _db.setAttrsWithSources(el, false, true);
1410
1411        // Blur thumbnail is just making use of the swap due to being small.
1412        if (me.contains(el, 'b-blur')) {
1413          el.removeAttribute('loading');
1414        }
1415        else {
1416          // Mark it loaded to prevent bLazy/ IO to do any further work.
1417          el.classList.add(me.options.successClass);
1418
1419          // Attempts to make nice with the harsh native, defer clearing, etc.
1420          _db.bindEvent(el, 'load', onNativeEvent);
1421          _db.bindEvent(el, 'error', onNativeEvent);
1422        }
1423      };
1424
1425      var onNative = function () {
1426        _db.forEach(me.items, doNative);
1427      };
1428
1429      _db.bindEvent(me.context, 'blazy.native', onNative, {once: true});
1430    },
1431
1432    isNativeLazy: function () {
1433      return 'loading' in HTMLImageElement.prototype;
1434    },
1435
1436    isIo: function () {
1437      return this.ioSettings && this.ioSettings.enabled && 'IntersectionObserver' in window;
1438    },
1439
1440    isRo: function () {
1441      return 'ResizeObserver' in window;
1442    },
1443
1444    isBlazy: function () {
1445      return !this.isIo() && 'Blazy' in window;
1446    },
1447
1448    forEach: function (context) {
1449      var blazies = context.querySelectorAll('.blazy:not(.blazy--on)');
1450
1451      // Various use cases: w/o formaters, custom, or basic, and mixed.
1452      // The [data-blazy] is set by the module for formatters, or Views gallery.
1453      if (blazies.length > 0) {
1454        _db.forEach(blazies, doBlazy, context);
1455      }
1456
1457      // Initializes blazy, we'll decouple features from lazy load scripts.
1458      // We'll revert to 2.1 if any issue with this.
1459      initBlazy(context);
1460    },
1461
1462    run: function (opts) {
1463      return this.isIo() ? new BioMedia(opts) : new Blazy(opts);
1464    },
1465
1466    afterInit: function () {
1467      var me = this;
1468      var doc = me.context;
1469      var rObserver = false;
1470      var ratioItems = doc.querySelector('.media--ratio') === null ? [] : doc.querySelectorAll('.media--ratio');
1471      var shouldLoop = ratioItems.length > 0;
1472
1473      var loopRatio = function (entries) {
1474        me.windowWidth = _db.windowWidth();
1475
1476        // BC with bLazy, native/IO doesn't need to revalidate, bLazy does.
1477        // Scenarios: long horizontal containers, Slick carousel slidesToShow >
1478        // 3. If any issue, add a class `blazy--revalidate` manually to .blazy.
1479        if (!me.isNativeLazy() && (me.isBlazy() || me.revalidate)) {
1480          me.init.revalidate(true);
1481        }
1482
1483        if (shouldLoop) {
1484          _db.forEach(entries, function (entry) {
1485            me.updateRatio('target' in entry ? entry.target : entry);
1486          }, doc);
1487        }
1488
1489        _resizeTick++;
1490        return false;
1491      };
1492
1493      var checkRatio = function () {
1494        return me.isRo() ? new ResizeObserver(loopRatio) : loopRatio(ratioItems);
1495      };
1496
1497      // Checks for aspect ratio, onload event is a bit later.
1498      // Uses ResizeObserver for modern browsers, else degrades.
1499      rObserver = checkRatio();
1500      if (rObserver) {
1501        if (shouldLoop) {
1502          _db.forEach(ratioItems, function (entry) {
1503            rObserver.observe(entry);
1504          }, doc);
1505        }
1506      }
1507      else {
1508        _db.bindEvent(window, 'resize', Drupal.debounce(checkRatio, 200, true));
1509      }
1510    }
1511  };
1512
1513  /**
1514   * Initialize the blazy instance, either basic, advanced, or native.
1515   *
1516   * @param {HTMLElement} context
1517   *   This can be document, or anything weird.
1518   */
1519  var initBlazy = function (context) {
1520    var me = Drupal.blazy;
1521    var documentElement = context instanceof HTMLDocument ? context : _db.closest(context, 'html');
1522    var opts = {};
1523
1524    opts.mobileFirst = opts.mobileFirst || false;
1525
1526    // Weirdo: documentElement is null after colorbox cbox_close event.
1527    documentElement = documentElement || document;
1528
1529    // Set docroot in case we are in an iframe.
1530    if (!document.documentElement.isSameNode(documentElement)) {
1531      opts.root = documentElement;
1532    }
1533
1534    me.options = _db.extend({}, me.globals(), opts);
1535    me.context = documentElement;
1536
1537    // Old bLazy, not IO, might need scrolling CSS selector like Modal library.
1538    // A scrolling modal with an iframe like Entity Browser has no issue since
1539    // the scrolling container is the entire DOM. Another use case is parallax.
1540    var scrollElms = '#drupal-modal, .is-b-scroll';
1541    if (me.options.container) {
1542      scrollElms += ', ' + me.options.container.trim();
1543    }
1544    me.options.container = scrollElms;
1545
1546    // Attempts to fix for Views rewrite stripping out data URI causing 404.
1547    me.fixMissingDataUri();
1548
1549    // Swap lazy attributes to let supportive browsers lazy load them.
1550    me.doNativeLazy();
1551
1552    // Put the blazy/IO instance into a public object for references/ overrides.
1553    // If native lazy load is supported, the following will skip internally.
1554    me.init = me.run(me.options);
1555
1556    // Runs after init.
1557    me.afterInit();
1558  };
1559
1560  /**
1561   * Blazy utility functions.
1562   *
1563   * @param {HTMLElement} elm
1564   *   The .blazy/[data-blazy] container, not the lazyloaded .b-lazy element.
1565   *
1566   * @todo reenable initBlazy here if any issue with the following:
1567   *   Each [data-blazy] may or may not:
1568   *     - be ajaxified, be lightboxed, have uniform or different sizes, and
1569   *       have few more unique features per instance, etc.
1570   */
1571  function doBlazy(elm) {
1572    var me = Drupal.blazy;
1573    var dataAttr = elm.getAttribute('data-blazy');
1574    var opts = (!dataAttr || dataAttr === '1') ? {} : (_db.parse(dataAttr) || {});
1575    var isUniform = me.contains(elm, 'blazy--field') || me.contains(elm, 'block-grid') || me.contains(elm, 'blazy--uniform');
1576    var instance = (Math.random() * 10000).toFixed(0);
1577    var eventId = 'blazy.uniform.' + instance;
1578    var localItems = elm.querySelector('.media--ratio') === null ? [] : elm.querySelectorAll('.media--ratio');
1579
1580    me.options = _db.extend(me.options, opts);
1581    me.revalidate = me.revalidate || elm.classList.contains('blazy--revalidate');
1582    elm.classList.add('blazy--on');
1583    elm.blazyInstance = instance;
1584
1585    if (isUniform) {
1586      elm.blazyUniform = true;
1587    }
1588
1589    me.instances.push(elm);
1590
1591    var swapRatio = function (e) {
1592      var pad = e.detail.pad || 0;
1593
1594      if (pad > 10) {
1595        _db.forEach(localItems, function (cn) {
1596          cn.style.paddingBottom = pad + '%';
1597        }, elm);
1598      }
1599    };
1600
1601    // Reduces abrupt ratio changes for the rest after the first loaded.
1602    // To support resizing, use debounce. To disable use {once: true}.
1603    if (isUniform && localItems.length > 0) {
1604      _db.bindEvent(elm, eventId, swapRatio);
1605    }
1606  }
1607
1608  /**
1609   * Attaches blazy behavior to HTML element identified by .blazy/[data-blazy].
1610   *
1611   * The .blazy/[data-blazy] is the .b-lazy container, might be .field, etc.
1612   * The .b-lazy is the individual IMG, IFRAME, PICTURE, VIDEO, DIV, BODY, etc.
1613   * The lazy-loaded element is .b-lazy, not its container. Note the hypen (b-)!
1614   *
1615   * @type {Drupal~behavior}
1616   */
1617  Drupal.behaviors.blazy = {
1618    attach: function (context) {
1619      // Drupal.attachBehaviors already does this so if this is necessary,
1620      // someone does an invalid call. But let's be robust here.
1621      // Note: context can be unexpected <script> element with Media library.
1622      context = context || document;
1623
1624      // Originally identified at D7, yet might happen at D8 with AJAX.
1625      // Prevents jQuery AJAX messes up where context might be an array.
1626      if ('length' in context) {
1627        context = context[0];
1628      }
1629
1630      // Runs Blazy with multi-serving images, and aspect ratio supports.
1631      // W/o [data-blazy] to address various scenarios like custom simple works,
1632      // or within Views UI which is not easy to set [data-blazy] via UI.
1633      _db.once(Drupal.blazy.forEach(context));
1634    }
1635  };
1636
1637}(Drupal, drupalSettings, dBlazy, this, this.document));
1638;
1639(function ($) {
1640  Drupal.behaviors.backtotop = {
1641    attach: function (context, settings) {
1642      var exist = $('#backtotop').length;
1643      if (exist == 0) {
1644        $("body", context).once('backtotop').each(function () {
1645          $('body').append("<button id='backtotop'>" + settings.back_to_top.back_to_top_button_text + "</button>");
1646        });
1647      }
1648
1649      backToTop();
1650      $(window).scroll(function () {
1651        backToTop();
1652      });
1653
1654      $('#backtotop', context).once('backtotop').each(function () {
1655        $(this).click(function () {
1656          $("html, body").bind("scroll mousedown DOMMouseScroll mousewheel keyup", function () {
1657            $('html, body').stop();
1658          });
1659          $('html,body').animate({scrollTop: 0}, 1200, 'easeOutQuart', function () {
1660            $("html, body").unbind("scroll mousedown DOMMouseScroll mousewheel keyup");
1661          });
1662          return false;
1663        });
1664      });
1665
1666      /**
1667       * Hide show back to top links.
1668       */
1669      function backToTop() {
1670        if ($(window).scrollTop() > settings.back_to_top.back_to_top_button_trigger) {
1671          $('#backtotop').fadeIn();
1672        } else {
1673          $('#backtotop').fadeOut();
1674        }
1675      }
1676    }
1677  };
1678})(jQuery);
1679;
1680/**
1681 * @file
1682 * Attaches several event listener to a web page.
1683 */
1684
1685(function ($, Drupal, drupalSettings) {
1686
1687  /* eslint max-nested-callbacks: ["error", 4] */
1688
1689  'use strict';
1690
1691  Drupal.google_analytics = {};
1692
1693  $(document).ready(function () {
1694
1695    // Attach mousedown, keyup, touchstart events to document only and catch
1696    // clicks on all elements.
1697    $(document.body).on('mousedown keyup touchstart', function (event) {
1698
1699      // Catch the closest surrounding link of a clicked element.
1700      $(event.target).closest('a,area').each(function () {
1701
1702        // Is the clicked URL internal?
1703        if (Drupal.google_analytics.isInternal(this.href)) {
1704          // Skip 'click' tracking, if custom tracking events are bound.
1705          if ($(this).is('.colorbox') && (drupalSettings.google_analytics.trackColorbox)) {
1706            // Do nothing here. The custom event will handle all tracking.
1707            // console.info('Click on .colorbox item has been detected.');
1708          }
1709          // Is download tracking activated and the file extension configured
1710          // for download tracking?
1711          else if (drupalSettings.google_analytics.trackDownload && Drupal.google_analytics.isDownload(this.href)) {
1712            // Download link clicked.
1713            gtag('event', Drupal.google_analytics.getDownloadExtension(this.href).toUpperCase(), {
1714              event_category: 'Downloads',
1715              event_label: Drupal.google_analytics.getPageUrl(this.href),
1716              transport_type: 'beacon'
1717            });
1718          }
1719          else if (Drupal.google_analytics.isInternalSpecial(this.href)) {
1720            // Keep the internal URL for Google Analytics website overlay intact.
1721            // @todo: May require tracking ID
1722            gtag('config', drupalSettings.google_analytics.account, {
1723              page_path: Drupal.google_analytics.getPageUrl(this.href),
1724              transport_type: 'beacon'
1725            });
1726          }
1727        }
1728        else {
1729          if (drupalSettings.google_analytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) {
1730            // Mailto link clicked.
1731            gtag('event', 'Click', {
1732              event_category: 'Mails',
1733              event_label: this.href.substring(7),
1734              transport_type: 'beacon'
1735            });
1736          }
1737          else if (drupalSettings.google_analytics.trackOutbound && this.href.match(/^\w+:\/\//i)) {
1738            if (drupalSettings.google_analytics.trackDomainMode !== 2 || (drupalSettings.google_analytics.trackDomainMode === 2 && !Drupal.google_analytics.isCrossDomain(this.hostname, drupalSettings.google_analytics.trackCrossDomains))) {
1739              // External link clicked / No top-level cross domain clicked.
1740              gtag('event', 'Click', {
1741                event_category: 'Outbound links',
1742                event_label: this.href,
1743                transport_type: 'beacon'
1744              });
1745            }
1746          }
1747        }
1748      });
1749    });
1750
1751    // Track hash changes as unique pageviews, if this option has been enabled.
1752    if (drupalSettings.google_analytics.trackUrlFragments) {
1753      window.onhashchange = function () {
1754        gtag('config', drupalSettings.google_analytics.account, {
1755          page_path: location.pathname + location.search + location.hash
1756        });
1757      };
1758    }
1759
1760    // Colorbox: This event triggers when the transition has completed and the
1761    // newly loaded content has been revealed.
1762    if (drupalSettings.google_analytics.trackColorbox) {
1763      $(document).on('cbox_complete', function () {
1764        var href = $.colorbox.element().attr('href');
1765        if (href) {
1766          gtag('config', drupalSettings.google_analytics.account, {
1767            page_path: Drupal.google_analytics.getPageUrl(href)
1768          });
1769        }
1770      });
1771    }
1772
1773  });
1774
1775  /**
1776   * Check whether the hostname is part of the cross domains or not.
1777   *
1778   * @param {string} hostname
1779   *   The hostname of the clicked URL.
1780   * @param {array} crossDomains
1781   *   All cross domain hostnames as JS array.
1782   *
1783   * @return {boolean} isCrossDomain
1784   */
1785  Drupal.google_analytics.isCrossDomain = function (hostname, crossDomains) {
1786    return $.inArray(hostname, crossDomains) > -1 ? true : false;
1787  };
1788
1789  /**
1790   * Check whether this is a download URL or not.
1791   *
1792   * @param {string} url
1793   *   The web url to check.
1794   *
1795   * @return {boolean} isDownload
1796   */
1797  Drupal.google_analytics.isDownload = function (url) {
1798    var isDownload = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i');
1799    return isDownload.test(url);
1800  };
1801
1802  /**
1803   * Check whether this is an absolute internal URL or not.
1804   *
1805   * @param {string} url
1806   *   The web url to check.
1807   *
1808   * @return {boolean} isInternal
1809   */
1810  Drupal.google_analytics.isInternal = function (url) {
1811    var isInternal = new RegExp('^(https?):\/\/' + window.location.host, 'i');
1812    return isInternal.test(url);
1813  };
1814
1815  /**
1816   * Check whether this is a special URL or not.
1817   *
1818   * URL types:
1819   *  - gotwo.module /go/* links.
1820   *
1821   * @param {string} url
1822   *   The web url to check.
1823   *
1824   * @return {boolean} isInternalSpecial
1825   */
1826  Drupal.google_analytics.isInternalSpecial = function (url) {
1827    var isInternalSpecial = new RegExp('(\/go\/.*)$', 'i');
1828    return isInternalSpecial.test(url);
1829  };
1830
1831  /**
1832   * Extract the relative internal URL from an absolute internal URL.
1833   *
1834   * Examples:
1835   * - https://mydomain.com/node/1 -> /node/1
1836   * - https://example.com/foo/bar -> https://example.com/foo/bar
1837   *
1838   * @param {string} url
1839   *   The web url to check.
1840   *
1841   * @return {string} getPageUrl
1842   *   Internal website URL.
1843   */
1844  Drupal.google_analytics.getPageUrl = function (url) {
1845    var extractInternalUrl = new RegExp('^(https?):\/\/' + window.location.host, 'i');
1846    return url.replace(extractInternalUrl, '');
1847  };
1848
1849  /**
1850   * Extract the download file extension from the URL.
1851   *
1852   * @param {string} url
1853   *   The web url to check.
1854   *
1855   * @return {string} getDownloadExtension
1856   *   The file extension of the passed url. e.g. 'zip', 'txt'
1857   */
1858  Drupal.google_analytics.getDownloadExtension = function (url) {
1859    var extractDownloadextension = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i');
1860    var extension = extractDownloadextension.exec(url);
1861    return (extension === null) ? '' : extension[1];
1862  };
1863
1864})(jQuery, Drupal, drupalSettings);
1865;
1866/**
1867 * @file
1868 * Drupal Bootstrap object.
1869 */
1870
1871/**
1872 * All Drupal Bootstrap JavaScript APIs are contained in this namespace.
1873 *
1874 * @param {underscore} _
1875 * @param {jQuery} $
1876 * @param {Drupal} Drupal
1877 * @param {drupalSettings} drupalSettings
1878 */
1879(function (_, $, Drupal, drupalSettings) {
1880  'use strict';
1881
1882  /**
1883   * @typedef Drupal.bootstrap
1884   */
1885  var Bootstrap = {
1886    processedOnce: {},
1887    settings: drupalSettings.bootstrap || {}
1888  };
1889
1890  /**
1891   * Wraps Drupal.checkPlain() to ensure value passed isn't empty.
1892   *
1893   * Encodes special characters in a plain-text string for display as HTML.
1894   *
1895   * @param {string} str
1896   *   The string to be encoded.
1897   *
1898   * @return {string}
1899   *   The encoded string.
1900   *
1901   * @ingroup sanitization
1902   */
1903  Bootstrap.checkPlain = function (str) {
1904    return str && Drupal.checkPlain(str) || '';
1905  };
1906
1907  /**
1908   * Creates a jQuery plugin.
1909   *
1910   * @param {String} id
1911   *   A jQuery plugin identifier located in $.fn.
1912   * @param {Function} plugin
1913   *   A constructor function used to initialize the for the jQuery plugin.
1914   * @param {Boolean} [noConflict]
1915   *   Flag indicating whether or not to create a ".noConflict()" helper method
1916   *   for the plugin.
1917   */
1918  Bootstrap.createPlugin = function (id, plugin, noConflict) {
1919    // Immediately return if plugin doesn't exist.
1920    if ($.fn[id] !== void 0) {
1921      return this.fatal('Specified jQuery plugin identifier already exists: @id. Use Drupal.bootstrap.replacePlugin() instead.', {'@
1921id': id});
1922    }
1923
1924    // Immediately return if plugin isn't a function.
1925    if (typeof plugin !== 'function') {
1926      return this.fatal('You must provide a constructor function to create a jQuery plugin "@id": @plugin', {'@id': id, '@plugin':  plugin});
1927    }
1928
1929    // Add a ".noConflict()" helper method.
1930    this.pluginNoConflict(id, plugin, noConflict);
1931
1932    $.fn[id] = plugin;
1933  };
1934
1935  /**
1936   * Diff object properties.
1937   *
1938   * @param {...Object} objects
1939   *   Two or more objects. The first object will be used to return properties
1940   *   values.
1941   *
1942   * @return {Object}
1943   *   Returns the properties of the first passed object that are not present
1944   *   in all other passed objects.
1945   */
1946  Bootstrap.diffObjects = function (objects) {
1947    var args = Array.prototype.slice.call(arguments);
1948    return _.pick(args[0], _.difference.apply(_, _.map(args, function (obj) {
1949      return Object.keys(obj);
1950    })));
1951  };
1952
1953  /**
1954   * Map of supported events by regular expression.
1955   *
1956   * @type {Object<Event|MouseEvent|KeyboardEvent|TouchEvent,RegExp>}
1957   */
1958  Bootstrap.eventMap = {
1959    Event: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
1960    MouseEvent: /^(?:click|dblclick|mouse(?:down|enter|leave|up|over|move|out))$/,
1961    KeyboardEvent: /^(?:key(?:down|press|up))$/,
1962    TouchEvent: /^(?:touch(?:start|end|move|cancel))$/
1963  };
1964
1965  /**
1966   * Extends a jQuery Plugin.
1967   *
1968   * @param {String} id
1969   *   A jQuery plugin identifier located in $.fn.
1970   * @param {Function} callback
1971   *   A constructor function used to initialize the for the jQuery plugin.
1972   *
1973   * @return {Function|Boolean}
1974   *   The jQuery plugin constructor or FALSE if the plugin does not exist.
1975   */
1976  Bootstrap.extendPlugin = function (id, callback) {
1977    // Immediately return if plugin doesn't exist.
1978    if (typeof $.fn[id] !== 'function') {
1979      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
1980    }
1981
1982    // Immediately return if callback isn't a function.
1983    if (typeof callback !== 'function') {
1984      return this.fatal('You must provide a callback function to extend the jQuery plugin "@id": @callback', {'@id': id, '@callback':  callback});
1985    }
1986
1987    // Determine existing plugin constructor.
1988    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
1989    var plugin = callback.apply(constructor, [this.settings]);
1990    if (!$.isPlainObject(plugin)) {
1991      return this.fatal('Returned value from callback is not a plain object that can be used to extend the jQuery plugin "@id": @obj', {'@obj':  plugin});
1992    }
1993
1994    this.wrapPluginConstructor(constructor, plugin, true);
1995
1996    return $.fn[id];
1997  };
1998
1999  Bootstrap.superWrapper = function (parent, fn) {
2000    return function () {
2001      var previousSuper = this.super;
2002      this.super = parent;
2003      var ret = fn.apply(this, arguments);
2004      if (previousSuper) {
2005        this.super = previousSuper;
2006      }
2007      else {
2008        delete this.super;
2009      }
2010      return ret;
2011    };
2012  };
2013
2014  /**
2015   * Provide a helper method for displaying when something is went wrong.
2016   *
2017   * @param {String} message
2018   *   The message to display.
2019   * @param {Object} [args]
2020   *   An arguments to use in message.
2021   *
2022   * @return {Boolean}
2023   *   Always returns FALSE.
2024   */
2025  Bootstrap.fatal = function (message, args) {
2026    if (this.settings.dev && console.warn) {
2027      for (var name in args) {
2028        if (args.hasOwnProperty(name) && typeof args[name] === 'object') {
2029          args[name] = JSON.stringify(args[name]);
2030        }
2031      }
2032      Drupal.throwError(new Error(Drupal.formatString(message, args)));
2033    }
2034    return false;
2035  };
2036
2037  /**
2038   * Intersects object properties.
2039   *
2040   * @param {...Object} objects
2041   *   Two or more objects. The first object will be used to return properties
2042   *   values.
2043   *
2044   * @return {Object}
2045   *   Returns the properties of first passed object that intersects with all
2046   *   other passed objects.
2047   */
2048  Bootstrap.intersectObjects = function (objects) {
2049    var args = Array.prototype.slice.call(arguments);
2050    return _.pick(args[0], _.intersection.apply(_, _.map(args, function (obj) {
2051      return Object.keys(obj);
2052    }
2052)));
2053  };
2054
2055  /**
2056   * Normalizes an object's values.
2057   *
2058   * @param {Object} obj
2059   *   The object to normalize.
2060   *
2061   * @return {Object}
2062   *   The normalized object.
2063   */
2064  Bootstrap.normalizeObject = function (obj) {
2065    if (!$.isPlainObject(obj)) {
2066      return obj;
2067    }
2068
2069    for (var k in obj) {
2070      if (typeof obj[k] === 'string') {
2071        if (obj[k] === 'true') {
2072          obj[k] = true;
2073        }
2074        else if (obj[k] === 'false') {
2075          obj[k] = false;
2076        }
2077        else if (obj[k].match(/^[\d-.]$/)) {
2078          obj[k] = parseFloat(obj[k]);
2079        }
2080      }
2081      else if ($.isPlainObject(obj[k])) {
2082        obj[k] = Bootstrap.normalizeObject(obj[k]);
2083      }
2084    }
2085
2086    return obj;
2087  };
2088
2089  /**
2090   * An object based once plugin (similar to jquery.once, but without the DOM).
2091   *
2092   * @param {String} id
2093   *   A unique identifier.
2094   * @param {Function} callback
2095   *   The callback to invoke if the identifier has not yet been seen.
2096   *
2097   * @return {Bootstrap}
2098   */
2099  Bootstrap.once = function (id, callback) {
2100    // Immediately return if identifier has already been processed.
2101    if (this.processedOnce[id]) {
2102      return this;
2103    }
2104    callback.call(this, this.settings);
2105    this.processedOnce[id] = true;
2106    return this;
2107  };
2108
2109  /**
2110   * Provide jQuery UI like ability to get/set options for Bootstrap plugins.
2111   *
2112   * @param {string|object} key
2113   *   A string value of the option to set, can be dot like to a nested key.
2114   *   An object of key/value pairs.
2115   * @param {*} [value]
2116   *   (optional) A value to set for key.
2117   *
2118   * @returns {*}
2119   *   - Returns nothing if key is an object or both key and value parameters
2120   *   were provided to set an option.
2121   *   - Returns the a value for a specific setting if key was provided.
2122   *   - Returns an object of key/value pairs of all the options if no key or
2123   *   value parameter was provided.
2124   *
2125   * @see https://github.com/jquery/jquery-ui/blob/master/ui/widget.js
2126   */
2127  Bootstrap.option = function (key, value) {
2128    var options = $.isPlainObject(key) ? $.extend({}, key) : {};
2129
2130    // Get all options (clone so it doesn't reference the internal object).
2131    if (arguments.length === 0) {
2132      return $.extend({}, this.options);
2133    }
2134
2135    // Get/set single option.
2136    if (typeof key === "string") {
2137      // Handle nested keys in dot notation.
2138      // e.g., "foo.bar" => { foo: { bar: true } }
2139      var parts = key.split('.');
2140      key = parts.shift();
2141      var obj = options;
2142      if (parts.length) {
2143        for (var i = 0; i < parts.length - 1; i++) {
2144          obj[parts[i]] = obj[parts[i]] || {};
2145          obj = obj[parts[i]];
2146        }
2147        key = parts.pop();
2148      }
2149
2150      // Get.
2151      if (arguments.length === 1) {
2152        return obj[key] === void 0 ? null : obj[key];
2153      }
2154
2155      // Set.
2156      obj[key] = value;
2157    }
2158
2159    // Set multiple options.
2160    $.extend(true, this.options, options);
2161  };
2162
2163  /**
2164   * Adds a ".noConflict()" helper method if needed.
2165   *
2166   * @param {String} id
2167   *   A jQuery plugin identifier located in $.fn.
2168   * @param {Function} plugin
2169   * @param {Function} plugin
2170   *   A constructor function used to initialize the for the jQuery plugin.
2171   * @param {Boolean} [noConflict]
2172   *   Flag indicating whether or not to create a ".noConflict()" helper method
2173   *   for the plugin.
2174   */
2175  Bootstrap.pluginNoConflict = function (id, plugin, noConflict) {
2176    if (plugin.noConflict === void 0 && (noConflict === void 0 || noConflict)) {
2177      var old = $.fn[id];
2178      plugin.noConflict = function () {
2179        $.fn[id] = old;
2180        return this;
2181      };
2182    }
2183  };
2184
2185  /**
2186   * Creates a handler that relays to another event name.
2187   *
2188   * @param {HTMLElement|jQuery} target
2189   *   A target element.
2190   * @param {String} name
2191   *   The name of the event to trigger.
2192   * @param {Boolean} [stopPropagation=true]
2193   *   Flag indicating whether to stop the propagation of the event, defaults
2194   *   to true.
2195   *
2196   * @return {Function}
2197   *   An even handler callback function.
2198   */
2199  Bootstrap.relayEvent = function (target, name, stopPropagation) {
2200    return function (e) {
2201      if (stopPropagation === void 0 || stopPropagation) {
2202        e.stopPropagation();
2203      }
2204      var $target = $(target);
2205      var parts = name.split('.').filter(Boolean);
2206      var type = parts.shift();
2207      e.target = $target[0];
2208      e.currentTarget = $target[0];
2209      e.namespace = parts.join('.');
2210      e.type = type;
2211      $target.trigger(e);
2212    };
2213  };
2214
2215  /**
2216   * Replaces a Bootstrap jQuery plugin definition.
2217   *
2218   * @param {String} id
2219   *   A jQuery plugin identifier located in $.fn.
2220   * @param {Function} callback
2221   *   A callback function that is immediately invoked and must return a
2222   *   function that will be used as the plugin constructor.
2223   * @param {Boolean} [noConflict]
2224   *   Flag indicating whether or not to create a ".noConflict()" helper method
2225   *   for the plugin.
2226   */
2227  Bootstrap.replacePlugin = function (id, callback, noConflict) {
2228    // Immediately return if plugin doesn't exist.
2229    if (typeof $.fn[id] !== 'function') {
2230      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
2231    }
2232
2233    // Immediately return if callback isn't a function.
2234    if (typeof callback !== 'function') {
2235      return this.fatal('You must provide a valid callback function to replace a jQuery plugin: @callback', {'@callback': callback});
2236    }
2237
2238    // Determine existing plugin constructor.
2239    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
2240    var plugin = callback.apply(constructor, [this.settings]);
2241
2242    // Immediately return if plugin isn't a function.
2243    if (typeof plugin !== 'function') {
2244      return this.fatal('Returned value from callback is not a usable function to replace a jQuery plugin "@id": @plugin', {'@id': id, '@plugin': plugin});
2245    }
2246
2247    this.wrapPluginConstructor(constructor, plugin);
2248
2249    // Add a ".noConflict()" helper method.
2250    this.pluginNoConflict(id, plugin, noConflict);
2251
2252    $.fn[id] = plugin;
2253  };
2254
2255  /**
2256   * Simulates a native event on an element in the browser.
2257   *
2258   * Note: This is a fairly complete modern implementation. If things aren't
2259   * working quite the way you intend (in older browsers), you may wish to use
2260   * the jQuery.simulate plugin. If it's available, this method will defer to
2261   * that plugin.
2262   *
2263   * @see https://github.com/jquery/jquery-simulate
2264   *
2265   * @param {HTMLElement|jQuery} element
2266   *   A DOM element to dispatch event on. Note: this may be a jQuery object,
2267   *   however be aware that this will trigger the same event for each element
2268   *   inside the jQuery collection; use with caution.
2269   * @param {String|String[]} type
2270   *   The type(s) of event to simulate.
2271   * @param {Object} [options]
2272   *   An object of options to pass to the event constructor. Typically, if
2273   *   an event is being proxied, you should just pass the original event
2274   *   object here. This allows, if the browser supports it, to be a truly
2275   *   simulated event.
2276   *
2277   * @return {Boolean}
2278   *   The return value is false if event is cancelable and at least one of the
2279   *   event handlers which handled this event called Event.preventDefault().
2280   *   Otherwise it returns true.
2281   */
2282  Bootstrap.simulate = function (element, type, options) {
2283    // Handle jQuery object wrappers so it triggers on each element.
2284    var ret = true;
2285    if (element instanceof $) {
2286      element.each(function () {
2287        if (!Bootstrap.simulate(this, type, options)) {
2288          ret = false;
2289        }
2290      });
2291      return ret;
2292    }
2293
2294    if (!(element instanceof HTMLElement)) {
2295      this.fatal('Passed element must be an instance of HTMLElement, got "@type" instead.', {
2296        '@type': typeof element,
2297      });
2298    }
2299
2300    // Defer to the jQuery.simulate plugin, if it's available.
2301    if (typeof $.simulate === 'function') {
2302      new $.simulate(element, type, options);
2303      return true;
2304    }
2305
2306    var event;
2307    var ctor;
2308    var types = [].concat(type);
2309    for (var i = 0, l = types.length; i < l; i++) {
2310      type = types[i];
2311      for (var name in this.eventMap) {
2312        if (this.eventMap[name].test(type)) {
2313          ctor = name;
2314          break;
2315        }
2316      }
2317      if (!ctor) {
2318        throw new SyntaxError('Only rudimentary HTMLEvents, KeyboardEvents and MouseEvents are supported: ' + type);
2319      }
2320      var opts = {bubbles: true, cancelable: true};
2321      if (ctor === 'KeyboardEvent' || ctor === 'MouseEvent') {
2322        $.extend(opts, {ctrlKey: !1, altKey: !1, shiftKey: !1, metaKey: !1});
2323      }
2324      if (ctor === 'MouseEvent') {
2325        $.extend(opts, {button: 0, pointerX: 0, pointerY: 0, view: window});
2326      }
2327      if (options) {
2328        $.extend(opts, options);
2329      }
2330      if (typeof window[ctor] === 'function') {
2331        event = new window[ctor](type, opts);
2332        if (!element.dispatchEvent(event)) {
2333          ret = false;
2334        }
2335      }
2336      else if (document.createEvent) {
2337        event = document.createEvent(ctor);
2338        event.initEvent(type, opts.bubbles, opts.cancelable);
2339        if (!element.dispatchEvent(event)) {
2340          ret = false;
2341        }
2342      }
2343      else if (typeof element.fireEvent === 'function') {
2344        event = $.extend(document.createEventObject(), opts);
2345        if (!element.fireEvent('on' + type, event)) {
2346          ret = false;
2347        }
2348      }
2349      else if (typeof element[type]) {
2350        element[type]();
2351      }
2352    }
2353    return ret;
2354  };
2355
2356  /**
2357   * Strips HTML and returns just text.
2358   *
2359   * @param {String|Element|jQuery} html
2360   *   A string of HTML content, an Element DOM object or a jQuery object.
2361   *
2362   * @return {String}
2363   *   The text without HTML tags.
2364   *
2365   * @todo Replace with http://locutus.io/php/strings/strip_tags/
2366   */
2367  Bootstrap.stripHtml = function (html) {
2368    if (html instanceof $) {
2369      html = html.html();
2370    }
2371    else if (html instanceof Element) {
2372      html = html.innerHTML;
2373    }
2374    var tmp = document.createElement('DIV');
2375    tmp.innerHTML = html;
2376    return (tmp.textContent || tmp.innerText || '').replace(/^[\s\n\t]*|[\s\n\t]*$/, '');
2377  };
2378
2379  /**
2380   * Provide a helper method for displaying when something is unsupported.
2381   *
2382   * @param {String} type
2383   *   The type of unsupported object, e.g. method or option.
2384   * @param {String} name
2385   *   The name of the unsupported object.
2386   * @param {*} [value]
2387   *   The value of the unsupported object.
2388   */
2389  Bootstrap.unsupported = function (type, name, value) {
2390    Bootstrap.warn('Unsupported by Drupal Bootstrap: (@type) @name -> @value', {
2391      '@type': type,
2392      '@name': name,
2393      '@value': typeof value === 'object' ? JSON.stringify(value) : value
2394    });
2395  };
2396
2397  /**
2398   * Provide a helper method to display a warning.
2399   *
2400   * @param {String} message
2401   *   The message to display.
2402   * @param {Object} [args]
2403   *   Arguments to use as replacements in Drupal.formatString.
2404   */
2405  Bootstrap.warn = function (message, args) {
2406    if (this.settings.dev && console.warn) {
2407      console.warn(Drupal.formatString(message, args));
2408    }
2409  };
2410
2411  /**
2412   * Wraps a plugin with common functionality.
2413   *
2414   * @param {Function} constructor
2415   *   A plugin constructor being wrapped.
2416   * @param {Object|Function} plugin
2417   *   The plugin being wrapped.
2418   * @param {Boolean} [extend = false]
2419   *   Whether to add super extensibility.
2420   */
2421  Bootstrap.wrapPluginConstructor = function (constructor, plugin, extend) {
2422    var proto = constructor.prototype;
2423
2424    // Add a jQuery UI like option getter/setter method.
2425    var option = this.option;
2426    if (proto.option === void(0)) {
2427      proto.option = function () {
2428        return option.apply(this, arguments);
2429      };
2430    }
2431
2432    if (extend) {
2433      // Handle prototype properties separately.
2434      if (plugin.prototype !== void 0) {
2435        for (var key in plugin.prototype) {
2436          if (!plugin.prototype.hasOwnProperty(key)) continue;
2437          var value = plugin.prototype[key];
2438          if (typeof value === 'function') {
2439            proto[key] = this.superWrapper(proto[key] || function () {}, value);
2440          }
2441          else {
2442            proto[key] = $.isPlainObject(value) ? $.extend(true, {}, proto[key], value) : value;
2443          }
2444        }
2445      }
2446      delete plugin.prototype;
2447
2448      // Handle static properties.
2449      for (key in plugin) {
2450        if (!plugin.hasOwnProperty(key)) continue;
2451        value = plugin[key];
2452        if (typeof value === 'function') {
2453          constructor[key] = this.superWrapper(constructor[key] || function () {}, value);
2454        }
2455        else {
2456          constructor[key] = $.isPlainObject(value) ? $.extend(true, {}, constructor[key], value) : value;
2457        }
2458      }
2459    }
2460  };
2461
2462  // Add Bootstrap to the global Drupal object.
2463  Drupal.bootstrap = Drupal.bootstrap || Bootstrap;
2464
2465})(window._, window.jQuery, window.Drupal, window.drupalSettings);
2466;
2467(function ($, _) {
2468
2469  /**
2470   * @class Attributes
2471   *
2472   * Modifies attributes.
2473   *
2474   * @param {Object|Attributes} attributes
2475   *   An object to initialize attributes with.
2476   */
2477  var Attributes = function (attributes) {
2478    this.data = {};
2479    this.data['class'] = [];
2480    this.merge(attributes);
2481  };
2482
2483  /**
2484   * Renders the attributes object as a string to inject into an HTML element.
2485   *
2486   * @return {String}
2487   *   A rendered string suitable for inclusion in HTML markup.
2488   */
2489  Attributes.prototype.toString = function () {
2490    var output = '';
2491    var name, value;
2492    var checkPlain = function (str) {
2493      return str && str.toString().replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;') || '';
2494    };
2495    var data = this.getData();
2496    for (name in data) {
2497      if (!data.hasOwnProperty(name)) continue;
2498      value = data[name];
2499      if (_.isFunction(value)) value = value();
2500      if (_.isObject(value)) value = _.values(value);
2501      if (_.isArray(value)) value = value.join(' ');
2502      output += ' ' + checkPlain(name) + '="' + checkPlain(value) + '"';
2503    }
2504    return output;
2505  };
2506
2507  /**
2508   * Renders the Attributes object as a plain object.
2509   *
2510   * @return {Object}
2511   *   A plain object suitable for inclusion in DOM elements.
2512   */
2513  Attributes.prototype.toPlainObject = function () {
2514    var object = {};
2515    var name, value;
2516    var data = this.getData();
2517    for (name in data) {
2518      if (!data.hasOwnProperty(name)) continue;
2519      value = data[name];
2520      if (_.isFunction(value)) value = value();
2521      if (_.isObject(value)) value = _.values(value);
2522      if (_.isArray(value)) value = value.join(' ');
2523      object[name] = value;
2524    }
2525    return object;
2526  };
2527
2528  /**
2529   * Add class(es) to the array.
2530   *
2531   * @param {string|Array} value
2532   *   An individual class or an array of classes to add.
2533   *
2534   * @return {Attributes}
2535   *
2536   * @chainable
2537   */
2538  Attributes.prototype.addClass = function (value) {
2539    var args = Array.prototype.slice.call(arguments);
2540    this.data['class'] = this.sanitizeClasses(this.data['class'].concat(args));
2541    return this;
2542  };
2543
2544  /**
2545   * Returns whether the requested attribute exists.
2546   *
2547   * @param {string} name
2548   *   An attribute name to check.
2549   *
2550   * @return {boolean}
2551   *   TRUE or FALSE
2552   */
2553  Attributes.prototype.exists = function (name) {
2554    return this.data[name] !== void(0) && this.data[name] !== null;
2555  };
2556
2557  /**
2558   * Retrieve a specific attribute from the array.
2559   *
2560   * @param {string} name
2561   *   The specific attribute to retrieve.
2562   * @param {*} defaultValue
2563   *   (optional) The default value to set if the attribute does not exist.
2564   *
2565   * @return {*}
2566   *   A specific attribute value, passed by reference.
2567   */
2568  Attributes.prototype.get = function (name, defaultValue) {
2569    if (!this.exists(name)) this.data[name] = defaultValue;
2570    return this.data[name];
2571  };
2572
2573  /**
2574   * Retrieves a cloned copy of the internal attributes data object.
2575   *
2576   * @return {Object}
2577   */
2578  Attributes.prototype.getData = function () {
2579    return _.extend({}, this.data);
2580  };
2581
2582  /**
2583   * Retrieves classes from the array.
2584   *
2585   * @return {Array}
2586   *   The classes array.
2587   */
2588  Attributes.prototype.getClasses = function () {
2589    return this.get('class', []);
2590  };
2591
2592  /**
2593   * Indicates whether a class is present in the array.
2594   *
2595   * @param {string|Array} className
2596   *   The class(es) to search for.
2597   *
2598   * @return {boolean}
2599   *   TRUE or FALSE
2600   */
2601  Attributes.prototype.hasClass = function (className) {
2602    className = this.sanitizeClasses(Array.prototype.slice.call(arguments));
2603    var classes = this.getClasses();
2604    for (var i = 0, l = className.length; i < l; i++) {
2605      // If one of the classes fails, immediately return false.
2606      if (_.indexOf(classes, className[i]) === -1) {
2607        return false;
2608      }
2609    }
2610    return true;
2611  };
2612
2613  /**
2614   * Merges multiple values into the array.
2615   *
2616   * @param {Attributes|Node|jQuery|Object} object
2617   *   An Attributes object with existing data, a Node DOM element, a jQuery
2618   *   instance or a plain object where the key is the attribute name and the
2619   *   value is the attribute value.
2620   * @param {boolean} [recursive]
2621   *   Flag determining whether or not to recursively merge key/value pairs.
2622   *
2623   * @return {Attributes}
2624   *
2625   * @chainable
2626   */
2627  Attributes.prototype.merge = function (object, recursive) {
2628    // Immediately return if there is nothing to merge.
2629    if (!object) {
2630      return this;
2631    }
2632
2633    // Get attributes from a jQuery element.
2634    if (object instanceof $) {
2635      object = object[0];
2636    }
2637
2638    // Get attributes from a DOM element.
2639    if (object instanceof Node) {
2640      object = Array.prototype.slice.call(object.attributes).reduce(function (attributes, attribute) {
2641        attributes[attribute.name] = attribute.value;
2642        return attributes;
2643      }, {});
2644    }
2645    // Get attributes from an Attributes instance.
2646    else if (object instanceof Attributes) {
2647      object = object.getData();
2648    }
2649    // Otherwise, clone the object.
2650    else {
2651      object = _.extend({}, object);
2652    }
2653
2654    // By this point, there should be a valid plain object.
2655    if (!$.isPlainObject(object)) {
2656      setTimeout(function () {
2657        throw new Error('Passed object is not supported: ' + object);
2658      });
2659      return this;
2660    }
2661
2662    // Handle classes separately.
2663    if (object && object['class'] !== void 0) {
2664      this.addClass(object['class']);
2665      delete object['class'];
2666    }
2667
2668    if (recursive === void 0 || recursive) {
2669      this.data = $.extend(true, {}, this.data, object);
2670    }
2671    else {
2672      this.data = $.extend({}, this.data, object);
2673    }
2674
2675    return this;
2676  };
2677
2678  /**
2679   * Removes an attribute from the array.
2680   *
2681   * @param {string} name
2682   *   The name of the attribute to remove.
2683   *
2684   * @return {Attributes}
2685   *
2686   * @chainable
2687   */
2688  Attributes.prototype.remove = function (name) {
2689    if (this.exists(name)) delete this.data[name];
2690    return this;
2691  };
2692
2693  /**
2694   * Removes a class from the attributes array.
2695   *
2696   * @param {...string|Array} className
2697   *   An individual class or an array of classes to remove.
2698   *
2699   * @return {Attributes}
2700   *
2701   * @chainable
2702   */
2703  Attributes.prototype.removeClass = function (className) {
2704    var remove = this.sanitizeClasses(Array.prototype.slice.apply(arguments));
2705    this.data['class'] = _.without(this.getClasses(), remove);
2706    return this;
2707  };
2708
2709  /**
2710   * Replaces a class in the attributes array.
2711   *
2712   * @param {string} oldValue
2713   *   The old class to remove.
2714   * @param {string} newValue
2715   *   The new class. It will not be added if the old class does not exist.
2716   *
2717   * @return {Attributes}
2718   *
2719   * @chainable
2720   */
2721  Attributes.prototype.replaceClass = function (oldValue, newValue) {
2722    var classes = this.getClasses();
2723    var i = _.indexOf(this.sanitizeClasses(oldValue), classes);
2724    if (i >= 0) {
2725      classes[i] = newValue;
2726      this.set('class', classes);
2727    }
2728    return this;
2729  };
2730
2731  /**
2732   * Ensures classes are flattened into a single is an array and sanitized.
2733   *
2734   * @param {...String|Array} classes
2735   *   The class or classes to sanitize.
2736   *
2737   * @return {Array}
2738   *   A sanitized array of classes.
2739   */
2740  Attributes.prototype.sanitizeClasses = function (classes) {
2741    return _.chain(Array.prototype.slice.call(arguments))
2742      // Flatten in case there's a mix of strings and arrays.
2743      .flatten()
2744
2745      // Split classes that may have been added with a space as a separator.
2746      .map(function (string) {
2747        return string.split(' ');
2748      })
2749
2750      // Flatten again since it was just split into arrays.
2751      .flatten()
2752
2753      // Filter out empty items.
2754      .filter()
2755
2756      // Clean the class to ensure it's a valid class name.
2757      .map(function (value) {
2758        return Attributes.cleanClass(value);
2759      })
2760
2761      // Ensure classes are unique.
2762      .uniq()
2763
2764      // Retrieve the final value.
2765      .value();
2766  };
2767
2768  /**
2769   * Sets an attribute on the array.
2770   *
2771   * @param {string} name
2772   *   The name of the attribute to set.
2773   * @param {*} value
2774   *   The value of the attribute to set.
2775   *
2776   * @return {Attributes}
2777   *
2778   * @chainable
2779   */
2780  Attributes.prototype.set = function (name, value) {
2781    var obj = $.isPlainObject(name) ? name : {};
2782    if (typeof name === 'string') {
2783      obj[name] = value;
2784    }
2785    return this.merge(obj);
2786  };
2787
2788  /**
2789   * Prepares a string for use as a CSS identifier (element, class, or ID name).
2790   *
2791   * Note: this is essentially a direct copy from
2792   * \Drupal\Component\Utility\Html::cleanCssIdentifier
2793   *
2794   * @param {string} identifier
2795   *   The identifier to clean.
2796   * @param {Object} [filter]
2797   *   An object of string replacements to use on the identifier.
2798   *
2799   * @return {string}
2800   *   The cleaned identifier.
2801   */
2802  Attributes.cleanClass = function (identifier, filter) {
2803    filter = filter || {
2804      ' ': '-',
2805      '_': '-',
2806      '/': '-',
2807      '[': '-',
2808      ']': ''
2809    };
2810
2811    identifier = identifier.toLowerCase();
2812
2813    if (filter['__'] === void 0) {
2814      identifier = identifier.replace('__', '#DOUBLE_UNDERSCORE#');
2815    }
2816
2817    identifier = identifier.replace(Object.keys(filter), Object.keys(filter).map(function(key) { return filter[key]; }));
2818
2819    if (filter['__'] === void 0) {
2820      identifier = identifier.replace('#DOUBLE_UNDERSCORE#', '__');
2821    }
2822
2823    identifier = identifier.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/g, '');
2824    identifier = identifier.replace(['/^[0-9]/', '/^(-[0-9])|^(--)/'], ['_', '__']);
2825
2826    return identifier;
2827  };
2828
2829  /**
2830   * Creates an Attributes instance.
2831   *
2832   * @param {object|Attributes} [attributes]
2833   *   An object to initialize attributes with.
2834   *
2835   * @return {Attributes}
2836   *   An Attributes instance.
2837   *
2838   * @constructor
2839   */
2840  Attributes.create = function (attributes) {
2841    return new Attributes(attributes);
2842  };
2843
2844  window.Attributes = Attributes;
2845
2846})(window.jQuery, window._);
2847;
2848/**
2849 * @file
2850 * Theme hooks for the Drupal Bootstrap base theme.
2851 */
2852(function ($, Drupal, Bootstrap, Attributes) {
2853
2854  /**
2855   * Fallback for theming an icon if the Icon API module is not installed.
2856   */
2857  if (!Drupal.icon) Drupal.icon = { bundles: {} };
2858  if (!Drupal.theme.icon || Drupal.theme.prototype.icon) {
2859    $.extend(Drupal.theme, /** @lends Drupal.theme */ {
2860      /**
2861       * Renders an icon.
2862       *
2863       * @param {string} bundle
2864       *   The bundle which the icon belongs to.
2865       * @param {string} icon
2866       *   The name of the icon to render.
2867       * @param {object|Attributes} [attributes]
2868       *   An object of attributes to also apply to the icon.
2869       *
2870       * @returns {string}
2871       */
2872      icon: function (bundle, icon, attributes) {
2873        if (!Drupal.icon.bundles[bundle]) return '';
2874        attributes = Attributes.create(attributes).addClass('icon').set('aria-hidden', 'true');
2875        icon = Drupal.icon.bundles[bundle](icon, attributes);
2876        return '<span' + attributes + '></span>';
2877      }
2878    });
2879  }
2880
2881  /**
2882   * Callback for modifying an icon in the "bootstrap" icon bundle.
2883   *
2884   * @param {string} icon
2885   *   The icon being rendered.
2886   * @param {Attributes} attributes
2887   *   Attributes object for the icon.
2888   */
2889  Drupal.icon.bundles.bootstrap = function (icon, attributes) {
2890    attributes.addClass(['glyphicon', 'glyphicon-' + icon]);
2891  };
2892
2893  /**
2894   * Add necessary theming hooks.
2895   */
2896  $.extend(Drupal.theme, /** @lends Drupal.theme */ {
2897
2898    /**
2899     * Renders a Bootstrap AJAX glyphicon throbber.
2900     *
2901     * @returns {string}
2902     */
2903    ajaxThrobber: function () {
2904      return Drupal.theme('bootstrapIcon', 'refresh', {'class': ['ajax-throbber', 'glyphicon-spin'] });
2905    },
2906
2907    /**
2908     * Renders a button element.
2909     *
2910     * @param {object|Attributes} attributes
2911     *   An object of attributes to apply to the button. If it contains one of:
2912     *   - value: The label of the button.
2913     *   - context: The context type of Bootstrap button, can be one of:
2914     *     - default
2915     *     - primary
2916     *     - success
2917     *     - info
2918     *     - warning
2919     *     - danger
2920     *     - link
2921     *
2922     * @returns {string}
2923     */
2924    button: function (attributes) {
2925      attributes = Attributes.create(attributes).addClass('btn');
2926      var context = attributes.get('context', 'default');
2927      var label = attributes.get('value', '');
2928      attributes.remove('context').remove('value');
2929      if (!attributes.hasClass(['btn-default', 'btn-primary', 'btn-success', 'btn-info', 'btn-warning', 'btn-danger', 'btn-link'])) {
2930        attributes.addClass('btn-' + Bootstrap.checkPlain(context));
2931      }
2932
2933      // Attempt to, intelligently, provide a default button "type".
2934      if (!attributes.exists('type')) {
2935        attributes.set('type', attributes.hasClass('form-submit') ? 'submit' : 'button');
2936      }
2937
2938      return '<button' + attributes + '>' + label + '</button>';
2939    },
2940
2941    /**
2942     * Alias for "button" theme hook.
2943     *
2944     * @param {object|Attributes} attributes
2945     *   An object of attributes to apply to the button.
2946     *
2947     * @see Drupal.theme.button()
2948     *
2949     * @returns {string}
2950     */
2951    btn: function (attributes) {
2952      return Drupal.theme('button', attributes);
2953    },
2954
2955    /**
2956     * Renders a button block element.
2957     *
2958     * @param {object|Attributes} attributes
2959     *   An object of attributes to apply to the button.
2960     *
2961     * @see Drupal.theme.button()
2962     *
2963     * @returns {string}
2964     */
2965    'btn-block': function (attributes) {
2966      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-block'));
2967    },
2968
2969    /**
2970     * Renders a large button element.
2971     *
2972     * @param {object|Attributes} attributes
2973     *   An object of attributes to apply to the button.
2974     *
2975     * @see Drupal.theme.button()
2976     *
2977     * @returns {string}
2978     */
2979    'btn-lg': function (attributes) {
2980      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-lg'));
2981    },
2982
2983    /**
2984     * Renders a small button element.
2985     *
2986     * @param {object|Attributes} attributes
2987     *   An object of attributes to apply to the button.
2988     *
2989     * @see Drupal.theme.button()
2990     *
2991     * @returns {string}
2992     */
2993    'btn-sm': function (attributes) {
2994      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-sm'));
2995    },
2996
2997    /**
2998     * Renders an extra small button element.
2999     *
3000     * @param {object|Attributes} attributes
3001     *   An object of attributes to apply to the button.
3002     *
3003     * @see Drupal.theme.button()
3004     *
3005     * @returns {string}
3006     */
3007    'btn-xs': function (attributes) {
3008      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-xs'));
3009    },
3010
3011    /**
3012     * Renders a glyphicon.
3013     *
3014     * @param {string} name
3015     *   The name of the glyphicon.
3016     * @param {object|Attributes} [attributes]
3017     *   An object of attributes to apply to the icon.
3018     *
3019     * @returns {string}
3020     */
3021    bootstrapIcon: function (name, attributes) {
3022      return Drupal.theme('icon', 'bootstrap', name, attributes);
3023    }
3024
3025  });
3026
3027})(window.jQuery, window.Drupal, window.Drupal.bootstrap, window.Attributes);
3028;
3029/* ========================================================================
3030 * Bootstrap: affix.js v3.4.0
3031 * https://getbootstrap.com/docs/3.4/javascript/#affix
3032 * ========================================================================
3033 * Copyright 2011-2018 Twitter, Inc.
3034 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3035 * ======================================================================== */
3036
3037
3038+function ($) {
3039  'use strict';
3040
3041  // AFFIX CLASS DEFINITION
3042  // ======================
3043
3044  var Affix = function (element, options) {
3045    this.options = $.extend({}, Affix.DEFAULTS, options)
3046
3047    var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
3048
3049    this.$target = target
3050      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
3051      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
3052
3053    this.$element     = $(element)
3054    this.affixed      = null
3055    this.unpin        = null
3056    this.pinnedOffset = null
3057
3058    this.checkPosition()
3059  }
3060
3061  Affix.VERSION  = '3.4.0'
3062
3063  Affix.RESET    = 'affix affix-top affix-bottom'
3064
3065  Affix.DEFAULTS = {
3066    offset: 0,
3067    target: window
3068  }
3069
3070  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
3071    var scrollTop    = this.$target.scrollTop()
3072    var position     = this.$element.offset()
3073    var targetHeight = this.$target.height()
3074
3075    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
3076
3077    if (this.affixed == 'bottom') {
3078      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
3079      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
3080    }
3081
3082    var initializing   = this.affixed == null
3083    var colliderTop    = initializing ? scrollTop : position.top
3084    var colliderHeight = initializing ? targetHeight : height
3085
3086    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
3087    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
3088
3089    return false
3090  }
3091
3092  Affix.prototype.getPinnedOffset = function () {
3093    if (this.pinnedOffset) return this.pinnedOffset
3094    this.$element.removeClass(Affix.RESET).addClass('affix')
3095    var scrollTop = this.$target.scrollTop()
3096    var position  = this.$element.offset()
3097    return (this.pinnedOffset = position.top - scrollTop)
3098  }
3099
3100  Affix.prototype.checkPositionWithEventLoop = function () {
3101    setTimeout($.proxy(this.checkPosition, this), 1)
3102  }
3103
3104  Affix.prototype.checkPosition = function () {
3105    if (!this.$element.is(':visible')) return
3106
3107    var height       = this.$element.height()
3108    var offset       = this.options.offset
3109    var offsetTop    = offset.top
3110    var offsetBottom = offset.bottom
3111    var scrollHeight = Math.max($(document).height(), $(document.body).height())
3112
3113    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
3114    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
3115    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
3116
vendor: 50,276 bytes, lines 3117-4798
3117    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
3118
3119    if (this.affixed != affix) {
3120      if (this.unpin != null) this.$element.css('top', '')
3121
3122      var affixType = 'affix' + (affix ? '-' + affix : '')
3123      var e         = $.Event(affixType + '.bs.affix')
3124
3125      this.$element.trigger(e)
3126
3127      if (e.isDefaultPrevented()) return
3128
3129      this.affixed = affix
3130      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
3131
3132      this.$element
3133        .removeClass(Affix.RESET)
3134        .addClass(affixType)
3135        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
3136    }
3137
3138    if (affix == 'bottom') {
3139      this.$element.offset({
3140        top: scrollHeight - height - offsetBottom
3141      })
3142    }
3143  }
3144
3145
3146  // AFFIX PLUGIN DEFINITION
3147  // =======================
3148
3149  function Plugin(option) {
3150    return this.each(function () {
3151      var $this   = $(this)
3152      var data    = $this.data('bs.affix')
3153      var options = typeof option == 'object' && option
3154
3155      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
3156      if (typeof option == 'string') data[option]()
3157    })
3158  }
3159
3160  var old = $.fn.affix
3161
3162  $.fn.affix             = Plugin
3163  $.fn.affix.Constructor = Affix
3164
3165
3166  // AFFIX NO CONFLICT
3167  // =================
3168
3169  $.fn.affix.noConflict = function () {
3170    $.fn.affix = old
3171    return this
3172  }
3173
3174
3175  // AFFIX DATA-API
3176  // ==============
3177
3178  $(window).on('load', function () {
3179    $('[data-spy="affix"]').each(function () {
3180      var $spy = $(this)
3181      var data = $spy.data()
3182
3183      data.offset = data.offset || {}
3184
3185      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
3186      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
3187
3188      Plugin.call($spy, data)
3189    })
3190  })
3191
3192}(jQuery);
3193;
3194/* ========================================================================
3195 * Bootstrap: alert.js v3.4.0
3196 * https://getbootstrap.com/docs/3.4/javascript/#alerts
3197 * ========================================================================
3198 * Copyright 2011-2018 Twitter, Inc.
3199 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3200 * ======================================================================== */
3201
3202
3203+function ($) {
3204  'use strict';
3205
3206  // ALERT CLASS DEFINITION
3207  // ======================
3208
3209  var dismiss = '[data-dismiss="alert"]'
3210  var Alert   = function (el) {
3211    $(el).on('click', dismiss, this.close)
3212  }
3213
3214  Alert.VERSION = '3.4.0'
3215
3216  Alert.TRANSITION_DURATION = 150
3217
3218  Alert.prototype.close = function (e) {
3219    var $this    = $(this)
3220    var selector = $this.attr('data-target')
3221
3222    if (!selector) {
3223      selector = $this.attr('href')
3224      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
3225    }
3226
3227    selector    = selector === '#' ? [] : selector
3228    var $parent = $(document).find(selector)
3229
3230    if (e) e.preventDefault()
3231
3232    if (!$parent.length) {
3233      $parent = $this.closest('.alert')
3234    }
3235
3236    $parent.trigger(e = $.Event('close.bs.alert'))
3237
3238    if (e.isDefaultPrevented()) return
3239
3240    $parent.removeClass('in')
3241
3242    function removeElement() {
3243      // detach from parent, fire event then clean up data
3244      $parent.detach().trigger('closed.bs.alert').remove()
3245    }
3246
3247    $.support.transition && $parent.hasClass('fade') ?
3248      $parent
3249        .one('bsTransitionEnd', removeElement)
3250        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
3251      removeElement()
3252  }
3253
3254
3255  // ALERT PLUGIN DEFINITION
3256  // =======================
3257
3258  function Plugin(option) {
3259    return this.each(function () {
3260      var $this = $(this)
3261      var data  = $this.data('bs.alert')
3262
3263      if (!data) $this.data('bs.alert', (data = new Alert(this)))
3264      if (typeof option == 'string') data[option].call($this)
3265    })
3266  }
3267
3268  var old = $.fn.alert
3269
3270  $.fn.alert             = Plugin
3271  $.fn.alert.Constructor = Alert
3272
3273
3274  // ALERT NO CONFLICT
3275  // =================
3276
3277  $.fn.alert.noConflict = function () {
3278    $.fn.alert = old
3279    return this
3280  }
3281
3282
3283  // ALERT DATA-API
3284  // ==============
3285
3286  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
3287
3288}(jQuery);
3289;
3290/* ========================================================================
3291 * Bootstrap: button.js v3.4.0
3292 * https://getbootstrap.com/docs/3.4/javascript/#buttons
3293 * ========================================================================
3294 * Copyright 2011-2018 Twitter, Inc.
3295 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3296 * ======================================================================== */
3297
3298
3299+function ($) {
3300  'use strict';
3301
3302  // BUTTON PUBLIC CLASS DEFINITION
3303  // ==============================
3304
3305  var Button = function (element, options) {
3306    this.$element  = $(element)
3307    this.options   = $.extend({}, Button.DEFAULTS, options)
3308    this.isLoading = false
3309  }
3310
3311  Button.VERSION  = '3.4.0'
3312
3313  Button.DEFAULTS = {
3314    loadingText: 'loading...'
3315  }
3316
3317  Button.prototype.setState = function (state) {
3318    var d    = 'disabled'
3319    var $el  = this.$element
3320    var val  = $el.is('input') ? 'val' : 'html'
3321    var data = $el.data()
3322
3323    state += 'Text'
3324
3325    if (data.resetText == null) $el.data('resetText', $el[val]())
3326
3327    // push to event loop to allow forms to submit
3328    setTimeout($.proxy(function () {
3329      $el[val](data[state] == null ? this.options[state] : data[state])
3330
3331      if (state == 'loadingText') {
3332        this.isLoading = true
3333        $el.addClass(d).attr(d, d).prop(d, true)
3334      } else if (this.isLoading) {
3335        this.isLoading = false
3336        $el.removeClass(d).removeAttr(d).prop(d, false)
3337      }
3338    }, this), 0)
3339  }
3340
3341  Button.prototype.toggle = function () {
3342    var changed = true
3343    var $parent = this.$element.closest('[data-toggle="buttons"]')
3344
3345    if ($parent.length) {
3346      var $input = this.$element.find('input')
3347      if ($input.prop('type') == 'radio') {
3348        if ($input.prop('checked')) changed = false
3349        $parent.find('.active').removeClass('active')
3350        this.$element.addClass('active')
3351      } else if ($input.prop('type') == 'checkbox') {
3352        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
3353        this.$element.toggleClass('active')
3354      }
3355      $input.prop('checked', this.$element.hasClass('active'))
3356      if (changed) $input.trigger('change')
3357    } else {
3358      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
3359      this.$element.toggleClass('active')
3360    }
3361  }
3362
3363
3364  // BUTTON PLUGIN DEFINITION
3365  // ========================
3366
3367  function Plugin(option) {
3368    return this.each(function () {
3369      var $this   = $(this)
3370      var data    = $this.data('bs.button')
3371      var options = typeof option == 'object' && option
3372
3373      if (!data) $this.data('bs.button', (data = new Button(this, options)))
3374
3375      if (option == 'toggle') data.toggle()
3376      else if (option) data.setState(option)
3377    })
3378  }
3379
3380  var old = $.fn.button
3381
3382  $.fn.button             = Plugin
3383  $.fn.button.Constructor = Button
3384
3385
3386  // BUTTON NO CONFLICT
3387  // ==================
3388
3389  $.fn.button.noConflict = function () {
3390    $.fn.button = old
3391    return this
3392  }
3393
3394
3395  // BUTTON DATA-API
3396  // ===============
3397
3398  $(document)
3399    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
3400      var $btn = $(e.target).closest('.btn')
3401      Plugin.call($btn, 'toggle')
3402      if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
3403        // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
3404        e.preventDefault()
3405        // The target component still receive the focus
3406        if ($btn.is('input,button')) $btn.trigger('focus')
3407        else $btn.find('input:visible,button:visible').first().trigger('focus')
3408      }
3409    })
3410    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
3411      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
3412    })
3413
3414}(jQuery);
3415;
3416/* ========================================================================
3417 * Bootstrap: carousel.js v3.4.0
3418 * https://getbootstrap.com/docs/3.4/javascript/#carousel
3419 * ========================================================================
3420 * Copyright 2011-2018 Twitter, Inc.
3421 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3422 * ======================================================================== */
3423
3424
3425+function ($) {
3426  'use strict';
3427
3428  // CAROUSEL CLASS DEFINITION
3429  // =========================
3430
3431  var Carousel = function (element, options) {
3432    this.$element    = $(element)
3433    this.$indicators = this.$element.find('.carousel-indicators')
3434    this.options     = options
3435    this.paused      = null
3436    this.sliding     = null
3437    this.interval    = null
3438    this.$active     = null
3439    this.$items      = null
3440
3441    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
3442
3443    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
3444      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
3445      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
3446  }
3447
3448  Carousel.VERSION  = '3.4.0'
3449
3450  Carousel.TRANSITION_DURATION = 600
3451
3452  Carousel.DEFAULTS = {
3453    interval: 5000,
3454    pause: 'hover',
3455    wrap: true,
3456    keyboard: true
3457  }
3458
3459  Carousel.prototype.keydown = function (e) {
3460    if (/input|textarea/i.test(e.target.tagName)) return
3461    switch (e.which) {
3462      case 37: this.prev(); break
3463      case 39: this.next(); break
3464      default: return
3465    }
3466
3467    e.preventDefault()
3468  }
3469
3470  Carousel.prototype.cycle = function (e) {
3471    e || (this.paused = false)
3472
3473    this.interval && clearInterval(this.interval)
3474
3475    this.options.interval
3476      && !this.paused
3477      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
3478
3479    return this
3480  }
3481
3482  Carousel.prototype.getItemIndex = function (item) {
3483    this.$items = item.parent().children('.item')
3484    return this.$items.index(item || this.$active)
3485  }
3486
3487  Carousel.prototype.getItemForDirection = function (direction, active) {
3488    var activeIndex = this.getItemIndex(active)
3489    var willWrap = (direction == 'prev' && activeIndex === 0)
3490                || (direction == 'next' && activeIndex == (this.$items.length - 1))
3491    if (willWrap && !this.options.wrap) return active
3492    var delta = direction == 'prev' ? -1 : 1
3493    var itemIndex = (activeIndex + delta) % this.$items.length
3494    return this.$items.eq(itemIndex)
3495  }
3496
3497  Carousel.prototype.to = function (pos) {
3498    var that        = this
3499    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
3500
3501    if (pos > (this.$items.length - 1) || pos < 0) return
3502
3503    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
3504    if (activeIndex == pos) return this.pause().cycle()
3505
3506    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
3507  }
3508
3509  Carousel.prototype.pause = function (e) {
3510    e || (this.paused = true)
3511
3512    if (this.$element.find('.next, .prev').length && $.support.transition) {
3513      this.$element.trigger($.support.transition.end)
3514      this.cycle(true)
3515    }
3516
3517    this.interval = clearInterval(this.interval)
3518
3519    return this
3520  }
3521
3522  Carousel.prototype.next = function () {
3523    if (this.sliding) return
3524    return this.slide('next')
3525  }
3526
3527  Carousel.prototype.prev = function () {
3528    if (this.sliding) return
3529    return this.slide('prev')
3530  }
3531
3532  Carousel.prototype.slide = function (type, next) {
3533    var $active   = this.$element.find('.item.active')
3534    var $next     = next || this.getItemForDirection(type, $active)
3535    var isCycling = this.interval
3536    var direction = type == 'next' ? 'left' : 'right'
3537    var that      = this
3538
3539    if ($next.hasClass('active')) return (this.sliding = false)
3540
3541    var relatedTarget = $next[0]
3542    var slideEvent = $.Event('slide.bs.carousel', {
3543      relatedTarget: relatedTarget,
3544      direction: direction
3545    })
3546    this.$element.trigger(slideEvent)
3547    if (slideEvent.isDefaultPrevented()) return
3548
3549    this.sliding = true
3550
3551    isCycling && this.pause()
3552
3553    if (this.$indicators.length) {
3554      this.$indicators.find('.active').removeClass('active')
3555      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
3556      $nextIndicator && $nextIndicator.addClass('active')
3557    }
3558
3559    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
3560    if ($.support.transition && this.$element.hasClass('slide')) {
3561      $next.addClass(type)
3562      if (typeof $next === 'object' && $next.length) {
3563        $next[0].offsetWidth // force reflow
3564      }
3565      $active.addClass(direction)
3566      $next.addClass(direction)
3567      $active
3568        .one('bsTransitionEnd', function () {
3569          $next.removeClass([type, direction].join(' ')).addClass('active')
3570          $active.removeClass(['active', direction].join(' '))
3571          that.sliding = false
3572          setTimeout(function () {
3573            that.$element.trigger(slidEvent)
3574          }, 0)
3575        })
3576        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
3577    } else {
3578      $active.removeClass('active')
3579      $next.addClass('active')
3580      this.sliding = false
3581      this.$element.trigger(slidEvent)
3582    }
3583
3584    isCycling && this.cycle()
3585
3586    return this
3587  }
3588
3589
3590  // CAROUSEL PLUGIN DEFINITION
3591  // ==========================
3592
3593  function Plugin(option) {
3594    return this.each(function () {
3595      var $this   = $(this)
3596      var data    = $this.data('bs.carousel')
3597      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
3598      var action  = typeof option == 'string' ? option : options.slide
3599
3600      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
3601      if (typeof option == 'number') data.to(option)
3602      else if (action) data[action]()
3603      else if (options.interval) data.pause().cycle()
3604    })
3605  }
3606
3607  var old = $.fn.carousel
3608
3609  $.fn.carousel             = Plugin
3610  $.fn.carousel.Constructor = Carousel
3611
3612
3613  // CAROUSEL NO CONFLICT
3614  // ====================
3615
3616  $.fn.carousel.noConflict = function () {
3617    $.fn.carousel = old
3618    return this
3619  }
3620
3621
3622  // CAROUSEL DATA-API
3623  // =================
3624
3625  var clickHandler = function (e) {
3626    var $this   = $(this)
3627    var href    = $this.attr('href')
3628    if (href) {
3629      href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
3630    }
3631
3632    var target  = $this.attr('data-target') || href
3633    var $target = $(document).find(target)
3634
3635    if (!$target.hasClass('carousel')) return
3636
3637    var options = $.extend({}, $target.data(), $this.data())
3638    var slideIndex = $this.attr('data-slide-to')
3639    if (slideIndex) options.interval = false
3640
3641    Plugin.call($target, options)
3642
3643    if (slideIndex) {
3644      $target.data('bs.carousel').to(slideIndex)
3645    }
3646
3647    e.preventDefault()
3648  }
3649
3650  $(document)
3651    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
3652    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
3653
3654  $(window).on('load', function () {
3655    $('[data-ride="carousel"]').each(function () {
3656      var $carousel = $(this)
3657      Plugin.call($carousel, $carousel.data())
3658    })
3659  })
3660
3661}(jQuery);
3662;
3663/* ========================================================================
3664 * Bootstrap: collapse.js v3.4.0
3665 * https://getbootstrap.com/docs/3.4/javascript/#collapse
3666 * ========================================================================
3667 * Copyright 2011-2018 Twitter, Inc.
3668 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3669 * ======================================================================== */
3670
3671/* jshint latedef: false */
3672
3673+function ($) {
3674  'use strict';
3675
3676  // COLLAPSE PUBLIC CLASS DEFINITION
3677  // ================================
3678
3679  var Collapse = function (element, options) {
3680    this.$element      = $(element)
3681    this.options       = $.extend({}, Collapse.DEFAULTS, options)
3682    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
3683                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
3684    this.transitioning = null
3685
3686    if (this.options.parent) {
3687      this.$parent = this.getParent()
3688    } else {
3689      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
3690    }
3691
3692    if (this.options.toggle) this.toggle()
3693  }
3694
3695  Collapse.VERSION  = '3.4.0'
3696
3697  Collapse.TRANSITION_DURATION = 350
3698
3699  Collapse.DEFAULTS = {
3700    toggle: true
3701  }
3702
3703  Collapse.prototype.dimension = function () {
3704    var hasWidth = this.$element.hasClass('width')
3705    return hasWidth ? 'width' : 'height'
3706  }
3707
3708  Collapse.prototype.show = function () {
3709    if (this.transitioning || this.$element.hasClass('in')) return
3710
3711    var activesData
3712    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
3713
3714    if (actives && actives.length) {
3715      activesData = actives.data('bs.collapse')
3716      if (activesData && activesData.transitioning) return
3717    }
3718
3719    var startEvent = $.Event('show.bs.collapse')
3720    this.$element.trigger(startEvent)
3721    if (startEvent.isDefaultPrevented()) return
3722
3723    if (actives && actives.length) {
3724      Plugin.call(actives, 'hide')
3725      activesData || actives.data('bs.collapse', null)
3726    }
3727
3728    var dimension = this.dimension()
3729
3730    this.$element
3731      .removeClass('collapse')
3732      .addClass('collapsing')[dimension](0)
3733      .attr('aria-expanded', true)
3734
3735    this.$trigger
3736      .removeClass('collapsed')
3737      .attr('aria-expanded', true)
3738
3739    this.transitioning = 1
3740
3741    var complete = function () {
3742      this.$element
3743        .removeClass('collapsing')
3744        .addClass('collapse in')[dimension]('')
3745      this.transitioning = 0
3746      this.$element
3747        .trigger('shown.bs.collapse')
3748    }
3749
3750    if (!$.support.transition) return complete.call(this)
3751
3752    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
3753
3754    this.$element
3755      .one('bsTransitionEnd', $.proxy(complete, this))
3756      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
3757  }
3758
3759  Collapse.prototype.hide = function () {
3760    if (this.transitioning || !this.$element.hasClass('in')) return
3761
3762    var startEvent = $.Event('hide.bs.collapse')
3763    this.$element.trigger(startEvent)
3764    if (startEvent.isDefaultPrevented()) return
3765
3766    var dimension = this.dimension()
3767
3768    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
3769
3770    this.$element
3771      .addClass('collapsing')
3772      .removeClass('collapse in')
3773      .attr('aria-expanded', false)
3774
3775    this.$trigger
3776      .addClass('collapsed')
3777      .attr('aria-expanded', false)
3778
3779    this.transitioning = 1
3780
3781    var complete = function () {
3782      this.transitioning = 0
3783      this.$element
3784        .removeClass('collapsing')
3785        .addClass('collapse')
3786        .trigger('hidden.bs.collapse')
3787    }
3788
3789    if (!$.support.transition) return complete.call(this)
3790
3791    this.$element
3792      [dimension](0)
3793      .one('bsTransitionEnd', $.proxy(complete, this))
3794      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
3795  }
3796
3797  Collapse.prototype.toggle = function () {
3798    this[this.$element.hasClass('in') ? 'hide' : 'show']()
3799  }
3800
3801  Collapse.prototype.getParent = function () {
3802    return $(document).find(this.options.parent)
3803      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
3804      .each($.proxy(function (i, element) {
3805        var $element = $(element)
3806        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
3807      }, this))
3808      .end()
3809  }
3810
3811  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
3812    var isOpen = $element.hasClass('in')
3813
3814    $element.attr('aria-expanded', isOpen)
3815    $trigger
3816      .toggleClass('collapsed', !isOpen)
3817      .attr('aria-expanded', isOpen)
3818  }
3819
3820  function getTargetFromTrigger($trigger) {
3821    var href
3822    var target = $trigger.attr('data-target')
3823      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
3824
3825    return $(document).find(target)
3826  }
3827
3828
3829  // COLLAPSE PLUGIN DEFINITION
3830  // ==========================
3831
3832  function Plugin(option) {
3833    return this.each(function () {
3834      var $this   = $(this)
3835      var data    = $this.data('bs.collapse')
3836      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
3837
3838      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
3839      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
3840      if (typeof option == 'string') data[option]()
3841    })
3842  }
3843
3844  var old = $.fn.collapse
3845
3846  $.fn.collapse             = Plugin
3847  $.fn.collapse.Constructor = Collapse
3848
3849
3850  // COLLAPSE NO CONFLICT
3851  // ====================
3852
3853  $.fn.collapse.noConflict = function () {
3854    $.fn.collapse = old
3855    return this
3856  }
3857
3858
3859  // COLLAPSE DATA-API
3860  // =================
3861
3862  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
3863    var $this   = $(this)
3864
3865    if (!$this.attr('data-target')) e.preventDefault()
3866
3867    var $target = getTargetFromTrigger($this)
3868    var data    = $target.data('bs.collapse')
3869    var option  = data ? 'toggle' : $this.data()
3870
3871    Plugin.call($target, option)
3872  })
3873
3874}(jQuery);
3875;
3876/* ========================================================================
3877 * Bootstrap: dropdown.js v3.4.0
3878 * https://getbootstrap.com/docs/3.4/javascript/#dropdowns
3879 * ========================================================================
3880 * Copyright 2011-2018 Twitter, Inc.
3881 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3882 * ======================================================================== */
3883
3884
3885+function ($) {
3886  'use strict';
3887
3888  // DROPDOWN CLASS DEFINITION
3889  // =========================
3890
3891  var backdrop = '.dropdown-backdrop'
3892  var toggle   = '[data-toggle="dropdown"]'
3893  var Dropdown = function (element) {
3894    $(element).on('click.bs.dropdown', this.toggle)
3895  }
3896
3897  Dropdown.VERSION = '3.4.0'
3898
3899  function getParent($this) {
3900    var selector = $this.attr('data-target')
3901
3902    if (!selector) {
3903      selector = $this.attr('href')
3904      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
3905    }
3906
3907    var $parent = selector && $(document).find(selector)
3908
3909    return $parent && $parent.length ? $parent : $this.parent()
3910  }
3911
3912  function clearMenus(e) {
3913    if (e && e.which === 3) return
3914    $(backdrop).remove()
3915    $(toggle).each(function () {
3916      var $this         = $(this)
3917      var $parent       = getParent($this)
3918      var relatedTarget = { relatedTarget: this }
3919
3920      if (!$parent.hasClass('open')) return
3921
3922      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
3923
3924      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
3925
3926      if (e.isDefaultPrevented()) return
3927
3928      $this.attr('aria-expanded', 'false')
3929      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
3930    })
3931  }
3932
3933  Dropdown.prototype.toggle = function (e) {
3934    var $this = $(this)
3935
3936    if ($this.is('.disabled, :disabled')) return
3937
3938    var $parent  = getParent($this)
3939    var isActive = $parent.hasClass('open')
3940
3941    clearMenus()
3942
3943    if (!isActive) {
3944      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
3945        // if mobile we use a backdrop because click events don't delegate
3946        $(document.createElement('div'))
3947          .addClass('dropdown-backdrop')
3948          .insertAfter($(this))
3949          .on('click', clearMenus)
3950      }
3951
3952      var relatedTarget = { relatedTarget: this }
3953      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
3954
3955      if (e.isDefaultPrevented()) return
3956
3957      $this
3958        .trigger('focus')
3959        .attr('aria-expanded', 'true')
3960
3961      $parent
3962        .toggleClass('open')
3963        .trigger($.Event('shown.bs.dropdown', relatedTarget))
3964    }
3965
3966    return false
3967  }
3968
3969  Dropdown.prototype.keydown = function (e) {
3970    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
3971
3972    var $this = $(this)
3973
3974    e.preventDefault()
3975    e.stopPropagation()
3976
3977    if ($this.is('.disabled, :disabled')) return
3978
3979    var $parent  = getParent($this)
3980    var isActive = $parent.hasClass('open')
3981
3982    if (!isActive && e.which != 27 || isActive && e.which == 27) {
3983      if (e.which == 27) $parent.find(toggle).trigger('focus')
3984      return $this.trigger('click')
3985    }
3986
3987    var desc = ' li:not(.disabled):visible a'
3988    var $items = $parent.find('.dropdown-menu' + desc)
3989
3990    if (!$items.length) return
3991
3992    var index = $items.index(e.target)
3993
3994    if (e.which == 38 && index > 0)                 index--         // up
3995    if (e.which == 40 && index < $items.length - 1) index++         // down
3996    if (!~index)                                    index = 0
3997
3998    $items.eq(index).trigger('focus')
3999  }
4000
4001
4002  // DROPDOWN PLUGIN DEFINITION
4003  // ==========================
4004
4005  function Plugin(option) {
4006    return this.each(function () {
4007      var $this = $(this)
4008      var data  = $this.data('bs.dropdown')
4009
4010      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
4011      if (typeof option == 'string') data[option].call($this)
4012    })
4013  }
4014
4015  var old = $.fn.dropdown
4016
4017  $.fn.dropdown             = Plugin
4018  $.fn.dropdown.Constructor = Dropdown
4019
4020
4021  // DROPDOWN NO CONFLICT
4022  // ====================
4023
4024  $.fn.dropdown.noConflict = function () {
4025    $.fn.dropdown = old
4026    return this
4027  }
4028
4029
4030  // APPLY TO STANDARD DROPDOWN ELEMENTS
4031  // ===================================
4032
4033  $(document)
4034    .on('click.bs.dropdown.data-api', clearMenus)
4035    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
4036    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
4037    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
4038    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
4039
4040}(jQuery);
4041;
4042/* ========================================================================
4043 * Bootstrap: modal.js v3.4.0
4044 * https://getbootstrap.com/docs/3.4/javascript/#modals
4045 * ========================================================================
4046 * Copyright 2011-2018 Twitter, Inc.
4047 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4048 * ======================================================================== */
4049
4050
4051+function ($) {
4052  'use strict';
4053
4054  // MODAL CLASS DEFINITION
4055  // ======================
4056
4057  var Modal = function (element, options) {
4058    this.options = options
4059    this.$body = $(document.body)
4060    this.$element = $(element)
4061    this.$dialog = this.$element.find('.modal-dialog')
4062    this.$backdrop = null
4063    this.isShown = null
4064    this.originalBodyPad = null
4065    this.scrollbarWidth = 0
4066    this.ignoreBackdropClick = false
4067    this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'
4068
4069    if (this.options.remote) {
4070      this.$element
4071        .find('.modal-content')
4072        .load(this.options.remote, $.proxy(function () {
4073          this.$element.trigger('loaded.bs.modal')
4074        }, this))
4075    }
4076  }
4077
4078  Modal.VERSION = '3.4.0'
4079
4080  Modal.TRANSITION_DURATION = 300
4081  Modal.BACKDROP_TRANSITION_DURATION = 150
4082
4083  Modal.DEFAULTS = {
4084    backdrop: true,
4085    keyboard: true,
4086    show: true
4087  }
4088
4089  Modal.prototype.toggle = function (_relatedTarget) {
4090    return this.isShown ? this.hide() : this.show(_relatedTarget)
4091  }
4092
4093  Modal.prototype.show = function (_relatedTarget) {
4094    var that = this
4095    var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
4096
4097    this.$element.trigger(e)
4098
4099    if (this.isShown || e.isDefaultPrevented()) return
4100
4101    this.isShown = true
4102
4103    this.checkScrollbar()
4104    this.setScrollbar()
4105    this.$body.addClass('modal-open')
4106
4107    this.escape()
4108    this.resize()
4109
4110    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
4111
4112    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
4113      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
4114        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
4115      })
4116    })
4117
4118    this.backdrop(function () {
4119      var transition = $.support.transition && that.$element.hasClass('fade')
4120
4121      if (!that.$element.parent().length) {
4122        that.$element.appendTo(that.$body) // don't move modals dom position
4123      }
4124
4125      that.$element
4126        .show()
4127        .scrollTop(0)
4128
4129      that.adjustDialog()
4130
4131      if (transition) {
4132        that.$element[0].offsetWidth // force reflow
4133      }
4134
4135      that.$element.addClass('in')
4136
4137      that.enforceFocus()
4138
4139      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
4140
4141      transition ?
4142        that.$dialog // wait for modal to slide in
4143          .one('bsTransitionEnd', function () {
4144            that.$element.trigger('focus').trigger(e)
4145          })
4146          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
4147        that.$element.trigger('focus').trigger(e)
4148    })
4149  }
4150
4151  Modal.prototype.hide = function (e) {
4152    if (e) e.preventDefault()
4153
4154    e = $.Event('hide.bs.modal')
4155
4156    this.$element.trigger(e)
4157
4158    if (!this.isShown || e.isDefaultPrevented()) return
4159
4160    this.isShown = false
4161
4162    this.escape()
4163    this.resize()
4164
4165    $(document).off('focusin.bs.modal')
4166
4167    this.$element
4168      .removeClass('in')
4169      .off('click.dismiss.bs.modal')
4170      .off('mouseup.dismiss.bs.modal')
4171
4172    this.$dialog.off('mousedown.dismiss.bs.modal')
4173
4174    $.support.transition && this.$element.hasClass('fade') ?
4175      this.$element
4176        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
4177        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
4178      this.hideModal()
4179  }
4180
4181  Modal.prototype.enforceFocus = function () {
4182    $(document)
4183      .off('focusin.bs.modal') // guard against infinite focus loop
4184      .on('focusin.bs.modal', $.proxy(function (e) {
4185        if (document !== e.target &&
4186          this.$element[0] !== e.target &&
4187          !this.$element.has(e.target).length) {
4188          this.$element.trigger('focus')
4189        }
4190      }, this))
4191  }
4192
4193  Modal.prototype.escape = function () {
4194    if (this.isShown && this.options.keyboard) {
4195      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
4196        e.which == 27 && this.hide()
4197      }, this))
4198    } else if (!this.isShown) {
4199      this.$element.off('keydown.dismiss.bs.modal')
4200    }
4201  }
4202
4203  Modal.prototype.resize = function () {
4204    if (this.isShown) {
4205      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
4206    } else {
4207      $(window).off('resize.bs.modal')
4208    }
4209  }
4210
4211  Modal.prototype.hideModal = function () {
4212    var that = this
4213    this.$element.hide()
4214    this.backdrop(function () {
4215      that.$body.removeClass('modal-open')
4216      that.resetAdjustments()
4217      that.resetScrollbar()
4218      that.$element.trigger('hidden.bs.modal')
4219    })
4220  }
4221
4222  Modal.prototype.removeBackdrop = function () {
4223    this.$backdrop && this.$backdrop.remove()
4224    this.$backdrop = null
4225  }
4226
4227  Modal.prototype.backdrop = function (callback) {
4228    var that = this
4229    var animate = this.$element.hasClass('fade') ? 'fade' : ''
4230
4231    if (this.isShown && this.options.backdrop) {
4232      var doAnimate = $.support.transition && animate
4233
4234      this.$backdrop = $(document.createElement('div'))
4235        .addClass('modal-backdrop ' + animate)
4236        .appendTo(this.$body)
4237
4238      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
4239        if (this.ignoreBackdropClick) {
4240          this.ignoreBackdropClick = false
4241          return
4242        }
4243        if (e.target !== e.currentTarget) return
4244        this.options.backdrop == 'static'
4245          ? this.$element[0].focus()
4246          : this.hide()
4247      }, this))
4248
4249      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
4250
4251      this.$backdrop.addClass('in')
4252
4253      if (!callback) return
4254
4255      doAnimate ?
4256        this.$backdrop
4257          .one('bsTransitionEnd', callback)
4258          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
4259        callback()
4260
4261    } else if (!this.isShown && this.$backdrop) {
4262      this.$backdrop.removeClass('in')
4263
4264      var callbackRemove = function () {
4265        that.removeBackdrop()
4266        callback && callback()
4267      }
4268      $.support.transition && this.$element.hasClass('fade') ?
4269        this.$backdrop
4270          .one('bsTransitionEnd', callbackRemove)
4271          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
4272        callbackRemove()
4273
4274    } else if (callback) {
4275      callback()
4276    }
4277  }
4278
4279  // these following methods are used to handle overflowing modals
4280
4281  Modal.prototype.handleUpdate = function () {
4282    this.adjustDialog()
4283  }
4284
4285  Modal.prototype.adjustDialog = function () {
4286    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
4287
4288    this.$element.css({
4289      paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
4290      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
4291    })
4292  }
4293
4294  Modal.prototype.resetAdjustments = function () {
4295    this.$element.css({
4296      paddingLeft: '',
4297      paddingRight: ''
4298    })
4299  }
4300
4301  Modal.prototype.checkScrollbar = function () {
4302    var fullWindowWidth = window.innerWidth
4303    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
4304      var documentElementRect = document.documentElement.getBoundingClientRect()
4305      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
4306    }
4307    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
4308    this.scrollbarWidth = this.measureScrollbar()
4309  }
4310
4311  Modal.prototype.setScrollbar = function () {
4312    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
4313    this.originalBodyPad = document.body.style.paddingRight || ''
4314    var scrollbarWidth = this.scrollbarWidth
4315    if (this.bodyIsOverflowing) {
4316      this.$body.css('padding-right', bodyPad + scrollbarWidth)
4317      $(this.fixedContent).each(function (index, element) {
4318        var actualPadding = element.style.paddingRight
4319        var calculatedPadding = $(element).css('padding-right')
4320        $(element)
4321          .data('padding-right', actualPadding)
4322          .css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')
4323      })
4324    }
4325  }
4326
4327  Modal.prototype.resetScrollbar = function () {
4328    this.$body.css('padding-right', this.originalBodyPad)
4329    $(this.fixedContent).each(function (index, element) {
4330      var padding = $(element).data('padding-right')
4331      $(element).removeData('padding-right')
4332      element.style.paddingRight = padding ? padding : ''
4333    })
4334  }
4335
4336  Modal.prototype.measureScrollbar = function () { // thx walsh
4337    var scrollDiv = document.createElement('div')
4338    scrollDiv.className = 'modal-scrollbar-measure'
4339    this.$body.append(scrollDiv)
4340    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
4341    this.$body[0].removeChild(scrollDiv)
4342    return scrollbarWidth
4343  }
4344
4345
4346  // MODAL PLUGIN DEFINITION
4347  // =======================
4348
4349  function Plugin(option, _relatedTarget) {
4350    return this.each(function () {
4351      var $this = $(this)
4352      var data = $this.data('bs.modal')
4353      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
4354
4355      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
4356      if (typeof option == 'string') data[option](_relatedTarget)
4357      else if (options.show) data.show(_relatedTarget)
4358    })
4359  }
4360
4361  var old = $.fn.modal
4362
4363  $.fn.modal = Plugin
4364  $.fn.modal.Constructor = Modal
4365
4366
4367  // MODAL NO CONFLICT
4368  // =================
4369
4370  $.fn.modal.noConflict = function () {
4371    $.fn.modal = old
4372    return this
4373  }
4374
4375
4376  // MODAL DATA-API
4377  // ==============
4378
4379  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
4380    var $this = $(this)
4381    var href = $this.attr('href')
4382    var target = $this.attr('data-target') ||
4383      (href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
4384
4385    var $target = $(document).find(target)
4386    var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
4387
4388    if ($this.is('a')) e.preventDefault()
4389
4390    $target.one('show.bs.modal', function (showEvent) {
4391      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
4392      $target.one('hidden.bs.modal', function () {
4393        $this.is(':visible') && $this.trigger('focus')
4394      })
4395    })
4396    Plugin.call($target, option, this)
4397  })
4398
4399}(jQuery);
4400;
4401/* ========================================================================
4402 * Bootstrap: tooltip.js v3.4.0
4403 * https://getbootstrap.com/docs/3.4/javascript/#tooltip
4404 * Inspired by the original jQuery.tipsy by Jason Frame
4405 * ========================================================================
4406 * Copyright 2011-2018 Twitter, Inc.
4407 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4408 * ======================================================================== */
4409
4410
4411+function ($) {
4412  'use strict';
4413
4414  // TOOLTIP PUBLIC CLASS DEFINITION
4415  // ===============================
4416
4417  var Tooltip = function (element, options) {
4418    this.type       = null
4419    this.options    = null
4420    this.enabled    = null
4421    this.timeout    = null
4422    this.hoverState = null
4423    this.$element   = null
4424    this.inState    = null
4425
4426    this.init('tooltip', element, options)
4427  }
4428
4429  Tooltip.VERSION  = '3.4.0'
4430
4431  Tooltip.TRANSITION_DURATION = 150
4432
4433  Tooltip.DEFAULTS = {
4434    animation: true,
4435    placement: 'top',
4436    selector: false,
4437    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
4438    trigger: 'hover focus',
4439    title: '',
4440    delay: 0,
4441    html: false,
4442    container: false,
4443    viewport: {
4444      selector: 'body',
4445      padding: 0
4446    }
4447  }
4448
4449  Tooltip.prototype.init = function (type, element, options) {
4450    this.enabled   = true
4451    this.type      = type
4452    this.$element  = $(element)
4453    this.options   = this.getOptions(options)
4454    this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
4455    this.inState   = { click: false, hover: false, focus: false }
4456
4457    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
4458      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
4459    }
4460
4461    var triggers = this.options.trigger.split(' ')
4462
4463    for (var i = triggers.length; i--;) {
4464      var trigger = triggers[i]
4465
4466      if (trigger == 'click') {
4467        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
4468      } else if (trigger != 'manual') {
4469        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
4470        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
4471
4472        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
4473        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
4474      }
4475    }
4476
4477    this.options.selector ?
4478      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
4479      this.fixTitle()
4480  }
4481
4482  Tooltip.prototype.getDefaults = function () {
4483    return Tooltip.DEFAULTS
4484  }
4485
4486  Tooltip.prototype.getOptions = function (options) {
4487    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
4488
4489    if (options.delay && typeof options.delay == 'number') {
4490      options.delay = {
4491        show: options.delay,
4492        hide: options.delay
4493      }
4494    }
4495
4496    return options
4497  }
4498
4499  Tooltip.prototype.getDelegateOptions = function () {
4500    var options  = {}
4501    var defaults = this.getDefaults()
4502
4503    this._options && $.each(this._options, function (key, value) {
4504      if (defaults[key] != value) options[key] = value
4505    })
4506
4507    return options
4508  }
4509
4510  Tooltip.prototype.enter = function (obj) {
4511    var self = obj instanceof this.constructor ?
4512      obj : $(obj.currentTarget).data('bs.' + this.type)
4513
4514    if (!self) {
4515      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
4516      $(obj.currentTarget).data('bs.' + this.type, self)
4517    }
4518
4519    if (obj instanceof $.Event) {
4520      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
4521    }
4522
4523    if (self.tip().hasClass('in') || self.hoverState == 'in') {
4524      self.hoverState = 'in'
4525      return
4526    }
4527
4528    clearTimeout(self.timeout)
4529
4530    self.hoverState = 'in'
4531
4532    if (!self.options.delay || !self.options.delay.show) return self.show()
4533
4534    self.timeout = setTimeout(function () {
4535      if (self.hoverState == 'in') self.show()
4536    }, self.options.delay.show)
4537  }
4538
4539  Tooltip.prototype.isInStateTrue = function () {
4540    for (var key in this.inState) {
4541      if (this.inState[key]) return true
4542    }
4543
4544    return false
4545  }
4546
4547  Tooltip.prototype.leave = function (obj) {
4548    var self = obj instanceof this.constructor ?
4549      obj : $(obj.currentTarget).data('bs.' + this.type)
4550
4551    if (!self) {
4552      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
4553      $(obj.currentTarget).data('bs.' + this.type, self)
4554    }
4555
4556    if (obj instanceof $.Event) {
4557      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
4558    }
4559
4560    if (self.isInStateTrue()) return
4561
4562    clearTimeout(self.timeout)
4563
4564    self.hoverState = 'out'
4565
4566    if (!self.options.delay || !self.options.delay.hide) return self.hide()
4567
4568    self.timeout = setTimeout(function () {
4569      if (self.hoverState == 'out') self.hide()
4570    }, self.options.delay.hide)
4571  }
4572
4573  Tooltip.prototype.show = function () {
4574    var e = $.Event('show.bs.' + this.type)
4575
4576    if (this.hasContent() && this.enabled) {
4577      this.$element.trigger(e)
4578
4579      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
4580      if (e.isDefaultPrevented() || !inDom) return
4581      var that = this
4582
4583      var $tip = this.tip()
4584
4585      var tipId = this.getUID(this.type)
4586
4587      this.setContent()
4588      $tip.attr('id', tipId)
4589      this.$element.attr('aria-describedby', tipId)
4590
4591      if (this.options.animation) $tip.addClass('fade')
4592
4593      var placement = typeof this.options.placement == 'function' ?
4594        this.options.placement.call(this, $tip[0], this.$element[0]) :
4595        this.options.placement
4596
4597      var autoToken = /\s?auto?\s?/i
4598      var autoPlace = autoToken.test(placement)
4599      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
4600
4601      $tip
4602        .detach()
4603        .css({ top: 0, left: 0, display: 'block' })
4604        .addClass(placement)
4605        .data('bs.' + this.type, this)
4606
4607      this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)
4608      this.$element.trigger('inserted.bs.' + this.type)
4609
4610      var pos          = this.getPosition()
4611      var actualWidth  = $tip[0].offsetWidth
4612      var actualHeight = $tip[0].offsetHeight
4613
4614      if (autoPlace) {
4615        var orgPlacement = placement
4616        var viewportDim = this.getPosition(this.$viewport)
4617
4618        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
4619                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
4620                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
4621                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
4622                    placement
4623
4624        $tip
4625          .removeClass(orgPlacement)
4626          .addClass(placement)
4627      }
4628
4629      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
4630
4631      this.applyPlacement(calculatedOffset, placement)
4632
4633      var complete = function () {
4634        var prevHoverState = that.hoverState
4635        that.$element.trigger('shown.bs.' + that.type)
4636        that.hoverState = null
4637
4638        if (prevHoverState == 'out') that.leave(that)
4639      }
4640
4641      $.support.transition && this.$tip.hasClass('fade') ?
4642        $tip
4643          .one('bsTransitionEnd', complete)
4644          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
4645        complete()
4646    }
4647  }
4648
4649  Tooltip.prototype.applyPlacement = function (offset, placement) {
4650    var $tip   = this.tip()
4651    var width  = $tip[0].offsetWidth
4652    var height = $tip[0].offsetHeight
4653
4654    // manually read margins because getBoundingClientRect includes difference
4655    var marginTop = parseInt($tip.css('margin-top'), 10)
4656    var marginLeft = parseInt($tip.css('margin-left'), 10)
4657
4658    // we must check for NaN for ie 8/9
4659    if (isNaN(marginTop))  marginTop  = 0
4660    if (isNaN(marginLeft)) marginLeft = 0
4661
4662    offset.top  += marginTop
4663    offset.left += marginLeft
4664
4665    // $.fn.offset doesn't round pixel values
4666    // so we use setOffset directly with our own function B-0
4667    $.offset.setOffset($tip[0], $.extend({
4668      using: function (props) {
4669        $tip.css({
4670          top: Math.round(props.top),
4671          left: Math.round(props.left)
4672        })
4673      }
4674    }, offset), 0)
4675
4676    $tip.addClass('in')
4677
4678    // check to see if placing tip in new offset caused the tip to resize itself
4679    var actualWidth  = $tip[0].offsetWidth
4680    var actualHeight = $tip[0].offsetHeight
4681
4682    if (placement == 'top' && actualHeight != height) {
4683      offset.top = offset.top + height - actualHeight
4684    }
4685
4686    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
4687
4688    if (delta.left) offset.left += delta.left
4689    else offset.top += delta.top
4690
4691    var isVertical          = /top|bottom/.test(placement)
4692    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
4693    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
4694
4695    $tip.offset(offset)
4696    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
4697  }
4698
4699  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
4700    this.arrow()
4701      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
4702      .css(isVertical ? 'top' : 'left', '')
4703  }
4704
4705  Tooltip.prototype.setContent = function () {
4706    var $tip  = this.tip()
4707    var title = this.getTitle()
4708
4709    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
4710    $tip.removeClass('fade in top bottom left right')
4711  }
4712
4713  Tooltip.prototype.hide = function (callback) {
4714    var that = this
4715    var $tip = $(this.$tip)
4716    var e    = $.Event('hide.bs.' + this.type)
4717
4718    function complete() {
4719      if (that.hoverState != 'in') $tip.detach()
4720      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
4721        that.$element
4722          .removeAttr('aria-describedby')
4723          .trigger('hidden.bs.' + that.type)
4724      }
4725      callback && callback()
4726    }
4727
4728    this.$element.trigger(e)
4729
4730    if (e.isDefaultPrevented()) return
4731
4732    $tip.removeClass('in')
4733
4734    $.support.transition && $tip.hasClass('fade') ?
4735      $tip
4736        .one('bsTransitionEnd', complete)
4737        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
4738      complete()
4739
4740    this.hoverState = null
4741
4742    return this
4743  }
4744
4745  Tooltip.prototype.fixTitle = function () {
4746    var $e = this.$element
4747    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
4748      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
4749    }
4750  }
4751
4752  Tooltip.prototype.hasContent = function () {
4753    return this.getTitle()
4754  }
4755
4756  Tooltip.prototype.getPosition = function ($element) {
4757    $element   = $element || this.$element
4758
4759    var el     = $element[0]
4760    var isBody = el.tagName == 'BODY'
4761
4762    var elRect    = el.getBoundingClientRect()
4763    if (elRect.width == null) {
4764      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
4765      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
4766    }
4767    var isSvg = window.SVGElement && el instanceof window.SVGElement
4768    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
4769    // See https://github.com/twbs/bootstrap/issues/20280
4770    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
4771    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
4772    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
4773
4774    return $.extend({}, elRect, scroll, outerDims, elOffset)
4775  }
4776
4777  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
4778    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
4779           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
4780           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
4781        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
4782
4783  }
4784
4785  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
4786    var delta = { top: 0, left: 0 }
4787    if (!this.$viewport) return delta
4788
4789    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
4790    var viewportDimensions = this.getPosition(this.$viewport)
4791
4792    if (/right|left/.test(placement)) {
4793      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
4794      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
4795      if (topEdgeOffset < viewportDimensions.top) { // top overflow
4796        delta.top = viewportDimensions.top - topEdgeOffset
4797      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
4798        delta.top = viewportDimensions.top + viewportDimensions.height - bottom
vendor: 15,443 bytes, lines 4798-5371
4798EdgeOffset
4799      }
4800    } else {
4801      var leftEdgeOffset  = pos.left - viewportPadding
4802      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
4803      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
4804        delta.left = viewportDimensions.left - leftEdgeOffset
4805      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
4806        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
4807      }
4808    }
4809
4810    return delta
4811  }
4812
4813  Tooltip.prototype.getTitle = function () {
4814    var title
4815    var $e = this.$element
4816    var o  = this.options
4817
4818    title = $e.attr('data-original-title')
4819      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
4820
4821    return title
4822  }
4823
4824  Tooltip.prototype.getUID = function (prefix) {
4825    do prefix += ~~(Math.random() * 1000000)
4826    while (document.getElementById(prefix))
4827    return prefix
4828  }
4829
4830  Tooltip.prototype.tip = function () {
4831    if (!this.$tip) {
4832      this.$tip = $(this.options.template)
4833      if (this.$tip.length != 1) {
4834        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
4835      }
4836    }
4837    return this.$tip
4838  }
4839
4840  Tooltip.prototype.arrow = function () {
4841    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
4842  }
4843
4844  Tooltip.prototype.enable = function () {
4845    this.enabled = true
4846  }
4847
4848  Tooltip.prototype.disable = function () {
4849    this.enabled = false
4850  }
4851
4852  Tooltip.prototype.toggleEnabled = function () {
4853    this.enabled = !this.enabled
4854  }
4855
4856  Tooltip.prototype.toggle = function (e) {
4857    var self = this
4858    if (e) {
4859      self = $(e.currentTarget).data('bs.' + this.type)
4860      if (!self) {
4861        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
4862        $(e.currentTarget).data('bs.' + this.type, self)
4863      }
4864    }
4865
4866    if (e) {
4867      self.inState.click = !self.inState.click
4868      if (self.isInStateTrue()) self.enter(self)
4869      else self.leave(self)
4870    } else {
4871      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
4872    }
4873  }
4874
4875  Tooltip.prototype.destroy = function () {
4876    var that = this
4877    clearTimeout(this.timeout)
4878    this.hide(function () {
4879      that.$element.off('.' + that.type).removeData('bs.' + that.type)
4880      if (that.$tip) {
4881        that.$tip.detach()
4882      }
4883      that.$tip = null
4884      that.$arrow = null
4885      that.$viewport = null
4886      that.$element = null
4887    })
4888  }
4889
4890
4891  // TOOLTIP PLUGIN DEFINITION
4892  // =========================
4893
4894  function Plugin(option) {
4895    return this.each(function () {
4896      var $this   = $(this)
4897      var data    = $this.data('bs.tooltip')
4898      var options = typeof option == 'object' && option
4899
4900      if (!data && /destroy|hide/.test(option)) return
4901      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
4902      if (typeof option == 'string') data[option]()
4903    })
4904  }
4905
4906  var old = $.fn.tooltip
4907
4908  $.fn.tooltip             = Plugin
4909  $.fn.tooltip.Constructor = Tooltip
4910
4911
4912  // TOOLTIP NO CONFLICT
4913  // ===================
4914
4915  $.fn.tooltip.noConflict = function () {
4916    $.fn.tooltip = old
4917    return this
4918  }
4919
4920}(jQuery);
4921;
4922/* ========================================================================
4923 * Bootstrap: popover.js v3.4.0
4924 * https://getbootstrap.com/docs/3.4/javascript/#popovers
4925 * ========================================================================
4926 * Copyright 2011-2018 Twitter, Inc.
4927 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4928 * ======================================================================== */
4929
4930
4931+function ($) {
4932  'use strict';
4933
4934  // POPOVER PUBLIC CLASS DEFINITION
4935  // ===============================
4936
4937  var Popover = function (element, options) {
4938    this.init('popover', element, options)
4939  }
4940
4941  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
4942
4943  Popover.VERSION  = '3.4.0'
4944
4945  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
4946    placement: 'right',
4947    trigger: 'click',
4948    content: '',
4949    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
4950  })
4951
4952
4953  // NOTE: POPOVER EXTENDS tooltip.js
4954  // ================================
4955
4956  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
4957
4958  Popover.prototype.constructor = Popover
4959
4960  Popover.prototype.getDefaults = function () {
4961    return Popover.DEFAULTS
4962  }
4963
4964  Popover.prototype.setContent = function () {
4965    var $tip    = this.tip()
4966    var title   = this.getTitle()
4967    var content = this.getContent()
4968
4969    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
4970    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
4971      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
4972    ](content)
4973
4974    $tip.removeClass('fade top bottom left right in')
4975
4976    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
4977    // this manually by checking the contents.
4978    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
4979  }
4980
4981  Popover.prototype.hasContent = function () {
4982    return this.getTitle() || this.getContent()
4983  }
4984
4985  Popover.prototype.getContent = function () {
4986    var $e = this.$element
4987    var o  = this.options
4988
4989    return $e.attr('data-content')
4990      || (typeof o.content == 'function' ?
4991        o.content.call($e[0]) :
4992        o.content)
4993  }
4994
4995  Popover.prototype.arrow = function () {
4996    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
4997  }
4998
4999
5000  // POPOVER PLUGIN DEFINITION
5001  // =========================
5002
5003  function Plugin(option) {
5004    return this.each(function () {
5005      var $this   = $(this)
5006      var data    = $this.data('bs.popover')
5007      var options = typeof option == 'object' && option
5008
5009      if (!data && /destroy|hide/.test(option)) return
5010      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
5011      if (typeof option == 'string') data[option]()
5012    })
5013  }
5014
5015  var old = $.fn.popover
5016
5017  $.fn.popover             = Plugin
5018  $.fn.popover.Constructor = Popover
5019
5020
5021  // POPOVER NO CONFLICT
5022  // ===================
5023
5024  $.fn.popover.noConflict = function () {
5025    $.fn.popover = old
5026    return this
5027  }
5028
5029}(jQuery);
5030;
5031/* ========================================================================
5032 * Bootstrap: scrollspy.js v3.4.0
5033 * https://getbootstrap.com/docs/3.4/javascript/#scrollspy
5034 * ========================================================================
5035 * Copyright 2011-2018 Twitter, Inc.
5036 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5037 * ======================================================================== */
5038
5039
5040+function ($) {
5041  'use strict';
5042
5043  // SCROLLSPY CLASS DEFINITION
5044  // ==========================
5045
5046  function ScrollSpy(element, options) {
5047    this.$body          = $(document.body)
5048    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
5049    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
5050    this.selector       = (this.options.target || '') + ' .nav li > a'
5051    this.offsets        = []
5052    this.targets        = []
5053    this.activeTarget   = null
5054    this.scrollHeight   = 0
5055
5056    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
5057    this.refresh()
5058    this.process()
5059  }
5060
5061  ScrollSpy.VERSION  = '3.4.0'
5062
5063  ScrollSpy.DEFAULTS = {
5064    offset: 10
5065  }
5066
5067  ScrollSpy.prototype.getScrollHeight = function () {
5068    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
5069  }
5070
5071  ScrollSpy.prototype.refresh = function () {
5072    var that          = this
5073    var offsetMethod  = 'offset'
5074    var offsetBase    = 0
5075
5076    this.offsets      = []
5077    this.targets      = []
5078    this.scrollHeight = this.getScrollHeight()
5079
5080    if (!$.isWindow(this.$scrollElement[0])) {
5081      offsetMethod = 'position'
5082      offsetBase   = this.$scrollElement.scrollTop()
5083    }
5084
5085    this.$body
5086      .find(this.selector)
5087      .map(function () {
5088        var $el   = $(this)
5089        var href  = $el.data('target') || $el.attr('href')
5090        var $href = /^#./.test(href) && $(href)
5091
5092        return ($href
5093          && $href.length
5094          && $href.is(':visible')
5095          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
5096      })
5097      .sort(function (a, b) { return a[0] - b[0] })
5098      .each(function () {
5099        that.offsets.push(this[0])
5100        that.targets.push(this[1])
5101      })
5102  }
5103
5104  ScrollSpy.prototype.process = function () {
5105    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
5106    var scrollHeight = this.getScrollHeight()
5107    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
5108    var offsets      = this.offsets
5109    var targets      = this.targets
5110    var activeTarget = this.activeTarget
5111    var i
5112
5113    if (this.scrollHeight != scrollHeight) {
5114      this.refresh()
5115    }
5116
5117    if (scrollTop >= maxScroll) {
5118      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
5119    }
5120
5121    if (activeTarget && scrollTop < offsets[0]) {
5122      this.activeTarget = null
5123      return this.clear()
5124    }
5125
5126    for (i = offsets.length; i--;) {
5127      activeTarget != targets[i]
5128        && scrollTop >= offsets[i]
5129        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
5130        && this.activate(targets[i])
5131    }
5132  }
5133
5134  ScrollSpy.prototype.activate = function (target) {
5135    this.activeTarget = target
5136
5137    this.clear()
5138
5139    var selector = this.selector +
5140      '[data-target="' + target + '"],' +
5141      this.selector + '[href="' + target + '"]'
5142
5143    var active = $(selector)
5144      .parents('li')
5145      .addClass('active')
5146
5147    if (active.parent('.dropdown-menu').length) {
5148      active = active
5149        .closest('li.dropdown')
5150        .addClass('active')
5151    }
5152
5153    active.trigger('activate.bs.scrollspy')
5154  }
5155
5156  ScrollSpy.prototype.clear = function () {
5157    $(this.selector)
5158      .parentsUntil(this.options.target, '.active')
5159      .removeClass('active')
5160  }
5161
5162
5163  // SCROLLSPY PLUGIN DEFINITION
5164  // ===========================
5165
5166  function Plugin(option) {
5167    return this.each(function () {
5168      var $this   = $(this)
5169      var data    = $this.data('bs.scrollspy')
5170      var options = typeof option == 'object' && option
5171
5172      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
5173      if (typeof option == 'string') data[option]()
5174    })
5175  }
5176
5177  var old = $.fn.scrollspy
5178
5179  $.fn.scrollspy             = Plugin
5180  $.fn.scrollspy.Constructor = ScrollSpy
5181
5182
5183  // SCROLLSPY NO CONFLICT
5184  // =====================
5185
5186  $.fn.scrollspy.noConflict = function () {
5187    $.fn.scrollspy = old
5188    return this
5189  }
5190
5191
5192  // SCROLLSPY DATA-API
5193  // ==================
5194
5195  $(window).on('load.bs.scrollspy.data-api', function () {
5196    $('[data-spy="scroll"]').each(function () {
5197      var $spy = $(this)
5198      Plugin.call($spy, $spy.data())
5199    })
5200  })
5201
5202}(jQuery);
5203;
5204/* ========================================================================
5205 * Bootstrap: tab.js v3.4.0
5206 * https://getbootstrap.com/docs/3.4/javascript/#tabs
5207 * ========================================================================
5208 * Copyright 2011-2018 Twitter, Inc.
5209 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5210 * ======================================================================== */
5211
5212
5213+function ($) {
5214  'use strict';
5215
5216  // TAB CLASS DEFINITION
5217  // ====================
5218
5219  var Tab = function (element) {
5220    // jscs:disable requireDollarBeforejQueryAssignment
5221    this.element = $(element)
5222    // jscs:enable requireDollarBeforejQueryAssignment
5223  }
5224
5225  Tab.VERSION = '3.4.0'
5226
5227  Tab.TRANSITION_DURATION = 150
5228
5229  Tab.prototype.show = function () {
5230    var $this    = this.element
5231    var $ul      = $this.closest('ul:not(.dropdown-menu)')
5232    var selector = $this.data('target')
5233
5234    if (!selector) {
5235      selector = $this.attr('href')
5236      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
5237    }
5238
5239    if ($this.parent('li').hasClass('active')) return
5240
5241    var $previous = $ul.find('.active:last a')
5242    var hideEvent = $.Event('hide.bs.tab', {
5243      relatedTarget: $this[0]
5244    })
5245    var showEvent = $.Event('show.bs.tab', {
5246      relatedTarget: $previous[0]
5247    })
5248
5249    $previous.trigger(hideEvent)
5250    $this.trigger(showEvent)
5251
5252    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
5253
5254    var $target = $(document).find(selector)
5255
5256    this.activate($this.closest('li'), $ul)
5257    this.activate($target, $target.parent(), function () {
5258      $previous.trigger({
5259        type: 'hidden.bs.tab',
5260        relatedTarget: $this[0]
5261      })
5262      $this.trigger({
5263        type: 'shown.bs.tab',
5264        relatedTarget: $previous[0]
5265      })
5266    })
5267  }
5268
5269  Tab.prototype.activate = function (element, container, callback) {
5270    var $active    = container.find('> .active')
5271    var transition = callback
5272      && $.support.transition
5273      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
5274
5275    function next() {
5276      $active
5277        .removeClass('active')
5278        .find('> .dropdown-menu > .active')
5279        .removeClass('active')
5280        .end()
5281        .find('[data-toggle="tab"]')
5282        .attr('aria-expanded', false)
5283
5284      element
5285        .addClass('active')
5286        .find('[data-toggle="tab"]')
5287        .attr('aria-expanded', true)
5288
5289      if (transition) {
5290        element[0].offsetWidth // reflow for transition
5291        element.addClass('in')
5292      } else {
5293        element.removeClass('fade')
5294      }
5295
5296      if (element.parent('.dropdown-menu').length) {
5297        element
5298          .closest('li.dropdown')
5299          .addClass('active')
5300          .end()
5301          .find('[data-toggle="tab"]')
5302          .attr('aria-expanded', true)
5303      }
5304
5305      callback && callback()
5306    }
5307
5308    $active.length && transition ?
5309      $active
5310        .one('bsTransitionEnd', next)
5311        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
5312      next()
5313
5314    $active.removeClass('in')
5315  }
5316
5317
5318  // TAB PLUGIN DEFINITION
5319  // =====================
5320
5321  function Plugin(option) {
5322    return this.each(function () {
5323      var $this = $(this)
5324      var data  = $this.data('bs.tab')
5325
5326      if (!data) $this.data('bs.tab', (data = new Tab(this)))
5327      if (typeof option == 'string') data[option]()
5328    })
5329  }
5330
5331  var old = $.fn.tab
5332
5333  $.fn.tab             = Plugin
5334  $.fn.tab.Constructor = Tab
5335
5336
5337  // TAB NO CONFLICT
5338  // ===============
5339
5340  $.fn.tab.noConflict = function () {
5341    $.fn.tab = old
5342    return this
5343  }
5344
5345
5346  // TAB DATA-API
5347  // ============
5348
5349  var clickHandler = function (e) {
5350    e.preventDefault()
5351    Plugin.call($(this), 'show')
5352  }
5353
5354  $(document)
5355    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
5356    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
5357
5358}(jQuery);
5359;
5360/* ========================================================================
5361 * Bootstrap: transition.js v3.4.0
5362 * https://getbootstrap.com/docs/3.4/javascript/#transitions
5363 * ========================================================================
5364 * Copyright 2011-2018 Twitter, Inc.
5365 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5366 * ======================================================================== */
5367
5368
5369+function ($) {
5370  'use strict';
5371
5372  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
5373  // ============================================================
5374
5375  function transitionEnd() {
5376    var el = document.createElement('bootstrap')
5377
5378    var transEndEventNames = {
5379      WebkitTransition : 'webkitTransitionEnd',
5380      MozTransition    : 'transitionend',
5381      OTransition      : 'oTransitionEnd otransitionend',
5382      transition       : 'transitionend'
5383    }
5384
5385    for (var name in transEndEventNames) {
5386      if (el.style[name] !== undefined) {
5387        return { end: transEndEventNames[name] }
5388      }
5389    }
5390
5391    return false // explicit for ie8 (  ._.)
5392  }
5393
5394  // https://blog.alexmaccaw.com/css-transitions
5395  $.fn.emulateTransitionEnd = function (duration) {
5396    var called = false
5397    var $el = this
5398    $(this).one('bsTransitionEnd', function () { called = true })
5399    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
5400    setTimeout(callback, duration)
5401    return this
5402  }
5403
5404  $(function () {
5405    $.support.transition = transitionEnd()
5406
5407    if (!$.support.transition) return
5408
5409    $.event.special.bsTransitionEnd = {
5410      bindType: $.support.transition.end,
5411      delegateType: $.support.transition.end,
5412      handle: function (e) {
5413        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
5414      }
5415    }
5416  })
5417
5418}(jQuery);
5419;
5420/**
5421* jquery-match-height master by @liabru
5422* http://brm.io/jquery-match-height/
5423* License: MIT
5424*/
5425
5426;(function(factory) { // eslint-disable-line no-extra-semi
5427    'use strict';
5428    if (typeof define === 'function' && define.amd) {
5429        // AMD
5430        define(['jquery'], factory);
5431    } else if (typeof module !== 'undefined' && module.exports) {
5432        // CommonJS
5433        module.exports = factory(require('jquery'));
5434    } else {
5435        // Global
5436        factory(jQuery);
5437    }
5438})(function($) {
5439    /*
5440    *  internal
5441    */
5442
5443    var _previousResizeWidth = -1,
5444        _updateTimeout = -1;
5445
5446    /*
5447    *  _parse
5448    *  value parse utility function
5449    */
5450
5451    var _parse = function(value) {
5452        // parse value and convert NaN to 0
5453        return parseFloat(value) || 0;
5454    };
5455
5456    /*
5457    *  _rows
5458    *  utility function returns array of jQuery selections representing each row
5459    *  (as displayed after float wrapping applied by browser)
5460    */
5461
5462    var _rows = function(elements) {
5463        var tolerance = 1,
5464            $elements = $(elements),
5465            lastTop = null,
5466            rows = [];
5467
5468        // group elements by their top position
5469        $elements.each(function(){
5470            var $that = $(this),
5471                top = $that.offset().top - _parse($that.css('margin-top')),
5472                lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
5473
5474            if (lastRow === null) {
5475                // first item on the row, so just push it
5476                rows.push($that);
5477            } else {
5478                // if the row top is the same, add to the row group
5479                if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
5480                    rows[rows.length - 1] = lastRow.add($that);
5481                } else {
5482                    // otherwise start a new row group
5483                    rows.push($that);
5484                }
5485            }
5486
5487            // keep track of the last row top
5488            lastTop = top;
5489        });
5490
5491        return rows;
5492    };
5493
5494    /*
5495    *  _parseOptions
5496    *  handle plugin options
5497    */
5498
5499    var _parseOptions = function(options) {
5500        var opts = {
5501            byRow: true,
5502            property: 'height',
5503            target: null,
5504            remove: false
5505        };
5506
5507        if (typeof options === 'object') {
5508            return $.extend(opts, options);
5509        }
5510
5511        if (typeof options === 'boolean') {
5512            opts.byRow = options;
5513        } else if (options === 'remove') {
5514            opts.remove = true;
5515        }
5516
5517        return opts;
5518    };
5519
5520    /*
5521    *  matchHeight
5522    *  plugin definition
5523    */
5524
5525    var matchHeight = $.fn.matchHeight = function(options) {
5526        var opts = _parseOptions(options);
5527
5528        // handle remove
5529        if (opts.remove) {
5530            var that = this;
5531
5532            // remove fixed height from all selected elements
5533            this.css(opts.property, '');
5534
5535            // remove selected elements from all groups
5536            $.each(matchHeight._groups, function(key, group) {
5537                group.elements = group.elements.not(that);
5538            });
5539
5540            // TODO: cleanup empty groups
5541
5542            return this;
5543        }
5544
5545        if (this.length <= 1 && !opts.target) {
5546            return this;
5547        }
5548
5549        // keep track of this group so we can re-apply later on load and resize events
5550        matchHeight._groups.push({
5551            elements: this,
5552            options: opts
5553        });
5554
5555        // match each element's height to the tallest element in the selection
5556        matchHeight._apply(this, opts);
5557
5558        return this;
5559    };
5560
5561    /*
5562    *  plugin global options
5563    */
5564
5565    matchHeight.version = 'master';
5566    matchHeight._groups = [];
5567    matchHeight._throttle = 80;
5568    matchHeight._maintainScroll = false;
vendor: 8,743 bytes, lines 5569-5838
5569    matchHeight._beforeUpdate = null;
5570    matchHeight._afterUpdate = null;
5571    matchHeight._rows = _rows;
5572    matchHeight._parse = _parse;
5573    matchHeight._parseOptions = _parseOptions;
5574
5575    /*
5576    *  matchHeight._apply
5577    *  apply matchHeight to given elements
5578    */
5579
5580    matchHeight._apply = function(elements, options) {
5581        var opts = _parseOptions(options),
5582            $elements = $(elements),
5583            rows = [$elements];
5584
5585        // take note of scroll position
5586        var scrollTop = $(window).scrollTop(),
5587            htmlHeight = $('html').outerHeight(true);
5588
5589        // get hidden parents
5590        var $hiddenParents = $elements.parents().filter(':hidden');
5591
5592        // cache the original inline style
5593        $hiddenParents.each(function() {
5594            var $that = $(this);
5595            $that.data('style-cache', $that.attr('style'));
5596        });
5597
5598        // temporarily must force hidden parents visible
5599        $hiddenParents.css('display', 'block');
5600
5601        // get rows if using byRow, otherwise assume one row
5602        if (opts.byRow && !opts.target) {
5603
5604            // must first force an arbitrary equal height so floating elements break evenly
5605            $elements.each(function() {
5606                var $that = $(this),
5607                    display = $that.css('display');
5608
5609                // temporarily force a usable display value
5610                if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
5611                    display = 'block';
5612                }
5613
5614                // cache the original inline style
5615                $that.data('style-cache', $that.attr('style'));
5616
5617                $that.css({
5618                    'display': display,
5619                    'padding-top': '0',
5620                    'padding-bottom': '0',
5621                    'margin-top': '0',
5622                    'margin-bottom': '0',
5623                    'border-top-width': '0',
5624                    'border-bottom-width': '0',
5625                    'height': '100px',
5626                    'overflow': 'hidden'
5627                });
5628            });
5629
5630            // get the array of rows (based on element top position)
5631            rows = _rows($elements);
5632
5633            // revert original inline styles
5634            $elements.each(function() {
5635                var $that = $(this);
5636                $that.attr('style', $that.data('style-cache') || '');
5637            });
5638        }
5639
5640        $.each(rows, function(key, row) {
5641            var $row = $(row),
5642                targetHeight = 0;
5643
5644            if (!opts.target) {
5645                // skip apply to rows with only one item
5646                if (opts.byRow && $row.length <= 1) {
5647                    $row.css(opts.property, '');
5648                    return;
5649                }
5650
5651                // iterate the row and find the max height
5652                $row.each(function(){
5653                    var $that = $(this),
5654                        style = $that.attr('style'),
5655                        display = $that.css('display');
5656
5657                    // temporarily force a usable display value
5658                    if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
5659                        display = 'block';
5660                    }
5661
5662                    // ensure we get the correct actual height (and not a previously set height value)
5663                    var css = { 'display': display };
5664                    css[opts.property] = '';
5665                    $that.css(css);
5666
5667                    // find the max height (including padding, but not margin)
5668                    if ($that.outerHeight(false) > targetHeight) {
5669                        targetHeight = $that.outerHeight(false);
5670                    }
5671
5672                    // revert styles
5673                    if (style) {
5674                        $that.attr('style', style);
5675                    } else {
5676                        $that.css('display', '');
5677                    }
5678                });
5679            } else {
5680                // if target set, use the height of the target element
5681                targetHeight = opts.target.outerHeight(false);
5682            }
5683
5684            // iterate the row and apply the height to all elements
5685            $row.each(function(){
5686                var $that = $(this),
5687                    verticalPadding = 0;
5688
5689                // don't apply to a target
5690                if (opts.target && $that.is(opts.target)) {
5691                    return;
5692                }
5693
5694                // handle padding and border correctly (required when not using border-box)
5695                if ($that.css('box-sizing') !== 'border-box') {
5696                    verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
5697                    verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
5698                }
5699
5700                // set the height (accounting for padding and border)
5701                $that.css(opts.property, (targetHeight - verticalPadding) + 'px');
5702            });
5703        });
5704
5705        // revert hidden parents
5706        $hiddenParents.each(function() {
5707            var $that = $(this);
5708            $that.attr('style', $that.data('style-cache') || null);
5709        });
5710
5711        // restore scroll position if enabled
5712        if (matchHeight._maintainScroll) {
5713            $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
5714        }
5715
5716        return this;
5717    };
5718
5719    /*
5720    *  matchHeight._applyDataApi
5721    *  applies matchHeight to all elements with a data-match-height attribute
5722    */
5723
5724    matchHeight._applyDataApi = function() {
5725        var groups = {};
5726
5727        // generate groups by their groupId set by elements using data-match-height
5728        $('[data-match-height], [data-mh]').each(function() {
5729            var $this = $(this),
5730                groupId = $this.attr('data-mh') || $this.attr('data-match-height');
5731
5732            if (groupId in groups) {
5733                groups[groupId] = groups[groupId].add($this);
5734            } else {
5735                groups[groupId] = $this;
5736            }
5737        });
5738
5739        // apply matchHeight to each group
5740        $.each(groups, function() {
5741            this.matchHeight(true);
5742        });
5743    };
5744
5745    /*
5746    *  matchHeight._update
5747    *  updates matchHeight on all current groups with their correct options
5748    */
5749
5750    var _update = function(event) {
5751        if (matchHeight._beforeUpdate) {
5752            matchHeight._beforeUpdate(event, matchHeight._groups);
5753        }
5754
5755        $.each(matchHeight._groups, function() {
5756            matchHeight._apply(this.elements, this.options);
5757        });
5758
5759        if (matchHeight._afterUpdate) {
5760            matchHeight._afterUpdate(event, matchHeight._groups);
5761        }
5762    };
5763
5764    matchHeight._update = function(throttle, event) {
5765        // prevent update if fired from a resize event
5766        // where the viewport width hasn't actually changed
5767        // fixes an event looping bug in IE8
5768        if (event && event.type === 'resize') {
5769            var windowWidth = $(window).width();
5770            if (windowWidth === _previousResizeWidth) {
5771                return;
5772            }
5773            _previousResizeWidth = windowWidth;
5774        }
5775
5776        // throttle updates
5777        if (!throttle) {
5778            _update(event);
5779        } else if (_updateTimeout === -1) {
5780            _updateTimeout = setTimeout(function() {
5781                _update(event);
5782                _updateTimeout = -1;
5783            }, matchHeight._throttle);
5784        }
5785    };
5786
5787    /*
5788    *  bind events
5789    */
5790
5791    // apply on DOM ready event
5792    $(matchHeight._applyDataApi);
5793
5794    // use on or bind where supported
5795    var on = $.fn.on ? 'on' : 'bind';
5796
5797    // update heights on load and resize events
5798    $(window)[on]('load', function(event) {
5799        matchHeight._update(false, event);
5800    });
5801
5802    // throttled update heights on resize events
5803    $(window)[on]('resize orientationchange', function(event) {
5804        matchHeight._update(true, event);
5805    });
5806
5807});
5808;
5809/*
5810 * jQuery One Page Nav Plugin
5811 * http://github.com/davist11/jQuery-One-Page-Nav
5812 *
5813 * Copyright (c) 2010 Trevor Davis (http://trevordavis.net)
5814 * Dual licensed under the MIT and GPL licenses.
5815 * Uses the same license as jQuery, see:
5816 * http://jquery.org/license
5817 *
5818 * @version 3.0.0
5819 *
5820 * Example usage:
5821 * $('#nav').onePageNav({
5822 *   currentClass: 'current',
5823 *   changeHash: false,
5824 *   scrollSpeed: 750
5825 * });
5826 */
5827
5828;(function($, window, document, undefined){
5829
5830	// our plugin constructor
5831	var OnePageNav = function(elem, options){
5832		this.elem = elem;
5833		this.$elem = $(elem);
5834		this.options = options;
5835		this.metadata = this.$elem.data('plugin-options');
5836		this.$win = $(window);
5837		this.sections = {};
5838		this.didScroll = false;
5839		this.$doc = $(document);
5840		this.docHeight = this.$doc.height();
5841	};
5842
5843	// the plugin prototype
5844	OnePageNav.prototype = {
5845		defaults: {
5846			navItems: 'a',
5847			currentClass: 'current',
5848			changeHash: false,
5849			easing: 'swing',
5850			filter: '',
5851			scrollSpeed: 750,
5852			scrollThreshold: 0.5,
5853			begin: false,
5854			end: false,
5855			scrollChange: false
5856		},
5857
5858		init: function() {
5859			// Introduce defaults that can be extended either
5860			// globally or using an object literal.
5861			this.config = $.extend({}, this.defaults, this.options, this.metadata);
5862
5863			this.$nav = this.$elem.find(this.config.navItems);
5864
5865			//Filter any links out of the nav
5866			if(this.config.filter !== '') {
5867				this.$nav = this.$nav.filter(this.config.filter);
5868			}
5869
5870			//Handle clicks on the nav
5871			this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this));
5872
5873			//Get the section positions
5874			this.getPositions();
5875
5876			//Handle scroll changes
5877			this.bindInterval();
5878
5879			//Update the positions on resize too
5880			this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this));
5881
5882			return this;
5883		},
5884
5885		adjustNav: function(self, $parent) {
5886			self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass);
5887			$parent.addClass(self.config.currentClass);
5888		},
5889
5890		bindInterval: function() {
5891			var self = this;
5892			var docHeight;
5893
5894			self.$win.on('scroll.onePageNav', function() {
5895				self.didScroll = true;
5896			});
5897
5898			self.t = setInterval(function() {
5899				docHeight = self.$doc.height();
5900
5901				//If it was scrolled
5902				if(self.didScroll) {
5903					self.didScroll = false;
5904					self.scrollChange();
5905				}
5906
5907				//If the document height changes
5908				if(docHeight !== self.docHeight) {
5909					self.docHeight = docHeight;
5910					self.getPositions();
5911				}
5912			}, 250);
5913		},
5914
5915		getHash: function($link) {
5916			return $link.attr('href').split('#')[1];
5917		},
5918
5919		getPositions: function() {
5920			var self = this;
5921			var linkHref;
5922			var topPos;
5923			var $target;
5924
5925			self.$nav.each(function() {
5926				linkHref = self.getHash($(this));
5927				$target = $('#' + linkHref);
5928
5929				if($target.length) {
5930					topPos = $target.offset().top;
5931					self.sections[linkHref] = Math.round(topPos);
5932				}
5933			});
5934		},
5935
5936		getSection: function(windowPos) {
5937			var returnValue = null;
5938			var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold);
5939
5940			for(var section in this.sections) {
5941				if((this.sections[section] - windowHeight) < windowPos) {
5942					returnValue = section;
5943				}
5944			}
5945
5946			return returnValue;
5947		},
5948
5949		handleClick: function(e) {
5950			var self = this;
5951			var $link = $(e.currentTarget);
5952			var $parent = $link.parent();
5953			var newLoc = '#' + self.getHash($link);
5954
5955			if(!$parent.hasClass(self.config.currentClass)) {
5956				//Start callback
5957				if(self.config.begin) {
5958					self.config.begin();
5959				}
5960
5961				//Change the highlighted nav item
5962				self.adjustNav(self, $parent);
5963
5964				//Removing the auto-adjust on scroll
5965				self.unbindInterval();
5966
5967				//Scroll to the correct position
5968				self.scrollTo(newLoc, function() {
5969					//Do we need to change the hash?
5970					if(self.config.changeHash) {
5971						window.location.hash = newLoc;
5972					}
5973
5974					//Add the auto-adjust on scroll back in
5975					self.bindInterval();
5976
5977					//End callback
5978					if(self.config.end) {
5979						self.config.end();
5980					}
5981				});
5982			}
5983
5984			e.preventDefault();
5985		},
5986
5987		scrollChange: function() {
5988			var windowTop = this.$win.scrollTop();
5989			var position = this.getSection(windowTop);
5990			var $parent;
5991
5992			//If the position is set
5993			if(position !== null) {
5994				$parent = this.$elem.find('a[href$="#' + position + '"]').parent();
5995
5996				//If it's not already the current section
5997				if(!$parent.hasClass(this.config.currentClass)) {
5998					//Change the highlighted nav item
5999					this.adjustNav(this, $parent);
6000
6001					//If there is a scrollChange callback
6002					if(this.config.scrollChange) {
6003						this.config.scrollChange($parent);
6004					}
6005				}
6006			}
6007		},
6008
6009		scrollTo: function(target, callback) {
6010			var offset = $(target).offset().top - 200;
6011			$('html, body').animate({
6012				scrollTop: offset
6013			}, this.config.scrollSpeed, this.config.easing, callback);
6014		},
6015
6016		unbindInterval: function() {
6017			clearInterval(this.t);
6018			this.$win.unbind('scroll.onePageNav');
6019		}
6020	};
6021
6022	OnePageNav.defaults = OnePageNav.prototype.defaults;
6023
6024	$.fn.onePageNav = function(options) {
6025		return this.each(function() {
6026			new OnePageNav(this, options).init();
6027		});
6028	};
6029
6030})( jQuery, window , document );;
6031!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.AOS=t()}(this,function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t="Expected a function",n=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof e&&e&&e.Object===Object&&e,d="object"==typeof self&&self&&self.Object===Object&&self,l=u||d||Function("return this")(),f=Object.prototype.toString,m=Math.max,p=Math.min,b=function(){return l.Date.now()};function v(e,n,o){var i,a,r,c,s,u,d=0,l=!1,f=!1,v=!0;if("function"!=typeof e)throw new TypeError(t);function y(t){var n=i,o=a;return i=a=void 0,d=t,c=e.apply(o,n)}function h(e){var t=e-u;return void 0===u||t>=n||t<0||f&&e-d>=r}function k(){var e=b();if(h(e))return x(e);s=setTimeout(k,function(e){var t=n-(e-u);
6031return f?p(t,r-(e-d)):t}(e))}function x(e){return s=void 0,v&&i?y(e):(i=a=void 0,c)}function O(){var e=b(),t=h(e);if(i=arguments,a=this,u=e,t){if(void 0===s)return function(e){return d=e,s=setTimeout(k,n),l?y(e):c}(u);if(f)return s=setTimeout(k,n),y(u)}return void 0===s&&(s=setTimeout(k,n)),c}return n=w(n)||0,g(o)&&(l=!!o.leading,r=(f="maxWait"in o)?m(w(o.maxWait)||0,n):r,v="trailing"in o?!!o.trailing:v),O.cancel=function(){void 0!==s&&clearTimeout(s),d=0,i=u=a=s=void 0},O.flush=function(){return void 0===s?c:x(b())},O}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==o}(e))return n;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var u=r.test(e);return u||c.test(e)?s(e.slice(2),u?2:8):a.test(e)?n:+e}var y=function(e,n,o){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError(t);return g(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),v(e,n,{leading:i,maxWait:n,trailing:a})},h="Expected a function",k=NaN,x="[object Symbol]",O=/^\s+|\s+$/g,j=/^[-+]0x[0-9a-f]+$/i,E=/^0b[01]+$/i,N=/^0o[0-7]+$/i,z=parseInt,C="object"==typeof e&&e&&e.Object===Object&&e,A="object"==typeof self&&self&&self.Object===Object&&self,q=C||A||Function("return this")(),L=Object.prototype.toString,T=Math.max,M=Math.min,S=function(){return q.Date.now()};function D(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&L.call(e)==x}(e))return k;if(D(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=D(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(O,"");var n=E.test(e);return n||N.test(e)?z(e.slice(2),n?2:8):j.test(e)?k:+e}var $=function(e,t,n){var o,i,a,r,c,s,u=0,d=!1,l=!1,f=!0;if("function"!=typeof e)throw new TypeError(h);function m(t){var n=o,a=i;return o=i=void 0,u=t,r=e.apply(a,n)}function p(e){var n=e-s;return void 0===s||n>=t||n<0||l&&e-u>=a}function b(){var e=S();if(p(e))return v(e);c=setTimeout(b,function(e){var n=t-(e-s);return l?M(n,a-(e-u)):n}(e))}function v(e){return c=void 0,f&&o?m(e):(o=i=void 0,r)}function g(){var e=S(),n=p(e);if(o=arguments,i=this,s=e,n){if(void 0===c)return function(e){return u=e,c=setTimeout(b,t),d?m(e):r}(s);if(l)return c=setTimeout(b,t),m(s)}return void 0===c&&(c=setTimeout(b,t)),r}return t=H(t)||0,D(n)&&(d=!!n.leading,a=(l="maxWait"in n)?T(H(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==c&&clearTimeout(c),u=0,o=s=i=c=void 0},g.flush=function(){return void 0===c?r:v(S())},g},W=function(){};function P(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),n=Array.prototype.slice.call(e.removedNodes);if(function e(t){var n=void 0,o=void 0;for(n=0;n<t.length;n+=1){if((o=t[n]).dataset&&o.dataset.aos)return!0;if(o.children&&e(o.children))return!0}return!1}(t.concat(n)))return W()})}function Y(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}var _={isSupported:function(){return!!Y()},ready:function(e,t){var n=window.document,o=new(Y())(P);W=t,o.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}},B=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},F=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,G=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
6031sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,J=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,Q=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;function R(){return navigator.userAgent||navigator.vendor||window.opera||""}var U=new(function(){function e(){B(this,e)}return F(e,[{key:"phone",value:function(){var e=R();return!(!K.test(e)&&!G.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=R();return!(!J.test(e)&&!Q.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}},{key:"ie11",value:function(){return"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style}}]),e}()),V=function(e,t){var n=void 0;return U.ie11()?(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,{detail:t}):n=new CustomEvent(e,{detail:t}),document.dispatchEvent(n)},X=function(e){return e.forEach(function(e,t){return function(e,t){var n=e.options,o=e.position,i=e.node,a=(e.data,function(){e.animated&&(function(e,t){t&&t.forEach(function(t){return e.classList.remove(t)})}(i,n.animatedClassNames),V("aos:out",i),e.options.id&&V("aos:in:"+e.options.id,i),e.animated=!1)});n.mirror&&t>=o.out&&!n.once?a():t>=o.in?e.animated||(function(e,t){t&&t.forEach(function(t){return e.classList.add(t)})}(i,n.animatedClassNames),V("aos:in",i),e.options.id&&V("aos:in:"+e.options.id,i),e.animated=!0):e.animated&&!n.once&&a()}(e,window.pageYOffset)})},Z=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}},ee=function(e,t,n){var o=e.getAttribute("data-aos-"+t);if(void 0!==o){if("true"===o)return!0;if("false"===o)return!1}return o||n},te=function(e,t){return e.forEach(function(e,n){var o=ee(e.node,"mirror",t.mirror),i=ee(e.node,"once",t.once),a=ee(e.node,"id"),r=t.useClassNames&&e.node.getAttribute("data-aos"),c=[t.animatedClassName].concat(r?r.split(" "):[]).filter(function(e){return"string"==typeof e});t.initClassName&&e.node.classList.add(t.initClassName),e.position={in:function(e,t,n){var o=window.innerHeight,i=ee(e,"anchor"),a=ee(e,"anchor-placement"),r=Number(ee(e,"offset",a?0:t)),c=a||n,s=e;i&&document.querySelectorAll(i)&&(s=document.querySelectorAll(i)[0]);var u=Z(s).top-o;switch(c){case"top-bottom":break;case"center-bottom":u+=s.offsetHeight/2;break;case"bottom-bottom":u+=s.offsetHeight;break;case"top-center":u+=o/2;break;case"center-center":u+=o/2+s.offsetHeight/2;break;case"bottom-center":u+=o/2+s.offsetHeight;break;case"top-top":u+=o;break;case"bottom-top":u+=o+s.offsetHeight;break;case"center-top":u+=o+s.offsetHeight/2}return u+r}(e.node,t.offset,t.anchorPlacement),out:o&&function(e,t){window.innerHeight;var n=ee(e,"anchor"),o=ee(e,"offset",t),i=e;return n&&document.querySelectorAll(n)&&(i=document.querySelectorAll(n)[0]),Z(i).top+i.offsetHeight-o}(e.node,t.offset)},e.options={once:i,mirror:o,animatedClassNames:c,id:a}}),e},ne=function(){var e=document.querySelectorAll("[data-aos]");return Array.prototype.map.call(e,function(e){return{node:e}})},oe=[],ie=!1,ae={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,mirror:!1,anchorPlacement:"top-bottom",startEvent:"DOMContentLoaded",animatedClassName:"aos-animate",initClassName:"aos-init",useClassNames:!1,disableMutationObserver:!1,throttleDelay:99,debounceDelay:50},re=function(){return document.all&&!window.atob},ce=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(ie=!0),ie&&(oe=te(oe,ae),X(oe),window.addEventListener("scroll",y(function(){X(oe,ae.once)},ae.throttleDelay)))},se=function(){if(oe=ne(),de(ae.disable)||re())return ue();ce()},ue=function(){oe.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay"),ae.initClassName&&e.node.classList.remove(ae.initClassName),ae.animatedClassName&&e.node.classList.remove(ae.animatedClassName)})},de=function(e){return!0===e||"mobile"===e&&U.mobile()||"phone"===e&&U.phone()||"tablet"===e&&U.tablet()||"function"==typeof e&&!0===e()};return{init:function(e){return ae=I(ae,e),oe=ne(),ae.disableMutationObserver||_.isSupported()||(console.info('\n      aos: MutationObserver is not supported on this browser,\n      code mutations observing has been disabled.\n      You may have to call "refreshHard()" by yourself.\n    '),ae.disableMutationObserver=!0),ae.disableMutationObserver||_.ready("[data-aos]",se),de(ae.disable)||re()?ue():(document.querySelector("body").setAttribute("data-aos-easing",ae.easing),document.querySelector("body").setAttribute("data-aos-duration",ae.duration),document.querySelector("body").setAttribute("data-aos-delay",ae.delay),-1===["DOMContentLoaded","load"].indexOf(ae.startEvent)?document.addEventListener(ae.startEvent,function(){ce(!0)}):window.addEventListener("load",function(){ce(!0)}
6031),"DOMContentLoaded"===ae.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1&&ce(!0),window.addEventListener("resize",$(ce,ae.debounceDelay,!0)),window.addEventListener("orientationchange",$(ce,ae.debounceDelay,!0)),oe)},refresh:ce,refreshHard:se}});
6032;
6033/**
6034 * jQuery CSS Customizable Scrollbar
6035 *
6036 * Copyright 2015, Yuriy Khabarov
6037 * Dual licensed under the MIT or GPL Version 2 licenses.
6038 *
6039 * If you found bug, please contact me via email <[email protected]>
6040 *
6041 * @author Yuriy Khabarov aka Gromo
6042 * @version 0.2.11
6043 * @url https://github.com/gromo/jquery.scrollbar/
6044 *
6045 */
6046;
6047(function (root, factory) {
6048    'use strict';
6049    if (typeof define === 'function' && define.amd) {
6050        define(['jquery'], factory);
6051    } else if (typeof exports !== 'undefined') {
6052        module.exports = factory(require('jquery'));
6053    } else {
6054        factory(jQuery);
6055    }
6056}(this, function ($) {
6057    'use strict';
6058
6059    // init flags & variables
6060    var debug = false;
6061
6062    var browser = {
6063        data: {
6064            index: 0,
6065            name: 'scrollbar'
6066        },
6067        firefox: /firefox/i.test(navigator.userAgent),
6068        macosx: /mac/i.test(navigator.platform),
6069        msedge: /edge\/\d+/i.test(navigator.userAgent),
6070        msie: /(msie|trident)/i.test(navigator.userAgent),
6071        mobile: /android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent),
6072        overlay: null,
6073        scroll: null,
6074        scrolls: [],
6075        webkit: /webkit/i.test(navigator.userAgent) && !/edge\/\d+/i.test(navigator.userAgent)
6076    };
6077
6078    browser.scrolls.add = function (instance) {
6079        this.remove(instance).push(instance);
6080    };
6081    browser.scrolls.remove = function (instance) {
6082        while ($.inArray(instance, this) >= 0) {
6083            this.splice($.inArray(instance, this), 1);
6084        }
6085        return this;
6086    };
6087
6088    var defaults = {
6089        autoScrollSize: true, // automatically calculate scrollsize
6090        autoUpdate: true, // update scrollbar if content/container size changed
6091        debug: false, // debug mode
6092        disableBodyScroll: false, // disable body scroll if mouse over container
6093        duration: 200, // scroll animate duration in ms
6094        ignoreMobile: false, // ignore mobile devices
6095        ignoreOverlay: false, // ignore browsers with overlay scrollbars (mobile, MacOS)
6096        isRtl: false, // is RTL
6097        scrollStep: 30, // scroll step for scrollbar arrows
vendor: 30,286 bytes, lines 6098-6802
6098        showArrows: false, // add class to show arrows
6099        stepScrolling: true, // when scrolling to scrollbar mousedown position
6100
6101        scrollx: null, // horizontal scroll element
6102        scrolly: null, // vertical scroll element
6103
6104        onDestroy: null, // callback function on destroy,
6105        onFallback: null, // callback function if scrollbar is not initialized
6106        onInit: null, // callback function on first initialization
6107        onScroll: null, // callback function on content scrolling
6108        onUpdate: null            // callback function on init/resize (before scrollbar size calculation)
6109    };
6110
6111
6112    var BaseScrollbar = function (container) {
6113
6114        if (!browser.scroll) {
6115            browser.overlay = isScrollOverlaysContent();
6116            browser.scroll = getBrowserScrollSize();
6117            updateScrollbars();
6118
6119            $(window).resize(function () {
6120                var forceUpdate = false;
6121                if (browser.scroll && (browser.scroll.height || browser.scroll.width)) {
6122                    var scroll = getBrowserScrollSize();
6123                    if (scroll.height !== browser.scroll.height || scroll.width !== browser.scroll.width) {
6124                        browser.scroll = scroll;
6125                        forceUpdate = true; // handle page zoom
6126                    }
6127                }
6128                updateScrollbars(forceUpdate);
6129            });
6130        }
6131
6132        this.container = container;
6133        this.namespace = '.scrollbar_' + browser.data.index++;
6134        this.options = $.extend({}, defaults, window.jQueryScrollbarOptions || {});
6135        this.scrollTo = null;
6136        this.scrollx = {};
6137        this.scrolly = {};
6138
6139        container.data(browser.data.name, this);
6140        browser.scrolls.add(this);
6141    };
6142
6143    BaseScrollbar.prototype = {
6144        destroy: function () {
6145
6146            if (!this.wrapper) {
6147                return;
6148            }
6149
6150            this.container.removeData(browser.data.name);
6151            browser.scrolls.remove(this);
6152
6153            // init variables
6154            var scrollLeft = this.container.scrollLeft();
6155            var scrollTop = this.container.scrollTop();
6156
6157            this.container.insertBefore(this.wrapper).css({
6158                "height": "",
6159                "margin": "",
6160                "max-height": ""
6161            })
6162                .removeClass('scroll-content scroll-scrollx_visible scroll-scrolly_visible')
6163                .off(this.namespace)
6164                .scrollLeft(scrollLeft)
6165                .scrollTop(scrollTop);
6166
6167            this.scrollx.scroll.removeClass('scroll-scrollx_visible').find('div').addBack().off(this.namespace);
6168            this.scrolly.scroll.removeClass('scroll-scrolly_visible').find('div').addBack().off(this.namespace);
6169
6170            this.wrapper.remove();
6171
6172            $(document).add('body').off(this.namespace);
6173
6174            if ($.isFunction(this.options.onDestroy)) {
6175                this.options.onDestroy.apply(this, [this.container]);
6176            }
6177        },
6178        init: function (options) {
6179
6180            // init variables
6181            var S = this,
6182                c = this.container,
6183                cw = this.containerWrapper || c,
6184                namespace = this.namespace,
6185                o = $.extend(this.options, options || {}),
6186                s = {x: this.scrollx, y: this.scrolly},
6187            w = this.wrapper,
6188                cssOptions = {};
6189
6190            var initScroll = {
6191                scrollLeft: c.scrollLeft(),
6192                scrollTop: c.scrollTop()
6193            };
6194
6195            // do not init if in ignorable browser
6196            if ((browser.mobile && o.ignoreMobile)
6197                || (browser.overlay && o.ignoreOverlay)
6198                || (browser.macosx && !browser.webkit) // still required to ignore nonWebKit browsers on Mac
6199                ) {
6200                if ($.isFunction(o.onFallback)) {
6201                    o.onFallback.apply(this, [c]);
6202                }
6203                return false;
6204            }
6205
6206            // init scroll container
6207            if (!w) {
6208                this.wrapper = w = $('<div>').addClass('scroll-wrapper').addClass(c.attr('class'))
6209                    .css('position', c.css('position') === 'absolute' ? 'absolute' : 'relative')
6210                    .insertBefore(c).append(c);
6211
6212                if (o.isRtl) {
6213                    w.addClass('scroll--rtl');
6214                }
6215
6216                if (c.is('textarea')) {
6217                    this.containerWrapper = cw = $('<div>').insertBefore(c).append(c);
6218                    w.addClass('scroll-textarea');
6219                }
6220
6221                cssOptions = {
6222                    "height": "auto",
6223                    "margin-bottom": browser.scroll.height * -1 + 'px',
6224                    "max-height": ""
6225                };
6226                cssOptions[o.isRtl ? 'margin-left' : 'margin-right'] = browser.scroll.width * -1 + 'px';
6227
6228                cw.addClass('scroll-content').css(cssOptions);
6229
6230                c.on('scroll' + namespace, function (event) {
6231                    var scrollLeft = c.scrollLeft();
6232                    var scrollTop = c.scrollTop();
6233                    if (o.isRtl) {
6234                        // webkit   0:100
6235                        // ie/edge  100:0
6236                        // firefox -100:0
6237                        switch (true) {
6238                            case browser.firefox:
6239                                scrollLeft = Math.abs(scrollLeft);
6240                            case browser.msedge || browser.msie:
6241                                scrollLeft = c[0].scrollWidth - c[0].clientWidth - scrollLeft;
6242                                break;
6243                        }
6244                    }
6245                    if ($.isFunction(o.onScroll)) {
6246                        o.onScroll.call(S, {
6247                            maxScroll: s.y.maxScrollOffset,
6248                            scroll: scrollTop,
6249                            size: s.y.size,
6250                            visible: s.y.visible
6251                        }, {
6252                            maxScroll: s.x.maxScrollOffset,
6253                            scroll: scrollLeft,
6254                            size: s.x.size,
6255                            visible: s.x.visible
6256                        });
6257                    }
6258                    s.x.isVisible && s.x.scroll.bar.css('left', scrollLeft * s.x.kx + 'px');
6259                    s.y.isVisible && s.y.scroll.bar.css('top', scrollTop * s.y.kx + 'px');
6260                });
6261
6262                /* prevent native scrollbars to be visible on #anchor click */
6263                w.on('scroll' + namespace, function () {
6264                    w.scrollTop(0).scrollLeft(0);
6265                });
6266
6267                if (o.disableBodyScroll) {
6268                    var handleMouseScroll = function (event) {
6269                        isVerticalScroll(event) ?
6270                            s.y.isVisible && s.y.mousewheel(event) :
6271                            s.x.isVisible && s.x.mousewheel(event);
6272                    };
6273                    w.on('MozMousePixelScroll' + namespace, handleMouseScroll);
6274                    w.on('mousewheel' + namespace, handleMouseScroll);
6275
6276                    if (browser.mobile) {
6277                        w.on('touchstart' + namespace, function (event) {
6278                            var touch = event.originalEvent.touches && event.originalEvent.touches[0] || event;
6279                            var originalTouch = {
6280                                pageX: touch.pageX,
6281                                pageY: touch.pageY
6282                            };
6283                            var originalScroll = {
6284                                left: c.scrollLeft(),
6285                                top: c.scrollTop()
6286                            };
6287                            $(document).on('touchmove' + namespace, function (event) {
6288                                var touch = event.originalEvent.targetTouches && event.originalEvent.targetTouches[0] || event;
6289                                c.scrollLeft(originalScroll.left + originalTouch.pageX - touch.pageX);
6290                                c.scrollTop(originalScroll.top + originalTouch.pageY - touch.pageY);
6291                                event.preventDefault();
6292                            });
6293                            $(document).on('touchend' + namespace, function () {
6294                                $(document).off(namespace);
6295                            });
6296                        });
6297                    }
6298                }
6299                if ($.isFunction(o.onInit)) {
6300                    o.onInit.apply(this, [c]);
6301                }
6302            } else {
6303                cssOptions = {
6304                    "height": "auto",
6305                    "margin-bottom": browser.scroll.height * -1 + 'px',
6306                    "max-height": ""
6307                };
6308                cssOptions[o.isRtl ? 'margin-left' : 'margin-right'] = browser.scroll.width * -1 + 'px';
6309                cw.css(cssOptions);
6310            }
6311
6312            // init scrollbars & recalculate sizes
6313            $.each(s, function (d, scrollx) {
6314
6315                var scrollCallback = null;
6316                var scrollForward = 1;
6317                var scrollOffset = (d === 'x') ? 'scrollLeft' : 'scrollTop';
6318                var scrollStep = o.scrollStep;
6319                var scrollTo = function () {
6320                    var currentOffset = c[scrollOffset]();
6321                    c[scrollOffset](currentOffset + scrollStep);
6322                    if (scrollForward == 1 && (currentOffset + scrollStep) >= scrollToValue)
6323                        currentOffset = c[scrollOffset]();
6324                    if (scrollForward == -1 && (currentOffset + scrollStep) <= scrollToValue)
6325                        currentOffset = c[scrollOffset]();
6326                    if (c[scrollOffset]() == currentOffset && scrollCallback) {
6327                        scrollCallback();
6328                    }
6329                }
6330                var scrollToValue = 0;
6331
6332                if (!scrollx.scroll) {
6333
6334                    scrollx.scroll = S._getScroll(o['scroll' + d]).addClass('scroll-' + d);
6335
6336                    if (o.showArrows) {
6337                        scrollx.scroll.addClass('scroll-element_arrows_visible');
6338                    }
6339
6340                    scrollx.mousewheel = function (event) {
6341
6342                        if (!scrollx.isVisible || (d === 'x' && isVerticalScroll(event))) {
6343                            return true;
6344                        }
6345                        if (d === 'y' && !isVerticalScroll(event)) {
6346                            s.x.mousewheel(event);
6347                            return true;
6348                        }
6349
6350                        var delta = event.originalEvent.wheelDelta * -1 || event.originalEvent.detail;
6351                        var maxScrollValue = scrollx.size - scrollx.visible - scrollx.offset;
6352
6353                        // fix new mozilla
6354                        if (!delta) {
6355                            if (d === 'x' && !!event.originalEvent.deltaX) {
6356                                delta = event.originalEvent.deltaX * 40;
6357                            } else if (d === 'y' && !!event.originalEvent.deltaY) {
6358                                delta = event.originalEvent.deltaY * 40;
6359                            }
6360                        }
6361
6362                        if ((delta > 0 && scrollToValue < maxScrollValue) || (delta < 0 && scrollToValue > 0)) {
6363                            scrollToValue = scrollToValue + delta;
6364                            if (scrollToValue < 0)
6365                                scrollToValue = 0;
6366                            if (scrollToValue > maxScrollValue)
6367                                scrollToValue = maxScrollValue;
6368
6369                            S.scrollTo = S.scrollTo || {};
6370                            S.scrollTo[scrollOffset] = scrollToValue;
6371                            setTimeout(function () {
6372                                if (S.scrollTo) {
6373                                    c.stop().animate(S.scrollTo, 240, 'linear', function () {
6374                                        scrollToValue = c[scrollOffset]();
6375                                    });
6376                                    S.scrollTo = null;
6377                                }
6378                            }, 1);
6379                        }
6380
6381                        event.preventDefault();
6382                        return false;
6383                    };
6384
6385                    scrollx.scroll
6386                        .on('MozMousePixelScroll' + namespace, scrollx.mousewheel)
6387                        .on('mousewheel' + namespace, scrollx.mousewheel)
6388                        .on('mouseenter' + namespace, function () {
6389                            scrollToValue = c[scrollOffset]();
6390                        });
6391
6392                    // handle arrows & scroll inner mousedown event
6393                    scrollx.scroll.find('.scroll-arrow, .scroll-element_track')
6394                        .on('mousedown' + namespace, function (event) {
6395
6396                            if (event.which != 1) // lmb
6397                                return true;
6398
6399                            scrollForward = 1;
6400
6401                            var data = {
6402                                eventOffset: event[(d === 'x') ? 'pageX' : 'pageY'],
6403                                maxScrollValue: scrollx.size - scrollx.visible - scrollx.offset,
6404                                scrollbarOffset: scrollx.scroll.bar.offset()[(d === 'x') ? 'left' : 'top'],
6405                                scrollbarSize: scrollx.scroll.bar[(d === 'x') ? 'outerWidth' : 'outerHeight']()
6406                            };
6407                            var timeout = 0, timer = 0;
6408
6409                            if ($(this).hasClass('scroll-arrow')) {
6410                                scrollForward = $(this).hasClass("scroll-arrow_more") ? 1 : -1;
6411                                scrollStep = o.scrollStep * scrollForward;
6412                                scrollToValue = scrollForward > 0 ? data.maxScrollValue : 0;
6413                                if (o.isRtl) {
6414                                    switch(true){
6415                                        case browser.firefox:
6416                                            scrollToValue = scrollForward > 0 ? 0: data.maxScrollValue * -1+30;
6417                                            break;
6418                                        case browser.msie || browser.msedge:
6419                                            break;
6420                                    }
6421                                }
6422                            } else {
6423                                scrollForward = (data.eventOffset > (data.scrollbarOffset + data.scrollbarSize) ? 1
6424                                    : (data.eventOffset < data.scrollbarOffset ? -1 : 0));
6425                                if(d === 'x' && o.isRtl && (browser.msie || browser.msedge))
6426                                    scrollForward = scrollForward * -1;
6427                                scrollStep = Math.round(scrollx.visible * 0.75) * scrollForward;
6428                                scrollToValue = (data.eventOffset - data.scrollbarOffset -
6429                                    (o.stepScrolling ? (scrollForward == 1 ? data.scrollbarSize : 0)
6430                                        : Math.round(data.scrollbarSize / 2)));
6431                                scrollToValue = c[scrollOffset]() + (scrollToValue / scrollx.kx);
6432                            }
6433
6434                            S.scrollTo = S.scrollTo || {};
6435                            S.scrollTo[scrollOffset] = o.stepScrolling ? c[scrollOffset]() + scrollStep : scrollToValue;
6436
6437                            if (o.stepScrolling) {
6438                                scrollCallback = function () {
6439                                    scrollToValue = c[scrollOffset]();
6440                                    clearInterval(timer);
6441                                    clearTimeout(timeout);
6442                                    timeout = 0;
6443                                    timer = 0;
6444                                };
6445                                timeout = setTimeout(function () {
6446                                    timer = setInterval(scrollTo, 40);
6447                                }, o.duration + 100);
6448                            }
6449
6450                            setTimeout(function () {
6451                                if (S.scrollTo) {
6452                                    c.animate(S.scrollTo, o.duration);
6453                                    S.scrollTo = null;
6454                                }
6455                            }, 1);
6456
6457                            return S._handleMouseDown(scrollCallback, event);
6458                        });
6459
6460                    // handle scrollbar drag'n'drop
6461                    scrollx.scroll.bar.on('mousedown' + namespace, function (event) {
6462
6463                        if (event.which != 1) // lmb
6464                            return true;
6465
6466                        var eventPosition = event[(d === 'x') ? 'pageX' : 'pageY'];
6467                        var initOffset = c[scrollOffset]();
6468
6469                        scrollx.scroll.addClass('scroll-draggable');
6470
6471                        $(document).on('mousemove' + namespace, function (event) {
6472                            var diff = parseInt((event[(d === 'x') ? 'pageX' : 'pageY'] - eventPosition) / scrollx.kx, 10);
6473                            if (d === 'x' && o.isRtl && (browser.msie || browser.msedge))
6474                                diff = diff * -1;
6475                            c[scrollOffset](initOffset + diff);
6476                        });
6477
6478                        return S._handleMouseDown(function () {
6479                            scrollx.scroll.removeClass('scroll-draggable');
6480                            scrollToValue = c[scrollOffset]();
6481                        }, event);
6482                    });
6483                }
6484            });
6485
6486            // remove classes & reset applied styles
6487            $.each(s, function (d, scrollx) {
6488                var scrollClass = 'scroll-scroll' + d + '_visible';
6489                var scrolly = (d == "x") ? s.y : s.x;
6490
6491                scrollx.scroll.removeClass(scrollClass);
6492                scrolly.scroll.removeClass(scrollClass);
6493                cw.removeClass(scrollClass);
6494            });
6495
6496            // calculate init sizes
6497            $.each(s, function (d, scrollx) {
6498                $.extend(scrollx, (d == "x") ? {
6499                    offset: parseInt(c.css('left'), 10) || 0,
6500                    size: c.prop('scrollWidth'),
6501                    visible: w.width()
6502                } : {
6503                    offset: parseInt(c.css('top'), 10) || 0,
6504                    size: c.prop('scrollHeight'),
6505                    visible: w.height()
6506                });
6507            });
6508
6509            // update scrollbar visibility/dimensions
6510            this._updateScroll('x', this.scrollx);
6511            this._updateScroll('y', this.scrolly);
6512
6513            if ($.isFunction(o.onUpdate)) {
6514                o.onUpdate.apply(this, [c]);
6515            }
6516
6517            // calculate scroll size
6518            $.each(s, function (d, scrollx) {
6519
6520                var cssOffset = (d === 'x') ? 'left' : 'top';
6521                var cssFullSize = (d === 'x') ? 'outerWidth' : 'outerHeight';
6522                var cssSize = (d === 'x') ? 'width' : 'height';
6523                var offset = parseInt(c.css(cssOffset), 10) || 0;
6524
6525                var AreaSize = scrollx.size;
6526                var AreaVisible = scrollx.visible + offset;
6527
6528                var scrollSize = scrollx.scroll.size[cssFullSize]() + (parseInt(scrollx.scroll.size.css(cssOffset), 10) || 0);
6529
6530                if (o.autoScrollSize) {
6531                    scrollx.scrollbarSize = parseInt(scrollSize * AreaVisible / AreaSize, 10);
6532                    scrollx.scroll.bar.css(cssSize, scrollx.scrollbarSize + 'px');
6533                }
6534
6535                scrollx.scrollbarSize = scrollx.scroll.bar[cssFullSize]();
6536                scrollx.kx = ((scrollSize - scrollx.scrollbarSize) / (AreaSize - AreaVisible)) || 1;
6537                scrollx.maxScrollOffset = AreaSize - AreaVisible;
6538            });
6539
6540            c.scrollLeft(initScroll.scrollLeft).scrollTop(initScroll.scrollTop).trigger('scroll');
6541        },
6542        /**
6543         * Get scrollx/scrolly object
6544         *
6545         * @param {Mixed} scroll
6546         * @returns {jQuery} scroll object
6547         */
6548        _getScroll: function (scroll) {
6549            var types = {
6550                advanced: [
6551                    '<div class="scroll-element">',
6552                    '<div class="scroll-element_corner"></div>',
6553                    '<div class="scroll-arrow scroll-arrow_less"></div>',
6554                    '<div class="scroll-arrow scroll-arrow_more"></div>',
6555                    '<div class="scroll-element_outer">',
6556                    '<div class="scroll-element_size"></div>', // required! used for scrollbar size calculation !
6557                    '<div class="scroll-element_inner-wrapper">',
6558                    '<div class="scroll-element_inner scroll-element_track">', // used for handling scrollbar click
6559                    '<div class="scroll-element_inner-bottom"></div>',
6560                    '</div>',
6561                    '</div>',
6562                    '<div class="scroll-bar">', // required
6563                    '<div class="scroll-bar_body">',
6564                    '<div class="scroll-bar_body-inner"></div>',
6565                    '</div>',
6566                    '<div class="scroll-bar_bottom"></div>',
6567                    '<div class="scroll-bar_center"></div>',
6568                    '</div>',
6569                    '</div>',
6570                    '</div>'
6571                ].join(''),
6572                simple: [
6573                    '<div class="scroll-element">',
6574                    '<div class="scroll-element_outer">',
6575                    '<div class="scroll-element_size"></div>', // required! used for scrollbar size calculation !
6576                    '<div class="scroll-element_track"></div>', // used for handling scrollbar click
6577                    '<div class="scroll-bar"></div>', // required
6578                    '</div>',
6579                    '</div>'
6580                ].join('')
6581            };
6582            if (types[scroll]) {
6583                scroll = types[scroll];
6584            }
6585            if (!scroll) {
6586                scroll = types['simple'];
6587            }
6588            if (typeof (scroll) == 'string') {
6589                scroll = $(scroll).appendTo(this.wrapper);
6590            } else {
6591                scroll = $(scroll);
6592            }
6593            $.extend(scroll, {
6594                bar: scroll.find('.scroll-bar'),
6595                size: scroll.find('.scroll-element_size'),
6596                track: scroll.find('.scroll-element_track')
6597            });
6598            return scroll;
6599        },
6600        _handleMouseDown: function (callback, event) {
6601
6602            var namespace = this.namespace;
6603
6604            $(document).on('blur' + namespace, function () {
6605                $(document).add('body').off(namespace);
6606                callback && callback();
6607            });
6608            $(document).on('dragstart' + namespace, function (event) {
6609                event.preventDefault();
6610                return false;
6611            });
6612            $(document).on('mouseup' + namespace, function () {
6613                $(document).add('body').off(namespace);
6614                callback && callback();
6615            });
6616            $('body').on('selectstart' + namespace, function (event) {
6617                event.preventDefault();
6618                return false;
6619            });
6620
6621            event && event.preventDefault();
6622            return false;
6623        },
6624        _updateScroll: function (d, scrollx) {
6625
6626            var container = this.container,
6627                containerWrapper = this.containerWrapper || container,
6628                scrollClass = 'scroll-scroll' + d + '_visible',
6629                scrolly = (d === 'x') ? this.scrolly : this.scrollx,
6630                offset = parseInt(this.container.css((d === 'x') ? 'left' : 'top'), 10) || 0,
6631                wrapper = this.wrapper;
6632
6633            var AreaSize = scrollx.size;
6634            var AreaVisible = scrollx.visible + offset;
6635
6636            scrollx.isVisible = (AreaSize - AreaVisible) > 1; // bug in IE9/11 with 1px diff
6637            if (scrollx.isVisible) {
6638                scrollx.scroll.addClass(scrollClass);
6639                scrolly.scroll.addClass(scrollClass);
6640                containerWrapper.addClass(scrollClass);
6641            } else {
6642                scrollx.scroll.removeClass(scrollClass);
6643                scrolly.scroll.removeClass(scrollClass);
6644                containerWrapper.removeClass(scrollClass);
6645            }
6646
6647            if (d === 'y') {
6648                if (container.is('textarea') || AreaSize < AreaVisible) {
6649                    containerWrapper.css({
6650                        "height": (AreaVisible + browser.scroll.height) + 'px',
6651                        "max-height": "none"
6652                    });
6653                } else {
6654                    containerWrapper.css({
6655                        //"height": "auto", // do not reset height value: issue with height:100%!
6656                        "max-height": (AreaVisible + browser.scroll.height) + 'px'
6657                    });
6658                }
6659            }
6660
6661            if (scrollx.size != container.prop('scrollWidth')
6662                || scrolly.size != container.prop('scrollHeight')
6663                || scrollx.visible != wrapper.width()
6664                || scrolly.visible != wrapper.height()
6665                || scrollx.offset != (parseInt(container.css('left'), 10) || 0)
6666                || scrolly.offset != (parseInt(container.css('top'), 10) || 0)
6667                ) {
6668                $.extend(this.scrollx, {
6669                    offset: parseInt(container.css('left'), 10) || 0,
6670                    size: container.prop('scrollWidth'),
6671                    visible: wrapper.width()
6672                });
6673                $.extend(this.scrolly, {
6674                    offset: parseInt(container.css('top'), 10) || 0,
6675                    size: this.container.prop('scrollHeight'),
6676                    visible: wrapper.height()
6677                });
6678                this._updateScroll(d === 'x' ? 'y' : 'x', scrolly);
6679            }
6680        }
6681    };
6682
6683    var CustomScrollbar = BaseScrollbar;
6684
6685    /*
6686     * Extend jQuery as plugin
6687     *
6688     * @param {Mixed} command to execute
6689     * @param {Mixed} arguments as Array
6690     * @return {jQuery}
6691     */
6692    $.fn.scrollbar = function (command, args) {
6693        if (typeof command !== 'string') {
6694            args = command;
6695            command = 'init';
6696        }
6697        if (typeof args === 'undefined') {
6698            args = [];
6699        }
6700        if (!$.isArray(args)) {
6701            args = [args];
6702        }
6703        this.not('body, .scroll-wrapper').each(function () {
6704            var element = $(this),
6705                instance = element.data(browser.data.name);
6706            if (instance || command === 'init') {
6707                if (!instance) {
6708                    instance = new CustomScrollbar(element);
6709                }
6710                if (instance[command]) {
6711                    instance[command].apply(instance, args);
6712                }
6713            }
6714        });
6715        return this;
6716    };
6717
6718    /**
6719     * Connect default options to global object
6720     */
6721    $.fn.scrollbar.options = defaults;
6722
6723
6724    /**
6725     * Check if scroll content/container size is changed
6726     */
6727
6728    var updateScrollbars = (function () {
6729        var timer = 0,
6730            timerCounter = 0;
6731
6732        return function (force) {
6733            var i, container, options, scroll, wrapper, scrollx, scrolly;
6734            for (i = 0; i < browser.scrolls.length; i++) {
6735                scroll = browser.scrolls[i];
6736                container = scroll.container;
6737                options = scroll.options;
6738                wrapper = scroll.wrapper;
6739                scrollx = scroll.scrollx;
6740                scrolly = scroll.scrolly;
6741                if (force || (options.autoUpdate && wrapper && wrapper.is(':visible') &&
6742                    (container.prop('scrollWidth') != scrollx.size || container.prop('scrollHeight') != scrolly.size || wrapper.width() != scrollx.visible || wrapper.height() != scrolly.visible))) {
6743                    scroll.init();
6744
6745                    if (options.debug) {
6746                        window.console && console.log({
6747                            scrollHeight: container.prop('scrollHeight') + ':' + scroll.scrolly.size,
6748                            scrollWidth: container.prop('scrollWidth') + ':' + scroll.scrollx.size,
6749                            visibleHeight: wrapper.height() + ':' + scroll.scrolly.visible,
6750                            visibleWidth: wrapper.width() + ':' + scroll.scrollx.visible
6751                        }, true);
6752                        timerCounter++;
6753                    }
6754                }
6755            }
6756            if (debug && timerCounter > 10) {
6757                window.console && console.log('Scroll updates exceed 10');
6758                updateScrollbars = function () {};
6759            } else {
6760                clearTimeout(timer);
6761                timer = setTimeout(updateScrollbars, 300);
6762            }
6763        };
6764    })();
6765
6766    /* ADDITIONAL FUNCTIONS */
6767    /**
6768     * Get native browser scrollbar size (height/width)
6769     *
6770     * @param {Boolean} actual size or CSS size, default - CSS size
6771     * @returns {Object} with height, width
6772     */
6773    function getBrowserScrollSize(actualSize) {
6774
6775        if (browser.webkit && !actualSize) {
6776            return {
6777                height: 0,
6778                width: 0
6779            };
6780        }
6781
6782        if (!browser.data.outer) {
6783            var css = {
6784                "border": "none",
6785                "box-sizing": "content-box",
6786                "height": "200px",
6787                "margin": "0",
6788                "padding": "0",
6789                "width": "200px"
6790            };
6791            browser.data.inner = $("<div>").css($.extend({}, css));
6792            browser.data.outer = $("<div>").css($.extend({
6793                "left": "0",
6794                "overflow": "scroll",
6795                "position": "absolute",
6796                "top": "-1000px"
6797            }, css)).append(browser.data.inner).appendTo("body");
6798        }
6799
6800        browser.data.outer.scrollLeft(1000).scrollTop(1000);
6801
6802        return {
6803            height: Math.ceil((browser.data.outer.offset().top - browser.data.inner.offset().top) || 0),
6804            width: Math.ceil((browser.data.outer.offset().left - browser.data.inner.offset().left) || 0)
6805        };
6806    }
6807
6808    /**
6809     * Check if native browser scrollbars overlay content
6810     *
6811     * @returns {Boolean}
6812     */
6813    function isScrollOverlaysContent() {
6814        var scrollSize = getBrowserScrollSize(true);
6815        return !(scrollSize.height || scrollSize.width);
6816    }
6817
6818    function isVerticalScroll(event) {
6819        var e = event.originalEvent;
6820        if (e.axis && e.axis === e.HORIZONTAL_AXIS)
6821            return false;
6822        if (e.wheelDeltaX)
6823            return false;
6824        return true;
6825    }
6826
6827
6828    /**
6829     * Extend AngularJS as UI directive
6830     * and expose a provider for override default config
6831     *
6832     */
6833    if (window.angular) {
6834        (function (angular) {
6835            angular.module('jQueryScrollbar', [])
6836                .provider('jQueryScrollbar', function () {
6837                    var defaultOptions = defaults;
6838                    return {
6839                        setOptions: function (options) {
6840                            angular.extend(defaultOptions, options);
6841                        },
6842                        $get: function () {
6843                            return {
6844                                options: angular.copy(defaultOptions)
6845                            };
6846                        }
6847                    };
6848                })
6849                .directive('jqueryScrollbar', ['jQueryScrollbar', '$parse', function (jQueryScrollbar, $parse) {
6850                        return {
6851                            restrict: "AC",
6852                            link: function (scope, element, attrs) {
6853                                var model = $parse(attrs.jqueryScrollbar),
6854                                    options = model(scope);
6855                                element.scrollbar(options || jQueryScrollbar.options)
6856                                    .on('$destroy', function () {
6857                                        element.scrollbar('destroy');
6858                                    });
6859                            }
6860                        };
6861                    }]);
6862        })(window.angular);
6863    }
6864}));
6865;
6866/**
6867 * @file
6868 * Behaviors for the kawar theme.
6869 */
6870
6871(function ($, _, Drupal, drupalSettings) {
6872  'use strict';
6873
6874  Drupal.behaviors.kawar = {
6875    attach: function (context) {
6876      if ($(window).width() > 1024) {
6877        $(".nav li.expanded").hover(function () {
6878          $(this).addClass("open");
6879        }, function () {
6880          $(this).removeClass("open");
6881        });
6882      }
6883      
6884      $('.nav li.expanded .menu-arrow').each(function (){
6885        $(this).on('click', function () {
6886          $(this).parent().toggleClass('open');
6887        });
6888      });
6889
6890      $('.navbar-toggle').click(function () {
6891        if ($(this).hasClass("open")) {
6892          $(this).removeClass("open");
6893        } else {
6894          $(this).addClass("open");
6895        }
6896      });
6897
6898      $(window).on('load resize', function () {
6899        $('.small-width').css('width', '100%');
6900        var divWidth = $('.sector-edge2edge .node').width();
6901        $('.sector-edge2edge .node').height(divWidth);
6902      });
6903
6904      //Sticky header
6905      if (!$('body').hasClass('adminimal-admin-toolbar')) {
6906        var scrollSize = 88;
6907        if ($('.menu-block-ed2ed ul.menu--main li')[0]) {
6908          $('body').addClass('sec-menu-page');
6909          scrollSize = 180;
6910        }
6911        $(window).scroll(function () {
6912          if ($(window).scrollTop() >= scrollSize && $(window).width() > 992) {
6913            if ($('body').hasClass('path-frontpage')) {
6914              $('body').css('padding-top', '100px');
6915            } else {
6916              $('body').css('padding-top', '120px');
6917            }
6918            if ($('.menu-block-ed2ed ul.menu--main li')[0]) {
6919              $('.menu-block-ed2ed').addClass("sticky");
6920              $('body').css('padding-top', '65px');
6921            } else {
6922              $(".header-wrapper").addClass("sticky");
6923              $(".region-menu").css('top', '60px');
6924            }
6925          } else {
6926            $('body').css('padding-top', '0');
6927            $(".region-menu").css('top', '88px');
6928            if ($('.menu-block-ed2ed ul.menu--main li')[0]) {
6929              $('.menu-block-ed2ed').removeClass("sticky");
6930            } else {
6931              $(".header-wrapper").removeClass("sticky");
6932            }
6933            $(".header-wrapper").removeClass("sticky");
6934          }
6935        });
6936      }
6937      //numbers-banner-wrapper
6938      if ( $('.numbers-banner-wrapper')[0] && $(window).width() > 992 ) {
6939        let divCount = $(".numbers-banner-wrapper > div").children().length;
6940        $(".numbers-banner-wrapper > div").css('width', (100/$(".numbers-banner-wrapper > div").children().length)+ '%' );
6941      }
6942
6943      if( $('.webform-submission-form .select-wrapper')[0]) {
6944        $('.webform-submission-form .select-wrapper option:first-child').attr({
6945          "disabled":"disabled",
6946          "default":"true",
6947          "hidden":"true"
6948        });
6949      }
6950      $('.webform-submission-form select').on('change',function() {
6951        $(this).addClass('selected');
6952      });
6953    }
6954  };
6955
6956  Drupal.behaviors.matchHeight = {
6957    attach: function (context, settings) {
6958      var options = {
6959        byRow: true
6960      };
6961      var options2 = {
6962        byRow: false
6963      };
6964
6965      $(".equalizer-view > .view-content .node").matchHeight(options);
6966      $(".equalizer-view > .view-content .node .content-wrapper").matchHeight(options);
6967      $(".equalizer-view > .view-content .taxonomy-term").matchHeight(options);
6968      $(".equalizer-item").matchHeight(options);
6969      $(".node.node--type-company .field--name-field-logo").matchHeight(options);
6970      $(".field-company .node.node--type-company .field--name-field-logo").matchHeight(options2);
6971      $(".top-footer ul.menu li.dropdown:nth-child(n+3) ul.dropdown-menu").matchHeight(options);
6972
6973      $(".paragraph--type--bp-columns .paragraph--type--cta-tout .text-center").matchHeight(options2);
6974      $(".paragraph--type--bp-columns .paragraph--type--cta-tout .field--name-field-text-brief").matchHeight(options2);
6975
6976      $(".view-id-newsroom .node .main-content").matchHeight(options);
6977      $(".view-id-newsroom .col .node .main-content .content-wrapper").matchHeight(options);
6978
6979      $(".view-display-id-home_page_project .col .node img").matchHeight(options);
6980
6981      // let toutHeight =  $('.view-display-id-home_page_project .col .node .featured-project .field--name-body').height();
6982      // $('.view-display-id-home_page_project .col img ').css('height', toutHeight + 200);
6983
6984    }
6985  };
6986
6987
6988  // Check this link to discover Animate On Scroll Library (http://michalsnik.github.io/aos/)
6989 Drupal.behaviors.aosAnimate = {
6990   attach: function (context, settings) {
6991     if ($(window).width() > 992) {
6992       $('.timeline-list li').attr({
6993         'data-aos': 'zoom-in-up',
6994         'data-aos-duration': '2000',
6995         'data-aos-anchor-placement': 'top-bottom'
6996       });
6997      //  $('.node--type-project .tout-content').attr({
6998      //    'data-aos': 'fade-up',
6999      //    'data-aos-duration': '1000',
7000      //    'data-aos-anchor-placement': 'top-bottom'
7001      //  });
7002       AOS.init();
7003     }
7004   }
7005 };
7006
7007  Drupal.behaviors.paragraph = {
7008    attach: function (context, settings) {
7009      $(window).on('load resize', function () {
7010        if ($(window).width() < 1025) {
7011          $('.paragraph--type--text-and-images  .sec-third-image').css('width', $('.paragraph--type--text-and-images .first-image').width());
7012        }
7013      });
7014    }
7015  };
7016
7017  var flag = false , flagY = false;
7018  function animateNumbers() {
7019    $('.paragraph--type--numbers .field--name-field-number').each(function () {
7020      $(this).prop('Counter', 0).animate({Counter: $(this).text()}, {
7021        duration: 7000,
7022        easing: 'swing',
7023        step: function (now) {
7024          $(this).text(Math.ceil(now));
7025        }
7026      });
7027    });
7028
7029    $('.block-kawar-yearsblock .years').each(function () {
7030
7031      $(this).prop('Counter', 0).animate({Counter: $(this).text()}, {
7032        duration: 5000,
7033        easing: 'swing',
7034        step: function (now) {
7035          $(this).text(Math.ceil(now));
7036        }
7037      });
7038    });
7039  }
7040
7041  Drupal.behaviors.numberAnimation = {
7042    attach: function (context, settings) {
7043      if ($('.paragraph--type--numbers')[0] && !$('body.page-node-type-sector')[0]) {
7044        $(window).on('load resize', function () {
7045          if ($(window).scrollTop() < $(".paragraph--type--numbers").offset().top && !flag) {
7046            animateNumbers();
7047            flag = true;
7048          }
7049        });
7050        $(window).scroll(function () {
7051          if ($(this).scrollTop() > $(".block-kawar-yearsblock .years").offset().top - 550 && !flagY) {
7052            animateNumbers();
7053            flagY = true;
7054          }
7055        });
7056      }
7057    }
7058  };
7059
7060  Drupal.behaviors.subscriptionEmailValidation = {
7061    attach: function (context, settings) {
7062      $(window).on('load', function () {
7063        if ($('.mailchimp-signup-subscribe-form')[0]) {
7064          $('.mailchimp-signup-subscribe-form input.form-email').attr({
7065            'pattern':'[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$',
7066            'data-webform-pattern-error': Drupal.t('Wrong Email Format')
7067          });
7068        }
7069      });
7070    }
7071  };
7072
7073  // Leadership page functionality
7074  Drupal.behaviors.leadership = {
7075    attach: function (context, settings) {
7076      jQuery('.scrollbar-inner').scrollbar();
7077      $('.member-tout', context).unbind().click(function () {
7078        var noRows = Math.ceil($(".member-tout").length / 3);
7079        var member = $('.member-tout').index(this);
7080        var memberRow = Math.floor(member / 3) + 1;
7081        var divHeight = ($(".member-tout").height() * (noRows + 1) + 125);
7082        if ($(window).width() <= 767) {
7083          var bioTop = 0;
7084          var columnHeight = "auto";
7085        } else {
7086          bioTop = ($(".member-tout").height() * memberRow);
7087          columnHeight = $(".member-tout").height() * 2 + 50;
7088        }
7089
7090        if ($(this).parent().hasClass("open")) {
7091          $(this).parent().removeClass("open");
7092          $(this).parent().addClass('close-div');
7093          $('.view-leadership .views-row').removeClass("open");
7094          setTimeout(function() {
7095            $(".view-leadership").css("min-height","");
7096          }, 550);
7097          $(".view-leadership").css("min-height", "");
7098          $(".member-bio").eq(member).css("height", "");
7099          $(".member-bio").not(':eq(' + member + ')').css('height', '');
7100          $('html, body').animate({
7101            scrollTop: $(this).parent().offset().top - 250
7102          }, 1000);
7103        } else {
7104          $(this).parent().addClass("open");
7105          $(this).parent().removeClass("close-div");
7106          $('.member-tout').eq((memberRow - 1) + memberRow * 2).css("min-height", columnHeight);
7107          $(".view-leadership").css("min-height", divHeight);
7108          $('.member-tout').not(':eq(' + member + ')').parent().removeClass('open');
7109          $(".member-bio").eq(member).css({
7110            "height": "auto",
7111            "top": bioTop
7112          });
7113          $(".member-bio").not(':eq(' + member + ')').css('height', '0');
7114          $('html, body').animate({
7115            scrollTop: $(".member-bio").eq(member).offset().top - 150
7116          }, 1000);
7117        }
7118      });
7119
7120      $('.close-btn').unbind().click(function () {
7121        setTimeout(function() {
7122          $(".view-leadership").css("min-height","");
7123        }, 550);
7124        $(".views-row ").removeClass("open");
7125        $(".views-row ").addClass("close-div");
7126        $('.member-tout').removeAttr("style");
7127        $('html, body').animate({
7128          scrollTop: $(".view-leadership").offset().top - 250
7129        }, 1000);
7130      });
7131    }
7132  };
7133
7134  Drupal.behaviors.menuStyle = {
7135    attach: function (context, settings) {
7136      $(window).on('load', function () {
7137        if ($(window).width() > 1024) {
7138          $('#block-mainnavigation-3 ul, #block-mainnavigation-2 ul ').addClass('container');
7139          $('header').mousemove(function () {
7140            $('.about-us, #block-mainnavigation-2').mousemove(function () {
7141              $('#block-mainnavigation-2').css('transform', 'scaleY(1)');//.show();
7142              if ($('.about-us').hasClass('active-trail')) {
7143                $('#block-mainnavigation-2').css('transform', 'scaleY(0)');//.show();
7144              }
7145            }).mouseout(function () {
7146              $('#block-mainnavigation-2').css('transform', 'scaleY(0)');//.hide();
7147            });
7148
7149            $('.our-sector, #block-mainnavigation-3').mousemove(function () {
7150              $('#block-mainnavigation-3').css('transform', 'scaleY(1)');//.show();
7151              if ($('.our-sector').hasClass('active-trail')) {
7152                $('#block-mainnavigation-3').css('transform', 'scaleY(0)');//.show();
7153              }
7154            }).mouseout(function () {
7155              $('#block-mainnavigation-3').css('transform', 'scaleY(0)');//.hide();
7156            });
7157
7158          });
7159        }
7160      });
7161    }
7162  };
7163
7164})(window.jQuery, window._, window.Drupal, window.drupalSettings);
7165
7166jQuery(document).ready(function ($) {
7167  $(".scroll-banner-wrapper").click(function (e) {
7168    e.preventDefault();
7169    let wheight = "";
7170    wheight += $(window).height();
7171    let scrollNum = wheight - (wheight * 0.4);
7172    $("html, body").animate({scrollTop: '+=' + scrollNum + 'px'}, "slow");
7173    $("#gobottom").css('display', 'block');
7174    return false;
7175  });
7176});
7177;
7178(function ($, _, Drupal, drupalSettings) {
7179  'use strict';
7180  Drupal.behaviors.timeline = {
7181    attach: function (context, settings) {
7182      $(window).on ('load', function(){
7183        let headerImage = $('header').outerHeight() + $('.banner-image').outerHeight() + $('.menu-block-ed2ed').outerHeight();
7184        if ($('.view-id-timeline')[0] && $(window).width() > 950) {
7185          let menuItemsArray = new Array();
7186          let i = 1
7187          $('li.timeline-item').each(function(){
7188            let liId = "timeline-" + i;
7189            $(this).attr('id', liId);
7190            let year = $(this).find('.field--name-field-date-text').text();
7191            menuItemsArray.push({
7192              id: liId,
7193              text: year
7194            });
7195            ++i;
7196          });
7197  
7198          // add ul
7199          var listString = '<ul class="content-menu-list menu nav">';
7200          for ( var x=0; x < menuItemsArray.length; x++) {
7201            listString += '<li><a href="#'+menuItemsArray[x]['id']+'"><span class="menu-number">'+ menuItemsArray[x]['text'] +'</span></a></li>'
7202          }
7203          listString += '</ul>';
7204  
7205          $("#timeline-menu").once().append(listString);
7206  
7207          $(' ul.content-menu-list').onePageNav({
7208            currentClass: 'current',
7209            changeHash: false,
7210            scrollSpeed: 1000,
7211            scrollThreshold: 0.5,
7212            filter: '',
7213            easing: 'swing',
7214            begin: function() {},
7215            end: function() {},
7216            scrollChange: function($currentListItem) {}
7217          });
7218  
7219          // calculate the top
7220          let headerImage = $('header').outerHeight() + $('.banner-image').outerHeight();
7221          let topMenu = headerImage + 100;
7222          if ( topMenu > 550) {
7223            $('#timeline-menu').css('top', topMenu);
7224          }
7225          $('#timeline-menu ul li:first-child').addClass('current');
7226        }
7227        let footerHeight = $('.footer-wrapper').outerHeight();
7228        let pageHeight = $('body').outerHeight();
7229        $(window).scroll(function () {
7230          if ($(window).scrollTop() > headerImage && $('.view-id-timeline')[0] ) {
7231            $('#timeline-menu').css({'position':'fixed','top':'100px'});
7232            if ($(window).scrollTop() > (pageHeight - footerHeight - 300)) {
7233              $('#timeline-menu').css('opacity', '0');
7234            } else {
7235              $('#timeline-menu').css('opacity', '1');
7236            }
7237          } else {
7238            $('#timeline-menu').css({'position':'absolute','top':headerImage + 100});
7239          }
7240        });
7241      });
7242    }
7243  };
7244})(window.jQuery, window._, window.Drupal, window.drupalSettings);;
7245/**
7246* DO NOT EDIT THIS FILE.
7247* See the following change record for more information,
7248* https://www.drupal.org/node/2815083
7249* @preserve
7250**/
7251
7252Drupal.debounce = function (func, wait, immediate) {
7253  var timeout = void 0;
7254  var result = void 0;
7255  return function () {
7256    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
7257      args[_key] = arguments[_key];
7258    }
7259
7260    var context = this;
7261    var later = function later() {
7262      timeout = null;
7263      if (!immediate) {
7264        result = func.apply(context, args);
7265      }
7266    };
7267    var callNow = immediate && !timeout;
7268    clearTimeout(timeout);
7269    timeout = setTimeout(later, wait);
7270    if (callNow) {
7271      result = func.apply(context, args);
7272    }
7273    return result;
7274  };
7275};;
7276/**
7277 * @file
7278 * External links js file.
7279 */
7280
7281(function ($, Drupal, drupalSettings) {
7282
7283  'use strict';
7284
7285  Drupal.extlink = Drupal.extlink || {};
7286
7287  Drupal.extlink.attach = function (context, drupalSettings) {
7288    if (typeof drupalSettings.data === 'undefined' || !drupalSettings.data.hasOwnProperty('extlink')) {
7289      return;
7290    }
7291
7292    // Define the jQuery method (either 'append' or 'prepend') of placing the
7293    // icon, defaults to 'append'.
7294    var extIconPlacement = 'append';
7295    if (drupalSettings.data.extlink.extIconPlacement && drupalSettings.data.extlink.extIconPlacement != '0') {
7296          extIconPlacement = drupalSettings.data.extlink.extIconPlacement;
7297        }
7298
7299    // Strip the host name down, removing ports, subdomains, or www.
7300    var pattern = /^(([^\/:]+?\.)*)([^\.:]{1,})((\.[a-z0-9]{1,253})*)(:[0-9]{1,5})?$/;
7301    var host = window.location.host.replace(pattern, '$2$3$6');
7302    var subdomain = window.location.host.replace(host, '');
7303
7304    // Determine what subdomains are considered internal.
7305    var subdomains;
7306    if (drupalSettings.data.extlink.extSubdomains) {
7307      subdomains = '([^/]*\\.)?';
7308    }
7309    else if (subdomain === 'www.' || subdomain === '') {
7310      subdomains = '(www\\.)?';
7311    }
7312    else {
7313      subdomains = subdomain.replace('.', '\\.');
7314    }
7315
7316    // Whitelisted domains.
7317    var whitelistedDomains = false;
7318    if (drupalSettings.data.extlink.whitelistedDomains) {
7319      whitelistedDomains = [];
7320      for (var i = 0; i < drupalSettings.data.extlink.whitelistedDomains.length; i++) {
7321        whitelistedDomains.push(new RegExp('^https?:\\/\\/' + drupalSettings.data.extlink.whitelistedDomains[i].replace(/(\r\n|\n|\r)/gm,'') + '.*$', 'i'));
7322      }
7323    }
7324
7325    // Build regular expressions that define an internal link.
7326    var internal_link = new RegExp('^https?://([^@]*@)?' + subdomains + host, 'i');
7327
7328    // Extra internal link matching.
7329    var extInclude = false;
7330    if (drupalSettings.data.extlink.extInclude) {
7331      extInclude = new RegExp(drupalSettings.data.extlink.extInclude.replace(/\\/, '\\'), 'i');
7332    }
7333
7334    // Extra external link matching.
7335    var extExclude = false;
7336    if (drupalSettings.data.extlink.extExclude) {
7337      extExclude = new RegExp(drupalSettings.data.extlink.extExclude.replace(/\\/, '\\'), 'i');
7338    }
7339
7340    // Extra external link CSS selector exclusion.
7341    var extCssExclude = false;
7342    if (drupalSettings.data.extlink.extCssExclude) {
7343      extCssExclude = drupalSettings.data.extlink.extCssExclude;
7344    }
7345
7346    // Extra external link CSS selector explicit.
7347    var extCssExplicit = false;
7348    if (drupalSettings.data.extlink.extCssExplicit) {
7349      extCssExplicit = drupalSettings.data.extlink.extCssExplicit;
7350    }
7351
7352    // Find all links which are NOT internal and begin with http as opposed
7353    // to ftp://, javascript:, etc. other kinds of links.
7354    // When operating on the 'this' variable, the host has been appended to
7355    // all links by the browser, even local ones.
7356    // In jQuery 1.1 and higher, we'd use a filter method here, but it is not
7357    // available in jQuery 1.0 (Drupal 5 default).
7358    var external_links = [];
7359    var mailto_links = [];
7360    $('a:not([data-extlink]), area:not([data-extlink])', context).each(function (el) {
7361      try {
7362        var url = '';
7363        if (typeof this.href == 'string') {
7364          url = this.href.toLowerCase();
7365        }
7366        // Handle SVG links (xlink:href).
7367        else if (typeof this.href == 'object') {
7368          url = this.href.baseVal;
7369        }
7370        if (url.indexOf('http') === 0
7371          && ((!internal_link.test(url) && !(extExclude && extExclude.test(url))) || (extInclude && extInclude.test(url)))
7372          && !(extCssExclude && $(this).is(extCssExclude))
7373          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
7374          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
7375          var match = false;
7376          if (whitelistedDomains) {
7377            for (var i = 0; i < whitelistedDomains.length; i++) {
7378              if (whitelistedDomains[i].test(url)) {
7379                match = true;
7380                break;
7381              }
7382            }
7383          }
7384          if (!match) {
7385            external_links.push(this);
7386          }
7387        }
7388        // Do not include area tags with begin with mailto: (this prohibits
7389        // icons from being added to image-maps).
7390        else if (this.tagName !== 'AREA'
7391          && url.indexOf('mailto:') === 0
7392          && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
7393          && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
7394          mailto_links.push(this);
7395        }
7396      }
7397      // IE7 throws errors often when dealing with irregular links, such as:
7398      // <a href="node/10"></a> Empty tags.
7399      // <a href="http://user:[email protected]">example</a> User:pass syntax.
7400      catch (error) {
7401        return false;
7402      }
7403    });
7404
7405    if (drupalSettings.data.extlink.extClass !== '0' && drupalSettings.data.extlink.extClass !== '') {
7406      Drupal.extlink.applyClassAndSpan(external_links, drupalSettings.data.extlink.extClass, extIconPlacement);
7407    }
7408
7409    if (drupalSettings.data.extlink.mailtoClass !== '0' && drupalSettings.data.extlink.mailtoClass !== '') {
7410      Drupal.extlink.applyClassAndSpan(mailto_links, drupalSettings.data.extlink.mailtoClass, extIconPlacement);
7411    }
7412
7413    if (drupalSettings.data.extlink.extTarget) {
7414      // Apply the target attribute to all links.
7415      $(external_links).filter(function () {
7416        // Filter out links with target set if option specified.
7417        return !(drupalSettings.data.extlink.extTargetNoOverride && $(this).is('a[target]'));
7418      }).attr({target: '_blank'});
7419
7420      // Add noopener rel attribute to combat phishing.
7421      $(external_links).attr('rel', function (i, val) {
7422        // If no rel attribute is present, create one with the value noopener.
7423        if (val === null || typeof val === 'undefined') {
7424          return 'noopener';
7425        }
7426        // Check to see if rel contains noopener. Add what doesn't exist.
7427        if (val.indexOf('noopener') > -1) {
7428          if (val.indexOf('noopener') === -1) {
7429            return val + ' noopener';
7430          }
7431          // Noopener exists. Nothing needs to be added.
7432          else {
7433            return val;
7434          }
7435        }
7436        // Else, append noopener to val.
7437        else {
7438          return val + ' noopener';
7439        }
7440      });
7441    }
7442
7443    if (drupalSettings.data.extlink.extNofollow) {
7444      $(external_links).attr('rel', function (i, val) {
7445        // When the link does not have a rel attribute set it to 'nofollow'.
7446        if (val === null || typeof val === 'undefined') {
7447          return 'nofollow';
7448        }
7449        var target = 'nofollow';
7450        // Change the target, if not overriding follow.
7451        if (drupalSettings.data.extlink.extFollowNoOverride) {
7452          target = 'follow';
7453        }
7454        if (val.indexOf(target) === -1) {
7455          return val + ' nofollow';
7456        }
7457        return val;
7458      });
7459    }
7460
7461    if (drupalSettings.data.extlink.extNoreferrer) {
7462      $(external_links).attr('rel', function (i, val) {
7463        // When the link does not have a rel attribute set it to 'noreferrer'.
7464        if (val === null || typeof val === 'undefined') {
7465          return 'noreferrer';
7466        }
7467        if (val.indexOf('noreferrer') === -1) {
7468          return val + ' noreferrer';
7469        }
7470        return val;
7471      });
7472    }
7473
7474    Drupal.extlink = Drupal.extlink || {};
7475
7476    // Set up default click function for the external links popup. This should be
7477    // overridden by modules wanting to alter the popup.
7478    Drupal.extlink.popupClickHandler = Drupal.extlink.popupClickHandler || function () {
7479      if (drupalSettings.data.extlink.extAlert) {
7480        return confirm(drupalSettings.data.extlink.extAlertText);
7481      }
7482    };
7483
7484    $(external_links).off("click.extlink");
7485    $(external_links).on("click.extlink", function (e) {
7486      return Drupal.extlink.popupClickHandler(e, this);
7487    });
7488  };
7489
7490  /**
7491   * Apply a class and a trailing <span> to all links not containing images.
7492   *
7493   * @param {object[]} links
7494   *   An array of DOM elements representing the links.
7495   * @param {string} class_name
7496   *   The class to apply to the links.
7497   * @param {string} icon_placement
7498   *   'append' or 'prepend' the icon to the link.
7499   */
7500  Drupal.extlink.applyClassAndSpan = function (links, class_name, icon_placement) {
7501    var $links_to_process;
7502    if (drupalSettings.data.extlink.extImgClass) {
7503      $links_to_process = $(links);
7504    }
7505    else {
7506      var links_with_images = $(links).find('img, svg').parents('a');
7507      $links_to_process = $(links).not(links_with_images);
7508    }
7509
7510    if (class_name !== '0') {
7511      $links_to_process.addClass(class_name);
7512    }
7513
7514    // Add data-extlink attribute.
7515    $links_to_process.attr('data-extlink', '');
7516
7517    var i;
7518    var length = $links_to_process.length;
7519    for (i = 0; i < length; i++) {
7520      var $link = $($links_to_process[i]);
7521      if (drupalSettings.data.extlink.extUseFontAwesome) {
7522        if (class_name === drupalSettings.data.extlink.mailtoClass) {
7523          $link[icon_placement]('<span class="fa-' + class_name + ' extlink">
7523<span class="' + drupalSettings.data.extlink.extFaMailtoClasses + '" aria-label="' + drupalSettings.data.extlink.mailtoLabel + '"></span></span>');
7524        }
7525        else {
7526          $link[icon_placement]('<span class="fa-' + class_name + ' extlink"><span class="' + drupalSettings.data.extlink.extFaLinkClasses + '" aria-label="' + drupalSettings.data.extlink.extLabel + '"></span></span>');
7527        }
7528      }
7529      else {
7530        if (class_name === drupalSettings.data.extlink.mailtoClass) {
7531          $link[icon_placement]('<svg focusable="false" class="' + class_name + '" role="img" aria-label="' + drupalSettings.data.extlink.mailtoLabel + '" xmlns="http://www.w3.org/2000/svg" viewBox="0 10 70 20"><metadata><sfw xmlns="http://ns.adobe.com/SaveForWeb/1.0/"><sliceSourceBounds y="-8160" x="-8165" width="16389" height="16384" bottomLeftOrigin="true"/><optimizationSettings><targetSettings targetSettingsID="0" fileFormat="PNG24Format"><PNG24Format transparency="true" filtered="false" interlaced="false" noMatteColor="false" matteColor="#FFFFFF"/></targetSettings></optimizationSettings></sfw></metadata><title>' + drupalSettings.data.extlink.mailtoLabel + '</title><path d="M56 14H8c-1.1 0-2 0.9-2 2v32c0 1.1 0.9 2 2 2h48c1.1 0 2-0.9 2-2V16C58 14.9 57.1 14 56 14zM50.5 18L32 33.4 13.5 18H50.5zM10 46V20.3l20.7 17.3C31.1 37.8 31.5 38 32 38s0.9-0.2 1.3-0.5L54 20.3V46H10z"/></svg>');
7532        }
7533        else {
7534          $link[icon_placement]('<svg focusable="false" class="' + class_name + '" role="img" aria-label="' + drupalSettings.data.extlink.extLabel + '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 40"><metadata><sfw xmlns="http://ns.adobe.com/SaveForWeb/1.0/"><sliceSourceBounds y="-8160" x="-8165" width="16389" height="16384" bottomLeftOrigin="true"/><optimizationSettings><targetSettings targetSettingsID="0" fileFormat="PNG24Format"><PNG24Format transparency="true" filtered="false" interlaced="false" noMatteColor="false" matteColor="#FFFFFF"/></targetSettings></optimizationSettings></sfw></metadata><title>' + drupalSettings.data.extlink.extLabel + '</title><path d="M48 26c-1.1 0-2 0.9-2 2v26H10V18h26c1.1 0 2-0.9 2-2s-0.9-2-2-2H8c-1.1 0-2 0.9-2 2v40c0 1.1 0.9 2 2 2h40c1.1 0 2-0.9 2-2V28C50 26.9 49.1 26 48 26z"/><path d="M56 6H44c-1.1 0-2 0.9-2 2s0.9 2 2 2h7.2L30.6 30.6c-0.8 0.8-0.8 2 0 2.8C31 33.8 31.5 34 32 34s1-0.2 1.4-0.6L54 12.8V20c0 1.1 0.9 2 2 2s2-0.9 2-2V8C58 6.9 57.1 6 56 6z"/></svg>');
7535        }
7536      }
7537    }
7538  };
7539
7540  Drupal.behaviors.extlink = Drupal.behaviors.extlink || {};
7541  Drupal.behaviors.extlink.attach = function (context, drupalSettings) {
7542    // Backwards compatibility, for the benefit of modules overriding extlink
7543    // functionality by defining an "extlinkAttach" global function.
7544    if (typeof extlinkAttach === 'function') {
7545      extlinkAttach(context);
7546    }
7547    else {
7548      Drupal.extlink.attach(context, drupalSettings);
7549    }
7550  };
7551
7552})(jQuery, Drupal, drupalSettings);
7553;
7554/**
7555 * @file
7556 * Webform behaviors.
7557 */
7558
7559(function ($, Drupal) {
7560
7561  'use strict';
7562
7563  // Trigger Drupal's attaching of behaviors after the page is
7564  // completely loaded.
7565  // @see https://stackoverflow.com/questions/37838430/detect-if-page-is-load-from-back-button
7566  // @see https://stackoverflow.com/questions/20899274/how-to-refresh-page-on-back-button-click/20899422#20899422
7567  var isChrome = (/chrom(e|ium)/.test(window.navigator.userAgent.toLowerCase()));
7568  if (isChrome) {
7569    // Track back button in navigation.
7570    // @see https://stackoverflow.com/questions/37838430/detect-if-page-is-load-from-back-button
7571    var backButton = false;
7572    if (window.performance) {
7573      var navEntries = window.performance.getEntriesByType('navigation');
7574      if (navEntries.length > 0 && navEntries[0].type === 'back_forward') {
7575        backButton = true;
7576      }
7577      else if (window.performance.navigation
7578        && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) {
7579        backButton = true;
7580      }
7581    }
7582
7583    // If the back button is pressed, delay Drupal's attaching of behaviors.
7584    if (backButton) {
7585      var attachBehaviors = Drupal.attachBehaviors;
7586      Drupal.attachBehaviors = function (context, settings) {
7587        setTimeout(function (context, settings) {
7588          attachBehaviors(context, settings);
7589        }, 300);
7590      };
7591    }
7592  }
7593
7594})(jQuery, Drupal);
7595;
7596/**
7597* DO NOT EDIT THIS FILE.
7598* See the following change record for more information,
7599* https://www.drupal.org/node/2815083
7600* @preserve
7601**/
7602
7603(function ($, Drupal) {
7604  var states = {
7605    postponed: []
7606  };
7607
7608  Drupal.states = states;
7609
7610  function invert(a, invertState) {
7611    return invertState && typeof a !== 'undefined' ? !a : a;
7612  }
7613
7614  function _compare2(a, b) {
7615    if (a === b) {
7616      return typeof a === 'undefined' ? a : true;
7617    }
7618
7619    return typeof a === 'undefined' || typeof b === 'undefined';
7620  }
7621
7622  function ternary(a, b) {
7623    if (typeof a === 'undefined') {
7624      return b;
7625    }
7626    if (typeof b === 'undefined') {
7627      return a;
7628    }
7629
7630    return a && b;
7631  }
7632
7633  Drupal.behaviors.states = {
7634    attach: function attach(context, settings) {
7635      var $states = $(context).find('[data-drupal-states]');
7636      var il = $states.length;
7637
7638      var _loop = function _loop(i) {
7639        var config = JSON.parse($states[i].getAttribute('data-drupal-states'));
7640        Object.keys(config || {}
7640).forEach(function (state) {
7641          new states.Dependent({
7642            element: $($states[i]),
7643            state: states.State.sanitize(state),
7644            constraints: config[state]
7645          });
7646        });
7647      };
7648
7649      for (var i = 0; i < il; i++) {
7650        _loop(i);
7651      }
7652
7653      while (states.postponed.length) {
7654        states.postponed.shift()();
7655      }
7656    }
7657  };
7658
7659  states.Dependent = function (args) {
7660    var _this = this;
7661
7662    $.extend(this, { values: {}, oldValue: null }, args);
7663
7664    this.dependees = this.getDependees();
7665    Object.keys(this.dependees || {}).forEach(function (selector) {
7666      _this.initializeDependee(selector, _this.dependees[selector]);
7667    });
7668  };
7669
7670  states.Dependent.comparisons = {
7671    RegExp: function RegExp(reference, value) {
7672      return reference.test(value);
7673    },
7674    Function: function Function(reference, value) {
7675      return reference(value);
7676    },
7677    Number: function Number(reference, value) {
7678      return typeof value === 'string' ? _compare2(reference.toString(), value) : _compare2(reference, value);
7679    }
7680  };
7681
7682  states.Dependent.prototype = {
7683    initializeDependee: function initializeDependee(selector, dependeeStates) {
7684      var _this2 = this;
7685
7686      this.values[selector] = {};
7687
7688      Object.keys(dependeeStates).forEach(function (i) {
7689        var state = dependeeStates[i];
7690
7691        if ($.inArray(state, dependeeStates) === -1) {
7692          return;
7693        }
7694
7695        state = states.State.sanitize(state);
7696
7697        _this2.values[selector][state.name] = null;
7698
7699        $(selector).on('state:' + state, { selector: selector, state: state }, function (e) {
7700          _this2.update(e.data.selector, e.data.state, e.value);
7701        });
7702
7703        new states.Trigger({ selector: selector, state: state });
7704      });
7705    },
7706    compare: function compare(reference, selector, state) {
7707      var value = this.values[selector][state.name];
7708      if (reference.constructor.name in states.Dependent.comparisons) {
7709        return states.Dependent.comparisons[reference.constructor.name](reference, value);
7710      }
7711
7712      return _compare2(reference, value);
7713    },
7714    update: function update(selector, state, value) {
7715      if (value !== this.values[selector][state.name]) {
7716        this.values[selector][state.name] = value;
7717        this.reevaluate();
7718      }
7719    },
7720    reevaluate: function reevaluate() {
7721      var value = this.verifyConstraints(this.constraints);
7722
7723      if (value !== this.oldValue) {
7724        this.oldValue = value;
7725
7726        value = invert(value, this.state.invert);
7727
7728        this.element.trigger({
7729          type: 'state:' + this.state,
7730          value: value,
7731          trigger: true
7732        });
7733      }
7734    },
7735    verifyConstraints: function verifyConstraints(constraints, selector) {
7736      var result = void 0;
7737      if ($.isArray(constraints)) {
7738        var hasXor = $.inArray('xor', constraints) === -1;
7739        var len = constraints.length;
7740        for (var i = 0; i < len; i++) {
7741          if (constraints[i] !== 'xor') {
7742            var constraint = this.checkConstraints(constraints[i], selector, i);
7743
7744            if (constraint && (hasXor || result)) {
7745              return hasXor;
7746            }
7747            result = result || constraint;
7748          }
7749        }
7750      } else if ($.isPlainObject(constraints)) {
7751          for (var n in constraints) {
7752            if (constraints.hasOwnProperty(n)) {
7753              result = ternary(result, this.checkConstraints(constraints[n], selector, n));
7754
7755              if (result === false) {
7756                return false;
7757              }
7758            }
7759          }
7760        }
7761      return result;
7762    },
7763    checkConstraints: function checkConstraints(value, selector, state) {
7764      if (typeof state !== 'string' || /[0-9]/.test(state[0])) {
7765        state = null;
7766      } else if (typeof selector === 'undefined') {
7767        selector = state;
7768        state = null;
7769      }
7770
7771      if (state !== null) {
7772        state = states.State.sanitize(state);
7773        return invert(this.compare(value, selector, state), state.invert);
7774      }
7775
7776      return this.verifyConstraints(value, selector);
7777    },
7778    getDependees: function getDependees() {
7779      var cache = {};
7780
7781      var _compare = this.compare;
7782      this.compare = function (reference, selector, state) {
7783        (cache[selector] || (cache[selector] = [])).push(state.name);
7784      };
7785
7786      this.verifyConstraints(this.constraints);
7787
7788      this.compare = _compare;
7789
7790      return cache;
7791    }
7792  };
7793
7794  states.Trigger = function (args) {
7795    $.extend(this, args);
7796
7797    if (this.state in states.Trigger.states) {
7798      this.element = $(this.selector);
7799
7800      if (!this.element.data('trigger:' + this.state)) {
7801        this.initialize();
7802      }
7803    }
7804  };
7805
7806  states.Trigger.prototype = {
7807    initialize: function initialize() {
7808      var _this3 = this;
7809
7810      var trigger = states.Trigger.states[this.state];
7811
7812      if (typeof trigger === 'function') {
7813        trigger.call(window, this.element);
7814      } else {
7815        Object.keys(trigger || {}
7815).forEach(function (event) {
7816          _this3.defaultTrigger(event, trigger[event]);
7817        });
7818      }
7819
7820      this.element.data('trigger:' + this.state, true);
7821    },
7822    defaultTrigger: function defaultTrigger(event, valueFn) {
7823      var oldValue = valueFn.call(this.element);
7824
7825      this.element.on(event, $.proxy(function (e) {
7826        var value = valueFn.call(this.element, e);
7827
7828        if (oldValue !== value) {
7829          this.element.trigger({
7830            type: 'state:' + this.state,
7831            value: value,
7832            oldValue: oldValue
7833          });
7834          oldValue = value;
7835        }
7836      }, this));
7837
7838      states.postponed.push($.proxy(function () {
7839        this.element.trigger({
7840          type: 'state:' + this.state,
7841          value: oldValue,
7842          oldValue: null
7843        });
7844      }, this));
7845    }
7846  };
7847
7848  states.Trigger.states = {
7849    empty: {
7850      keyup: function keyup() {
7851        return this.val() === '';
7852      }
7853    },
7854
7855    checked: {
7856      change: function change() {
7857        var checked = false;
7858        this.each(function () {
7859          checked = $(this).prop('checked');
7860
7861          return !checked;
7862        });
7863        return checked;
7864      }
7865    },
7866
7867    value: {
7868      keyup: function keyup() {
7869        if (this.length > 1) {
7870          return this.filter(':checked').val() || false;
7871        }
7872        return this.val();
7873      },
7874      change: function change() {
7875        if (this.length > 1) {
7876          return this.filter(':checked').val() || false;
7877        }
7878        return this.val();
7879      }
7880    },
7881
7882    collapsed: {
7883      collapsed: function collapsed(e) {
7884        return typeof e !== 'undefined' && 'value' in e ? e.value : !this.is('[open]');
7885      }
7886    }
7887  };
7888
7889  states.State = function (state) {
7890    this.pristine = state;
7891    this.name = state;
7892
7893    var process = true;
7894    do {
7895      while (this.name.charAt(0) === '!') {
7896        this.name = this.name.substring(1);
7897        this.invert = !this.invert;
7898      }
7899
7900      if (this.name in states.State.aliases) {
7901        this.name = states.State.aliases[this.name];
7902      } else {
7903        process = false;
7904      }
7905    } while (process);
7906  };
7907
7908  states.State.sanitize = function (state) {
7909    if (state instanceof states.State) {
7910      return state;
7911    }
7912
7913    return new states.State(state);
7914  };
7915
7916  states.State.aliases = {
7917    enabled: '!disabled',
7918    invisible: '!visible',
7919    invalid: '!valid',
7920    untouched: '!touched',
7921    optional: '!required',
7922    filled: '!empty',
7923    unchecked: '!checked',
7924    irrelevant: '!relevant',
7925    expanded: '!collapsed',
7926    open: '!collapsed',
7927    closed: 'collapsed',
7928    readwrite: '!readonly'
7929  };
7930
7931  states.State.prototype = {
7932    invert: false,
7933
7934    toString: function toString() {
7935      return this.name;
7936    }
7937  };
7938
7939  var $document = $(document);
7940  $document.on('state:disabled', function (e) {
7941    if (e.trigger) {
7942      $(e.target).prop('disabled', e.value).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value).find('select, input, textarea').prop('disabled', e.value);
7943    }
7944  });
7945
7946  $document.on('state:required', function (e) {
7947    if (e.trigger) {
7948      if (e.value) {
7949        var label = 'label' + (e.target.id ? '[for=' + e.target.id + ']' : '');
7950        var $label = $(e.target).attr({ required: 'required', 'aria-required': 'true' }).closest('.js-form-item, .js-form-wrapper').find(label);
7951
7952        if (!$label.hasClass('js-form-required').length) {
7953          $label.addClass('js-form-required form-required');
7954        }
7955      } else {
7956        $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required');
7957      }
7958    }
7959  });
7960
7961  $document.on('state:visible', function (e) {
7962    if (e.trigger) {
7963      $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggle(e.value);
7964    }
7965  });
7966
7967  $document.on('state:checked', function (e) {
7968    if (e.trigger) {
7969      $(e.target).prop('checked', e.value);
7970    }
7971  });
7972
7973  $document.on('state:collapsed', function (e) {
7974    if (e.trigger) {
7975      if ($(e.target).is('[open]') === e.value) {
7976        $(e.target).find('> summary').trigger('click');
7977      }
7978    }
7979  });
7980})(jQuery, Drupal);;
7981/**
7982 * @file
7983 * Extends core/misc/states.js.
7984 */
7985(function($) {
7986
7987  // Unbind core state.js from document first so we can then override below.
7988  $(document).unbind('state:disabled');
7989
7990  /**
7991   * Global state change handlers. These are bound to "document" to cover all
7992   * elements whose state changes. Events sent to elements within the page
7993   * bubble up to these handlers. We use this system so that themes and modules
7994   * can override these state change handlers for particular parts of a page.
7995   */
7996  $(document).bind('state:disabled', function(e) {
7997    // Only act when this change was triggered by a dependency and not by the
7998    // element monitoring itself.
7999    if (e.trigger) {
8000      $(e.target)
8001        .attr('disabled', e.value)
8002        .closest('.form-item, .form-submit, .form-wrapper').toggleClass('form-disabled', e.value)
8003        .find(':input').attr('disabled', e.value);
8004
8005      // Note: WebKit nightlies don't reflect that change correctly.
8006      // See https://bugs.webkit.org/show_bug.cgi?id=23789
8007    }
8008  });
8009
8010})(jQuery);
8011;
8012/**
8013 * @file
8014 * JavaScript behaviors for custom webform #states.
8015 */
8016
8017(function ($, Drupal) {
8018
8019  'use strict';
8020
8021  Drupal.webform = Drupal.webform || {};
8022  Drupal.webform.states = Drupal.webform.states || {};
8023  Drupal.webform.states.slideDown = Drupal.webform.states.slideDown || {};
8024  Drupal.webform.states.slideDown.duration = 'slow';
8025  Drupal.webform.states.slideUp = Drupal.webform.states.slideUp || {};
8026  Drupal.webform.states.slideUp.duration = 'fast';
8027
8028  /* ************************************************************************ */
8029  // jQuery functions.
8030  /* ************************************************************************ */
8031
8032  /**
8033   * Check if an element has a specified data attribute.
8034   *
8035   * @param {string} data
8036   *   The data attribute name.
8037   *
8038   * @return {boolean}
8039   *   TRUE if an element has a specified data attribute.
8040   */
8041  $.fn.hasData = function (data) {
8042    return (typeof this.data(data) !== 'undefined');
8043  };
8044
8045  /**
8046   * Check if element is within the webform or not.
8047   *
8048   * @return {boolean}
8049   *   TRUE if element is within the webform.
8050   */
8051  $.fn.isWebform = function () {
8052    return $(this).closest('form.webform-submission-form, form[id^="webform"], form[data-is-webform]').length ? true : false;
8053  };
8054
8055  /**
8056   * Check if element is to be treated as a webform element.
8057   *
8058   * @return {boolean}
8059   *   TRUE if element is to be treated as a webform element.
8060   */
8061  $.fn.isWebformElement = function () {
8062    return ($(this).isWebform() || $(this).closest('[data-is-webform-element]').length) ? true : false;
8063  };
8064
8065  /* ************************************************************************ */
8066  // Trigger.
8067  /* ************************************************************************ */
8068
8069  // The change event is triggered by cut-n-paste and select menus.
8070  // Issue #2445271: #states element empty check not triggered on mouse
8071  // based paste.
8072  // @see https://www.drupal.org/node/2445271
8073  Drupal.states.Trigger.states.empty.change = function change() {
8074    return this.val() === '';
8075  };
8076
8077  /* ************************************************************************ */
8078  // Dependents.
8079  /* ************************************************************************ */
8080
8081
8082  // Apply solution included in #1962800 patch.
8083  // Issue #1962800: Form #states not working with literal integers as
8084  // values in IE11.
8085  // @see https://www.drupal.org/project/drupal/issues/1962800
8086  // @see https://www.drupal.org/files/issues/core-states-not-working-with-integers-ie11_1962800_46.patch
8087  //
8088  // This issue causes pattern, less than, and greater than support to break.
8089  // @see https://www.drupal.org/project/webform/issues/2981724
8090  var states = Drupal.states;
8091  Drupal.states.Dependent.prototype.compare = function compare(reference, selector, state) {
8092    var value = this.values[selector][state.name];
8093
8094    var name = reference.constructor.name;
8095    if (!name) {
8096      name = $.type(reference);
8097
8098      name = name.charAt(0).toUpperCase() + name.slice(1);
8099    }
8100    if (name in states.Dependent.comparisons) {
8101      return states.Dependent.comparisons[name](reference, value);
8102    }
8103
8104    if (reference.constructor.name in states.Dependent.comparisons) {
8105      return states.Dependent.comparisons[reference.constructor.name](reference, value);
8106    }
8107
8108    return _compare2(reference, value);
8109  };
8110  function _compare2(a, b) {
8111    if (a === b) {
8112      return typeof a === 'undefined' ? a : true;
8113    }
8114
8115    return typeof a === 'undefined' || typeof b === 'undefined';
8116  }
8117
8118  // Adds pattern, less than, and greater than support to #state API.
8119  // @see http://drupalsun.com/julia-evans/2012/03/09/extending-form-api-states-regular-expressions
8120  Drupal.states.Dependent.comparisons.Object = function (reference, value) {
8121    if ('pattern' in reference) {
8122      return (new RegExp(reference['pattern'])).test(value);
8123    }
8124    else if ('!pattern' in reference) {
8125      return !((new RegExp(reference['!pattern'])).test(value));
8126    }
8127    else if ('less' in reference) {
8128      return (value !== '' && parseFloat(reference['less']) > parseFloat(value));
8129    }
8130    else if ('less_equal' in reference) {
8131      return (value !== '' && parseFloat(reference['less_equal']) >= parseFloat(value));
8132    }
8133    else if ('greater' in reference) {
8134      return (value !== '' && parseFloat(reference['greater']) < parseFloat(value));
8135    }
8136    else if ('greater_equal' in reference) {
8137      return (value !== '' && parseFloat(reference['greater_equal']) <= parseFloat(value));
8138    }
8139    else if ('between' in reference || '!between' in reference) {
8140      if (value === '') {
8141        return false;
8142      }
8143
8144      var between = reference['between'] || reference['!between'];
8145      var betweenParts = between.split(':');
8146      var greater = betweenParts[0];
8147      var less = (typeof betweenParts[1] !== 'undefined') ? betweenParts[1] : null;
8148      var isGreaterThan = (greater === null || greater === '' || parseFloat(value) >= parseFloat(greater));
8149      var isLessThan = (less === null || less === '' || parseFloat(value) <= parseFloat(less));
8150      var result = (isGreaterThan && isLessThan);
8151      return (reference['!between']) ? !result : result;
8152    }
8153    else {
8154      return reference.indexOf(value) !== false;
8155    }
8156  };
8157
8158  /* ************************************************************************ */
8159  // States events.
8160  /* ************************************************************************ */
8161
8162  var $document = $(document);
8163
8164  $document.on('state:required', function (e) {
8165    if (e.trigger && $(e.target).isWebformElement()) {
8166      var $target = $(e.target);
8167      // Fix #required file upload.
8168      // @see Issue #2860529: Conditional required File upload field don't work.
8169      toggleRequired($target.find('input[type="file"]'), e.value);
8170
8171      // Fix #required for radios and likert.
8172      // @see Issue #2856795: If radio buttons are required but not filled form is nevertheless submitted.
8173      if ($target.is('.js-form-type-radios, .js-form-type-webform-radios-other, .js-webform-type-radios, .js-webform-type-webform-radios-other, .js-webform-type-webform-entity-radios, .webform-likert-table')) {
8174        $target.toggleClass('required', e.value);
8175        toggleRequired($target.find('input[type="radio"]'), e.value);
8176      }
8177
8178      // Fix #required for checkboxes.
8179      // @see Issue #2938414: Checkboxes don't support #states required.
8180      // @see checkboxRequiredhandler
8181      if ($target.is('.js-form-type-checkboxes, .js-form-type-webform-checkboxes-other, .js-webform-type-checkboxes, .js-webform-type-webform-checkboxes-other')) {
8182        $target.toggleClass('required', e.value);
8183        var $checkboxes = $target.find('input[type="checkbox"]');
8184        if (e.value) {
8185          // Add event handler.
8186          $checkboxes.on('click', statesCheckboxesRequiredEventHandler);
8187          // Initialize and add required attribute.
8188          checkboxesRequired($target);
8189        }
8190        else {
8191          // Remove event handler.
8192          $checkboxes.off('click', statesCheckboxesRequiredEventHandler);
8193          // Remove required attribute.
8194          toggleRequired($checkboxes, false);
8195        }
8196      }
8197
8198      // Fix #required for tableselect.
8199      // @see Issue #3212581: Table select does not trigger client side validation
8200      if ($target.is('.js-webform-tableselect')) {
8201        $target.toggleClass('required', e.value);
8202        var isMultiple = $target.is('[multiple]');
8203        if (isMultiple) {
8204          // Checkboxes.
8205          var $tbody = $target.find('tbody');
8206          var $checkboxes = $tbody.find('input[type="checkbox"]');
8207          copyRequireMessage($target, $checkboxes);
8208          if (e.value) {
8209            $checkboxes.on('click change', statesCheckboxesRequiredEventHandler);
8210            checkboxesRequired($tbody);
8211          }
8212          else {
8213            $checkboxes.off('click change ', statesCheckboxesRequiredEventHandler);
8214            toggleRequired($tbody, false);
8215          }
8216        }
8217        else {
8218          // Radios.
8219          var $radios = $target.find('input[type="radio"]');
8220          copyRequireMessage($target, $radios);
8221          toggleRequired($radios, e.value);
8222        }
8223      }
8224
8225      // Fix required label for elements without the for attribute.
8226      // @see Issue #3145300: Conditional Visible Select Other not working.
8227      if ($target.is('.js-form-type-webform-select-other, .js-webform-type-webform-select-other')) {
8228        var $select = $target.find('select');
8229        toggleRequired($select, e.value);
8230        copyRequireMessage($target, $select);
8231      }
8232      if ($target.find('> label:not([for])').length) {
8233        $target.find('> label').toggleClass('js-form-required form-required', e.value);
8234      }
8235
8236      // Fix required label for checkboxes and radios.
8237      // @see Issue #2938414: Checkboxes don't support #states required
8238      // @see Issue #2731991: Setting required on radios marks all options required.
8239      // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset.
8240      // Fix #required for fieldsets.
8241      // @see Issue #2977569: Hidden fieldsets that become visible with conditional logic cannot be made required.
8242      if ($target.is('.js-webform-type-radios, .js-webform-type-checkboxes, fieldset')) {
8243        $target.find('legend span.fieldset-legend:not(.visually-hidden)').toggleClass('js-form-required form-required', e.value);
8244      }
8245
8246      // Issue #2986017: Fieldsets shouldn't have required attribute.
8247      if ($target.is('fieldset')) {
8248        $target.removeAttr('required aria-required');
8249      }
8250    }
8251  });
8252
8253  $document.on('state:checked', function (e) {
8254    if (e.trigger) {
8255      $(e.target).trigger('change');
8256    }
8257  });
8258
8259  $document.on('state:readonly', function (e) {
8260    if (e.trigger && $(e.target).isWebformElement()) {
8261      $(e.target).prop('readonly', e.value).closest('.js-form-item, .js-form-wrapper').toggleClass('webform-readonly', e.value).find('input, textarea').prop('readonly', e.value);
8262
8263      // Trigger webform:readonly.
8264      $(e.target).trigger('webform:readonly')
8265        .find('select, input, textarea, button').trigger('webform:readonly');
8266    }
8267  });
8268
8269  $document.on('state:visible state:visible-slide', function (e) {
8270    if (e.trigger && $(e.target).isWebformElement()) {
8271      if (e.value) {
8272        $(':input', e.target).addBack().each(function () {
8273          restoreValueAndRequired(this);
8274          triggerEventHandlers(this);
8275        });
8276      }
8277      else {
8278        // @see https://www.sitepoint.com/jquery-function-clear-form-data/
8279        $(':input', e.target).addBack().each(function () {
8280          backupValueAndRequired(this);
8281          clearValueAndRequired(this);
8282          triggerEventHandlers(this);
8283        });
8284      }
8285    }
8286  });
8287
8288  $document.on('state:visible-slide', function (e) {
8289    if (e.trigger && $(e.target).isWebformElement()) {
8290      var effect = e.value ? 'slideDown' : 'slideUp';
8291      var duration = Drupal.webform.states[effect].duration;
8292      $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper')[effect](duration);
8293    }
8294  });
8295  Drupal.states.State.aliases['invisible-slide'] = '!visible-slide';
8296
8297  $document.on('state:disabled', function (e) {
8298    if (e.trigger && $(e.target).isWebformElement()) {
8299      // Make sure disabled property is set before triggering webform:disabled.
8300      // Copied from: core/misc/states.js
8301      $(e.target)
8302        .prop('disabled', e.value)
8303        .closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value)
8304        .find('select, input, textarea, button').prop('disabled', e.value);
8305
8306      // Never disable hidden file[fids] because the existing values will
8307      // be completely lost when the webform is submitted.
8308      var fileElements = $(e.target)
8309        .find(':input[type="hidden"][name$="[fids]"]');
8310      if (fileElements.length) {
8311        // Remove 'disabled' attribute from fieldset which will block
8312        // all disabled elements from being submitted.
8313        if ($(e.target).is('fieldset')) {
8314          $(e.target).prop('disabled', false);
8315        }
8316        fileElements.removeAttr('disabled');
8317      }
8318
8319      // Trigger webform:disabled.
8320      $(e.target).trigger('webform:disabled')
8321        .find('select, input, textarea, button').trigger('webform:disabled');
8322    }
8323  });
8324
8325  /* ************************************************************************ */
8326  // Behaviors.
8327  /* ************************************************************************ */
8328
8329  /**
8330   * Adds HTML5 validation to required checkboxes.
8331   *
8332   * @type {Drupal~behavior}
8333   *
8334   * @see https://www.drupal.org/project/webform/issues/3068998
8335   */
8336  Drupal.behaviors.webformCheckboxesRequired = {
8337    attach: function (context) {
8338      $('.js-form-type-checkboxes.required, .js-form-type-webform-checkboxes-other.required, .js-webform-type-checkboxes.required, .js-webform-type-webform-checkboxes-other.required, .js-webform-type-webform-radios-other.checkboxes', context)
8339        .once('webform-checkboxes-required')
8340        .each(function () {
8341          var $element = $(this);
8342          $element.find('input[type="checkbox"]').on('click', statesCheckboxesRequiredEventHandler);
8343          setTimeout(function () {checkboxesRequired($element);});
8344        });
8345    }
8346  };
8347
8348  /**
8349   * Adds HTML5 validation to required radios.
8350   *
8351   * @type {Drupal~behavior}
8352   *
8353   * @see https://www.drupal.org/project/webform/issues/2856795
8354   */
8355  Drupal.behaviors.webformRadiosRequired = {
8356    attach: function (context) {
8357      $('.js-form-type-radios, .js-form-type-webform-radios-other, .js-webform-type-radios, .js-webform-type-webform-radios-other, .js-webform-type-webform-entity-radios, .js-webform-type-webform-scale', context)
8358        .once('webform-radios-required')
8359        .each(function () {
8360          var $element = $(this);
8361          setTimeout(function () {radiosRequired($element);});
8362        });
8363    }
8364  };
8365
8366 /**
8367   * Adds HTML5 validation to required table select.
8368   *
8369   * @type {Drupal~behavior}
8370   *
8371   * @see https://www.drupal.org/project/webform/issues/2856795
8372   */
8373  Drupal.behaviors.webformTableSelectRequired = {
8374    attach: function (context) {
8375      $('.js-webform-tableselect.required', context)
8376        .once('webform-tableselect-required')
8377        .each(function () {
8378          var $element = $(this);
8379          var $tbody = $element.find('tbody');
8380          var isMultiple = $element.is('[multiple]');
8381
8382          if (isMultiple) {
8383            // Check all checkbox triggers checkbox 'change' event on
8384            // select and deselect all.
8385            // @see Drupal.tableSelect
8386            $tbody.find('input[type="checkbox"]').on('click change', function () {
8387              checkboxesRequired($tbody);
8388            });
8389          }
8390
8391          setTimeout(function () {
8392            isMultiple ? checkboxesRequired($tbody) : radiosRequired($element);
8393          });
8394        });
8395    }
8396  };
8397
8398  /**
8399   * Add HTML5 multiple checkboxes required validation.
8400   *
8401   * @param {jQuery} $element
8402   *   An jQuery object containing HTML5 radios.
8403   *
8404   * @see https://stackoverflow.com/a/37825072/145846
8405   */
8406  function checkboxesRequired($element) {
8407    var $firstCheckbox = $element.find('input[type="checkbox"]').first();
8408    var isChecked = $element.find('input[type="checkbox"]').is(':checked');
8409    toggleRequired($firstCheckbox, !isChecked);
8410    copyRequireMessage($element, $firstCheckbox);
8411  }
8412
8413  /**
8414   * Add HTML5 radios required validation.
8415   *
8416   * @param {jQuery} $element
8417   *   An jQuery object containing HTML5 radios.
8418   *
8419   * @see https://www.drupal.org/project/webform/issues/2856795
8420   */
8421  function radiosRequired($element) {
8422    var $radios = $element.find('input[type="radio"]');
8423    var isRequired = $element.hasClass('required');
8424    toggleRequired($radios, isRequired);
8425    copyRequireMessage($element, $radios);
8426  }
8427
8428  /* ************************************************************************ */
8429  // Event handlers.
8430  /* ************************************************************************ */
8431
8432  /**
8433   * Trigger #states API HTML5 multiple checkboxes required validation.
8434   *
8435   * @see https://stackoverflow.com/a/37825072/145846
8436   */
8437  function statesCheckboxesRequiredEventHandler() {
8438    var $element = $(this).closest('.js-webform-type-checkboxes, .js-webform-type-webform-checkboxes-other');
8439    checkboxesRequired($element);
8440  }
8441
8442  /**
8443   * Trigger an input's event handlers.
8444   *
8445   * @param {element} input
8446   *   An input.
8447   */
8448  function triggerEventHandlers(input) {
8449    var $input = $(input);
8450    var type = input.type;
8451    var tag = input.tagName.toLowerCase();
8452    // Add 'webform.states' as extra parameter to event handlers.
8453    // @see Drupal.behaviors.webformUnsaved
8454    var extraParameters = ['webform.states'];
8455    if (type === 'checkbox' || type === 'radio') {
8456      $input
8457        .trigger('change', extraParameters)
8458        .trigger('blur', extraParameters);
8459    }
8460    else if (tag === 'select') {
8461      // Do not trigger the onchange event for Address element's country code
8462      // when it is initialized.
8463      // @see \Drupal\address\Element\Country
8464      if ($input.closest('.webform-type-address').length) {
8465        if (!$input.data('webform-states-address-initialized')
8466          && $input.attr('autocomplete') === 'country'
8467          && $input.val() === $input.find("option[selected]").attr('value')) {
8468          return;
8469        }
8470        $input.data('webform-states-address-initialized', true);
8471      }
8472
8473      $input
8474        .trigger('change', extraParameters)
8475        .trigger('blur', extraParameters);
8476    }
8477    else if (type !== 'submit' && type !== 'button' && type !== 'file') {
8478      // Make sure input mask is removed and then reset when value is restored.
8479      // @see https://www.drupal.org/project/webform/issues/3124155
8480      // @see https://www.drupal.org/project/webform/issues/3202795
8481      var hasInputMask = ($.fn.inputmask && $input.hasClass('js-webform-input-mask'));
8482      hasInputMask && $input.inputmask('remove');
8483
8484      $input
8485        .trigger('input', extraParameters)
8486        .trigger('change', extraParameters)
8487        .trigger('keydown', extraParameters)
8488        .trigger('keyup', extraParameters)
8489        .trigger('blur', extraParameters);
8490
8491      hasInputMask && $input.inputmask();
8492    }
8493  }
8494
8495  /* ************************************************************************ */
8496  // Backup and restore value functions.
8497  /* ************************************************************************ */
8498
8499  /**
8500   * Backup an input's current value and required attribute
8501   *
8502   * @param {element} input
8503   *   An input.
8504   */
8505  function backupValueAndRequired(input) {
8506    var $input = $(input);
8507    var type = input.type;
8508    var tag = input.tagName.toLowerCase(); // Normalize case.
8509
8510    // Backup required.
8511    if ($input.prop('required') && !$input.hasData('webform-required')) {
8512      $input.data('webform-required', true);
8513    }
8514
8515    // Backup value.
8516    if (!$input.hasData('webform-value')) {
8517      if (type === 'checkbox' || type === 'radio') {
8518        $input.data('webform-value', $input.prop('checked'));
8519      }
8520      else if (tag === 'select') {
8521        var values = [];
8522        $input.find('option:selected').each(function (i, option) {
8523          values[i] = option.value;
8524        });
8525        $input.data('webform-value', values);
8526      }
8527      else if (type !== 'submit' && type !== 'button') {
8528        $input.data('webform-value', input.value);
8529      }
8530    }
8531  }
8532
8533  /**
8534   * Restore an input's value and required attribute.
8535   *
8536   * @param {element} input
8537   *   An input.
8538   */
8539  function restoreValueAndRequired(input) {
8540    var $input = $(input);
8541
8542    // Restore value.
8543    var value = $input.data('webform-value');
8544    if (typeof value !== 'undefined') {
8545      var type = input.type;
8546      var tag = input.tagName.toLowerCase(); // Normalize case.
8547
8548      if (type === 'checkbox' || type === 'radio') {
8549        $input.prop('checked', value);
8550      }
8551      else if (tag === 'select') {
8552        $.each(value, function (i, option_value) {
8553          // Prevent "Syntax error, unrecognized expression" error by
8554          // escaping single quotes.
8555          // @see https://forum.jquery.com/topic/escape-characters-prior-to-using-selector
8556          option_value = option_value.replace(/'/g, "\\\'");
8557          $input.find("option[value='" + option_value + "']").prop('selected', true);
8558        });
8559      }
8560      else if (type !== 'submit' && type !== 'button') {
8561        input.value = value;
8562      }
8563      $input.removeData('webform-value');
8564    }
8565
8566    // Restore required.
8567    var required = $input.data('webform-required');
8568    if (typeof required !== 'undefined') {
8569      if (required) {
8570        $input.prop('required', true);
8571      }
8572      $input.removeData('webform-required');
8573    }
8574  }
8575
8576  /**
8577   * Clear an input's value and required attributes.
8578   *
8579   * @param {element} input
8580   *   An input.
8581   */
8582  function clearValueAndRequired(input) {
8583    var $input = $(input);
8584
8585    // Check for #states no clear attribute.
8586    // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
8587    if ($input.closest('[data-webform-states-no-clear]').length) {
8588      return;
8589    }
8590
8591    // Clear value.
8592    var type = input.type;
8593    var tag = input.tagName.toLowerCase(); // Normalize case.
8594    if (type === 'checkbox' || type === 'radio') {
8595      $input.prop('checked', false);
8596    }
8597    else if (tag === 'select') {
8598      if ($input.find('option[value=""]').length) {
8599        $input.val('');
8600      }
8601      else {
8602        input.selectedIndex = -1;
8603      }
8604    }
8605    else if (type !== 'submit' && type !== 'button') {
8606      input.value = (type === 'color') ? '#000000' : '';
8607    }
8608
8609    // Clear required.
8610    $input.prop('required', false);
8611  }
8612
8613  /* ************************************************************************ */
8614  // Helper functions.
8615  /* ************************************************************************ */
8616
8617  /**
8618   * Toggle an input's required attributes.
8619   *
8620   * @param {element} $input
8621   *   An input.
8622   * @param {boolean} required
8623   *   Is input required.
8624   */
8625  function toggleRequired($input, required) {
8626    var isCheckboxOrRadio = ($input.attr('type') === 'radio' || $input.attr('type') === 'checkbox');
8627    if (required) {
8628      if (isCheckboxOrRadio) {
8629        $input.attr({'required': 'required'});
8630      }
8631      else {
8632        $input.attr({'required': 'required', 'aria-required': 'true'});
8633      }
8634    }
8635    else {
8636      if (isCheckboxOrRadio) {
8637        $input.removeAttr('required');
8638      }
8639      else {
8640        $input.removeAttr('required aria-required');
8641      }
8642    }
8643  }
8644
8645  /**
8646   * Copy the clientside_validation.module's message.
8647   *
8648   * @param {jQuery} $source
8649   *   The source element.
8650   * @param {jQuery} $destination
8651   *   The destination element.
8652   */
8653  function copyRequireMessage($source, $destination) {
8654    if ($source.attr('data-msg-required')) {
8655      $destination.attr('data-msg-required', $source.attr('data-msg-required'));
8656    }
8657  }
8658
8659})(jQuery, Drupal);
8660;
8661/**
8662 * @file
8663 * JavaScript behaviors for custom webform #states.
8664 */
8665
8666(function ($, Drupal) {
8667
8668  'use strict';
8669
8670  $(document).on('state:required', function (e) {
8671    if (e.trigger && $(e.target).isWebform()) {
8672      var $target = $(e.target);
8673
8674      // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset.
8675      // Fix #required for fieldsets.
8676      if ($target.is('.js-form-wrapper.panel')) {
8677        if (e.value) {
8678          $target.find('.panel-heading .panel-title').addClass('js-form-required form-required');
8679        }
8680        else {
8681          $target.find('.panel-heading .panel-title').removeClass('js-form-required form-required');
8682        }
8683      }
8684
8685    }
8686  });
8687
8688})(jQuery, Drupal);
8689;
8690/**
8691 * @file
8692 * Bootstrap Popovers.
8693 */
8694
8695var Drupal = Drupal || {};
8696
8697(function ($, Drupal, Bootstrap) {
8698  "use strict";
8699
8700  var $document = $(document);
8701
8702  /**
8703   * Extend the Bootstrap Popover plugin constructor class.
8704   */
8705  Bootstrap.extendPlugin('popover', function (settings) {
8706    return {
8707      DEFAULTS: {
8708        animation: !!settings.popover_animation,
8709        autoClose: !!settings.popover_auto_close,
8710        enabled: settings.popover_enabled,
8711        html: !!settings.popover_html,
8712        placement: settings.popover_placement,
8713        selector: settings.popover_selector,
8714        trigger: settings.popover_trigger,
8715        title: settings.popover_title,
8716        content: settings.popover_content,
8717        delay: parseInt(settings.popover_delay, 10),
8718        container: settings.popover_container
8719      }
8720    };
8721  });
8722
8723  /**
8724   * Bootstrap Popovers.
8725   *
8726   * @todo This should really be properly delegated if selector option is set.
8727   */
8728  Drupal.behaviors.bootstrapPopovers = {
8729    $activePopover: null,
8730    attach: function (context) {
8731      // Immediately return if popovers are not available.
8732      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
8733        return;
8734      }
8735
8736      var _this = this;
8737
8738      $document
8739        .on('show.bs.popover', '[data-toggle=popover]', function () {
8740          var $trigger = $(this);
8741          var popover = $trigger.data('bs.popover');
8742
8743          // Only keep track of clicked triggers that we're manually handling.
8744          if (popover.options.originalTrigger === 'click') {
8745            if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($trigger)) {
8746              _this.$activePopover.popover('hide');
8747            }
8748            _this.$activePopover = $trigger;
8749          }
8750        })
8751        // Unfortunately, :focusable is only made available when using jQuery
8752        // UI. While this would be the most semantic pseudo selector to use
8753        // here, jQuery UI may not always be loaded. Instead, just use :visible
8754        // here as this just needs some sort of selector here. This activates
8755        // delegate binding to elements in jQuery so it can work it's bubbling
8756        // focus magic since elements don't really propagate their focus events.
8757        // @see https://www.drupal.org/project/bootstrap/issues/3013236
8758        .on('focus.bs.popover', ':visible', function (e) {
8759          var $target = $(e.target);
8760          if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($target) && !$target.closest('.popover.in')[0]) {
8761            _this.$activePopover.popover('hide');
8762            _this.$activePopover = null;
8763          }
8764        })
8765        .on('click.bs.popover', function (e) {
8766          var $target = $(e.target);
8767          if (_this.$activePopover && _this.getOption('autoClose') && !$target.is('[data-toggle=popover]') && !$target.closest('.popover.in')[0]) {
8768            _this.$activePopover.popover('hide');
8769            _this.$activePopover = null;
8770          }
8771        })
8772        .on('keyup.bs.popover', function (e) {
8773          if (_this.$activePopover && _this.getOption('autoClose') && e.which === 27) {
8774            _this.$activePopover.popover('hide');
8775            _this.$activePopover = null;
8776          }
8777        })
8778      ;
8779
8780      var elements = $(context).find('[data-toggle=popover]').toArray();
8781      for (var i = 0; i < elements.length; i++) {
8782        var $element = $(elements[i]);
8783        var options = $.extend({}, $.fn.popover.Constructor.DEFAULTS, $element.data());
8784
8785        // Store the original trigger.
8786        options.originalTrigger = options.trigger;
8787
8788        // If the trigger is "click", then we'll handle it manually here.
8789        if (options.trigger === 'click') {
8790          options.trigger = 'manual';
8791        }
8792
8793        // Retrieve content from a target element.
8794        var target = options.target || $element.is('a[href^="#"]') && $element.attr('href');
8795        var $target = $document.find(target).clone();
8796        if (!options.content && $target[0]) {
8797          $target.removeClass('visually-hidden hidden').removeAttr('aria-hidden');
8798          options.content = $target.wrap('<div/>').parent()[options.html ? 'html' : 'text']() || '';
8799        }
8800
8801        // Initialize the popover.
8802        $element.popover(options);
8803
8804        // Handle clicks manually.
8805        if (options.originalTrigger === 'click') {
8806          // To ensure the element is bound multiple times, remove any
8807          // previously set event handler before adding another one.
8808          $element
8809            .off('click.drupal.bootstrap.popover')
8810            .on('click.drupal.bootstrap.popover', function (e) {
8811              $(this).popover('toggle');
8812              e.preventDefault();
8813              e.stopPropagation();
8814            })
8815          ;
8816        }
8817      }
8818    },
8819    detach: function (context) {
8820      // Immediately return if popovers are not available.
8821      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
8822        return;
8823      }
8824
8825      // Destroy all popovers.
8826      $(context).find('[data-toggle="popover"]')
8827        .off('click.drupal.bootstrap.popover')
8828        .popover('destroy')
8829      ;
8830    },
8831    getOption: function(name, defaultValue, element) {
8832      var $element = element ? $(element) : this.$activePopover;
8833      var options = $.extend(true, {}, $.fn.popover.Constructor.DEFAULTS, ($element && $element.data('bs.popover') || {}).options);
8834      if (options[name] !== void 0) {
8835        return options[name];
8836      }
8837      return defaultValue !== void 0 ? defaultValue : void 0;
8838    }
8839  };
8840
8841})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
8842;
8843/**
8844 * @file
8845 * Bootstrap Tooltips.
8846 */
8847
8848var Drupal = Drupal || {};
8849
8850(function ($, Drupal, Bootstrap) {
8851  "use strict";
8852
8853  /**
8854   * Extend the Bootstrap Tooltip plugin constructor class.
8855   */
8856  Bootstrap.extendPlugin('tooltip', function (settings) {
8857    return {
8858      DEFAULTS: {
8859        animation: !!settings.tooltip_animation,
8860        enabled: settings.tooltip_enabled,
8861        html: !!settings.tooltip_html,
8862        placement: settings.tooltip_placement,
8863        selector: settings.tooltip_selector,
8864        trigger: settings.tooltip_trigger,
8865        delay: parseInt(settings.tooltip_delay, 10),
8866        container: settings.tooltip_container
8867      }
8868    };
8869  });
8870
8871  /**
8872   * Bootstrap Tooltips.
8873   *
8874   * @todo This should really be properly delegated if selector option is set.
8875   */
8876  Drupal.behaviors.bootstrapTooltips = {
8877    attach: function (context) {
8878      // Immediately return if tooltips are not available.
8879      if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
8880        return;
8881      }
8882
8883      var elements = $(context).find('[data-toggle="tooltip"]').toArray();
8884      for (var i = 0; i < elements.length; i++) {
8885        var $element = $(elements[i]);
8886        var options = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, $element.data());
8887        $element.tooltip(options);
8888      }
8889    },
8890    detach: function (context) {
8891      // Immediately return if tooltips are not available.
8892      if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
8893        return;
8894      }
8895
8896      // Destroy all tooltips.
8897      $(context).find('[data-toggle="tooltip"]').tooltip('destroy');
8898    }
8899  };
8900
8901})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
8902;
8903/**
8904 * @file
8905 * Behaviors Varbase Video Player general scripts.
8906 */
8907
8908(function ($, _, Drupal, drupalSettings) {
8909  "use strict";
8910
8911    Drupal.behaviors.varbaseVideoPlayer = {
8912      attach: function (context, settings) {
8913
8914        $('.js-video-player-icon').on("click", function(ev) {
8915        $(this).fadeOut(500);
8916
8917        // Locally Hosted Video.
8918        // ---------------------------------------------------------------------
8919        if ($(this).closest(".field.field--type-entity-reference").find('.media--type-video video').length > 0) {
8920          $(this).closest(".field.field--type-entity-reference").find('.media--type-video video').get(0).play();
8921        }
8922
8923        if ($(this).closest(".embedded-entity").find('.media--type-video video').length > 0) {
8924          $(this).closest(".embedded-entity").find('.media--type-video video').get(0).play();
8925        }
8926        // ---------------------------------------------------------------------
8927
8928        // Remote Youtube Video.
8929        // ---------------------------------------------------------------------
8930        if ($(this).closest('.field.field--type-entity-reference').find('.media--type-remote-video iframe[src*="youtube.com"]').length > 0) {
8931          var closestYoutubeIframe = $(this).closest('.field.field--type-entity-reference').find('.media--type-remote-video iframe[src*="youtube.com"]').get(0).contentWindow;
8932          closestYoutubeIframe.postMessage('play', "*");
8933        }
8934
8935        if ($(this).closest('.embedded-entity').find('.media--type-remote-video iframe[src*="youtube.com"]').length > 0) {
8936          var closestYoutubeIframe = $(this).closest('.embedded-entity').find('.media--type-remote-video iframe[src*="youtube.com"]').get(0).contentWindow;
8937          closestYoutubeIframe.postMessage('play', "*");
8938        }
8939        // ---------------------------------------------------------------------
8940
8941
8942        // Remote Vimeo Video.
8943        // ---------------------------------------------------------------------
8944        if ($(this).closest('.field.field--type-entity-reference').find('.media--type-remote-video iframe[src*="vimeo.com"]').length > 0) {
8945          var closestVimeoIframe = $(this).closest('.field.field--type-entity-reference').find('.media--type-remote-video iframe[src*="vimeo.com"]').get(0).contentWindow;
8946          closestVimeoIframe.postMessage('play', "*");
8947        }
8948
8949        if ($(this).closest('.embedded-entity').find('.media--type-remote-video iframe[src*="vimeo.com"]').length > 0) {
8950          var closestVimeoIframe = $(this).closest('.embedded-entity').find('.media--type-remote-video iframe[src*="vimeo.com"]').get(0).contentWindow;
8951          closestVimeoIframe.postMessage('play', "*");
8952        }
8953        // ---------------------------------------------------------------------
8954
8955      });
8956    }
8957  };
8958})(window.jQuery, window._, window.Drupal, window.drupalSettings);
8959;
8960/**
8961* DO NOT EDIT THIS FILE.
8962* See the following change record for more information,
8963* https://www.drupal.org/node/2815083
8964* @preserve
8965**/
8966
8967(function ($, Drupal, debounce) {
8968  $.fn.drupalGetSummary = function () {
8969    var callback = this.data('summaryCallback');
8970    return this[0] && callback ? $.trim(callback(this[0])) : '';
8971  };
8972
8973  $.fn.drupalSetSummary = function (callback) {
8974    var self = this;
8975
8976    if (typeof callback !== 'function') {
8977      var val = callback;
8978      callback = function callback() {
8979        return val;
8980      };
8981    }
8982
8983    return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () {
8984      self.trigger('summaryUpdated');
8985    }).trigger('summaryUpdated');
8986  };
8987
8988  Drupal.behaviors.formSingleSubmit = {
8989    attach: function attach() {
8990      function onFormSubmit(e) {
8991        var $form = $(e.currentTarget);
8992        var formValues = $form.serialize();
8993        var previousValues = $form.attr('data-drupal-form-submit-last');
8994        if (previousValues === formValues) {
8995          e.preventDefault();
8996        } else {
8997          $form.attr('data-drupal-form-submit-last', formValues);
8998        }
8999      }
9000
9001      $('body').once('form-single-submit').on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit);
9002    }
9003  };
9004
9005  function triggerFormUpdated(element) {
9006    $(element).trigger('formUpdated');
9007  }
9008
9009  function fieldsList(form) {
9010    var $fieldList = $(form).find('[name]').map(function (index, element) {
9011      return element.getAttribute('id');
9012    });
9013
9014    return $.makeArray($fieldList);
9015  }
9016
9017  Drupal.behaviors.formUpdated = {
9018    attach: function attach(context) {
9019      var $context = $(context);
9020      var contextIsForm = $context.is('form');
9021      var $forms = (contextIsForm ? $context : $context.find('form')).once('form-updated');
9022      var formFields = void 0;
9023
9024      if ($forms.length) {
9025        $.makeArray($forms).forEach(function (form) {
9026          var events = 'change.formUpdated input.formUpdated ';
9027          var eventHandler = debounce(function (event) {
9028            triggerFormUpdated(event.target);
9029          }, 300);
9030          formFields = fieldsList(form).join(',');
9031
9032          form.setAttribute('data-drupal-form-fields', formFields);
9033          $(form).on(events, eventHandler);
9034        });
9035      }
9036
9037      if (contextIsForm) {
9038        formFields = fieldsList(context).join(',');
9039
9040        var currentFields = $(context).attr('data-drupal-form-fields');
9041
9042        if (formFields !== currentFields) {
9043          triggerFormUpdated(context);
9044        }
9045      }
9046    },
9047    detach: function detach(context, settings, trigger) {
9048      var $context = $(context);
9049      var contextIsForm = $context.is('form');
9050      if (trigger === 'unload') {
9051        var $forms = (contextIsForm ? $context : $context.find('form')).removeOnce('form-updated');
9052        if ($forms.length) {
9053          $.makeArray($forms).forEach(function (form) {
9054            form.removeAttribute('data-drupal-form-fields');
9055            $(form).off('.formUpdated');
9056          });
9057        }
9058      }
9059    }
9060  };
9061
9062  Drupal.behaviors.fillUserInfoFromBrowser = {
9063    attach: function attach(context, settings) {
9064      var userInfo = ['name', 'mail', 'homepage'];
9065      var $forms = $('[data-user-info-from-browser]').once('user-info-from-browser');
9066      if ($forms.length) {
9067        userInfo.forEach(function (info) {
9068          var $element = $forms.find('[name=' + info + ']');
9069          var browserData = localStorage.getItem('Drupal.visitor.' + info);
9070          var emptyOrDefault = $element.val() === '' || $element.attr('data-drupal-default-value') === $element.val();
9071          if ($element.length && emptyOrDefault && browserData) {
9072            $element.val(browserData);
9073          }
9074        });
9075      }
9076      $forms.on('submit', function () {
9077        userInfo.forEach(function (info) {
9078          var $element = $forms.find('[name=' + info + ']');
9079          if ($element.length) {
9080            localStorage.setItem('Drupal.visitor.' + info, $element.val());
9081          }
9082        });
9083      });
9084    }
9085  };
9086
9087  var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) {
9088    var url = void 0;
9089    if (e.type === 'click') {
9090      url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget;
9091    } else {
9092      url = window.location;
9093    }
9094    var hash = url.hash.substr(1);
9095    if (hash) {
9096      var $target = $('#' + hash);
9097      $('body').trigger('formFragmentLinkClickOrHashChange', [$target]);
9098
9099      setTimeout(function () {
9100        return $target.trigger('focus');
9101      }, 300);
9102    }
9103  };
9104
9105  var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true);
9106
9107  $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange);
9108
9109  $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange);
9110})(jQuery, Drupal, Drupal.debounce);;
9111/**
9112 * @file
9113 * Extends methods from core/misc/form.js.
9114 */
9115
9116(function ($, window, Drupal, drupalSettings) {
9117
9118  /**
9119   * Behavior for "forms_has_error_value_toggle" theme setting.
9120   */
9121  Drupal.behaviors.bootstrapForm = {
9122    attach: function (context) {
9123      if (drupalSettings.bootstrap && drupalSettings.bootstrap.forms_has_error_value_toggle) {
9124        var $context = $(context);
9125        $context.find('.form-item.has-error:not(.form-type-password.has-feedback)').once('error').each(function () {
9126          var $formItem = $(this);
9127          var $input = $formItem.find(':input');
9128          $input.on('keyup focus blur', function () {
9129            if (this.defaultValue !== void 0) {
9130              $formItem[this.defaultValue !== this.value ? 'removeClass' : 'addClass']('has-error');
9131              $input[this.defaultValue !== this.value ? 'removeClass' : 'addClass']('error');
9132            }
9133          });
9134        });
9135      }
9136    }
9137  };
9138
9139
9140})(jQuery, this, Drupal, drupalSettings);
9141;
9142/**
9143 * @file
9144 * JavaScript behaviors for webforms.
9145 */
9146
9147(function ($, Drupal) {
9148
9149  'use strict';
9150
9151  /**
9152   * Remove single submit event listener.
9153   *
9154   * @type {Drupal~behavior}
9155   *
9156   * @prop {Drupal~behaviorAttach} attach
9157   *   Attaches the behavior for removing single submit event listener.
9158   *
9159   * @see Drupal.behaviors.formSingleSubmit
9160   */
9161  Drupal.behaviors.webformRemoveFormSingleSubmit = {
9162    attach: function attach() {
9163      function onFormSubmit(e) {
9164        var $form = $(e.currentTarget);
9165        $form.removeAttr('data-drupal-form-submit-last');
9166      }
9167      $('body')
9168        .once('webform-single-submit')
9169        .on('submit.singleSubmit', 'form.webform-remove-single-submit', onFormSubmit);
9170    }
9171  };
9172
9173  /**
9174   * Prevent webform autosubmit on wizard pages.
9175   *
9176   * @type {Drupal~behavior}
9177   *
9178   * @prop {Drupal~behaviorAttach} attach
9179   *   Attaches the behavior for disabling webform autosubmit.
9180   *   Wizard pages need to be progressed with the Previous or Next buttons,
9181   *   not by pressing Enter.
9182   */
9183  Drupal.behaviors.webformDisableAutoSubmit = {
9184    attach: function (context) {
9185      // Not using context so that inputs loaded via Ajax will have autosubmit
9186      // disabled.
9187      // @see http://stackoverflow.com/questions/11235622/jquery-disable-form-submit-on-enter
9188      $('.js-webform-disable-autosubmit input')
9189        .not(':button, :submit, :reset, :image, :file')
9190        .once('webform-disable-autosubmit')
9191        .on('keyup keypress', function (e) {
9192          if (e.which === 13) {
9193            e.preventDefault();
9194            return false;
9195          }
9196        });
9197    }
9198  };
9199
9200  /**
9201   * Custom required and pattern validation error messages.
9202   *
9203   * @type {Drupal~behavior}
9204   *
9205   * @prop {Drupal~behaviorAttach} attach
9206   *   Attaches the behavior for the webform custom required and pattern
9207   *   validation error messages.
9208   *
9209   * @see http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message
9210   **/
9211  Drupal.behaviors.webformRequiredError = {
9212    attach: function (context) {
9213      $(context).find(':input[data-webform-required-error], :input[data-webform-pattern-error]').once('webform-required-error')
9214        .on('invalid', function () {
9215          this.setCustomValidity('');
9216          if (this.valid) {
9217            return;
9218          }
9219
9220          if (this.validity.patternMismatch && $(this).attr('data-webform-pattern-error')) {
9221            this.setCustomValidity($(this).attr('data-webform-pattern-error'));
9222          }
9223          else if (this.validity.valueMissing && $(this).attr('data-webform-required-error')) {
9224            this.setCustomValidity($(this).attr('data-webform-required-error'));
9225          }
9226        })
9227        .on('input change', function () {
9228          // Find all related elements by name and reset custom validity.
9229          // This specifically applies to required radios and checkboxes.
9230          var name = $(this).attr('name');
9231          $(this.form).find(':input[name="' + name + '"]').each(function () {
9232            this.setCustomValidity('');
9233          });
9234        });
9235    }
9236  };
9237
9238  // When #state:required is triggered we need to reset the target elements
9239  // custom validity.
9240  $(document).on('state:required', function (e) {
9241    $(e.target).filter('[data-webform-required-error]')
9242      .each(function () {this.setCustomValidity('');});
9243  });
9244
9245})(jQuery, Drupal);
9246;
9247/**
9248 * @file
9249 * JavaScript behaviors for details element.
9250 */
9251
9252(function ($, Drupal) {
9253
9254  'use strict';
9255
9256  // Determine if local storage exists and is enabled.
9257  // This approach is copied from Modernizr.
9258  // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
9259  var hasLocalStorage = (function () {
9260    try {
9261      localStorage.setItem('webform', 'webform');
9262      localStorage.removeItem('webform');
9263      return true;
9264    }
9265    catch (e) {
9266      return false;
9267    }
9268  }());
9269
9270  /**
9271   * Attach handler to save details open/close state.
9272   *
9273   * @type {Drupal~behavior}
9274   */
9275  Drupal.behaviors.webformDetailsSave = {
9276    attach: function (context) {
9277      if (!hasLocalStorage) {
9278        return;
9279      }
9280
9281      // Summary click event handler.
9282      $('details > summary', context).once('webform-details-summary-save').on('click', function () {
9283        var $details = $(this).parent();
9284
9285        // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
9286        if ($details[0].hasAttribute('data-webform-details-nosave')) {
9287          return;
9288        }
9289
9290        var name = Drupal.webformDetailsSaveGetName($details);
9291        if (!name) {
9292          return;
9293        }
9294
9295        var open = ($details.attr('open') !== 'open') ? '1' : '0';
9296        localStorage.setItem(name, open);
9297      });
9298
9299      // Initialize details open state via local storage.
9300      $('details', context).once('webform-details-save').each(function () {
9301        var $details = $(this);
9302
9303        var name = Drupal.webformDetailsSaveGetName($details);
9304        if (!name) {
9305          return;
9306        }
9307
9308        var open = localStorage.getItem(name);
9309        if (open === null) {
9310          return;
9311        }
9312
9313        if (open === '1') {
9314          $details.attr('open', 'open');
9315        }
9316        else {
9317          $details.removeAttr('open');
9318        }
9319      });
9320    }
9321
9322  };
9323
9324  /**
9325   * Get the name used to store the state of details element.
9326   *
9327   * @param {jQuery} $details
9328   *   A details element.
9329   *
9330   * @return {string}
9331   *   The name used to store the state of details element.
9332   */
9333  Drupal.webformDetailsSaveGetName = function ($details) {
9334    if (!hasLocalStorage) {
9335      return '';
9336    }
9337
9338    // Ignore details that are vertical tabs pane.
9339    if ($details.hasClass('vertical-tabs__pane')) {
9340      return '';
9341    }
9342
9343    // Any details element not included a webform must have define its own id.
9344    var webformId = $details.attr('data-webform-element-id');
9345    if (webformId) {
9346      return 'Drupal.webform.' + webformId.replace('--', '.');
9347    }
9348
9349    var detailsId = $details.attr('id');
9350    if (!detailsId) {
9351      return '';
9352    }
9353
9354    var $form = $details.parents('form');
9355    if (!$form.length || !$form.attr('id')) {
9356      return '';
9357    }
9358
9359    var formId = $form.attr('id');
9360    if (!formId) {
9361      return '';
9362    }
9363
9364    // ISSUE: When Drupal renders a webform in a modal dialog it appends a unique
9365    // identifier to webform ids and details ids. (i.e. my-form--FeSFISegTUI)
9366    // WORKAROUND: Remove the unique id that delimited using double dashes.
9367    formId = formId.replace(/--.+?$/, '').replace(/-/g, '_');
9368    detailsId = detailsId.replace(/--.+?$/, '').replace(/-/g, '_');
9369    return 'Drupal.webform.' + formId + '.' + detailsId;
9370  };
9371
9372})(jQuery, Drupal);
9373;
9374/**
9375* DO NOT EDIT THIS FILE.
9376* See the following change record for more information,
9377* https://www.drupal.org/node/2815083
9378* @preserve
9379**/
9380
9381(function (Drupal, debounce) {
9382  var liveElement = void 0;
9383  var announcements = [];
9384
9385  Drupal.behaviors.drupalAnnounce = {
9386    attach: function attach(context) {
9387      if (!liveElement) {
9388        liveElement = document.createElement('div');
9389        liveElement.id = 'drupal-live-announce';
9390        liveElement.className = 'visually-hidden';
9391        liveElement.setAttribute('aria-live', 'polite');
9392        liveElement.setAttribute('aria-busy', 'false');
9393        document.body.appendChild(liveElement);
9394      }
9395    }
9396  };
9397
9398  function announce() {
9399    var text = [];
9400    var priority = 'polite';
9401    var announcement = void 0;
9402
9403    var il = announcements.length;
9404    for (var i = 0; i < il; i++) {
9405      announcement = announcements.pop();
9406      text.unshift(announcement.text);
9407
9408      if (announcement.priority === 'assertive') {
9409        priority = 'assertive';
9410      }
9411    }
9412
9413    if (text.length) {
9414      liveElement.innerHTML = '';
9415
9416      liveElement.setAttribute('aria-busy', 'true');
9417
9418      liveElement.setAttribute('aria-live', priority);
9419
9420      liveElement.innerHTML = text.join('\n');
9421
9422      liveElement.setAttribute('aria-busy', 'false');
9423    }
9424  }
9425
9426  Drupal.announce = function (text, priority) {
9427    announcements.push({
9428      text: text,
9429      priority: priority
9430    });
9431
9432    return debounce(announce, 200)();
9433  };
9434})(Drupal, Drupal.debounce);;
9435/**
9436 * @file
9437 * JavaScript behaviors for details element.
9438 */
9439
9440(function ($, Drupal) {
9441
9442  'use strict';
9443
9444  Drupal.webform = Drupal.webform || {};
9445  Drupal.webform.detailsToggle = Drupal.webform.detailsToggle || {};
9446  Drupal.webform.detailsToggle.options = Drupal.webform.detailsToggle.options || {};
9447
9448  /**
9449   * Attach handler to toggle details open/close state.
9450   *
9451   * @type {Drupal~behavior}
9452   */
9453  Drupal.behaviors.webformDetailsToggle = {
9454    attach: function (context) {
9455      $('.js-webform-details-toggle', context).once('webform-details-toggle').each(function () {
9456        var $form = $(this);
9457        var $tabs = $form.find('.webform-tabs');
9458
9459        // Get only the main details elements and ignore all nested details.
9460        var selector = ($tabs.length) ? '.webform-tab' : '.js-webform-details-toggle, .webform-elements';
9461        var $details = $form.find('details').filter(function () {
9462          var $parents = $(this).parentsUntil(selector);
9463          return ($parents.find('details').length === 0);
9464        });
9465
9466        // Toggle is only useful when there are two or more details elements.
9467        if ($details.length < 2) {
9468          return;
9469        }
9470
9471        var options = $.extend({
9472          button: '<button type="button" class="webform-details-toggle-state"></button>'
9473        }, Drupal.webform.detailsToggle.options);
9474
9475        // Create toggle buttons.
9476        var $toggle = $(options.button)
9477          .attr('title', Drupal.t('Toggle details widget state.'))
9478          .on('click', function (e) {
9479            // Get details that are not vertical tabs pane.
9480            var $details = $form.find('details:not(.vertical-tabs__pane)');
9481            var open;
9482            if (Drupal.webform.detailsToggle.isFormDetailsOpen($form)) {
9483              $details.removeAttr('open');
9484              open = 0;
9485            }
9486            else {
9487              $details.attr('open', 'open');
9488              open = 1;
9489            }
9490            Drupal.webform.detailsToggle.setDetailsToggleLabel($form);
9491
9492            // Set the saved states for all the details elements.
9493            // @see webform.element.details.save.js
9494            if (Drupal.webformDetailsSaveGetName) {
9495              $details.each(function () {
9496                // Note: Drupal.webformDetailsSaveGetName checks if localStorage
9497                // exists and is enabled.
9498                // @see webform.element.details.save.js
9499                var name = Drupal.webformDetailsSaveGetName($(this));
9500                if (name) {
9501                  localStorage.setItem(name, open);
9502                }
9503              });
9504            }
9505          })
9506          .wrap('<div class="webform-details-toggle-state-wrapper"></div>')
9507          .parent();
9508
9509        if ($tabs.length) {
9510          // Add toggle state before the tabs.
9511          $tabs.find('.item-list:first-child').eq(0).before($toggle);
9512        }
9513        else {
9514          // Add toggle state link to first details element.
9515          $details.eq(0).before($toggle);
9516        }
9517
9518        Drupal.webform.detailsToggle.setDetailsToggleLabel($form);
9519      });
9520    }
9521  };
9522
9523  /**
9524   * Determine if a webform's details are all opened.
9525   *
9526   * @param {jQuery} $form
9527   *   A webform.
9528   *
9529   * @return {boolean}
9530   *   TRUE if a webform's details are all opened.
9531   */
9532  Drupal.webform.detailsToggle.isFormDetailsOpen = function ($form) {
9533    return ($form.find('details[open]').length === $form.find('details').length);
9534  };
9535
9536  /**
9537   * Set a webform's details toggle state widget label.
9538   *
9539   * @param {jQuery} $form
9540   *   A webform.
9541   */
9542  Drupal.webform.detailsToggle.setDetailsToggleLabel = function ($form) {
9543    var isOpen = Drupal.webform.detailsToggle.isFormDetailsOpen($form);
9544
9545    var label = (isOpen) ? Drupal.t('Collapse all') : Drupal.t('Expand all');
9546    $form.find('.webform-details-toggle-state').html(label);
9547
9548    var text = (isOpen) ? Drupal.t('All details have been expanded.') : Drupal.t('All details have been collapsed.');
9549    Drupal.announce(text);
9550  };
9551
9552})(jQuery, Drupal);
9553;
9554/**
9555 * @file
9556 * JavaScript behaviors for message element integration.
9557 */
9558
9559(function ($, Drupal) {
9560
9561  'use strict';
9562
9563  // Determine if local storage exists and is enabled.
9564  // This approach is copied from Modernizr.
9565  // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
9566  var hasLocalStorage = (function () {
9567    try {
9568      localStorage.setItem('webform', 'webform');
9569      localStorage.removeItem('webform');
9570      return true;
9571    }
9572    catch (e) {
9573      return false;
9574    }
9575  }());
9576
9577  // Determine if session storage exists and is enabled.
9578  // This approach is copied from Modernizr.
9579  // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
9580  var hasSessionStorage = (function () {
9581    try {
9582      sessionStorage.setItem('webform', 'webform');
9583      sessionStorage.removeItem('webform');
9584      return true;
9585    }
9586    catch (e) {
9587      return false;
9588    }
9589  }());
9590
9591  /**
9592   * Behavior for handler message close.
9593   *
9594   * @type {Drupal~behavior}
9595   */
9596  Drupal.behaviors.webformMessageClose = {
9597    attach: function (context) {
9598      $(context).find('.js-webform-message--close').once('webform-message--close').each(function () {
9599        var $element = $(this);
9600
9601        var id = $element.attr('data-message-id');
9602        var storage = $element.attr('data-message-storage');
9603        var effect = $element.attr('data-message-close-effect') || 'hide';
9604        switch (effect) {
9605          case 'slide': effect = 'slideUp'; break;
9606
9607          case 'fade': effect = 'fadeOut'; break;
9608        }
9609
9610        // Check storage status.
9611        if (isClosed($element, storage, id)) {
9612          return;
9613        }
9614
9615        // Only show element if it's style is not set to 'display: none'.
9616        if ($element.attr('style') !== 'display: none;') {
9617          $element.show();
9618        }
9619
9620        $element.find('.js-webform-message__link').on('click', function (event) {
9621          $element[effect]();
9622          setClosed($element, storage, id);
9623          $element.trigger('close');
9624          event.preventDefault();
9625        });
9626      });
9627    }
9628  };
9629
9630  function isClosed($element, storage, id) {
9631    if (!id || !storage) {
9632      return false;
9633    }
9634
9635    switch (storage) {
9636      case 'local':
9637        if (hasLocalStorage) {
9638          return localStorage.getItem('Drupal.webform.message.' + id) || false;
9639        }
9640        return false;
9641
9642      case 'session':
9643        if (hasSessionStorage) {
9644          return sessionStorage.getItem('Drupal.webform.message.' + id) || false;
9645        }
9646        return false;
9647
9648      default:
9649        return false;
9650    }
9651  }
9652
9653  function setClosed($element, storage, id) {
9654    if (!id || !storage) {
9655      return;
9656    }
9657
9658    switch (storage) {
9659      case 'local':
9660        if (hasLocalStorage) {
9661          localStorage.setItem('Drupal.webform.message.' + id, true);
9662        }
9663        break;
9664
9665      case 'session':
9666        if (hasSessionStorage) {
9667          sessionStorage.setItem('Drupal.webform.message.' + id, true);
9668        }
9669        break;
9670
9671      case 'user':
9672      case 'state':
9673      case 'custom':
9674        $.get($element.find('.js-webform-message__link').attr('href'));
9675        return true;
9676    }
9677  }
9678
9679})(jQuery, Drupal);
9680;
9681/**
9682 * @file
9683 * Unlock protected forms.
9684 *
9685 * This works by resetting the form action to the path that It should be as well
9686 * as injecting the secret form key, only if the current user is verified to be
9687 * human which is done by waiting for a mousemove, swipe, or tab/enter key to be
9688 * pressed.
9689 */
9690
9691(function ($, Drupal, drupalSettings) {
9692  "use strict";
9693
9694  Drupal.antibot = {};
9695
9696  Drupal.behaviors.antibot = {
9697    attach: function (context) {
9698      // Assume the user is not human, despite JS being enabled.
9699      drupalSettings.antibot.human = false;
9700
9701      // Wait for a mouse to move, indicating they are human.
9702      $('body').mousemove(function () {
9703        // Unlock the forms.
9704        Drupal.antibot.unlockForms();
9705      });
9706
9707      // Wait for a touch move event, indicating that they are human.
9708      $('body').bind('touchmove', function () {
9709        // Unlock the forms.
9710        Drupal.antibot.unlockForms();
9711      });
9712
9713      // A tab or enter key pressed can also indicate they are human.
9714      $('body').keydown(function (e) {
9715        if ((e.keyCode == 9) || (e.keyCode == 13)) {
9716          // Unlock the forms.
9717          Drupal.antibot.unlockForms();
9718        }
9719      });
9720    }
9721  };
9722
9723  /**
9724   * Unlock all locked forms.
9725   */
9726  Drupal.antibot.unlockForms = function () {
9727    // Act only if we haven't yet verified this user as being human.
9728    if (!drupalSettings.antibot.human) {
9729      // Check if there are forms to unlock.
9730      if (drupalSettings.antibot.forms != undefined) {
9731        // Iterate all antibot forms that we need to unlock.
9732        $.each(drupalSettings.antibot.forms, function (id, config) {
9733          // Switch the action.
9734          $('form#' + config.id).attr('action', $('form#' + config.id).data('action'));
9735
9736          // Set the key.
9737          $('form#' + config.id).find('input[name="antibot_key"]').val(config.key);
9738        });
9739      }
9740      // Mark this user as being human.
9741      drupalSettings.antibot.human = true;
9742    }
9743  };
9744})(jQuery, Drupal, drupalSettings);
9745;
9746/**
9747 * @file
9748 * JavaScript behaviors for select menu.
9749 */
9750
9751(function ($, Drupal) {
9752
9753  'use strict';
9754
9755  /**
9756   * Disable select menu options using JavaScript.
9757   *
9758   * @type {Drupal~behavior}
9759   */
9760  Drupal.behaviors.webformSelectOptionsDisabled = {
9761    attach: function (context) {
9762      $('select[data-webform-select-options-disabled]', context).once('webform-select-options-disabled').each(function () {
9763        var $select = $(this);
9764        var disabled = $select.attr('data-webform-select-options-disabled').split(/\s*,\s*/);
9765        $select.find('option').filter(function isDisabled() {
9766          return ($.inArray(this.value, disabled) !== -1);
9767        }).attr('disabled', 'disabled');
9768      });
9769    }
9770  };
9771
9772
9773})(jQuery, Drupal);
9774;

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.