text: /*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
  !function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=Array.isArray(d)))?(e?(e=!1,f=c&&Array.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,N,e),g(f,c,O,e)):(f++,j.call(a,g(f,c,N,e),g(f,c,O,e),g(f,c,N,c.notifyWith))):(d!==N&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S),
  a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},U=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function V(){this.expando=r.expando+V.uid++}V.uid=1,V.prototype={cache:function(a){var b=a[this.expando];return b||(b={},U(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){Array.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(L)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var W=new V,X=new V,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function $(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Y.test(a)?JSON.parse(a):a)}function _(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Z,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=$(c)}catch(e){}X.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return X.hasData(a)||W.hasData(a)},data:function(a,b,c){return X.access(a,b,c)},removeData:function(a,b){X.remove(a,b)},_data:function(a,b,c){return W.access(a,b,c)},_removeData:function(a,b){W.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=X.get(f),1===f.nodeType&&!W.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),_(f,d,e[d])));W.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){X.set(this,a)}):T(this,function(b){var c;if(f&&void 0===b){if(c=X.get(f,a),void 0!==c)return c;if(c=_(f,a),void 0!==c)return c}else this.each(function(){X.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=W.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ba=new RegExp("^(?:([+-])=|)("+aa+")([a-z%]*)$","i"),ca=["Top","Right","Bottom","Left"],da=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ea=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function fa(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&ba.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ga={};function ha(a){var b,c=a.ownerDocument,d=a.nodeName,e=ga[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ga[d]=e,e)}function ia(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=W.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&da(d)&&(e[f]=ha(d))):"none"!==c&&(e[f]="none",W.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ia(this,!0)},hide:function(){return ia(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){da(this)?r(this).show():r(this).hide()})}});var ja=/^(?:checkbox|radio)$/i,ka=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c<d;c++)W.set(a[c],"globalEval",!b||W.get(b[c],"globalEval"))}var pa=/<|&#?\w+;/;function qa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(pa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ka.exec(f)||["",""])[1].toLowerCase(),i=ma[h]||ma._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==xa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===xa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&B(this,"input"))return this.click(),!1},_default:function(a){return B(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?va:wa,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:wa,isPropagationStopped:wa,isImmediatePropagationStopped:wa,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=va,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=va,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=va,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&sa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ta.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return ya(this,a,b,c,d)},one:function(a,b,c,d){return ya(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=wa),this.each(function(){r.event.remove(this,a,c,b)})}});var za=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/<script|<style|<link/i,Ba=/checked\s*(?:[^=]|=\s*.checked.)/i,Ca=/^true\/(.*)/,Da=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}X.hasData(a)&&(h=X.access(a),i=r.extend({},h),X.set(b,i))}}function Ia(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ja.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ja(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,na(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ga),l=0;l<i;l++)j=h[l],la.test(j.type||"")&&!W.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Da,""),k))}return a}function Ka(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(na(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&oa(na(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(za,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d<e;d++)Ia(f[d],g[d]);if(b)if(c)for(f=f||na(a),g=g||na(h),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);else Ha(a,h);return g=na(h,"script"),g.length>0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(na(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ja(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(na(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var La=/^margin/,Ma=new RegExp("^("+aa+")(?!px)[a-z%]+$","i"),Na=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",ra.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,ra.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Oa(a,b,c){var d,e,f,g,h=a.style;return c=c||Na(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ma.test(g)&&La.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Pa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Qa=/^(none|table(?!-c[ea]).+)/,Ra=/^--/,Sa={position:"absolute",visibility:"hidden",display:"block"},Ta={letterSpacing:"0",fontWeight:"400"},Ua=["Webkit","Moz","ms"],Va=d.createElement("div").style;function Wa(a){if(a in Va)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ua.length;while(c--)if(a=Ua[c]+b,a in Va)return a}function Xa(a){var b=r.cssProps[a];return b||(b=r.cssProps[a]=Wa(a)||a),b}function Ya(a,b,c){var d=ba.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Za(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ca[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ca[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ca[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ca[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ca[f]+"Width",!0,e)));return g}function $a(a,b,c){var d,e=Na(a),f=Oa(a,b,e),g="border-box"===r.css(a,"boxSizing",!1,e);return Ma.test(f)?f:(d=g&&(o.boxSizingReliable()||f===a.style[b]),"auto"===f&&(f=a["offset"+b[0].toUpperCase()+b.slice(1)]),f=parseFloat(f)||0,f+Za(a,b,c||(g?"border":"content"),d,e)+"px")}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Oa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=Ra.test(b),j=a.style;return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:j[b]:(f=typeof c,"string"===f&&(e=ba.exec(c))&&e[1]&&(c=fa(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(j[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i?j.setProperty(b,c):j[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b),i=Ra.test(b);return i||(b=Xa(h)),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Oa(a,b,d)),"normal"===e&&b in Ta&&(e=Ta[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Qa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?$a(a,b,d):ea(a,Sa,function(){return $a(a,b,d)})},set:function(a,c,d){var e,f=d&&Na(a),g=d&&Za(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=ba.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ya(a,c,g)}}}),r.cssHooks.marginLeft=Pa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Oa(a,"marginLeft"))||a.getBoundingClientRect().left-ea(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ca[d]+b]=f[d]||f[d-2]||f[0];return e}},La.test(a)||(r.cssHooks[a+b].set=Ya)}),r.fn.extend({css:function(a,b){return T(this,function(a,b,c){var d,e,f={},g=0;if(Array.isArray(b)){for(d=Na(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&da(a),q=W.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],cb.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=W.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ia([a],!0),j=a.style.display||j,k=r.css(a,"display"),ia([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=W.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ia([a],!0),m.done(function(){p||ia([a]),W.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=hb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],Array.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=kb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=ab||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(i||h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:ab||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);f<g;f++)if(d=kb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,hb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j}r.Animation=r.extend(kb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return fa(c.elem,a,ba.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(L);for(var c,d=0,e=a.length;d<e;d++)c=a[d],kb.tweeners[c]=kb.tweeners[c]||[],kb.tweeners[c].unshift(b)},prefilters:[ib],prefilter:function(a,b){b?kb.prefilters.unshift(a):kb.prefilters.push(a)}}),r.speed=function(a,b,c){var d=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off?d.duration=0:"number"!=typeof d.duration&&(d.duration in r.fx.speeds?d.duration=r.fx.speeds[d.duration]:d.duration=r.fx.speeds._default),null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){r.isFunction(d.old)&&d.old.call(this),d.queue&&r.dequeue(this,d.queue)},d},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(da).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=kb(this,r.extend({},a),f);(e||W.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=W.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&db.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=W.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),r.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(ab=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),ab=void 0},r.fx.timer=function(a){r.timers.push(a),r.fx.start()},r.fx.interval=13,r.fx.start=function(){bb||(bb=!0,eb())},r.fx.stop=function(){bb=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var lb,mb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return T(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),
  null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!B(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.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(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,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":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Tb=[],Ub=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Tb.pop()||r.expando+"_"+ub++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Ub.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ub.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Ub,"$1"+e):b.jsonp!==!1&&(b.url+=(vb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Tb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=C.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=qa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=pb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length},r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),b=f.ownerDocument,c=b.documentElement,e=b.defaultView,{top:d.top+e.pageYOffset-c.clientTop,left:d.left+e.pageXOffset-c.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),B(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||ra})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return T(this,function(a,d,e){var f;return r.isWindow(a)?f=a:9===a.nodeType&&(f=a.defaultView),void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Pa(o.pixelPosition,function(a,c){if(c)return c=Oa(a,b),Ma.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return T(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.holdReady=function(a){a?r.readyWait++:r.ready(!0)},r.isArray=Array.isArray,r.parseJSON=JSON.parse,r.nodeName=B,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Vb=a.jQuery,Wb=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Wb),b&&a.jQuery===r&&(a.jQuery=Vb),r},b||(a.jQuery=a.$=r),r});
  ;
  //     Underscore.js 1.8.3
  //     http://underscorejs.org
  //     (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  //     Underscore may be freely distributed under the MIT license.
  (function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i},m.indexOf=r(1,m.findIndex,m.sortedIndex),m.lastIndexOf=r(-1,m.findLastIndex),m.range=function(n,t,r){null==t&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e<arguments.length;)i.push(arguments[e++]);return E(n,r,this,this,i)};return r},m.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this);
  
  /*!
   * jQuery Once v2.2.0 - http://github.com/robloach/jquery-once
   * @license MIT, GPL-2.0
   *   http://opensource.org/licenses/MIT
   *   http://opensource.org/licenses/GPL-2.0
   */
  (function(e){"use strict";if(typeof exports==="object"){e(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){"use strict";var n=function(e){e=e||"once";if(typeof e!=="string"){throw new TypeError("The jQuery Once id parameter must be a string")}return e};e.fn.once=function(t){var r="jquery-once-"+n(t);return this.filter(function(){return e(this).data(r)!==true}).data(r,true)};e.fn.removeOnce=function(e){return this.findOnce(e).removeData("jquery-once-"+n(e))};e.fn.findOnce=function(t){var r="jquery-once-"+n(t);return this.filter(function(){return e(this).data(r)===true})}});
  
  (function(t){var e=typeof self=="object"&&self.self==self&&self||typeof global=="object"&&global.global==global&&global;if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,n){e.Backbone=t(e,n,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore"),r;try{r=require("jquery")}catch(n){}t(e,exports,i,r)}else{e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}})(function(t,e,i,r){var n=t.Backbone;var s=Array.prototype.slice;e.VERSION="1.2.3";e.$=r;e.noConflict=function(){t.Backbone=n;return this};e.emulateHTTP=false;e.emulateJSON=false;var a=function(t,e,r){switch(t){case 1:return function(){return i[e](this[r])};case 2:return function(t){return i[e](this[r],t)};case 3:return function(t,n){return i[e](this[r],h(t,this),n)};case 4:return function(t,n,s){return i[e](this[r],h(t,this),n,s)};default:return function(){var t=s.call(arguments);t.unshift(this[r]);return i[e].apply(i,t)}}};var o=function(t,e,r){i.each(e,function(e,n){if(i[n])t.prototype[n]=a(e,n,r)})};var h=function(t,e){if(i.isFunction(t))return t;if(i.isObject(t)&&!e._isModel(t))return u(t);if(i.isString(t))return function(e){return e.get(t)};return t};var u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}};var l=e.Events={};var c=/\s+/;var f=function(t,e,r,n,s){var a=0,o;if(r&&typeof r==="object"){if(n!==void 0&&"context"in s&&s.context===void 0)s.context=n;for(o=i.keys(r);a<o.length;a++){e=f(t,e,o[a],r[o[a]],s)}}else if(r&&c.test(r)){for(o=r.split(c);a<o.length;a++){e=t(e,o[a],n,s)}}else{e=t(e,r,n,s)}return e};l.on=function(t,e,i){return d(this,t,e,i)};var d=function(t,e,i,r,n){t._events=f(v,t._events||{},e,i,{context:r,ctx:t,listening:n});if(n){var s=t._listeners||(t._listeners={});s[n.id]=n}return t};l.listenTo=function(t,e,r){if(!t)return this;var n=t._listenId||(t._listenId=i.uniqueId("l"));var s=this._listeningTo||(this._listeningTo={});var a=s[n];if(!a){var o=this._listenId||(this._listenId=i.uniqueId("l"));a=s[n]={obj:t,objId:n,id:o,listeningTo:s,count:0}}d(t,e,r,this,a);return this};var v=function(t,e,i,r){if(i){var n=t[e]||(t[e]=[]);var s=r.context,a=r.ctx,o=r.listening;if(o)o.count++;n.push({callback:i,context:s,ctx:s||a,listening:o})}return t};l.off=function(t,e,i){if(!this._events)return this;this._events=f(g,this._events,t,e,{context:i,listeners:this._listeners});return this};l.stopListening=function(t,e,r){var n=this._listeningTo;if(!n)return this;var s=t?[t._listenId]:i.keys(n);for(var a=0;a<s.length;a++){var o=n[s[a]];if(!o)break;o.obj.off(e,r,this)}if(i.isEmpty(n))this._listeningTo=void 0;return this};var g=function(t,e,r,n){if(!t)return;var s=0,a;var o=n.context,h=n.listeners;if(!e&&!r&&!o){var u=i.keys(h);for(;s<u.length;s++){a=h[u[s]];delete h[a.id];delete a.listeningTo[a.objId]}return}var l=e?[e]:i.keys(t);for(;s<l.length;s++){e=l[s];var c=t[e];if(!c)break;var f=[];for(var d=0;d<c.length;d++){var v=c[d];if(r&&r!==v.callback&&r!==v.callback._callback||o&&o!==v.context){f.push(v)}else{a=v.listening;if(a&&--a.count===0){delete h[a.id];delete a.listeningTo[a.objId]}}}if(f.length){t[e]=f}else{delete t[e]}}if(i.size(t))return t};l.once=function(t,e,r){var n=f(p,{},t,e,i.bind(this.off,this));return this.on(n,void 0,r)};l.listenToOnce=function(t,e,r){var n=f(p,{},e,r,i.bind(this.stopListening,this,t));return this.listenTo(t,n)};var p=function(t,e,r,n){if(r){var s=t[e]=i.once(function(){n(e,s);r.apply(this,arguments)});s._callback=r}return t};l.trigger=function(t){if(!this._events)return this;var e=Math.max(0,arguments.length-1);var i=Array(e);for(var r=0;r<e;r++)i[r]=arguments[r+1];f(m,this._events,t,void 0,i);return this};var m=function(t,e,i,r){if(t){var n=t[e];var s=t.all;if(n&&s)s=s.slice();if(n)_(n,r);if(s)_(s,[e].concat(r))}return t};var _=function(t,e){var i,r=-1,n=t.length,s=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<n)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<n)(i=t[r]).callback.call(i.ctx,s);return;case 2:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a);return;case 3:while(++r<n)(i=t[r]).callback.call(i.ctx,s,a,o);return;default:while(++r<n)(i=t[r]).callback.apply(i.ctx,e);return}};l.bind=l.on;l.unbind=l.off;i.extend(e,l);var y=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId(this.cidPrefix);this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(y.prototype,l,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(t==null)return this;var n;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;var s=r.unset;var a=r.silent;var o=[];var h=this._changing;this._changing=true;if(!h){this._previousAttributes=i.clone(this.attributes);this.changed={}}var u=this.attributes;var l=this.changed;var c=this._previousAttributes;for(var f in n){e=n[f];if(!i.isEqual(u[f],e))o.push(f);if(!i.isEqual(c[f],e)){l[f]=e}else{delete l[f]}s?delete u[f]:u[f]=e}this.id=this.get(this.idAttribute);if(!a){if(o.length)this._pending=r;for(var d=0;d<o.length;d++){this.trigger("change:"+o[d],this,u[o[d]],r)}}if(h)return this;if(!a){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e=this._changing?this._previousAttributes:this.attributes;var r={};for(var n in t){var s=t[n];if(i.isEqual(e[n],s))continue;r[n]=s}return i.size(r)?r:false},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:true},t);var e=this;var r=t.success;t.success=function(i){var n=t.parse?e.parse(i,t):i;if(!e.set(n,t))return false;if(r)r.call(t.context,e,i,t);e.trigger("sync",e,i,t)};z(this,t);return this.sync("read",this,t)},save:function(t,e,r){var n;if(t==null||typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r=i.extend({validate:true,parse:true},r);var s=r.wait;if(n&&!s){if(!this.set(n,r))return false}else{if(!this._validate(n,r))return false}var a=this;var o=r.success;var h=this.attributes;r.success=function(t){a.attributes=h;var e=r.parse?a.parse(t,r):t;if(s)e=i.extend({},n,e);if(e&&!a.set(e,r))return false;if(o)o.call(r.context,a,t,r);a.trigger("sync",a,t,r)};z(this,r);if(n&&s)this.attributes=i.extend({},h,n);var u=this.isNew()?"create":r.patch?"patch":"update";if(u==="patch"&&!r.attrs)r.attrs=n;var l=this.sync(u,this,r);this.attributes=h;return l},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var n=t.wait;var s=function(){e.stopListening();e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(n)s();if(r)r.call(t.context,e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};var a=false;if(this.isNew()){i.defer(t.success)}else{z(this,t);a=this.sync("delete",this,t)}if(!n)s();return a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||F();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.defaults({validate:true},t))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var b={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};o(y,b,"attributes");var x=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var w={add:true,remove:true,merge:true};var E={add:true,remove:false};var k=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var r=Array(t.length-i);var n=e.length;for(var s=0;s<r.length;s++)r[s]=t[s+i];for(s=0;s<n;s++)t[s+i]=e[s];for(s=0;s<r.length;s++)t[s+n+i]=r[s]};i.extend(x.prototype,l,{model:y,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,E))},remove:function(t,e){e=i.extend({},e);var r=!i.isArray(t);t=r?[t]:i.clone(t);var n=this._removeModels(t,e);if(!e.silent&&n)this.trigger("update",this,e);return r?n[0]:n},set:function(t,e){if(t==null)return;e=i.defaults({},e,w);if(e.parse&&!this._isModel(t))t=this.parse(t,e);var r=!i.isArray(t);t=r?[t]:t.slice();var n=e.at;if(n!=null)n=+n;if(n<0)n+=this.length+1;var s=[];var a=[];var o=[];var h={};var u=e.add;var l=e.merge;var c=e.remove;var f=false;var d=this.comparator&&n==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g;for(var p=0;p<t.length;p++){g=t[p];var m=this.get(g);if(m){if(l&&g!==m){var _=this._isModel(g)?g.attributes:g;if(e.parse)_=m.parse(_,e);m.set(_,e);if(d&&!f)f=m.hasChanged(v)}if(!h[m.cid]){h[m.cid]=true;s.push(m)}t[p]=m}else if(u){g=t[p]=this._prepareModel(g,e);if(g){a.push(g);this._addReference(g,e);h[g.cid]=true;s.push(g)}}}if(c){for(p=0;p<this.length;p++){g=this.models[p];if(!h[g.cid])o.push(g)}if(o.length)this._removeModels(o,e)}var y=false;var b=!d&&u&&c;if(s.length&&b){y=this.length!=s.length||i.some(this.models,function(t,e){return t!==s[e]});this.models.length=0;k(this.models,s,0);this.length=this.models.length}else if(a.length){if(d)f=true;k(this.models,a,n==null?this.length:n);this.length=this.models.length}if(f)this.sort({silent:true});if(!e.silent){for(p=0;p<a.length;p++){if(n!=null)e.index=n+p;g=a[p];g.trigger("add",g,this,e)}if(f||y)this.trigger("sort",this,e);if(a.length||o.length)this.trigger("update",this,e)}return r?t[0]:t},reset:function(t,e){e=e?i.clone(e):{};for(var r=0;r<this.models.length;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]},at:function(t){if(t<0)t+=this.length;return this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,true)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;if(i.isFunction(e))e=i.bind(e,this);if(r===1||i.isString(e)){this.models=this.sortBy(e)}else{this.models.sort(e)}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=i.extend({parse:true},t);var e=t.success;var r=this;t.success=function(i){var n=t.reset?"reset":"set";r[n](i,t);if(e)e.call(t.context,r,i,t);r.trigger("sync",r,i,t)};z(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};var r=e.wait;t=this._prepareModel(t,e);if(!t)return false;if(!r)this.add(t,e);var n=this;var s=e.success;e.success=function(t,e,i){if(r)n.add(t,i);if(s)s.call(i.context,t,e,i)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(this._isModel(t)){if(!t.collection)t.collection=this;return t}e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_removeModels:function(t,e){var i=[];for(var r=0;r<t.length;r++){var n=this.get(t[r]);if(!n)continue;var s=this.indexOf(n);this.models.splice(s,1);this.length--;if(!e.silent){e.index=s;n.trigger("remove",n,this,e)}i.push(n);this._removeReference(n,e)}return i.length?i:false},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes);if(i!=null)this._byId[i]=t;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);if(i!=null)delete this._byId[i];if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(t==="change"){var n=this.modelId(e.previousAttributes());var s=this.modelId(e.attributes);if(n!==s){if(n!=null)delete this._byId[n];if(s!=null)this._byId[s]=e}}this.trigger.apply(this,arguments)}});var S={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3};o(x,S,"models");var I=e.View=function(t){this.cid=i.uniqueId("view");i.extend(this,i.pick(t,P));this._ensureElement();this.initialize.apply(this,arguments)};var T=/^(\S+)\s*(.*)$/;var P=["model","collection","el","id","attributes","className","tagName","events"];i.extend(I.prototype,l,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this._removeElement();this.stopListening();return this},_removeElement:function(){this.$el.remove()},setElement:function(t){this.undelegateEvents();this._setElement(t);this.delegateEvents();return this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0]},delegateEvents:function(t){t||(t=i.result(this,"events"));if(!t)return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[r];if(!r)continue;var n=e.match(T);this.delegate(n[1],n[2],i.bind(r,this))}return this},delegate:function(t,e,i){this.$el.on(t+".delegateEvents"+this.cid,e,i);return this},undelegateEvents:function(){if(this.$el)this.$el.off(".delegateEvents"+this.cid);return this},undelegate:function(t,e,i){this.$el.off(t+".delegateEvents"+this.cid,e,i);return this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");this.setElement(this._createElement(i.result(this,"tagName")));this._setAttributes(t)}else{this.setElement(i.result(this,"el"))}},_setAttributes:function(t){this.$el.attr(t)}});e.sync=function(t,r,n){var s=H[t];i.defaults(n||(n={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:s,dataType:"json"};if(!n.url){a.url=i.result(r,"url")||F()}if(n.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(n.attrs||r.toJSON(n))}if(n.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(n.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){a.type="POST";if(n.emulateJSON)a.data._method=s;var o=n.beforeSend;n.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",s);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!n.emulateJSON){a.processData=false}var h=n.error;n.error=function(t,e,i){n.textStatus=e;n.errorThrown=i;if(h)h.call(n.context,t,e,i)};var u=n.xhr=e.ajax(i.extend(a,n));r.trigger("request",r,u,n);return u};var H={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var A=/\((.*?)\)/g;var C=/(\(\?)?:\w+/g;var R=/\*\w+/g;var j=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,l,{initialize:function(){},route:function(t,r,n){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){n=r;r=""}if(!n)n=this[r];var s=this;e.history.route(t,function(i){var a=s._extractParameters(t,i);if(s.execute(n,a,r)!==false){s.trigger.apply(s,["route:"+r].concat(a));s.trigger("route",r,a);e.history.trigger("route",s,r,a)}});return this},execute:function(t,e,i){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(j,"\\$&").replace(A,"(?:$1)?").replace(C,function(t,e){return e?t:"([^/?]+)"}).replace(R,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var M=e.History=function(){this.handlers=[];this.checkUrl=i.bind(this.checkUrl,this);if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var N=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var U=/#.*$/;M.started=false;i.extend(M.prototype,l,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname);var e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return t.charAt(0)==="/"?t.slice(1):t},getFragment:function(t){if(t==null){if(this._usePushState||!this._wantsHashChange){t=this.getPath()}else{t=this.getHash()}}return t.replace(N,"")},start:function(t){if(M.started)throw new Error("Backbone.history has already been started");M.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._hasHashChange="onhashchange"in window&&(document.documentMode===void 0||document.documentMode>7);this._useHashChange=this._wantsHashChange&&this._hasHashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.history&&this.history.pushState);this._usePushState=this._wantsPushState&&this._hasPushState;this.fragment=this.getFragment();this.root=("/"+this.root+"/").replace(O,"/");if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";this.location.replace(e+"#"+this.getPath());return true}else if(this._hasPushState&&this.atRoot()){this.navigate(this.getHash(),{replace:true})}}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe");this.iframe.src="javascript:0";this.iframe.style.display="none";this.iframe.tabIndex=-1;var r=document.body;var n=r.insertBefore(this.iframe,r.firstChild).contentWindow;n.document.open();n.document.close();n.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState){s("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){s("hashchange",this.checkUrl,false)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}if(!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};if(this._usePushState){t("popstate",this.checkUrl,false)}else if(this._useHashChange&&!this.iframe){t("hashchange",this.checkUrl,false)}if(this.iframe){document.body.removeChild(this.iframe);this.iframe=null}if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);M.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getHash(this.iframe.contentWindow)}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){if(!this.matchRoot())return false;t=this.fragment=this.getFragment(t);return i.some(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!M.started)return false;if(!e||e===true)e={trigger:!!e};t=this.getFragment(t||"");var i=this.root;if(t===""||t.charAt(0)==="?"){i=i.slice(0,-1)||"/"}var r=i+t;t=this.decodeFragment(t.replace(U,""));if(this.fragment===t)return;this.fragment=t;if(this._usePushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,r)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var n=this.iframe.contentWindow;if(!e.replace){n.document.open();n.document.close()}this._updateHash(n.location,t,e.replace)}}else{return this.location.assign(r)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new M;var q=function(t,e){var r=this;var n;if(t&&i.has(t,"constructor")){n=t.constructor}else{n=function(){return r.apply(this,arguments)}}i.extend(n,r,e);var s=function(){this.constructor=n};s.prototype=r.prototype;n.prototype=new s;if(t)i.extend(n.prototype,t);n.__super__=r.prototype;return n};y.extend=x.extend=$.extend=I.extend=M.extend=q;var F=function(){throw new Error('A "url" property or function must be specified')};var z=function(t,e){var i=e.error;e.error=function(r){if(i)i.call(e.context,t,r,e);t.trigger("error",t,r,e)}};return e});
  
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function () {
    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"]');
  
    window.drupalSettings = {};
  
    if (settingsElement !== null) {
      window.drupalSettings = JSON.parse(settingsElement.textContent);
    }
  })();;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  window.Drupal = { behaviors: {}, locale: {} };
  
  (function (Drupal, drupalSettings, drupalTranslations) {
    Drupal.throwError = function (error) {
      setTimeout(function () {
        throw error;
      }, 0);
    };
  
    Drupal.attachBehaviors = function (context, settings) {
      context = context || document;
      settings = settings || drupalSettings;
      var behaviors = Drupal.behaviors;
  
      Object.keys(behaviors || {}).forEach(function (i) {
        if (typeof behaviors[i].attach === 'function') {
          try {
            behaviors[i].attach(context, settings);
          } catch (e) {
            Drupal.throwError(e);
          }
        }
      });
    };
  
    Drupal.detachBehaviors = function (context, settings, trigger) {
      context = context || document;
      settings = settings || drupalSettings;
      trigger = trigger || 'unload';
      var behaviors = Drupal.behaviors;
  
      Object.keys(behaviors || {}).forEach(function (i) {
        if (typeof behaviors[i].detach === 'function') {
          try {
            behaviors[i].detach(context, settings, trigger);
          } catch (e) {
            Drupal.throwError(e);
          }
        }
      });
    };
  
    Drupal.checkPlain = function (str) {
      str = str.toString().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
      return str;
    };
  
    Drupal.formatString = function (str, args) {
      var processedArgs = {};
  
      Object.keys(args || {}).forEach(function (key) {
        switch (key.charAt(0)) {
          case '@':
            processedArgs[key] = Drupal.checkPlain(args[key]);
            break;
  
          case '!':
            processedArgs[key] = args[key];
            break;
  
          default:
            processedArgs[key] = Drupal.theme('placeholder', args[key]);
            break;
        }
      });
  
      return Drupal.stringReplace(str, processedArgs, null);
    };
  
    Drupal.stringReplace = function (str, args, keys) {
      if (str.length === 0) {
        return str;
      }
  
      if (!Array.isArray(keys)) {
        keys = Object.keys(args || {});
  
        keys.sort(function (a, b) {
          return a.length - b.length;
        });
      }
  
      if (keys.length === 0) {
        return str;
      }
  
      var key = keys.pop();
      var fragments = str.split(key);
  
      if (keys.length) {
        for (var i = 0; i < fragments.length; i++) {
          fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0));
        }
      }
  
      return fragments.join(args[key]);
    };
  
    Drupal.t = function (str, args, options) {
      options = options || {};
      options.context = options.context || '';
  
      if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) {
        str = drupalTranslations.strings[options.context][str];
      }
  
      if (args) {
        str = Drupal.formatString(str, args);
      }
      return str;
    };
  
    Drupal.url = function (path) {
      return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path;
    };
  
    Drupal.url.toAbsolute = function (url) {
      var urlParsingNode = document.createElement('a');
  
      try {
        url = decodeURIComponent(url);
      } catch (e) {}
  
      urlParsingNode.setAttribute('href', url);
  
      return urlParsingNode.cloneNode(false).href;
    };
  
    Drupal.url.isLocal = function (url) {
      var absoluteUrl = Drupal.url.toAbsolute(url);
      var protocol = location.protocol;
  
      if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) {
        protocol = 'https:';
      }
      var baseUrl = protocol + '//' + location.host + drupalSettings.path.baseUrl.slice(0, -1);
  
      try {
        absoluteUrl = decodeURIComponent(absoluteUrl);
      } catch (e) {}
      try {
        baseUrl = decodeURIComponent(baseUrl);
      } catch (e) {}
  
      return absoluteUrl === baseUrl || absoluteUrl.indexOf(baseUrl + '/') === 0;
    };
  
    Drupal.formatPlural = function (count, singular, plural, args, options) {
      args = args || {};
      args['@count'] = count;
  
      var pluralDelimiter = drupalSettings.pluralDelimiter;
      var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter);
      var index = 0;
  
      if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) {
        index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default;
      } else if (args['@count'] !== 1) {
        index = 1;
      }
  
      return translations[index];
    };
  
    Drupal.encodePath = function (item) {
      return window.encodeURIComponent(item).replace(/%2F/g, '/');
    };
  
    Drupal.theme = function (func) {
      if (func in Drupal.theme) {
        var _Drupal$theme;
  
        for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }
  
        return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args);
      }
    };
  
    Drupal.theme.placeholder = function (str) {
      return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
    };
  })(Drupal, window.drupalSettings, window.drupalTranslations);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  if (window.jQuery) {
    jQuery.noConflict();
  }
  
  document.documentElement.className += ' js';
  
  (function (domready, Drupal, drupalSettings) {
    domready(function () {
      Drupal.attachBehaviors(document, drupalSettings);
    });
  })(domready, Drupal, window.drupalSettings);;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])}})});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.fn.extend({disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}})});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):a(this[0].form)}});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version","./escape-selector"],a):a(jQuery)}(function(a){return a.fn.labels=function(){var b,c,d,e,f;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),d=this.attr("id"),d&&(b=this.eq(0).parents().last(),f=b.add(b.length?b.siblings():this.siblings()),c="label[for='"+a.ui.escapeSelector(d)+"']",e=e.add(f.find(c).addBack(c))),this.pushStack(e))}});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){"1.7"===a.fn.jquery.substring(0,3)&&(a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))})});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.fn.scrollParent=function(b){var c=this.css("position"),d="absolute"===c,e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);return(!d||"static"!==b.css("position"))&&e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&f.length?f:a(this[0].ownerDocument||document)}});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version","./focusable"],a):a(jQuery)}(function(a){return a.extend(a.expr[":"],{tabbable:function(b){var c=a.attr(b,"tabindex"),d=null!=c;return(!d||c>=0)&&a.ui.focusable(b,d)}})});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.fn.extend({uniqueId:function(){var a=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&a(this).removeAttr("id")})}})});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){return a.ui=a.ui||{},a.ui.version="1.12.1"});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){function b(a){for(var b=a.css("visibility");"inherit"===b;)a=a.parent(),b=a.css("visibility");return"hidden"!==b}return a.ui.focusable=function(c,d){var e,f,g,h,i,j=c.nodeName.toLowerCase();return"area"===j?(e=c.parentNode,f=e.name,!(!c.href||!f||"map"!==e.nodeName.toLowerCase())&&(g=a("img[usemap='#"+f+"']"),g.length>0&&g.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(j)?(h=!c.disabled,h&&(i=a(c).closest("fieldset")[0],i&&(h=!i.disabled))):h="a"===j?c.href||d:d,h&&a(c).is(":visible")&&b(a(c)))},a.extend(a.expr[":"],{focusable:function(b){return a.ui.focusable(b,null!=a.attr(b,"tabindex"))}}),a.ui.focusable});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e<f.length;e++)a.options[f[e][0]]&&f[e][1].apply(a.element,c)}}});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.ui.safeActiveElement=function(a){var b;try{b=a.activeElement}catch(c){b=a.body}return b||(b=a.body),b.nodeName||(b=a.body),b}});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return a.ui.safeBlur=function(b){b&&"body"!==b.nodeName.toLowerCase()&&a(b).trigger("blur")}});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;return a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(g){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h={},i=b.split(".")[0];b=b.split(".")[1];var j=i+"-"+b;return d||(d=c,c=a.Widget),a.isArray(d)&&(d=a.extend.apply(null,[{}].concat(d))),a.expr[":"][j.toLowerCase()]=function(b){return!!a.data(b,j)},a[i]=a[i]||{},e=a[i][b],f=a[i][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new f(a,b)},a.extend(f,e,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),g=new c,g.options=a.widget.extend({},g.options),a.each(d,function(b,d){return a.isFunction(d)?void(h[b]=function(){function a(){return c.prototype[b].apply(this,arguments)}function e(a){return c.prototype[b].apply(this,a)}return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(h[b]=d)}),f.prototype=a.widget.extend(g,{widgetEventPrefix:e?g.widgetEventPrefix||b:b},h,{constructor:f,namespace:i,widgetName:b,widgetFullName:j}),e?(a.each(e._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,f,c._proto)}),delete e._childConstructors):c._childConstructors.push(f),a.widget.bridge(b,f),f},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;g<h;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(a.isPlainObject(e)?b[d]=a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):b[d]=e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.length||"instance"!==f?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):i=void 0:(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),this.classesElementLookup={},d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){var b=this;this._destroy(),a.each(this.classesElementLookup,function(a,c){b._removeClass(c,a)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;f<d.length-1;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return"classes"===a&&this._setOptionClasses(b),this.options[a]=b,"disabled"===a&&this._setOptionDisabled(b),this},_setOptionClasses:function(b){var c,d,e;for(c in b)e=this.classesElementLookup[c],b[c]!==this.options.classes[c]&&e&&e.length&&(d=a(e.get()),this._removeClass(e,c),d.addClass(this._classes({element:d,keys:c,classes:b,add:!0})))},_setOptionDisabled:function(a){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!a),a&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(b){function c(c,f){var g,h;for(h=0;h<c.length;h++)g=e.classesElementLookup[c[h]]||a(),g=a(b.add?a.unique(g.get().concat(b.element.get())):g.not(b.element).get()),e.classesElementLookup[c[h]]=g,d.push(c[h]),f&&b.classes[c[h]]&&d.push(b.classes[c[h]])}var d=[],e=this;return b=a.extend({element:this.element,classes:this.options.classes||{}},b),this._on(b.element,{remove:"_untrackClassesElement"}),b.keys&&c(b.keys.match(/\S+/g)||[],!0),b.extra&&c(b.extra.match(/\S+/g)||[]),d.join(" ")},_untrackClassesElement:function(b){var c=this;a.each(c.classesElementLookup,function(d,e){a.inArray(b.target,e)!==-1&&(c.classesElementLookup[d]=a(e.not(b.target).get()))})},_removeClass:function(a,b,c){return this._toggleClass(a,b,c,!1)},_addClass:function(a,b,c){return this._toggleClass(a,b,c,!0)},_toggleClass:function(a,b,c,d){d="boolean"==typeof d?d:c;var e="string"==typeof a||null===a,f={extra:e?b:c,keys:e?a:b,element:e?this.element:a,add:d};return f.element.toggleClass(this._classes(f),d),this},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.on(j,k,h):c.on(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.off(c).off(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){this._addClass(a(b.currentTarget),null,"ui-state-hover")},mouseleave:function(b){this._removeClass(a(b.currentTarget),null,"ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){this._addClass(a(b.currentTarget),null,"ui-state-focus")},focusout:function(b){this._removeClass(a(b.currentTarget),null,"ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.widget});;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings, _, Backbone, JSON, storage) {
    var options = $.extend(drupalSettings.contextual, {
      strings: {
        open: Drupal.t('Open'),
        close: Drupal.t('Close')
      }
    });
  
    var cachedPermissionsHash = storage.getItem('Drupal.contextual.permissionsHash');
    var permissionsHash = drupalSettings.user.permissionsHash;
    if (cachedPermissionsHash !== permissionsHash) {
      if (typeof permissionsHash === 'string') {
        _.chain(storage).keys().each(function (key) {
          if (key.substring(0, 18) === 'Drupal.contextual.') {
            storage.removeItem(key);
          }
        });
      }
      storage.setItem('Drupal.contextual.permissionsHash', permissionsHash);
    }
  
    function initContextual($contextual, html) {
      var $region = $contextual.closest('.contextual-region');
      var contextual = Drupal.contextual;
  
      $contextual.html(html).addClass('contextual').prepend(Drupal.theme('contextualTrigger'));
  
      var destination = 'destination=' + Drupal.encodePath(drupalSettings.path.currentPath);
      $contextual.find('.contextual-links a').each(function () {
        var url = this.getAttribute('href');
        var glue = url.indexOf('?') === -1 ? '?' : '&';
        this.setAttribute('href', url + glue + destination);
      });
  
      var model = new contextual.StateModel({
        title: $region.find('h2').eq(0).text().trim()
      });
      var viewOptions = $.extend({ el: $contextual, model: model }, options);
      contextual.views.push({
        visual: new contextual.VisualView(viewOptions),
        aural: new contextual.AuralView(viewOptions),
        keyboard: new contextual.KeyboardView(viewOptions)
      });
      contextual.regionViews.push(new contextual.RegionView($.extend({ el: $region, model: model }, options)));
  
      contextual.collection.add(model);
  
      $(document).trigger('drupalContextualLinkAdded', {
        $el: $contextual,
        $region: $region,
        model: model
      });
  
      adjustIfNestedAndOverlapping($contextual);
    }
  
    function adjustIfNestedAndOverlapping($contextual) {
      var $contextuals = $contextual.parents('.contextual-region').eq(-1).find('.contextual');
  
      if ($contextuals.length <= 1) {
        return;
      }
  
      var firstTop = $contextuals.eq(0).offset().top;
      var secondTop = $contextuals.eq(1).offset().top;
      if (firstTop === secondTop) {
        var $nestedContextual = $contextuals.eq(1);
  
        var height = 0;
        var $trigger = $nestedContextual.find('.trigger');
  
        $trigger.removeClass('visually-hidden');
        height = $nestedContextual.height();
        $trigger.addClass('visually-hidden');
  
        $nestedContextual.css({ top: $nestedContextual.position().top + height });
      }
    }
  
    Drupal.behaviors.contextual = {
      attach: function attach(context) {
        var $context = $(context);
  
        var $placeholders = $context.find('[data-contextual-id]').once('contextual-render');
        if ($placeholders.length === 0) {
          return;
        }
  
        var ids = [];
        $placeholders.each(function () {
          ids.push($(this).attr('data-contextual-id'));
        });
  
        var uncachedIDs = _.filter(ids, function (contextualID) {
          var html = storage.getItem('Drupal.contextual.' + contextualID);
          if (html && html.length) {
            window.setTimeout(function () {
              initContextual($context.find('[data-contextual-id="' + contextualID + '"]'), html);
            });
            return false;
          }
          return true;
        });
  
        if (uncachedIDs.length > 0) {
          $.ajax({
            url: Drupal.url('contextual/render'),
            type: 'POST',
            data: { 'ids[]': uncachedIDs },
            dataType: 'json',
            success: function success(results) {
              _.each(results, function (html, contextualID) {
                storage.setItem('Drupal.contextual.' + contextualID, html);
  
                if (html.length > 0) {
                  $placeholders = $context.find('[data-contextual-id="' + contextualID + '"]');
  
                  for (var i = 0; i < $placeholders.length; i++) {
                    initContextual($placeholders.eq(i), html);
                  }
                }
              });
            }
          });
        }
      }
    };
  
    Drupal.contextual = {
      views: [],
  
      regionViews: []
    };
  
    Drupal.contextual.collection = new Backbone.Collection([], { model: Drupal.contextual.StateModel });
  
    Drupal.theme.contextualTrigger = function () {
      return '<button class="trigger visually-hidden focusable" type="button"></button>';
    };
  
    $(document).on('drupalContextualLinkAdded', function (event, data) {
      Drupal.ajax.bindAjaxLinks(data.$el[0]);
    });
  })(jQuery, Drupal, drupalSettings, _, Backbone, window.JSON, window.sessionStorage);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, Backbone) {
    Drupal.contextual.StateModel = Backbone.Model.extend({
      defaults: {
        title: '',
  
        regionIsHovered: false,
  
        hasFocus: false,
  
        isOpen: false,
  
        isLocked: false
      },
  
      toggleOpen: function toggleOpen() {
        var newIsOpen = !this.get('isOpen');
        this.set('isOpen', newIsOpen);
        if (newIsOpen) {
          this.focus();
        }
        return this;
      },
      close: function close() {
        this.set('isOpen', false);
        return this;
      },
      focus: function focus() {
        this.set('hasFocus', true);
        var cid = this.cid;
        this.collection.each(function (model) {
          if (model.cid !== cid) {
            model.close().blur();
          }
        });
        return this;
      },
      blur: function blur() {
        if (!this.get('isOpen')) {
          this.set('hasFocus', false);
        }
        return this;
      }
    });
  })(Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, Backbone) {
    Drupal.contextual.AuralView = Backbone.View.extend({
      initialize: function initialize(options) {
        this.options = options;
  
        this.listenTo(this.model, 'change', this.render);
  
        this.$el.attr('role', 'form');
  
        this.render();
      },
      render: function render() {
        var isOpen = this.model.get('isOpen');
  
        this.$el.find('.contextual-links').prop('hidden', !isOpen);
  
        this.$el.find('.trigger').text(Drupal.t('@action @title configuration options', {
          '@action': !isOpen ? this.options.strings.open : this.options.strings.close,
          '@title': this.model.get('title')
        })).attr('aria-pressed', isOpen);
      }
    });
  })(Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, Backbone) {
    Drupal.contextual.KeyboardView = Backbone.View.extend({
      events: {
        'focus .trigger': 'focus',
        'focus .contextual-links a': 'focus',
        'blur .trigger': function blurTrigger() {
          this.model.blur();
        },
        'blur .contextual-links a': function blurContextualLinksA() {
          var that = this;
          this.timer = window.setTimeout(function () {
            that.model.close().blur();
          }, 150);
        }
      },
  
      initialize: function initialize() {
        this.timer = NaN;
      },
      focus: function focus() {
        window.clearTimeout(this.timer);
        this.model.focus();
      }
    });
  })(Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, Backbone, Modernizr) {
    Drupal.contextual.RegionView = Backbone.View.extend({
      events: function events() {
        var mapping = {
          mouseenter: function mouseenter() {
            this.model.set('regionIsHovered', true);
          },
          mouseleave: function mouseleave() {
            this.model.close().blur().set('regionIsHovered', false);
          }
        };
  
        if (Modernizr.touchevents) {
          mapping = {};
        }
        return mapping;
      },
      initialize: function initialize() {
        this.listenTo(this.model, 'change:hasFocus', this.render);
      },
      render: function render() {
        this.$el.toggleClass('focus', this.model.get('hasFocus'));
  
        return this;
      }
    });
  })(Drupal, Backbone, Modernizr);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, Backbone, Modernizr) {
    Drupal.contextual.VisualView = Backbone.View.extend({
      events: function events() {
        var touchEndToClick = function touchEndToClick(event) {
          event.preventDefault();
          event.target.click();
        };
        var mapping = {
          'click .trigger': function clickTrigger() {
            this.model.toggleOpen();
          },
          'touchend .trigger': touchEndToClick,
          'click .contextual-links a': function clickContextualLinksA() {
            this.model.close().blur();
          },
          'touchend .contextual-links a': touchEndToClick
        };
  
        if (!Modernizr.touchevents) {
          mapping.mouseenter = function () {
            this.model.focus();
          };
        }
        return mapping;
      },
      initialize: function initialize() {
        this.listenTo(this.model, 'change', this.render);
      },
      render: function render() {
        var isOpen = this.model.get('isOpen');
  
        var isVisible = this.model.get('isLocked') || this.model.get('regionIsHovered') || isOpen;
  
        this.$el.toggleClass('open', isOpen).find('.trigger').toggleClass('visually-hidden', !isVisible);
  
        if ('isOpen' in this.model.changed) {
          this.$el.closest('.contextual-region').find('.contextual .trigger:not(:first)').toggle(!isOpen);
        }
  
        return this;
      }
    });
  })(Drupal, Backbone, Modernizr);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.theme.progressBar = function (id) {
      return '<div id="' + id + '" class="progress" aria-live="polite">' + '<div class="progress__label">&nbsp;</div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description">&nbsp;</div>' + '</div>';
    };
  
    Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) {
      this.id = id;
      this.method = method || 'GET';
      this.updateCallback = updateCallback;
      this.errorCallback = errorCallback;
  
      this.element = $(Drupal.theme('progressBar', id));
    };
  
    $.extend(Drupal.ProgressBar.prototype, {
      setProgress: function setProgress(percentage, message, label) {
        if (percentage >= 0 && percentage <= 100) {
          $(this.element).find('div.progress__bar').css('width', percentage + '%');
          $(this.element).find('div.progress__percentage').html(percentage + '%');
        }
        $('div.progress__description', this.element).html(message);
        $('div.progress__label', this.element).html(label);
        if (this.updateCallback) {
          this.updateCallback(percentage, message, this);
        }
      },
      startMonitoring: function startMonitoring(uri, delay) {
        this.delay = delay;
        this.uri = uri;
        this.sendPing();
      },
      stopMonitoring: function stopMonitoring() {
        clearTimeout(this.timer);
  
        this.uri = null;
      },
      sendPing: function sendPing() {
        if (this.timer) {
          clearTimeout(this.timer);
        }
        if (this.uri) {
          var pb = this;
  
          var uri = this.uri;
          if (uri.indexOf('?') === -1) {
            uri += '?';
          } else {
            uri += '&';
          }
          uri += '_format=json';
          $.ajax({
            type: this.method,
            url: uri,
            data: '',
            dataType: 'json',
            success: function success(progress) {
              if (progress.status === 0) {
                pb.displayError(progress.data);
                return;
              }
  
              pb.setProgress(progress.percentage, progress.message, progress.label);
  
              pb.timer = setTimeout(function () {
                pb.sendPing();
              }, pb.delay);
            },
            error: function error(xmlhttp) {
              var e = new Drupal.AjaxError(xmlhttp, pb.uri);
              pb.displayError('<pre>' + e.message + '</pre>');
            }
          });
        }
      },
      displayError: function displayError(string) {
        var error = $('<div class="messages messages--error"></div>').html(string);
        $(this.element).before(error).hide();
  
        if (this.errorCallback) {
          this.errorCallback(this);
        }
      }
    });
  })(jQuery, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
  
  (function ($, window, Drupal, drupalSettings) {
    Drupal.behaviors.AJAX = {
      attach: function attach(context, settings) {
        function loadAjaxBehavior(base) {
          var elementSettings = settings.ajax[base];
          if (typeof elementSettings.selector === 'undefined') {
            elementSettings.selector = '#' + base;
          }
          $(elementSettings.selector).once('drupal-ajax').each(function () {
            elementSettings.element = this;
            elementSettings.base = base;
            Drupal.ajax(elementSettings);
          });
        }
  
        Object.keys(settings.ajax || {}).forEach(function (base) {
          return loadAjaxBehavior(base);
        });
  
        Drupal.ajax.bindAjaxLinks(document.body);
  
        $('.use-ajax-submit').once('ajax').each(function () {
          var elementSettings = {};
  
          elementSettings.url = $(this.form).attr('action');
  
          elementSettings.setClick = true;
  
          elementSettings.event = 'click';
  
          elementSettings.progress = { type: 'throbber' };
          elementSettings.base = $(this).attr('id');
          elementSettings.element = this;
  
          Drupal.ajax(elementSettings);
        });
      },
      detach: function detach(context, settings, trigger) {
        if (trigger === 'unload') {
          Drupal.ajax.expired().forEach(function (instance) {
            Drupal.ajax.instances[instance.instanceIndex] = null;
          });
        }
      }
    };
  
    Drupal.AjaxError = function (xmlhttp, uri, customMessage) {
      var statusCode = void 0;
      var statusText = void 0;
      var responseText = void 0;
      if (xmlhttp.status) {
        statusCode = '\n' + Drupal.t('An AJAX HTTP error occurred.') + '\n' + Drupal.t('HTTP Result Code: !status', { '!status': xmlhttp.status });
      } else {
        statusCode = '\n' + Drupal.t('An AJAX HTTP request terminated abnormally.');
      }
      statusCode += '\n' + Drupal.t('Debugging information follows.');
      var pathText = '\n' + Drupal.t('Path: !uri', { '!uri': uri });
      statusText = '';
  
      try {
        statusText = '\n' + Drupal.t('StatusText: !statusText', { '!statusText': $.trim(xmlhttp.statusText) });
      } catch (e) {}
  
      responseText = '';
  
      try {
        responseText = '\n' + Drupal.t('ResponseText: !responseText', { '!responseText': $.trim(xmlhttp.responseText) });
      } catch (e) {}
  
      responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, '');
      responseText = responseText.replace(/[\n]+\s+/g, '\n');
  
      var readyStateText = xmlhttp.status === 0 ? '\n' + Drupal.t('ReadyState: !readyState', { '!readyState': xmlhttp.readyState }) : '';
  
      customMessage = customMessage ? '\n' + Drupal.t('CustomMessage: !customMessage', { '!customMessage': customMessage }) : '';
  
      this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
  
      this.name = 'AjaxError';
    };
  
    Drupal.AjaxError.prototype = new Error();
    Drupal.AjaxError.prototype.constructor = Drupal.AjaxError;
  
    Drupal.ajax = function (settings) {
      if (arguments.length !== 1) {
        throw new Error('Drupal.ajax() function must be called with one configuration object only');
      }
  
      var base = settings.base || false;
      var element = settings.element || false;
      delete settings.base;
      delete settings.element;
  
      if (!settings.progress && !element) {
        settings.progress = false;
      }
  
      var ajax = new Drupal.Ajax(base, element, settings);
      ajax.instanceIndex = Drupal.ajax.instances.length;
      Drupal.ajax.instances.push(ajax);
  
      return ajax;
    };
  
    Drupal.ajax.instances = [];
  
    Drupal.ajax.expired = function () {
      return Drupal.ajax.instances.filter(function (instance) {
        return instance && instance.element !== false && !document.body.contains(instance.element);
      });
    };
  
    Drupal.ajax.bindAjaxLinks = function (element) {
      $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) {
        var $linkElement = $(ajaxLink);
  
        var elementSettings = {
          progress: { type: 'throbber' },
          dialogType: $linkElement.data('dialog-type'),
          dialog: $linkElement.data('dialog-options'),
          dialogRenderer: $linkElement.data('dialog-renderer'),
          base: $linkElement.attr('id'),
          element: ajaxLink
        };
        var href = $linkElement.attr('href');
  
        if (href) {
          elementSettings.url = href;
          elementSettings.event = 'click';
        }
        Drupal.ajax(elementSettings);
      });
    };
  
    Drupal.Ajax = function (base, element, elementSettings) {
      var defaults = {
        event: element ? 'mousedown' : null,
        keypress: true,
        selector: base ? '#' + base : null,
        effect: 'none',
        speed: 'none',
        method: 'replaceWith',
        progress: {
          type: 'throbber',
          message: Drupal.t('Please wait...')
        },
        submit: {
          js: true
        }
      };
  
      $.extend(this, defaults, elementSettings);
  
      this.commands = new Drupal.AjaxCommands();
  
      this.instanceIndex = false;
  
      if (this.wrapper) {
        this.wrapper = '#' + this.wrapper;
      }
  
      this.element = element;
  
      this.element_settings = elementSettings;
  
      this.elementSettings = elementSettings;
  
      if (this.element && this.element.form) {
        this.$form = $(this.element.form);
      }
  
      if (!this.url) {
        var $element = $(this.element);
        if ($element.is('a')) {
          this.url = $element.attr('href');
        } else if (this.element && element.form) {
          this.url = this.$form.attr('action');
        }
      }
  
      var originalUrl = this.url;
  
      this.url = this.url.replace(/\/nojs(\/|$|\?|#)/g, '/ajax$1');
  
      if (drupalSettings.ajaxTrustedUrl[originalUrl]) {
        drupalSettings.ajaxTrustedUrl[this.url] = true;
      }
  
      var ajax = this;
  
      ajax.options = {
        url: ajax.url,
        data: ajax.submit,
        beforeSerialize: function beforeSerialize(elementSettings, options) {
          return ajax.beforeSerialize(elementSettings, options);
        },
        beforeSubmit: function beforeSubmit(formValues, elementSettings, options) {
          ajax.ajaxing = true;
          return ajax.beforeSubmit(formValues, elementSettings, options);
        },
        beforeSend: function beforeSend(xmlhttprequest, options) {
          ajax.ajaxing = true;
          return ajax.beforeSend(xmlhttprequest, options);
        },
        success: function success(response, status, xmlhttprequest) {
          if (typeof response === 'string') {
            response = $.parseJSON(response);
          }
  
          if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) {
            if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
              var customMessage = Drupal.t('The response failed verification so will not be processed.');
              return ajax.error(xmlhttprequest, ajax.url, customMessage);
            }
          }
  
          return ajax.success(response, status);
        },
        complete: function complete(xmlhttprequest, status) {
          ajax.ajaxing = false;
          if (status === 'error' || status === 'parsererror') {
            return ajax.error(xmlhttprequest, ajax.url);
          }
        },
  
        dataType: 'json',
        type: 'POST'
      };
  
      if (elementSettings.dialog) {
        ajax.options.data.dialogOptions = elementSettings.dialog;
      }
  
      if (ajax.options.url.indexOf('?') === -1) {
        ajax.options.url += '?';
      } else {
        ajax.options.url += '&';
      }
  
      var wrapper = 'drupal_' + (elementSettings.dialogType || 'ajax');
      if (elementSettings.dialogRenderer) {
        wrapper += '.' + elementSettings.dialogRenderer;
      }
      ajax.options.url += Drupal.ajax.WRAPPER_FORMAT + '=' + wrapper;
  
      $(ajax.element).on(elementSettings.event, function (event) {
        if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) {
          throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', { '!url': ajax.url }));
        }
        return ajax.eventResponse(this, event);
      });
  
      if (elementSettings.keypress) {
        $(ajax.element).on('keypress', function (event) {
          return ajax.keypressResponse(this, event);
        });
      }
  
      if (elementSettings.prevent) {
        $(ajax.element).on(elementSettings.prevent, false);
      }
    };
  
    Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format';
  
    Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax';
  
    Drupal.Ajax.prototype.execute = function () {
      if (this.ajaxing) {
        return;
      }
  
      try {
        this.beforeSerialize(this.element, this.options);
  
        return $.ajax(this.options);
      } catch (e) {
        this.ajaxing = false;
        window.alert('An error occurred while attempting to process ' + this.options.url + ': ' + e.message);
  
        return $.Deferred().reject();
      }
    };
  
    Drupal.Ajax.prototype.keypressResponse = function (element, event) {
      var ajax = this;
  
      if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') {
        event.preventDefault();
        event.stopPropagation();
        $(element).trigger(ajax.elementSettings.event);
      }
    };
  
    Drupal.Ajax.prototype.eventResponse = function (element, event) {
      event.preventDefault();
      event.stopPropagation();
  
      var ajax = this;
  
      if (ajax.ajaxing) {
        return;
      }
  
      try {
        if (ajax.$form) {
          if (ajax.setClick) {
            element.form.clk = element;
          }
  
          ajax.$form.ajaxSubmit(ajax.options);
        } else {
          ajax.beforeSerialize(ajax.element, ajax.options);
          $.ajax(ajax.options);
        }
      } catch (e) {
        ajax.ajaxing = false;
        window.alert('An error occurred while attempting to process ' + ajax.options.url + ': ' + e.message);
      }
    };
  
    Drupal.Ajax.prototype.beforeSerialize = function (element, options) {
      if (this.$form) {
        var settings = this.settings || drupalSettings;
        Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize');
      }
  
      options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1;
  
      var pageState = drupalSettings.ajaxPageState;
      options.data['ajax_page_state[theme]'] = pageState.theme;
      options.data['ajax_page_state[theme_token]'] = pageState.theme_token;
      options.data['ajax_page_state[libraries]'] = pageState.libraries;
    };
  
    Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {};
  
    Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) {
      if (this.$form) {
        options.extraData = options.extraData || {};
  
        options.extraData.ajax_iframe_upload = '1';
  
        var v = $.fieldValue(this.element);
        if (v !== null) {
          options.extraData[this.element.name] = v;
        }
      }
  
      $(this.element).prop('disabled', true);
  
      if (!this.progress || !this.progress.type) {
        return;
      }
  
      var progressIndicatorMethod = 'setProgressIndicator' + this.progress.type.slice(0, 1).toUpperCase() + this.progress.type.slice(1).toLowerCase();
      if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') {
        this[progressIndicatorMethod].call(this);
      }
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorBar = function () {
      var progressBar = new Drupal.ProgressBar('ajax-progress-' + this.element.id, $.noop, this.progress.method, $.noop);
      if (this.progress.message) {
        progressBar.setProgress(-1, this.progress.message);
      }
      if (this.progress.url) {
        progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
      }
      this.progress.element = $(progressBar.element).addClass('ajax-progress ajax-progress-bar');
      this.progress.object = progressBar;
      $(this.element).after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
      this.progress.element = $('<div class="ajax-progress ajax-progress-throbber"><div class="throbber">&nbsp;</div></div>');
      if (this.progress.message) {
        this.progress.element.find('.throbber').after('<div class="message">' + this.progress.message + '</div>');
      }
      $(this.element).after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () {
      this.progress.element = $('<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</div>');
      $('body').after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.success = function (response, status) {
      var _this = this;
  
      if (this.progress.element) {
        $(this.progress.element).remove();
      }
      if (this.progress.object) {
        this.progress.object.stopMonitoring();
      }
      $(this.element).prop('disabled', false);
  
      var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
  
      var focusChanged = false;
      Object.keys(response || {}).forEach(function (i) {
        if (response[i].command && _this.commands[response[i].command]) {
          _this.commands[response[i].command](_this, response[i], status);
          if (response[i].command === 'invoke' && response[i].method === 'focus') {
            focusChanged = true;
          }
        }
      });
  
      if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
        var target = false;
  
        for (var n = elementParents.length - 1; !target && n > 0; n--) {
          target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]');
        }
  
        if (target) {
          $(target).trigger('focus');
        }
      }
  
      if (this.$form) {
        var settings = this.settings || drupalSettings;
        Drupal.attachBehaviors(this.$form.get(0), settings);
      }
  
      this.settings = null;
    };
  
    Drupal.Ajax.prototype.getEffect = function (response) {
      var type = response.effect || this.effect;
      var speed = response.speed || this.speed;
  
      var effect = {};
      if (type === 'none') {
        effect.showEffect = 'show';
        effect.hideEffect = 'hide';
        effect.showSpeed = '';
      } else if (type === 'fade') {
        effect.showEffect = 'fadeIn';
        effect.hideEffect = 'fadeOut';
        effect.showSpeed = speed;
      } else {
        effect.showEffect = type + 'Toggle';
        effect.hideEffect = type + 'Toggle';
        effect.showSpeed = speed;
      }
  
      return effect;
    };
  
    Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
      if (this.progress.element) {
        $(this.progress.element).remove();
      }
      if (this.progress.object) {
        this.progress.object.stopMonitoring();
      }
  
      $(this.wrapper).show();
  
      $(this.element).prop('disabled', false);
  
      if (this.$form) {
        var settings = this.settings || drupalSettings;
        Drupal.attachBehaviors(this.$form.get(0), settings);
      }
      throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage);
    };
  
    Drupal.AjaxCommands = function () {};
    Drupal.AjaxCommands.prototype = {
      insert: function insert(ajax, response, status) {
        var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
        var method = response.method || ajax.method;
        var effect = ajax.getEffect(response);
        var settings = void 0;
  
        var $newContentWrapped = $('<div></div>').html(response.data);
        var $newContent = $newContentWrapped.contents();
  
        if ($newContent.length !== 1 || $newContent.get(0).nodeType !== 1) {
          $newContent = $newContentWrapped;
        }
  
        switch (method) {
          case 'html':
          case 'replaceWith':
          case 'replaceAll':
          case 'empty':
          case 'remove':
            settings = response.settings || ajax.settings || drupalSettings;
            Drupal.detachBehaviors($wrapper.get(0), settings);
        }
  
        $wrapper[method]($newContent);
  
        if (effect.showEffect !== 'show') {
          $newContent.hide();
        }
  
        if ($newContent.find('.ajax-new-content').length > 0) {
          $newContent.find('.ajax-new-content').hide();
          $newContent.show();
          $newContent.find('.ajax-new-content')[effect.showEffect](effect.showSpeed);
        } else if (effect.showEffect !== 'show') {
          $newContent[effect.showEffect](effect.showSpeed);
        }
  
        if ($newContent.parents('html').length > 0) {
          settings = response.settings || ajax.settings || drupalSettings;
          Drupal.attachBehaviors($newContent.get(0), settings);
        }
      },
      remove: function remove(ajax, response, status) {
        var settings = response.settings || ajax.settings || drupalSettings;
        $(response.selector).each(function () {
          Drupal.detachBehaviors(this, settings);
        }).remove();
      },
      changed: function changed(ajax, response, status) {
        var $element = $(response.selector);
        if (!$element.hasClass('ajax-changed')) {
          $element.addClass('ajax-changed');
          if (response.asterisk) {
            $element.find(response.asterisk).append(' <abbr class="ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr> ');
          }
        }
      },
      alert: function alert(ajax, response, status) {
        window.alert(response.text, response.title);
      },
      redirect: function redirect(ajax, response, status) {
        window.location = response.url;
      },
      css: function css(ajax, response, status) {
        $(response.selector).css(response.argument);
      },
      settings: function settings(ajax, response, status) {
        var ajaxSettings = drupalSettings.ajax;
  
        if (ajaxSettings) {
          Drupal.ajax.expired().forEach(function (instance) {
  
            if (instance.selector) {
              var selector = instance.selector.replace('#', '');
              if (selector in ajaxSettings) {
                delete ajaxSettings[selector];
              }
            }
          });
        }
  
        if (response.merge) {
          $.extend(true, drupalSettings, response.settings);
        } else {
          ajax.settings = response.settings;
        }
      },
      data: function data(ajax, response, status) {
        $(response.selector).data(response.name, response.value);
      },
      invoke: function invoke(ajax, response, status) {
        var $element = $(response.selector);
        $element[response.method].apply($element, _toConsumableArray(response.args));
      },
      restripe: function restripe(ajax, response, status) {
        $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
      },
      update_build_id: function update_build_id(ajax, response, status) {
        $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new);
      },
      add_css: function add_css(ajax, response, status) {
        $('head').prepend(response.data);
  
        var match = void 0;
        var importMatch = /^@import url\("(.*)"\);$/igm;
        if (document.styleSheets[0].addImport && importMatch.test(response.data)) {
          importMatch.lastIndex = 0;
          do {
            match = importMatch.exec(response.data);
            document.styleSheets[0].addImport(match[1]);
          } while (match);
        }
      }
    };
  })(jQuery, window, Drupal, drupalSettings);;
  /*!
   * jQuery Form Plugin
   * version: 3.51.0-2014.06.20
   * Requires jQuery v1.5 or later
   * Copyright (c) 2014 M. Alsup
   * Examples and documentation at: http://malsup.com/jquery/form/
   * Project repository: https://github.com/malsup/form
   * Dual licensed under the MIT and GPL licenses.
   * https://github.com/malsup/form#copyright-and-license
   */
  !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("<input type='file'/>").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;i<a.length;i++)n.append(a[i].name,a[i].value);if(t.extraData){var o=r(t.extraData);for(i=0;i<o.length;i++)o[i]&&n.append(o[i][0],o[i][1])}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(a/n*100)),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var c=s.beforeSend;return s.beforeSend=function(e,r){r.data=t.formData?t.formData:n,c&&c.call(this,e,r)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(k),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action"),o="multipart/form-data",c=f.attr("enctype")||f.attr("encoding")||o;w.setAttribute("target",p),(!u||/post/i.test(u))&&w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(D)},m.timeout));var l=[];try{if(m.extraData)for(var d in m.extraData)m.extraData.hasOwnProperty(d)&&l.push(e.isPlainObject(m.extraData[d])&&m.extraData[d].hasOwnProperty("name")&&m.extraData[d].hasOwnProperty("value")?e('<input type="hidden" name="'+m.extraData[d].name+'">').val(m.extraData[d].value).appendTo(w)[0]:e('<input type="hidden" name="'+d+'">').val(m.extraData[d]).appendTo(w)[0]);m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(h){var x=document.createElement("form").submit;x.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",c),r?w.setAttribute("target",r):f.removeAttr("target"),e(l).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t==k&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(y){i="parsererror",x.error=r=y||i}}catch(y){a("error caught: ",y),i="error",x.error=r=y||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,y,b,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;l<h.length;l++)c=e(h[l]),i?c.prop("disabled",!1):c.removeAttr("disabled");if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,p="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),b=v.attr2("name"),b?p=b:v.attr2("name",p)):(v=e('<iframe name="'+p+'" src="'+m.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;y=w.clk,y&&(b=y.name,b&&!y.disabled&&(m.extraData=m.extraData||{},m.extraData[b]=y.value,"image"==y.type&&(m.extraData[b+".x"]=w.clk_x,m.extraData[b+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var y=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(y,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var b=t.error;t.error=function(e,r,a){var n=t.context||this;b.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;E<h.length;E++)h[E]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n){if(n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!e.isReady&&i.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(i.s,i.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,t).bind("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r){var a=[];if(0===this.length)return a;var i,o=this[0],s=this.attr("id"),u=t?o.getElementsByTagName("*"):o.elements;if(u&&!/MSIE [678]/.test(navigator.userAgent)&&(u=e(u).get()),s&&(i=e(':input[form="'+s+'"]').get(),i.length&&(u=(u||[]).concat(i))),!u||!u.length)return a;var c,l,f,m,d,p,h;for(c=0,p=u.length;p>c;c++)if(d=u[c],f=d.name,f&&!d.disabled)if(t&&o.clk&&"image"==d.type)o.clk==d&&(a.push({name:f,value:e(d).val(),type:d.type}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}));else if(m=e.fieldValue(d,!0),m&&m.constructor==Array)for(r&&r.push(d),l=0,h=m.length;h>l;l++)a.push({name:f,value:m[l]});else if(n.fileapi&&"file"==d.type){r&&r.push(d);var v=d.files;if(v.length)for(l=0;l<v.length;l++)a.push({name:f,value:v[l],type:d.type});else a.push({name:f,value:"",type:d.type})}else null!==m&&"undefined"!=typeof m&&(r&&r.push(d),a.push({name:f,value:m,type:d.type,required:d.required}));if(!t&&o.clk){var g=e(o.clk),x=g[0];f=x.name,f&&!x.disabled&&"image"==x.type&&(a.push({name:f,value:g.val()}),a.push({name:f+".x",value:o.clk_x},{name:f+".y",value:o.clk_y}))}return a},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array)for(var i=0,o=n.length;o>i;i++)r.push({name:a,value:n[i]});else null!==n&&"undefined"!=typeof n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||"undefined"==typeof o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1});
  ;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./version"],a):a(jQuery)}(function(a){return function(){function b(a,b,c){return[parseFloat(a[0])*(l.test(a[0])?b/100:1),parseFloat(a[1])*(l.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}var e,f=Math.max,g=Math.abs,h=/left|center|right/,i=/top|center|bottom/,j=/[\+\-]\d+(\.[\d]+)?%?/,k=/^\w+/,l=/%$/,m=a.fn.position;a.position={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType,f=!d&&!e;return{element:c,isWindow:d,isDocument:e,offset:f?a(b).offset():{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:c.outerWidth(),height:c.outerHeight()}}},a.fn.position=function(e){if(!e||!e.of)return m.apply(this,arguments);e=a.extend({},e);var l,n,o,p,q,r,s=a(e.of),t=a.position.getWithinInfo(e.within),u=a.position.getScrollInfo(t),v=(e.collision||"flip").split(" "),w={};return r=d(s),s[0].preventDefault&&(e.at="left top"),n=r.width,o=r.height,p=r.offset,q=a.extend({},p),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=h.test(c[0])?c.concat(["center"]):i.test(c[0])?["center"].concat(c):["center","center"]),c[0]=h.test(c[0])?c[0]:"center",c[1]=i.test(c[1])?c[1]:"center",a=j.exec(c[0]),b=j.exec(c[1]),w[this]=[a?a[0]:0,b?b[0]:0],e[this]=[k.exec(c[0])[0],k.exec(c[1])[0]]}),1===v.length&&(v[1]=v[0]),"right"===e.at[0]?q.left+=n:"center"===e.at[0]&&(q.left+=n/2),"bottom"===e.at[1]?q.top+=o:"center"===e.at[1]&&(q.top+=o/2),l=b(w.at,n,o),q.left+=l[0],q.top+=l[1],this.each(function(){var d,h,i=a(this),j=i.outerWidth(),k=i.outerHeight(),m=c(this,"marginLeft"),r=c(this,"marginTop"),x=j+m+c(this,"marginRight")+u.width,y=k+r+c(this,"marginBottom")+u.height,z=a.extend({},q),A=b(w.my,i.outerWidth(),i.outerHeight());"right"===e.my[0]?z.left-=j:"center"===e.my[0]&&(z.left-=j/2),"bottom"===e.my[1]?z.top-=k:"center"===e.my[1]&&(z.top-=k/2),z.left+=A[0],z.top+=A[1],d={marginLeft:m,marginTop:r},a.each(["left","top"],function(b,c){a.ui.position[v[b]]&&a.ui.position[v[b]][c](z,{targetWidth:n,targetHeight:o,elemWidth:j,elemHeight:k,collisionPosition:d,collisionWidth:x,collisionHeight:y,offset:[l[0]+A[0],l[1]+A[1]],my:e.my,at:e.at,within:t,elem:i})}),e.using&&(h=function(a){var b=p.left-z.left,c=b+n-j,d=p.top-z.top,h=d+o-k,l={target:{element:s,left:p.left,top:p.top,width:n,height:o},element:{element:i,left:z.left,top:z.top,width:j,height:k},horizontal:c<0?"left":b>0?"right":"center",vertical:h<0?"top":d>0?"bottom":"middle"};n<j&&g(b+c)<n&&(l.horizontal="center"),o<k&&g(d+h)<o&&(l.vertical="middle"),f(g(b),g(c))>f(g(d),g(h))?l.important="horizontal":l.important="vertical",e.using.call(this,a,l)}),i.offset(a.extend(z,{using:h}))})},a.ui.position={fit:{left:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollLeft:d.offset.left,g=d.width,h=a.left-b.collisionPosition.marginLeft,i=e-h,j=h+b.collisionWidth-g-e;b.collisionWidth>g?i>0&&j<=0?(c=a.left+i+b.collisionWidth-g-e,a.left+=i-c):j>0&&i<=0?a.left=e:i>j?a.left=e+g-b.collisionWidth:a.left=e:i>0?a.left+=i:j>0?a.left-=j:a.left=f(a.left-h,a.left)},top:function(a,b){var c,d=b.within,e=d.isWindow?d.scrollTop:d.offset.top,g=b.within.height,h=a.top-b.collisionPosition.marginTop,i=e-h,j=h+b.collisionHeight-g-e;b.collisionHeight>g?i>0&&j<=0?(c=a.top+i+b.collisionHeight-g-e,a.top+=i-c):j>0&&i<=0?a.top=e:i>j?a.top=e+g-b.collisionHeight:a.top=e:i>0?a.top+=i:j>0?a.top-=j:a.top=f(a.top-h,a.top)}},flip:{left:function(a,b){var c,d,e=b.within,f=e.offset.left+e.scrollLeft,h=e.width,i=e.isWindow?e.scrollLeft:e.offset.left,j=a.left-b.collisionPosition.marginLeft,k=j-i,l=j+b.collisionWidth-h-i,m="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,n="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,o=-2*b.offset[0];k<0?(c=a.left+m+n+o+b.collisionWidth-h-f,(c<0||c<g(k))&&(a.left+=m+n+o)):l>0&&(d=a.left-b.collisionPosition.marginLeft+m+n+o-i,(d>0||g(d)<l)&&(a.left+=m+n+o))},top:function(a,b){var c,d,e=b.within,f=e.offset.top+e.scrollTop,h=e.height,i=e.isWindow?e.scrollTop:e.offset.top,j=a.top-b.collisionPosition.marginTop,k=j-i,l=j+b.collisionHeight-h-i,m="top"===b.my[1],n=m?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,o="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,p=-2*b.offset[1];k<0?(d=a.top+n+o+p+b.collisionHeight-h-f,(d<0||d<g(k))&&(a.top+=n+o+p)):l>0&&(c=a.top-b.collisionPosition.marginTop+n+o+p-i,(c>0||g(c)<l)&&(a.top+=n+o+p))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}}}(),a.ui.position});;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  Drupal.debounce = function (func, wait, immediate) {
    var timeout = void 0;
    var result = void 0;
    return function () {
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      var context = this;
      var later = function later() {
        timeout = null;
        if (!immediate) {
          result = func.apply(context, args);
        }
      };
      var callNow = immediate && !timeout;
      clearTimeout(timeout);
      timeout = setTimeout(later, wait);
      if (callNow) {
        result = func.apply(context, args);
      }
      return result;
    };
  };;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, debounce) {
    var offsets = {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    };
  
    Drupal.behaviors.drupalDisplace = {
      attach: function attach() {
        if (this.displaceProcessed) {
          return;
        }
        this.displaceProcessed = true;
  
        $(window).on('resize.drupalDisplace', debounce(displace, 200));
      }
    };
  
    function displace(broadcast) {
      offsets = calculateOffsets();
      Drupal.displace.offsets = offsets;
      if (typeof broadcast === 'undefined' || broadcast) {
        $(document).trigger('drupalViewportOffsetChange', offsets);
      }
      return offsets;
    }
  
    function calculateOffsets() {
      return {
        top: calculateOffset('top'),
        right: calculateOffset('right'),
        bottom: calculateOffset('bottom'),
        left: calculateOffset('left')
      };
    }
  
    function calculateOffset(edge) {
      var edgeOffset = 0;
      var displacingElements = document.querySelectorAll('[data-offset-' + edge + ']');
      var n = displacingElements.length;
      for (var i = 0; i < n; i++) {
        var el = displacingElements[i];
  
        if (el.style.display === 'none') {
          continue;
        }
  
        var displacement = parseInt(el.getAttribute('data-offset-' + edge), 10);
  
        if (isNaN(displacement)) {
          displacement = getRawOffset(el, edge);
        }
  
        edgeOffset = Math.max(edgeOffset, displacement);
      }
  
      return edgeOffset;
    }
  
    function getRawOffset(el, edge) {
      var $el = $(el);
      var documentElement = document.documentElement;
      var displacement = 0;
      var horizontal = edge === 'left' || edge === 'right';
  
      var placement = $el.offset()[horizontal ? 'left' : 'top'];
  
      placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal ? 'Left' : 'Top')] || 0;
  
      switch (edge) {
        case 'top':
          displacement = placement + $el.outerHeight();
          break;
  
        case 'left':
          displacement = placement + $el.outerWidth();
          break;
  
        case 'bottom':
          displacement = documentElement.clientHeight - placement;
          break;
  
        case 'right':
          displacement = documentElement.clientWidth - placement;
          break;
  
        default:
          displacement = 0;
      }
      return displacement;
    }
  
    Drupal.displace = displace;
    $.extend(Drupal.displace, {
      offsets: offsets,
  
      calculateOffset: calculateOffset
    });
  })(jQuery, Drupal, Drupal.debounce);;
  /*! jquery.cookie v1.4.1 | MIT */
  !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, debounce) {
    $.fn.drupalGetSummary = function () {
      var callback = this.data('summaryCallback');
      return this[0] && callback ? $.trim(callback(this[0])) : '';
    };
  
    $.fn.drupalSetSummary = function (callback) {
      var self = this;
  
      if (typeof callback !== 'function') {
        var val = callback;
        callback = function callback() {
          return val;
        };
      }
  
      return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () {
        self.trigger('summaryUpdated');
      }).trigger('summaryUpdated');
    };
  
    Drupal.behaviors.formSingleSubmit = {
      attach: function attach() {
        function onFormSubmit(e) {
          var $form = $(e.currentTarget);
          var formValues = $form.serialize();
          var previousValues = $form.attr('data-drupal-form-submit-last');
          if (previousValues === formValues) {
            e.preventDefault();
          } else {
            $form.attr('data-drupal-form-submit-last', formValues);
          }
        }
  
        $('body').once('form-single-submit').on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit);
      }
    };
  
    function triggerFormUpdated(element) {
      $(element).trigger('formUpdated');
    }
  
    function fieldsList(form) {
      var $fieldList = $(form).find('[name]').map(function (index, element) {
        return element.getAttribute('id');
      });
  
      return $.makeArray($fieldList);
    }
  
    Drupal.behaviors.formUpdated = {
      attach: function attach(context) {
        var $context = $(context);
        var contextIsForm = $context.is('form');
        var $forms = (contextIsForm ? $context : $context.find('form')).once('form-updated');
        var formFields = void 0;
  
        if ($forms.length) {
          $.makeArray($forms).forEach(function (form) {
            var events = 'change.formUpdated input.formUpdated ';
            var eventHandler = debounce(function (event) {
              triggerFormUpdated(event.target);
            }, 300);
            formFields = fieldsList(form).join(',');
  
            form.setAttribute('data-drupal-form-fields', formFields);
            $(form).on(events, eventHandler);
          });
        }
  
        if (contextIsForm) {
          formFields = fieldsList(context).join(',');
  
          var currentFields = $(context).attr('data-drupal-form-fields');
  
          if (formFields !== currentFields) {
            triggerFormUpdated(context);
          }
        }
      },
      detach: function detach(context, settings, trigger) {
        var $context = $(context);
        var contextIsForm = $context.is('form');
        if (trigger === 'unload') {
          var $forms = (contextIsForm ? $context : $context.find('form')).removeOnce('form-updated');
          if ($forms.length) {
            $.makeArray($forms).forEach(function (form) {
              form.removeAttribute('data-drupal-form-fields');
              $(form).off('.formUpdated');
            });
          }
        }
      }
    };
  
    Drupal.behaviors.fillUserInfoFromBrowser = {
      attach: function attach(context, settings) {
        var userInfo = ['name', 'mail', 'homepage'];
        var $forms = $('[data-user-info-from-browser]').once('user-info-from-browser');
        if ($forms.length) {
          userInfo.forEach(function (info) {
            var $element = $forms.find('[name=' + info + ']');
            var browserData = localStorage.getItem('Drupal.visitor.' + info);
            var emptyOrDefault = $element.val() === '' || $element.attr('data-drupal-default-value') === $element.val();
            if ($element.length && emptyOrDefault && browserData) {
              $element.val(browserData);
            }
          });
        }
        $forms.on('submit', function () {
          userInfo.forEach(function (info) {
            var $element = $forms.find('[name=' + info + ']');
            if ($element.length) {
              localStorage.setItem('Drupal.visitor.' + info, $element.val());
            }
          });
        });
      }
    };
  
    var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) {
      var url = void 0;
      if (e.type === 'click') {
        url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget;
      } else {
        url = location;
      }
      var hash = url.hash.substr(1);
      if (hash) {
        var $target = $('#' + hash);
        $('body').trigger('formFragmentLinkClickOrHashChange', [$target]);
  
        setTimeout(function () {
          return $target.trigger('focus');
        }, 300);
      }
    };
  
    var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true);
  
    $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange);
  
    $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange);
  })(jQuery, Drupal, Drupal.debounce);;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./controlgroup","./checkboxradio","../keycode","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var a,b=this._super()||{};return this.isInput=this.element.is("input"),a=this.element[0].disabled,null!=a&&(b.disabled=a),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(b.label=this.originalLabel),b},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(b){b.keyCode===a.ui.keyCode.SPACE&&(b.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(b,c){var d="iconPosition"!==b,e=d?this.options.iconPosition:c,f="top"===e||"bottom"===e;this.icon?d&&this._removeClass(this.icon,null,this.options.icon):(this.icon=a("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),d&&this._addClass(this.icon,null,c),this._attachIcon(e),f?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=a("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(e))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(a){this.icon[/^(?:end|bottom)/.test(a)?"before":"after"](this.iconSpace)},_attachIcon:function(a){this.element[/^(?:end|bottom)/.test(a)?"append":"prepend"](this.icon)},_setOptions:function(a){var b=void 0===a.showLabel?this.options.showLabel:a.showLabel,c=void 0===a.icon?this.options.icon:a.icon;b||c||(a.showLabel=!0),this._super(a)},_setOption:function(a,b){"icon"===a&&(b?this._updateIcon(a,b):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===a&&this._updateIcon(a,b),"showLabel"===a&&(this._toggleClass("ui-button-icon-only",null,!b),this._updateTooltip()),"label"===a&&(this.isInput?this.element.val(b):(this.element.html(b),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(a,b),"disabled"===a&&(this._toggleClass(null,"ui-state-disabled",b),this.element[0].disabled=b,b&&this.element.blur())},refresh:function(){var a=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");a!==this.options.disabled&&this._setOptions({disabled:a}),this._updateTooltip()}}),a.uiBackCompat!==!1&&(a.widget("ui.button",a.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(a,b){return"text"===a?void this._super("showLabel",b):("showLabel"===a&&(this.options.text=b),"icon"===a&&(this.options.icons.primary=b),"icons"===a&&(b.primary?(this._super("icon",b.primary),this._super("iconPosition","beginning")):b.secondary&&(this._super("icon",b.secondary),this._super("iconPosition","end"))),void this._superApply(arguments))}}),a.fn.button=function(b){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?b.apply(this,arguments):(a.ui.checkboxradio||a.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(a.fn.button),a.fn.buttonset=function(){return a.ui.controlgroup||a.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),a.ui.button});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],a):a(jQuery)}(function(a){var b=!1;return a(document).on("mouseup",function(){b=!1}),a.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.on("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).on("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(c),this._mouseDownEvent=c;var d=this,e=1===c.which,f=!("string"!=typeof this.options.cancel||!c.target.nodeName)&&a(c.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(c))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=this._mouseStart(c)!==!1,!this._mouseStarted)?(c.preventDefault(),!0):(!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),c.preventDefault(),b=!0,!0))}},_mouseMove:function(b){if(this._mouseMoved){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button)return this._mouseUp(b);if(!b.which)if(b.originalEvent.altKey||b.originalEvent.ctrlKey||b.originalEvent.metaKey||b.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(b)}return(b.which||b.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(c){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,b=!1,c.preventDefault()},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../safe-active-element","../safe-blur","../scroll-parent","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.draggable",a.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(a,b){this._super(a,b),"handle"===a&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(b){var c=this.options;return!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(this._blurActiveElement(b),this._blockFrames(c.iframeFix===!0?"iframe":c.iframeFix),!0))},_blockFrames:function(b){this.iframeBlocks=this.document.find(b).map(function(){var b=a(this);return a("<div>").css("position","absolute").appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(b){var c=a.ui.safeActiveElement(this.document[0]),d=a(b.target);d.closest(c).length||a.ui.safeBlur(c)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===a(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(b),this.originalPosition=this.position=this._generatePosition(b,!1),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_refreshOffsets:function(a){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:a.pageX-this.offset.left,top:a.pageY-this.offset.top}},_mouseDrag:function(b,c){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b,!0),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp(new a.Event("mouseup",b)),!1;this.position=d.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1},_mouseUp:function(b){return this._unblockFrames(),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),this.handleElement.is(b.target)&&this.element.trigger("focus"),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new a.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper),e=d?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return e.parents("body").length||e.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d&&e[0]===this.element[0]&&this._setPositionRelative(),e[0]===this.element[0]||/(fixed|absolute)/.test(e.css("position"))||e.css("position","absolute"),e},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),c=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==c&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(b?0:this.scrollParent.scrollTop()),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(b?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options,f=this.document[0];return this.relativeContainer=null,e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(f).width()-this.helperProportions.width-this.margins.left,(a(f).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b=/(scroll|auto)/.test(c.css("overflow")),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=c))):void(this.containment=null)},_convertPositionTo:function(a,b){b||(b=this.position);var c="absolute"===a?1:-1,d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*c+this.offset.parent.top*c-("fixed"===this.cssPosition?-this.offset.scroll.top:d?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-("fixed"===this.cssPosition?-this.offset.scroll.left:d?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,d,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]),i=a.pageX,j=a.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),b&&(this.containment&&(this.relativeContainer?(d=this.relativeContainer.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,a.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),a.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),a.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),a.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f),"y"===g.axis&&(i=this.originalPageX),"x"===g.axis&&(j=this.originalPageY)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d,this],!0),/^(drag|start|stop)/.test(b)&&(this.positionAbs=this._convertPositionTo("absolute"),d.offset=this.positionAbs),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c,d){var e=a.extend({},c,{item:d.element});d.sortables=[],a(d.options.connectToSortable).each(function(){var c=a(this).sortable("instance");c&&!c.options.disabled&&(d.sortables.push(c),c.refreshPositions(),c._trigger("activate",b,e))})},stop:function(b,c,d){var e=a.extend({},c,{item:d.element});d.cancelHelperRemoval=!1,a.each(d.sortables,function(){var a=this;a.isOver?(a.isOver=0,d.cancelHelperRemoval=!0,a.cancelHelperRemoval=!1,a._storedCSS={position:a.placeholder.css("position"),top:a.placeholder.css("top"),left:a.placeholder.css("left")},a._mouseStop(b),a.options.helper=a.options._helper):(a.cancelHelperRemoval=!0,a._trigger("deactivate",b,e))})},drag:function(b,c,d){a.each(d.sortables,function(){var e=!1,f=this;f.positionAbs=d.positionAbs,f.helperProportions=d.helperProportions,f.offset.click=d.offset.click,f._intersectsWith(f.containerCache)&&(e=!0,a.each(d.sortables,function(){return this.positionAbs=d.positionAbs,this.helperProportions=d.helperProportions,this.offset.click=d.offset.click,this!==f&&this._intersectsWith(this.containerCache)&&a.contains(f.element[0],this.element[0])&&(e=!1),e})),e?(f.isOver||(f.isOver=1,d._parent=c.helper.parent(),f.currentItem=c.helper.appendTo(f.element).data("ui-sortable-item",!0),f.options._helper=f.options.helper,f.options.helper=function(){return c.helper[0]},b.target=f.currentItem[0],f._mouseCapture(b,!0),f._mouseStart(b,!0,!0),f.offset.click.top=d.offset.click.top,f.offset.click.left=d.offset.click.left,f.offset.parent.left-=d.offset.parent.left-f.offset.parent.left,f.offset.parent.top-=d.offset.parent.top-f.offset.parent.top,d._trigger("toSortable",b),d.dropped=f.element,a.each(d.sortables,function(){this.refreshPositions()}),d.currentItem=d.element,f.fromOutside=d),f.currentItem&&(f._mouseDrag(b),c.position=f.position)):f.isOver&&(f.isOver=0,f.cancelHelperRemoval=!0,f.options._revert=f.options.revert,f.options.revert=!1,f._trigger("out",b,f._uiHash(f)),f._mouseStop(b,!0),f.options.revert=f.options._revert,f.options.helper=f.options._helper,f.placeholder&&f.placeholder.remove(),c.helper.appendTo(d._parent),d._refreshOffsets(b),c.position=d._generatePosition(b,!0),d._trigger("fromSortable",b),d.dropped=!1,a.each(d.sortables,function(){this.refreshPositions()}))})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c,d){var e=a("body"),f=d.options;e.css("cursor")&&(f._cursor=e.css("cursor")),e.css("cursor",f.cursor)},stop:function(b,c,d){var e=d.options;e._cursor&&a("body").css("cursor",e._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("opacity")&&(f._opacity=e.css("opacity")),e.css("opacity",f.opacity)},stop:function(b,c,d){var e=d.options;e._opacity&&a(c.helper).css("opacity",e._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(a,b,c){c.scrollParentNotHidden||(c.scrollParentNotHidden=c.helper.scrollParent(!1)),c.scrollParentNotHidden[0]!==c.document[0]&&"HTML"!==c.scrollParentNotHidden[0].tagName&&(c.overflowOffset=c.scrollParentNotHidden.offset())},drag:function(b,c,d){var e=d.options,f=!1,g=d.scrollParentNotHidden[0],h=d.document[0];g!==h&&"HTML"!==g.tagName?(e.axis&&"x"===e.axis||(d.overflowOffset.top+g.offsetHeight-b.pageY<e.scrollSensitivity?g.scrollTop=f=g.scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(g.scrollTop=f=g.scrollTop-e.scrollSpeed)),e.axis&&"y"===e.axis||(d.overflowOffset.left+g.offsetWidth-b.pageX<e.scrollSensitivity?g.scrollLeft=f=g.scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(g.scrollLeft=f=g.scrollLeft-e.scrollSpeed))):(e.axis&&"x"===e.axis||(b.pageY-a(h).scrollTop()<e.scrollSensitivity?f=a(h).scrollTop(a(h).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(h).scrollTop())<e.scrollSensitivity&&(f=a(h).scrollTop(a(h).scrollTop()+e.scrollSpeed))),e.axis&&"y"===e.axis||(b.pageX-a(h).scrollLeft()<e.scrollSensitivity?f=a(h).scrollLeft(a(h).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(h).scrollLeft())<e.scrollSensitivity&&(f=a(h).scrollLeft(a(h).scrollLeft()+e.scrollSpeed)))),f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c,d){var e=d.options;d.snapElements=[],a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!==d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=d.options,p=o.snapTolerance,q=c.offset.left,r=q+d.helperProportions.width,s=c.offset.top,t=s+d.helperProportions.height;for(m=d.snapElements.length-1;m>=0;m--)i=d.snapElements[m].left-d.margins.left,j=i+d.snapElements[m].width,k=d.snapElements[m].top-d.margins.top,l=k+d.snapElements[m].height,r<i-p||q>j+p||t<k-p||s>l+p||!a.contains(d.snapElements[m].item.ownerDocument,d.snapElements[m].item)?(d.snapElements[m].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=!1):("inner"!==o.snapMode&&(e=Math.abs(k-t)<=p,f=Math.abs(l-s)<=p,g=Math.abs(i-r)<=p,h=Math.abs(j-q)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k-d.helperProportions.height,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i-d.helperProportions.width}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j}).left)),n=e||f||g||h,"outer"!==o.snapMode&&(e=Math.abs(k-s)<=p,f=Math.abs(l-t)<=p,g=Math.abs(i-q)<=p,h=Math.abs(j-r)<=p,e&&(c.position.top=d._convertPositionTo("relative",{top:k,left:0}).top),f&&(c.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top),g&&(c.position.left=d._convertPositionTo("relative",{top:0,left:i}).left),h&&(c.position.left=d._convertPositionTo("relative",{top:0,left:j-d.helperProportions.width}).left)),!d.snapElements[m].snapping&&(e||f||g||h||n)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item})),d.snapElements[m].snapping=e||f||g||h||n)}}),a.ui.plugin.add("draggable","stack",{start:function(b,c,d){var e,f=d.options,g=a.makeArray(a(f.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});g.length&&(e=parseInt(a(g[0]).css("zIndex"),10)||0,a(g).each(function(b){a(this).css("zIndex",e+b)}),this.css("zIndex",e+g.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c,d){var e=a(c.helper),f=d.options;e.css("zIndex")&&(f._zIndex=e.css("zIndex")),e.css("zIndex",f.zIndex)},stop:function(b,c,d){var e=d.options;e._zIndex&&a(c.helper).css("zIndex",e._zIndex)}}),a.ui.draggable});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./mouse","../disable-selection","../plugin","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.resizable",a.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseFloat(a)||0},_isNumber:function(a){return!isNaN(parseFloat(a))},_hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)},_create:function(){var b,c=this.options,d=this;this._addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,b={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(b),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(b),this._proportionallyResize()),this._setupHandles(),c.autoHide&&a(this.element).on("mouseenter",function(){c.disabled||(d._removeClass("ui-resizable-autohide"),d._handles.show())}).on("mouseleave",function(){c.disabled||d.resizing||(d._addClass("ui-resizable-autohide"),d._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_setOption:function(a,b){switch(this._super(a,b),a){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var b,c,d,e,f,g=this.options,h=this;if(this.handles=g.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=a(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),d=this.handles.split(","),this.handles={},c=0;c<d.length;c++)b=a.trim(d[c]),e="ui-resizable-"+b,f=a("<div>"),this._addClass(f,"ui-resizable-handle "+e),f.css({zIndex:g.zIndex}),this.handles[b]=".ui-resizable-"+b,this.element.append(f);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String?this.handles[c]=this.element.children(this.handles[c]).first().show():(this.handles[c].jquery||this.handles[c].nodeType)&&(this.handles[c]=a(this.handles[c]),this._on(this.handles[c],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),this._handles=this._handles.add(this.handles[c])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(f=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=f&&f[1]?f[1]:"se")}),g.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var c,d,e,f=this.options,g=this.element;return this.resizing=!0,this._renderProxy(),c=this._num(this.helper.css("left")),d=this._num(this.helper.css("top")),f.containment&&(c+=a(f.containment).scrollLeft()||0,d+=a(f.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:c,top:d},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:g.width(),height:g.height()},this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()},this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()},this.originalPosition={left:c,top:d},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof f.aspectRatio?f.aspectRatio:this.originalSize.width/this.originalSize.height||1,e=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===e?this.axis+"-resize":e),this._addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d,e=this.originalMousePosition,f=this.axis,g=b.pageX-e.left||0,h=b.pageY-e.top||0,i=this._change[f];return this._updatePrevProperties(),!!i&&(c=i.apply(this,[b,g,h]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),d=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(d)||(this._updatePrevProperties(),this._trigger("resize",b,this.ui()),this._applyChanges()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&this._hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseFloat(k.element.css("left"))+(k.position.left-k.originalPosition.left)||null,i=parseFloat(k.element.css("top"))+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};return this.position.top!==this.prevPosition.top&&(a.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(a.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(a.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(a.height=this.size.height+"px"),this.helper.css(a),a},_updateVirtualBoundaries:function(a){var b,c,d,e,f,g=this.options;f={minWidth:this._isNumber(g.minWidth)?g.minWidth:0,maxWidth:this._isNumber(g.maxWidth)?g.maxWidth:1/0,minHeight:this._isNumber(g.minHeight)?g.minHeight:0,maxHeight:this._isNumber(g.maxHeight)?g.maxHeight:1/0},(this._aspectRatio||a)&&(b=f.minHeight*this.aspectRatio,d=f.minWidth/this.aspectRatio,c=f.maxHeight*this.aspectRatio,e=f.maxWidth/this.aspectRatio,b>f.minWidth&&(f.minWidth=b),d>f.minHeight&&(f.minHeight=d),c<f.maxWidth&&(f.maxWidth=c),e<f.maxHeight&&(f.maxHeight=e)),this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset(),this._isNumber(a.left)&&(this.position.left=a.left),this._isNumber(a.top)&&(this.position.top=a.top),this._isNumber(a.height)&&(this.size.height=a.height),this._isNumber(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;return this._isNumber(a.height)?a.width=a.height*this.aspectRatio:this._isNumber(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===d&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===d&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,g=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,h=this.originalPosition.left+this.originalSize.width,i=this.originalPosition.top+this.originalSize.height,j=/sw|nw|w/.test(c),k=/nw|ne|n/.test(c);return f&&(a.width=b.minWidth),g&&(a.height=b.minHeight),d&&(a.width=b.maxWidth),e&&(a.height=b.maxHeight),f&&j&&(a.left=h-b.minWidth),d&&j&&(a.left=h-b.maxWidth),g&&k&&(a.top=i-b.minHeight),e&&k&&(a.top=i-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_getPaddingPlusBorderDimensions:function(a){for(var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];b<4;b++)c[b]=parseFloat(d[b])||0,c[b]+=parseFloat(e[b])||0;return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var a,b=0,c=this.helper||this.element;b<this._proportionallyResizeElements.length;b++)a=this._proportionallyResizeElements[b],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(a)),a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,k=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseFloat(c.element.css("width")),height:parseFloat(c.element.css("height")),top:parseFloat(c.element.css("top")),left:parseFloat(c.element.css("left"))};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;m&&(i.containerElement=a(m),/document/.test(l)||l===document?(i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(m),c=[],a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))}),i.containerOffset=b.offset(),i.containerPosition=b.position(),i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]},d=i.containerOffset,e=i.containerSize.height,f=i.containerSize.width,g=i._hasScroll(m,"left")?m.scrollWidth:f,h=i._hasScroll(m)?m.scrollHeight:e,i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}))},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=!0;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio,n=!1),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio,n=!1),g.position.top=g._helper?i.top:0),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f?(g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top):(g.offset.left=g.element.offset().left,g.offset.top=g.element.offset().top),c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left)),d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top)),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio,n=!1)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio,n=!1)),n||(g.position.left=g.prevPosition.left,g.position.top=g.prevPosition.top,g.size.width=g.prevSize.width,g.size.height=g.prevSize.height)},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).resizable("instance"),c=b.options;a(c.alsoResize).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseFloat(b.width()),height:parseFloat(b.height()),left:parseFloat(b.css("left")),top:parseFloat(b.css("top"))})})},resize:function(b,c){var d=a(this).resizable("instance"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0};a(e.alsoResize).each(function(){var b=a(this),d=a(this).data("ui-resizable-alsoresize"),e={},f=b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(f,function(a,b){var c=(d[b]||0)+(h[b]||0);c&&c>=0&&(e[b]=c||null)}),b.css(e)})},stop:function(){a(this).removeData("ui-resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).resizable("instance"),c=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}),b._addClass(b.ghost,"ui-resizable-ghost"),a.uiBackCompat!==!1&&"string"==typeof b.options.ghost&&b.ghost.addClass(this.options.ghost),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).resizable("instance");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).resizable("instance");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b,c=a(this).resizable("instance"),d=c.options,e=c.size,f=c.originalSize,g=c.originalPosition,h=c.axis,i="number"==typeof d.grid?[d.grid,d.grid]:d.grid,j=i[0]||1,k=i[1]||1,l=Math.round((e.width-f.width)/j)*j,m=Math.round((e.height-f.height)/k)*k,n=f.width+l,o=f.height+m,p=d.maxWidth&&d.maxWidth<n,q=d.maxHeight&&d.maxHeight<o,r=d.minWidth&&d.minWidth>n,s=d.minHeight&&d.minHeight>o;d.grid=i,r&&(n+=j),s&&(o+=k),p&&(n-=j),q&&(o-=k),/^(se|s|e)$/.test(h)?(c.size.width=n,c.size.height=o):/^(ne)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.top=g.top-m):/^(sw)$/.test(h)?(c.size.width=n,c.size.height=o,c.position.left=g.left-l):((o-k<=0||n-j<=0)&&(b=c._getPaddingPlusBorderDimensions(this)),o-k>0?(c.size.height=o,c.position.top=g.top-m):(o=k-b.height,c.size.height=o,c.position.top=g.top+f.height-o),n-j>0?(c.size.width=n,c.position.left=g.left-l):(n=j-b.width,c.size.width=n,c.position.left=g.left+f.width-n))}}),a.ui.resizable});;
  /*! jQuery UI - v1.12.1 - 2017-03-31
  * http://jqueryui.com
  * Copyright jQuery Foundation and other contributors; Licensed  */
  !function(a){"function"==typeof define&&define.amd?define(["jquery","./button","./draggable","./mouse","./resizable","../focusable","../keycode","../position","../safe-active-element","../safe-blur","../tabbable","../unique-id","../version","../widget"],a):a(jQuery)}(function(a){return a.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c=this;this._isOpen&&this._trigger("beforeClose",b)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||a.ui.safeBlur(a.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(b,c){var d=!1,e=this.uiDialog.siblings(".ui-front:visible").map(function(){return+a(this).css("z-index")}).get(),f=Math.max.apply(null,e);return f>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",f+1),d=!0),d&&!c&&this._trigger("focus",b),d},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(a.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var a=this._focusedElement;a||(a=this.element.find("[autofocus]")),a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).trigger("focus")},_keepFocus:function(b){function c(){var b=a.ui.safeActiveElement(this.document[0]),c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB&&!b.isDefaultPrevented()){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(this._delay(function(){e.trigger("focus")}),b.preventDefault()):(this._delay(function(){d.trigger("focus")}),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=a("<button type='button'></button>").button({label:a("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(b,"ui-dialog-title"),this._title(b),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title?a.text(this.options.title):a.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this._removeClass(this.uiDialog,"ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,f={icon:d.icon,iconPosition:d.iconPosition,showLabel:d.showLabel,icons:d.icons,text:d.text},delete d.click,delete d.icon,delete d.iconPosition,delete d.showLabel,delete d.icons,"boolean"==typeof d.text&&delete d.text,a("<button></button>",d).button(f).appendTo(b.uiButtonSet).on("click",function(){e.apply(b.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,d=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,e){c._addClass(a(this),"ui-dialog-dragging"),c._blockFrames(),c._trigger("dragStart",d,b(e))},drag:function(a,d){c._trigger("drag",a,b(d))},stop:function(e,f){var g=f.offset.left-c.document.scrollLeft(),h=f.offset.top-c.document.scrollTop();d.position={my:"left top",at:"left"+(g>=0?"+":"")+g+" top"+(h>=0?"+":"")+h,of:c.window},c._removeClass(a(this),"ui-dialog-dragging"),c._unblockFrames(),c._trigger("dragStop",e,b(f))}})},_makeResizable:function(){function b(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var c=this,d=this.options,e=d.resizable,f=this.uiDialog.css("position"),g="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:d.maxWidth,maxHeight:d.maxHeight,minWidth:d.minWidth,minHeight:this._minHeight(),handles:g,start:function(d,e){c._addClass(a(this),"ui-dialog-resizing"),c._blockFrames(),c._trigger("resizeStart",d,b(e))},resize:function(a,d){c._trigger("resize",a,b(d))},stop:function(e,f){var g=c.uiDialog.offset(),h=g.left-c.document.scrollLeft(),i=g.top-c.document.scrollTop();d.height=c.uiDialog.height(),d.width=c.uiDialog.width(),d.position={my:"left top",at:"left"+(h>=0?"+":"")+h+" top"+(i>=0?"+":"")+i,of:c.window},c._removeClass(a(this),"ui-dialog-resizing"),c._unblockFrames(),c._trigger("resizeStop",e,b(f))}}).css("position",f)},_trackFocus:function(){this._on(this.widget(),{focusin:function(b){this._makeFocusTarget(),this._focusedElement=a(b.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var b=this._trackingInstances(),c=a.inArray(this,b);c!==-1&&b.splice(c,1)},_trackingInstances:function(){var a=this.document.data("ui-dialog-instances");return a||(a=[],this.document.data("ui-dialog-instances",a)),a},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var c=this,d=!1,e={};a.each(b,function(a,b){c._setOption(a,b),a in c.sizeRelatedOptions&&(d=!0),a in c.resizableRelatedOptions&&(e[a]=b)}),d&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",e)},_setOption:function(b,c){var d,e,f=this.uiDialog;"disabled"!==b&&(this._super(b,c),"appendTo"===b&&this.uiDialog.appendTo(this._appendTo()),"buttons"===b&&this._createButtons(),"closeText"===b&&this.uiDialogTitlebarClose.button({label:a("<a>").text(""+this.options.closeText).html()}),"draggable"===b&&(d=f.is(":data(ui-draggable)"),d&&!c&&f.draggable("destroy"),!d&&c&&this._makeDraggable()),"position"===b&&this._position(),"resizable"===b&&(e=f.is(":data(ui-resizable)"),e&&!c&&f.resizable("destroy"),e&&"string"==typeof c&&f.resizable("option","handles",c),e||c===!1||this._makeResizable()),"title"===b&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return!!a(b.target).closest(".ui-dialog").length||!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=!0;this._delay(function(){b=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(a){b||this._allowInteraction(a)||(a.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=a("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var a=this.document.data("ui-dialog-overlays")-1;a?this.document.data("ui-dialog-overlays",a):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),a.uiBackCompat!==!1&&a.widget("ui.dialog",a.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(a,b){"dialogClass"===a&&this.uiDialog.removeClass(this.options.dialogClass).addClass(b),this._superApply(arguments)}}),a.ui.dialog});;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings) {
    drupalSettings.dialog = {
      autoOpen: true,
      dialogClass: '',
  
      buttonClass: 'button',
      buttonPrimaryClass: 'button--primary',
      close: function close(event) {
        Drupal.dialog(event.target).close();
        Drupal.detachBehaviors(event.target, null, 'unload');
      }
    };
  
    Drupal.dialog = function (element, options) {
      var undef = void 0;
      var $element = $(element);
      var dialog = {
        open: false,
        returnValue: undef,
        show: function show() {
          openDialog({ modal: false });
        },
        showModal: function showModal() {
          openDialog({ modal: true });
        },
  
        close: closeDialog
      };
  
      function openDialog(settings) {
        settings = $.extend({}, drupalSettings.dialog, options, settings);
  
        $(window).trigger('dialog:beforecreate', [dialog, $element, settings]);
        $element.dialog(settings);
        dialog.open = true;
        $(window).trigger('dialog:aftercreate', [dialog, $element, settings]);
      }
  
      function closeDialog(value) {
        $(window).trigger('dialog:beforeclose', [dialog, $element]);
        $element.dialog('close');
        dialog.returnValue = value;
        dialog.open = false;
        $(window).trigger('dialog:afterclose', [dialog, $element]);
      }
  
      return dialog;
    };
  })(jQuery, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings, debounce, displace) {
    drupalSettings.dialog = $.extend({ autoResize: true, maxHeight: '95%' }, drupalSettings.dialog);
  
    function resetSize(event) {
      var positionOptions = ['width', 'height', 'minWidth', 'minHeight', 'maxHeight', 'maxWidth', 'position'];
      var adjustedOptions = {};
      var windowHeight = $(window).height();
      var option = void 0;
      var optionValue = void 0;
      var adjustedValue = void 0;
      for (var n = 0; n < positionOptions.length; n++) {
        option = positionOptions[n];
        optionValue = event.data.settings[option];
        if (optionValue) {
          if (typeof optionValue === 'string' && /%$/.test(optionValue) && /height/i.test(option)) {
            windowHeight -= displace.offsets.top + displace.offsets.bottom;
            adjustedValue = parseInt(0.01 * parseInt(optionValue, 10) * windowHeight, 10);
  
            if (option === 'height' && event.data.$element.parent().outerHeight() < adjustedValue) {
              adjustedValue = 'auto';
            }
            adjustedOptions[option] = adjustedValue;
          }
        }
      }
  
      if (!event.data.settings.modal) {
        adjustedOptions = resetPosition(adjustedOptions);
      }
      event.data.$element.dialog('option', adjustedOptions).trigger('dialogContentResize');
    }
  
    function resetPosition(options) {
      var offsets = displace.offsets;
      var left = offsets.left - offsets.right;
      var top = offsets.top - offsets.bottom;
  
      var leftString = (left > 0 ? '+' : '-') + Math.abs(Math.round(left / 2)) + 'px';
      var topString = (top > 0 ? '+' : '-') + Math.abs(Math.round(top / 2)) + 'px';
      options.position = {
        my: 'center' + (left !== 0 ? leftString : '') + ' center' + (top !== 0 ? topString : ''),
        of: window
      };
      return options;
    }
  
    $(window).on({
      'dialog:aftercreate': function dialogAftercreate(event, dialog, $element, settings) {
        var autoResize = debounce(resetSize, 20);
        var eventData = { settings: settings, $element: $element };
        if (settings.autoResize === true || settings.autoResize === 'true') {
          $element.dialog('option', { resizable: false, draggable: false }).dialog('widget').css('position', 'fixed');
          $(window).on('resize.dialogResize scroll.dialogResize', eventData, autoResize).trigger('resize.dialogResize');
          $(document).on('drupalViewportOffsetChange.dialogResize', eventData, autoResize);
        }
      },
      'dialog:beforeclose': function dialogBeforeclose(event, dialog, $element) {
        $(window).off('.dialogResize');
        $(document).off('.dialogResize');
      }
    });
  })(jQuery, Drupal, drupalSettings, Drupal.debounce, Drupal.displace);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($) {
    $.widget('ui.dialog', $.ui.dialog, {
      options: {
        buttonClass: 'button',
        buttonPrimaryClass: 'button--primary'
      },
      _createButtons: function _createButtons() {
        var opts = this.options;
        var primaryIndex = void 0;
        var index = void 0;
        var il = opts.buttons.length;
        for (index = 0; index < il; index++) {
          if (opts.buttons[index].primary && opts.buttons[index].primary === true) {
            primaryIndex = index;
            delete opts.buttons[index].primary;
            break;
          }
        }
        this._super();
        var $buttons = this.uiButtonSet.children().addClass(opts.buttonClass);
        if (typeof primaryIndex !== 'undefined') {
          $buttons.eq(index).addClass(opts.buttonPrimaryClass);
        }
      }
    });
  })(jQuery);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, _, Backbone, Drupal, drupalSettings, JSON, storage) {
    var options = $.extend(drupalSettings.quickedit, {
      strings: {
        quickEdit: Drupal.t('Quick edit')
      }
    });
  
    var fieldsMetadataQueue = [];
  
    var fieldsAvailableQueue = [];
  
    var contextualLinksQueue = [];
  
    var entityInstancesTracker = {};
  
    Drupal.behaviors.quickedit = {
      attach: function attach(context) {
        $('body').once('quickedit-init').each(initQuickEdit);
  
        var $fields = $(context).find('[data-quickedit-field-id]').once('quickedit');
        if ($fields.length === 0) {
          return;
        }
  
        $(context).find('[data-quickedit-entity-id]').once('quickedit').each(function (index, entityElement) {
          processEntity(entityElement);
        });
  
        $fields.each(function (index, fieldElement) {
          processField(fieldElement);
        });
  
        contextualLinksQueue = _.filter(contextualLinksQueue, function (contextualLink) {
          return !initializeEntityContextualLink(contextualLink);
        });
  
        fetchMissingMetadata(function (fieldElementsWithFreshMetadata) {
          _.each(fieldElementsWithFreshMetadata, processField);
  
          contextualLinksQueue = _.filter(contextualLinksQueue, function (contextualLink) {
            return !initializeEntityContextualLink(contextualLink);
          });
        });
      },
      detach: function detach(context, settings, trigger) {
        if (trigger === 'unload') {
          deleteContainedModelsAndQueues($(context));
        }
      }
    };
  
    Drupal.quickedit = {
      app: null,
  
      collections: {
        entities: null,
  
        fields: null
      },
  
      editors: {},
  
      metadata: {
        has: function has(fieldID) {
          return storage.getItem(this._prefixFieldID(fieldID)) !== null;
        },
        add: function add(fieldID, metadata) {
          storage.setItem(this._prefixFieldID(fieldID), JSON.stringify(metadata));
        },
        get: function get(fieldID, key) {
          var metadata = JSON.parse(storage.getItem(this._prefixFieldID(fieldID)));
          return typeof key === 'undefined' ? metadata : metadata[key];
        },
        _prefixFieldID: function _prefixFieldID(fieldID) {
          return 'Drupal.quickedit.metadata.' + fieldID;
        },
        _unprefixFieldID: function _unprefixFieldID(fieldID) {
          return fieldID.substring(26);
        },
        intersection: function intersection(fieldIDs) {
          var prefixedFieldIDs = _.map(fieldIDs, this._prefixFieldID);
          var intersection = _.intersection(prefixedFieldIDs, _.keys(sessionStorage));
          return _.map(intersection, this._unprefixFieldID);
        }
      }
    };
  
    var permissionsHashKey = Drupal.quickedit.metadata._prefixFieldID('permissionsHash');
    var permissionsHashValue = storage.getItem(permissionsHashKey);
    var permissionsHash = drupalSettings.user.permissionsHash;
    if (permissionsHashValue !== permissionsHash) {
      if (typeof permissionsHash === 'string') {
        _.chain(storage).keys().each(function (key) {
          if (key.substring(0, 26) === 'Drupal.quickedit.metadata.') {
            storage.removeItem(key);
          }
        });
      }
      storage.setItem(permissionsHashKey, permissionsHash);
    }
  
    $(document).on('drupalContextualLinkAdded', function (event, data) {
      if (data.$region.is('[data-quickedit-entity-id]')) {
        if (!data.$region.is('[data-quickedit-entity-instance-id]')) {
          data.$region.once('quickedit');
          processEntity(data.$region.get(0));
        }
        var contextualLink = {
          entityID: data.$region.attr('data-quickedit-entity-id'),
          entityInstanceID: data.$region.attr('data-quickedit-entity-instance-id'),
          el: data.$el[0],
          region: data.$region[0]
        };
  
        if (!initializeEntityContextualLink(contextualLink)) {
          contextualLinksQueue.push(contextualLink);
        }
      }
    });
  
    function extractEntityID(fieldID) {
      return fieldID.split('/').slice(0, 2).join('/');
    }
  
    function initQuickEdit(bodyElement) {
      Drupal.quickedit.collections.entities = new Drupal.quickedit.EntityCollection();
      Drupal.quickedit.collections.fields = new Drupal.quickedit.FieldCollection();
  
      Drupal.quickedit.app = new Drupal.quickedit.AppView({
        el: bodyElement,
        model: new Drupal.quickedit.AppModel(),
        entitiesCollection: Drupal.quickedit.collections.entities,
        fieldsCollection: Drupal.quickedit.collections.fields
      });
    }
  
    function processEntity(entityElement) {
      var entityID = entityElement.getAttribute('data-quickedit-entity-id');
      if (!entityInstancesTracker.hasOwnProperty(entityID)) {
        entityInstancesTracker[entityID] = 0;
      } else {
        entityInstancesTracker[entityID]++;
      }
  
      var entityInstanceID = entityInstancesTracker[entityID];
      entityElement.setAttribute('data-quickedit-entity-instance-id', entityInstanceID);
    }
  
    function processField(fieldElement) {
      var metadata = Drupal.quickedit.metadata;
      var fieldID = fieldElement.getAttribute('data-quickedit-field-id');
      var entityID = extractEntityID(fieldID);
  
      var entityElementSelector = '[data-quickedit-entity-id="' + entityID + '"]';
      var $entityElement = $(entityElementSelector);
  
      if (!$entityElement.length) {
        throw new Error('Quick Edit could not associate the rendered entity field markup (with [data-quickedit-field-id="' + fieldID + '"]) with the corresponding rendered entity markup: no parent DOM node found with [data-quickedit-entity-id="' + entityID + '"]. This is typically caused by the theme\'s template for this entity type forgetting to print the attributes.');
      }
      var entityElement = $(fieldElement).closest($entityElement);
  
      if (entityElement.length === 0) {
        var $lowestCommonParent = $entityElement.parents().has(fieldElement).first();
        entityElement = $lowestCommonParent.find($entityElement);
      }
      var entityInstanceID = entityElement.get(0).getAttribute('data-quickedit-entity-instance-id');
  
      if (!metadata.has(fieldID)) {
        fieldsMetadataQueue.push({
          el: fieldElement,
          fieldID: fieldID,
          entityID: entityID,
          entityInstanceID: entityInstanceID
        });
        return;
      }
  
      if (metadata.get(fieldID, 'access') !== true) {
        return;
      }
  
      if (Drupal.quickedit.collections.entities.findWhere({ entityID: entityID, entityInstanceID: entityInstanceID })) {
        initializeField(fieldElement, fieldID, entityID, entityInstanceID);
      } else {
          fieldsAvailableQueue.push({ el: fieldElement, fieldID: fieldID, entityID: entityID, entityInstanceID: entityInstanceID });
        }
    }
  
    function initializeField(fieldElement, fieldID, entityID, entityInstanceID) {
      var entity = Drupal.quickedit.collections.entities.findWhere({
        entityID: entityID,
        entityInstanceID: entityInstanceID
      });
  
      $(fieldElement).addClass('quickedit-field');
  
      var field = new Drupal.quickedit.FieldModel({
        el: fieldElement,
        fieldID: fieldID,
        id: fieldID + '[' + entity.get('entityInstanceID') + ']',
        entity: entity,
        metadata: Drupal.quickedit.metadata.get(fieldID),
        acceptStateChange: _.bind(Drupal.quickedit.app.acceptEditorStateChange, Drupal.quickedit.app)
      });
  
      Drupal.quickedit.collections.fields.add(field);
    }
  
    function fetchMissingMetadata(callback) {
      if (fieldsMetadataQueue.length) {
        var fieldIDs = _.pluck(fieldsMetadataQueue, 'fieldID');
        var fieldElementsWithoutMetadata = _.pluck(fieldsMetadataQueue, 'el');
        var entityIDs = _.uniq(_.pluck(fieldsMetadataQueue, 'entityID'), true);
  
        entityIDs = _.difference(entityIDs, Drupal.quickedit.metadata.intersection(entityIDs));
        fieldsMetadataQueue = [];
  
        $.ajax({
          url: Drupal.url('quickedit/metadata'),
          type: 'POST',
          data: {
            'fields[]': fieldIDs,
            'entities[]': entityIDs
          },
          dataType: 'json',
          success: function success(results) {
            _.each(results, function (fieldMetadata, fieldID) {
              Drupal.quickedit.metadata.add(fieldID, fieldMetadata);
            });
  
            callback(fieldElementsWithoutMetadata);
          }
        });
      }
    }
  
    function loadMissingEditors(callback) {
      var loadedEditors = _.keys(Drupal.quickedit.editors);
      var missingEditors = [];
      Drupal.quickedit.collections.fields.each(function (fieldModel) {
        var metadata = Drupal.quickedit.metadata.get(fieldModel.get('fieldID'));
        if (metadata.access && _.indexOf(loadedEditors, metadata.editor) === -1) {
          missingEditors.push(metadata.editor);
  
          Drupal.quickedit.editors[metadata.editor] = false;
        }
      });
      missingEditors = _.uniq(missingEditors);
      if (missingEditors.length === 0) {
        callback();
        return;
      }
  
      var loadEditorsAjax = Drupal.ajax({
        url: Drupal.url('quickedit/attachments'),
        submit: { 'editors[]': missingEditors }
      });
  
      var realInsert = Drupal.AjaxCommands.prototype.insert;
      loadEditorsAjax.commands.insert = function (ajax, response, status) {
        _.defer(callback);
        realInsert(ajax, response, status);
      };
  
      loadEditorsAjax.execute();
    }
  
    function initializeEntityContextualLink(contextualLink) {
      var metadata = Drupal.quickedit.metadata;
  
      function hasFieldWithPermission(fieldIDs) {
        for (var i = 0; i < fieldIDs.length; i++) {
          var fieldID = fieldIDs[i];
          if (metadata.get(fieldID, 'access') === true) {
            return true;
          }
        }
        return false;
      }
  
      function allMetadataExists(fieldIDs) {
        return fieldIDs.length === metadata.intersection(fieldIDs).length;
      }
  
      var fields = _.where(fieldsAvailableQueue, {
        entityID: contextualLink.entityID,
        entityInstanceID: contextualLink.entityInstanceID
      });
      var fieldIDs = _.pluck(fields, 'fieldID');
  
      if (fieldIDs.length === 0) {
        return false;
      } else if (hasFieldWithPermission(fieldIDs)) {
          var entityModel = new Drupal.quickedit.EntityModel({
            el: contextualLink.region,
            entityID: contextualLink.entityID,
            entityInstanceID: contextualLink.entityInstanceID,
            id: contextualLink.entityID + '[' + contextualLink.entityInstanceID + ']',
            label: Drupal.quickedit.metadata.get(contextualLink.entityID, 'label')
          });
          Drupal.quickedit.collections.entities.add(entityModel);
  
          var entityDecorationView = new Drupal.quickedit.EntityDecorationView({
            el: contextualLink.region,
            model: entityModel
          });
          entityModel.set('entityDecorationView', entityDecorationView);
  
          _.each(fields, function (field) {
            initializeField(field.el, field.fieldID, contextualLink.entityID, contextualLink.entityInstanceID);
          });
          fieldsAvailableQueue = _.difference(fieldsAvailableQueue, fields);
  
          var initContextualLink = _.once(function () {
            var $links = $(contextualLink.el).find('.contextual-links');
            var contextualLinkView = new Drupal.quickedit.ContextualLinkView($.extend({
              el: $('<li class="quickedit"><a href="" role="button" aria-pressed="false"></a></li>').prependTo($links),
              model: entityModel,
              appModel: Drupal.quickedit.app.model
            }, options));
            entityModel.set('contextualLinkView', contextualLinkView);
          });
  
          loadMissingEditors(initContextualLink);
  
          return true;
        } else if (allMetadataExists(fieldIDs)) {
            return true;
          }
  
      return false;
    }
  
    function deleteContainedModelsAndQueues($context) {
      $context.find('[data-quickedit-entity-id]').addBack('[data-quickedit-entity-id]').each(function (index, entityElement) {
        var entityModel = Drupal.quickedit.collections.entities.findWhere({ el: entityElement });
        if (entityModel) {
          var contextualLinkView = entityModel.get('contextualLinkView');
          contextualLinkView.undelegateEvents();
          contextualLinkView.remove();
  
          entityModel.get('entityDecorationView').remove();
  
          entityModel.destroy();
        }
  
        function hasOtherRegion(contextualLink) {
          return contextualLink.region !== entityElement;
        }
  
        contextualLinksQueue = _.filter(contextualLinksQueue, hasOtherRegion);
      });
  
      $context.find('[data-quickedit-field-id]').addBack('[data-quickedit-field-id]').each(function (index, fieldElement) {
        Drupal.quickedit.collections.fields.chain().filter(function (fieldModel) {
          return fieldModel.get('el') === fieldElement;
        }).invoke('destroy');
  
        function hasOtherFieldElement(field) {
          return field.el !== fieldElement;
        }
  
        fieldsMetadataQueue = _.filter(fieldsMetadataQueue, hasOtherFieldElement);
        fieldsAvailableQueue = _.filter(fieldsAvailableQueue, hasOtherFieldElement);
      });
    }
  })(jQuery, _, Backbone, Drupal, drupalSettings, window.JSON, window.sessionStorage);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.quickedit.util = Drupal.quickedit.util || {};
  
    Drupal.quickedit.util.constants = {};
  
    Drupal.quickedit.util.constants.transitionEnd = 'transitionEnd.quickedit webkitTransitionEnd.quickedit transitionend.quickedit msTransitionEnd.quickedit oTransitionEnd.quickedit';
  
    Drupal.quickedit.util.buildUrl = function (id, urlFormat) {
      var parts = id.split('/');
      return Drupal.formatString(decodeURIComponent(urlFormat), {
        '!entity_type': parts[0],
        '!id': parts[1],
        '!field_name': parts[2],
        '!langcode': parts[3],
        '!view_mode': parts[4]
      });
    };
  
    Drupal.quickedit.util.networkErrorModal = function (title, message) {
      var $message = $('<div>' + message + '</div>');
      var networkErrorModal = Drupal.dialog($message.get(0), {
        title: title,
        dialogClass: 'quickedit-network-error',
        buttons: [{
          text: Drupal.t('OK'),
          click: function click() {
            networkErrorModal.close();
          },
  
          primary: true
        }],
        create: function create() {
          $(this).parent().find('.ui-dialog-titlebar-close').remove();
        },
        close: function close(event) {
          $(event.target).remove();
        }
      });
      networkErrorModal.showModal();
    };
  
    Drupal.quickedit.util.form = {
      load: function load(options, callback) {
        var fieldID = options.fieldID;
  
        var formLoaderAjax = Drupal.ajax({
          url: Drupal.quickedit.util.buildUrl(fieldID, Drupal.url('quickedit/form/!entity_type/!id/!field_name/!langcode/!view_mode')),
          submit: {
            nocssjs: options.nocssjs,
            reset: options.reset
          },
          error: function error(xhr, url) {
            var fieldLabel = Drupal.quickedit.metadata.get(fieldID, 'label');
            var message = Drupal.t('Could not load the form for <q>@field-label</q>, either due to a website problem or a network connection problem.<br>Please try again.', { '@field-label': fieldLabel });
            Drupal.quickedit.util.networkErrorModal(Drupal.t('Network problem!'), message);
  
            var fieldModel = Drupal.quickedit.app.model.get('activeField');
            fieldModel.set('state', 'candidate');
          }
        });
  
        formLoaderAjax.commands.quickeditFieldForm = function (ajax, response, status) {
          callback(response.data, ajax);
          Drupal.ajax.instances[this.instanceIndex] = null;
        };
  
        formLoaderAjax.execute();
      },
      ajaxifySaving: function ajaxifySaving(options, $submit) {
        var settings = {
          url: $submit.closest('form').attr('action'),
          setClick: true,
          event: 'click.quickedit',
          progress: false,
          submit: {
            nocssjs: options.nocssjs,
            other_view_modes: options.other_view_modes
          },
  
          success: function success(response, status) {
            var _this = this;
  
            Object.keys(response || {}).forEach(function (i) {
              if (response[i].command && _this.commands[response[i].command]) {
                _this.commands[response[i].command](_this, response[i], status);
              }
            });
          },
  
          base: $submit.attr('id'),
          element: $submit[0]
        };
  
        return Drupal.ajax(settings);
      },
      unajaxifySaving: function unajaxifySaving(ajax) {
        $(ajax.element).off('click.quickedit');
      }
    };
  })(jQuery, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  
  (function (Drupal, Backbone) {
    Drupal.quickedit.BaseModel = Backbone.Model.extend({
      initialize: function initialize(options) {
        this.__initialized = true;
        return Backbone.Model.prototype.initialize.call(this, options);
      },
      set: function set(key, val, options) {
        if (this.__initialized) {
          if ((typeof key === 'undefined' ? 'undefined' : _typeof(key)) === 'object') {
            key.validate = true;
          } else {
            if (!options) {
              options = {};
            }
            options.validate = true;
          }
        }
        return Backbone.Model.prototype.set.call(this, key, val, options);
      }
    });
  })(Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Backbone, Drupal) {
    Drupal.quickedit.AppModel = Backbone.Model.extend({
      defaults: {
        highlightedField: null,
  
        activeField: null,
  
        activeModal: null
      }
  
    });
  })(Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (_, $, Backbone, Drupal) {
    Drupal.quickedit.EntityModel = Drupal.quickedit.BaseModel.extend({
      defaults: {
        el: null,
  
        entityID: null,
  
        entityInstanceID: null,
  
        id: null,
  
        label: null,
  
        fields: null,
  
        isActive: false,
  
        inTempStore: false,
  
        isDirty: false,
  
        isCommitting: false,
  
        state: 'closed',
  
        fieldsInTempStore: [],
  
        reload: false
      },
  
      initialize: function initialize() {
        this.set('fields', new Drupal.quickedit.FieldCollection());
  
        this.listenTo(this, 'change:state', this.stateChange);
  
        this.listenTo(this.get('fields'), 'change:state', this.fieldStateChange);
  
        Drupal.quickedit.BaseModel.prototype.initialize.call(this);
      },
      stateChange: function stateChange(entityModel, state, options) {
        var to = state;
        switch (to) {
          case 'closed':
            this.set({
              isActive: false,
              inTempStore: false,
              isDirty: false
            });
            break;
  
          case 'launching':
            break;
  
          case 'opening':
            entityModel.get('fields').each(function (fieldModel) {
              fieldModel.set('state', 'candidate', options);
            });
            break;
  
          case 'opened':
            this.set('isActive', true);
            break;
  
          case 'committing':
            {
              var fields = this.get('fields');
  
              fields.chain().filter(function (fieldModel) {
                return _.intersection([fieldModel.get('state')], ['active']).length;
              }).each(function (fieldModel) {
                fieldModel.set('state', 'candidate');
              });
  
              fields.chain().filter(function (fieldModel) {
                return _.intersection([fieldModel.get('state')], Drupal.quickedit.app.changedFieldStates).length;
              }).each(function (fieldModel) {
                fieldModel.set('state', 'saving');
              });
              break;
            }
  
          case 'deactivating':
            {
              var changedFields = this.get('fields').filter(function (fieldModel) {
                return _.intersection([fieldModel.get('state')], ['changed', 'invalid']).length;
              });
  
              if ((changedFields.length || this.get('fieldsInTempStore').length) && !options.saved && !options.confirmed) {
                this.set('state', 'opened', { confirming: true });
  
                _.defer(function () {
                  Drupal.quickedit.app.confirmEntityDeactivation(entityModel);
                });
              } else {
                var invalidFields = this.get('fields').filter(function (fieldModel) {
                  return _.intersection([fieldModel.get('state')], ['invalid']).length;
                });
  
                entityModel.set('reload', this.get('fieldsInTempStore').length || invalidFields.length);
  
                entityModel.get('fields').each(function (fieldModel) {
                  if (_.intersection([fieldModel.get('state')], ['candidate', 'highlighted']).length) {
                    fieldModel.trigger('change:state', fieldModel, fieldModel.get('state'), options);
                  } else {
                    fieldModel.set('state', 'candidate', options);
                  }
                });
              }
              break;
            }
  
          case 'closing':
            options.reason = 'stop';
            this.get('fields').each(function (fieldModel) {
              fieldModel.set({
                inTempStore: false,
                state: 'inactive'
              }, options);
            });
            break;
        }
      },
      _updateInTempStoreAttributes: function _updateInTempStoreAttributes(entityModel, fieldModel) {
        var current = fieldModel.get('state');
        var previous = fieldModel.previous('state');
        var fieldsInTempStore = entityModel.get('fieldsInTempStore');
  
        if (current === 'saved') {
          entityModel.set('inTempStore', true);
  
          fieldModel.set('inTempStore', true);
  
          fieldsInTempStore.push(fieldModel.get('fieldID'));
          fieldsInTempStore = _.uniq(fieldsInTempStore);
          entityModel.set('fieldsInTempStore', fieldsInTempStore);
        } else if (current === 'candidate' && previous === 'inactive') {
            fieldModel.set('inTempStore', _.intersection([fieldModel.get('fieldID')], fieldsInTempStore).length > 0);
          }
      },
      fieldStateChange: function fieldStateChange(fieldModel, state) {
        var entityModel = this;
        var fieldState = state;
  
        switch (this.get('state')) {
          case 'closed':
          case 'launching':
            break;
  
          case 'opening':
            _.defer(function () {
              entityModel.set('state', 'opened', {
                'accept-field-states': Drupal.quickedit.app.readyFieldStates
              });
            });
            break;
  
          case 'opened':
            if (fieldState === 'changed') {
              entityModel.set('isDirty', true);
            } else {
              this._updateInTempStoreAttributes(entityModel, fieldModel);
            }
            break;
  
          case 'committing':
            {
              if (fieldState === 'invalid') {
                _.defer(function () {
                  entityModel.set('state', 'opened', { reason: 'invalid' });
                });
              } else {
                this._updateInTempStoreAttributes(entityModel, fieldModel);
              }
  
              var options = {
                'accept-field-states': Drupal.quickedit.app.readyFieldStates
              };
              if (entityModel.set('isCommitting', true, options)) {
                entityModel.save({
                  success: function success() {
                    entityModel.set({
                      state: 'deactivating',
                      isCommitting: false
                    }, { saved: true });
                  },
                  error: function error() {
                    entityModel.set('isCommitting', false);
  
                    entityModel.set('state', 'opened', { reason: 'networkerror' });
  
                    var message = Drupal.t('Your changes to <q>@entity-title</q> could not be saved, either due to a website problem or a network connection problem.<br>Please try again.', { '@entity-title': entityModel.get('label') });
                    Drupal.quickedit.util.networkErrorModal(Drupal.t('Network problem!'), message);
                  }
                });
              }
              break;
            }
  
          case 'deactivating':
            _.defer(function () {
              entityModel.set('state', 'closing', {
                'accept-field-states': Drupal.quickedit.app.readyFieldStates
              });
            });
            break;
  
          case 'closing':
            _.defer(function () {
              entityModel.set('state', 'closed', {
                'accept-field-states': ['inactive']
              });
            });
            break;
        }
      },
      save: function save(options) {
        var entityModel = this;
  
        var entitySaverAjax = Drupal.ajax({
          url: Drupal.url('quickedit/entity/' + entityModel.get('entityID')),
          error: function error() {
            options.error.call(entityModel);
          }
        });
  
        entitySaverAjax.commands.quickeditEntitySaved = function (ajax, response, status) {
          entityModel.get('fields').each(function (fieldModel) {
            fieldModel.set('inTempStore', false);
          });
          entityModel.set('inTempStore', false);
          entityModel.set('fieldsInTempStore', []);
  
          if (options.success) {
            options.success.call(entityModel);
          }
        };
  
        entitySaverAjax.execute();
      },
      validate: function validate(attrs, options) {
        var acceptedFieldStates = options['accept-field-states'] || [];
  
        var currentState = this.get('state');
        var nextState = attrs.state;
        if (currentState !== nextState) {
          if (_.indexOf(this.constructor.states, nextState) === -1) {
            return '"' + nextState + '" is an invalid state';
          }
  
          if (!this._acceptStateChange(currentState, nextState, options)) {
            return 'state change not accepted';
          } else if (!this._fieldsHaveAcceptableStates(acceptedFieldStates)) {
              return 'state change not accepted because fields are not in acceptable state';
            }
        }
  
        var currentIsCommitting = this.get('isCommitting');
        var nextIsCommitting = attrs.isCommitting;
        if (currentIsCommitting === false && nextIsCommitting === true) {
          if (!this._fieldsHaveAcceptableStates(acceptedFieldStates)) {
            return 'isCommitting change not accepted because fields are not in acceptable state';
          }
        } else if (currentIsCommitting === true && nextIsCommitting === true) {
          return 'isCommitting is a mutex, hence only changes are allowed';
        }
      },
      _acceptStateChange: function _acceptStateChange(from, to, context) {
        var accept = true;
  
        if (!this.constructor.followsStateSequence(from, to)) {
          accept = false;
  
          if (from === 'closing' && to === 'closed') {
            accept = true;
          } else if (from === 'committing' && to === 'opened' && context.reason && (context.reason === 'invalid' || context.reason === 'networkerror')) {
              accept = true;
            } else if (from === 'deactivating' && to === 'opened' && context.confirming) {
                accept = true;
              } else if (from === 'opened' && to === 'deactivating' && context.confirmed) {
                  accept = true;
                }
        }
  
        return accept;
      },
      _fieldsHaveAcceptableStates: function _fieldsHaveAcceptableStates(acceptedFieldStates) {
        var accept = true;
  
        if (acceptedFieldStates.length > 0) {
          var fieldStates = this.get('fields').pluck('state') || [];
  
          if (_.difference(fieldStates, acceptedFieldStates).length) {
            accept = false;
          }
        }
  
        return accept;
      },
      destroy: function destroy(options) {
        Drupal.quickedit.BaseModel.prototype.destroy.call(this, options);
  
        this.stopListening();
  
        this.get('fields').reset();
      },
      sync: function sync() {}
    }, {
      states: ['closed', 'launching', 'opening', 'opened', 'committing', 'deactivating', 'closing'],
  
      followsStateSequence: function followsStateSequence(from, to) {
        return _.indexOf(this.states, from) < _.indexOf(this.states, to);
      }
    });
  
    Drupal.quickedit.EntityCollection = Backbone.Collection.extend({
      model: Drupal.quickedit.EntityModel
    });
  })(_, jQuery, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (_, Backbone, Drupal) {
    Drupal.quickedit.FieldModel = Drupal.quickedit.BaseModel.extend({
      defaults: {
        el: null,
  
        fieldID: null,
  
        id: null,
  
        entity: null,
  
        metadata: null,
  
        acceptStateChange: null,
  
        logicalFieldID: null,
  
        state: 'inactive',
  
        isChanged: false,
  
        inTempStore: false,
  
        html: null,
  
        htmlForOtherViewModes: null
      },
  
      initialize: function initialize(options) {
        this.set('html', options.el.outerHTML);
  
        this.get('entity').get('fields').add(this);
  
        this.set('logicalFieldID', this.get('fieldID').split('/').slice(0, 4).join('/'));
  
        Drupal.quickedit.BaseModel.prototype.initialize.call(this, options);
      },
      destroy: function destroy(options) {
        if (this.get('state') !== 'inactive') {
          throw new Error('FieldModel cannot be destroyed if it is not inactive state.');
        }
        Drupal.quickedit.BaseModel.prototype.destroy.call(this, options);
      },
      sync: function sync() {},
      validate: function validate(attrs, options) {
        var current = this.get('state');
        var next = attrs.state;
        if (current !== next) {
          if (_.indexOf(this.constructor.states, next) === -1) {
            return '"' + next + '" is an invalid state';
          }
  
          if (!this.get('acceptStateChange')(current, next, options, this)) {
            return 'state change not accepted';
          }
        }
      },
      getEntityID: function getEntityID() {
        return this.get('fieldID').split('/').slice(0, 2).join('/');
      },
      getViewMode: function getViewMode() {
        return this.get('fieldID').split('/').pop();
      },
      findOtherViewModes: function findOtherViewModes() {
        var currentField = this;
        var otherViewModes = [];
        Drupal.quickedit.collections.fields.where({ logicalFieldID: currentField.get('logicalFieldID') }).forEach(function (field) {
          if (field !== currentField && field.get('fieldID') !== currentField.get('fieldID')) {
            otherViewModes.push(field.getViewMode());
          }
        });
        return otherViewModes;
      }
    }, {
      states: ['inactive', 'candidate', 'highlighted', 'activating', 'active', 'changed', 'saving', 'saved', 'invalid'],
  
      followsStateSequence: function followsStateSequence(from, to) {
        return _.indexOf(this.states, from) < _.indexOf(this.states, to);
      }
    });
  
    Drupal.quickedit.FieldCollection = Backbone.Collection.extend({
      model: Drupal.quickedit.FieldModel
    });
  })(_, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Backbone, Drupal) {
    Drupal.quickedit.EditorModel = Backbone.Model.extend({
      defaults: {
        originalValue: null,
  
        currentValue: null,
  
        validationErrors: null
      }
  
    });
  })(Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, _, Backbone, Drupal) {
    var reload = false;
  
    Drupal.quickedit.AppView = Backbone.View.extend({
      initialize: function initialize(options) {
        this.activeFieldStates = ['activating', 'active'];
        this.singleFieldStates = ['highlighted', 'activating', 'active'];
        this.changedFieldStates = ['changed', 'saving', 'saved', 'invalid'];
        this.readyFieldStates = ['candidate', 'highlighted'];
  
        this.listenTo(options.entitiesCollection, 'change:state', this.appStateChange);
        this.listenTo(options.entitiesCollection, 'change:isActive', this.enforceSingleActiveEntity);
  
        this.listenTo(options.fieldsCollection, 'change:state', this.editorStateChange);
  
        this.listenTo(options.fieldsCollection, 'change:html', this.renderUpdatedField);
        this.listenTo(options.fieldsCollection, 'change:html', this.propagateUpdatedField);
  
        this.listenTo(options.fieldsCollection, 'add', this.rerenderedFieldToCandidate);
  
        this.listenTo(options.fieldsCollection, 'destroy', this.teardownEditor);
      },
      appStateChange: function appStateChange(entityModel, state) {
        var app = this;
        var entityToolbarView = void 0;
        switch (state) {
          case 'launching':
            reload = false;
  
            entityToolbarView = new Drupal.quickedit.EntityToolbarView({
              model: entityModel,
              appModel: this.model
            });
            entityModel.toolbarView = entityToolbarView;
  
            entityModel.get('fields').each(function (fieldModel) {
              app.setupEditor(fieldModel);
            });
  
            _.defer(function () {
              entityModel.set('state', 'opening');
            });
            break;
  
          case 'closed':
            entityToolbarView = entityModel.toolbarView;
  
            entityModel.get('fields').each(function (fieldModel) {
              app.teardownEditor(fieldModel);
            });
  
            if (entityToolbarView) {
              entityToolbarView.remove();
              delete entityModel.toolbarView;
            }
  
            if (reload) {
              reload = false;
              location.reload();
            }
            break;
        }
      },
      acceptEditorStateChange: function acceptEditorStateChange(from, to, context, fieldModel) {
        var accept = true;
  
        if (context && (context.reason === 'stop' || context.reason === 'rerender')) {
          if (from === 'candidate' && to === 'inactive') {
            accept = true;
          }
        } else {
            if (!Drupal.quickedit.FieldModel.followsStateSequence(from, to)) {
              accept = false;
  
              if (_.indexOf(this.activeFieldStates, from) !== -1 && to === 'candidate') {
                accept = true;
              } else if ((from === 'changed' || from === 'invalid') && to === 'candidate') {
                  accept = true;
                } else if (from === 'highlighted' && to === 'candidate') {
                    accept = true;
                  } else if (from === 'saved' && to === 'candidate') {
                      accept = true;
                    } else if (from === 'invalid' && to === 'saving') {
                        accept = true;
                      } else if (from === 'invalid' && to === 'activating') {
                          accept = true;
                        }
            }
  
            if (accept) {
              var activeField = void 0;
              var activeFieldState = void 0;
  
              if ((this.readyFieldStates.indexOf(from) !== -1 || from === 'invalid') && this.activeFieldStates.indexOf(to) !== -1) {
                activeField = this.model.get('activeField');
                if (activeField && activeField !== fieldModel) {
                  activeFieldState = activeField.get('state');
  
                  if (this.activeFieldStates.indexOf(activeFieldState) !== -1) {
                    activeField.set('state', 'candidate');
                  } else if (activeFieldState === 'changed' || activeFieldState === 'invalid') {
                    activeField.set('state', 'saving');
                  }
  
                  if (from === 'invalid') {
                    this.model.set('activeField', fieldModel);
                    accept = false;
                  }
                }
              } else if (_.indexOf(this.activeFieldStates, from) !== -1 && to === 'candidate') {
                  if (context && context.reason === 'mouseleave') {
                    accept = false;
                  }
                } else if ((from === 'changed' || from === 'invalid') && to === 'candidate') {
                    if (context && context.reason === 'mouseleave') {
                      accept = false;
                    } else if (context && context.confirmed) {
                        accept = true;
                      }
                  }
            }
          }
  
        return accept;
      },
      setupEditor: function setupEditor(fieldModel) {
        var entityModel = fieldModel.get('entity');
        var entityToolbarView = entityModel.toolbarView;
  
        var fieldToolbarRoot = entityToolbarView.getToolbarRoot();
  
        var editorName = fieldModel.get('metadata').editor;
        var editorModel = new Drupal.quickedit.EditorModel();
        var editorView = new Drupal.quickedit.editors[editorName]({
          el: $(fieldModel.get('el')),
          model: editorModel,
          fieldModel: fieldModel
        });
  
        var toolbarView = new Drupal.quickedit.FieldToolbarView({
          el: fieldToolbarRoot,
          model: fieldModel,
          $editedElement: $(editorView.getEditedElement()),
          editorView: editorView,
          entityModel: entityModel
        });
  
        var decorationView = new Drupal.quickedit.FieldDecorationView({
          el: $(editorView.getEditedElement()),
          model: fieldModel,
          editorView: editorView
        });
  
        fieldModel.editorView = editorView;
        fieldModel.toolbarView = toolbarView;
        fieldModel.decorationView = decorationView;
      },
      teardownEditor: function teardownEditor(fieldModel) {
        if (typeof fieldModel.editorView === 'undefined') {
          return;
        }
  
        fieldModel.toolbarView.remove();
        delete fieldModel.toolbarView;
  
        fieldModel.decorationView.remove();
        delete fieldModel.decorationView;
  
        fieldModel.editorView.remove();
        delete fieldModel.editorView;
      },
      confirmEntityDeactivation: function confirmEntityDeactivation(entityModel) {
        var that = this;
        var discardDialog = void 0;
  
        function closeDiscardDialog(action) {
          discardDialog.close(action);
  
          that.model.set('activeModal', null);
  
          if (action === 'save') {
            entityModel.set('state', 'committing', { confirmed: true });
          } else {
            entityModel.set('state', 'deactivating', { confirmed: true });
  
            if (entityModel.get('reload')) {
              reload = true;
              entityModel.set('reload', false);
            }
          }
        }
  
        if (!this.model.get('activeModal')) {
          var $unsavedChanges = $('<div>' + Drupal.t('You have unsaved changes') + '</div>');
          discardDialog = Drupal.dialog($unsavedChanges.get(0), {
            title: Drupal.t('Discard changes?'),
            dialogClass: 'quickedit-discard-modal',
            resizable: false,
            buttons: [{
              text: Drupal.t('Save'),
              click: function click() {
                closeDiscardDialog('save');
              },
  
              primary: true
            }, {
              text: Drupal.t('Discard changes'),
              click: function click() {
                closeDiscardDialog('discard');
              }
            }],
  
            closeOnEscape: false,
            create: function create() {
              $(this).parent().find('.ui-dialog-titlebar-close').remove();
            },
  
            beforeClose: false,
            close: function close(event) {
              $(event.target).remove();
            }
          });
          this.model.set('activeModal', discardDialog);
  
          discardDialog.showModal();
        }
      },
      editorStateChange: function editorStateChange(fieldModel, state) {
        var from = fieldModel.previous('state');
        var to = state;
  
        if (_.indexOf(this.singleFieldStates, to) !== -1 && this.model.get('highlightedField') !== fieldModel) {
          this.model.set('highlightedField', fieldModel);
        } else if (this.model.get('highlightedField') === fieldModel && to === 'candidate') {
          this.model.set('highlightedField', null);
        }
  
        if (_.indexOf(this.activeFieldStates, to) !== -1 && this.model.get('activeField') !== fieldModel) {
          this.model.set('activeField', fieldModel);
        } else if (this.model.get('activeField') === fieldModel && to === 'candidate') {
          if (from === 'changed' || from === 'invalid') {
            fieldModel.editorView.revert();
          }
          this.model.set('activeField', null);
        }
      },
      renderUpdatedField: function renderUpdatedField(fieldModel, html, options) {
        var $fieldWrapper = $(fieldModel.get('el'));
        var $context = $fieldWrapper.parent();
  
        var renderField = function renderField() {
          fieldModel.destroy();
  
          $fieldWrapper.replaceWith(html);
  
          Drupal.attachBehaviors($context.get(0));
        };
  
        if (!options.propagation) {
          _.defer(function () {
            fieldModel.set('state', 'candidate');
  
            _.defer(function () {
              fieldModel.set('state', 'inactive', { reason: 'rerender' });
  
              renderField();
            });
          });
        } else {
          renderField();
        }
      },
      propagateUpdatedField: function propagateUpdatedField(updatedField, html, options) {
        if (options.propagation) {
          return;
        }
  
        var htmlForOtherViewModes = updatedField.get('htmlForOtherViewModes');
        Drupal.quickedit.collections.fields.where({ logicalFieldID: updatedField.get('logicalFieldID') }).forEach(function (field) {
          if (field === updatedField) {} else if (field.getViewMode() === updatedField.getViewMode()) {
              field.set('html', updatedField.get('html'));
            } else if (field.getViewMode() in htmlForOtherViewModes) {
                field.set('html', htmlForOtherViewModes[field.getViewMode()], { propagation: true });
              }
        });
      },
      rerenderedFieldToCandidate: function rerenderedFieldToCandidate(fieldModel) {
        var activeEntity = Drupal.quickedit.collections.entities.findWhere({ isActive: true });
  
        if (!activeEntity) {
          return;
        }
  
        if (fieldModel.get('entity') === activeEntity) {
          this.setupEditor(fieldModel);
          fieldModel.set('state', 'candidate');
        }
      },
      enforceSingleActiveEntity: function enforceSingleActiveEntity(changedEntityModel) {
        if (changedEntityModel.get('isActive') === false) {
          return;
        }
  
        changedEntityModel.collection.chain().filter(function (entityModel) {
          return entityModel.get('isActive') === true && entityModel !== changedEntityModel;
        }).each(function (entityModel) {
          entityModel.set('state', 'deactivating');
        });
      }
    });
  })(jQuery, _, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Backbone, Drupal) {
    Drupal.quickedit.FieldDecorationView = Backbone.View.extend({
      _widthAttributeIsEmpty: null,
  
      events: {
        'mouseenter.quickedit': 'onMouseEnter',
        'mouseleave.quickedit': 'onMouseLeave',
        click: 'onClick',
        'tabIn.quickedit': 'onMouseEnter',
        'tabOut.quickedit': 'onMouseLeave'
      },
  
      initialize: function initialize(options) {
        this.editorView = options.editorView;
  
        this.listenTo(this.model, 'change:state', this.stateChange);
        this.listenTo(this.model, 'change:isChanged change:inTempStore', this.renderChanged);
      },
      remove: function remove() {
        this.setElement();
        Backbone.View.prototype.remove.call(this);
      },
      stateChange: function stateChange(model, state) {
        var from = model.previous('state');
        var to = state;
        switch (to) {
          case 'inactive':
            this.undecorate();
            break;
  
          case 'candidate':
            this.decorate();
            if (from !== 'inactive') {
              this.stopHighlight();
              if (from !== 'highlighted') {
                this.model.set('isChanged', false);
                this.stopEdit();
              }
            }
            this._unpad();
            break;
  
          case 'highlighted':
            this.startHighlight();
            break;
  
          case 'activating':
            this.prepareEdit();
            break;
  
          case 'active':
            if (from !== 'activating') {
              this.prepareEdit();
            }
            if (this.editorView.getQuickEditUISettings().padding) {
              this._pad();
            }
            break;
  
          case 'changed':
            this.model.set('isChanged', true);
            break;
  
          case 'saving':
            break;
  
          case 'saved':
            break;
  
          case 'invalid':
            break;
        }
      },
      renderChanged: function renderChanged() {
        this.$el.toggleClass('quickedit-changed', this.model.get('isChanged') || this.model.get('inTempStore'));
      },
      onMouseEnter: function onMouseEnter(event) {
        var that = this;
        that.model.set('state', 'highlighted');
        event.stopPropagation();
      },
      onMouseLeave: function onMouseLeave(event) {
        var that = this;
        that.model.set('state', 'candidate', { reason: 'mouseleave' });
        event.stopPropagation();
      },
      onClick: function onClick(event) {
        this.model.set('state', 'activating');
        event.preventDefault();
        event.stopPropagation();
      },
      decorate: function decorate() {
        this.$el.addClass('quickedit-candidate quickedit-editable');
      },
      undecorate: function undecorate() {
        this.$el.removeClass('quickedit-candidate quickedit-editable quickedit-highlighted quickedit-editing');
      },
      startHighlight: function startHighlight() {
        var that = this;
  
        that.$el.addClass('quickedit-highlighted');
      },
      stopHighlight: function stopHighlight() {
        this.$el.removeClass('quickedit-highlighted');
      },
      prepareEdit: function prepareEdit() {
        this.$el.addClass('quickedit-editing');
  
        if (this.editorView.getQuickEditUISettings().popup) {
          this.$el.addClass('quickedit-editor-is-popup');
        }
      },
      stopEdit: function stopEdit() {
        this.$el.removeClass('quickedit-highlighted quickedit-editing');
  
        if (this.editorView.getQuickEditUISettings().popup) {
          this.$el.removeClass('quickedit-editor-is-popup');
        }
  
        $('.quickedit-candidate').addClass('quickedit-editable');
      },
      _pad: function _pad() {
        if (this.$el.data('quickedit-padded')) {
          return;
        }
        var self = this;
  
        if (this.$el[0].style.width === '') {
          this._widthAttributeIsEmpty = true;
          this.$el.addClass('quickedit-animate-disable-width').css('width', this.$el.width());
        }
  
        var posProp = this._getPositionProperties(this.$el);
        setTimeout(function () {
          self.$el.removeClass('quickedit-animate-disable-width');
  
          self.$el.css({
            position: 'relative',
            top: posProp.top - 5 + 'px',
            left: posProp.left - 5 + 'px',
            'padding-top': posProp['padding-top'] + 5 + 'px',
            'padding-left': posProp['padding-left'] + 5 + 'px',
            'padding-right': posProp['padding-right'] + 5 + 'px',
            'padding-bottom': posProp['padding-bottom'] + 5 + 'px',
            'margin-bottom': posProp['margin-bottom'] - 10 + 'px'
          }).data('quickedit-padded', true);
        }, 0);
      },
      _unpad: function _unpad() {
        if (!this.$el.data('quickedit-padded')) {
          return;
        }
        var self = this;
  
        if (this._widthAttributeIsEmpty) {
          this.$el.addClass('quickedit-animate-disable-width').css('width', '');
        }
  
        var posProp = this._getPositionProperties(this.$el);
        setTimeout(function () {
          self.$el.removeClass('quickedit-animate-disable-width');
  
          self.$el.css({
            position: 'relative',
            top: posProp.top + 5 + 'px',
            left: posProp.left + 5 + 'px',
            'padding-top': posProp['padding-top'] - 5 + 'px',
            'padding-left': posProp['padding-left'] - 5 + 'px',
            'padding-right': posProp['padding-right'] - 5 + 'px',
            'padding-bottom': posProp['padding-bottom'] - 5 + 'px',
            'margin-bottom': posProp['margin-bottom'] + 10 + 'px'
          });
        }, 0);
  
        this.$el.removeData('quickedit-padded');
      },
      _getPositionProperties: function _getPositionProperties($e) {
        var p = void 0;
        var r = {};
        var props = ['top', 'left', 'bottom', 'right', 'padding-top', 'padding-left', 'padding-right', 'padding-bottom', 'margin-bottom'];
  
        var propCount = props.length;
        for (var i = 0; i < propCount; i++) {
          p = props[i];
          r[p] = parseInt(this._replaceBlankPosition($e.css(p)), 10);
        }
        return r;
      },
      _replaceBlankPosition: function _replaceBlankPosition(pos) {
        if (pos === 'auto' || !pos) {
          pos = '0px';
        }
        return pos;
      }
    });
  })(jQuery, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, $, Backbone) {
    Drupal.quickedit.EntityDecorationView = Backbone.View.extend({
      initialize: function initialize() {
        this.listenTo(this.model, 'change', this.render);
      },
      render: function render() {
        this.$el.toggleClass('quickedit-entity-active', this.model.get('isActive'));
      },
      remove: function remove() {
        this.setElement(null);
        Backbone.View.prototype.remove.call(this);
      }
    });
  })(Drupal, jQuery, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, _, Backbone, Drupal, debounce) {
    Drupal.quickedit.EntityToolbarView = Backbone.View.extend({
      _fieldToolbarRoot: null,
  
      events: function events() {
        var map = {
          'click button.action-save': 'onClickSave',
          'click button.action-cancel': 'onClickCancel',
          mouseenter: 'onMouseenter'
        };
        return map;
      },
      initialize: function initialize(options) {
        var that = this;
        this.appModel = options.appModel;
        this.$entity = $(this.model.get('el'));
  
        this.listenTo(this.model, 'change:isActive change:isDirty change:state', this.render);
  
        this.listenTo(this.appModel, 'change:highlightedField change:activeField', this.render);
  
        this.listenTo(this.model.get('fields'), 'change:state', this.fieldStateChange);
  
        $(window).on('resize.quickedit scroll.quickedit drupalViewportOffsetChange.quickedit', debounce($.proxy(this.windowChangeHandler, this), 150));
  
        $(document).on('drupalViewportOffsetChange.quickedit', function (event, offsets) {
          if (that.$fence) {
            that.$fence.css(offsets);
          }
        });
  
        var $toolbar = this.buildToolbarEl();
        this.setElement($toolbar);
        this._fieldToolbarRoot = $toolbar.find('.quickedit-toolbar-field').get(0);
  
        this.render();
      },
      render: function render() {
        if (this.model.get('isActive')) {
          var $body = $('body');
          if ($body.children('#quickedit-entity-toolbar').length === 0) {
            $body.append(this.$el);
          }
  
          if ($body.children('#quickedit-toolbar-fence').length === 0) {
            this.$fence = $(Drupal.theme('quickeditEntityToolbarFence')).css(Drupal.displace()).appendTo($body);
          }
  
          this.label();
  
          this.show('ops');
  
          this.position();
        }
  
        var $button = this.$el.find('.quickedit-button.action-save');
        var isDirty = this.model.get('isDirty');
  
        switch (this.model.get('state')) {
          case 'opened':
            $button.removeClass('action-saving icon-throbber icon-end').text(Drupal.t('Save')).removeAttr('disabled').attr('aria-hidden', !isDirty);
            break;
  
          case 'committing':
            $button.addClass('action-saving icon-throbber icon-end').text(Drupal.t('Saving')).attr('disabled', 'disabled');
            break;
  
          default:
            $button.attr('aria-hidden', true);
            break;
        }
  
        return this;
      },
      remove: function remove() {
        this.$fence.remove();
  
        $(window).off('resize.quickedit scroll.quickedit drupalViewportOffsetChange.quickedit');
        $(document).off('drupalViewportOffsetChange.quickedit');
  
        Backbone.View.prototype.remove.call(this);
      },
      windowChangeHandler: function windowChangeHandler(event) {
        this.position();
      },
      fieldStateChange: function fieldStateChange(model, state) {
        switch (state) {
          case 'active':
            this.render();
            break;
  
          case 'invalid':
            this.render();
            break;
        }
      },
      position: function position(element) {
        clearTimeout(this.timer);
  
        var that = this;
  
        var edge = document.documentElement.dir === 'rtl' ? 'right' : 'left';
  
        var delay = 0;
  
        var check = 0;
  
        var horizontalPadding = 0;
        var of = void 0;
        var activeField = void 0;
        var highlightedField = void 0;
  
        do {
          switch (check) {
            case 0:
              of = element;
              break;
  
            case 1:
              activeField = Drupal.quickedit.app.model.get('activeField');
              of = activeField && activeField.editorView && activeField.editorView.$formContainer && activeField.editorView.$formContainer.find('.quickedit-form');
              break;
  
            case 2:
              of = activeField && activeField.editorView && activeField.editorView.getEditedElement();
              if (activeField && activeField.editorView && activeField.editorView.getQuickEditUISettings().padding) {
                horizontalPadding = 5;
              }
              break;
  
            case 3:
              highlightedField = Drupal.quickedit.app.model.get('highlightedField');
              of = highlightedField && highlightedField.editorView && highlightedField.editorView.getEditedElement();
              delay = 250;
              break;
  
            default:
              {
                var fieldModels = this.model.get('fields').models;
                var topMostPosition = 1000000;
                var topMostField = null;
  
                for (var i = 0; i < fieldModels.length; i++) {
                  var pos = fieldModels[i].get('el').getBoundingClientRect().top;
                  if (pos < topMostPosition) {
                    topMostPosition = pos;
                    topMostField = fieldModels[i];
                  }
                }
                of = topMostField.get('el');
                delay = 50;
                break;
              }
          }
  
          check++;
        } while (!of);
  
        function refinePosition(view, suggested, info) {
          var isBelow = suggested.top > info.target.top;
          info.element.element.toggleClass('quickedit-toolbar-pointer-top', isBelow);
  
          if (view.$entity[0] === info.target.element[0]) {
            var $field = view.$entity.find('.quickedit-editable').eq(isBelow ? -1 : 0);
            if ($field.length > 0) {
              suggested.top = isBelow ? $field.offset().top + $field.outerHeight(true) : $field.offset().top - info.element.element.outerHeight(true);
            }
          }
  
          var fenceTop = view.$fence.offset().top;
          var fenceHeight = view.$fence.height();
          var toolbarHeight = info.element.element.outerHeight(true);
          if (suggested.top < fenceTop) {
            suggested.top = fenceTop;
          } else if (suggested.top + toolbarHeight > fenceTop + fenceHeight) {
            suggested.top = fenceTop + fenceHeight - toolbarHeight;
          }
  
          info.element.element.css({
            left: Math.floor(suggested.left),
            top: Math.floor(suggested.top)
          });
        }
  
        function positionToolbar() {
          that.$el.position({
            my: edge + ' bottom',
  
            at: edge + '+' + (1 + horizontalPadding) + ' top',
            of: of,
            collision: 'flipfit',
            using: refinePosition.bind(null, that),
            within: that.$fence
          }).css({
            'max-width': document.documentElement.clientWidth < 450 ? document.documentElement.clientWidth : 450,
  
            'min-width': document.documentElement.clientWidth < 240 ? document.documentElement.clientWidth : 240,
            width: '100%'
          });
        }
  
        this.timer = setTimeout(function () {
          _.defer(positionToolbar);
        }, delay);
      },
      onClickSave: function onClickSave(event) {
        event.stopPropagation();
        event.preventDefault();
  
        this.model.set('state', 'committing');
      },
      onClickCancel: function onClickCancel(event) {
        event.preventDefault();
        this.model.set('state', 'deactivating');
      },
      onMouseenter: function onMouseenter(event) {
        clearTimeout(this.timer);
      },
      buildToolbarEl: function buildToolbarEl() {
        var $toolbar = $(Drupal.theme('quickeditEntityToolbar', {
          id: 'quickedit-entity-toolbar'
        }));
  
        $toolbar.find('.quickedit-toolbar-entity').prepend(Drupal.theme('quickeditToolgroup', {
          classes: ['ops'],
          buttons: [{
            label: Drupal.t('Save'),
            type: 'submit',
            classes: 'action-save quickedit-button icon',
            attributes: {
              'aria-hidden': true
            }
          }, {
            label: Drupal.t('Close'),
            classes: 'action-cancel quickedit-button icon icon-close icon-only'
          }]
        }));
  
        $toolbar.css({
          left: this.$entity.offset().left,
          top: this.$entity.offset().top
        });
  
        return $toolbar;
      },
      getToolbarRoot: function getToolbarRoot() {
        return this._fieldToolbarRoot;
      },
      label: function label() {
        var label = '';
        var entityLabel = this.model.get('label');
  
        var activeField = Drupal.quickedit.app.model.get('activeField');
        var activeFieldLabel = activeField && activeField.get('metadata').label;
  
        var highlightedField = Drupal.quickedit.app.model.get('highlightedField');
        var highlightedFieldLabel = highlightedField && highlightedField.get('metadata').label;
  
        if (activeFieldLabel) {
          label = Drupal.theme('quickeditEntityToolbarLabel', {
            entityLabel: entityLabel,
            fieldLabel: activeFieldLabel
          });
        } else if (highlightedFieldLabel) {
          label = Drupal.theme('quickeditEntityToolbarLabel', {
            entityLabel: entityLabel,
            fieldLabel: highlightedFieldLabel
          });
        } else {
          label = Drupal.checkPlain(entityLabel);
        }
  
        this.$el.find('.quickedit-toolbar-label').html(label);
      },
      addClass: function addClass(toolgroup, classes) {
        this._find(toolgroup).addClass(classes);
      },
      removeClass: function removeClass(toolgroup, classes) {
        this._find(toolgroup).removeClass(classes);
      },
      _find: function _find(toolgroup) {
        return this.$el.find('.quickedit-toolbar .quickedit-toolgroup.' + toolgroup);
      },
      show: function show(toolgroup) {
        this.$el.removeClass('quickedit-animate-invisible');
      }
    });
  })(jQuery, _, Backbone, Drupal, Drupal.debounce);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Backbone, Drupal) {
    Drupal.quickedit.ContextualLinkView = Backbone.View.extend({
      events: function events() {
        function touchEndToClick(event) {
          event.preventDefault();
          event.target.click();
        }
  
        return {
          'click a': function clickA(event) {
            event.preventDefault();
            this.model.set('state', 'launching');
          },
          'touchEnd a': touchEndToClick
        };
      },
      initialize: function initialize(options) {
        this.$el.find('a').text(options.strings.quickEdit);
  
        this.render();
  
        this.listenTo(this.model, 'change:isActive', this.render);
      },
      render: function render(entityModel, isActive) {
        this.$el.find('a').attr('aria-pressed', isActive);
  
        this.$el.closest('.contextual').toggle(!isActive);
  
        return this;
      }
    });
  })(jQuery, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, _, Backbone, Drupal) {
    Drupal.quickedit.FieldToolbarView = Backbone.View.extend({
      $editedElement: null,
  
      editorView: null,
  
      _id: null,
  
      initialize: function initialize(options) {
        this.$editedElement = options.$editedElement;
        this.editorView = options.editorView;
  
        this.$root = this.$el;
  
        this._id = 'quickedit-toolbar-for-' + this.model.id.replace(/[/[\]]/g, '_');
  
        this.listenTo(this.model, 'change:state', this.stateChange);
      },
      render: function render() {
        this.setElement($(Drupal.theme('quickeditFieldToolbar', {
          id: this._id
        })));
  
        this.$el.prependTo(this.$root);
  
        return this;
      },
      stateChange: function stateChange(model, state) {
        var from = model.previous('state');
        var to = state;
        switch (to) {
          case 'inactive':
            break;
  
          case 'candidate':
            if (from !== 'inactive' && from !== 'highlighted') {
              this.$el.remove();
              this.setElement();
            }
            break;
  
          case 'highlighted':
            break;
  
          case 'activating':
            this.render();
  
            if (this.editorView.getQuickEditUISettings().fullWidthToolbar) {
              this.$el.addClass('quickedit-toolbar-fullwidth');
            }
  
            if (this.editorView.getQuickEditUISettings().unifiedToolbar) {
              this.insertWYSIWYGToolGroups();
            }
            break;
  
          case 'active':
            break;
  
          case 'changed':
            break;
  
          case 'saving':
            break;
  
          case 'saved':
            break;
  
          case 'invalid':
            break;
        }
      },
      insertWYSIWYGToolGroups: function insertWYSIWYGToolGroups() {
        this.$el.append(Drupal.theme('quickeditToolgroup', {
          id: this.getFloatedWysiwygToolgroupId(),
          classes: ['wysiwyg-floated', 'quickedit-animate-slow', 'quickedit-animate-invisible', 'quickedit-animate-delay-veryfast'],
          buttons: []
        })).append(Drupal.theme('quickeditToolgroup', {
          id: this.getMainWysiwygToolgroupId(),
          classes: ['wysiwyg-main', 'quickedit-animate-slow', 'quickedit-animate-invisible', 'quickedit-animate-delay-veryfast'],
          buttons: []
        }));
  
        this.show('wysiwyg-floated');
        this.show('wysiwyg-main');
      },
      getId: function getId() {
        return 'quickedit-toolbar-for-' + this._id;
      },
      getFloatedWysiwygToolgroupId: function getFloatedWysiwygToolgroupId() {
        return 'quickedit-wysiwyg-floated-toolgroup-for-' + this._id;
      },
      getMainWysiwygToolgroupId: function getMainWysiwygToolgroupId() {
        return 'quickedit-wysiwyg-main-toolgroup-for-' + this._id;
      },
      _find: function _find(toolgroup) {
        return this.$el.find('.quickedit-toolgroup.' + toolgroup);
      },
      show: function show(toolgroup) {
        var $group = this._find(toolgroup);
  
        $group.on(Drupal.quickedit.util.constants.transitionEnd, function (event) {
          $group.off(Drupal.quickedit.util.constants.transitionEnd);
        });
  
        window.setTimeout(function () {
          $group.removeClass('quickedit-animate-invisible');
        }, 0);
      }
    });
  })(jQuery, _, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Backbone, Drupal) {
    Drupal.quickedit.EditorView = Backbone.View.extend({
      initialize: function initialize(options) {
        this.fieldModel = options.fieldModel;
        this.listenTo(this.fieldModel, 'change:state', this.stateChange);
      },
      remove: function remove() {
        this.setElement();
        Backbone.View.prototype.remove.call(this);
      },
      getEditedElement: function getEditedElement() {
        return this.$el;
      },
      getQuickEditUISettings: function getQuickEditUISettings() {
        return { padding: false, unifiedToolbar: false, fullWidthToolbar: false, popup: false };
      },
      stateChange: function stateChange(fieldModel, state) {
        var from = fieldModel.previous('state');
        var to = state;
        switch (to) {
          case 'inactive':
            break;
  
          case 'candidate':
            if (from === 'invalid') {
              this.removeValidationErrors();
            }
            break;
  
          case 'highlighted':
            break;
  
          case 'activating':
            {
              var loadDependencies = function loadDependencies(callback) {
                callback();
              };
              loadDependencies(function () {
                fieldModel.set('state', 'active');
              });
              break;
            }
  
          case 'active':
            break;
  
          case 'changed':
            break;
  
          case 'saving':
            if (from === 'invalid') {
              this.removeValidationErrors();
            }
            this.save();
            break;
  
          case 'saved':
            break;
  
          case 'invalid':
            this.showValidationErrors();
            break;
        }
      },
      revert: function revert() {},
      save: function save() {
        var fieldModel = this.fieldModel;
        var editorModel = this.model;
        var backstageId = 'quickedit_backstage-' + this.fieldModel.id.replace(/[/[\]_\s]/g, '-');
  
        function fillAndSubmitForm(value) {
          var $form = $('#' + backstageId).find('form');
  
          $form.find(':input[type!="hidden"][type!="submit"]:not(select)').not('[name$="\\[summary\\]"]').val(value);
  
          $form.find('.quickedit-form-submit').trigger('click.quickedit');
        }
  
        var formOptions = {
          fieldID: this.fieldModel.get('fieldID'),
          $el: this.$el,
          nocssjs: true,
          other_view_modes: fieldModel.findOtherViewModes(),
  
          reset: !this.fieldModel.get('entity').get('inTempStore')
        };
  
        var self = this;
        Drupal.quickedit.util.form.load(formOptions, function (form, ajax) {
          var $backstage = $(Drupal.theme('quickeditBackstage', { id: backstageId })).appendTo('body');
  
          var $form = $(form).appendTo($backstage);
  
          $form.prop('novalidate', true);
          var $submit = $form.find('.quickedit-form-submit');
          self.formSaveAjax = Drupal.quickedit.util.form.ajaxifySaving(formOptions, $submit);
  
          function removeHiddenForm() {
            Drupal.quickedit.util.form.unajaxifySaving(self.formSaveAjax);
            delete self.formSaveAjax;
            $backstage.remove();
          }
  
          self.formSaveAjax.commands.quickeditFieldFormSaved = function (ajax, response, status) {
            removeHiddenForm();
  
            fieldModel.set('state', 'saved');
  
            fieldModel.set('htmlForOtherViewModes', response.other_view_modes);
  
            fieldModel.set('html', response.data);
          };
  
          self.formSaveAjax.commands.quickeditFieldFormValidationErrors = function (ajax, response, status) {
            removeHiddenForm();
            editorModel.set('validationErrors', response.data);
            fieldModel.set('state', 'invalid');
          };
  
          self.formSaveAjax.commands.quickeditFieldForm = function () {};
  
          fillAndSubmitForm(editorModel.get('currentValue'));
        });
      },
      showValidationErrors: function showValidationErrors() {
        var $errors = $('<div class="quickedit-validation-errors"></div>').append(this.model.get('validationErrors'));
        this.getEditedElement().addClass('quickedit-validation-error').after($errors);
      },
      removeValidationErrors: function removeValidationErrors() {
        this.getEditedElement().removeClass('quickedit-validation-error').next('.quickedit-validation-errors').remove();
      }
    });
  })(jQuery, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.theme.quickeditBackstage = function (settings) {
      var html = '';
      html += '<div id="' + settings.id + '" />';
      return html;
    };
  
    Drupal.theme.quickeditEntityToolbar = function (settings) {
      var html = '';
      html += '<div id="' + settings.id + '" class="quickedit quickedit-toolbar-container clearfix">';
      html += '<i class="quickedit-toolbar-pointer"></i>';
      html += '<div class="quickedit-toolbar-content">';
      html += '<div class="quickedit-toolbar quickedit-toolbar-entity clearfix icon icon-pencil">';
      html += '<div class="quickedit-toolbar-label" />';
      html += '</div>';
      html += '<div class="quickedit-toolbar quickedit-toolbar-field clearfix" />';
      html += '</div><div class="quickedit-toolbar-lining"></div></div>';
      return html;
    };
  
    Drupal.theme.quickeditEntityToolbarLabel = function (settings) {
      return '<span class="field">' + Drupal.checkPlain(settings.fieldLabel) + '</span>' + Drupal.checkPlain(settings.entityLabel);
    };
  
    Drupal.theme.quickeditEntityToolbarFence = function () {
      return '<div id="quickedit-toolbar-fence" />';
    };
  
    Drupal.theme.quickeditFieldToolbar = function (settings) {
      return '<div id="' + settings.id + '" />';
    };
  
    Drupal.theme.quickeditToolgroup = function (settings) {
      var classes = settings.classes || [];
      classes.unshift('quickedit-toolgroup');
      var html = '';
      html += '<div class="' + classes.join(' ') + '"';
      if (settings.id) {
        html += ' id="' + settings.id + '"';
      }
      html += '>';
      html += Drupal.theme('quickeditButtons', { buttons: settings.buttons });
      html += '</div>';
      return html;
    };
  
    Drupal.theme.quickeditButtons = function (settings) {
      var html = '';
  
      var _loop = function _loop(i) {
        var button = settings.buttons[i];
        if (!button.hasOwnProperty('type')) {
          button.type = 'button';
        }
  
        var attributes = [];
        var attrMap = settings.buttons[i].attributes || {};
        Object.keys(attrMap).forEach(function (attr) {
          attributes.push(attr + (attrMap[attr] ? '="' + attrMap[attr] + '"' : ''));
        });
        html += '<button type="' + button.type + '" class="' + button.classes + '" ' + attributes.join(' ') + '>' + button.label + '</button>';
      };
  
      for (var i = 0; i < settings.buttons.length; i++) {
        _loop(i);
      }
      return html;
    };
  
    Drupal.theme.quickeditFormContainer = function (settings) {
      var html = '';
      html += '<div id="' + settings.id + '" class="quickedit-form-container">';
      html += '  <div class="quickedit-form">';
      html += '    <div class="placeholder">';
      html += settings.loadingMsg;
      html += '    </div>';
      html += '  </div>';
      html += '</div>';
      return html;
    };
  })(jQuery, Drupal);;
  /*!
   * Bootstrap v3.1.1 (http://getbootstrap.com)
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   */
  if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);;
  /*! SmartMenus jQuery Plugin - v1.0.0-beta1 - June 1, 2015
   * http://www.smartmenus.org/
   * Copyright 2015 Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){function i(i){var r=".smartmenus_mouse";if(h||i)h&&i&&(t(document).unbind(r),h=!1);else{var u=!0,l=null;t(document).bind(o([["mousemove",function(i){var e={x:i.pageX,y:i.pageY,timeStamp:(new Date).getTime()};if(l){var s=Math.abs(l.x-e.x),o=Math.abs(l.y-e.y);if((s>0||o>0)&&2>=s&&2>=o&&300>=e.timeStamp-l.timeStamp&&(n=!0,u)){var r=t(i.target).closest("a");r.is("a")&&t.each(a,function(){return t.contains(this.$root[0],r[0])?(this.itemEnter({currentTarget:r[0]}),!1):void 0}),u=!1}}l=e}],[s()?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut",function(t){e(t.originalEvent)&&(n=!1)}]],r)),h=!0}}function e(t){return!/^(4|mouse)$/.test(t.pointerType)}function s(){return"ontouchstart"in window}function o(i,e){e||(e="");var s={};return t.each(i,function(t,i){s[i[0].split(" ").join(e+" ")+e]=i[1]}),s}var a=[],r=!!window.createPopup,n=!1,h=!1;t.SmartMenus=function(i,e){this.$root=t(i),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.isTouchScrolling=!1,this.wasCollapsible=!1,this.init()},t.extend(t.SmartMenus,{hideAll:function(){t.each(a,function(){this.menuHideAll()})},destroy:function(){for(;a.length;)a[0].destroy();i(!0)},prototype:{init:function(e){var s=this;if(!e){a.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var r=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).bind(o([["mouseover focusin",t.proxy(this.rootOver,this)],["mouseout focusout",t.proxy(this.rootOut,this)],["keydown",t.proxy(this.rootKeyDown,this)]],r)).delegate("a",o([["mouseenter",t.proxy(this.itemEnter,this)],["mouseleave",t.proxy(this.itemLeave,this)],["mousedown",t.proxy(this.itemDown,this)],["focus",t.proxy(this.itemFocus,this)],["blur",t.proxy(this.itemBlur,this)],["click",t.proxy(this.itemClick,this)],["touchend",t.proxy(this.itemTouchEnd,this)]],r)),r+=this.rootId,this.opts.hideOnClick&&t(document).bind(o([["touchstart",t.proxy(this.docTouchStart,this)],["touchmove",t.proxy(this.docTouchMove,this)],["touchend",t.proxy(this.docTouchEnd,this)],["click",t.proxy(this.docClick,this)]],r)),t(window).bind(o([["resize orientationchange",t.proxy(this.winResize,this)]],r)),this.opts.subIndicators&&(this.$subArrow=t("<span/>").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),i()}if(this.$firstSub=this.$root.find("ul").each(function(){s.menuInit(t(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var n=/(index|default)\.[^#\?\/]*/i,h=/#.*/,u=window.location.href.replace(n,""),l=u.replace(h,"");this.$root.find("a").each(function(){var i=this.href.replace(n,""),e=t(this);(i==u||i==l)&&(e.addClass("current"),s.opts.markCurrentTree&&e.parentsUntil("[data-smartmenus-id]","ul").each(function(){t(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(i){if(!i){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").unbind(e).undelegate(e),e+=this.rootId,t(document).unbind(e),t(window).unbind(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var s=this;this.$root.find("ul").each(function(){var i=t(this);i.dataSM("scroll-arrows")&&i.dataSM("scroll-arrows").remove(),i.dataSM("shown-before")&&((s.opts.subMenusMinWidth||s.opts.subMenusMaxWidth)&&i.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),i.dataSM("scroll-arrows")&&i.dataSM("scroll-arrows").remove(),i.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==i.attr("id").indexOf(s.accessIdPrefix)&&i.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("ie-shim").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var i=t(this);0==i.attr("id").indexOf(s.accessIdPrefix)&&i.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),i||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),a.splice(t.inArray(this,a),1))},disable:function(i){if(!this.disabled){if(this.menuHideAll(),!i&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=t('<div class="sm-jquery-disable-overlay"/>').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(i){return this.isTouchScrolling?(this.isTouchScrolling=!1,void 0):((this.visibleSubMenus.length&&!t.contains(this.$root[0],i.target)||t(i.target).is("a"))&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&t.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var i=t.originalEvent.touches[0];this.lastTouch.x2=i.pageX,this.lastTouch.y2=i.pageY}},docTouchStart:function(t){var i=t.originalEvent.touches[0];this.lastTouch={x1:i.pageX,y1:i.pageY,target:i.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(i){for(var e=t(i).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,i){var e;"none"==t.css("display")&&(e={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(i?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=i?t[0].offsetHeight:t[0].offsetWidth),e&&t.hide().css(e),o},getStartZIndex:function(t){var i=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(i)&&(i=parseInt(this.$root.css("z-index"))),isNaN(i)?1:i},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var i=t?"Height":"Width",e=document.documentElement["client"+i],s=window["inner"+i];return s&&(e=Math.min(e,s)),e},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"block"==this.$firstLink.css("display")},isFixed:function(){var i="fixed"==this.$root.css("position");return i||this.$root.parentsUntil("body").each(function(){return"fixed"==t(this).css("position")?(i=!0,!1):void 0}),i},isLinkInMegaMenu:function(i){return t(this.getClosestMenu(i[0])).hasClass("mega-menu")},isTouchMode:function(){return!n||this.isCollapsible()},itemActivate:function(i,e){var s=i.closest("ul"),o=s.dataSM("level");if(o>1&&(!this.activatedItems[o-2]||this.activatedItems[o-2][0]!=s.dataSM("parent-a")[0])){var a=this;t(s.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(s).each(function(){a.itemActivate(t(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[o-1]&&this.activatedItems[o-1][0]==i[0]?o:o-1),this.activatedItems[o-1]=i,this.$root.triggerHandler("activate.smapi",i[0])!==!1){var r=i.dataSM("sub");r&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(r)}},itemBlur:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(i){if(this.isTouchScrolling)return this.isTouchScrolling=!1,i.stopPropagation(),!1;var e=t(i.currentTarget);if(this.handleItemEvents(e)){if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;e.dataSM("href")&&e.attr("href",e.dataSM("href")).removeDataSM("href");var s=t(i.target).is("span.sub-arrow"),o=e.dataSM("sub");if(o&&!o.is(":visible")){if(this.itemActivate(e),o.is(":visible"))return this.focusActivated=!0,!1}else if(this.isCollapsible()&&s)return this.itemActivate(e),this.menuHide(o),!1;return this.opts.showOnClick&&o&&2==o.dataSM("level")?(this.clickActivated=!0,this.menuShow(o),!1):e.hasClass("disabled")?!1:this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(i){var e=t(i.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var s=this;this.showTimeout=setTimeout(function(){s.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(i){var e=t(i.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},itemTouchEnd:function(i){var e=t(i.currentTarget);if(this.handleItemEvents(e)){var s=e.dataSM("sub");"#"!==e.attr("href").charAt(0)&&s&&!s.is(":visible")&&e.dataSM("href",e.attr("href")).attr("href","#")}},menuHide:function(i){if(this.$root.triggerHandler("beforehide.smapi",i[0])!==!1&&(i.stop(!0,!0),"none"!=i.css("display"))){var e=function(){i.css("z-index","")};this.isCollapsible()?this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,i,e):i.hide(this.opts.collapsibleHideDuration,e):this.opts.hideFunction?this.opts.hideFunction.call(this,i,e):i.hide(this.opts.hideDuration,e),i.dataSM("ie-shim")&&i.dataSM("ie-shim").remove(),i.dataSM("scroll")&&(this.menuScrollStop(i),i.css({"touch-action":"","-ms-touch-action":""}).unbind(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),i.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),i.attr({"aria-expanded":"false","aria-hidden":"true"});var s=i.dataSM("level");this.activatedItems.splice(s-1,1),this.visibleSubMenus.splice(t.inArray(i,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",i[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,i=this.visibleSubMenus.length-1;i>=t;i--)this.menuHide(this.visibleSubMenus[i]);this.opts.isPopup&&(this.$root.stop(!0,!0),this.$root.is(":visible")&&(this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").remove())),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0},menuHideSubMenus:function(t){for(var i=this.activatedItems.length-1;i>=t;i--){var e=this.activatedItems[i].dataSM("sub");e&&this.menuHide(e)}},menuIframeShim:function(i){r&&this.opts.overlapControlsInIE&&!i.dataSM("ie-shim")&&i.dataSM("ie-shim",t("<iframe/>").attr({src:"javascript:0",tabindex:-9}).css({position:"absolute",top:"auto",left:"0",opacity:0,border:"0"}))},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var i=2,e=t[0];(e=e.parentNode.parentNode)!=this.$root[0];)i++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",i).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(i){var e,a,r=i.dataSM("parent-a"),n=r.closest("li"),h=n.parent(),u=i.dataSM("level"),l=this.getWidth(i),c=this.getHeight(i),d=r.offset(),m=d.left,p=d.top,f=this.getWidth(r),v=this.getHeight(r),b=t(window),S=b.scrollLeft(),g=b.scrollTop(),M=this.getViewportWidth(),w=this.getViewportHeight(),T=h.hasClass("sm")&&!h.hasClass("sm-vertical"),I=this.opts.rightToLeftSubMenus&&!n.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&n.is("[data-sm-reverse]"),$=2==u?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,x=2==u?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(T?(e=I?f-l-$:$,a=this.opts.bottomToTopSubMenus?-c-x:v+x):(e=I?$-l:f-$,a=this.opts.bottomToTopSubMenus?v-x-c:x),this.opts.keepInViewport){var y=m+e,C=p+a;if(I&&S>y?e=T?S-y+e:f-$:!I&&y+l>S+M&&(e=T?S+M-l-y+e:$-l),T||(w>c&&C+c>g+w?a+=g+w-c-C:(c>=w||g>C)&&(a+=g-C)),T&&(C+c>g+w+.49||g>C)||!T&&c>w+.49){var H=this;i.dataSM("scroll-arrows")||i.dataSM("scroll-arrows",t([t('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0],t('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]).bind({mouseenter:function(){i.dataSM("scroll").up=t(this).hasClass("scroll-up"),H.menuScroll(i)},mouseleave:function(t){H.menuScrollStop(i),H.menuScrollOut(i,t)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(i));var A=".smartmenus_scroll";i.dataSM("scroll",{step:1,itemH:v,subH:c,arrowDownH:this.getHeight(i.dataSM("scroll-arrows").eq(1))}).bind(o([["mouseover",function(t){H.menuScrollOver(i,t)}],["mouseout",function(t){H.menuScrollOut(i,t)}],["mousewheel DOMMouseScroll",function(t){H.menuScrollMousewheel(i,t)}]],A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(i.css("border-left-width"))||0),width:l-(parseInt(i.css("border-left-width"))||0)-(parseInt(i.css("border-right-width"))||0),zIndex:i.css("z-index")}).eq(T&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()&&i.css({"touch-action":"none","-ms-touch-action":"none"}).bind(o([[s()?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp",function(t){H.menuScrollTouch(i,t)}]],A))}}i.css({top:"auto",left:"0",marginLeft:e,marginTop:a-v}),this.menuIframeShim(i),i.dataSM("ie-shim")&&i.dataSM("ie-shim").css({zIndex:i.css("z-index"),width:l,height:c,marginLeft:e,marginTop:a-v})},menuScroll:function(t,i,e){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),r=parseFloat(t.css("margin-top")),h=o.up?o.upEnd:o.downEnd;if(!i&&o.velocity){if(o.velocity*=.9,s=o.velocity,.5>s)return this.menuScrollStop(t),void 0}else s=e||(i||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var u=t.dataSM("level");this.activatedItems[u-1]&&this.activatedItems[u-1].dataSM("sub")&&this.activatedItems[u-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(u-1);var l=o.up&&r>=h||!o.up&&h>=r?r:Math.abs(h-r)>s?r+(o.up?s:-s):h;if(t.add(t.dataSM("ie-shim")).css("margin-top",l),n&&(o.up&&l>o.downEnd||!o.up&&o.upEnd>l)&&a.eq(o.up?1:0).show(),l==h)n&&a.eq(o.up?0:1).hide(),this.menuScrollStop(t);else if(!i){this.opts.scrollAccelerate&&o.step<this.opts.scrollStep&&(o.step+=.5);var c=this;this.scrollTimeout=setTimeout(function(){c.menuScroll(t)},this.opts.scrollInterval)}},menuScrollMousewheel:function(t,i){if(this.getClosestMenu(i.target)==t[0]){i=i.originalEvent;var e=(i.wheelDelta||-i.detail)>0;t.dataSM("scroll-arrows").eq(e?0:1).is(":visible")&&(t.dataSM("scroll").up=e,this.menuScroll(t,!0))}i.preventDefault()},menuScrollOut:function(i,e){n&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(i[0]==e.relatedTarget||t.contains(i[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==i[0]||i.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,i){if(n&&!/^scroll-(up|down)/.test(i.target.className)&&this.getClosestMenu(i.target)==t[0]){this.menuScrollRefreshData(t);var e=t.dataSM("scroll");t.dataSM("scroll-arrows").eq(0).css("margin-top",e.upEnd).end().eq(1).css("margin-top",e.downEnd+e.subH-e.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(i){var e=i.dataSM("scroll"),s=t(window),o=s.scrollTop()-i.dataSM("parent-a").offset().top-e.itemH;t.extend(e,{upEnd:o,downEnd:o+this.getViewportHeight()-e.subH})},menuScrollStop:function(i){return this.scrollTimeout?(clearTimeout(this.scrollTimeout),this.scrollTimeout=0,t.extend(i.dataSM("scroll"),{step:1,velocity:0}),!0):void 0},menuScrollTouch:function(i,s){if(s=s.originalEvent,e(s)){var o=this.getTouchPoint(s);if(this.getClosestMenu(o.target)==i[0]){var a=i.dataSM("scroll");if(/(start|down)$/i.test(s.type))this.menuScrollStop(i)?(s.preventDefault(),this.isTouchScrolling=!0):this.isTouchScrolling=!1,this.menuScrollRefreshData(i),t.extend(a,{touchY:o.pageY,touchTimestamp:s.timeStamp,velocity:0});else if(/move$/i.test(s.type)){var r=a.touchY;void 0!==r&&r!=o.pageY&&(this.isTouchScrolling=!0,t.extend(a,{up:o.pageY>r,touchY:o.pageY,touchTimestamp:s.timeStamp,velocity:a.velocity+.5*Math.abs(o.pageY-r)}),this.menuScroll(i,!0,Math.abs(a.touchY-r))),s.preventDefault()}else void 0!==a.touchY&&(120>s.timeStamp-a.touchTimestamp&&a.velocity>0&&(a.velocity*=.5,this.menuScrollStop(i),this.menuScroll(i),s.preventDefault()),delete a.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0).stop(!0,!0),!t.is(":visible"))){var i=t.dataSM("parent-a");if((this.opts.keepHighlighted||this.isCollapsible())&&i.addClass("highlighted"),this.isCollapsible())t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var e=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),e>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t),t.dataSM("ie-shim")&&t.dataSM("ie-shim").insertBefore(t)}var s=function(){t.css("overflow","")};this.isCollapsible()?this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,s):t.show(this.opts.collapsibleShowDuration,s):this.opts.showFunction?this.opts.showFunction.call(this,t,s):t.show(this.opts.showDuration,s),i.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,i){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0).stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:i}),this.menuIframeShim(this.$root),this.$root.dataSM("ie-shim")&&this.$root.dataSM("ie-shim").css({zIndex:this.$root.css("z-index"),width:this.getWidth(this.$root),height:this.getHeight(this.$root),left:t,top:i}).insertBefore(this.$root);var e=this,s=function(){e.$root.css("overflow","")};this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(i){if(this.handleEvents())switch(i.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var s=e.dataSM("sub");s&&this.menuHide(s)}break;case 32:var o=t(i.target);if(o.is("a")&&this.handleItemEvents(o)){var s=o.dataSM("sub");s&&!s.is(":visible")&&(this.itemClick({currentTarget:i.target}),i.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var i=this;this.hideTimeout=setTimeout(function(){i.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var i=this.isCollapsible();this.wasCollapsible&&i||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=i}}else if(this.$disableOverlay){var e=this.$root.offset();this.$disableOverlay.css({top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),t.fn.dataSM=function(t,i){return i?this.data(t+"_smartmenus",i):this.data(t+"_smartmenus")},t.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},t.fn.smartmenus=function(i){if("string"==typeof i){var e=arguments,s=i;return Array.prototype.shift.call(e),this.each(function(){var i=t(this).data("smartmenus");i&&i[s]&&i[s].apply(i,e)})}var o=t.extend({},t.fn.smartmenus.defaults,i);return this.each(function(){new t.SmartMenus(this,o)})},t.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"prepend",subIndicatorsText:"+",scrollStep:30,scrollInterval:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,i){t.fadeOut(200,i)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,i){t.slideDown(200,i)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,i){t.slideUp(200,i)},showOnClick:!1,hideOnClick:!0,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,overlapControlsInIE:!0}})(jQuery);;
  /* --------------------------------------------- 
  * Filename:     custom.js
  * Version:      1.0.0 (2016-02-27)
  * Website:      http://www.zymphonies.com
  * Description:  Global Script
  * Author:       Zymphonies Team
                  info@zymphonies.com
  -----------------------------------------------*/
  
  jQuery(document).ready(function($){
  
  	//Main menu
  	$('#main-menu').smartmenus();
  	
  	//Mobile menu toggle
  	$('.navbar-toggle').click(function(){
  		$('.region-primary-menu').slideToggle();
  	});
  
  	//Mobile dropdown menu
  	if ( $(window).width() < 767) {
  		$(".region-primary-menu li a:not(.has-submenu)").click(function () {
  			$('.region-primary-menu').hide();
  	    });
  	}
  	
  });;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, drupalSettings) {
    Drupal.behaviors.activeLinks = {
      attach: function attach(context) {
        var path = drupalSettings.path;
        var queryString = JSON.stringify(path.currentQuery);
        var querySelector = path.currentQuery ? '[data-drupal-link-query=\'' + queryString + '\']' : ':not([data-drupal-link-query])';
        var originalSelectors = ['[data-drupal-link-system-path="' + path.currentPath + '"]'];
        var selectors = void 0;
  
        if (path.isFront) {
          originalSelectors.push('[data-drupal-link-system-path="<front>"]');
        }
  
        selectors = [].concat(originalSelectors.map(function (selector) {
          return selector + ':not([hreflang])';
        }), originalSelectors.map(function (selector) {
          return selector + '[hreflang="' + path.currentLanguage + '"]';
        }));
  
        selectors = selectors.map(function (current) {
          return current + querySelector;
        });
  
        var activeLinks = context.querySelectorAll(selectors.join(','));
        var il = activeLinks.length;
        for (var i = 0; i < il; i++) {
          activeLinks[i].classList.add('is-active');
        }
      },
      detach: function detach(context, settings, trigger) {
        if (trigger === 'unload') {
          var activeLinks = context.querySelectorAll('[data-drupal-link-system-path].is-active');
          var il = activeLinks.length;
          for (var i = 0; i < il; i++) {
            activeLinks[i].classList.remove('is-active');
          }
        }
      }
    };
  })(Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings, storage) {
    var currentUserID = parseInt(drupalSettings.user.uid, 10);
  
    var secondsIn30Days = 2592000;
    var thirtyDaysAgo = Math.round(new Date().getTime() / 1000) - secondsIn30Days;
  
    var embeddedLastReadTimestamps = false;
    if (drupalSettings.history && drupalSettings.history.lastReadTimestamps) {
      embeddedLastReadTimestamps = drupalSettings.history.lastReadTimestamps;
    }
  
    Drupal.history = {
      fetchTimestamps: function fetchTimestamps(nodeIDs, callback) {
        if (embeddedLastReadTimestamps) {
          callback();
          return;
        }
  
        $.ajax({
          url: Drupal.url('history/get_node_read_timestamps'),
          type: 'POST',
          data: { 'node_ids[]': nodeIDs },
          dataType: 'json',
          success: function success(results) {
            Object.keys(results || {}).forEach(function (nodeID) {
              storage.setItem('Drupal.history.' + currentUserID + '.' + nodeID, results[nodeID]);
            });
            callback();
          }
        });
      },
      getLastRead: function getLastRead(nodeID) {
        if (embeddedLastReadTimestamps && embeddedLastReadTimestamps[nodeID]) {
          return parseInt(embeddedLastReadTimestamps[nodeID], 10);
        }
        return parseInt(storage.getItem('Drupal.history.' + currentUserID + '.' + nodeID) || 0, 10);
      },
      markAsRead: function markAsRead(nodeID) {
        $.ajax({
          url: Drupal.url('history/' + nodeID + '/read'),
          type: 'POST',
          dataType: 'json',
          success: function success(timestamp) {
            if (embeddedLastReadTimestamps && embeddedLastReadTimestamps[nodeID]) {
              return;
            }
  
            storage.setItem('Drupal.history.' + currentUserID + '.' + nodeID, timestamp);
          }
        });
      },
      needsServerCheck: function needsServerCheck(nodeID, contentTimestamp) {
        if (contentTimestamp < thirtyDaysAgo) {
          return false;
        }
  
        if (embeddedLastReadTimestamps && embeddedLastReadTimestamps[nodeID]) {
          return contentTimestamp > parseInt(embeddedLastReadTimestamps[nodeID], 10);
        }
  
        var minLastReadTimestamp = parseInt(storage.getItem('Drupal.history.' + currentUserID + '.' + nodeID) || 0, 10);
        return contentTimestamp > minLastReadTimestamp;
      }
    };
  })(jQuery, Drupal, drupalSettings, window.localStorage);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (window, Drupal, drupalSettings) {
    window.addEventListener('load', function () {
      if (drupalSettings.history && drupalSettings.history.nodesToMarkAsRead) {
        Object.keys(drupalSettings.history.nodesToMarkAsRead).forEach(Drupal.history.markAsRead);
      }
    });
  })(window, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.behaviors.detailsAria = {
      attach: function attach() {
        $('body').once('detailsAria').on('click.detailsAria', 'summary', function (event) {
          var $summary = $(event.currentTarget);
          var open = $(event.currentTarget.parentNode).attr('open') === 'open' ? 'false' : 'true';
  
          $summary.attr({
            'aria-expanded': open,
            'aria-pressed': open
          });
        });
      }
    };
  })(jQuery, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Modernizr, Drupal) {
    function CollapsibleDetails(node) {
      this.$node = $(node);
      this.$node.data('details', this);
  
      var anchor = location.hash && location.hash !== '#' ? ', ' + location.hash : '';
      if (this.$node.find('.error' + anchor).length) {
        this.$node.attr('open', true);
      }
  
      this.setupSummary();
  
      this.setupLegend();
    }
  
    $.extend(CollapsibleDetails, {
      instances: []
    });
  
    $.extend(CollapsibleDetails.prototype, {
      setupSummary: function setupSummary() {
        this.$summary = $('<span class="summary"></span>');
        this.$node.on('summaryUpdated', $.proxy(this.onSummaryUpdated, this)).trigger('summaryUpdated');
      },
      setupLegend: function setupLegend() {
        var $legend = this.$node.find('> summary');
  
        $('<span class="details-summary-prefix visually-hidden"></span>').append(this.$node.attr('open') ? Drupal.t('Hide') : Drupal.t('Show')).prependTo($legend).after(document.createTextNode(' '));
  
        $('<a class="details-title"></a>').attr('href', '#' + this.$node.attr('id')).prepend($legend.contents()).appendTo($legend);
  
        $legend.append(this.$summary).on('click', $.proxy(this.onLegendClick, this));
      },
      onLegendClick: function onLegendClick(e) {
        this.toggle();
        e.preventDefault();
      },
      onSummaryUpdated: function onSummaryUpdated() {
        var text = $.trim(this.$node.drupalGetSummary());
        this.$summary.html(text ? ' (' + text + ')' : '');
      },
      toggle: function toggle() {
        var _this = this;
  
        var isOpen = !!this.$node.attr('open');
        var $summaryPrefix = this.$node.find('> summary span.details-summary-prefix');
        if (isOpen) {
          $summaryPrefix.html(Drupal.t('Show'));
        } else {
          $summaryPrefix.html(Drupal.t('Hide'));
        }
  
        setTimeout(function () {
          _this.$node.attr('open', !isOpen);
        }, 0);
      }
    });
  
    Drupal.behaviors.collapse = {
      attach: function attach(context) {
        if (Modernizr.details) {
          return;
        }
        var $collapsibleDetails = $(context).find('details').once('collapse').addClass('collapse-processed');
        if ($collapsibleDetails.length) {
          for (var i = 0; i < $collapsibleDetails.length; i++) {
            CollapsibleDetails.instances.push(new CollapsibleDetails($collapsibleDetails[i]));
          }
        }
      }
    };
  
    var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e, $target) {
      $target.parents('details').not('[open]').find('> summary').trigger('click');
    };
  
    $('body').on('formFragmentLinkClickOrHashChange.details', handleFragmentLinkClickOrHashChange);
  
    Drupal.CollapsibleDetails = CollapsibleDetails;
  })(jQuery, Modernizr, Drupal);;
  ;
  /*!
   * jQuery Cycle Plugin (with Transition Definitions)
   * Examples and documentation at: http://jquery.malsup.com/cycle/
   * Copyright (c) 2007-2013 M. Alsup
   * Version: 3.0.3 (11-JUL-2013)
   * Dual licensed under the MIT and GPL licenses.
   * http://jquery.malsup.com/license.html
   * Requires: jQuery v1.7.1 or later
   */
  ;(function($, undefined) {
  "use strict";
  
  var ver = '3.0.3';
  
  function debug(s) {
  	if ($.fn.cycle.debug)
  		log(s);
  }		
  function log() {
  	/*global console */
  	if (window.console && console.log)
  		console.log('[cycle] ' + Array.prototype.join.call(arguments,' '));
  }
  $.expr[':'].paused = function(el) {
  	return el.cyclePause;
  };
  
  
  // the options arg can be...
  //   a number  - indicates an immediate transition should occur to the given slide index
  //   a string  - 'pause', 'resume', 'toggle', 'next', 'prev', 'stop', 'destroy' or the name of a transition effect (ie, 'fade', 'zoom', etc)
  //   an object - properties to control the slideshow
  //
  // the arg2 arg can be...
  //   the name of an fx (only used in conjunction with a numeric value for 'options')
  //   the value true (only used in first arg == 'resume') and indicates
  //	 that the resume should occur immediately (not wait for next timeout)
  
  $.fn.cycle = function(options, arg2) {
  	var o = { s: this.selector, c: this.context };
  
  	// in 1.3+ we can fix mistakes with the ready state
  	if (this.length === 0 && options != 'stop') {
  		if (!$.isReady && o.s) {
  			log('DOM not ready, queuing slideshow');
  			$(function() {
  				$(o.s,o.c).cycle(options,arg2);
  			});
  			return this;
  		}
  		// is your DOM ready?  http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
  		log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
  		return this;
  	}
  
  	// iterate the matched nodeset
  	return this.each(function() {
  		var opts = handleArguments(this, options, arg2);
  		if (opts === false)
  			return;
  
  		opts.updateActivePagerLink = opts.updateActivePagerLink || $.fn.cycle.updateActivePagerLink;
  		
  		// stop existing slideshow for this container (if there is one)
  		if (this.cycleTimeout)
  			clearTimeout(this.cycleTimeout);
  		this.cycleTimeout = this.cyclePause = 0;
  		this.cycleStop = 0; // issue #108
  
  		var $cont = $(this);
  		var $slides = opts.slideExpr ? $(opts.slideExpr, this) : $cont.children();
  		var els = $slides.get();
  
  		if (els.length < 2) {
  			log('terminating; too few slides: ' + els.length);
  			return;
  		}
  
  		var opts2 = buildOptions($cont, $slides, els, opts, o);
  		if (opts2 === false)
  			return;
  
  		var startTime = opts2.continuous ? 10 : getTimeout(els[opts2.currSlide], els[opts2.nextSlide], opts2, !opts2.backwards);
  
  		// if it's an auto slideshow, kick it off
  		if (startTime) {
  			startTime += (opts2.delay || 0);
  			if (startTime < 10)
  				startTime = 10;
  			debug('first timeout: ' + startTime);
  			this.cycleTimeout = setTimeout(function(){go(els,opts2,0,!opts.backwards);}, startTime);
  		}
  	});
  };
  
  function triggerPause(cont, byHover, onPager) {
  	var opts = $(cont).data('cycle.opts');
  	if (!opts)
  		return;
  	var paused = !!cont.cyclePause;
  	if (paused && opts.paused)
  		opts.paused(cont, opts, byHover, onPager);
  	else if (!paused && opts.resumed)
  		opts.resumed(cont, opts, byHover, onPager);
  }
  
  // process the args that were passed to the plugin fn
  function handleArguments(cont, options, arg2) {
  	if (cont.cycleStop === undefined)
  		cont.cycleStop = 0;
  	if (options === undefined || options === null)
  		options = {};
  	if (options.constructor == String) {
  		switch(options) {
  		case 'destroy':
  		case 'stop':
  			var opts = $(cont).data('cycle.opts');
  			if (!opts)
  				return false;
  			cont.cycleStop++; // callbacks look for change
  			if (cont.cycleTimeout)
  				clearTimeout(cont.cycleTimeout);
  			cont.cycleTimeout = 0;
  			if (opts.elements)
  				$(opts.elements).stop();
  			$(cont).removeData('cycle.opts');
  			if (options == 'destroy')
  				destroy(cont, opts);
  			return false;
  		case 'toggle':
  			cont.cyclePause = (cont.cyclePause === 1) ? 0 : 1;
  			checkInstantResume(cont.cyclePause, arg2, cont);
  			triggerPause(cont);
  			return false;
  		case 'pause':
  			cont.cyclePause = 1;
  			triggerPause(cont);
  			return false;
  		case 'resume':
  			cont.cyclePause = 0;
  			checkInstantResume(false, arg2, cont);
  			triggerPause(cont);
  			return false;
  		case 'prev':
  		case 'next':
  			opts = $(cont).data('cycle.opts');
  			if (!opts) {
  				log('options not found, "prev/next" ignored');
  				return false;
  			}
  			if (typeof arg2 == 'string') 
  				opts.oneTimeFx = arg2;
  			$.fn.cycle[options](opts);
  			return false;
  		default:
  			options = { fx: options };
  		}
  		return options;
  	}
  	else if (options.constructor == Number) {
  		// go to the requested slide
  		var num = options;
  		options = $(cont).data('cycle.opts');
  		if (!options) {
  			log('options not found, can not advance slide');
  			return false;
  		}
  		if (num < 0 || num >= options.elements.length) {
  			log('invalid slide index: ' + num);
  			return false;
  		}
  		options.nextSlide = num;
  		if (cont.cycleTimeout) {
  			clearTimeout(cont.cycleTimeout);
  			cont.cycleTimeout = 0;
  		}
  		if (typeof arg2 == 'string')
  			options.oneTimeFx = arg2;
  		go(options.elements, options, 1, num >= options.currSlide);
  		return false;
  	}
  	return options;
  	
  	function checkInstantResume(isPaused, arg2, cont) {
  		if (!isPaused && arg2 === true) { // resume now!
  			var options = $(cont).data('cycle.opts');
  			if (!options) {
  				log('options not found, can not resume');
  				return false;
  			}
  			if (cont.cycleTimeout) {
  				clearTimeout(cont.cycleTimeout);
  				cont.cycleTimeout = 0;
  			}
  			go(options.elements, options, 1, !options.backwards);
  		}
  	}
  }
  
  function removeFilter(el, opts) {
  	if (!$.support.opacity && opts.cleartype && el.style.filter) {
  		try { el.style.removeAttribute('filter'); }
  		catch(smother) {} // handle old opera versions
  	}
  }
  
  // unbind event handlers
  function destroy(cont, opts) {
  	if (opts.next)
  		$(opts.next).unbind(opts.prevNextEvent);
  	if (opts.prev)
  		$(opts.prev).unbind(opts.prevNextEvent);
  	
  	if (opts.pager || opts.pagerAnchorBuilder)
  		$.each(opts.pagerAnchors || [], function() {
  			this.unbind().remove();
  		});
  	opts.pagerAnchors = null;
  	$(cont).unbind('mouseenter.cycle mouseleave.cycle');
  	if (opts.destroy) // callback
  		opts.destroy(opts);
  }
  
  // one-time initialization
  function buildOptions($cont, $slides, els, options, o) {
  	var startingSlideSpecified;
  	// support metadata plugin (v1.0 and v2.0)
  	var opts = $.extend({}, $.fn.cycle.defaults, options || {}, $.metadata ? $cont.metadata() : $.meta ? $cont.data() : {});
  	var meta = $.isFunction($cont.data) ? $cont.data(opts.metaAttr) : null;
  	if (meta)
  		opts = $.extend(opts, meta);
  	if (opts.autostop)
  		opts.countdown = opts.autostopCount || els.length;
  
  	var cont = $cont[0];
  	$cont.data('cycle.opts', opts);
  	opts.$cont = $cont;
  	opts.stopCount = cont.cycleStop;
  	opts.elements = els;
  	opts.before = opts.before ? [opts.before] : [];
  	opts.after = opts.after ? [opts.after] : [];
  
  	// push some after callbacks
  	if (!$.support.opacity && opts.cleartype)
  		opts.after.push(function() { removeFilter(this, opts); });
  	if (opts.continuous)
  		opts.after.push(function() { go(els,opts,0,!opts.backwards); });
  
  	saveOriginalOpts(opts);
  
  	// clearType corrections
  	if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
  		clearTypeFix($slides);
  
  	// container requires non-static position so that slides can be position within
  	if ($cont.css('position') == 'static')
  		$cont.css('position', 'relative');
  	if (opts.width)
  		$cont.width(opts.width);
  	if (opts.height && opts.height != 'auto')
  		$cont.height(opts.height);
  
  	if (opts.startingSlide !== undefined) {
  		opts.startingSlide = parseInt(opts.startingSlide,10);
  		if (opts.startingSlide >= els.length || opts.startSlide < 0)
  			opts.startingSlide = 0; // catch bogus input
  		else 
  			startingSlideSpecified = true;
  	}
  	else if (opts.backwards)
  		opts.startingSlide = els.length - 1;
  	else
  		opts.startingSlide = 0;
  
  	// if random, mix up the slide array
  	if (opts.random) {
  		opts.randomMap = [];
  		for (var i = 0; i < els.length; i++)
  			opts.randomMap.push(i);
  		opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
  		if (startingSlideSpecified) {
  			// try to find the specified starting slide and if found set start slide index in the map accordingly
  			for ( var cnt = 0; cnt < els.length; cnt++ ) {
  				if ( opts.startingSlide == opts.randomMap[cnt] ) {
  					opts.randomIndex = cnt;
  				}
  			}
  		}
  		else {
  			opts.randomIndex = 1;
  			opts.startingSlide = opts.randomMap[1];
  		}
  	}
  	else if (opts.startingSlide >= els.length)
  		opts.startingSlide = 0; // catch bogus input
  	opts.currSlide = opts.startingSlide || 0;
  	var first = opts.startingSlide;
  
  	// set position and zIndex on all the slides
  	$slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i) {
  		var z;
  		if (opts.backwards)
  			z = first ? i <= first ? els.length + (i-first) : first-i : els.length-i;
  		else
  			z = first ? i >= first ? els.length - (i-first) : first-i : els.length-i;
  		$(this).css('z-index', z);
  	});
  
  	// make sure first slide is visible
  	$(els[first]).css('opacity',1).show(); // opacity bit needed to handle restart use case
  	removeFilter(els[first], opts);
  
  	// stretch slides
  	if (opts.fit) {
  		if (!opts.aspect) {
  	        if (opts.width)
  	            $slides.width(opts.width);
  	        if (opts.height && opts.height != 'auto')
  	            $slides.height(opts.height);
  		} else {
  			$slides.each(function(){
  				var $slide = $(this);
  				var ratio = (opts.aspect === true) ? $slide.width()/$slide.height() : opts.aspect;
  				if( opts.width && $slide.width() != opts.width ) {
  					$slide.width( opts.width );
  					$slide.height( opts.width / ratio );
  				}
  
  				if( opts.height && $slide.height() < opts.height ) {
  					$slide.height( opts.height );
  					$slide.width( opts.height * ratio );
  				}
  			});
  		}
  	}
  
  	if (opts.center && ((!opts.fit) || opts.aspect)) {
  		$slides.each(function(){
  			var $slide = $(this);
  			$slide.css({
  				"margin-left": opts.width ?
  					((opts.width - $slide.width()) / 2) + "px" :
  					0,
  				"margin-top": opts.height ?
  					((opts.height - $slide.height()) / 2) + "px" :
  					0
  			});
  		});
  	}
  
  	if (opts.center && !opts.fit && !opts.slideResize) {
  		$slides.each(function(){
  			var $slide = $(this);
  			$slide.css({
  				"margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0,
  				"margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0
  			});
  		});
  	}
  		
  	// stretch container
  	var reshape = (opts.containerResize || opts.containerResizeHeight) && $cont.innerHeight() < 1;
  	if (reshape) { // do this only if container has no size http://tinyurl.com/da2oa9
  		var maxw = 0, maxh = 0;
  		for(var j=0; j < els.length; j++) {
  			var $e = $(els[j]), e = $e[0], w = $e.outerWidth(), h = $e.outerHeight();
  			if (!w) w = e.offsetWidth || e.width || $e.attr('width');
  			if (!h) h = e.offsetHeight || e.height || $e.attr('height');
  			maxw = w > maxw ? w : maxw;
  			maxh = h > maxh ? h : maxh;
  		}
  		if (opts.containerResize && maxw > 0 && maxh > 0)
  			$cont.css({width:maxw+'px',height:maxh+'px'});
  		if (opts.containerResizeHeight && maxh > 0)
  			$cont.css({height:maxh+'px'});
  	}
  
  	var pauseFlag = false;  // https://github.com/malsup/cycle/issues/44
  	if (opts.pause)
  		$cont.bind('mouseenter.cycle', function(){
  			pauseFlag = true;
  			this.cyclePause++;
  			triggerPause(cont, true);
  		}).bind('mouseleave.cycle', function(){
  				if (pauseFlag)
  					this.cyclePause--;
  				triggerPause(cont, true);
  		});
  
  	if (supportMultiTransitions(opts) === false)
  		return false;
  
  	// apparently a lot of people use image slideshows without height/width attributes on the images.
  	// Cycle 2.50+ requires the sizing info for every slide; this block tries to deal with that.
  	var requeue = false;
  	options.requeueAttempts = options.requeueAttempts || 0;
  	$slides.each(function() {
  		// try to get height/width of each slide
  		var $el = $(this);
  		this.cycleH = (opts.fit && opts.height) ? opts.height : ($el.height() || this.offsetHeight || this.height || $el.attr('height') || 0);
  		this.cycleW = (opts.fit && opts.width) ? opts.width : ($el.width() || this.offsetWidth || this.width || $el.attr('width') || 0);
  
  		if ( $el.is('img') ) {
  			var loading = (this.cycleH === 0 && this.cycleW === 0 && !this.complete);
  			// don't requeue for images that are still loading but have a valid size
  			if (loading) {
  				if (o.s && opts.requeueOnImageNotLoaded && ++options.requeueAttempts < 100) { // track retry count so we don't loop forever
  					log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH);
  					setTimeout(function() {$(o.s,o.c).cycle(options);}, opts.requeueTimeout);
  					requeue = true;
  					return false; // break each loop
  				}
  				else {
  					log('could not determine size of image: '+this.src, this.cycleW, this.cycleH);
  				}
  			}
  		}
  		return true;
  	});
  
  	if (requeue)
  		return false;
  
  	opts.cssBefore = opts.cssBefore || {};
  	opts.cssAfter = opts.cssAfter || {};
  	opts.cssFirst = opts.cssFirst || {};
  	opts.animIn = opts.animIn || {};
  	opts.animOut = opts.animOut || {};
  
  	$slides.not(':eq('+first+')').css(opts.cssBefore);
  	$($slides[first]).css(opts.cssFirst);
  
  	if (opts.timeout) {
  		opts.timeout = parseInt(opts.timeout,10);
  		// ensure that timeout and speed settings are sane
  		if (opts.speed.constructor == String)
  			opts.speed = $.fx.speeds[opts.speed] || parseInt(opts.speed,10);
  		if (!opts.sync)
  			opts.speed = opts.speed / 2;
  		
  		var buffer = opts.fx == 'none' ? 0 : opts.fx == 'shuffle' ? 500 : 250;
  		while((opts.timeout - opts.speed) < buffer) // sanitize timeout
  			opts.timeout += opts.speed;
  	}
  	if (opts.easing)
  		opts.easeIn = opts.easeOut = opts.easing;
  	if (!opts.speedIn)
  		opts.speedIn = opts.speed;
  	if (!opts.speedOut)
  		opts.speedOut = opts.speed;
  
  	opts.slideCount = els.length;
  	opts.currSlide = opts.lastSlide = first;
  	if (opts.random) {
  		if (++opts.randomIndex == els.length)
  			opts.randomIndex = 0;
  		opts.nextSlide = opts.randomMap[opts.randomIndex];
  	}
  	else if (opts.backwards)
  		opts.nextSlide = opts.startingSlide === 0 ? (els.length-1) : opts.startingSlide-1;
  	else
  		opts.nextSlide = opts.startingSlide >= (els.length-1) ? 0 : opts.startingSlide+1;
  
  	// run transition init fn
  	if (!opts.multiFx) {
  		var init = $.fn.cycle.transitions[opts.fx];
  		if ($.isFunction(init))
  			init($cont, $slides, opts);
  		else if (opts.fx != 'custom' && !opts.multiFx) {
  			log('unknown transition: ' + opts.fx,'; slideshow terminating');
  			return false;
  		}
  	}
  
  	// fire artificial events
  	var e0 = $slides[first];
  	if (!opts.skipInitializationCallbacks) {
  		if (opts.before.length)
  			opts.before[0].apply(e0, [e0, e0, opts, true]);
  		if (opts.after.length)
  			opts.after[0].apply(e0, [e0, e0, opts, true]);
  	}
  	if (opts.next)
  		$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});
  	if (opts.prev)
  		$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});
  	if (opts.pager || opts.pagerAnchorBuilder)
  		buildPager(els,opts);
  
  	exposeAddSlide(opts, els);
  
  	return opts;
  }
  
  // save off original opts so we can restore after clearing state
  function saveOriginalOpts(opts) {
  	opts.original = { before: [], after: [] };
  	opts.original.cssBefore = $.extend({}, opts.cssBefore);
  	opts.original.cssAfter  = $.extend({}, opts.cssAfter);
  	opts.original.animIn	= $.extend({}, opts.animIn);
  	opts.original.animOut   = $.extend({}, opts.animOut);
  	$.each(opts.before, function() { opts.original.before.push(this); });
  	$.each(opts.after,  function() { opts.original.after.push(this); });
  }
  
  function supportMultiTransitions(opts) {
  	var i, tx, txs = $.fn.cycle.transitions;
  	// look for multiple effects
  	if (opts.fx.indexOf(',') > 0) {
  		opts.multiFx = true;
  		opts.fxs = opts.fx.replace(/\s*/g,'').split(',');
  		// discard any bogus effect names
  		for (i=0; i < opts.fxs.length; i++) {
  			var fx = opts.fxs[i];
  			tx = txs[fx];
  			if (!tx || !txs.hasOwnProperty(fx) || !$.isFunction(tx)) {
  				log('discarding unknown transition: ',fx);
  				opts.fxs.splice(i,1);
  				i--;
  			}
  		}
  		// if we have an empty list then we threw everything away!
  		if (!opts.fxs.length) {
  			log('No valid transitions named; slideshow terminating.');
  			return false;
  		}
  	}
  	else if (opts.fx == 'all') {  // auto-gen the list of transitions
  		opts.multiFx = true;
  		opts.fxs = [];
  		for (var p in txs) {
  			if (txs.hasOwnProperty(p)) {
  				tx = txs[p];
  				if (txs.hasOwnProperty(p) && $.isFunction(tx))
  					opts.fxs.push(p);
  			}
  		}
  	}
  	if (opts.multiFx && opts.randomizeEffects) {
  		// munge the fxs array to make effect selection random
  		var r1 = Math.floor(Math.random() * 20) + 30;
  		for (i = 0; i < r1; i++) {
  			var r2 = Math.floor(Math.random() * opts.fxs.length);
  			opts.fxs.push(opts.fxs.splice(r2,1)[0]);
  		}
  		debug('randomized fx sequence: ',opts.fxs);
  	}
  	return true;
  }
  
  // provide a mechanism for adding slides after the slideshow has started
  function exposeAddSlide(opts, els) {
  	opts.addSlide = function(newSlide, prepend) {
  		var $s = $(newSlide), s = $s[0];
  		if (!opts.autostopCount)
  			opts.countdown++;
  		els[prepend?'unshift':'push'](s);
  		if (opts.els)
  			opts.els[prepend?'unshift':'push'](s); // shuffle needs this
  		opts.slideCount = els.length;
  
  		// add the slide to the random map and resort
  		if (opts.random) {
  			opts.randomMap.push(opts.slideCount-1);
  			opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
  		}
  
  		$s.css('position','absolute');
  		$s[prepend?'prependTo':'appendTo'](opts.$cont);
  
  		if (prepend) {
  			opts.currSlide++;
  			opts.nextSlide++;
  		}
  
  		if (!$.support.opacity && opts.cleartype && !opts.cleartypeNoBg)
  			clearTypeFix($s);
  
  		if (opts.fit && opts.width)
  			$s.width(opts.width);
  		if (opts.fit && opts.height && opts.height != 'auto')
  			$s.height(opts.height);
  		s.cycleH = (opts.fit && opts.height) ? opts.height : $s.height();
  		s.cycleW = (opts.fit && opts.width) ? opts.width : $s.width();
  
  		$s.css(opts.cssBefore);
  
  		if (opts.pager || opts.pagerAnchorBuilder)
  			$.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts);
  
  		if ($.isFunction(opts.onAddSlide))
  			opts.onAddSlide($s);
  		else
  			$s.hide(); // default behavior
  	};
  }
  
  // reset internal state; we do this on every pass in order to support multiple effects
  $.fn.cycle.resetState = function(opts, fx) {
  	fx = fx || opts.fx;
  	opts.before = []; opts.after = [];
  	opts.cssBefore = $.extend({}, opts.original.cssBefore);
  	opts.cssAfter  = $.extend({}, opts.original.cssAfter);
  	opts.animIn	= $.extend({}, opts.original.animIn);
  	opts.animOut   = $.extend({}, opts.original.animOut);
  	opts.fxFn = null;
  	$.each(opts.original.before, function() { opts.before.push(this); });
  	$.each(opts.original.after,  function() { opts.after.push(this); });
  
  	// re-init
  	var init = $.fn.cycle.transitions[fx];
  	if ($.isFunction(init))
  		init(opts.$cont, $(opts.elements), opts);
  };
  
  // this is the main engine fn, it handles the timeouts, callbacks and slide index mgmt
  function go(els, opts, manual, fwd) {
  	var p = opts.$cont[0], curr = els[opts.currSlide], next = els[opts.nextSlide];
  
  	// opts.busy is true if we're in the middle of an animation
  	if (manual && opts.busy && opts.manualTrump) {
  		// let manual transitions requests trump active ones
  		debug('manualTrump in go(), stopping active transition');
  		$(els).stop(true,true);
  		opts.busy = 0;
  		clearTimeout(p.cycleTimeout);
  	}
  
  	// don't begin another timeout-based transition if there is one active
  	if (opts.busy) {
  		debug('transition active, ignoring new tx request');
  		return;
  	}
  
  
  	// stop cycling if we have an outstanding stop request
  	if (p.cycleStop != opts.stopCount || p.cycleTimeout === 0 && !manual)
  		return;
  
  	// check to see if we should stop cycling based on autostop options
  	if (!manual && !p.cyclePause && !opts.bounce &&
  		((opts.autostop && (--opts.countdown <= 0)) ||
  		(opts.nowrap && !opts.random && opts.nextSlide < opts.currSlide))) {
  		if (opts.end)
  			opts.end(opts);
  		return;
  	}
  
  	// if slideshow is paused, only transition on a manual trigger
  	var changed = false;
  	if ((manual || !p.cyclePause) && (opts.nextSlide != opts.currSlide)) {
  		changed = true;
  		var fx = opts.fx;
  		// keep trying to get the slide size if we don't have it yet
  		curr.cycleH = curr.cycleH || $(curr).height();
  		curr.cycleW = curr.cycleW || $(curr).width();
  		next.cycleH = next.cycleH || $(next).height();
  		next.cycleW = next.cycleW || $(next).width();
  
  		// support multiple transition types
  		if (opts.multiFx) {
  			if (fwd && (opts.lastFx === undefined || ++opts.lastFx >= opts.fxs.length))
  				opts.lastFx = 0;
  			else if (!fwd && (opts.lastFx === undefined || --opts.lastFx < 0))
  				opts.lastFx = opts.fxs.length - 1;
  			fx = opts.fxs[opts.lastFx];
  		}
  
  		// one-time fx overrides apply to:  $('div').cycle(3,'zoom');
  		if (opts.oneTimeFx) {
  			fx = opts.oneTimeFx;
  			opts.oneTimeFx = null;
  		}
  
  		$.fn.cycle.resetState(opts, fx);
  
  		// run the before callbacks
  		if (opts.before.length)
  			$.each(opts.before, function(i,o) {
  				if (p.cycleStop != opts.stopCount) return;
  				o.apply(next, [curr, next, opts, fwd]);
  			});
  
  		// stage the after callacks
  		var after = function() {
  			opts.busy = 0;
  			$.each(opts.after, function(i,o) {
  				if (p.cycleStop != opts.stopCount) return;
  				o.apply(next, [curr, next, opts, fwd]);
  			});
  			if (!p.cycleStop) {
  				// queue next transition
  				queueNext();
  			}
  		};
  
  		debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide);
  		
  		// get ready to perform the transition
  		opts.busy = 1;
  		if (opts.fxFn) // fx function provided?
  			opts.fxFn(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  		else if ($.isFunction($.fn.cycle[opts.fx])) // fx plugin ?
  			$.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  		else
  			$.fn.cycle.custom(curr, next, opts, after, fwd, manual && opts.fastOnEvent);
  	}
  	else {
  		queueNext();
  	}
  
  	if (changed || opts.nextSlide == opts.currSlide) {
  		// calculate the next slide
  		var roll;
  		opts.lastSlide = opts.currSlide;
  		if (opts.random) {
  			opts.currSlide = opts.nextSlide;
  			if (++opts.randomIndex == els.length) {
  				opts.randomIndex = 0;
  				opts.randomMap.sort(function(a,b) {return Math.random() - 0.5;});
  			}
  			opts.nextSlide = opts.randomMap[opts.randomIndex];
  			if (opts.nextSlide == opts.currSlide)
  				opts.nextSlide = (opts.currSlide == opts.slideCount - 1) ? 0 : opts.currSlide + 1;
  		}
  		else if (opts.backwards) {
  			roll = (opts.nextSlide - 1) < 0;
  			if (roll && opts.bounce) {
  				opts.backwards = !opts.backwards;
  				opts.nextSlide = 1;
  				opts.currSlide = 0;
  			}
  			else {
  				opts.nextSlide = roll ? (els.length-1) : opts.nextSlide-1;
  				opts.currSlide = roll ? 0 : opts.nextSlide+1;
  			}
  		}
  		else { // sequence
  			roll = (opts.nextSlide + 1) == els.length;
  			if (roll && opts.bounce) {
  				opts.backwards = !opts.backwards;
  				opts.nextSlide = els.length-2;
  				opts.currSlide = els.length-1;
  			}
  			else {
  				opts.nextSlide = roll ? 0 : opts.nextSlide+1;
  				opts.currSlide = roll ? els.length-1 : opts.nextSlide-1;
  			}
  		}
  	}
  	if (changed && opts.pager)
  		opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass);
  	
  	function queueNext() {
  		// stage the next transition
  		var ms = 0, timeout = opts.timeout;
  		if (opts.timeout && !opts.continuous) {
  			ms = getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd);
           if (opts.fx == 'shuffle')
              ms -= opts.speedOut;
        }
  		else if (opts.continuous && p.cyclePause) // continuous shows work off an after callback, not this timer logic
  			ms = 10;
  		if (ms > 0)
  			p.cycleTimeout = setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms);
  	}
  }
  
  // invoked after transition
  $.fn.cycle.updateActivePagerLink = function(pager, currSlide, clsName) {
     $(pager).each(function() {
         $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);
     });
  };
  
  // calculate timeout value for current transition
  function getTimeout(curr, next, opts, fwd) {
  	if (opts.timeoutFn) {
  		// call user provided calc fn
  		var t = opts.timeoutFn.call(curr,curr,next,opts,fwd);
  		while (opts.fx != 'none' && (t - opts.speed) < 250) // sanitize timeout
  			t += opts.speed;
  		debug('calculated timeout: ' + t + '; speed: ' + opts.speed);
  		if (t !== false)
  			return t;
  	}
  	return opts.timeout;
  }
  
  // expose next/prev function, caller must pass in state
  $.fn.cycle.next = function(opts) { advance(opts,1); };
  $.fn.cycle.prev = function(opts) { advance(opts,0);};
  
  // advance slide forward or back
  function advance(opts, moveForward) {
  	var val = moveForward ? 1 : -1;
  	var els = opts.elements;
  	var p = opts.$cont[0], timeout = p.cycleTimeout;
  	if (timeout) {
  		clearTimeout(timeout);
  		p.cycleTimeout = 0;
  	}
  	if (opts.random && val < 0) {
  		// move back to the previously display slide
  		opts.randomIndex--;
  		if (--opts.randomIndex == -2)
  			opts.randomIndex = els.length-2;
  		else if (opts.randomIndex == -1)
  			opts.randomIndex = els.length-1;
  		opts.nextSlide = opts.randomMap[opts.randomIndex];
  	}
  	else if (opts.random) {
  		opts.nextSlide = opts.randomMap[opts.randomIndex];
  	}
  	else {
  		opts.nextSlide = opts.currSlide + val;
  		if (opts.nextSlide < 0) {
  			if (opts.nowrap) return false;
  			opts.nextSlide = els.length - 1;
  		}
  		else if (opts.nextSlide >= els.length) {
  			if (opts.nowrap) return false;
  			opts.nextSlide = 0;
  		}
  	}
  
  	var cb = opts.onPrevNextEvent || opts.prevNextClick; // prevNextClick is deprecated
  	if ($.isFunction(cb))
  		cb(val > 0, opts.nextSlide, els[opts.nextSlide]);
  	go(els, opts, 1, moveForward);
  	return false;
  }
  
  function buildPager(els, opts) {
  	var $p = $(opts.pager);
  	$.each(els, function(i,o) {
  		$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
  	});
  	opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass);
  }
  
  $.fn.cycle.createPagerAnchor = function(i, el, $p, els, opts) {
  	var a;
  	if ($.isFunction(opts.pagerAnchorBuilder)) {
  		a = opts.pagerAnchorBuilder(i,el);
  		debug('pagerAnchorBuilder('+i+', el) returned: ' + a);
  	}
  	else
  		a = '<a href="#">'+(i+1)+'</a>';
  		
  	if (!a)
  		return;
  	var $a = $(a);
  	// don't reparent if anchor is in the dom
  	if ($a.parents('body').length === 0) {
  		var arr = [];
  		if ($p.length > 1) {
  			$p.each(function() {
  				var $clone = $a.clone(true);
  				$(this).append($clone);
  				arr.push($clone[0]);
  			});
  			$a = $(arr);
  		}
  		else {
  			$a.appendTo($p);
  		}
  	}
  
  	opts.pagerAnchors =  opts.pagerAnchors || [];
  	opts.pagerAnchors.push($a);
  	
  	var pagerFn = function(e) {
  		e.preventDefault();
  		opts.nextSlide = i;
  		var p = opts.$cont[0], timeout = p.cycleTimeout;
  		if (timeout) {
  			clearTimeout(timeout);
  			p.cycleTimeout = 0;
  		}
  		var cb = opts.onPagerEvent || opts.pagerClick; // pagerClick is deprecated
  		if ($.isFunction(cb))
  			cb(opts.nextSlide, els[opts.nextSlide]);
  		go(els,opts,1,opts.currSlide < i); // trigger the trans
  //		return false; // <== allow bubble
  	};
  	
  	if ( /mouseenter|mouseover/i.test(opts.pagerEvent) ) {
  		$a.hover(pagerFn, function(){/* no-op */} );
  	}
  	else {
  		$a.bind(opts.pagerEvent, pagerFn);
  	}
  	
  	if ( ! /^click/.test(opts.pagerEvent) && !opts.allowPagerClickBubble)
  		$a.bind('click.cycle', function(){return false;}); // suppress click
  	
  	var cont = opts.$cont[0];
  	var pauseFlag = false; // https://github.com/malsup/cycle/issues/44
  	if (opts.pauseOnPagerHover) {
  		$a.hover(
  			function() { 
  				pauseFlag = true;
  				cont.cyclePause++; 
  				triggerPause(cont,true,true);
  			}, function() { 
  				if (pauseFlag)
  					cont.cyclePause--; 
  				triggerPause(cont,true,true);
  			} 
  		);
  	}
  };
  
  // helper fn to calculate the number of slides between the current and the next
  $.fn.cycle.hopsFromLast = function(opts, fwd) {
  	var hops, l = opts.lastSlide, c = opts.currSlide;
  	if (fwd)
  		hops = c > l ? c - l : opts.slideCount - l;
  	else
  		hops = c < l ? l - c : l + opts.slideCount - c;
  	return hops;
  };
  
  // fix clearType problems in ie6 by setting an explicit bg color
  // (otherwise text slides look horrible during a fade transition)
  function clearTypeFix($slides) {
  	debug('applying clearType background-color hack');
  	function hex(s) {
  		s = parseInt(s,10).toString(16);
  		return s.length < 2 ? '0'+s : s;
  	}
  	function getBg(e) {
  		for ( ; e && e.nodeName.toLowerCase() != 'html'; e = e.parentNode) {
  			var v = $.css(e,'background-color');
  			if (v && v.indexOf('rgb') >= 0 ) {
  				var rgb = v.match(/\d+/g);
  				return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]);
  			}
  			if (v && v != 'transparent')
  				return v;
  		}
  		return '#ffffff';
  	}
  	$slides.each(function() { $(this).css('background-color', getBg(this)); });
  }
  
  // reset common props before the next transition
  $.fn.cycle.commonReset = function(curr,next,opts,w,h,rev) {
  	$(opts.elements).not(curr).hide();
  	if (typeof opts.cssBefore.opacity == 'undefined')
  		opts.cssBefore.opacity = 1;
  	opts.cssBefore.display = 'block';
  	if (opts.slideResize && w !== false && next.cycleW > 0)
  		opts.cssBefore.width = next.cycleW;
  	if (opts.slideResize && h !== false && next.cycleH > 0)
  		opts.cssBefore.height = next.cycleH;
  	opts.cssAfter = opts.cssAfter || {};
  	opts.cssAfter.display = 'none';
  	$(curr).css('zIndex',opts.slideCount + (rev === true ? 1 : 0));
  	$(next).css('zIndex',opts.slideCount + (rev === true ? 0 : 1));
  };
  
  // the actual fn for effecting a transition
  $.fn.cycle.custom = function(curr, next, opts, cb, fwd, speedOverride) {
  	var $l = $(curr), $n = $(next);
  	var speedIn = opts.speedIn, speedOut = opts.speedOut, easeIn = opts.easeIn, easeOut = opts.easeOut, animInDelay = opts.animInDelay, animOutDelay = opts.animOutDelay;
  	$n.css(opts.cssBefore);
  	if (speedOverride) {
  		if (typeof speedOverride == 'number')
  			speedIn = speedOut = speedOverride;
  		else
  			speedIn = speedOut = 1;
  		easeIn = easeOut = null;
  	}
  	var fn = function() {
  		$n.delay(animInDelay).animate(opts.animIn, speedIn, easeIn, function() {
  			cb();
  		});
  	};
  	$l.delay(animOutDelay).animate(opts.animOut, speedOut, easeOut, function() {
  		$l.css(opts.cssAfter);
  		if (!opts.sync) 
  			fn();
  	});
  	if (opts.sync) fn();
  };
  
  // transition definitions - only fade is defined here, transition pack defines the rest
  $.fn.cycle.transitions = {
  	fade: function($cont, $slides, opts) {
  		$slides.not(':eq('+opts.currSlide+')').css('opacity',0);
  		opts.before.push(function(curr,next,opts) {
  			$.fn.cycle.commonReset(curr,next,opts);
  			opts.cssBefore.opacity = 0;
  		});
  		opts.animIn	   = { opacity: 1 };
  		opts.animOut   = { opacity: 0 };
  		opts.cssBefore = { top: 0, left: 0 };
  	}
  };
  
  $.fn.cycle.ver = function() { return ver; };
  
  // override these globally if you like (they are all optional)
  $.fn.cycle.defaults = {
      activePagerClass: 'activeSlide', // class name used for the active pager link
      after:            null,     // transition callback (scope set to element that was shown):  function(currSlideElement, nextSlideElement, options, forwardFlag)
      allowPagerClickBubble: false, // allows or prevents click event on pager anchors from bubbling
      animIn:           null,     // properties that define how the slide animates in
      animInDelay:      0,        // allows delay before next slide transitions in	
      animOut:          null,     // properties that define how the slide animates out
      animOutDelay:     0,        // allows delay before current slide transitions out
      aspect:           false,    // preserve aspect ratio during fit resizing, cropping if necessary (must be used with fit option)
      autostop:         0,        // true to end slideshow after X transitions (where X == slide count)
      autostopCount:    0,        // number of transitions (optionally used with autostop to define X)
      backwards:        false,    // true to start slideshow at last slide and move backwards through the stack
      before:           null,     // transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag)
      center:           null,     // set to true to have cycle add top/left margin to each slide (use with width and height options)
      cleartype:        !$.support.opacity,  // true if clearType corrections should be applied (for IE)
      cleartypeNoBg:    false,    // set to true to disable extra cleartype fixing (leave false to force background color setting on slides)
      containerResize:  1,        // resize container to fit largest slide
      containerResizeHeight:  0,  // resize containers height to fit the largest slide but leave the width dynamic
      continuous:       0,        // true to start next transition immediately after current one completes
      cssAfter:         null,     // properties that defined the state of the slide after transitioning out
      cssBefore:        null,     // properties that define the initial state of the slide before transitioning in
      delay:            0,        // additional delay (in ms) for first transition (hint: can be negative)
      easeIn:           null,     // easing for "in" transition
      easeOut:          null,     // easing for "out" transition
      easing:           null,     // easing method for both in and out transitions
      end:              null,     // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
      fastOnEvent:      0,        // force fast transitions when triggered manually (via pager or prev/next); value == time in ms
      fit:              0,        // force slides to fit container
      fx:               'fade',   // name of transition effect (or comma separated names, ex: 'fade,scrollUp,shuffle')
      fxFn:             null,     // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
      height:           'auto',   // container height (if the 'fit' option is true, the slides will be set to this height as well)
      manualTrump:      true,     // causes manual transition to stop an active transition instead of being ignored
      metaAttr:         'cycle',  // data- attribute that holds the option data for the slideshow
      next:             null,     // element, jQuery object, or jQuery selector string for the element to use as event trigger for next slide
      nowrap:           0,        // true to prevent slideshow from wrapping
      onPagerEvent:     null,     // callback fn for pager events: function(zeroBasedSlideIndex, slideElement)
      onPrevNextEvent:  null,     // callback fn for prev/next events: function(isNext, zeroBasedSlideIndex, slideElement)
      pager:            null,     // element, jQuery object, or jQuery selector string for the element to use as pager container
      pagerAnchorBuilder: null,   // callback fn for building anchor links:  function(index, DOMelement)
      pagerEvent:       'click.cycle', // name of event which drives the pager navigation
      pause:            0,        // true to enable "pause on hover"
      pauseOnPagerHover: 0,       // true to pause when hovering over pager link
      prev:             null,     // element, jQuery object, or jQuery selector string for the element to use as event trigger for previous slide
      prevNextEvent:    'click.cycle',// event which drives the manual transition to the previous or next slide
      random:           0,        // true for random, false for sequence (not applicable to shuffle fx)
      randomizeEffects: 1,        // valid when multiple effects are used; true to make the effect sequence random
      requeueOnImageNotLoaded: true, // requeue the slideshow if any image slides are not yet loaded
      requeueTimeout:   250,      // ms delay for requeue
      rev:              0,        // causes animations to transition in reverse (for effects that support it such as scrollHorz/scrollVert/shuffle)
      shuffle:          null,     // coords for shuffle animation, ex: { top:15, left: 200 }
      skipInitializationCallbacks: false, // set to true to disable the first before/after callback that occurs prior to any transition
      slideExpr:        null,     // expression for selecting slides (if something other than all children is required)
      slideResize:      1,        // force slide width/height to fixed size before every transition
      speed:            1000,     // speed of the transition (any valid fx speed value)
      speedIn:          null,     // speed of the 'in' transition
      speedOut:         null,     // speed of the 'out' transition
      startingSlide:    undefined,// zero-based index of the first slide to be displayed
      sync:             1,        // true if in/out transitions should occur simultaneously
      timeout:          4000,     // milliseconds between slide transitions (0 to disable auto advance)
      timeoutFn:        null,     // callback for determining per-slide timeout value:  function(currSlideElement, nextSlideElement, options, forwardFlag)
      updateActivePagerLink: null,// callback fn invoked to update the active pager link (adds/removes activePagerClass style)
      width:            null      // container width (if the 'fit' option is true, the slides will be set to this width as well)
  };
  
  })(jQuery);
  
  
  /*!
   * jQuery Cycle Plugin Transition Definitions
   * This script is a plugin for the jQuery Cycle Plugin
   * Examples and documentation at: http://malsup.com/jquery/cycle/
   * Copyright (c) 2007-2010 M. Alsup
   * Version:	 2.73
   * Dual licensed under the MIT and GPL licenses:
   * http://www.opensource.org/licenses/mit-license.php
   * http://www.gnu.org/licenses/gpl.html
   */
  (function($) {
  "use strict";
  
  //
  // These functions define slide initialization and properties for the named
  // transitions. To save file size feel free to remove any of these that you
  // don't need.
  //
  $.fn.cycle.transitions.none = function($cont, $slides, opts) {
  	opts.fxFn = function(curr,next,opts,after){
  		$(next).show();
  		$(curr).hide();
  		after();
  	};
  };
  
  // not a cross-fade, fadeout only fades out the top slide
  $.fn.cycle.transitions.fadeout = function($cont, $slides, opts) {
  	$slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 });
  	opts.before.push(function(curr,next,opts,w,h,rev) {
  		$(curr).css('zIndex',opts.slideCount + (rev !== true ? 1 : 0));
  		$(next).css('zIndex',opts.slideCount + (rev !== true ? 0 : 1));
  	});
  	opts.animIn.opacity = 1;
  	opts.animOut.opacity = 0;
  	opts.cssBefore.opacity = 1;
  	opts.cssBefore.display = 'block';
  	opts.cssAfter.zIndex = 0;
  };
  
  // scrollUp/Down/Left/Right
  $.fn.cycle.transitions.scrollUp = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var h = $cont.height();
  	opts.cssBefore.top = h;
  	opts.cssBefore.left = 0;
  	opts.cssFirst.top = 0;
  	opts.animIn.top = 0;
  	opts.animOut.top = -h;
  };
  $.fn.cycle.transitions.scrollDown = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var h = $cont.height();
  	opts.cssFirst.top = 0;
  	opts.cssBefore.top = -h;
  	opts.cssBefore.left = 0;
  	opts.animIn.top = 0;
  	opts.animOut.top = h;
  };
  $.fn.cycle.transitions.scrollLeft = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var w = $cont.width();
  	opts.cssFirst.left = 0;
  	opts.cssBefore.left = w;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.left = 0-w;
  };
  $.fn.cycle.transitions.scrollRight = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push($.fn.cycle.commonReset);
  	var w = $cont.width();
  	opts.cssFirst.left = 0;
  	opts.cssBefore.left = -w;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.left = w;
  };
  $.fn.cycle.transitions.scrollHorz = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden').width();
  	opts.before.push(function(curr, next, opts, fwd) {
  		if (opts.rev)
  			fwd = !fwd;
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.cssBefore.left = fwd ? (next.cycleW-1) : (1-next.cycleW);
  		opts.animOut.left = fwd ? -curr.cycleW : curr.cycleW;
  	});
  	opts.cssFirst.left = 0;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.top = 0;
  };
  $.fn.cycle.transitions.scrollVert = function($cont, $slides, opts) {
  	$cont.css('overflow','hidden');
  	opts.before.push(function(curr, next, opts, fwd) {
  		if (opts.rev)
  			fwd = !fwd;
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.cssBefore.top = fwd ? (1-next.cycleH) : (next.cycleH-1);
  		opts.animOut.top = fwd ? curr.cycleH : -curr.cycleH;
  	});
  	opts.cssFirst.top = 0;
  	opts.cssBefore.left = 0;
  	opts.animIn.top = 0;
  	opts.animOut.left = 0;
  };
  
  // slideX/slideY
  $.fn.cycle.transitions.slideX = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$(opts.elements).not(curr).hide();
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.animIn.width = next.cycleW;
  	});
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  	opts.animIn.width = 'show';
  	opts.animOut.width = 0;
  };
  $.fn.cycle.transitions.slideY = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$(opts.elements).not(curr).hide();
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.animIn.height = next.cycleH;
  	});
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.height = 0;
  	opts.animIn.height = 'show';
  	opts.animOut.height = 0;
  };
  
  // shuffle
  $.fn.cycle.transitions.shuffle = function($cont, $slides, opts) {
  	var i, w = $cont.css('overflow', 'visible').width();
  	$slides.css({left: 0, top: 0});
  	opts.before.push(function(curr,next,opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
  	});
  	// only adjust speed once!
  	if (!opts.speedAdjusted) {
  		opts.speed = opts.speed / 2; // shuffle has 2 transitions
  		opts.speedAdjusted = true;
  	}
  	opts.random = 0;
  	opts.shuffle = opts.shuffle || {left:-w, top:15};
  	opts.els = [];
  	for (i=0; i < $slides.length; i++)
  		opts.els.push($slides[i]);
  
  	for (i=0; i < opts.currSlide; i++)
  		opts.els.push(opts.els.shift());
  
  	// custom transition fn (hat tip to Benjamin Sterling for this bit of sweetness!)
  	opts.fxFn = function(curr, next, opts, cb, fwd) {
  		if (opts.rev)
  			fwd = !fwd;
  		var $el = fwd ? $(curr) : $(next);
  		$(next).css(opts.cssBefore);
  		var count = opts.slideCount;
  		$el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function() {
  			var hops = $.fn.cycle.hopsFromLast(opts, fwd);
  			for (var k=0; k < hops; k++) {
  				if (fwd)
  					opts.els.push(opts.els.shift());
  				else
  					opts.els.unshift(opts.els.pop());
  			}
  			if (fwd) {
  				for (var i=0, len=opts.els.length; i < len; i++)
  					$(opts.els[i]).css('z-index', len-i+count);
  			}
  			else {
  				var z = $(curr).css('z-index');
  				$el.css('z-index', parseInt(z,10)+1+count);
  			}
  			$el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function() {
  				$(fwd ? this : curr).hide();
  				if (cb) cb();
  			});
  		});
  	};
  	$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
  };
  
  // turnUp/Down/Left/Right
  $.fn.cycle.transitions.turnUp = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.cssBefore.top = next.cycleH;
  		opts.animIn.height = next.cycleH;
  		opts.animOut.width = next.cycleW;
  	});
  	opts.cssFirst.top = 0;
  	opts.cssBefore.left = 0;
  	opts.cssBefore.height = 0;
  	opts.animIn.top = 0;
  	opts.animOut.height = 0;
  };
  $.fn.cycle.transitions.turnDown = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top   = curr.cycleH;
  	});
  	opts.cssFirst.top = 0;
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.height = 0;
  	opts.animOut.height = 0;
  };
  $.fn.cycle.transitions.turnLeft = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.cssBefore.left = next.cycleW;
  		opts.animIn.width = next.cycleW;
  	});
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  	opts.animIn.left = 0;
  	opts.animOut.width = 0;
  };
  $.fn.cycle.transitions.turnRight = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.animIn.width = next.cycleW;
  		opts.animOut.left = curr.cycleW;
  	});
  	$.extend(opts.cssBefore, { top: 0, left: 0, width: 0 });
  	opts.animIn.left = 0;
  	opts.animOut.width = 0;
  };
  
  // zoom
  $.fn.cycle.transitions.zoom = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,false,true);
  		opts.cssBefore.top = next.cycleH/2;
  		opts.cssBefore.left = next.cycleW/2;
  		$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
  		$.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 });
  	});
  	opts.cssFirst.top = 0;
  	opts.cssFirst.left = 0;
  	opts.cssBefore.width = 0;
  	opts.cssBefore.height = 0;
  };
  
  // fadeZoom
  $.fn.cycle.transitions.fadeZoom = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,false);
  		opts.cssBefore.left = next.cycleW/2;
  		opts.cssBefore.top = next.cycleH/2;
  		$.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH });
  	});
  	opts.cssBefore.width = 0;
  	opts.cssBefore.height = 0;
  	opts.animOut.opacity = 0;
  };
  
  // blindX
  $.fn.cycle.transitions.blindX = function($cont, $slides, opts) {
  	var w = $cont.css('overflow','hidden').width();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.animIn.width = next.cycleW;
  		opts.animOut.left   = curr.cycleW;
  	});
  	opts.cssBefore.left = w;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.left = w;
  };
  // blindY
  $.fn.cycle.transitions.blindY = function($cont, $slides, opts) {
  	var h = $cont.css('overflow','hidden').height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top   = curr.cycleH;
  	});
  	opts.cssBefore.top = h;
  	opts.cssBefore.left = 0;
  	opts.animIn.top = 0;
  	opts.animOut.top = h;
  };
  // blindZ
  $.fn.cycle.transitions.blindZ = function($cont, $slides, opts) {
  	var h = $cont.css('overflow','hidden').height();
  	var w = $cont.width();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top   = curr.cycleH;
  	});
  	opts.cssBefore.top = h;
  	opts.cssBefore.left = w;
  	opts.animIn.top = 0;
  	opts.animIn.left = 0;
  	opts.animOut.top = h;
  	opts.animOut.left = w;
  };
  
  // growX - grow horizontally from centered 0 width
  $.fn.cycle.transitions.growX = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true);
  		opts.cssBefore.left = this.cycleW/2;
  		opts.animIn.left = 0;
  		opts.animIn.width = this.cycleW;
  		opts.animOut.left = 0;
  	});
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  };
  // growY - grow vertically from centered 0 height
  $.fn.cycle.transitions.growY = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false);
  		opts.cssBefore.top = this.cycleH/2;
  		opts.animIn.top = 0;
  		opts.animIn.height = this.cycleH;
  		opts.animOut.top = 0;
  	});
  	opts.cssBefore.height = 0;
  	opts.cssBefore.left = 0;
  };
  
  // curtainX - squeeze in both edges horizontally
  $.fn.cycle.transitions.curtainX = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,false,true,true);
  		opts.cssBefore.left = next.cycleW/2;
  		opts.animIn.left = 0;
  		opts.animIn.width = this.cycleW;
  		opts.animOut.left = curr.cycleW/2;
  		opts.animOut.width = 0;
  	});
  	opts.cssBefore.top = 0;
  	opts.cssBefore.width = 0;
  };
  // curtainY - squeeze in both edges vertically
  $.fn.cycle.transitions.curtainY = function($cont, $slides, opts) {
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,false,true);
  		opts.cssBefore.top = next.cycleH/2;
  		opts.animIn.top = 0;
  		opts.animIn.height = next.cycleH;
  		opts.animOut.top = curr.cycleH/2;
  		opts.animOut.height = 0;
  	});
  	opts.cssBefore.height = 0;
  	opts.cssBefore.left = 0;
  };
  
  // cover - curr slide covered by next slide
  $.fn.cycle.transitions.cover = function($cont, $slides, opts) {
  	var d = opts.direction || 'left';
  	var w = $cont.css('overflow','hidden').width();
  	var h = $cont.height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts);
  		opts.cssAfter.display = '';
  		if (d == 'right')
  			opts.cssBefore.left = -w;
  		else if (d == 'up')
  			opts.cssBefore.top = h;
  		else if (d == 'down')
  			opts.cssBefore.top = -h;
  		else
  			opts.cssBefore.left = w;
  	});
  	opts.animIn.left = 0;
  	opts.animIn.top = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.left = 0;
  };
  
  // uncover - curr slide moves off next slide
  $.fn.cycle.transitions.uncover = function($cont, $slides, opts) {
  	var d = opts.direction || 'left';
  	var w = $cont.css('overflow','hidden').width();
  	var h = $cont.height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
  		if (d == 'right')
  			opts.animOut.left = w;
  		else if (d == 'up')
  			opts.animOut.top = -h;
  		else if (d == 'down')
  			opts.animOut.top = h;
  		else
  			opts.animOut.left = -w;
  	});
  	opts.animIn.left = 0;
  	opts.animIn.top = 0;
  	opts.cssBefore.top = 0;
  	opts.cssBefore.left = 0;
  };
  
  // toss - move top slide and fade away
  $.fn.cycle.transitions.toss = function($cont, $slides, opts) {
  	var w = $cont.css('overflow','visible').width();
  	var h = $cont.height();
  	opts.before.push(function(curr, next, opts) {
  		$.fn.cycle.commonReset(curr,next,opts,true,true,true);
  		// provide default toss settings if animOut not provided
  		if (!opts.animOut.left && !opts.animOut.top)
  			$.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 });
  		else
  			opts.animOut.opacity = 0;
  	});
  	opts.cssBefore.left = 0;
  	opts.cssBefore.top = 0;
  	opts.animIn.left = 0;
  };
  
  // wipe - clip animation
  $.fn.cycle.transitions.wipe = function($cont, $slides, opts) {
  	var w = $cont.css('overflow','hidden').width();
  	var h = $cont.height();
  	opts.cssBefore = opts.cssBefore || {};
  	var clip;
  	if (opts.clip) {
  		if (/l2r/.test(opts.clip))
  			clip = 'rect(0px 0px '+h+'px 0px)';
  		else if (/r2l/.test(opts.clip))
  			clip = 'rect(0px '+w+'px '+h+'px '+w+'px)';
  		else if (/t2b/.test(opts.clip))
  			clip = 'rect(0px '+w+'px 0px 0px)';
  		else if (/b2t/.test(opts.clip))
  			clip = 'rect('+h+'px '+w+'px '+h+'px 0px)';
  		else if (/zoom/.test(opts.clip)) {
  			var top = parseInt(h/2,10);
  			var left = parseInt(w/2,10);
  			clip = 'rect('+top+'px '+left+'px '+top+'px '+left+'px)';
  		}
  	}
  
  	opts.cssBefore.clip = opts.cssBefore.clip || clip || 'rect(0px 0px 0px 0px)';
  
  	var d = opts.cssBefore.clip.match(/(\d+)/g);
  	var t = parseInt(d[0],10), r = parseInt(d[1],10), b = parseInt(d[2],10), l = parseInt(d[3],10);
  
  	opts.before.push(function(curr, next, opts) {
  		if (curr == next) return;
  		var $curr = $(curr), $next = $(next);
  		$.fn.cycle.commonReset(curr,next,opts,true,true,false);
  		opts.cssAfter.display = 'block';
  
  		var step = 1, count = parseInt((opts.speedIn / 13),10) - 1;
  		(function f() {
  			var tt = t ? t - parseInt(step * (t/count),10) : 0;
  			var ll = l ? l - parseInt(step * (l/count),10) : 0;
  			var bb = b < h ? b + parseInt(step * ((h-b)/count || 1),10) : h;
  			var rr = r < w ? r + parseInt(step * ((w-r)/count || 1),10) : w;
  			$next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' });
  			(step++ <= count) ? setTimeout(f, 13) : $curr.css('display', 'none');
  		})();
  	});
  	$.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 });
  	opts.animIn	   = { left: 0 };
  	opts.animOut   = { left: 0 };
  };
  
  })(jQuery);
  ;
  
  /**
   *  @file
   *  A simple jQuery Cycle Div Slideshow Rotator.
   */
  
  /**
   * This will set our initial behavior, by starting up each individual slideshow.
   */
  (function ($, Drupal, drupalSettings) {
      Drupal.behaviors.viewsSlideshowCycle = {
          attach: function (context) {
              $('.views_slideshow_cycle_main:not(.viewsSlideshowCycle-processed)', context).addClass('viewsSlideshowCycle-processed').each(function() {
                  var fullId = '#' + $(this).attr('id');
                  var settings = drupalSettings.viewsSlideshowCycle[fullId];
                  settings.targetId = '#' + $(fullId + " :first").attr('id');
  
                  settings.slideshowId = settings.targetId.replace('#views_slideshow_cycle_teaser_section_', '');
                  // Pager after function.
                  var pager_after_fn = function(curr, next, opts) {
                      // Need to do some special handling on first load.
                      var slideNum = opts.currSlide;
                      if (typeof settings.processedAfter == 'undefined' || !settings.processedAfter) {
                          settings.processedAfter = 1;
                          slideNum = (typeof settings.opts.startingSlide == 'undefined') ? 0 : settings.opts.startingSlide;
                      }
                      Drupal.viewsSlideshow.action({ "action": 'transitionEnd', "slideshowID": settings.slideshowId, "slideNum": slideNum });
                  }
                  // Pager before function.
                  var pager_before_fn = function(curr, next, opts) {
                      var slideNum = opts.nextSlide;
  
                      // Remember last slide.
                      if (settings.remember_slide) {
                          createCookie(settings.vss_id, slideNum, settings.remember_slide_days);
                      }
  
                      // Make variable height.
                      if (!settings.fixed_height) {
                          //get the height of the current slide
                          var $ht = $(next).height();
                          //set the container's height to that of the current slide
                          $(next).parent().animate({height: $ht});
                      }
  
                      // Need to do some special handling on first load.
                      if (typeof settings.processedBefore == 'undefined' || !settings.processedBefore) {
                          settings.processedBefore = 1;
                          slideNum = (typeof opts.startingSlide == 'undefined') ? 0 : opts.startingSlide;
                      }
  
                      Drupal.viewsSlideshow.action({ "action": 'transitionBegin', "slideshowID": settings.slideshowId, "slideNum": slideNum });
                  }
                  settings.loaded = false;
  
                  settings.opts = {
                      speed:settings.speed,
                      timeout:settings.timeout,
                      delay:settings.delay,
                      sync:settings.sync,
                      random:settings.random,
                      nowrap:settings.nowrap,
                      after:pager_after_fn,
                      before:pager_before_fn,
                      cleartype:(settings.cleartype)? true : false,
                      cleartypeNoBg:(settings.cleartypenobg)? true : false
                  }
  
                  // Set the starting slide if we are supposed to remember the slide
                  if (settings.remember_slide) {
                      var startSlide = readCookie(settings.vss_id);
                      if (startSlide == null) {
                          startSlide = 0;
                      }
                      settings.opts.startingSlide = parseInt(startSlide);
                  }
  
                  if (settings.effect == 'none') {
                      settings.opts.speed = 1;
                  }
                  else {
                      settings.opts.fx = settings.effect;
                  }
  
                  // Take starting item from fragment.
                  var hash = location.hash;
                  if (hash) {
                      var hash = hash.replace('#', '');
                      var aHash = hash.split(';');
                      var aHashLen = aHash.length;
  
                      // Loop through all the possible starting points.
                      for (var i = 0; i < aHashLen; i++) {
                          // Split the hash into two parts. One part is the slideshow id the
                          // other is the slide number.
                          var initialInfo = aHash[i].split(':');
                          // The id in the hash should match our slideshow.
                          // The slide number chosen shouldn't be larger than the number of
                          // slides we have.
                          if (settings.slideshowId == initialInfo[0] && settings.num_divs > initialInfo[1]) {
                              settings.opts.startingSlide = parseInt(initialInfo[1]);
                          }
                      }
                  }
  
                  // Pause on hover.
                  if (settings.pause) {
                      var mouseIn = function() {
                          Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId });
                      }
  
                      var mouseOut = function() {
                          Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId });
                      }
  
                      if (jQuery.fn.hoverIntent) {
                          $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hoverIntent(mouseIn, mouseOut);
                      }
                      else {
                          $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).hover(mouseIn, mouseOut);
                      }
                  }
  
                  // Pause on clicking of the slide.
                  if (settings.pause_on_click) {
                      $('#views_slideshow_cycle_teaser_section_' + settings.vss_id).click(function() {
                          Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId, "force": true });
                      });
                  }
  
                  if (typeof JSON != 'undefined' && typeof settings.advanced_options != 'undefined') {
                      var advancedOptions = JSON.parse(settings.advanced_options);
                      for (var option in advancedOptions) {
                          switch(option) {
  
                              // Standard Options
                              case "activePagerClass":
                              case "allowPagerClickBubble":
                              case "autostop":
                              case "autostopCount":
                              case "backwards":
                              case "bounce":
                              case "cleartype":
                              case "cleartypeNoBg":
                              case "containerResize":
                              case "continuous":
                              case "delay":
                              case "easeIn":
                              case "easeOut":
                              case "easing":
                              case "fastOnEvent":
                              case "fit":
                              case "fx":
                              case "height":
                              case "manualTrump":
                              case "metaAttr":
                              case "next":
                              case "nowrap":
                              case "pager":
                              case "pagerEvent":
                              case "pause":
                              case "pauseOnPagerHover":
                              case "prev":
                              case "prevNextEvent":
                              case "random":
                              case "randomizeEffects":
                              case "requeueOnImageNotLoaded":
                              case "requeueTimeout":
                              case "rev":
                              case "slideExpr":
                              case "slideResize":
                              case "speed":
                              case "speedIn":
                              case "speedOut":
                              case "startingSlide":
                              case "sync":
                              case "timeout":
                              case "width":
                                  var optionValue = advancedOptions[option];
                                  optionValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(optionValue);
                                  settings.opts[option] = optionValue;
                                  break;
  
                              // These process options that look like {top:50, bottom:20}
                              case "animIn":
                              case "animOut":
                              case "cssBefore":
                              case "cssAfter":
                              case "shuffle":
                                  var cssValue = advancedOptions[option];
                                  cssValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(cssValue);
                                  settings.opts[option] = eval('(' + cssValue + ')');
                                  break;
  
                              // These options have their own functions.
                              case "after":
                                  var afterValue = advancedOptions[option];
                                  afterValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(afterValue);
                                  // transition callback (scope set to element that was shown): function(currSlideElement, nextSlideElement, options, forwardFlag)
                                  settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
                                      pager_after_fn(currSlideElement, nextSlideElement, options);
                                      eval(afterValue);
                                  }
                                  break;
  
                              case "before":
                                  var beforeValue = advancedOptions[option];
                                  beforeValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(beforeValue);
                                  // transition callback (scope set to element to be shown):     function(currSlideElement, nextSlideElement, options, forwardFlag)
                                  settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
                                      pager_before_fn(currSlideElement, nextSlideElement, options);
                                      eval(beforeValue);
                                  }
                                  break;
  
                              case "end":
                                  var endValue = advancedOptions[option];
                                  endValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(endValue);
                                  // callback invoked when the slideshow terminates (use with autostop or nowrap options): function(options)
                                  settings.opts[option] = function(options) {
                                      eval(endValue);
                                  }
                                  break;
  
                              case "fxFn":
                                  var fxFnValue = advancedOptions[option];
                                  fxFnValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(fxFnValue);
                                  // function used to control the transition: function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag)
                                  settings.opts[option] = function(currSlideElement, nextSlideElement, options, afterCalback, forwardFlag) {
                                      eval(fxFnValue);
                                  }
                                  break;
  
                              case "onPagerEvent":
                                  var onPagerEventValue = advancedOptions[option];
                                  onPagerEventValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(onPagerEventValue);
                                  settings.opts[option] = function(zeroBasedSlideIndex, slideElement) {
                                      eval(onPagerEventValue);
                                  }
                                  break;
  
                              case "onPrevNextEvent":
                                  var onPrevNextEventValue = advancedOptions[option];
                                  onPrevNextEventValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(onPrevNextEventValue);
                                  settings.opts[option] = function(isNext, zeroBasedSlideIndex, slideElement) {
                                      eval(onPrevNextEventValue);
                                  }
                                  break;
  
                              case "pagerAnchorBuilder":
                                  var pagerAnchorBuilderValue = advancedOptions[option];
                                  pagerAnchorBuilderValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pagerAnchorBuilderValue);
                                  // callback fn for building anchor links:  function(index, DOMelement)
                                  settings.opts[option] = function(index, DOMelement) {
                                      var returnVal = '';
                                      eval(pagerAnchorBuilderValue);
                                      return returnVal;
                                  }
                                  break;
  
                              case "pagerClick":
                                  var pagerClickValue = advancedOptions[option];
                                  pagerClickValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pagerClickValue);
                                  // callback fn for pager clicks:    function(zeroBasedSlideIndex, slideElement)
                                  settings.opts[option] = function(zeroBasedSlideIndex, slideElement) {
                                      eval(pagerClickValue);
                                  }
                                  break;
  
                              case "paused":
                                  var pausedValue = advancedOptions[option];
                                  pausedValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(pausedValue);
                                  // undocumented callback when slideshow is paused:    function(cont, opts, byHover)
                                  settings.opts[option] = function(cont, opts, byHover) {
                                      eval(pausedValue);
                                  }
                                  break;
  
                              case "resumed":
                                  var resumedValue = advancedOptions[option];
                                  resumedValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(resumedValue);
                                  // undocumented callback when slideshow is resumed:    function(cont, opts, byHover)
                                  settings.opts[option] = function(cont, opts, byHover) {
                                      eval(resumedValue);
                                  }
                                  break;
  
                              case "timeoutFn":
                                  var timeoutFnValue = advancedOptions[option];
                                  timeoutFnValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(timeoutFnValue);
                                  settings.opts[option] = function(currSlideElement, nextSlideElement, options, forwardFlag) {
                                      eval(timeoutFnValue);
                                  }
                                  break;
  
                              case "updateActivePagerLink":
                                  var updateActivePagerLinkValue = advancedOptions[option];
                                  updateActivePagerLinkValue = Drupal.viewsSlideshowCycle.advancedOptionCleanup(updateActivePagerLinkValue);
                                  // callback fn invoked to update the active pager link (adds/removes activePagerClass style)
                                  settings.opts[option] = function(pager, currSlideIndex) {
                                      eval(updateActivePagerLinkValue);
                                  }
                                  break;
                          }
                      }
                  }
  
                  // If selected wait for the images to be loaded.
                  // otherwise just load the slideshow.
                  if (settings.wait_for_image_load) {
                      // For IE/Chrome/Opera we if there are images then we need to make
                      // sure the images are loaded before starting the slideshow.
                      settings.totalImages = $(settings.targetId + ' img').length;
                      if (settings.totalImages) {
                          settings.loadedImages = 0;
  
                          // Add a load event for each image.
                          $(settings.targetId + ' img').each(function() {
                              var $imageElement = $(this);
                              $imageElement.bind('load', function () {
                                  Drupal.viewsSlideshowCycle.imageWait(fullId);
                              });
  
                              // Removing the source and adding it again will fire the load event.
                              var imgSrc = $imageElement.attr('src');
                              $imageElement.attr('src', '');
                              $imageElement.attr('src', imgSrc);
                          });
  
                          // We need to set a timeout so that the slideshow doesn't wait
                          // indefinitely for all images to load.
                          setTimeout("Drupal.viewsSlideshowCycle.load('" + fullId + "')", settings.wait_for_image_load_timeout);
                      }
                      else {
                          Drupal.viewsSlideshowCycle.load(fullId);
                      }
                  }
                  else {
                      Drupal.viewsSlideshowCycle.load(fullId);
                  }
              });
          }
      };
  
      Drupal.viewsSlideshowCycle = Drupal.viewsSlideshowCycle || {};
  
      // Cleanup the values of advanced options.
      Drupal.viewsSlideshowCycle.advancedOptionCleanup = function(value) {
          value = $.trim(value);
          value = value.replace(/\n/g, '');
          if (!isNaN(parseInt(value))) {
              value = parseInt(value);
          }
          else if (value.toLowerCase() == 'true') {
              value = true;
          }
          else if (value.toLowerCase() == 'false') {
              value = false;
          }
  
          return value;
      }
  
      // This checks to see if all the images have been loaded.
      // If they have then it starts the slideshow.
      Drupal.viewsSlideshowCycle.imageWait = function(fullId) {
          if (++drupalSettings.viewsSlideshowCycle[fullId].loadedImages == drupalSettings.viewsSlideshowCycle[fullId].totalImages) {
              Drupal.viewsSlideshowCycle.load(fullId);
          }
      };
  
      // Start the slideshow.
      Drupal.viewsSlideshowCycle.load = function (fullId) {
          var settings = drupalSettings.viewsSlideshowCycle[fullId];
  
          // Make sure the slideshow isn't already loaded.
          if (!settings.loaded) {
              $(settings.targetId).cycle(settings.opts);
              settings.loaded = true;
  
              // Start Paused
              if (settings.start_paused) {
                  Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId, "force": true });
              }
  
              // Pause if hidden.
              if (settings.pause_when_hidden) {
                  var checkPause = function(settings) {
                      // If the slideshow is visible and it is paused then resume.
                      // otherwise if the slideshow is not visible and it is not paused then
                      // pause it.
                      var visible = viewsSlideshowCycleIsVisible(settings.targetId, settings.pause_when_hidden_type, settings.amount_allowed_visible);
                      if (visible) {
                          Drupal.viewsSlideshow.action({ "action": 'play', "slideshowID": settings.slideshowId });
                      }
                      else {
                          Drupal.viewsSlideshow.action({ "action": 'pause', "slideshowID": settings.slideshowId });
                      }
                  }
  
                  // Check when scrolled.
                  $(window).scroll(function() {
                      checkPause(settings);
                  });
  
                  // Check when the window is resized.
                  $(window).resize(function() {
                      checkPause(settings);
                  });
              }
          }
      };
  
      Drupal.viewsSlideshowCycle.pause = function (options) {
          //Eat TypeError, cycle doesn't handle pause well if options isn't defined.
          try{
              if (options.pause_in_middle && $.fn.pause) {
                  $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).pause();
              }
              else {
                  $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('pause');
              }
          }
          catch(e){
              if(!e instanceof TypeError){
                  throw e;
              }
          }
      };
  
      Drupal.viewsSlideshowCycle.play = function (options) {
          drupalSettings.viewsSlideshowCycle['#views_slideshow_cycle_main_' + options.slideshowID].paused = false;
          if (options.pause_in_middle && $.fn.resume) {
              $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).resume();
          }
          else {
              $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('resume');
          }
      };
  
      Drupal.viewsSlideshowCycle.previousSlide = function (options) {
          $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('prev');
      };
  
      Drupal.viewsSlideshowCycle.nextSlide = function (options) {
          $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle('next');
      };
  
      Drupal.viewsSlideshowCycle.goToSlide = function (options) {
          $('#views_slideshow_cycle_teaser_section_' + options.slideshowID).cycle(options.slideNum);
      };
  
      // Verify that the value is a number.
      function IsNumeric(sText) {
          var ValidChars = "0123456789";
          var IsNumber=true;
          var Char;
  
          for (var i=0; i < sText.length && IsNumber == true; i++) {
              Char = sText.charAt(i);
              if (ValidChars.indexOf(Char) == -1) {
                  IsNumber = false;
              }
          }
          return IsNumber;
      }
  
      /**
       * Cookie Handling Functions
       */
      function createCookie(name,value,days) {
          if (days) {
              var date = new Date();
              date.setTime(date.getTime()+(days*24*60*60*1000));
              var expires = "; expires="+date.toGMTString();
          }
          else {
              var expires = "";
          }
          document.cookie = name+"="+value+expires+"; path=/";
      }
  
      function readCookie(name) {
          var nameEQ = name + "=";
          var ca = document.cookie.split(';');
          for(var i=0;i < ca.length;i++) {
              var c = ca[i];
              while (c.charAt(0)==' ') c = c.substring(1,c.length);
              if (c.indexOf(nameEQ) == 0) {
                  return c.substring(nameEQ.length,c.length);
              }
          }
          return null;
      }
  
      function eraseCookie(name) {
          createCookie(name,"",-1);
      }
  
      /**
       * Checks to see if the slide is visible enough.
       * elem = element to check.
       * type = The way to calculate how much is visible.
       * amountVisible = amount that should be visible. Either in percent or px. If
       *                it's not defined then all of the slide must be visible.
       *
       * Returns true or false
       */
      function viewsSlideshowCycleIsVisible(elem, type, amountVisible) {
          // Get the top and bottom of the window;
          var docViewTop = $(window).scrollTop();
          var docViewBottom = docViewTop + $(window).height();
          var docViewLeft = $(window).scrollLeft();
          var docViewRight = docViewLeft + $(window).width();
  
          // Get the top, bottom, and height of the slide;
          var elemTop = $(elem).offset().top;
          var elemHeight = $(elem).height();
          var elemBottom = elemTop + elemHeight;
          var elemLeft = $(elem).offset().left;
          var elemWidth = $(elem).width();
          var elemRight = elemLeft + elemWidth;
          var elemArea = elemHeight * elemWidth;
  
          // Calculate what's hiding in the slide.
          var missingLeft = 0;
          var missingRight = 0;
          var missingTop = 0;
          var missingBottom = 0;
  
          // Find out how much of the slide is missing from the left.
          if (elemLeft < docViewLeft) {
              missingLeft = docViewLeft - elemLeft;
          }
  
          // Find out how much of the slide is missing from the right.
          if (elemRight > docViewRight) {
              missingRight = elemRight - docViewRight;
          }
  
          // Find out how much of the slide is missing from the top.
          if (elemTop < docViewTop) {
              missingTop = docViewTop - elemTop;
          }
  
          // Find out how much of the slide is missing from the bottom.
          if (elemBottom > docViewBottom) {
              missingBottom = elemBottom - docViewBottom;
          }
  
          // If there is no amountVisible defined then check to see if the whole slide
          // is visible.
          if (type == 'full') {
              return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom)
              && (elemBottom <= docViewBottom) &&  (elemTop >= docViewTop)
              && (elemLeft >= docViewLeft) && (elemRight <= docViewRight)
              && (elemLeft <= docViewRight) && (elemRight >= docViewLeft));
          }
          else if(type == 'vertical') {
              var verticalShowing = elemHeight - missingTop - missingBottom;
  
              // If user specified a percentage then find out if the current shown percent
              // is larger than the allowed percent.
              // Otherwise check to see if the amount of px shown is larger than the
              // allotted amount.
              if (amountVisible.indexOf('%')) {
                  return (((verticalShowing/elemHeight)*100) >= parseInt(amountVisible));
              }
              else {
                  return (verticalShowing >= parseInt(amountVisible));
              }
          }
          else if(type == 'horizontal') {
              var horizontalShowing = elemWidth - missingLeft - missingRight;
  
              // If user specified a percentage then find out if the current shown percent
              // is larger than the allowed percent.
              // Otherwise check to see if the amount of px shown is larger than the
              // allotted amount.
              if (amountVisible.indexOf('%')) {
                  return (((horizontalShowing/elemWidth)*100) >= parseInt(amountVisible));
              }
              else {
                  return (horizontalShowing >= parseInt(amountVisible));
              }
          }
          else if(type == 'area') {
              var areaShowing = (elemWidth - missingLeft - missingRight) * (elemHeight - missingTop - missingBottom);
  
              // If user specified a percentage then find out if the current shown percent
              // is larger than the allowed percent.
              // Otherwise check to see if the amount of px shown is larger than the
              // allotted amount.
              if (amountVisible.indexOf('%')) {
                  return (((areaShowing/elemArea)*100) >= parseInt(amountVisible));
              }
              else {
                  return (areaShowing >= parseInt(amountVisible));
              }
          }
      }
  })(jQuery, Drupal, drupalSettings);
  ;
  (function ($, Drupal, drupalSettings) {
    'use strict';
    Drupal.viewsSlideshow = Drupal.viewsSlideshow || {};
    var pagerLocation;
    var slideNum;
    var error;
    var excludeMethods;
    /**
     * Views Slideshow Controls
     */
    Drupal.viewsSlideshowControls = Drupal.viewsSlideshowControls || {};
  
    /**
     * Implement the play hook for controls.
     */
    Drupal.viewsSlideshowControls.play = function (options) {
      // Route the control call to the correct control type.
      // Need to use try catch so we don't have to check to make sure every part
      // of the object is defined.
      try {
        if (typeof drupalSettings.viewsSlideshowControls[options.slideshowID].top.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].top.type].play == 'function') {
          Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].top.type].play(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
  
      try {
        if (typeof drupalSettings.viewsSlideshowControls[options.slideshowID].bottom.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].bottom.type].play == 'function') {
          Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].bottom.type].play(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
    };
  
    /**
     * Implement the pause hook for controls.
     */
    Drupal.viewsSlideshowControls.pause = function (options) {
      // Route the control call to the correct control type.
      // Need to use try catch so we don't have to check to make sure every part
      // of the object is defined.
      try {
        if (typeof drupalSettings.viewsSlideshowControls[options.slideshowID].top.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].top.type].pause == 'function') {
          Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].top.type].pause(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
  
      try {
        if (typeof drupalSettings.viewsSlideshowControls[options.slideshowID].bottom.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].bottom.type].pause == 'function') {
          Drupal[drupalSettings.viewsSlideshowControls[options.slideshowID].bottom.type].pause(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
    };
  
  
    /**
     * Views Slideshow Text Controls
     */
  
    // Add views slieshow api calls for views slideshow text controls.
    Drupal.behaviors.viewsSlideshowControlsText = {
      attach: function (context) {
  
        // Process previous link
        $('.views_slideshow_controls_text_previous:not(.views-slideshow-controls-text-previous-processed)', context).addClass('views-slideshow-controls-text-previous-processed').each(function () {
          var uniqueID = $(this).attr('id').replace('views_slideshow_controls_text_previous_', '');
          $(this).click(function () {
            Drupal.viewsSlideshow.action({"action": 'previousSlide', "slideshowID": uniqueID});
            return false;
          });
        });
  
        // Process next link
        $('.views_slideshow_controls_text_next:not(.views-slideshow-controls-text-next-processed)', context).addClass('views-slideshow-controls-text-next-processed').each(function () {
          var uniqueID = $(this).attr('id').replace('views_slideshow_controls_text_next_', '');
          $(this).click(function () {
            Drupal.viewsSlideshow.action({"action": 'nextSlide', "slideshowID": uniqueID});
            return false;
          });
        });
  
        // Process pause link
        $('.views_slideshow_controls_text_pause:not(.views-slideshow-controls-text-pause-processed)', context).addClass('views-slideshow-controls-text-pause-processed').each(function () {
          var uniqueID = $(this).attr('id').replace('views_slideshow_controls_text_pause_', '');
          $(this).click(function () {
            if (drupalSettings.viewsSlideshow[uniqueID].paused) {
              Drupal.viewsSlideshow.action({"action": 'play', "slideshowID": uniqueID, "force": true});
            }
            else {
              Drupal.viewsSlideshow.action({"action": 'pause', "slideshowID": uniqueID, "force": true});
            }
            return false;
          });
        });
      }
    };
  
    Drupal.viewsSlideshowControlsText = Drupal.viewsSlideshowControlsText || {};
  
    /**
     * Implement the pause hook for text controls.
     */
    Drupal.viewsSlideshowControlsText.pause = function (options) {
      var pauseText = Drupal.theme.viewsSlideshowControlsPause ? Drupal.theme('viewsSlideshowControlsPause') : '';
      var $element = $('#views_slideshow_controls_text_pause_' + options.slideshowID);
      $element.find('a').text(pauseText);
      $element.removeClass('views-slideshow-controls-text-status-play');
      $element.addClass('views-slideshow-controls-text-status-pause');
    };
  
    /**
     * Implement the play hook for text controls.
     */
    Drupal.viewsSlideshowControlsText.play = function (options) {
      var playText = Drupal.theme.viewsSlideshowControlsPlay ? Drupal.theme('viewsSlideshowControlsPlay') : '';
      var $element = $('#views_slideshow_controls_text_pause_' + options.slideshowID);
      $element.find('a').text(playText);
      $element.removeClass('views-slideshow-controls-text-status-pause');
      $element.addClass('views-slideshow-controls-text-status-play');
    };
  
    // Theme the resume control.
    Drupal.theme.viewsSlideshowControlsPause = function () {
      return Drupal.t('Resume');
    };
  
    // Theme the pause control.
    Drupal.theme.viewsSlideshowControlsPlay = function () {
      return Drupal.t('Pause');
    };
  
    /**
     * Views Slideshow Pager
     */
    Drupal.viewsSlideshowPager = Drupal.viewsSlideshowPager || {};
  
    /**
     * Implement the transitionBegin hook for pagers.
     */
    Drupal.viewsSlideshowPager.transitionBegin = function (options) {
      // Route the pager call to the correct pager type.
      // Need to use try catch so we don't have to check to make sure every part
      // of the object is defined.
      try {
        if (typeof drupalSettings.viewsSlideshowPager != "undefined" && typeof drupalSettings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].transitionBegin == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].transitionBegin(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
  
      try {
        if (typeof drupalSettings.viewsSlideshowPager != "undefined" && typeof drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].transitionBegin == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].transitionBegin(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
    };
  
    /**
     * Implement the goToSlide hook for pagers.
     */
    Drupal.viewsSlideshowPager.goToSlide = function (options) {
      // Route the pager call to the correct pager type.
      // Need to use try catch so we don't have to check to make sure every part
      // of the object is defined.
      try {
        if (typeof drupalSettings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].goToSlide == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].goToSlide(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
  
      try {
        if (typeof drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].goToSlide == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].goToSlide(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
    };
  
    /**
     * Implement the previousSlide hook for pagers.
     */
    Drupal.viewsSlideshowPager.previousSlide = function (options) {
      // Route the pager call to the correct pager type.
      // Need to use try catch so we don't have to check to make sure every part
      // of the object is defined.
      try {
        if (typeof drupalSettings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].previousSlide == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].previousSlide(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
  
      try {
        if (typeof drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].previousSlide == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].previousSlide(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
    };
  
    /**
     * Implement the nextSlide hook for pagers.
     */
    Drupal.viewsSlideshowPager.nextSlide = function (options) {
      // Route the pager call to the correct pager type.
      // Need to use try catch so we don't have to check to make sure every part
      // of the object is defined.
      try {
        if (typeof drupalSettings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].nextSlide == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].top.type].nextSlide(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
  
      try {
        if (typeof drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type != "undefined" && typeof Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].nextSlide == 'function') {
          Drupal[drupalSettings.viewsSlideshowPager[options.slideshowID].bottom.type].nextSlide(options);
        }
      }
      catch(err) {
        // Don't need to do anything on error.
      }
    };
  
  
    /**
     * Views Slideshow Pager Fields
     */
  
    // Add views slieshow api calls for views slideshow pager fields.
    Drupal.behaviors.viewsSlideshowPagerFields = {
      attach: function (context) {
        // Process pause on hover.
        $('.views_slideshow_pager_field:not(.views-slideshow-pager-field-processed)', context).addClass('views-slideshow-pager-field-processed').each(function () {
          // Parse out the location and unique id from the full id.
          var pagerInfo = $(this).attr('id').split('_');
          var location = pagerInfo[2];
          pagerInfo.splice(0, 3);
          var uniqueID = pagerInfo.join('_');
  
          // Add the activate and pause on pager hover event to each pager item.
          if (drupalSettings.viewsSlideshowPagerFields[uniqueID][location].activatePauseOnHover) {
            $(this).children().each(function (index, pagerItem) {
              var mouseIn = function () {
                Drupal.viewsSlideshow.action({"action": 'goToSlide', "slideshowID": uniqueID, "slideNum": index});
                Drupal.viewsSlideshow.action({"action": 'pause', "slideshowID": uniqueID});
              };
  
              var mouseOut = function () {
                Drupal.viewsSlideshow.action({"action": 'play', "slideshowID": uniqueID});
              };
  
              if (jQuery.fn.hoverIntent) {
                $(pagerItem).hoverIntent(mouseIn, mouseOut);
              }
              else {
                $(pagerItem).hover(mouseIn, mouseOut);
              }
            });
          }
          else {
            $(this).children().each(function (index, pagerItem) {
              $(pagerItem).click(function () {
                Drupal.viewsSlideshow.action({"action": 'goToSlide', "slideshowID": uniqueID, "slideNum": index});
              });
            });
          }
        });
      }
    };
  
    Drupal.viewsSlideshowPagerFields = Drupal.viewsSlideshowPagerFields || {};
  
    /**
     * Implement the transitionBegin hook for pager fields pager.
     */
    Drupal.viewsSlideshowPagerFields.transitionBegin = function (options) {
      for (pagerLocation in drupalSettings.viewsSlideshowPager[options.slideshowID]) {
        if (drupalSettings.viewsSlideshowPager[options.slideshowID]) {
          // Remove active class from pagers
          $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
  
          // Add active class to active pager.
          $('#views_slideshow_pager_field_item_'+ pagerLocation + '_' + options.slideshowID + '_' + options.slideNum).addClass('active');
        }
      }
    };
  
    /**
     * Implement the goToSlide hook for pager fields pager.
     */
    Drupal.viewsSlideshowPagerFields.goToSlide = function (options) {
      for (pagerLocation in drupalSettings.viewsSlideshowPager[options.slideshowID]) {
        if (drupalSettings.viewsSlideshowPager[options.slideshowID]) {
          // Remove active class from pagers
          $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
  
          // Add active class to active pager.
          $('#views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_' + options.slideNum).addClass('active');
        }
      }
    };
  
    /**
     * Implement the previousSlide hook for pager fields pager.
     */
    Drupal.viewsSlideshowPagerFields.previousSlide = function (options) {
      for (pagerLocation in drupalSettings.viewsSlideshowPager[options.slideshowID]) {
        if (drupalSettings.viewsSlideshowPager[options.slideshowID]) {
          // Get the current active pager.
          var pagerNum = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"].active').attr('id').replace('views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_', '');
  
          // If we are on the first pager then activate the last pager.
          // Otherwise activate the previous pager.
          if (pagerNum === 0) {
            pagerNum = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').length() - 1;
          }
          else {
            pagerNum--;
          }
  
          // Remove active class from pagers
          $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
  
          // Add active class to active pager.
          $('#views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_' + pagerNum).addClass('active');
        }
      }
    };
  
    /**
     * Implement the nextSlide hook for pager fields pager.
     */
    Drupal.viewsSlideshowPagerFields.nextSlide = function (options) {
      for (pagerLocation in drupalSettings.viewsSlideshowPager[options.slideshowID]) {
        if (drupalSettings.viewsSlideshowPager[options.slideshowID]) {
          // Get the current active pager.
          var pagerNum = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"].active').attr('id').replace('views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_', '');
          var totalPagers = $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').length();
  
          // If we are on the last pager then activate the first pager.
          // Otherwise activate the next pager.
          pagerNum++;
          if (pagerNum === totalPagers) {
            pagerNum = 0;
          }
  
          // Remove active class from pagers
          $('[id^="views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '"]').removeClass('active');
  
          // Add active class to active pager.
          $('#views_slideshow_pager_field_item_' + pagerLocation + '_' + options.slideshowID + '_' + slideNum).addClass('active');
        }
      }
    };
  
    // Copy the pager hooks from fields pager to the bullets one.
    Drupal.viewsSlideshowPagerBullets = Drupal.viewsSlideshowPagerFields || {};
  
    /**
     * Views Slideshow Slide Counter
     */
  
    Drupal.viewsSlideshowSlideCounter = Drupal.viewsSlideshowSlideCounter || {};
  
    /**
     * Implement the transitionBegin for the slide counter.
     */
    Drupal.viewsSlideshowSlideCounter.transitionBegin = function (options) {
      $('#views_slideshow_slide_counter_' + options.slideshowID + ' .num').text(options.slideNum + 1);
    };
  
    /**
     * This is used as a router to process actions for the slideshow.
     */
    Drupal.viewsSlideshow.action = function (options) {
      // Set default values for our return status.
      var status = {
        'value': true,
        'text': ''
      };
  
      // If an action isn't specified return false.
      if (typeof options.action == 'undefined' || options.action === '') {
        status.value = false;
        status.text =  Drupal.t('There was no action specified.');
        return error;
      }
  
      // If we are using pause or play switch paused state accordingly.
      if (options.action === 'pause') {
        drupalSettings.viewsSlideshow[options.slideshowID].paused = 1;
        // If the calling method is forcing a pause then mark it as such.
        if (options.force) {
          drupalSettings.viewsSlideshow[options.slideshowID].pausedForce = 1;
        }
      }
      else if (options.action === 'play') {
        // If the slideshow isn't forced pause or we are forcing a play then play
        // the slideshow.
        // Otherwise return telling the calling method that it was forced paused.
        if (!drupalSettings.viewsSlideshow[options.slideshowID].pausedForce || options.force) {
          drupalSettings.viewsSlideshow[options.slideshowID].paused = 0;
          drupalSettings.viewsSlideshow[options.slideshowID].pausedForce = 0;
        }
        else {
          status.value = false;
          status.text += ' ' + Drupal.t('This slideshow is forced paused.');
          return status;
        }
      }
  
      // We use a switch statement here mainly just to limit the type of actions
      // that are available.
      switch (options.action) {
        case "goToSlide":
        case "transitionBegin":
        case "transitionEnd":
          // The three methods above require a slide number. Checking if it is
          // defined and it is a number that is an integer.
          if (typeof options.slideNum == 'undefined' || typeof options.slideNum !== 'number' || parseInt(options.slideNum) !== (options.slideNum - 0)) {
            status.value = false;
            status.text = Drupal.t('An invalid integer was specified for slideNum.');
          }
        case "pause":
        case "play":
        case "nextSlide":
        case "previousSlide":
          // Grab our list of methods.
          var methods = drupalSettings.viewsSlideshow[options.slideshowID]['methods'];
  
          // if the calling method specified methods that shouldn't be called then
          // exclude calling them.
          var excludeMethodsObj = {};
          if (typeof options.excludeMethods !== 'undefined') {
            // We need to turn the excludeMethods array into an object so we can use the in
            // function.
            for (var i=0; i < excludeMethods.length; i++) {
              excludeMethodsObj[excludeMethods[i]] = '';
            }
          }
  
          // Call every registered method and don't call excluded ones.
          for (var i = 0; i < methods[options.action].length; i++) {
            if (Drupal[methods[options.action][i]] !== 'undefined' && typeof Drupal[methods[options.action][i]][options.action] == 'function' && !(methods[options.action][i] in excludeMethodsObj)) {
              Drupal[methods[options.action][i]][options.action](options);
            }
          }
          break;
  
        // If it gets here it's because it's an invalid action.
        default:
          status.value = false;
          status.text = Drupal.t('An invalid action "@action" was specified.', {"@action": options.action});
      }
      return status;
    };
  })(jQuery, Drupal, drupalSettings);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, debounce) {
    var liveElement = void 0;
    var announcements = [];
  
    Drupal.behaviors.drupalAnnounce = {
      attach: function attach(context) {
        if (!liveElement) {
          liveElement = document.createElement('div');
          liveElement.id = 'drupal-live-announce';
          liveElement.className = 'visually-hidden';
          liveElement.setAttribute('aria-live', 'polite');
          liveElement.setAttribute('aria-busy', 'false');
          document.body.appendChild(liveElement);
        }
      }
    };
  
    function announce() {
      var text = [];
      var priority = 'polite';
      var announcement = void 0;
  
      var il = announcements.length;
      for (var i = 0; i < il; i++) {
        announcement = announcements.pop();
        text.unshift(announcement.text);
  
        if (announcement.priority === 'assertive') {
          priority = 'assertive';
        }
      }
  
      if (text.length) {
        liveElement.innerHTML = '';
  
        liveElement.setAttribute('aria-busy', 'true');
  
        liveElement.setAttribute('aria-live', priority);
  
        liveElement.innerHTML = text.join('\n');
  
        liveElement.setAttribute('aria-busy', 'false');
      }
    }
  
    Drupal.announce = function (text, priority) {
      announcements.push({
        text: text,
        priority: priority
      });
  
      return debounce(announce, 200)();
    };
  })(Drupal, Drupal.debounce);;
  window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),i=document.getElementsByTagName("script")[0],n=null;t.type="text/css";t.id="matchmediajs-test";i.parentNode.insertBefore(t,i);n="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle;e={matchMedium:function(e){var i="@media "+e+"{ #matchmediajs-test { width: 1px; } }";if(t.styleSheet){t.styleSheet.cssText=i}else{t.textContent=i}return n.width==="1px"}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}());
  ;
  (function(){if(window.matchMedia&&window.matchMedia("all").addListener){return false}var e=window.matchMedia,i=e("only all").matches,n=false,t=0,a=[],r=function(i){clearTimeout(t);t=setTimeout(function(){for(var i=0,n=a.length;i<n;i++){var t=a[i].mql,r=a[i].listeners||[],o=e(t.media).matches;if(o!==t.matches){t.matches=o;for(var s=0,l=r.length;s<l;s++){r[s].call(window,t)}}}},30)};window.matchMedia=function(t){var o=e(t),s=[],l=0;o.addListener=function(e){if(!i){return}if(!n){n=true;window.addEventListener("resize",r,true)}if(l===0){l=a.push({mql:o,listeners:s})}s.push(e)};o.removeListener=function(e){for(var i=0,n=s.length;i<n;i++){if(s[i]===e){s.splice(i,1)}}};return o}})();
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings) {
    var activeItem = Drupal.url(drupalSettings.path.currentPath);
  
    $.fn.drupalToolbarMenu = function () {
      var ui = {
        handleOpen: Drupal.t('Extend'),
        handleClose: Drupal.t('Collapse')
      };
  
      function toggleClickHandler(event) {
        var $toggle = $(event.target);
        var $item = $toggle.closest('li');
  
        toggleList($item);
  
        var $openItems = $item.siblings().filter('.open');
        toggleList($openItems, false);
      }
  
      function linkClickHandler(event) {
        if (!Drupal.toolbar.models.toolbarModel.get('isFixed')) {
          Drupal.toolbar.models.toolbarModel.set('activeTab', null);
        }
  
        event.stopPropagation();
      }
  
      function toggleList($item, switcher) {
        var $toggle = $item.children('.toolbar-box').children('.toolbar-handle');
        switcher = typeof switcher !== 'undefined' ? switcher : !$item.hasClass('open');
  
        $item.toggleClass('open', switcher);
  
        $toggle.toggleClass('open', switcher);
  
        $toggle.find('.action').text(switcher ? ui.handleClose : ui.handleOpen);
      }
  
      function initItems($menu) {
        var options = {
          class: 'toolbar-icon toolbar-handle',
          action: ui.handleOpen,
          text: ''
        };
  
        $menu.find('li > a').wrap('<div class="toolbar-box">');
  
        $menu.find('li').each(function (index, element) {
          var $item = $(element);
          if ($item.children('ul.toolbar-menu').length) {
            var $box = $item.children('.toolbar-box');
            options.text = Drupal.t('@label', { '@label': $box.find('a').text() });
            $item.children('.toolbar-box').append(Drupal.theme('toolbarMenuItemToggle', options));
          }
        });
      }
  
      function markListLevels($lists, level) {
        level = !level ? 1 : level;
        var $lis = $lists.children('li').addClass('level-' + level);
        $lists = $lis.children('ul');
        if ($lists.length) {
          markListLevels($lists, level + 1);
        }
      }
  
      function openActiveItem($menu) {
        var pathItem = $menu.find('a[href="' + location.pathname + '"]');
        if (pathItem.length && !activeItem) {
          activeItem = location.pathname;
        }
        if (activeItem) {
          var $activeItem = $menu.find('a[href="' + activeItem + '"]').addClass('menu-item--active');
          var $activeTrail = $activeItem.parentsUntil('.root', 'li').addClass('menu-item--active-trail');
          toggleList($activeTrail, true);
        }
      }
  
      return this.each(function (selector) {
        var $menu = $(this).once('toolbar-menu');
        if ($menu.length) {
          $menu.on('click.toolbar', '.toolbar-box', toggleClickHandler).on('click.toolbar', '.toolbar-box a', linkClickHandler);
  
          $menu.addClass('root');
          initItems($menu);
          markListLevels($menu);
  
          openActiveItem($menu);
        }
      });
    };
  
    Drupal.theme.toolbarMenuItemToggle = function (options) {
      return '<button class="' + options.class + '"><span class="action">' + options.action + '</span><span class="label">' + options.text + '</span></button>';
    };
  })(jQuery, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings) {
    var options = $.extend({
      breakpoints: {
        'toolbar.narrow': '',
        'toolbar.standard': '',
        'toolbar.wide': ''
      }
    }, drupalSettings.toolbar, {
      strings: {
        horizontal: Drupal.t('Horizontal orientation'),
        vertical: Drupal.t('Vertical orientation')
      }
    });
  
    Drupal.behaviors.toolbar = {
      attach: function attach(context) {
        if (!window.matchMedia('only screen').matches) {
          return;
        }
  
        $(context).find('#toolbar-administration').once('toolbar').each(function () {
          var model = new Drupal.toolbar.ToolbarModel({
            locked: JSON.parse(localStorage.getItem('Drupal.toolbar.trayVerticalLocked')),
            activeTab: document.getElementById(JSON.parse(localStorage.getItem('Drupal.toolbar.activeTabID'))),
            height: $('#toolbar-administration').outerHeight()
          });
  
          Drupal.toolbar.models.toolbarModel = model;
  
          Object.keys(options.breakpoints).forEach(function (label) {
            var mq = options.breakpoints[label];
            var mql = window.matchMedia(mq);
            Drupal.toolbar.mql[label] = mql;
  
            mql.addListener(Drupal.toolbar.mediaQueryChangeHandler.bind(null, model, label));
  
            Drupal.toolbar.mediaQueryChangeHandler.call(null, model, label, mql);
          });
  
          Drupal.toolbar.views.toolbarVisualView = new Drupal.toolbar.ToolbarVisualView({
            el: this,
            model: model,
            strings: options.strings
          });
          Drupal.toolbar.views.toolbarAuralView = new Drupal.toolbar.ToolbarAuralView({
            el: this,
            model: model,
            strings: options.strings
          });
          Drupal.toolbar.views.bodyVisualView = new Drupal.toolbar.BodyVisualView({
            el: this,
            model: model
          });
  
          model.trigger('change:isFixed', model, model.get('isFixed'));
          model.trigger('change:activeTray', model, model.get('activeTray'));
  
          var menuModel = new Drupal.toolbar.MenuModel();
          Drupal.toolbar.models.menuModel = menuModel;
          Drupal.toolbar.views.menuVisualView = new Drupal.toolbar.MenuVisualView({
            el: $(this).find('.toolbar-menu-administration').get(0),
            model: menuModel,
            strings: options.strings
          });
  
          Drupal.toolbar.setSubtrees.done(function (subtrees) {
            menuModel.set('subtrees', subtrees);
            var theme = drupalSettings.ajaxPageState.theme;
            localStorage.setItem('Drupal.toolbar.subtrees.' + theme, JSON.stringify(subtrees));
  
            model.set('areSubtreesLoaded', true);
          });
  
          Drupal.toolbar.views.toolbarVisualView.loadSubtrees();
  
          $(document).on('drupalViewportOffsetChange.toolbar', function (event, offsets) {
            model.set('offsets', offsets);
          });
  
          model.on('change:orientation', function (model, orientation) {
            $(document).trigger('drupalToolbarOrientationChange', orientation);
          }).on('change:activeTab', function (model, tab) {
            $(document).trigger('drupalToolbarTabChange', tab);
          }).on('change:activeTray', function (model, tray) {
            $(document).trigger('drupalToolbarTrayChange', tray);
          });
  
          if (Drupal.toolbar.models.toolbarModel.get('orientation') === 'horizontal' && Drupal.toolbar.models.toolbarModel.get('activeTab') === null) {
            Drupal.toolbar.models.toolbarModel.set({
              activeTab: $('.toolbar-bar .toolbar-tab:not(.home-toolbar-tab) a').get(0)
            });
          }
        });
      }
    };
  
    Drupal.toolbar = {
      views: {},
  
      models: {},
  
      mql: {},
  
      setSubtrees: new $.Deferred(),
  
      mediaQueryChangeHandler: function mediaQueryChangeHandler(model, label, mql) {
        switch (label) {
          case 'toolbar.narrow':
            model.set({
              isOriented: mql.matches,
              isTrayToggleVisible: false
            });
  
            if (!mql.matches || !model.get('orientation')) {
              model.set({ orientation: 'vertical' }, { validate: true });
            }
            break;
  
          case 'toolbar.standard':
            model.set({
              isFixed: mql.matches
            });
            break;
  
          case 'toolbar.wide':
            model.set({
              orientation: mql.matches && !model.get('locked') ? 'horizontal' : 'vertical'
            }, { validate: true });
  
            model.set({
              isTrayToggleVisible: mql.matches
            });
            break;
  
          default:
            break;
        }
      }
    };
  
    Drupal.theme.toolbarOrientationToggle = function () {
      return '<div class="toolbar-toggle-orientation"><div class="toolbar-lining">' + '<button class="toolbar-icon" type="button"></button>' + '</div></div>';
    };
  
    Drupal.AjaxCommands.prototype.setToolbarSubtrees = function (ajax, response, status) {
      Drupal.toolbar.setSubtrees.resolve(response.subtrees);
    };
  })(jQuery, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Backbone, Drupal) {
    Drupal.toolbar.MenuModel = Backbone.Model.extend({
      defaults: {
        subtrees: {}
      }
    });
  })(Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Backbone, Drupal) {
    Drupal.toolbar.ToolbarModel = Backbone.Model.extend({
      defaults: {
        activeTab: null,
  
        activeTray: null,
  
        isOriented: false,
  
        isFixed: false,
  
        areSubtreesLoaded: false,
  
        isViewportOverflowConstrained: false,
  
        orientation: 'horizontal',
  
        locked: false,
  
        isTrayToggleVisible: true,
  
        height: null,
  
        offsets: {
          top: 0,
          right: 0,
          bottom: 0,
          left: 0
        }
      },
  
      validate: function validate(attributes, options) {
        if (attributes.orientation === 'horizontal' && this.get('locked') && !options.override) {
          return Drupal.t('The toolbar cannot be set to a horizontal orientation when it is locked.');
        }
      }
    });
  })(Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, Backbone) {
    Drupal.toolbar.BodyVisualView = Backbone.View.extend({
      initialize: function initialize() {
        this.listenTo(this.model, 'change:activeTray ', this.render);
        this.listenTo(this.model, 'change:isFixed change:isViewportOverflowConstrained', this.isToolbarFixed);
      },
      isToolbarFixed: function isToolbarFixed() {
        var isViewportOverflowConstrained = this.model.get('isViewportOverflowConstrained');
        $('body').toggleClass('toolbar-fixed', isViewportOverflowConstrained || this.model.get('isFixed'));
      },
      render: function render() {
        $('body').toggleClass('toolbar-tray-open', !!this.model.get('activeTray'));
      }
    });
  })(jQuery, Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Backbone, Drupal) {
    Drupal.toolbar.MenuVisualView = Backbone.View.extend({
      initialize: function initialize() {
        this.listenTo(this.model, 'change:subtrees', this.render);
      },
      render: function render() {
        var _this = this;
  
        var subtrees = this.model.get('subtrees');
  
        Object.keys(subtrees || {}).forEach(function (id) {
          _this.$el.find('#toolbar-link-' + id).once('toolbar-subtrees').after(subtrees[id]);
        });
  
        if ('drupalToolbarMenu' in $.fn) {
          this.$el.children('.toolbar-menu').drupalToolbarMenu();
        }
      }
    });
  })(jQuery, Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Backbone, Drupal) {
    Drupal.toolbar.ToolbarAuralView = Backbone.View.extend({
      initialize: function initialize(options) {
        this.strings = options.strings;
  
        this.listenTo(this.model, 'change:orientation', this.onOrientationChange);
        this.listenTo(this.model, 'change:activeTray', this.onActiveTrayChange);
      },
      onOrientationChange: function onOrientationChange(model, orientation) {
        Drupal.announce(Drupal.t('Tray orientation changed to @orientation.', {
          '@orientation': orientation
        }));
      },
      onActiveTrayChange: function onActiveTrayChange(model, tray) {
        var relevantTray = tray === null ? model.previous('activeTray') : tray;
  
        if (!relevantTray) {
          return;
        }
        var action = tray === null ? Drupal.t('closed') : Drupal.t('opened');
        var trayNameElement = relevantTray.querySelector('.toolbar-tray-name');
        var text = void 0;
        if (trayNameElement !== null) {
          text = Drupal.t('Tray "@tray" @action.', {
            '@tray': trayNameElement.textContent, '@action': action
          });
        } else {
          text = Drupal.t('Tray @action.', { '@action': action });
        }
        Drupal.announce(text);
      }
    });
  })(Backbone, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings, Backbone) {
    Drupal.toolbar.ToolbarVisualView = Backbone.View.extend({
      events: function events() {
        var touchEndToClick = function touchEndToClick(event) {
          event.preventDefault();
          event.target.click();
        };
  
        return {
          'click .toolbar-bar .toolbar-tab .trigger': 'onTabClick',
          'click .toolbar-toggle-orientation button': 'onOrientationToggleClick',
          'touchend .toolbar-bar .toolbar-tab .trigger': touchEndToClick,
          'touchend .toolbar-toggle-orientation button': touchEndToClick
        };
      },
      initialize: function initialize(options) {
        this.strings = options.strings;
  
        this.listenTo(this.model, 'change:activeTab change:orientation change:isOriented change:isTrayToggleVisible', this.render);
        this.listenTo(this.model, 'change:mqMatches', this.onMediaQueryChange);
        this.listenTo(this.model, 'change:offsets', this.adjustPlacement);
        this.listenTo(this.model, 'change:activeTab change:orientation change:isOriented', this.updateToolbarHeight);
  
        this.$el.find('.toolbar-tray .toolbar-lining').append(Drupal.theme('toolbarOrientationToggle'));
  
        this.model.trigger('change:activeTab');
      },
      updateToolbarHeight: function updateToolbarHeight() {
        var toolbarTabOuterHeight = $('#toolbar-bar').find('.toolbar-tab').outerHeight() || 0;
        var toolbarTrayHorizontalOuterHeight = $('.is-active.toolbar-tray-horizontal').outerHeight() || 0;
        this.model.set('height', toolbarTabOuterHeight + toolbarTrayHorizontalOuterHeight);
  
        $('body').css({
          'padding-top': this.model.get('height')
        });
  
        this.triggerDisplace();
      },
      triggerDisplace: function triggerDisplace() {
        _.defer(function () {
          Drupal.displace(true);
        });
      },
      render: function render() {
        this.updateTabs();
        this.updateTrayOrientation();
        this.updateBarAttributes();
  
        $('body').removeClass('toolbar-loading');
  
        if (this.model.changed.orientation === 'vertical' || this.model.changed.activeTab) {
          this.loadSubtrees();
        }
  
        return this;
      },
      onTabClick: function onTabClick(event) {
        if (event.target.hasAttribute('data-toolbar-tray')) {
          var activeTab = this.model.get('activeTab');
          var clickedTab = event.target;
  
          this.model.set('activeTab', !activeTab || clickedTab !== activeTab ? clickedTab : null);
  
          event.preventDefault();
          event.stopPropagation();
        }
      },
      onOrientationToggleClick: function onOrientationToggleClick(event) {
        var orientation = this.model.get('orientation');
  
        var antiOrientation = orientation === 'vertical' ? 'horizontal' : 'vertical';
        var locked = antiOrientation === 'vertical';
  
        if (locked) {
          localStorage.setItem('Drupal.toolbar.trayVerticalLocked', 'true');
        } else {
          localStorage.removeItem('Drupal.toolbar.trayVerticalLocked');
        }
  
        this.model.set({
          locked: locked,
          orientation: antiOrientation
        }, {
          validate: true,
          override: true
        });
  
        event.preventDefault();
        event.stopPropagation();
      },
      updateTabs: function updateTabs() {
        var $tab = $(this.model.get('activeTab'));
  
        $(this.model.previous('activeTab')).removeClass('is-active').prop('aria-pressed', false);
  
        $(this.model.previous('activeTray')).removeClass('is-active');
  
        if ($tab.length > 0) {
          $tab.addClass('is-active').prop('aria-pressed', true);
          var name = $tab.attr('data-toolbar-tray');
  
          var id = $tab.get(0).id;
          if (id) {
            localStorage.setItem('Drupal.toolbar.activeTabID', JSON.stringify(id));
          }
  
          var $tray = this.$el.find('[data-toolbar-tray="' + name + '"].toolbar-tray');
          if ($tray.length) {
            $tray.addClass('is-active');
            this.model.set('activeTray', $tray.get(0));
          } else {
            this.model.set('activeTray', null);
          }
        } else {
          this.model.set('activeTray', null);
          localStorage.removeItem('Drupal.toolbar.activeTabID');
        }
      },
      updateBarAttributes: function updateBarAttributes() {
        var isOriented = this.model.get('isOriented');
        if (isOriented) {
          this.$el.find('.toolbar-bar').attr('data-offset-top', '');
        } else {
          this.$el.find('.toolbar-bar').removeAttr('data-offset-top');
        }
  
        this.$el.toggleClass('toolbar-oriented', isOriented);
      },
      updateTrayOrientation: function updateTrayOrientation() {
        var orientation = this.model.get('orientation');
  
        var antiOrientation = orientation === 'vertical' ? 'horizontal' : 'vertical';
  
        $('body').toggleClass('toolbar-vertical', orientation === 'vertical').toggleClass('toolbar-horizontal', orientation === 'horizontal');
  
        var removeClass = antiOrientation === 'horizontal' ? 'toolbar-tray-horizontal' : 'toolbar-tray-vertical';
        var $trays = this.$el.find('.toolbar-tray').removeClass(removeClass).addClass('toolbar-tray-' + orientation);
  
        var iconClass = 'toolbar-icon-toggle-' + orientation;
        var iconAntiClass = 'toolbar-icon-toggle-' + antiOrientation;
        var $orientationToggle = this.$el.find('.toolbar-toggle-orientation').toggle(this.model.get('isTrayToggleVisible'));
        $orientationToggle.find('button').val(antiOrientation).attr('title', this.strings[antiOrientation]).text(this.strings[antiOrientation]).removeClass(iconClass).addClass(iconAntiClass);
  
        var dir = document.documentElement.dir;
        var edge = dir === 'rtl' ? 'right' : 'left';
  
        $trays.removeAttr('data-offset-left data-offset-right data-offset-top');
  
        $trays.filter('.toolbar-tray-vertical.is-active').attr('data-offset-' + edge, '');
  
        $trays.filter('.toolbar-tray-horizontal.is-active').attr('data-offset-top', '');
      },
      adjustPlacement: function adjustPlacement() {
        var $trays = this.$el.find('.toolbar-tray');
        if (!this.model.get('isOriented')) {
          $trays.removeClass('toolbar-tray-horizontal').addClass('toolbar-tray-vertical');
        }
      },
      loadSubtrees: function loadSubtrees() {
        var $activeTab = $(this.model.get('activeTab'));
        var orientation = this.model.get('orientation');
  
        if (!this.model.get('areSubtreesLoaded') && typeof $activeTab.data('drupal-subtrees') !== 'undefined' && orientation === 'vertical') {
          var subtreesHash = drupalSettings.toolbar.subtreesHash;
          var theme = drupalSettings.ajaxPageState.theme;
          var endpoint = Drupal.url('toolbar/subtrees/' + subtreesHash);
          var cachedSubtreesHash = localStorage.getItem('Drupal.toolbar.subtreesHash.' + theme);
          var cachedSubtrees = JSON.parse(localStorage.getItem('Drupal.toolbar.subtrees.' + theme));
          var isVertical = this.model.get('orientation') === 'vertical';
  
          if (isVertical && subtreesHash === cachedSubtreesHash && cachedSubtrees) {
            Drupal.toolbar.setSubtrees.resolve(cachedSubtrees);
          } else if (isVertical) {
              localStorage.removeItem('Drupal.toolbar.subtreesHash.' + theme);
              localStorage.removeItem('Drupal.toolbar.subtrees.' + theme);
  
              Drupal.ajax({ url: endpoint }).execute();
  
              localStorage.setItem('Drupal.toolbar.subtreesHash.' + theme, subtreesHash);
            }
        }
      }
    });
  })(jQuery, Drupal, drupalSettings, Backbone);;
    /*
   * jQuery Foundation Joyride Plugin 2.1
   * http://foundation.zurb.com
   * Copyright 2013, ZURB
   * Free to use under the MIT license.
   * http://www.opensource.org/licenses/mit-license.php
  */
  
  /*jslint unparam: true, browser: true, indent: 2 */
  
  ;(function ($, window, undefined) {
    'use strict';
  
    var defaults = {
        'version'              : '2.1',
        'tipLocation'          : 'bottom',  // 'top' or 'bottom' in relation to parent
        'nubPosition'          : 'auto',    // override on a per tooltip bases
        'scroll'               : true,      // whether to scroll to tips
        'scrollSpeed'          : 300,       // Page scrolling speed in milliseconds
        'timer'                : 0,         // 0 = no timer , all other numbers = timer in milliseconds
        'autoStart'            : false,     // true or false - false tour starts when restart called
        'startTimerOnClick'    : true,      // true or false - true requires clicking the first button start the timer
        'startOffset'          : 0,         // the index of the tooltip you want to start on (index of the li)
        'nextButton'           : true,      // true or false to control whether a next button is used
        'tipAnimation'         : 'fade',    // 'pop' or 'fade' in each tip
        'pauseAfter'           : [],        // array of indexes where to pause the tour after
        'tipAnimationFadeSpeed': 300,       // when tipAnimation = 'fade' this is speed in milliseconds for the transition
        'cookieMonster'        : false,     // true or false to control whether cookies are used
        'cookieName'           : 'joyride', // Name the cookie you'll use
        'cookieDomain'         : false,     // Will this cookie be attached to a domain, ie. '.notableapp.com'
        'cookiePath'           : false,     // Set to '/' if you want the cookie for the whole website
        'localStorage'         : false,     // true or false to control whether localstorage is used
        'localStorageKey'      : 'joyride', // Keyname in localstorage
        'tipContainer'         : 'body',    // Where will the tip be attached
        'modal'                : false,     // Whether to cover page with modal during the tour
        'expose'               : false,     // Whether to expose the elements at each step in the tour (requires modal:true)
        'postExposeCallback'   : $.noop,    // A method to call after an element has been exposed
        'preRideCallback'      : $.noop,    // A method to call before the tour starts (passed index, tip, and cloned exposed element)
        'postRideCallback'     : $.noop,    // A method to call once the tour closes (canceled or complete)
        'preStepCallback'      : $.noop,    // A method to call before each step
        'postStepCallback'     : $.noop,    // A method to call after each step
        'template' : { // HTML segments for tip layout
          'link'    : '<a href="#close" class="joyride-close-tip">X</a>',
          'timer'   : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
          'tip'     : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
          'wrapper' : '<div class="joyride-content-wrapper" role="dialog"></div>',
          'button'  : '<a href="#" class="joyride-next-tip"></a>',
          'modal'   : '<div class="joyride-modal-bg"></div>',
          'expose'  : '<div class="joyride-expose-wrapper"></div>',
          'exposeCover': '<div class="joyride-expose-cover"></div>'
        }
      },
  
      Modernizr = Modernizr || false,
  
      settings = {},
  
      methods = {
  
        init : function (opts) {
          return this.each(function () {
  
            if ($.isEmptyObject(settings)) {
              settings = $.extend(true, defaults, opts);
  
              // non configurable settings
              settings.document = window.document;
              settings.$document = $(settings.document);
              settings.$window = $(window);
              settings.$content_el = $(this);
              settings.$body = $(settings.tipContainer);
              settings.body_offset = $(settings.tipContainer).position();
              settings.$tip_content = $('> li', settings.$content_el);
              settings.paused = false;
              settings.attempts = 0;
  
              settings.tipLocationPatterns = {
                top: ['bottom'],
                bottom: [], // bottom should not need to be repositioned
                left: ['right', 'top', 'bottom'],
                right: ['left', 'top', 'bottom']
              };
  
              // are we using jQuery 1.7+
              methods.jquery_check();
  
              // can we create cookies?
              if (!$.isFunction($.cookie)) {
                settings.cookieMonster = false;
              }
  
              // generate the tips and insert into dom.
              if ( (!settings.cookieMonster || !$.cookie(settings.cookieName) ) &&
                (!settings.localStorage || !methods.support_localstorage() || !localStorage.getItem(settings.localStorageKey) ) ) {
  
                settings.$tip_content.each(function (index) {
                  methods.create({$li : $(this), index : index});
                });
  
                // show first tip
                if(settings.autoStart)
                {
                  if (!settings.startTimerOnClick && settings.timer > 0) {
                    methods.show('init');
                    methods.startTimer();
                  } else {
                    methods.show('init');
                  }
                }
  
              }
  
              settings.$document.on('click.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
                e.preventDefault();
  
                if (settings.$li.next().length < 1) {
                  methods.end();
                } else if (settings.timer > 0) {
                  clearTimeout(settings.automate);
                  methods.hide();
                  methods.show();
                  methods.startTimer();
                } else {
                  methods.hide();
                  methods.show();
                }
  
              });
  
              settings.$document.on('click.joyride', '.joyride-close-tip', function (e) {
                e.preventDefault();
                methods.end(true /* isAborted */);
              });
  
              settings.$window.on('resize.joyride', function (e) {
                if(settings.$li){
                if(settings.exposed && settings.exposed.length>0){
                  var $els = $(settings.exposed);
                  $els.each(function(){
                    var $this = $(this);
                    methods.un_expose($this);
                    methods.expose($this);
                  });
                }
                if (methods.is_phone()) {
                  methods.pos_phone();
                } else {
                  methods.pos_default();
                }
                }
              });
            } else {
              methods.restart();
            }
  
          });
        },
  
        // call this method when you want to resume the tour
        resume : function () {
          methods.set_li();
          methods.show();
        },
  
        nextTip: function(){
              if (settings.$li.next().length < 1) {
              methods.end();
              } else if (settings.timer > 0) {
              clearTimeout(settings.automate);
              methods.hide();
              methods.show();
              methods.startTimer();
              } else {
              methods.hide();
              methods.show();
              }
        },
  
        tip_template : function (opts) {
          var $blank, content, $wrapper;
  
          opts.tip_class = opts.tip_class || '';
  
          $blank = $(settings.template.tip).addClass(opts.tip_class);
          content = $.trim($(opts.li).html()) +
            methods.button_text(opts.button_text) +
            settings.template.link +
            methods.timer_instance(opts.index);
  
          $wrapper = $(settings.template.wrapper);
          if (opts.li.attr('data-aria-labelledby')) {
            $wrapper.attr('aria-labelledby', opts.li.attr('data-aria-labelledby'))
          }
          if (opts.li.attr('data-aria-describedby')) {
            $wrapper.attr('aria-describedby', opts.li.attr('data-aria-describedby'))
          }
          $blank.append($wrapper);
          $blank.first().attr('data-index', opts.index);
          $('.joyride-content-wrapper', $blank).append(content);
  
          return $blank[0];
        },
  
        timer_instance : function (index) {
          var txt;
  
          if ((index === 0 && settings.startTimerOnClick && settings.timer > 0) || settings.timer === 0) {
            txt = '';
          } else {
            txt = methods.outerHTML($(settings.template.timer)[0]);
          }
          return txt;
        },
  
        button_text : function (txt) {
          if (settings.nextButton) {
            txt = $.trim(txt) || 'Next';
            txt = methods.outerHTML($(settings.template.button).append(txt)[0]);
          } else {
            txt = '';
          }
          return txt;
        },
  
        create : function (opts) {
          // backwards compatibility with data-text attribute
          var buttonText = opts.$li.attr('data-button') || opts.$li.attr('data-text'),
            tipClass = opts.$li.attr('class'),
            $tip_content = $(methods.tip_template({
              tip_class : tipClass,
              index : opts.index,
              button_text : buttonText,
              li : opts.$li
            }));
  
          $(settings.tipContainer).append($tip_content);
        },
  
        show : function (init) {
          var opts = {}, ii, opts_arr = [], opts_len = 0, p,
              $timer = null;
  
          // are we paused?
          if (settings.$li === undefined || ($.inArray(settings.$li.index(), settings.pauseAfter) === -1)) {
  
            // don't go to the next li if the tour was paused
            if (settings.paused) {
              settings.paused = false;
            } else {
              methods.set_li(init);
            }
  
            settings.attempts = 0;
  
            if (settings.$li.length && settings.$target.length > 0) {
              if(init){ //run when we first start
                  settings.preRideCallback(settings.$li.index(), settings.$next_tip );
                  if(settings.modal){
                      methods.show_modal();
                  }
              }
              settings.preStepCallback(settings.$li.index(), settings.$next_tip );
  
              // parse options
              opts_arr = (settings.$li.data('options') || ':').split(';');
              opts_len = opts_arr.length;
              for (ii = opts_len - 1; ii >= 0; ii--) {
                p = opts_arr[ii].split(':');
  
                if (p.length === 2) {
                  opts[$.trim(p[0])] = $.trim(p[1]);
                }
              }
              settings.tipSettings = $.extend({}, settings, opts);
              settings.tipSettings.tipLocationPattern = settings.tipLocationPatterns[settings.tipSettings.tipLocation];
  
              if(settings.modal && settings.expose){
                methods.expose();
              }
  
              // scroll if not modal
              if (!settings.$target.is("body") && settings.scroll) {
                methods.scroll_to();
              }
  
              if (methods.is_phone()) {
                methods.pos_phone(true);
              } else {
                methods.pos_default(true);
              }
  
              $timer = $('.joyride-timer-indicator', settings.$next_tip);
  
              if (/pop/i.test(settings.tipAnimation)) {
  
                $timer.outerWidth(0);
  
                if (settings.timer > 0) {
  
                  settings.$next_tip.show();
                  $timer.animate({
                    width: $('.joyride-timer-indicator-wrap', settings.$next_tip).outerWidth()
                  }, settings.timer);
  
                } else {
  
                  settings.$next_tip.show();
  
                }
  
  
              } else if (/fade/i.test(settings.tipAnimation)) {
  
                $timer.outerWidth(0);
  
                if (settings.timer > 0) {
  
                  settings.$next_tip.fadeIn(settings.tipAnimationFadeSpeed);
  
                  settings.$next_tip.show();
                  $timer.animate({
                    width: $('.joyride-timer-indicator-wrap', settings.$next_tip).outerWidth()
                  }, settings.timer);
  
                } else {
  
                  settings.$next_tip.fadeIn(settings.tipAnimationFadeSpeed);
  
                }
              }
  
              settings.$current_tip = settings.$next_tip;
              // Focus next button for keyboard users.
              $('.joyride-next-tip', settings.$current_tip).focus();
              methods.tabbable(settings.$current_tip);
            // skip non-existent targets
            } else if (settings.$li && settings.$target.length < 1) {
  
              methods.show();
  
            } else {
  
              methods.end();
  
            }
          } else {
  
            settings.paused = true;
  
          }
  
        },
  
        // detect phones with media queries if supported.
        is_phone : function () {
          if (Modernizr) {
            return Modernizr.mq('only screen and (max-width: 767px)');
          }
  
          return (settings.$window.width() < 767) ? true : false;
        },
  
        support_localstorage : function () {
          if (Modernizr) {
            return Modernizr.localstorage;
          } else {
            return !!window.localStorage;
          }
        },
  
        hide : function () {
          if(settings.modal && settings.expose){
            methods.un_expose();
          }
          if(!settings.modal){
          $('.joyride-modal-bg').hide();
          }
          settings.$current_tip.hide();
          settings.postStepCallback(settings.$li.index(), settings.$current_tip);
        },
  
        set_li : function (init) {
          if (init) {
            settings.$li = settings.$tip_content.eq(settings.startOffset);
            methods.set_next_tip();
            settings.$current_tip = settings.$next_tip;
          } else {
            settings.$li = settings.$li.next();
            methods.set_next_tip();
          }
  
          methods.set_target();
        },
  
        set_next_tip : function () {
          settings.$next_tip = $('.joyride-tip-guide[data-index=' + settings.$li.index() + ']');
        },
  
        set_target : function () {
          var cl = settings.$li.attr('data-class'),
              id = settings.$li.attr('data-id'),
              $sel = function () {
                if (id) {
                  return $(settings.document.getElementById(id));
                } else if (cl) {
                  return $('.' + cl).filter(":visible").first();
                } else {
                  return $('body');
                }
              };
  
          settings.$target = $sel();
        },
  
        scroll_to : function () {
          var window_half, tipOffset;
  
          window_half = settings.$window.height() / 2;
          tipOffset = Math.ceil(settings.$target.offset().top - window_half + settings.$next_tip.outerHeight());
  
          $("html, body").stop().animate({
            scrollTop: tipOffset
          }, settings.scrollSpeed);
        },
  
        paused : function () {
          if (($.inArray((settings.$li.index() + 1), settings.pauseAfter) === -1)) {
            return true;
          }
  
          return false;
        },
  
        destroy : function () {
          if(!$.isEmptyObject(settings)){
          settings.$document.off('.joyride');
          }
  
          $(window).off('.joyride');
          $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
          $('.joyride-tip-guide, .joyride-modal-bg').remove();
          clearTimeout(settings.automate);
          settings = {};
        },
  
        restart : function () {
          if(!settings.autoStart)
          {
            if (!settings.startTimerOnClick && settings.timer > 0) {
              methods.show('init');
              methods.startTimer();
            } else {
              methods.show('init');
            }
            settings.autoStart = true;
          }
          else
          {
          methods.hide();
          settings.$li = undefined;
          methods.show('init');
          }
        },
  
        pos_default : function (init) {
          var half_fold = Math.ceil(settings.$window.height() / 2),
              tip_position = settings.$next_tip.offset(),
              $nub = $('.joyride-nub', settings.$next_tip),
              nub_width = Math.ceil($nub.outerWidth() / 2),
              nub_height = Math.ceil($nub.outerHeight() / 2),
              toggle = init || false;
  
          // tip must not be "display: none" to calculate position
          if (toggle) {
            settings.$next_tip.css('visibility', 'hidden');
            settings.$next_tip.show();
          }
  
          if (!settings.$target.is("body")) {
              var
                topAdjustment = settings.tipSettings.tipAdjustmentY ? parseInt(settings.tipSettings.tipAdjustmentY) : 0,
                leftAdjustment = settings.tipSettings.tipAdjustmentX ? parseInt(settings.tipSettings.tipAdjustmentX) : 0;
  
              if (methods.bottom()) {
                settings.$next_tip.css({
                  top: (settings.$target.offset().top + nub_height + settings.$target.outerHeight() + topAdjustment),
                  left: settings.$target.offset().left + leftAdjustment});
  
                if (/right/i.test(settings.tipSettings.nubPosition)) {
                  settings.$next_tip.css('left', settings.$target.offset().left - settings.$next_tip.outerWidth() + settings.$target.outerWidth());
                }
  
                methods.nub_position($nub, settings.tipSettings.nubPosition, 'top');
  
              } else if (methods.top()) {
  
                settings.$next_tip.css({
                  top: (settings.$target.offset().top - settings.$next_tip.outerHeight() - nub_height + topAdjustment),
                  left: settings.$target.offset().left + leftAdjustment});
  
                methods.nub_position($nub, settings.tipSettings.nubPosition, 'bottom');
  
              } else if (methods.right()) {
  
                settings.$next_tip.css({
                  top: settings.$target.offset().top + topAdjustment,
                  left: (settings.$target.outerWidth() + settings.$target.offset().left + nub_width) + leftAdjustment});
  
                methods.nub_position($nub, settings.tipSettings.nubPosition, 'left');
  
              } else if (methods.left()) {
  
                settings.$next_tip.css({
                  top: settings.$target.offset().top + topAdjustment,
                  left: (settings.$target.offset().left - settings.$next_tip.outerWidth() - nub_width) + leftAdjustment});
  
                methods.nub_position($nub, settings.tipSettings.nubPosition, 'right');
  
              }
  
              if (!methods.visible(methods.corners(settings.$next_tip)) && settings.attempts < settings.tipSettings.tipLocationPattern.length) {
  
                $nub.removeClass('bottom')
                  .removeClass('top')
                  .removeClass('right')
                  .removeClass('left');
  
                settings.tipSettings.tipLocation = settings.tipSettings.tipLocationPattern[settings.attempts];
  
                settings.attempts++;
  
                methods.pos_default(true);
  
              }
  
          } else if (settings.$li.length) {
  
            methods.pos_modal($nub);
  
          }
  
          if (toggle) {
            settings.$next_tip.hide();
            settings.$next_tip.css('visibility', 'visible');
          }
  
        },
  
        pos_phone : function (init) {
          var tip_height = settings.$next_tip.outerHeight(),
              tip_offset = settings.$next_tip.offset(),
              target_height = settings.$target.outerHeight(),
              $nub = $('.joyride-nub', settings.$next_tip),
              nub_height = Math.ceil($nub.outerHeight() / 2),
              toggle = init || false;
  
          $nub.removeClass('bottom')
            .removeClass('top')
            .removeClass('right')
            .removeClass('left');
  
          if (toggle) {
            settings.$next_tip.css('visibility', 'hidden');
            settings.$next_tip.show();
          }
  
          if (!settings.$target.is("body")) {
  
            if (methods.top()) {
  
                settings.$next_tip.offset({top: settings.$target.offset().top - tip_height - nub_height});
                $nub.addClass('bottom');
  
            } else {
  
              settings.$next_tip.offset({top: settings.$target.offset().top + target_height + nub_height});
              $nub.addClass('top');
  
            }
  
          } else if (settings.$li.length) {
  
            methods.pos_modal($nub);
  
          }
  
          if (toggle) {
            settings.$next_tip.hide();
            settings.$next_tip.css('visibility', 'visible');
          }
        },
  
        pos_modal : function ($nub) {
          methods.center();
          $nub.hide();
  
          methods.show_modal();
  
        },
  
        show_modal : function() {
          if ($('.joyride-modal-bg').length < 1) {
              $('body').append(settings.template.modal).show();
          }
  
          if (/pop/i.test(settings.tipAnimation)) {
            $('.joyride-modal-bg').show();
          } else {
            $('.joyride-modal-bg').fadeIn(settings.tipAnimationFadeSpeed);
          }
        },
  
        expose: function(){
          var expose,
            exposeCover,
            el,
            origCSS,
            randId = 'expose-'+Math.floor(Math.random()*10000);
          if (arguments.length>0 && arguments[0] instanceof $){
            el = arguments[0];
          } else if(settings.$target && !settings.$target.is("body")){
            el = settings.$target;
          }  else {
            return false;
          }
          if(el.length < 1){
            if(window.console){
              console.error('element not valid', el);
            }
            return false;
          }
          expose = $(settings.template.expose);
          settings.$body.append(expose);
          expose.css({
            top: el.offset().top,
            left: el.offset().left,
            width: el.outerWidth(true),
            height: el.outerHeight(true)
          });
          exposeCover = $(settings.template.exposeCover);
          origCSS = {
                    zIndex: el.css('z-index'),
                    position: el.css('position')
                    };
          el.css('z-index',expose.css('z-index')*1+1);
          if(origCSS.position == 'static'){
            el.css('position','relative');
          }
          el.data('expose-css',origCSS);
          exposeCover.css({
            top: el.offset().top,
            left: el.offset().left,
            width: el.outerWidth(true),
            height: el.outerHeight(true)
          });
          settings.$body.append(exposeCover);
          expose.addClass(randId);
          exposeCover.addClass(randId);
          if(settings.tipSettings['exposeClass']){
            expose.addClass(settings.tipSettings['exposeClass']);
            exposeCover.addClass(settings.tipSettings['exposeClass']);
          }
          el.data('expose', randId);
          settings.postExposeCallback(settings.$li.index(), settings.$next_tip, el);
          methods.add_exposed(el);
        },
  
        un_expose: function(){
          var exposeId,
            el,
            expose ,
            origCSS,
            clearAll = false;
          if (arguments.length>0 && arguments[0] instanceof $){
            el = arguments[0];
          } else if(settings.$target && !settings.$target.is("body")){
            el = settings.$target;
          }  else {
            return false;
          }
          if(el.length < 1){
            if(window.console){
              console.error('element not valid', el);
            }
            return false;
          }
          exposeId = el.data('expose');
          expose = $('.'+exposeId);
          if(arguments.length>1){
            clearAll = arguments[1];
          }
          if(clearAll === true){
            $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
          } else {
            expose.remove();
          }
          origCSS = el.data('expose-css');
          if(origCSS.zIndex == 'auto'){
            el.css('z-index', '');
          } else {
            el.css('z-index',origCSS.zIndex);
          }
          if(origCSS.position != el.css('position')){
            if(origCSS.position == 'static'){// this is default, no need to set it.
              el.css('position', '');
            } else {
              el.css('position',origCSS.position);
            }
          }
          el.removeData('expose');
          el.removeData('expose-z-index');
          methods.remove_exposed(el);
        },
  
        add_exposed: function(el){
          settings.exposed = settings.exposed || [];
          if(el instanceof $){
            settings.exposed.push(el[0]);
          } else if(typeof el == 'string'){
            settings.exposed.push(el);
          }
        },
  
        remove_exposed: function(el){
          var search;
          if(el instanceof $){
            search = el[0]
          } else if (typeof el == 'string'){
            search = el;
          }
          settings.exposed = settings.exposed || [];
          for(var i=0; i<settings.exposed.length; i++){
            if(settings.exposed[i] == search){
              settings.exposed.splice(i,1);
              return;
            }
          }
        },
  
        center : function () {
          var $w = settings.$window;
  
          settings.$next_tip.css({
            top : ((($w.height() - settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
            left : ((($w.width() - settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
          });
  
          return true;
        },
  
        bottom : function () {
          return /bottom/i.test(settings.tipSettings.tipLocation);
        },
  
        top : function () {
          return /top/i.test(settings.tipSettings.tipLocation);
        },
  
        right : function () {
          return /right/i.test(settings.tipSettings.tipLocation);
        },
  
        left : function () {
          return /left/i.test(settings.tipSettings.tipLocation);
        },
  
        corners : function (el) {
          var w = settings.$window,
              window_half = w.height() / 2,
              tipOffset = Math.ceil(settings.$target.offset().top - window_half + settings.$next_tip.outerHeight()),//using this to calculate since scroll may not have finished yet.
              right = w.width() + w.scrollLeft(),
              offsetBottom =  w.height() + tipOffset,
              bottom = w.height() + w.scrollTop(),
              top = w.scrollTop();
  
              if(tipOffset < top){
                if (tipOffset <0 ){
                  top = 0;
                } else {
                  top = tipOffset;
                }
              }
  
              if(offsetBottom > bottom){
                bottom = offsetBottom;
              }
  
          return [
            el.offset().top < top,
            right < el.offset().left + el.outerWidth(),
            bottom < el.offset().top + el.outerHeight(),
            w.scrollLeft() > el.offset().left
          ];
        },
  
        visible : function (hidden_corners) {
          var i = hidden_corners.length;
  
          while (i--) {
            if (hidden_corners[i]) return false;
          }
  
          return true;
        },
  
        nub_position : function (nub, pos, def) {
          if (pos === 'auto') {
            nub.addClass(def);
          } else {
            nub.addClass(pos);
          }
        },
  
        startTimer : function () {
          if (settings.$li.length) {
            settings.automate = setTimeout(function () {
              methods.hide();
              methods.show();
              methods.startTimer();
            }, settings.timer);
          } else {
            clearTimeout(settings.automate);
          }
        },
  
        end : function (isAborted) {
          isAborted = isAborted || false;
  
          // Unbind resize events.
          if (isAborted) {
            settings.$window.off('resize.joyride');
          }
  
          if (settings.cookieMonster) {
            $.cookie(settings.cookieName, 'ridden', { expires: 365, domain: settings.cookieDomain, path: settings.cookiePath });
          }
  
          if (settings.localStorage) {
            localStorage.setItem(settings.localStorageKey, true);
          }
  
          if (settings.timer > 0) {
            clearTimeout(settings.automate);
          }
          if(settings.modal && settings.expose){
            methods.un_expose();
          }
          if (settings.$current_tip) {
            settings.$current_tip.hide();
          }
          if (settings.$li) {
            settings.postStepCallback(settings.$li.index(), settings.$current_tip, isAborted);
            settings.postRideCallback(settings.$li.index(), settings.$current_tip, isAborted);
          }
          $('.joyride-modal-bg').hide();
        },
  
        jquery_check : function () {
          // define on() and off() for older jQuery
          if (!$.isFunction($.fn.on)) {
  
            $.fn.on = function (types, sel, fn) {
  
              return this.delegate(sel, types, fn);
  
            };
  
            $.fn.off = function (types, sel, fn) {
  
              return this.undelegate(sel, types, fn);
  
            };
  
            return false;
          }
  
          return true;
        },
  
        outerHTML : function (el) {
          // support FireFox < 11
          return el.outerHTML || new XMLSerializer().serializeToString(el);
        },
  
        version : function () {
          return settings.version;
        },
  
        tabbable : function (el) {
          $(el).on('keydown', function( event ) {
            if (!event.isDefaultPrevented() && event.keyCode &&
                // Escape key.
                event.keyCode === 27 ) {
              event.preventDefault();
              methods.end(true /* isAborted */);
              return;
            }
  
            // Prevent tabbing out of tour items.
            if ( event.keyCode !== 9 ) {
              return;
            }
            var tabbables = $(el).find(":tabbable"),
              first = tabbables.filter(":first"),
              last  = tabbables.filter(":last");
            if ( event.target === last[0] && !event.shiftKey ) {
              first.focus( 1 );
              event.preventDefault();
            } else if ( event.target === first[0] && event.shiftKey ) {
              last.focus( 1 );
              event.preventDefault();
            }
          });
        }
  
      };
  
    $.fn.joyride = function (method) {
      if (methods[method]) {
        return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
      } else if (typeof method === 'object' || !method) {
        return methods.init.apply(this, arguments);
      } else {
        $.error('Method ' +  method + ' does not exist on jQuery.joyride');
      }
    };
  
  }(jQuery, this));
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Backbone, Drupal, document) {
    var queryString = decodeURI(window.location.search);
  
    Drupal.behaviors.tour = {
      attach: function attach(context) {
        $('body').once('tour').each(function () {
          var model = new Drupal.tour.models.StateModel();
          new Drupal.tour.views.ToggleTourView({
            el: $(context).find('#toolbar-tab-tour'),
            model: model
          });
  
          model.on('change:isActive', function (model, isActive) {
            $(document).trigger(isActive ? 'drupalTourStarted' : 'drupalTourStopped');
          }).set('tour', $(context).find('ol#tour'));
  
          if (/tour=?/i.test(queryString)) {
            model.set('isActive', true);
          }
        });
      }
    };
  
    Drupal.tour = Drupal.tour || {
      models: {},
  
      views: {}
    };
  
    Drupal.tour.models.StateModel = Backbone.Model.extend({
      defaults: {
        tour: [],
  
        isActive: false,
  
        activeTour: []
      }
    });
  
    Drupal.tour.views.ToggleTourView = Backbone.View.extend({
      events: { click: 'onClick' },
  
      initialize: function initialize() {
        this.listenTo(this.model, 'change:tour change:isActive', this.render);
        this.listenTo(this.model, 'change:isActive', this.toggleTour);
      },
      render: function render() {
        this.$el.toggleClass('hidden', this._getTour().length === 0);
  
        var isActive = this.model.get('isActive');
        this.$el.find('button').toggleClass('is-active', isActive).prop('aria-pressed', isActive);
        return this;
      },
      toggleTour: function toggleTour() {
        if (this.model.get('isActive')) {
          var $tour = this._getTour();
          this._removeIrrelevantTourItems($tour, this._getDocument());
          var that = this;
          var close = Drupal.t('Close');
          if ($tour.find('li').length) {
            $tour.joyride({
              autoStart: true,
              postRideCallback: function postRideCallback() {
                that.model.set('isActive', false);
              },
  
              template: {
                link: '<a href="#close" class="joyride-close-tip" aria-label="' + close + '">&times;</a>',
                button: '<a href="#" class="button button--primary joyride-next-tip"></a>'
              }
            });
            this.model.set({ isActive: true, activeTour: $tour });
          }
        } else {
          this.model.get('activeTour').joyride('destroy');
          this.model.set({ isActive: false, activeTour: [] });
        }
      },
      onClick: function onClick(event) {
        this.model.set('isActive', !this.model.get('isActive'));
        event.preventDefault();
        event.stopPropagation();
      },
      _getTour: function _getTour() {
        return this.model.get('tour');
      },
      _getDocument: function _getDocument() {
        return $(document);
      },
      _removeIrrelevantTourItems: function _removeIrrelevantTourItems($tour, $document) {
        var removals = false;
        var tips = /tips=([^&]+)/.exec(queryString);
        $tour.find('li').each(function () {
          var $this = $(this);
          var itemId = $this.attr('data-id');
          var itemClass = $this.attr('data-class');
  
          if (tips && !$(this).hasClass(tips[1])) {
            removals = true;
            $this.remove();
            return;
          }
  
          if (!itemId && !itemClass || itemId && $document.find('#' + itemId).length || itemClass && $document.find('.' + itemClass).length) {
            return;
          }
          removals = true;
          $this.remove();
        });
  
        if (removals) {
          var total = $tour.find('li').length;
          if (!total) {
            this.model.set({ tour: [] });
          }
  
          $tour.find('li').each(function (index) {
            var progress = Drupal.t('!tour_item of !total', { '!tour_item': index + 1, '!total': total });
            $(this).find('.tour-progress').text(progress);
          }).eq(-1).attr('data-text', Drupal.t('End tour'));
        }
      }
    });
  })(jQuery, Backbone, Drupal, document);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    function TabbingManager() {
      this.stack = [];
    }
  
    $.extend(TabbingManager.prototype, {
      constrain: function constrain(elements) {
        var il = this.stack.length;
        for (var i = 0; i < il; i++) {
          this.stack[i].deactivate();
        }
  
        var $elements = $(elements).find(':tabbable').addBack(':tabbable');
  
        var tabbingContext = new TabbingContext({
          level: this.stack.length,
          $tabbableElements: $elements
        });
  
        this.stack.push(tabbingContext);
  
        tabbingContext.activate();
  
        $(document).trigger('drupalTabbingConstrained', tabbingContext);
  
        return tabbingContext;
      },
      release: function release() {
        var toActivate = this.stack.length - 1;
        while (toActivate >= 0 && this.stack[toActivate].released) {
          toActivate--;
        }
  
        this.stack.splice(toActivate + 1);
  
        if (toActivate >= 0) {
          this.stack[toActivate].activate();
        }
      },
      activate: function activate(tabbingContext) {
        var $set = tabbingContext.$tabbableElements;
        var level = tabbingContext.level;
  
        var $disabledSet = $(':tabbable').not($set);
  
        tabbingContext.$disabledElements = $disabledSet;
  
        var il = $disabledSet.length;
        for (var i = 0; i < il; i++) {
          this.recordTabindex($disabledSet.eq(i), level);
        }
  
        $disabledSet.prop('tabindex', -1).prop('autofocus', false);
  
        var $hasFocus = $set.filter('[autofocus]').eq(-1);
  
        if ($hasFocus.length === 0) {
          $hasFocus = $set.eq(0);
        }
        $hasFocus.trigger('focus');
      },
      deactivate: function deactivate(tabbingContext) {
        var $set = tabbingContext.$disabledElements;
        var level = tabbingContext.level;
        var il = $set.length;
        for (var i = 0; i < il; i++) {
          this.restoreTabindex($set.eq(i), level);
        }
      },
      recordTabindex: function recordTabindex($el, level) {
        var tabInfo = $el.data('drupalOriginalTabIndices') || {};
        tabInfo[level] = {
          tabindex: $el[0].getAttribute('tabindex'),
          autofocus: $el[0].hasAttribute('autofocus')
        };
        $el.data('drupalOriginalTabIndices', tabInfo);
      },
      restoreTabindex: function restoreTabindex($el, level) {
        var tabInfo = $el.data('drupalOriginalTabIndices');
        if (tabInfo && tabInfo[level]) {
          var data = tabInfo[level];
          if (data.tabindex) {
            $el[0].setAttribute('tabindex', data.tabindex);
          } else {
              $el[0].removeAttribute('tabindex');
            }
          if (data.autofocus) {
            $el[0].setAttribute('autofocus', 'autofocus');
          }
  
          if (level === 0) {
            $el.removeData('drupalOriginalTabIndices');
          } else {
            var levelToDelete = level;
            while (tabInfo.hasOwnProperty(levelToDelete)) {
              delete tabInfo[levelToDelete];
              levelToDelete++;
            }
            $el.data('drupalOriginalTabIndices', tabInfo);
          }
        }
      }
    });
  
    function TabbingContext(options) {
      $.extend(this, {
        level: null,
  
        $tabbableElements: $(),
  
        $disabledElements: $(),
  
        released: false,
  
        active: false
      }, options);
    }
  
    $.extend(TabbingContext.prototype, {
      release: function release() {
        if (!this.released) {
          this.deactivate();
          this.released = true;
          Drupal.tabbingManager.release(this);
  
          $(document).trigger('drupalTabbingContextReleased', this);
        }
      },
      activate: function activate() {
        if (!this.active && !this.released) {
          this.active = true;
          Drupal.tabbingManager.activate(this);
  
          $(document).trigger('drupalTabbingContextActivated', this);
        }
      },
      deactivate: function deactivate() {
        if (this.active) {
          this.active = false;
          Drupal.tabbingManager.deactivate(this);
  
          $(document).trigger('drupalTabbingContextDeactivated', this);
        }
      }
    });
  
    if (Drupal.tabbingManager) {
      return;
    }
  
    Drupal.tabbingManager = new TabbingManager();
  })(jQuery, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, Backbone) {
    var strings = {
      tabbingReleased: Drupal.t('Tabbing is no longer constrained by the Contextual module.'),
      tabbingConstrained: Drupal.t('Tabbing is constrained to a set of @contextualsCount and the edit mode toggle.'),
      pressEsc: Drupal.t('Press the esc key to exit.')
    };
  
    function initContextualToolbar(context) {
      if (!Drupal.contextual || !Drupal.contextual.collection) {
        return;
      }
  
      var contextualToolbar = Drupal.contextualToolbar;
      contextualToolbar.model = new contextualToolbar.StateModel({
        isViewing: localStorage.getItem('Drupal.contextualToolbar.isViewing') !== 'false'
      }, {
        contextualCollection: Drupal.contextual.collection
      });
  
      var viewOptions = {
        el: $('.toolbar .toolbar-bar .contextual-toolbar-tab'),
        model: contextualToolbar.model,
        strings: strings
      };
      new contextualToolbar.VisualView(viewOptions);
      new contextualToolbar.AuralView(viewOptions);
    }
  
    Drupal.behaviors.contextualToolbar = {
      attach: function attach(context) {
        if ($('body').once('contextualToolbar-init').length) {
          initContextualToolbar(context);
        }
      }
    };
  
    Drupal.contextualToolbar = {
      model: null
    };
  })(jQuery, Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, Backbone) {
    Drupal.contextualToolbar.StateModel = Backbone.Model.extend({
      defaults: {
        isViewing: true,
  
        isVisible: false,
  
        contextualCount: 0,
  
        tabbingContext: null
      },
  
      initialize: function initialize(attrs, options) {
        this.listenTo(options.contextualCollection, 'reset remove add', this.countContextualLinks);
        this.listenTo(options.contextualCollection, 'add', this.lockNewContextualLinks);
  
        this.listenTo(this, 'change:contextualCount', this.updateVisibility);
  
        this.listenTo(this, 'change:isViewing', function (model, isViewing) {
          options.contextualCollection.each(function (contextualModel) {
            contextualModel.set('isLocked', !isViewing);
          });
        });
      },
      countContextualLinks: function countContextualLinks(contextualModel, contextualCollection) {
        this.set('contextualCount', contextualCollection.length);
      },
      lockNewContextualLinks: function lockNewContextualLinks(contextualModel, contextualCollection) {
        if (!this.get('isViewing')) {
          contextualModel.set('isLocked', true);
        }
      },
      updateVisibility: function updateVisibility() {
        this.set('isVisible', this.get('contextualCount') > 0);
      }
    });
  })(Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, Backbone, _) {
    Drupal.contextualToolbar.AuralView = Backbone.View.extend({
      announcedOnce: false,
  
      initialize: function initialize(options) {
        this.options = options;
  
        this.listenTo(this.model, 'change', this.render);
        this.listenTo(this.model, 'change:isViewing', this.manageTabbing);
  
        $(document).on('keyup', _.bind(this.onKeypress, this));
        this.manageTabbing();
      },
      render: function render() {
        this.$el.find('button').attr('aria-pressed', !this.model.get('isViewing'));
  
        return this;
      },
      manageTabbing: function manageTabbing() {
        var tabbingContext = this.model.get('tabbingContext');
  
        if (tabbingContext) {
          if (tabbingContext.active) {
            Drupal.announce(this.options.strings.tabbingReleased);
          }
          tabbingContext.release();
        }
  
        if (!this.model.get('isViewing')) {
          tabbingContext = Drupal.tabbingManager.constrain($('.contextual-toolbar-tab, .contextual'));
          this.model.set('tabbingContext', tabbingContext);
          this.announceTabbingConstraint();
          this.announcedOnce = true;
        }
      },
      announceTabbingConstraint: function announceTabbingConstraint() {
        var strings = this.options.strings;
        Drupal.announce(Drupal.formatString(strings.tabbingConstrained, {
          '@contextualsCount': Drupal.formatPlural(Drupal.contextual.collection.length, '@count contextual link', '@count contextual links')
        }));
        Drupal.announce(strings.pressEsc);
      },
      onKeypress: function onKeypress(event) {
        if (!this.announcedOnce && event.keyCode === 9 && !this.model.get('isViewing')) {
          this.announceTabbingConstraint();
  
          this.announcedOnce = true;
        }
  
        if (event.keyCode === 27) {
          this.model.set('isViewing', true);
        }
      }
    });
  })(jQuery, Drupal, Backbone, _);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, Backbone) {
    Drupal.contextualToolbar.VisualView = Backbone.View.extend({
      events: function events() {
        var touchEndToClick = function touchEndToClick(event) {
          event.preventDefault();
          event.target.click();
        };
  
        return {
          click: function click() {
            this.model.set('isViewing', !this.model.get('isViewing'));
          },
  
          touchend: touchEndToClick
        };
      },
      initialize: function initialize() {
        this.listenTo(this.model, 'change', this.render);
        this.listenTo(this.model, 'change:isViewing', this.persist);
      },
      render: function render() {
        this.$el.toggleClass('hidden', !this.model.get('isVisible'));
  
        this.$el.find('button').toggleClass('is-active', !this.model.get('isViewing'));
  
        return this;
      },
      persist: function persist(model, isViewing) {
        if (!isViewing) {
          localStorage.setItem('Drupal.contextualToolbar.isViewing', 'false');
        } else {
          localStorage.removeItem('Drupal.contextualToolbar.isViewing');
        }
      }
    });
  })(Drupal, Backbone);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings) {
    var pathInfo = drupalSettings.path;
    var escapeAdminPath = sessionStorage.getItem('escapeAdminPath');
    var windowLocation = window.location;
  
    if (!pathInfo.currentPathIsAdmin && !/destination=/.test(windowLocation.search)) {
      sessionStorage.setItem('escapeAdminPath', windowLocation);
    }
  
    Drupal.behaviors.escapeAdmin = {
      attach: function attach() {
        var $toolbarEscape = $('[data-toolbar-escape-admin]').once('escapeAdmin');
        if ($toolbarEscape.length && pathInfo.currentPathIsAdmin) {
          if (escapeAdminPath !== null) {
            $toolbarEscape.attr('href', escapeAdminPath);
          } else {
            $toolbarEscape.text(Drupal.t('Home'));
          }
        }
      }
    };
  })(jQuery, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, drupalSettings) {
    function bigPipeProcessPlaceholderReplacement(index, placeholderReplacement) {
      var placeholderId = placeholderReplacement.getAttribute('data-big-pipe-replacement-for-placeholder-with-id');
      var content = this.textContent.trim();
  
      if (typeof drupalSettings.bigPipePlaceholderIds[placeholderId] !== 'undefined') {
        var response = mapTextContentToAjaxResponse(content);
  
        if (response === false) {
          $(this).removeOnce('big-pipe');
        } else {
          var ajaxObject = Drupal.ajax({
            url: '',
            base: false,
            element: false,
            progress: false
          });
  
          ajaxObject.success(response, 'success');
        }
      }
    }
  
    function mapTextContentToAjaxResponse(content) {
      if (content === '') {
        return false;
      }
  
      try {
        return JSON.parse(content);
      } catch (e) {
        return false;
      }
    }
  
    function bigPipeProcessDocument(context) {
      if (!context.querySelector('script[data-big-pipe-event="start"]')) {
        return false;
      }
  
      $(context).find('script[data-big-pipe-replacement-for-placeholder-with-id]').once('big-pipe').each(bigPipeProcessPlaceholderReplacement);
  
      if (context.querySelector('script[data-big-pipe-event="stop"]')) {
        if (timeoutID) {
          clearTimeout(timeoutID);
        }
        return true;
      }
  
      return false;
    }
  
    function bigPipeProcess() {
      timeoutID = setTimeout(function () {
        if (!bigPipeProcessDocument(document)) {
          bigPipeProcess();
        }
      }, interval);
    }
  
    var interval = drupalSettings.bigPipeInterval || 50;
  
    var timeoutID = void 0;
  
    bigPipeProcess();
  
    $(window).on('load', function () {
      if (timeoutID) {
        clearTimeout(timeoutID);
      }
      bigPipeProcessDocument(document);
    });
  })(jQuery, Drupal, drupalSettings);;
  