MINI Sh3ll
!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";var i=[],n=t.document,r=Object.getPrototypeOf,o=i.slice,s=i.concat,a=i.push,l=i.indexOf,c={},h=c.toString,d=c.hasOwnProperty,u=d.toString,p=u.call(Object),f={},m=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},g=function(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function y(t,e,i){var r,o=(e=e||n).createElement("script");if(o.text=t,i)for(r in v)i[r]&&(o[r]=i[r]);e.head.appendChild(o).parentNode.removeChild(o)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[h.call(t)]||"object":typeof t}var _=function(t,e){return new _.fn.init(t,e)},x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function w(t){var e=!!t&&"length"in t&&t.length,i=b(t);return!m(t)&&!g(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}_.fn=_.prototype={jquery:"3.3.1",constructor:_,length:0,toArray:function(){return o.call(this)},get:function(t){return null==t?o.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=_.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return _.each(this,t)},map:function(t){return this.pushStack(_.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:i.sort,splice:i.splice},_.extend=_.fn.extend=function(){var t,e,i,n,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||m(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)i=s[e],s!==(n=t[e])&&(c&&n&&(_.isPlainObject(n)||(r=Array.isArray(n)))?(r?(r=!1,o=i&&Array.isArray(i)?i:[]):o=i&&_.isPlainObject(i)?i:{},s[e]=_.extend(c,o,n)):void 0!==n&&(s[e]=n));return s},_.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==h.call(t))&&(!(e=r(t))||"function"==typeof(i=d.call(e,"constructor")&&e.constructor)&&u.call(i)===p)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t){y(t)},each:function(t,e){var i,n=0;if(w(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},trim:function(t){return null==t?"":(t+"").replace(x,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(w(Object(t))?_.merge(i,"string"==typeof t?[t]:t):a.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:l.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,r=t.length;n<i;n++)t[r++]=e[n];return t.length=r,t},grep:function(t,e,i){for(var n=[],r=0,o=t.length,s=!i;r<o;r++)!e(t[r],r)!==s&&n.push(t[r]);return n},map:function(t,e,i){var n,r,o=0,a=[];if(w(t))for(n=t.length;o<n;o++)null!=(r=e(t[o],o,i))&&a.push(r);else for(o in t)null!=(r=e(t[o],o,i))&&a.push(r);return s.apply([],a)},guid:1,support:f}),"function"==typeof Symbol&&(_.fn[Symbol.iterator]=i[Symbol.iterator]),_.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){c["[object "+e+"]"]=e.toLowerCase()});var k=function(t){var e,i,n,r,o,s,a,l,c,h,d,u,p,f,m,g,v,y,b,_="sizzle"+1*new Date,x=t.document,w=0,k=0,C=st(),S=st(),D=st(),T=function(t,e){return t===e&&(d=!0),0},A={}.hasOwnProperty,M=[],E=M.pop,P=M.push,I=M.push,O=M.slice,N=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",$="\\["+j+"*("+F+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+F+"))|)"+j+"*\\]",R=":("+F+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",H=new RegExp(j+"+","g"),z=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),B=new RegExp("^"+j+"*,"+j+"*"),U=new RegExp("^"+j+"*([>+~]|"+j+")"+j+"*"),W=new RegExp("="+j+"*([^\\]'\"]*?)"+j+"*\\]","g"),Y=new RegExp(R),V=new RegExp("^"+F+"$"),q={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,J=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),tt=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,it=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},nt=function(){u()},rt=yt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{I.apply(M=O.call(x.childNodes),x.childNodes),M[x.childNodes.length].nodeType}catch(t){I={apply:M.length?function(t,e){P.apply(t,O.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function ot(t,e,n,r){var o,a,c,h,d,f,v,y=e&&e.ownerDocument,w=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return n;if(!r&&((e?e.ownerDocument||e:x)!==p&&u(e),e=e||p,m)){if(11!==w&&(d=Z.exec(t)))if(o=d[1]){if(9===w){if(!(c=e.getElementById(o)))return n;if(c.id===o)return n.push(c),n}else if(y&&(c=y.getElementById(o))&&b(e,c)&&c.id===o)return n.push(c),n}else{if(d[2])return I.apply(n,e.getElementsByTagName(t)),n;if((o=d[3])&&i.getElementsByClassName&&e.getElementsByClassName)return I.apply(n,e.getElementsByClassName(o)),n}if(i.qsa&&!D[t+" "]&&(!g||!g.test(t))){if(1!==w)y=e,v=t;else if("object"!==e.nodeName.toLowerCase()){for((h=e.getAttribute("id"))?h=h.replace(et,it):e.setAttribute("id",h=_),a=(f=s(t)).length;a--;)f[a]="#"+h+" "+vt(f[a]);v=f.join(","),y=Q.test(t)&&mt(e.parentNode)||e}if(v)try{return I.apply(n,y.querySelectorAll(v)),n}catch(t){}finally{h===_&&e.removeAttribute("id")}}}return l(t.replace(z,"$1"),e,n,r)}function st(){var t=[];return function e(i,r){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=r}}function at(t){return t[_]=!0,t}function lt(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ct(t,e){for(var i=t.split("|"),r=i.length;r--;)n.attrHandle[i[r]]=e}function ht(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function dt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ut(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function pt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&rt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ft(t){return at(function(e){return e=+e,at(function(i,n){for(var r,o=t([],i.length,e),s=o.length;s--;)i[r=o[s]]&&(i[r]=!(n[r]=i[r]))})})}function mt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=ot.support={},o=ot.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},u=ot.setDocument=function(t){var e,r,s=t?t.ownerDocument||t:x;return s!==p&&9===s.nodeType&&s.documentElement?(f=(p=s).documentElement,m=!o(p),x!==p&&(r=p.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",nt,!1):r.attachEvent&&r.attachEvent("onunload",nt)),i.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=lt(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=X.test(p.getElementsByClassName),i.getById=lt(function(t){return f.appendChild(t).id=_,!p.getElementsByName||!p.getElementsByName(_).length}),i.getById?(n.filter.ID=function(t){var e=t.replace(J,tt);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(J,tt);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i,n,r,o=e.getElementById(t);if(o){if((i=o.getAttributeNode("id"))&&i.value===t)return[o];for(r=e.getElementsByName(t),n=0;o=r[n++];)if((i=o.getAttributeNode("id"))&&i.value===t)return[o]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[r++];)1===i.nodeType&&n.push(i);return n}return o},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},v=[],g=[],(i.qsa=X.test(p.querySelectorAll))&&(lt(function(t){f.appendChild(t).innerHTML="<a id='"+_+"'></a><select id='"+_+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+j+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+j+"*(?:value|"+L+")"),t.querySelectorAll("[id~="+_+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+_+"+*").length||g.push(".#.+[+~]")}),lt(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+j+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")})),(i.matchesSelector=X.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<(function(t){i.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",R)}),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=X.test(f.compareDocumentPosition),b=e||X.test(f.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},T=e?function(t,e){if(t===e)return d=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t===p||t.ownerDocument===x&&b(x,t)?-1:e===p||e.ownerDocument===x&&b(x,e)?1:h?N(h,t)-N(h,e):0:4&n?-1:1)}:function(t,e){if(t===e)return d=!0,0;var i,n=0,r=t.parentNode,o=e.parentNode,s=[t],a=[e];if(!r||!o)return t===p?-1:e===p?1:r?-1:o?1:h?N(h,t)-N(h,e):0;if(r===o)return ht(t,e);for(i=t;i=i.parentNode;)s.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;s[n]===a[n];)n++;return n?ht(s[n],a[n]):s[n]===x?-1:a[n]===x?1:0},p):p},ot.matches=function(t,e){return ot(t,null,null,e)},ot.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&u(t),e=e.replace(W,"='$1']"),i.matchesSelector&&m&&!D[e+" "]&&(!v||!v.test(e))&&(!g||!g.test(e)))try{var n=y.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return ot(e,p,null,[t]).length>0},ot.contains=function(t,e){return(t.ownerDocument||t)!==p&&u(t),b(t,e)},ot.attr=function(t,e){(t.ownerDocument||t)!==p&&u(t);var r=n.attrHandle[e.toLowerCase()],o=r&&A.call(n.attrHandle,e.toLowerCase())?r(t,e,!m):void 0;return void 0!==o?o:i.attributes||!m?t.getAttribute(e):(o=t.getAttributeNode(e))&&o.specified?o.value:null},ot.escape=function(t){return(t+"").replace(et,it)},ot.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},ot.uniqueSort=function(t){var e,n=[],r=0,o=0;if(d=!i.detectDuplicates,h=!i.sortStable&&t.slice(0),t.sort(T),d){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return h=null,t},r=ot.getText=function(t){var e,i="",n=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=r(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[n++];)i+=r(e);return i},(n=ot.selectors={cacheLength:50,createPseudo:at,match:q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(J,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(J,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||ot.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&ot.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return q.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&Y.test(i)&&(e=s(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(J,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+j+")"+t+"("+j+"|$)"))&&C(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(n){var r=ot.attr(n,t);return null==r?"!="===e:!e||(r+="","="===e?r===i:"!="===e?r!==i:"^="===e?i&&0===r.indexOf(i):"*="===e?i&&r.indexOf(i)>-1:"$="===e?i&&r.slice(-i.length)===i:"~="===e?(" "+r.replace(H," ")+" ").indexOf(i)>-1:"|="===e&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===r?function(t){return!!t.parentNode}:function(e,i,l){var c,h,d,u,p,f,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(o){for(;m;){for(u=e;u=u[m];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(b=(p=(c=(h=(d=(u=g)[_]||(u[_]={}))[u.uniqueID]||(d[u.uniqueID]={}))[t]||[])[0]===w&&c[1])&&c[2],u=p&&g.childNodes[p];u=++p&&u&&u[m]||(b=p=0)||f.pop();)if(1===u.nodeType&&++b&&u===e){h[t]=[w,p,b];break}}else if(y&&(b=p=(c=(h=(d=(u=e)[_]||(u[_]={}))[u.uniqueID]||(d[u.uniqueID]={}))[t]||[])[0]===w&&c[1]),!1===b)for(;(u=++p&&u&&u[m]||(b=p=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++b||(y&&((h=(d=u[_]||(u[_]={}))[u.uniqueID]||(d[u.uniqueID]={}))[t]=[w,b]),u!==e)););return(b-=r)===n||b%n==0&&b/n>=0}}},PSEUDO:function(t,e){var i,r=n.pseudos[t]||n.setFilters[t.toLowerCase()]||ot.error("unsupported pseudo: "+t);return r[_]?r(e):r.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?at(function(t,i){for(var n,o=r(t,e),s=o.length;s--;)t[n=N(t,o[s])]=!(i[n]=o[s])}):function(t){return r(t,0,i)}):r}},pseudos:{not:at(function(t){var e=[],i=[],n=a(t.replace(z,"$1"));return n[_]?at(function(t,e,i,r){for(var o,s=n(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,r,o){return e[0]=t,n(e,null,o,i),e[0]=null,!i.pop()}}),has:at(function(t){return function(e){return ot(t,e).length>0}}),contains:at(function(t){return t=t.replace(J,tt),function(e){return(e.textContent||e.innerText||r(e)).indexOf(t)>-1}}),lang:at(function(t){return V.test(t||"")||ot.error("unsupported lang: "+t),t=t.replace(J,tt).toLowerCase(),function(e){var i;do{if(i=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:pt(!1),disabled:pt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return G.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ft(function(){return[0]}),last:ft(function(t,e){return[e-1]}),eq:ft(function(t,e,i){return[i<0?i+e:i]}),even:ft(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:ft(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:ft(function(t,e,i){for(var n=i<0?i+e:i;--n>=0;)t.push(n);return t}),gt:ft(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=dt(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=ut(e);function gt(){}function vt(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function yt(t,e,i){var n=e.dir,r=e.next,o=r||n,s=i&&"parentNode"===o,a=k++;return e.first?function(e,i,r){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,r);return!1}:function(e,i,l){var c,h,d,u=[w,a];if(l){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||s)if(h=(d=e[_]||(e[_]={}))[e.uniqueID]||(d[e.uniqueID]={}),r&&r===e.nodeName.toLowerCase())e=e[n]||e;else{if((c=h[o])&&c[0]===w&&c[1]===a)return u[2]=c[2];if(h[o]=u,u[2]=t(e,i,l))return!0}return!1}}function bt(t){return t.length>1?function(e,i,n){for(var r=t.length;r--;)if(!t[r](e,i,n))return!1;return!0}:t[0]}function _t(t,e,i,n,r){for(var o,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(o=t[a])&&(i&&!i(o,n,r)||(s.push(o),c&&e.push(a)));return s}function xt(t,e,i,n,r,o){return n&&!n[_]&&(n=xt(n)),r&&!r[_]&&(r=xt(r,o)),at(function(o,s,a,l){var c,h,d,u=[],p=[],f=s.length,m=o||function(t,e,i){for(var n=0,r=e.length;n<r;n++)ot(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),g=!t||!o&&e?m:_t(m,u,t,a,l),v=i?r||(o?t:f||n)?[]:s:g;if(i&&i(g,v,a,l),n)for(c=_t(v,p),n(c,[],a,l),h=c.length;h--;)(d=c[h])&&(v[p[h]]=!(g[p[h]]=d));if(o){if(r||t){if(r){for(c=[],h=v.length;h--;)(d=v[h])&&c.push(g[h]=d);r(null,v=[],c,l)}for(h=v.length;h--;)(d=v[h])&&(c=r?N(o,d):u[h])>-1&&(o[c]=!(s[c]=d))}}else v=_t(v===s?v.splice(f,v.length):v),r?r(null,s,v,l):I.apply(s,v)})}function wt(t){for(var e,i,r,o=t.length,s=n.relative[t[0].type],a=s||n.relative[" "],l=s?1:0,h=yt(function(t){return t===e},a,!0),d=yt(function(t){return N(e,t)>-1},a,!0),u=[function(t,i,n){var r=!s&&(n||i!==c)||((e=i).nodeType?h(t,i,n):d(t,i,n));return e=null,r}];l<o;l++)if(i=n.relative[t[l].type])u=[yt(bt(u),i)];else{if((i=n.filter[t[l].type].apply(null,t[l].matches))[_]){for(r=++l;r<o&&!n.relative[t[r].type];r++);return xt(l>1&&bt(u),l>1&&vt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(z,"$1"),i,l<r&&wt(t.slice(l,r)),r<o&&wt(t=t.slice(r)),r<o&&vt(t))}u.push(i)}return bt(u)}return gt.prototype=n.filters=n.pseudos,n.setFilters=new gt,s=ot.tokenize=function(t,e){var i,r,o,s,a,l,c,h=S[t+" "];if(h)return e?0:h.slice(0);for(a=t,l=[],c=n.preFilter;a;){for(s in i&&!(r=B.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=U.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(z," ")}),a=a.slice(i.length)),n.filter)!(r=q[s].exec(a))||c[s]&&!(r=c[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return e?a.length:a?ot.error(t):S(t,l).slice(0)},a=ot.compile=function(t,e){var i,r=[],o=[],a=D[t+" "];if(!a){for(e||(e=s(t)),i=e.length;i--;)(a=wt(e[i]))[_]?r.push(a):o.push(a);(a=D(t,function(t,e){var i=e.length>0,r=t.length>0,o=function(o,s,a,l,h){var d,f,g,v=0,y="0",b=o&&[],_=[],x=c,k=o||r&&n.find.TAG("*",h),C=w+=null==x?1:Math.random()||.1,S=k.length;for(h&&(c=s===p||s||h);y!==S&&null!=(d=k[y]);y++){if(r&&d){for(f=0,s||d.ownerDocument===p||(u(d),a=!m);g=t[f++];)if(g(d,s||p,a)){l.push(d);break}h&&(w=C)}i&&((d=!g&&d)&&v--,o&&b.push(d))}if(v+=y,i&&y!==v){for(f=0;g=e[f++];)g(b,_,s,a);if(o){if(v>0)for(;y--;)b[y]||_[y]||(_[y]=E.call(l));_=_t(_)}I.apply(l,_),h&&!o&&_.length>0&&v+e.length>1&&ot.uniqueSort(l)}return h&&(w=C,c=x),b};return i?at(o):o}(o,r))).selector=t}return a},l=ot.select=function(t,e,i,r){var o,l,c,h,d,u="function"==typeof t&&t,p=!r&&s(t=u.selector||t);if(i=i||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&m&&n.relative[l[1].type]){if(!(e=(n.find.ID(c.matches[0].replace(J,tt),e)||[])[0]))return i;u&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(o=q.needsContext.test(t)?0:l.length;o--&&(c=l[o],!n.relative[h=c.type]);)if((d=n.find[h])&&(r=d(c.matches[0].replace(J,tt),Q.test(l[0].type)&&mt(e.parentNode)||e))){if(l.splice(o,1),!(t=r.length&&vt(l)))return I.apply(i,r),i;break}}return(u||a(t,p))(r,e,!m,i,!e||Q.test(t)&&mt(e.parentNode)||e),i},i.sortStable=_.split("").sort(T).join("")===_,i.detectDuplicates=!!d,u(),i.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),lt(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||ct("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),i.attributes&<(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ct("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ct(L,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),ot}(t);_.find=k,_.expr=k.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=k.uniqueSort,_.text=k.getText,_.isXMLDoc=k.isXML,_.contains=k.contains,_.escapeSelector=k.escape;var C=function(t,e,i){for(var n=[],r=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&_(t).is(i))break;n.push(t)}return n},S=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},D=_.expr.match.needsContext;function T(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function M(t,e,i){return m(e)?_.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?_.grep(t,function(t){return t===e!==i}):"string"!=typeof e?_.grep(t,function(t){return l.call(e,t)>-1!==i}):_.filter(e,t,i)}_.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?_.find.matchesSelector(n,t)?[n]:[]:_.find.matches(t,_.grep(e,function(t){return 1===t.nodeType}))},_.fn.extend({find:function(t){var e,i,n=this.length,r=this;if("string"!=typeof t)return this.pushStack(_(t).filter(function(){for(e=0;e<n;e++)if(_.contains(r[e],this))return!0}));for(i=this.pushStack([]),e=0;e<n;e++)_.find(t,r[e],i);return n>1?_.uniqueSort(i):i},filter:function(t){return this.pushStack(M(this,t||[],!1))},not:function(t){return this.pushStack(M(this,t||[],!0))},is:function(t){return!!M(this,"string"==typeof t&&D.test(t)?_(t):t||[],!1).length}});var E,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(t,e,i){var r,o;if(!t)return this;if(i=i||E,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!r[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof _?e[0]:e,_.merge(this,_.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:n,!0)),A.test(r[1])&&_.isPlainObject(e))for(r in e)m(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(o=n.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):m(t)?void 0!==i.ready?i.ready(t):t(_):_.makeArray(t,this)}).prototype=_.fn,E=_(n);var I=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function N(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}_.fn.extend({has:function(t){var e=_(t,this),i=e.length;return this.filter(function(){for(var t=0;t<i;t++)if(_.contains(this,e[t]))return!0})},closest:function(t,e){var i,n=0,r=this.length,o=[],s="string"!=typeof t&&_(t);if(!D.test(t))for(;n<r;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(s?s.index(i)>-1:1===i.nodeType&&_.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(_(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),_.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,i){return C(t,"parentNode",i)},next:function(t){return N(t,"nextSibling")},prev:function(t){return N(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,i){return C(t,"nextSibling",i)},prevUntil:function(t,e,i){return C(t,"previousSibling",i)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return T(t,"iframe")?t.contentDocument:(T(t,"template")&&(t=t.content||t),_.merge([],t.childNodes))}},function(t,e){_.fn[t]=function(i,n){var r=_.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(r=_.filter(n,r)),this.length>1&&(O[t]||_.uniqueSort(r),I.test(t)&&r.reverse()),this.pushStack(r)}});var L=/[^\x20\t\r\n\f]+/g;function j(t){return t}function F(t){throw t}function $(t,e,i,n){var r;try{t&&m(r=t.promise)?r.call(t).done(e).fail(i):t&&m(r=t.then)?r.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}_.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return _.each(t.match(L)||[],function(t,i){e[i]=!0}),e}(t):_.extend({},t);var e,i,n,r,o=[],s=[],a=-1,l=function(){for(r=r||t.once,n=e=!0;s.length;a=-1)for(i=s.shift();++a<o.length;)!1===o[a].apply(i[0],i[1])&&t.stopOnFalse&&(a=o.length,i=!1);t.memory||(i=!1),e=!1,r&&(o=i?[]:"")},c={add:function(){return o&&(i&&!e&&(a=o.length-1,s.push(i)),function e(i){_.each(i,function(i,n){m(n)?t.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==b(n)&&e(n)})}(arguments),i&&!e&&l()),this},remove:function(){return _.each(arguments,function(t,e){for(var i;(i=_.inArray(e,o,i))>-1;)o.splice(i,1),i<=a&&a--}),this},has:function(t){return t?_.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=i="",this},disabled:function(){return!o},lock:function(){return r=s=[],i||e||(o=i=""),this},locked:function(){return!!r},fireWith:function(t,i){return r||(i=[t,(i=i||[]).slice?i.slice():i],s.push(i),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},_.extend({Deferred:function(e){var i=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return _.Deferred(function(e){_.each(i,function(i,n){var r=m(t[n[4]])&&t[n[4]];o[n[1]](function(){var t=r&&r.apply(this,arguments);t&&m(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,r?[t]:arguments)})}),t=null}).promise()},then:function(e,n,r){var o=0;function s(e,i,n,r){return function(){var a=this,l=arguments,c=function(){var t,c;if(!(e<o)){if((t=n.apply(a,l))===i.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,m(c)?r?c.call(t,s(o,i,j,r),s(o,i,F,r)):(o++,c.call(t,s(o,i,j,r),s(o,i,F,r),s(o,i,j,i.notifyWith))):(n!==j&&(a=void 0,l=[t]),(r||i.resolveWith)(a,l))}},h=r?c:function(){try{c()}catch(t){_.Deferred.exceptionHook&&_.Deferred.exceptionHook(t,h.stackTrace),e+1>=o&&(n!==F&&(a=void 0,l=[t]),i.rejectWith(a,l))}};e?h():(_.Deferred.getStackHook&&(h.stackTrace=_.Deferred.getStackHook()),t.setTimeout(h))}}return _.Deferred(function(t){i[0][3].add(s(0,t,m(r)?r:j,t.notifyWith)),i[1][3].add(s(0,t,m(e)?e:j)),i[2][3].add(s(0,t,m(n)?n:F))}).promise()},promise:function(t){return null!=t?_.extend(t,r):r}},o={};return _.each(i,function(t,e){var s=e[2],a=e[5];r[e[1]]=s.add,a&&s.add(function(){n=a},i[3-t][2].disable,i[3-t][3].disable,i[0][2].lock,i[0][3].lock),s.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,i=e,n=Array(i),r=o.call(arguments),s=_.Deferred(),a=function(t){return function(i){n[t]=this,r[t]=arguments.length>1?o.call(arguments):i,--e||s.resolveWith(n,r)}};if(e<=1&&($(t,s.done(a(i)).resolve,s.reject,!e),"pending"===s.state()||m(r[i]&&r[i].then)))return s.then();for(;i--;)$(r[i],a(i),s.reject);return s.promise()}});var R=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&R.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},_.readyException=function(e){t.setTimeout(function(){throw e})};var H=_.Deferred();function z(){n.removeEventListener("DOMContentLoaded",z),t.removeEventListener("load",z),_.ready()}_.fn.ready=function(t){return H.then(t).catch(function(t){_.readyException(t)}),this},_.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==t&&--_.readyWait>0||H.resolveWith(n,[_]))}}),_.ready.then=H.then,"complete"===n.readyState||"loading"!==n.readyState&&!n.documentElement.doScroll?t.setTimeout(_.ready):(n.addEventListener("DOMContentLoaded",z),t.addEventListener("load",z));var B=function(t,e,i,n,r,o,s){var a=0,l=t.length,c=null==i;if("object"===b(i))for(a in r=!0,i)B(t,e,a,i[a],!0,o,s);else if(void 0!==n&&(r=!0,m(n)||(s=!0),c&&(s?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(_(t),i)})),e))for(;a<l;a++)e(t[a],i,s?n:n.call(t[a],a,e(t[a],i)));return r?t:c?e.call(t):l?e(t[0],i):o},U=/^-ms-/,W=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function V(t){return t.replace(U,"ms-").replace(W,Y)}var q=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function G(){this.expando=_.expando+G.uid++}G.uid=1,G.prototype={cache:function(t){var e=t[this.expando];return e||(e={},q(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,r=this.cache(t);if("string"==typeof e)r[V(e)]=i;else for(n in e)r[V(n)]=e[n];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][V(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(V):(e=V(e))in n?[e]:e.match(L)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||_.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!_.isEmptyObject(e)}};var K=new G,X=new G,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function J(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(Q,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Z.test(t)?JSON.parse(t):t)}(i)}catch(t){}X.set(t,e,i)}else i=void 0;return i}_.extend({hasData:function(t){return X.hasData(t)||K.hasData(t)},data:function(t,e,i){return X.access(t,e,i)},removeData:function(t,e){X.remove(t,e)},_data:function(t,e,i){return K.access(t,e,i)},_removeData:function(t,e){K.remove(t,e)}}),_.fn.extend({data:function(t,e){var i,n,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=X.get(o),1===o.nodeType&&!K.get(o,"hasDataAttrs"))){for(i=s.length;i--;)s[i]&&0===(n=s[i].name).indexOf("data-")&&(n=V(n.slice(5)),J(o,n,r[n]));K.set(o,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each(function(){X.set(this,t)}):B(this,function(e){var i;if(o&&void 0===e)return void 0!==(i=X.get(o,t))?i:void 0!==(i=J(o,t))?i:void 0;this.each(function(){X.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){X.remove(this,t)})}}),_.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=K.get(t,e),i&&(!n||Array.isArray(i)?n=K.access(t,e,_.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=_.queue(t,e),n=i.length,r=i.shift(),o=_._queueHooks(t,e);"inprogress"===r&&(r=i.shift(),n--),r&&("fx"===e&&i.unshift("inprogress"),delete o.stop,r.call(t,function(){_.dequeue(t,e)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return K.get(t,i)||K.access(t,i,{empty:_.Callbacks("once memory").add(function(){K.remove(t,[e+"queue",i])})})}}),_.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?_.queue(this[0],t):void 0===e?this:this.each(function(){var i=_.queue(this,t,e);_._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&_.dequeue(this,t)})},dequeue:function(t){return this.each(function(){_.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,r=_.Deferred(),o=this,s=this.length,a=function(){--n||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(i=K.get(o[s],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),r.promise(e)}});var tt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,et=new RegExp("^(?:([+-])=|)("+tt+")([a-z%]*)$","i"),it=["Top","Right","Bottom","Left"],nt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&_.contains(t.ownerDocument,t)&&"none"===_.css(t,"display")},rt=function(t,e,i,n){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];for(o in r=i.apply(t,n||[]),e)t.style[o]=s[o];return r};function ot(t,e,i,n){var r,o,s=20,a=n?function(){return n.cur()}:function(){return _.css(t,e,"")},l=a(),c=i&&i[3]||(_.cssNumber[e]?"":"px"),h=(_.cssNumber[e]||"px"!==c&&+l)&&et.exec(_.css(t,e));if(h&&h[3]!==c){for(l/=2,c=c||h[3],h=+l||1;s--;)_.style(t,e,h+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),h/=o;h*=2,_.style(t,e,h+c),i=i||[]}return i&&(h=+h||+l||0,r=i[1]?h+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=h,n.end=r)),r}var st={};function at(t){var e,i=t.ownerDocument,n=t.nodeName,r=st[n];return r||(e=i.body.appendChild(i.createElement(n)),r=_.css(e,"display"),e.parentNode.removeChild(e),"none"===r&&(r="block"),st[n]=r,r)}function lt(t,e){for(var i,n,r=[],o=0,s=t.length;o<s;o++)(n=t[o]).style&&(i=n.style.display,e?("none"===i&&(r[o]=K.get(n,"display")||null,r[o]||(n.style.display="")),""===n.style.display&&nt(n)&&(r[o]=at(n))):"none"!==i&&(r[o]="none",K.set(n,"display",i)));for(o=0;o<s;o++)null!=r[o]&&(t[o].style.display=r[o]);return t}_.fn.extend({show:function(){return lt(this,!0)},hide:function(){return lt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){nt(this)?_(this).show():_(this).hide()})}});var ct=/^(?:checkbox|radio)$/i,ht=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,dt=/^$|^module$|\/(?:java|ecma)script/i,ut={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,"",""]};function pt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&T(t,e)?_.merge([t],i):i}function ft(t,e){for(var i=0,n=t.length;i<n;i++)K.set(t[i],"globalEval",!e||K.get(e[i],"globalEval"))}ut.optgroup=ut.option,ut.tbody=ut.tfoot=ut.colgroup=ut.caption=ut.thead,ut.th=ut.td;var mt,gt,vt=/<|&#?\w+;/;function yt(t,e,i,n,r){for(var o,s,a,l,c,h,d=e.createDocumentFragment(),u=[],p=0,f=t.length;p<f;p++)if((o=t[p])||0===o)if("object"===b(o))_.merge(u,o.nodeType?[o]:o);else if(vt.test(o)){for(s=s||d.appendChild(e.createElement("div")),a=(ht.exec(o)||["",""])[1].toLowerCase(),l=ut[a]||ut._default,s.innerHTML=l[1]+_.htmlPrefilter(o)+l[2],h=l[0];h--;)s=s.lastChild;_.merge(u,s.childNodes),(s=d.firstChild).textContent=""}else u.push(e.createTextNode(o));for(d.textContent="",p=0;o=u[p++];)if(n&&_.inArray(o,n)>-1)r&&r.push(o);else if(c=_.contains(o.ownerDocument,o),s=pt(d.appendChild(o),"script"),c&&ft(s),i)for(h=0;o=s[h++];)dt.test(o.type||"")&&i.push(o);return d}mt=n.createDocumentFragment().appendChild(n.createElement("div")),(gt=n.createElement("input")).setAttribute("type","radio"),gt.setAttribute("checked","checked"),gt.setAttribute("name","t"),mt.appendChild(gt),f.checkClone=mt.cloneNode(!0).cloneNode(!0).lastChild.checked,mt.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!mt.cloneNode(!0).lastChild.defaultValue;var bt=n.documentElement,_t=/^key/,xt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wt=/^([^.]*)(?:\.(.+)|)/;function kt(){return!0}function Ct(){return!1}function St(){try{return n.activeElement}catch(t){}}function Dt(t,e,i,n,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof i&&(n=n||i,i=void 0),e)Dt(t,a,i,n,e[a],o);return t}if(null==n&&null==r?(r=i,n=i=void 0):null==r&&("string"==typeof i?(r=n,n=void 0):(r=n,n=i,i=void 0)),!1===r)r=Ct;else if(!r)return t;return 1===o&&(s=r,(r=function(t){return _().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=_.guid++)),t.each(function(){_.event.add(this,e,r,n,i)})}_.event={global:{},add:function(t,e,i,n,r){var o,s,a,l,c,h,d,u,p,f,m,g=K.get(t);if(g)for(i.handler&&(i=(o=i).handler,r=o.selector),r&&_.find.matchesSelector(bt,r),i.guid||(i.guid=_.guid++),(l=g.events)||(l=g.events={}),(s=g.handle)||(s=g.handle=function(e){return void 0!==_&&_.event.triggered!==e.type?_.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(L)||[""]).length;c--;)p=m=(a=wt.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=_.event.special[p]||{},p=(r?d.delegateType:d.bindType)||p,d=_.event.special[p]||{},h=_.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:r,needsContext:r&&_.expr.match.needsContext.test(r),namespace:f.join(".")},o),(u=l[p])||((u=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,n,f,s)||t.addEventListener&&t.addEventListener(p,s)),d.add&&(d.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),r?u.splice(u.delegateCount++,0,h):u.push(h),_.event.global[p]=!0)},remove:function(t,e,i,n,r){var o,s,a,l,c,h,d,u,p,f,m,g=K.hasData(t)&&K.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(L)||[""]).length;c--;)if(p=m=(a=wt.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=_.event.special[p]||{},u=l[p=(n?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=u.length;o--;)h=u[o],!r&&m!==h.origType||i&&i.guid!==h.guid||a&&!a.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(u.splice(o,1),h.selector&&u.delegateCount--,d.remove&&d.remove.call(t,h));s&&!u.length&&(d.teardown&&!1!==d.teardown.call(t,f,g.handle)||_.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)_.event.remove(t,p+e[c],i,n,!0);_.isEmptyObject(l)&&K.remove(t,"handle events")}},dispatch:function(t){var e,i,n,r,o,s,a=_.event.fix(t),l=new Array(arguments.length),c=(K.get(this,"events")||{})[a.type]||[],h=_.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,a)){for(s=_.event.handlers.call(this,a,c),e=0;(r=s[e++])&&!a.isPropagationStopped();)for(a.currentTarget=r.elem,i=0;(o=r.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(n=((_.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,l))&&!1===(a.result=n)&&(a.preventDefault(),a.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,a),a.result}},handlers:function(t,e){var i,n,r,o,s,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],s={},i=0;i<l;i++)void 0===s[r=(n=e[i]).selector+" "]&&(s[r]=n.needsContext?_(r,this).index(c)>-1:_.find(r,this,null,[c]).length),s[r]&&o.push(n);o.length&&a.push({elem:c,handlers:o})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(_.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[_.expando]?t:new _.Event(t)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==St()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===St()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&T(this,"input"))return this.click(),!1},_default:function(t){return T(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},_.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},_.Event=function(t,e){if(!(this instanceof _.Event))return new _.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?kt:Ct,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&_.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[_.expando]=!0},_.Event.prototype={constructor:_.Event,isDefaultPrevented:Ct,isPropagationStopped:Ct,isImmediatePropagationStopped:Ct,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=kt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=kt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=kt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},_.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(t){var e=t.button;return null==t.which&&_t.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&xt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},_.event.addProp),_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){_.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=t.relatedTarget,r=t.handleObj;return n&&(n===this||_.contains(this,n))||(t.type=r.origType,i=r.handler.apply(this,arguments),t.type=e),i}}}),_.fn.extend({on:function(t,e,i,n){return Dt(this,t,e,i,n)},one:function(t,e,i,n){return Dt(this,t,e,i,n,1)},off:function(t,e,i){var n,r;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,_(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=Ct),this.each(function(){_.event.remove(this,t,i,e)})}});var Tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,At=/<script|<style|<link/i,Mt=/checked\s*(?:[^=]|=\s*.checked.)/i,Et=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Pt(t,e){return T(t,"table")&&T(11!==e.nodeType?e:e.firstChild,"tr")&&_(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Nt(t,e){var i,n,r,o,s,a,l,c;if(1===e.nodeType){if(K.hasData(t)&&(o=K.access(t),s=K.set(e,o),c=o.events))for(r in delete s.handle,s.events={},c)for(i=0,n=c[r].length;i<n;i++)_.event.add(e,r,c[r][i]);X.hasData(t)&&(a=X.access(t),l=_.extend({},a),X.set(e,l))}}function Lt(t,e,i,n){e=s.apply([],e);var r,o,a,l,c,h,d=0,u=t.length,p=u-1,g=e[0],v=m(g);if(v||u>1&&"string"==typeof g&&!f.checkClone&&Mt.test(g))return t.each(function(r){var o=t.eq(r);v&&(e[0]=g.call(this,r,o.html())),Lt(o,e,i,n)});if(u&&(o=(r=yt(e,t[0].ownerDocument,!1,t,n)).firstChild,1===r.childNodes.length&&(r=o),o||n)){for(l=(a=_.map(pt(r,"script"),It)).length;d<u;d++)c=r,d!==p&&(c=_.clone(c,!0,!0),l&&_.merge(a,pt(c,"script"))),i.call(t[d],c,d);if(l)for(h=a[a.length-1].ownerDocument,_.map(a,Ot),d=0;d<l;d++)c=a[d],dt.test(c.type||"")&&!K.access(c,"globalEval")&&_.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?_._evalUrl&&_._evalUrl(c.src):y(c.textContent.replace(Et,""),h,c))}return t}function jt(t,e,i){for(var n,r=e?_.filter(e,t):t,o=0;null!=(n=r[o]);o++)i||1!==n.nodeType||_.cleanData(pt(n)),n.parentNode&&(i&&_.contains(n.ownerDocument,n)&&ft(pt(n,"script")),n.parentNode.removeChild(n));return t}_.extend({htmlPrefilter:function(t){return t.replace(Tt,"<$1></$2>")},clone:function(t,e,i){var n,r,o,s,a,l,c,h=t.cloneNode(!0),d=_.contains(t.ownerDocument,t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||_.isXMLDoc(t)))for(s=pt(h),n=0,r=(o=pt(t)).length;n<r;n++)a=o[n],l=s[n],void 0,"input"===(c=l.nodeName.toLowerCase())&&ct.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(e)if(i)for(o=o||pt(t),s=s||pt(h),n=0,r=o.length;n<r;n++)Nt(o[n],s[n]);else Nt(t,h);return(s=pt(h,"script")).length>0&&ft(s,!d&&pt(t,"script")),h},cleanData:function(t){for(var e,i,n,r=_.event.special,o=0;void 0!==(i=t[o]);o++)if(q(i)){if(e=i[K.expando]){if(e.events)for(n in e.events)r[n]?_.event.remove(i,n):_.removeEvent(i,n,e.handle);i[K.expando]=void 0}i[X.expando]&&(i[X.expando]=void 0)}}}),_.fn.extend({detach:function(t){return jt(this,t,!0)},remove:function(t){return jt(this,t)},text:function(t){return B(this,function(t){return void 0===t?_.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Lt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pt(this,t).appendChild(t)})},prepend:function(){return Lt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Pt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Lt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Lt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(_.cleanData(pt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return _.clone(this,t,e)})},html:function(t){return B(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!At.test(t)&&!ut[(ht.exec(t)||["",""])[1].toLowerCase()]){t=_.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(_.cleanData(pt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Lt(this,arguments,function(e){var i=this.parentNode;_.inArray(this,t)<0&&(_.cleanData(pt(this)),i&&i.replaceChild(e,this))},t)}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){_.fn[t]=function(t){for(var i,n=[],r=_(t),o=r.length-1,s=0;s<=o;s++)i=s===o?this:this.clone(!0),_(r[s])[e](i),a.apply(n,i.get());return this.pushStack(n)}});var Ft=new RegExp("^("+tt+")(?!px)[a-z%]+$","i"),$t=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},Rt=new RegExp(it.join("|"),"i");function Ht(t,e,i){var n,r,o,s,a=t.style;return(i=i||$t(t))&&(""!==(s=i.getPropertyValue(e)||i[e])||_.contains(t.ownerDocument,t)||(s=_.style(t,e)),!f.pixelBoxStyles()&&Ft.test(s)&&Rt.test(e)&&(n=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=i.width,a.width=n,a.minWidth=r,a.maxWidth=o)),void 0!==s?s+"":s}function zt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(h){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",h.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",bt.appendChild(c).appendChild(h);var e=t.getComputedStyle(h);r="1%"!==e.top,l=12===i(e.marginLeft),h.style.right="60%",a=36===i(e.right),o=36===i(e.width),h.style.position="absolute",s=36===h.offsetWidth||"absolute",bt.removeChild(c),h=null}}function i(t){return Math.round(parseFloat(t))}var r,o,s,a,l,c=n.createElement("div"),h=n.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===h.style.backgroundClip,_.extend(f,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s}}))}();var Bt=/^(none|table(?!-c[ea]).+)/,Ut=/^--/,Wt={position:"absolute",visibility:"hidden",display:"block"},Yt={letterSpacing:"0",fontWeight:"400"},Vt=["Webkit","Moz","ms"],qt=n.createElement("div").style;function Gt(t){var e=_.cssProps[t];return e||(e=_.cssProps[t]=function(t){if(t in qt)return t;for(var e=t[0].toUpperCase()+t.slice(1),i=Vt.length;i--;)if((t=Vt[i]+e)in qt)return t}(t)||t),e}function Kt(t,e,i){var n=et.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function Xt(t,e,i,n,r,o){var s="width"===e?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;s<4;s+=2)"margin"===i&&(l+=_.css(t,i+it[s],!0,r)),n?("content"===i&&(l-=_.css(t,"padding"+it[s],!0,r)),"margin"!==i&&(l-=_.css(t,"border"+it[s]+"Width",!0,r))):(l+=_.css(t,"padding"+it[s],!0,r),"padding"!==i?l+=_.css(t,"border"+it[s]+"Width",!0,r):a+=_.css(t,"border"+it[s]+"Width",!0,r));return!n&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-a-.5))),l}function Zt(t,e,i){var n=$t(t),r=Ht(t,e,n),o="border-box"===_.css(t,"boxSizing",!1,n),s=o;if(Ft.test(r)){if(!i)return r;r="auto"}return s=s&&(f.boxSizingReliable()||r===t.style[e]),("auto"===r||!parseFloat(r)&&"inline"===_.css(t,"display",!1,n))&&(r=t["offset"+e[0].toUpperCase()+e.slice(1)],s=!0),(r=parseFloat(r)||0)+Xt(t,e,i||(o?"border":"content"),s,n,r)+"px"}function Qt(t,e,i,n,r){return new Qt.prototype.init(t,e,i,n,r)}_.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Ht(t,"opacity");return""===i?"1":i}}}},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:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=V(e),l=Ut.test(e),c=t.style;if(l||(e=Gt(a)),s=_.cssHooks[e]||_.cssHooks[a],void 0===i)return s&&"get"in s&&void 0!==(r=s.get(t,!1,n))?r:c[e];"string"===(o=typeof i)&&(r=et.exec(i))&&r[1]&&(i=ot(t,e,r),o="number"),null!=i&&i==i&&("number"===o&&(i+=r&&r[3]||(_.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==i||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(i=s.set(t,i,n))||(l?c.setProperty(e,i):c[e]=i))}},css:function(t,e,i,n){var r,o,s,a=V(e);return Ut.test(e)||(e=Gt(a)),(s=_.cssHooks[e]||_.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,i)),void 0===r&&(r=Ht(t,e,n)),"normal"===r&&e in Yt&&(r=Yt[e]),""===i||i?(o=parseFloat(r),!0===i||isFinite(o)?o||0:r):r}}),_.each(["height","width"],function(t,e){_.cssHooks[e]={get:function(t,i,n){if(i)return!Bt.test(_.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?Zt(t,e,n):rt(t,Wt,function(){return Zt(t,e,n)})},set:function(t,i,n){var r,o=$t(t),s="border-box"===_.css(t,"boxSizing",!1,o),a=n&&Xt(t,e,n,s,o);return s&&f.scrollboxSize()===o.position&&(a-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-Xt(t,e,"border",!1,o)-.5)),a&&(r=et.exec(i))&&"px"!==(r[3]||"px")&&(t.style[e]=i,i=_.css(t,e)),Kt(0,i,a)}}}),_.cssHooks.marginLeft=zt(f.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Ht(t,"marginLeft"))||t.getBoundingClientRect().left-rt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),_.each({margin:"",padding:"",border:"Width"},function(t,e){_.cssHooks[t+e]={expand:function(i){for(var n=0,r={},o="string"==typeof i?i.split(" "):[i];n<4;n++)r[t+it[n]+e]=o[n]||o[n-2]||o[0];return r}},"margin"!==t&&(_.cssHooks[t+e].set=Kt)}),_.fn.extend({css:function(t,e){return B(this,function(t,e,i){var n,r,o={},s=0;if(Array.isArray(e)){for(n=$t(t),r=e.length;s<r;s++)o[e[s]]=_.css(t,e[s],!1,n);return o}return void 0!==i?_.style(t,e,i):_.css(t,e)},t,e,arguments.length>1)}}),_.Tween=Qt,Qt.prototype={constructor:Qt,init:function(t,e,i,n,r,o){this.elem=t,this.prop=i,this.easing=r||_.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(_.cssNumber[i]?"":"px")},cur:function(){var t=Qt.propHooks[this.prop];return t&&t.get?t.get(this):Qt.propHooks._default.get(this)},run:function(t){var e,i=Qt.propHooks[this.prop];return this.options.duration?this.pos=e=_.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):Qt.propHooks._default.set(this),this}},Qt.prototype.init.prototype=Qt.prototype,Qt.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=_.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){_.fx.step[t.prop]?_.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[_.cssProps[t.prop]]&&!_.cssHooks[t.prop]?t.elem[t.prop]=t.now:_.style(t.elem,t.prop,t.now+t.unit)}}},Qt.propHooks.scrollTop=Qt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},_.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},_.fx=Qt.prototype.init,_.fx.step={};var Jt,te,ee=/^(?:toggle|show|hide)$/,ie=/queueHooks$/;function ne(){te&&(!1===n.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(ne):t.setTimeout(ne,_.fx.interval),_.fx.tick())}function re(){return t.setTimeout(function(){Jt=void 0}),Jt=Date.now()}function oe(t,e){var i,n=0,r={height:t};for(e=e?1:0;n<4;n+=2-e)r["margin"+(i=it[n])]=r["padding"+i]=t;return e&&(r.opacity=r.width=t),r}function se(t,e,i){for(var n,r=(ae.tweeners[e]||[]).concat(ae.tweeners["*"]),o=0,s=r.length;o<s;o++)if(n=r[o].call(i,e,t))return n}function ae(t,e,i){var n,r,o=0,s=ae.prefilters.length,a=_.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=Jt||re(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),o=0,s=c.tweens.length;o<s;o++)c.tweens[o].run(n);return a.notifyWith(t,[c,n,i]),n<1&&s?i:(s||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:_.extend({},e),opts:_.extend(!0,{specialEasing:{},easing:_.easing._default},i),originalProperties:e,originalOptions:i,startTime:Jt||re(),duration:i.duration,tweens:[],createTween:function(e,i){var n=_.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(r)return this;for(r=!0;i<n;i++)c.tweens[i].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),h=c.props;for(!function(t,e){var i,n,r,o,s;for(i in t)if(r=e[n=V(i)],o=t[i],Array.isArray(o)&&(r=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),(s=_.cssHooks[n])&&"expand"in s)for(i in o=s.expand(o),delete t[n],o)i in t||(t[i]=o[i],e[i]=r);else e[n]=r}(h,c.opts.specialEasing);o<s;o++)if(n=ae.prefilters[o].call(c,t,h,c.opts))return m(n.stop)&&(_._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n;return _.map(h,se,c),m(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),_.fx.timer(_.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}_.Animation=_.extend(ae,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return ot(i.elem,t,et.exec(e),i),i}]},tweener:function(t,e){m(t)?(e=t,t=["*"]):t=t.match(L);for(var i,n=0,r=t.length;n<r;n++)i=t[n],ae.tweeners[i]=ae.tweeners[i]||[],ae.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,r,o,s,a,l,c,h,d="width"in e||"height"in e,u=this,p={},f=t.style,m=t.nodeType&&nt(t),g=K.get(t,"fxshow");for(n in i.queue||(null==(s=_._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,_.queue(t,"fx").length||s.empty.fire()})})),e)if(r=e[n],ee.test(r)){if(delete e[n],o=o||"toggle"===r,r===(m?"hide":"show")){if("show"!==r||!g||void 0===g[n])continue;m=!0}p[n]=g&&g[n]||_.style(t,n)}if((l=!_.isEmptyObject(e))||!_.isEmptyObject(p))for(n in d&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=K.get(t,"display")),"none"===(h=_.css(t,"display"))&&(c?h=c:(lt([t],!0),c=t.style.display||c,h=_.css(t,"display"),lt([t]))),("inline"===h||"inline-block"===h&&null!=c)&&"none"===_.css(t,"float")&&(l||(u.done(function(){f.display=c}),null==c&&(h=f.display,c="none"===h?"":h)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",u.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=K.access(t,"fxshow",{display:c}),o&&(g.hidden=!m),m&<([t],!0),u.done(function(){for(n in m||lt([t]),K.remove(t,"fxshow"),p)_.style(t,n,p[n])})),l=se(m?g[n]:0,n,u),n in g||(g[n]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?ae.prefilters.unshift(t):ae.prefilters.push(t)}}),_.speed=function(t,e,i){var n=t&&"object"==typeof t?_.extend({},t):{complete:i||!i&&e||m(t)&&t,duration:t,easing:i&&e||e&&!m(e)&&e};return _.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in _.fx.speeds?n.duration=_.fx.speeds[n.duration]:n.duration=_.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){m(n.old)&&n.old.call(this),n.queue&&_.dequeue(this,n.queue)},n},_.fn.extend({fadeTo:function(t,e,i,n){return this.filter(nt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var r=_.isEmptyObject(t),o=_.speed(e,i,n),s=function(){var e=ae(this,_.extend({},t),o);(r||K.get(this,"finish"))&&e.stop(!0)};return s.finish=s,r||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=_.timers,s=K.get(this);if(r)s[r]&&s[r].stop&&n(s[r]);else for(r in s)s[r]&&s[r].stop&&ie.test(r)&&n(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(i),e=!1,o.splice(r,1));!e&&i||_.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=K.get(this),n=i[t+"queue"],r=i[t+"queueHooks"],o=_.timers,s=n?n.length:0;for(i.finish=!0,_.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),_.each(["toggle","show","hide"],function(t,e){var i=_.fn[e];_.fn[e]=function(t,n,r){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(oe(e,!0),t,n,r)}}),_.each({slideDown:oe("show"),slideUp:oe("hide"),slideToggle:oe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){_.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),_.timers=[],_.fx.tick=function(){var t,e=0,i=_.timers;for(Jt=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||_.fx.stop(),Jt=void 0},_.fx.timer=function(t){_.timers.push(t),_.fx.start()},_.fx.interval=13,_.fx.start=function(){te||(te=!0,ne())},_.fx.stop=function(){te=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(e,i){return e=_.fx&&_.fx.speeds[e]||e,i=i||"fx",this.queue(i,function(i,n){var r=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(r)}})},function(){var t=n.createElement("input"),e=n.createElement("select").appendChild(n.createElement("option"));t.type="checkbox",f.checkOn=""!==t.value,f.optSelected=e.selected,(t=n.createElement("input")).value="t",t.type="radio",f.radioValue="t"===t.value}();var le,ce=_.expr.attrHandle;_.fn.extend({attr:function(t,e){return B(this,_.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){_.removeAttr(this,t)})}}),_.extend({attr:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?_.prop(t,e,i):(1===o&&_.isXMLDoc(t)||(r=_.attrHooks[e.toLowerCase()]||(_.expr.match.bool.test(e)?le:void 0)),void 0!==i?null===i?void _.removeAttr(t,e):r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:(t.setAttribute(e,i+""),i):r&&"get"in r&&null!==(n=r.get(t,e))?n:null==(n=_.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&T(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,r=e&&e.match(L);if(r&&1===t.nodeType)for(;i=r[n++];)t.removeAttribute(i)}}),le={set:function(t,e,i){return!1===e?_.removeAttr(t,i):t.setAttribute(i,i),i}},_.each(_.expr.match.bool.source.match(/\w+/g),function(t,e){var i=ce[e]||_.find.attr;ce[e]=function(t,e,n){var r,o,s=e.toLowerCase();return n||(o=ce[s],ce[s]=r,r=null!=i(t,e,n)?s:null,ce[s]=o),r}});var he=/^(?:input|select|textarea|button)$/i,de=/^(?:a|area)$/i;function ue(t){return(t.match(L)||[]).join(" ")}function pe(t){return t.getAttribute&&t.getAttribute("class")||""}function fe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(L)||[]}_.fn.extend({prop:function(t,e){return B(this,_.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[_.propFix[t]||t]})}}),_.extend({prop:function(t,e,i){var n,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(t)||(e=_.propFix[e]||e,r=_.propHooks[e]),void 0!==i?r&&"set"in r&&void 0!==(n=r.set(t,i,e))?n:t[e]=i:r&&"get"in r&&null!==(n=r.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=_.find.attr(t,"tabindex");return e?parseInt(e,10):he.test(t.nodeName)||de.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(_.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this}),_.fn.extend({addClass:function(t){var e,i,n,r,o,s,a,l=0;if(m(t))return this.each(function(e){_(this).addClass(t.call(this,e,pe(this)))});if((e=fe(t)).length)for(;i=this[l++];)if(r=pe(i),n=1===i.nodeType&&" "+ue(r)+" "){for(s=0;o=e[s++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");r!==(a=ue(n))&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,n,r,o,s,a,l=0;if(m(t))return this.each(function(e){_(this).removeClass(t.call(this,e,pe(this)))});if(!arguments.length)return this.attr("class","");if((e=fe(t)).length)for(;i=this[l++];)if(r=pe(i),n=1===i.nodeType&&" "+ue(r)+" "){for(s=0;o=e[s++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r!==(a=ue(n))&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t,n="string"===i||Array.isArray(t);return"boolean"==typeof e&&n?e?this.addClass(t):this.removeClass(t):m(t)?this.each(function(i){_(this).toggleClass(t.call(this,i,pe(this),e),e)}):this.each(function(){var e,r,o,s;if(n)for(r=0,o=_(this),s=fe(t);e=s[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else void 0!==t&&"boolean"!==i||((e=pe(this))&&K.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":K.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+ue(pe(i))+" ").indexOf(e)>-1)return!0;return!1}});var me=/\r/g;_.fn.extend({val:function(t){var e,i,n,r=this[0];return arguments.length?(n=m(t),this.each(function(i){var r;1===this.nodeType&&(null==(r=n?t.call(this,i,_(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=_.map(r,function(t){return null==t?"":t+""})),(e=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))})):r?(e=_.valHooks[r.type]||_.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(r,"value"))?i:"string"==typeof(i=r.value)?i.replace(me,""):null==i?"":i:void 0}}),_.extend({valHooks:{option:{get:function(t){var e=_.find.attr(t,"value");return null!=e?e:ue(_.text(t))}},select:{get:function(t){var e,i,n,r=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?o+1:r.length;for(n=o<0?l:s?o:0;n<l;n++)if(((i=r[n]).selected||n===o)&&!i.disabled&&(!i.parentNode.disabled||!T(i.parentNode,"optgroup"))){if(e=_(i).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var i,n,r=t.options,o=_.makeArray(e),s=r.length;s--;)((n=r[s]).selected=_.inArray(_.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=_.inArray(_(t).val(),e)>-1}},f.checkOn||(_.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),f.focusin="onfocusin"in t;var ge=/^(?:focusinfocus|focusoutblur)$/,ve=function(t){t.stopPropagation()};_.extend(_.event,{trigger:function(e,i,r,o){var s,a,l,c,h,u,p,f,v=[r||n],y=d.call(e,"type")?e.type:e,b=d.call(e,"namespace")?e.namespace.split("."):[];if(a=f=l=r=r||n,3!==r.nodeType&&8!==r.nodeType&&!ge.test(y+_.event.triggered)&&(y.indexOf(".")>-1&&(y=(b=y.split(".")).shift(),b.sort()),h=y.indexOf(":")<0&&"on"+y,(e=e[_.expando]?e:new _.Event(y,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),i=null==i?[e]:_.makeArray(i,[e]),p=_.event.special[y]||{},o||!p.trigger||!1!==p.trigger.apply(r,i))){if(!o&&!p.noBubble&&!g(r)){for(c=p.delegateType||y,ge.test(c+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),l=a;l===(r.ownerDocument||n)&&v.push(l.defaultView||l.parentWindow||t)}for(s=0;(a=v[s++])&&!e.isPropagationStopped();)f=a,e.type=s>1?c:p.bindType||y,(u=(K.get(a,"events")||{})[e.type]&&K.get(a,"handle"))&&u.apply(a,i),(u=h&&a[h])&&u.apply&&q(a)&&(e.result=u.apply(a,i),!1===e.result&&e.preventDefault());return e.type=y,o||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),i)||!q(r)||h&&m(r[y])&&!g(r)&&((l=r[h])&&(r[h]=null),_.event.triggered=y,e.isPropagationStopped()&&f.addEventListener(y,ve),r[y](),e.isPropagationStopped()&&f.removeEventListener(y,ve),_.event.triggered=void 0,l&&(r[h]=l)),e.result}},simulate:function(t,e,i){var n=_.extend(new _.Event,i,{type:t,isSimulated:!0});_.event.trigger(n,null,e)}}),_.fn.extend({trigger:function(t,e){return this.each(function(){_.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return _.event.trigger(t,e,i,!0)}}),f.focusin||_.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){_.event.simulate(e,t.target,_.event.fix(t))};_.event.special[e]={setup:function(){var n=this.ownerDocument||this,r=K.access(n,e);r||n.addEventListener(t,i,!0),K.access(n,e,(r||0)+1)},teardown:function(){var n=this.ownerDocument||this,r=K.access(n,e)-1;r?K.access(n,e,r):(n.removeEventListener(t,i,!0),K.remove(n,e))}}});var ye=t.location,be=Date.now(),_e=/\?/;_.parseXML=function(e){var i;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){i=void 0}return i&&!i.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+e),i};var xe=/\[\]$/,we=/\r?\n/g,ke=/^(?:submit|button|image|reset|file)$/i,Ce=/^(?:input|select|textarea|keygen)/i;function Se(t,e,i,n){var r;if(Array.isArray(e))_.each(e,function(e,r){i||xe.test(t)?n(t,r):Se(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,i,n)});else if(i||"object"!==b(e))n(t,e);else for(r in e)Se(t+"["+r+"]",e[r],i,n)}_.param=function(t,e){var i,n=[],r=function(t,e){var i=m(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(Array.isArray(t)||t.jquery&&!_.isPlainObject(t))_.each(t,function(){r(this.name,this.value)});else for(i in t)Se(i,t[i],e,r);return n.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=_.prop(this,"elements");return t?_.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!_(this).is(":disabled")&&Ce.test(this.nodeName)&&!ke.test(t)&&(this.checked||!ct.test(t))}).map(function(t,e){var i=_(this).val();return null==i?null:Array.isArray(i)?_.map(i,function(t){return{name:e.name,value:t.replace(we,"\r\n")}}):{name:e.name,value:i.replace(we,"\r\n")}}).get()}});var De=/%20/g,Te=/#.*$/,Ae=/([?&])_=[^&]*/,Me=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ee=/^(?:GET|HEAD)$/,Pe=/^\/\//,Ie={},Oe={},Ne="*/".concat("*"),Le=n.createElement("a");function je(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,r=0,o=e.toLowerCase().match(L)||[];if(m(i))for(;n=o[r++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Fe(t,e,i,n){var r={},o=t===Oe;function s(a){var l;return r[a]=!0,_.each(t[a]||[],function(t,a){var c=a(e,i,n);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)}),l}return s(e.dataTypes[0])||!r["*"]&&s("*")}function $e(t,e){var i,n,r=_.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&_.extend(!0,t,n),t}Le.href=ye.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ye.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ye.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ne,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":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?$e($e(t,_.ajaxSettings),e):$e(_.ajaxSettings,t)},ajaxPrefilter:je(Ie),ajaxTransport:je(Oe),ajax:function(e,i){"object"==typeof e&&(i=e,e=void 0),i=i||{};var r,o,s,a,l,c,h,d,u,p,f=_.ajaxSetup({},i),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?_(m):_.event,v=_.Deferred(),y=_.Callbacks("once memory"),b=f.statusCode||{},x={},w={},k="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(h){if(!a)for(a={};e=Me.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return h?s:null},setRequestHeader:function(t,e){return null==h&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==h&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)C.always(t[C.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||k;return r&&r.abort(e),S(0,e),this}};if(v.promise(C),f.url=((e||f.url||ye.href)+"").replace(Pe,ye.protocol+"//"),f.type=i.method||i.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(L)||[""],null==f.crossDomain){c=n.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Le.protocol+"//"+Le.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=_.param(f.data,f.traditional)),Fe(Ie,f,i,C),h)return C;for(u in(d=_.event&&f.global)&&0==_.active++&&_.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ee.test(f.type),o=f.url.replace(Te,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(De,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(_e.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(Ae,"$1"),p=(_e.test(o)?"&":"?")+"_="+be+++p),f.url=o+p),f.ifModified&&(_.lastModified[o]&&C.setRequestHeader("If-Modified-Since",_.lastModified[o]),_.etag[o]&&C.setRequestHeader("If-None-Match",_.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||i.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ne+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(u,f.headers[u]);if(f.beforeSend&&(!1===f.beforeSend.call(m,C,f)||h))return C.abort();if(k="abort",y.add(f.complete),C.done(f.success),C.fail(f.error),r=Fe(Oe,f,i,C)){if(C.readyState=1,d&&g.trigger("ajaxSend",[C,f]),h)return C;f.async&&f.timeout>0&&(l=t.setTimeout(function(){C.abort("timeout")},f.timeout));try{h=!1,r.send(x,S)}catch(t){if(h)throw t;S(-1,t)}}else S(-1,"No Transport");function S(e,i,n,a){var c,u,p,x,w,k=i;h||(h=!0,l&&t.clearTimeout(l),r=void 0,s=a||"",C.readyState=e>0?4:0,c=e>=200&&e<300||304===e,n&&(x=function(t,e,i){for(var n,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(r in a)if(a[r]&&a[r].test(n)){l.unshift(r);break}if(l[0]in i)o=l[0];else{for(r in i){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),i[o]}(f,C,n)),x=function(t,e,i,n){var r,o,s,a,l,c={},h=t.dataTypes.slice();if(h[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=h.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=h.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=c[l+" "+o]||c["* "+o]))for(r in c)if((a=r.split(" "))[1]===o&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[r]:!0!==c[r]&&(o=a[0],h.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(f,x,C,c),c?(f.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(_.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(_.etag[o]=w)),204===e||"HEAD"===f.type?k="nocontent":304===e?k="notmodified":(k=x.state,u=x.data,c=!(p=x.error))):(p=k,!e&&k||(k="error",e<0&&(e=0))),C.status=e,C.statusText=(i||k)+"",c?v.resolveWith(m,[u,k,C]):v.rejectWith(m,[C,k,p]),C.statusCode(b),b=void 0,d&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,f,c?u:p]),y.fireWith(m,[C,k]),d&&(g.trigger("ajaxComplete",[C,f]),--_.active||_.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,i){return _.get(t,e,i,"json")},getScript:function(t,e){return _.get(t,void 0,e,"script")}}),_.each(["get","post"],function(t,e){_[e]=function(t,i,n,r){return m(i)&&(r=r||n,n=i,i=void 0),_.ajax(_.extend({url:t,type:e,dataType:r,data:i,success:n},_.isPlainObject(t)&&t))}}),_._evalUrl=function(t){return _.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},_.fn.extend({wrapAll:function(t){var e;return this[0]&&(m(t)&&(t=t.call(this[0])),e=_(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return m(t)?this.each(function(e){_(this).wrapInner(t.call(this,e))}):this.each(function(){var e=_(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=m(t);return this.each(function(i){_(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){_(this).replaceWith(this.childNodes)}),this}}),_.expr.pseudos.hidden=function(t){return!_.expr.pseudos.visible(t)},_.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Re={0:200,1223:204},He=_.ajaxSettings.xhr();f.cors=!!He&&"withCredentials"in He,f.ajax=He=!!He,_.ajaxTransport(function(e){var i,n;if(f.cors||He&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);i=function(t){return function(){i&&(i=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Re[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=i(),n=a.onerror=a.ontimeout=i("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){i&&n()})},i=i("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(i)throw t}},abort:function(){i&&i()}}}),_.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return _.globalEval(t),t}}}),_.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),_.ajaxTransport("script",function(t){var e,i;if(t.crossDomain)return{send:function(r,o){e=_("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&o("error"===t.type?404:200,t.type)}),n.head.appendChild(e[0])},abort:function(){i&&i()}}});var ze,Be=[],Ue=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Be.pop()||_.expando+"_"+be++;return this[t]=!0,t}}),_.ajaxPrefilter("json jsonp",function(e,i,n){var r,o,s,a=!1!==e.jsonp&&(Ue.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ue.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ue,"$1"+r):!1!==e.jsonp&&(e.url+=(_e.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||_.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},n.always(function(){void 0===o?_(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=i.jsonpCallback,Be.push(r)),s&&m(o)&&o(s[0]),s=o=void 0}),"script"}),f.createHTMLDocument=((ze=n.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===ze.childNodes.length),_.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(f.createHTMLDocument?((r=(e=n.implementation.createHTMLDocument("")).createElement("base")).href=n.location.href,e.head.appendChild(r)):e=n),o=A.exec(t),s=!i&&[],o?[e.createElement(o[1])]:(o=yt([t],e,s),s&&s.length&&_(s).remove(),_.merge([],o.childNodes)));var r,o,s},_.fn.load=function(t,e,i){var n,r,o,s=this,a=t.indexOf(" ");return a>-1&&(n=ue(t.slice(a)),t=t.slice(0,a)),m(e)?(i=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&_.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(n?_("<div>").append(_.parseHTML(t)).find(n):t)}).always(i&&function(t,e){s.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){_.fn[e]=function(t){return this.on(e,t)}}),_.expr.pseudos.animated=function(t){return _.grep(_.timers,function(e){return t===e.elem}).length},_.offset={setOffset:function(t,e,i){var n,r,o,s,a,l,c=_.css(t,"position"),h=_(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=_.css(t,"top"),l=_.css(t,"left"),("absolute"===c||"fixed"===c)&&(o+l).indexOf("auto")>-1?(s=(n=h.position()).top,r=n.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),m(e)&&(e=e.call(t,i,_.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):h.css(d)}},_.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){_.offset.setOffset(this,t,e)});var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],r={top:0,left:0};if("fixed"===_.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===_.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((r=_(t).offset()).top+=_.css(t,"borderTopWidth",!0),r.left+=_.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-_.css(n,"marginTop",!0),left:e.left-r.left-_.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===_.css(t,"position");)t=t.offsetParent;return t||bt})}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;_.fn[t]=function(n){return B(this,function(t,n,r){var o;if(g(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===r)return o?o[e]:t[n];o?o.scrollTo(i?o.pageXOffset:r,i?r:o.pageYOffset):t[n]=r},t,n,arguments.length)}}),_.each(["top","left"],function(t,e){_.cssHooks[e]=zt(f.pixelPosition,function(t,i){if(i)return i=Ht(t,e),Ft.test(i)?_(t).position()[e]+"px":i})}),_.each({Height:"height",Width:"width"},function(t,e){_.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){_.fn[n]=function(r,o){var s=arguments.length&&(i||"boolean"!=typeof r),a=i||(!0===r||!0===o?"margin":"border");return B(this,function(e,i,r){var o;return g(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?_.css(e,i,a):_.style(e,i,r,a)},e,s?r:void 0,s)}})}),_.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){_.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),_.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),_.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),_.proxy=function(t,e){var i,n,r;if("string"==typeof e&&(i=t[e],e=t,t=i),m(t))return n=o.call(arguments,2),(r=function(){return t.apply(e||this,n.concat(o.call(arguments)))}).guid=t.guid=t.guid||_.guid++,r},_.holdReady=function(t){t?_.readyWait++:_.ready(!0)},_.isArray=Array.isArray,_.parseJSON=JSON.parse,_.nodeName=T,_.isFunction=m,_.isWindow=g,_.camelCase=V,_.type=b,_.now=Date.now,_.isNumeric=function(t){var e=_.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return _});var We=t.jQuery,Ye=t.$;return _.noConflict=function(e){return t.$===_&&(t.$=Ye),e&&t.jQuery===_&&(t.jQuery=We),_},e||(t.jQuery=t.$=_),_}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,function(){"use strict";for(var t="undefined"!=typeof window&&"undefined"!=typeof document,e=["Edge","Trident","Firefox"],i=0,n=0;n<e.length;n+=1)if(t&&navigator.userAgent.indexOf(e[n])>=0){i=1;break}var r=t&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},i))}};function o(t){return t&&"[object Function]"==={}.toString.call(t)}function s(t,e){if(1!==t.nodeType)return[];var i=getComputedStyle(t,null);return e?i[e]:i}function a(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=s(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/(auto|scroll|overlay)/.test(i+r+n)?t:l(a(t))}var c=t&&!(!window.MSInputMethodContext||!document.documentMode),h=t&&/MSIE 10/.test(navigator.userAgent);function d(t){return 11===t?c:10===t?h:c||h}function u(t){if(!t)return document.documentElement;for(var e=d(10)?document.body:null,i=t.offsetParent;i===e&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(i.nodeName)&&"static"===s(i,"position")?u(i):i:t?t.ownerDocument.documentElement:document.documentElement}function p(t){return null!==t.parentNode?p(t.parentNode):t}function f(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,r=i?e:t,o=document.createRange();o.setStart(n,0),o.setEnd(r,0);var s,a,l=o.commonAncestorContainer;if(t!==l&&e!==l||n.contains(r))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&u(s.firstElementChild)!==s?u(l):l;var c=p(t);return c.host?f(c.host,e):f(t,p(e).host)}function m(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var n=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||n)[e]}return t[e]}function g(t,e){var i="x"===e?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(t["border"+i+"Width"],10)+parseFloat(t["border"+n+"Width"],10)}function v(t,e,i,n){return Math.max(e["offset"+t],e["scroll"+t],i["client"+t],i["offset"+t],i["scroll"+t],d(10)?i["offset"+t]+n["margin"+("Height"===t?"Top":"Left")]+n["margin"+("Height"===t?"Bottom":"Right")]:0)}function y(){var t=document.body,e=document.documentElement,i=d(10)&&getComputedStyle(e);return{height:v("Height",t,e,i),width:v("Width",t,e,i)}}var b=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},_=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),x=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t};function k(t){return w({},t,{right:t.left+t.width,bottom:t.top+t.height})}function C(t){var e={};try{if(d(10)){e=t.getBoundingClientRect();var i=m(t,"top"),n=m(t,"left");e.top+=i,e.left+=n,e.bottom+=i,e.right+=n}else e=t.getBoundingClientRect()}catch(t){}var r={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?y():{},a=o.width||t.clientWidth||r.right-r.left,l=o.height||t.clientHeight||r.bottom-r.top,c=t.offsetWidth-a,h=t.offsetHeight-l;if(c||h){var u=s(t);c-=g(u,"x"),h-=g(u,"y"),r.width-=c,r.height-=h}return k(r)}function S(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=d(10),r="HTML"===e.nodeName,o=C(t),a=C(e),c=l(t),h=s(e),u=parseFloat(h.borderTopWidth,10),p=parseFloat(h.borderLeftWidth,10);i&&"HTML"===e.nodeName&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=k({top:o.top-a.top-u,left:o.left-a.left-p,width:o.width,height:o.height});if(f.marginTop=0,f.marginLeft=0,!n&&r){var g=parseFloat(h.marginTop,10),v=parseFloat(h.marginLeft,10);f.top-=u-g,f.bottom-=u-g,f.left-=p-v,f.right-=p-v,f.marginTop=g,f.marginLeft=v}return(n&&!i?e.contains(c):e===c&&"BODY"!==c.nodeName)&&(f=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=m(e,"top"),r=m(e,"left"),o=i?-1:1;return t.top+=n*o,t.bottom+=n*o,t.left+=r*o,t.right+=r*o,t}(f,e)),f}function D(t){if(!t||!t.parentElement||d())return document.documentElement;for(var e=t.parentElement;e&&"none"===s(e,"transform");)e=e.parentElement;return e||document.documentElement}function T(t,e,i,n){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},c=r?D(t):f(t,e);if("viewport"===n)o=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.ownerDocument.documentElement,n=S(t,i),r=Math.max(i.clientWidth,window.innerWidth||0),o=Math.max(i.clientHeight,window.innerHeight||0),s=e?0:m(i),a=e?0:m(i,"left");return k({top:s-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:o})}(c,r);else{var h=void 0;"scrollParent"===n?"BODY"===(h=l(a(e))).nodeName&&(h=t.ownerDocument.documentElement):h="window"===n?t.ownerDocument.documentElement:n;var d=S(h,c,r);if("HTML"!==h.nodeName||function t(e){var i=e.nodeName;return"BODY"!==i&&"HTML"!==i&&("fixed"===s(e,"position")||t(a(e)))}(c))o=d;else{var u=y(),p=u.height,g=u.width;o.top+=d.top-d.marginTop,o.bottom=p+d.top,o.left+=d.left-d.marginLeft,o.right=g+d.left}}return o.left+=i,o.top+=i,o.right-=i,o.bottom-=i,o}function A(t,e,i,n,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=T(i,n,o,r),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},l=Object.keys(a).map(function(t){return w({key:t},a[t],{area:(e=a[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),c=l.filter(function(t){var e=t.width,n=t.height;return e>=i.clientWidth&&n>=i.clientHeight}),h=c.length>0?c[0].key:l[0].key,d=t.split("-")[1];return h+(d?"-"+d:"")}function M(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return S(i,n?D(e):f(e,i),n)}function E(t){var e=getComputedStyle(t),i=parseFloat(e.marginTop)+parseFloat(e.marginBottom),n=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+n,height:t.offsetHeight+i}}function P(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function I(t,e,i){i=i.split("-")[0];var n=E(t),r={width:n.width,height:n.height},o=-1!==["right","left"].indexOf(i),s=o?"top":"left",a=o?"left":"top",l=o?"height":"width",c=o?"width":"height";return r[s]=e[s]+e[l]/2-n[l]/2,r[a]=i===a?e[a]-n[c]:e[P(a)],r}function O(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function N(t,e,i){return(void 0===i?t:t.slice(0,function(t,e,i){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===i});var n=O(t,function(t){return t[e]===i});return t.indexOf(n)}(t,"name",i))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=t.function||t.fn;t.enabled&&o(i)&&(e.offsets.popper=k(e.offsets.popper),e.offsets.reference=k(e.offsets.reference),e=i(e,t))}),e}function L(t,e){return t.some(function(t){var i=t.name;return t.enabled&&i===e})}function j(t){for(var e=[!1,"ms","Webkit","Moz","O"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length;n++){var r=e[n],o=r?""+r+i:t;if(void 0!==document.body.style[o])return o}return null}function F(t){var e=t.ownerDocument;return e?e.defaultView:window}function $(t,e,i,n){i.updateBound=n,F(t).addEventListener("resize",i.updateBound,{passive:!0});var r=l(t);return function t(e,i,n,r){var o="BODY"===e.nodeName,s=o?e.ownerDocument.defaultView:e;s.addEventListener(i,n,{passive:!0}),o||t(l(s.parentNode),i,n,r),r.push(s)}(r,"scroll",i.updateBound,i.scrollParents),i.scrollElement=r,i.eventsEnabled=!0,i}function R(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,F(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function H(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function z(t,e){Object.keys(e).forEach(function(i){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&H(e[i])&&(n="px"),t.style[i]=e[i]+n})}function B(t,e,i){var n=O(t,function(t){return t.name===e}),r=!!n&&t.some(function(t){return t.name===i&&t.enabled&&t.order<n.order});if(!r){var o="`"+e+"`",s="`"+i+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}var U=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],W=U.slice(3);function Y(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=W.indexOf(t),n=W.slice(i+1).concat(W.slice(0,i));return e?n.reverse():n}var V={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function q(t,e,i,n){var r=[0,0],o=-1!==["right","left"].indexOf(n),s=t.split(/(\+|\-)/).map(function(t){return t.trim()}),a=s.indexOf(O(s,function(t){return-1!==t.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s];return(c=c.map(function(t,n){var r=(1===n?!o:o)?"height":"width",s=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,i,n){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],s=r[2];if(!o)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=i;break;case"%":case"%r":default:a=n}return k(a)[e]/100*o}if("vh"===s||"vw"===s)return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,r,e,i)})})).forEach(function(t,e){t.forEach(function(i,n){H(i)&&(r[e]+=i*("-"===t[n-1]?-1:1))})}),r}var G={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var r=t.offsets,o=r.reference,s=r.popper,a=-1!==["bottom","top"].indexOf(i),l=a?"left":"top",c=a?"width":"height",h={start:x({},l,o[l]),end:x({},l,o[l]+o[c]-s[c])};t.offsets.popper=w({},s,h[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var i=e.offset,n=t.placement,r=t.offsets,o=r.popper,s=r.reference,a=n.split("-")[0],l=void 0;return l=H(+i)?[+i,0]:q(i,o,s,a),"left"===a?(o.top+=l[0],o.left-=l[1]):"right"===a?(o.top+=l[0],o.left+=l[1]):"top"===a?(o.left+=l[0],o.top-=l[1]):"bottom"===a&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var i=e.boundariesElement||u(t.instance.popper);t.instance.reference===i&&(i=u(i));var n=j("transform"),r=t.instance.popper.style,o=r.top,s=r.left,a=r[n];r.top="",r.left="",r[n]="";var l=T(t.instance.popper,t.instance.reference,e.padding,i,t.positionFixed);r.top=o,r.left=s,r[n]=a,e.boundaries=l;var c=e.priority,h=t.offsets.popper,d={primary:function(t){var i=h[t];return h[t]<l[t]&&!e.escapeWithReference&&(i=Math.max(h[t],l[t])),x({},t,i)},secondary:function(t){var i="right"===t?"left":"top",n=h[i];return h[t]>l[t]&&!e.escapeWithReference&&(n=Math.min(h[i],l[t]-("right"===t?h.width:h.height))),x({},i,n)}};return c.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";h=w({},h,d[e](t))}),t.offsets.popper=h,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,r=t.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(r),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return i[a]<o(n[l])&&(t.offsets.popper[l]=o(n[l])-i[c]),i[l]>o(n[a])&&(t.offsets.popper[l]=o(n[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!B(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],o=t.offsets,a=o.popper,l=o.reference,c=-1!==["left","right"].indexOf(r),h=c?"height":"width",d=c?"Top":"Left",u=d.toLowerCase(),p=c?"left":"top",f=c?"bottom":"right",m=E(n)[h];l[f]-m<a[u]&&(t.offsets.popper[u]-=a[u]-(l[f]-m)),l[u]+m>a[f]&&(t.offsets.popper[u]+=l[u]+m-a[f]),t.offsets.popper=k(t.offsets.popper);var g=l[u]+l[h]/2-m/2,v=s(t.instance.popper),y=parseFloat(v["margin"+d],10),b=parseFloat(v["border"+d+"Width"],10),_=g-t.offsets.popper[u]-y-b;return _=Math.max(Math.min(a[h]-m,_),0),t.arrowElement=n,t.offsets.arrow=(x(i={},u,Math.round(_)),x(i,p,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(L(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=T(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],r=P(n),o=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case V.FLIP:s=[n,r];break;case V.CLOCKWISE:s=Y(n);break;case V.COUNTERCLOCKWISE:s=Y(n,!0);break;default:s=e.behavior}return s.forEach(function(a,l){if(n!==a||s.length===l+1)return t;n=t.placement.split("-")[0],r=P(n);var c=t.offsets.popper,h=t.offsets.reference,d=Math.floor,u="left"===n&&d(c.right)>d(h.left)||"right"===n&&d(c.left)<d(h.right)||"top"===n&&d(c.bottom)>d(h.top)||"bottom"===n&&d(c.top)<d(h.bottom),p=d(c.left)<d(i.left),f=d(c.right)>d(i.right),m=d(c.top)<d(i.top),g=d(c.bottom)>d(i.bottom),v="left"===n&&p||"right"===n&&f||"top"===n&&m||"bottom"===n&&g,y=-1!==["top","bottom"].indexOf(n),b=!!e.flipVariations&&(y&&"start"===o&&p||y&&"end"===o&&f||!y&&"start"===o&&m||!y&&"end"===o&&g);(u||v||b)&&(t.flipped=!0,(u||v)&&(n=s[l+1]),b&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=n+(o?"-"+o:""),t.offsets.popper=w({},t.offsets.popper,I(t.instance.popper,t.offsets.reference,t.placement)),t=N(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,r=n.popper,o=n.reference,s=-1!==["left","right"].indexOf(i),a=-1===["top","left"].indexOf(i);return r[s?"left":"top"]=o[i]-(a?r[s?"width":"height"]:0),t.placement=P(e),t.offsets.popper=k(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!B(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=O(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<i.top||e.left>i.right||e.top>i.bottom||e.right<i.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var i=e.x,n=e.y,r=t.offsets.popper,o=O(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:e.gpuAcceleration,a=C(u(t.instance.popper)),l={position:r.position},c={left:Math.floor(r.left),top:Math.round(r.top),bottom:Math.round(r.bottom),right:Math.floor(r.right)},h="bottom"===i?"top":"bottom",d="right"===n?"left":"right",p=j("transform"),f=void 0,m=void 0;if(m="bottom"===h?-a.height+c.bottom:c.top,f="right"===d?-a.width+c.right:c.left,s&&p)l[p]="translate3d("+f+"px, "+m+"px, 0)",l[h]=0,l[d]=0,l.willChange="transform";else{var g="bottom"===h?-1:1,v="right"===d?-1:1;l[h]=m*g,l[d]=f*v,l.willChange=h+", "+d}var y={"x-placement":t.placement};return t.attributes=w({},y,t.attributes),t.styles=w({},l,t.styles),t.arrowStyles=w({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,i;return z(t.instance.popper,t.styles),e=t.instance.popper,i=t.attributes,Object.keys(i).forEach(function(t){!1!==i[t]?e.setAttribute(t,i[t]):e.removeAttribute(t)}),t.arrowElement&&Object.keys(t.arrowStyles).length&&z(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,i,n,r){var o=M(r,e,t,i.positionFixed),s=A(i.placement,o,e,t,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return e.setAttribute("x-placement",s),z(e,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},K=function(){function t(e,i){var n=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};b(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=r(this.update.bind(this)),this.options=w({},t.Defaults,s),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(w({},t.Defaults.modifiers,s.modifiers)).forEach(function(e){n.options.modifiers[e]=w({},t.Defaults.modifiers[e]||{},s.modifiers?s.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return w({name:t},n.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&o(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return _(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=M(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=A(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=I(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=N(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,L(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[j("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=$(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return R.call(this)}}]),t}();return K.Utils=("undefined"!=typeof window?window:global).PopperUtils,K.placements=U,K.Defaults=G,K}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,i){"use strict";function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable}))),n.forEach(function(e){var n,r,o;n=t,o=i[r=e],r in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o})}return t}e=e&&e.hasOwnProperty("default")?e.default:e,i=i&&i.hasOwnProperty("default")?i.default:i;var s,a,l,c,h,d,u,p,f,m,g,v,y,b,_,x,w,k,C,S,D,T,A,M,E,P,I,O,N,L,j,F,$,R,H,z,B,U,W,Y,V,q,G,K,X,Z,Q,J,tt,et,it,nt,rt,ot,st,at,lt,ct,ht,dt,ut,pt,ft,mt,gt,vt,yt,bt,_t,xt,wt,kt,Ct,St,Dt,Tt,At,Mt,Et,Pt,It,Ot,Nt,Lt,jt,Ft,$t,Rt,Ht,zt,Bt,Ut,Wt,Yt,Vt,qt,Gt,Kt,Xt,Zt,Qt,Jt,te,ee,ie,ne,re,oe,se,ae,le,ce,he,de,ue,pe,fe,me,ge,ve,ye,be,_e,xe,we,ke,Ce,Se,De,Te,Ae,Me,Ee,Pe,Ie,Oe,Ne,Le,je,Fe,$e,Re,He,ze,Be,Ue,We,Ye,Ve,qe,Ge,Ke,Xe,Ze,Qe,Je,ti,ei,ii,ni,ri,oi,si,ai,li,ci,hi,di=function(t){var e="transitionend";var i={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(e){var i=e.getAttribute("data-target");i&&"#"!==i||(i=e.getAttribute("href")||"");try{return 0<t(document).find(i).length?i:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var i=t(e).css("transition-duration");return parseFloat(i)?(i=i.split(",")[0],1e3*parseFloat(i)):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(i){t(i).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r],s=e[r],a=s&&i.isElement(s)?"element":(l=s,{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(a))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+a+'" but expected type "'+o+'".')}var l}};return t.fn.emulateTransitionEnd=function(e){var n=this,r=!1;return t(this).one(i.TRANSITION_END,function(){r=!0}),setTimeout(function(){r||i.triggerTransitionEnd(n)},e),this},t.event.special[i.TRANSITION_END]={bindType:e,delegateType:e,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}},i}(e),ui=(a="alert",c="."+(l="bs.alert"),h=(s=e).fn[a],d={CLOSE:"close"+c,CLOSED:"closed"+c,CLICK_DATA_API:"click"+c+".data-api"},u="alert",p="fade",f="show",m=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){s.removeData(this._element,l),this._element=null},e._getRootElement=function(t){var e=di.getSelectorFromElement(t),i=!1;return e&&(i=s(e)[0]),i||(i=s(t).closest("."+u)[0]),i},e._triggerCloseEvent=function(t){var e=s.Event(d.CLOSE);return s(t).trigger(e),e},e._removeElement=function(t){var e=this;if(s(t).removeClass(f),s(t).hasClass(p)){var i=di.getTransitionDurationFromElement(t);s(t).one(di.TRANSITION_END,function(i){return e._destroyElement(t,i)}).emulateTransitionEnd(i)}else this._destroyElement(t)},e._destroyElement=function(t){s(t).detach().trigger(d.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var i=s(this),n=i.data(l);n||(n=new t(this),i.data(l,n)),"close"===e&&n[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}}]),t}(),s(document).on(d.CLICK_DATA_API,'[data-dismiss="alert"]',m._handleDismiss(new m)),s.fn[a]=m._jQueryInterface,s.fn[a].Constructor=m,s.fn[a].noConflict=function(){return s.fn[a]=h,m._jQueryInterface},m),pi=(v="button",b="."+(y="bs.button"),_=".data-api",x=(g=e).fn[v],w="active","btn",C='[data-toggle^="button"]',S='[data-toggle="buttons"]',D="input",T=".active",A=".btn",M={CLICK_DATA_API:"click"+b+_,FOCUS_BLUR_DATA_API:(k="focus")+b+_+" blur"+b+_},E=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,i=g(this._element).closest(S)[0];if(i){var n=g(this._element).find(D)[0];if(n){if("radio"===n.type)if(n.checked&&g(this._element).hasClass(w))t=!1;else{var r=g(i).find(T)[0];r&&g(r).removeClass(w)}if(t){if(n.hasAttribute("disabled")||i.hasAttribute("disabled")||n.classList.contains("disabled")||i.classList.contains("disabled"))return;n.checked=!g(this._element).hasClass(w),g(n).trigger("change")}n.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!g(this._element).hasClass(w)),t&&g(this._element).toggleClass(w)},e.dispose=function(){g.removeData(this._element,y),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var i=g(this).data(y);i||(i=new t(this),g(this).data(y,i)),"toggle"===e&&i[e]()})},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}}]),t}(),g(document).on(M.CLICK_DATA_API,C,function(t){t.preventDefault();var e=t.target;g(e).hasClass("btn")||(e=g(e).closest(A)),E._jQueryInterface.call(g(e),"toggle")}).on(M.FOCUS_BLUR_DATA_API,C,function(t){var e=g(t.target).closest(A)[0];g(e).toggleClass(k,/^focus(in)?$/.test(t.type))}),g.fn[v]=E._jQueryInterface,g.fn[v].Constructor=E,g.fn[v].noConflict=function(){return g.fn[v]=x,E._jQueryInterface},E),fi=(I="carousel",N="."+(O="bs.carousel"),L=".data-api",j=(P=e).fn[I],F={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},$={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},R="next",H="prev",z="left",B="right",U={SLIDE:"slide"+N,SLID:"slid"+N,KEYDOWN:"keydown"+N,MOUSEENTER:"mouseenter"+N,MOUSELEAVE:"mouseleave"+N,TOUCHEND:"touchend"+N,LOAD_DATA_API:"load"+N+L,CLICK_DATA_API:"click"+N+L},W="carousel",Y="active",V="slide",q="carousel-item-right",G="carousel-item-left",K="carousel-item-next",X="carousel-item-prev",Z={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},Q=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=P(t)[0],this._indicatorsElement=P(this._element).find(Z.INDICATORS)[0],this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(R)},e.nextWhenVisible=function(){!document.hidden&&P(this._element).is(":visible")&&"hidden"!==P(this._element).css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(H)},e.pause=function(t){t||(this._isPaused=!0),P(this._element).find(Z.NEXT_PREV)[0]&&(di.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=P(this._element).find(Z.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)P(this._element).one(U.SLID,function(){return e.to(t)});else{if(i===t)return this.pause(),void this.cycle();var n=i<t?R:H;this._slide(n,this._items[t])}},e.dispose=function(){P(this._element).off(N),P.removeData(this._element,O),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=o({},F,t),di.typeCheckConfig(I,t,$),t},e._addEventListeners=function(){var t=this;this._config.keyboard&&P(this._element).on(U.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(P(this._element).on(U.MOUSEENTER,function(e){return t.pause(e)}).on(U.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&P(this._element).on(U.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval)}))},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=P.makeArray(P(t).parent().find(Z.ITEM)),this._items.indexOf(t)},e._getItemByDirection=function(t,e){var i=t===R,n=t===H,r=this._getItemIndex(e),o=this._items.length-1;if((n&&0===r||i&&r===o)&&!this._config.wrap)return e;var s=(r+(t===H?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var i=this._getItemIndex(t),n=this._getItemIndex(P(this._element).find(Z.ACTIVE_ITEM)[0]),r=P.Event(U.SLIDE,{relatedTarget:t,direction:e,from:n,to:i});return P(this._element).trigger(r),r},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){P(this._indicatorsElement).find(Z.ACTIVE).removeClass(Y);var e=this._indicatorsElement.children[this._getItemIndex(t)];e&&P(e).addClass(Y)}},e._slide=function(t,e){var i,n,r,o=this,s=P(this._element).find(Z.ACTIVE_ITEM)[0],a=this._getItemIndex(s),l=e||s&&this._getItemByDirection(t,s),c=this._getItemIndex(l),h=Boolean(this._interval);if(t===R?(i=G,n=K,r=z):(i=q,n=X,r=B),l&&P(l).hasClass(Y))this._isSliding=!1;else if(!this._triggerSlideEvent(l,r).isDefaultPrevented()&&s&&l){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(l);var d=P.Event(U.SLID,{relatedTarget:l,direction:r,from:a,to:c});if(P(this._element).hasClass(V)){P(l).addClass(n),di.reflow(l),P(s).addClass(i),P(l).addClass(i);var u=di.getTransitionDurationFromElement(s);P(s).one(di.TRANSITION_END,function(){P(l).removeClass(i+" "+n).addClass(Y),P(s).removeClass(Y+" "+n+" "+i),o._isSliding=!1,setTimeout(function(){return P(o._element).trigger(d)},0)}).emulateTransitionEnd(u)}else P(s).removeClass(Y),P(l).addClass(Y),this._isSliding=!1,P(this._element).trigger(d);h&&this.cycle()}},t._jQueryInterface=function(e){return this.each(function(){var i=P(this).data(O),n=o({},F,P(this).data());"object"==typeof e&&(n=o({},n,e));var r="string"==typeof e?e:n.slide;if(i||(i=new t(this,n),P(this).data(O,i)),"number"==typeof e)i.to(e);else if("string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else n.interval&&(i.pause(),i.cycle())})},t._dataApiClickHandler=function(e){var i=di.getSelectorFromElement(this);if(i){var n=P(i)[0];if(n&&P(n).hasClass(W)){var r=o({},P(n).data(),P(this).data()),s=this.getAttribute("data-slide-to");s&&(r.interval=!1),t._jQueryInterface.call(P(n),r),s&&P(n).data(O).to(s),e.preventDefault()}}},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}},{key:"Default",get:function(){return F}}]),t}(),P(document).on(U.CLICK_DATA_API,Z.DATA_SLIDE,Q._dataApiClickHandler),P(window).on(U.LOAD_DATA_API,function(){P(Z.DATA_RIDE).each(function(){var t=P(this);Q._jQueryInterface.call(t,t.data())})}),P.fn[I]=Q._jQueryInterface,P.fn[I].Constructor=Q,P.fn[I].noConflict=function(){return P.fn[I]=j,Q._jQueryInterface},Q),mi=(tt="collapse",it="."+(et="bs.collapse"),nt=(J=e).fn[tt],rt={toggle:!0,parent:""},ot={toggle:"boolean",parent:"(string|element)"},st={SHOW:"show"+it,SHOWN:"shown"+it,HIDE:"hide"+it,HIDDEN:"hidden"+it,CLICK_DATA_API:"click"+it+".data-api"},at="show",lt="collapse",ct="collapsing",ht="collapsed",dt="width","height",ut={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},pt=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=J.makeArray(J('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var i=J(ut.DATA_TOGGLE),n=0;n<i.length;n++){var r=i[n],o=di.getSelectorFromElement(r);null!==o&&0<J(o).filter(t).length&&(this._selector=o,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){J(this._element).hasClass(at)?this.hide():this.show()},e.show=function(){var e,i,n=this;if(!(this._isTransitioning||J(this._element).hasClass(at)||(this._parent&&0===(e=J.makeArray(J(this._parent).find(ut.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),e&&(i=J(e).not(this._selector).data(et))&&i._isTransitioning))){var r=J.Event(st.SHOW);if(J(this._element).trigger(r),!r.isDefaultPrevented()){e&&(t._jQueryInterface.call(J(e).not(this._selector),"hide"),i||J(e).data(et,null));var o=this._getDimension();J(this._element).removeClass(lt).addClass(ct),(this._element.style[o]=0)<this._triggerArray.length&&J(this._triggerArray).removeClass(ht).attr("aria-expanded",!0),this.setTransitioning(!0);var s="scroll"+(o[0].toUpperCase()+o.slice(1)),a=di.getTransitionDurationFromElement(this._element);J(this._element).one(di.TRANSITION_END,function(){J(n._element).removeClass(ct).addClass(lt).addClass(at),n._element.style[o]="",n.setTransitioning(!1),J(n._element).trigger(st.SHOWN)}).emulateTransitionEnd(a),this._element.style[o]=this._element[s]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&J(this._element).hasClass(at)){var e=J.Event(st.HIDE);if(J(this._element).trigger(e),!e.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",di.reflow(this._element),J(this._element).addClass(ct).removeClass(lt).removeClass(at),0<this._triggerArray.length)for(var n=0;n<this._triggerArray.length;n++){var r=this._triggerArray[n],o=di.getSelectorFromElement(r);null!==o&&(J(o).hasClass(at)||J(r).addClass(ht).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[i]="";var s=di.getTransitionDurationFromElement(this._element);J(this._element).one(di.TRANSITION_END,function(){t.setTransitioning(!1),J(t._element).removeClass(ct).addClass(lt).trigger(st.HIDDEN)}).emulateTransitionEnd(s)}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){J.removeData(this._element,et),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=o({},rt,t)).toggle=Boolean(t.toggle),di.typeCheckConfig(tt,t,ot),t},e._getDimension=function(){return J(this._element).hasClass(dt)?dt:"height"},e._getParent=function(){var e=this,i=null;di.isElement(this._config.parent)?(i=this._config.parent,void 0!==this._config.parent.jquery&&(i=this._config.parent[0])):i=J(this._config.parent)[0];var n='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return J(i).find(n).each(function(i,n){e._addAriaAndCollapsedClass(t._getTargetFromElement(n),[n])}),i},e._addAriaAndCollapsedClass=function(t,e){if(t){var i=J(t).hasClass(at);0<e.length&&J(e).toggleClass(ht,!i).attr("aria-expanded",i)}},t._getTargetFromElement=function(t){var e=di.getSelectorFromElement(t);return e?J(e)[0]:null},t._jQueryInterface=function(e){return this.each(function(){var i=J(this),n=i.data(et),r=o({},rt,i.data(),"object"==typeof e&&e?e:{});if(!n&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),n||(n=new t(this,r),i.data(et,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}},{key:"Default",get:function(){return rt}}]),t}(),J(document).on(st.CLICK_DATA_API,ut.DATA_TOGGLE,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=J(this),i=di.getSelectorFromElement(this);J(i).each(function(){var t=J(this),i=t.data(et)?"toggle":e.data();pt._jQueryInterface.call(t,i)})}),J.fn[tt]=pt._jQueryInterface,J.fn[tt].Constructor=pt,J.fn[tt].noConflict=function(){return J.fn[tt]=nt,pt._jQueryInterface},pt),gi=(mt="dropdown",vt="."+(gt="bs.dropdown"),yt=".data-api",bt=(ft=e).fn[mt],_t=new RegExp("38|40|27"),xt={HIDE:"hide"+vt,HIDDEN:"hidden"+vt,SHOW:"show"+vt,SHOWN:"shown"+vt,CLICK:"click"+vt,CLICK_DATA_API:"click"+vt+yt,KEYDOWN_DATA_API:"keydown"+vt+yt,KEYUP_DATA_API:"keyup"+vt+yt},wt="disabled",kt="show","dropup",Ct="dropright",St="dropleft",Dt="dropdown-menu-right",Tt="position-static",At='[data-toggle="dropdown"]',Mt=".dropdown form",Et=".dropdown-menu",Pt=".navbar-nav",It=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Ot="top-start",Nt="top-end",Lt="bottom-start",jt="bottom-end",Ft="right-start",$t="left-start",Rt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},Ht={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},zt=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!ft(this._element).hasClass(wt)){var e=t._getParentFromElement(this._element),n=ft(this._menu).hasClass(kt);if(t._clearMenus(),!n){var r={relatedTarget:this._element},o=ft.Event(xt.SHOW,r);if(ft(e).trigger(o),!o.isDefaultPrevented()){if(!this._inNavbar){if(void 0===i)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=e:di.isElement(this._config.reference)&&(s=this._config.reference,void 0!==this._config.reference.jquery&&(s=this._config.reference[0])),"scrollParent"!==this._config.boundary&&ft(e).addClass(Tt),this._popper=new i(s,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===ft(e).closest(Pt).length&&ft(document.body).children().on("mouseover",null,ft.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),ft(this._menu).toggleClass(kt),ft(e).toggleClass(kt).trigger(ft.Event(xt.SHOWN,r))}}}},e.dispose=function(){ft.removeData(this._element,gt),ft(this._element).off(vt),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;ft(this._element).on(xt.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},e._getConfig=function(t){return t=o({},this.constructor.Default,ft(this._element).data(),t),di.typeCheckConfig(mt,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);this._menu=ft(e).find(Et)[0]}return this._menu},e._getPlacement=function(){var t=ft(this._element).parent(),e=Lt;return t.hasClass("dropup")?(e=Ot,ft(this._menu).hasClass(Dt)&&(e=Nt)):t.hasClass(Ct)?e=Ft:t.hasClass(St)?e=$t:ft(this._menu).hasClass(Dt)&&(e=jt),e},e._detectNavbar=function(){return 0<ft(this._element).closest(".navbar").length},e._getPopperConfig=function(){var t=this,e={};"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=o({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset;var i={placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(i.modifiers.applyStyle={enabled:!1}),i},t._jQueryInterface=function(e){return this.each(function(){var i=ft(this).data(gt);if(i||(i=new t(this,"object"==typeof e?e:null),ft(this).data(gt,i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var i=ft.makeArray(ft(At)),n=0;n<i.length;n++){var r=t._getParentFromElement(i[n]),o=ft(i[n]).data(gt),s={relatedTarget:i[n]};if(o){var a=o._menu;if(ft(r).hasClass(kt)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&ft.contains(r,e.target))){var l=ft.Event(xt.HIDE,s);ft(r).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&ft(document.body).children().off("mouseover",null,ft.noop),i[n].setAttribute("aria-expanded","false"),ft(a).removeClass(kt),ft(r).removeClass(kt).trigger(ft.Event(xt.HIDDEN,s)))}}}},t._getParentFromElement=function(t){var e,i=di.getSelectorFromElement(t);return i&&(e=ft(i)[0]),e||t.parentNode},t._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||ft(e.target).closest(Et).length)):_t.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!ft(this).hasClass(wt))){var i=t._getParentFromElement(this),n=ft(i).hasClass(kt);if((n||27===e.which&&32===e.which)&&(!n||27!==e.which&&32!==e.which)){var r=ft(i).find(It).get();if(0!==r.length){var o=r.indexOf(e.target);38===e.which&&0<o&&o--,40===e.which&&o<r.length-1&&o++,o<0&&(o=0),r[o].focus()}}else{if(27===e.which){var s=ft(i).find(At)[0];ft(s).trigger("focus")}ft(this).trigger("click")}}},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}},{key:"Default",get:function(){return Rt}},{key:"DefaultType",get:function(){return Ht}}]),t}(),ft(document).on(xt.KEYDOWN_DATA_API,At,zt._dataApiKeydownHandler).on(xt.KEYDOWN_DATA_API,Et,zt._dataApiKeydownHandler).on(xt.CLICK_DATA_API+" "+xt.KEYUP_DATA_API,zt._clearMenus).on(xt.CLICK_DATA_API,At,function(t){t.preventDefault(),t.stopPropagation(),zt._jQueryInterface.call(ft(this),"toggle")}).on(xt.CLICK_DATA_API,Mt,function(t){t.stopPropagation()}),ft.fn[mt]=zt._jQueryInterface,ft.fn[mt].Constructor=zt,ft.fn[mt].noConflict=function(){return ft.fn[mt]=bt,zt._jQueryInterface},zt),vi=(Ut="modal",Yt="."+(Wt="bs.modal"),Vt=(Bt=e).fn[Ut],qt={backdrop:!0,keyboard:!0,focus:!0,show:!0},Gt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Kt={HIDE:"hide"+Yt,HIDDEN:"hidden"+Yt,SHOW:"show"+Yt,SHOWN:"shown"+Yt,FOCUSIN:"focusin"+Yt,RESIZE:"resize"+Yt,CLICK_DISMISS:"click.dismiss"+Yt,KEYDOWN_DISMISS:"keydown.dismiss"+Yt,MOUSEUP_DISMISS:"mouseup.dismiss"+Yt,MOUSEDOWN_DISMISS:"mousedown.dismiss"+Yt,CLICK_DATA_API:"click"+Yt+".data-api"},Xt="modal-scrollbar-measure",Zt="modal-backdrop",Qt="modal-open",Jt="fade",te="show",ee={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},ie=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=Bt(t).find(ee.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isTransitioning&&!this._isShown){Bt(this._element).hasClass(Jt)&&(this._isTransitioning=!0);var i=Bt.Event(Kt.SHOW,{relatedTarget:t});Bt(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),Bt(document.body).addClass(Qt),this._setEscapeEvent(),this._setResizeEvent(),Bt(this._element).on(Kt.CLICK_DISMISS,ee.DATA_DISMISS,function(t){return e.hide(t)}),Bt(this._dialog).on(Kt.MOUSEDOWN_DISMISS,function(){Bt(e._element).one(Kt.MOUSEUP_DISMISS,function(t){Bt(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var i=Bt.Event(Kt.HIDE);if(Bt(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var n=Bt(this._element).hasClass(Jt);if(n&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),Bt(document).off(Kt.FOCUSIN),Bt(this._element).removeClass(te),Bt(this._element).off(Kt.CLICK_DISMISS),Bt(this._dialog).off(Kt.MOUSEDOWN_DISMISS),n){var r=di.getTransitionDurationFromElement(this._element);Bt(this._element).one(di.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(r)}else this._hideModal()}}},e.dispose=function(){Bt.removeData(this._element,Wt),Bt(window,document,this._element,this._backdrop).off(Yt),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=o({},qt,t),di.typeCheckConfig(Ut,t,Gt),t},e._showElement=function(t){var e=this,i=Bt(this._element).hasClass(Jt);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&di.reflow(this._element),Bt(this._element).addClass(te),this._config.focus&&this._enforceFocus();var n=Bt.Event(Kt.SHOWN,{relatedTarget:t}),r=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,Bt(e._element).trigger(n)};if(i){var o=di.getTransitionDurationFromElement(this._element);Bt(this._dialog).one(di.TRANSITION_END,r).emulateTransitionEnd(o)}else r()},e._enforceFocus=function(){var t=this;Bt(document).off(Kt.FOCUSIN).on(Kt.FOCUSIN,function(e){document!==e.target&&t._element!==e.target&&0===Bt(t._element).has(e.target).length&&t._element.focus()})},e._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?Bt(this._element).on(Kt.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||Bt(this._element).off(Kt.KEYDOWN_DISMISS)},e._setResizeEvent=function(){var t=this;this._isShown?Bt(window).on(Kt.RESIZE,function(e){return t.handleUpdate(e)}):Bt(window).off(Kt.RESIZE)},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){Bt(document.body).removeClass(Qt),t._resetAdjustments(),t._resetScrollbar(),Bt(t._element).trigger(Kt.HIDDEN)})},e._removeBackdrop=function(){this._backdrop&&(Bt(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,i=Bt(this._element).hasClass(Jt)?Jt:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=Zt,i&&Bt(this._backdrop).addClass(i),Bt(this._backdrop).appendTo(document.body),Bt(this._element).on(Kt.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),i&&di.reflow(this._backdrop),Bt(this._backdrop).addClass(te),!t)return;if(!i)return void t();var n=di.getTransitionDurationFromElement(this._backdrop);Bt(this._backdrop).one(di.TRANSITION_END,t).emulateTransitionEnd(n)}else if(!this._isShown&&this._backdrop){Bt(this._backdrop).removeClass(te);var r=function(){e._removeBackdrop(),t&&t()};if(Bt(this._element).hasClass(Jt)){var o=di.getTransitionDurationFromElement(this._backdrop);Bt(this._backdrop).one(di.TRANSITION_END,r).emulateTransitionEnd(o)}else r()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){Bt(ee.FIXED_CONTENT).each(function(e,i){var n=Bt(i)[0].style.paddingRight,r=Bt(i).css("padding-right");Bt(i).data("padding-right",n).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")}),Bt(ee.STICKY_CONTENT).each(function(e,i){var n=Bt(i)[0].style.marginRight,r=Bt(i).css("margin-right");Bt(i).data("margin-right",n).css("margin-right",parseFloat(r)-t._scrollbarWidth+"px")}),Bt(ee.NAVBAR_TOGGLER).each(function(e,i){var n=Bt(i)[0].style.marginRight,r=Bt(i).css("margin-right");Bt(i).data("margin-right",n).css("margin-right",parseFloat(r)+t._scrollbarWidth+"px")});var e=document.body.style.paddingRight,i=Bt(document.body).css("padding-right");Bt(document.body).data("padding-right",e).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},e._resetScrollbar=function(){Bt(ee.FIXED_CONTENT).each(function(t,e){var i=Bt(e).data("padding-right");void 0!==i&&Bt(e).css("padding-right",i).removeData("padding-right")}),Bt(ee.STICKY_CONTENT+", "+ee.NAVBAR_TOGGLER).each(function(t,e){var i=Bt(e).data("margin-right");void 0!==i&&Bt(e).css("margin-right",i).removeData("margin-right")});var t=Bt(document.body).data("padding-right");void 0!==t&&Bt(document.body).css("padding-right",t).removeData("padding-right")},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className=Xt,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,i){return this.each(function(){var n=Bt(this).data(Wt),r=o({},qt,Bt(this).data(),"object"==typeof e&&e?e:{});if(n||(n=new t(this,r),Bt(this).data(Wt,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e](i)}else r.show&&n.show(i)})},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}},{key:"Default",get:function(){return qt}}]),t}(),Bt(document).on(Kt.CLICK_DATA_API,ee.DATA_TOGGLE,function(t){var e,i=this,n=di.getSelectorFromElement(this);n&&(e=Bt(n)[0]);var r=Bt(e).data(Wt)?"toggle":o({},Bt(e).data(),Bt(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=Bt(e).one(Kt.SHOW,function(t){t.isDefaultPrevented()||s.one(Kt.HIDDEN,function(){Bt(i).is(":visible")&&i.focus()})});ie._jQueryInterface.call(Bt(e),r,this)}),Bt.fn[Ut]=ie._jQueryInterface,Bt.fn[Ut].Constructor=ie,Bt.fn[Ut].noConflict=function(){return Bt.fn[Ut]=Vt,ie._jQueryInterface},ie),yi=(re="tooltip",se="."+(oe="bs.tooltip"),ae=(ne=e).fn[re],le="bs-tooltip",ce=new RegExp("(^|\\s)"+le+"\\S+","g"),ue={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!(de={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(he={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},fe="out",me={HIDE:"hide"+se,HIDDEN:"hidden"+se,SHOW:(pe="show")+se,SHOWN:"shown"+se,INSERTED:"inserted"+se,CLICK:"click"+se,FOCUSIN:"focusin"+se,FOCUSOUT:"focusout"+se,MOUSEENTER:"mouseenter"+se,MOUSELEAVE:"mouseleave"+se},ge="fade",ve="show",ye=".tooltip-inner",".arrow",be="hover",_e="focus","click","manual",xe=function(){function t(t,e){if(void 0===i)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,i=ne(t.currentTarget).data(e);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),ne(t.currentTarget).data(e,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(ne(this.getTipElement()).hasClass(ve))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),ne.removeData(this.element,this.constructor.DATA_KEY),ne(this.element).off(this.constructor.EVENT_KEY),ne(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&ne(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===ne(this.element).css("display"))throw new Error("Please use show on visible elements");var e=ne.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){ne(this.element).trigger(e);var n=ne.contains(this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!n)return;var r=this.getTipElement(),o=di.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&ne(r).addClass(ge);var s="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=!1===this.config.container?document.body:ne(this.config.container);ne(r).data(this.constructor.DATA_KEY,this),ne.contains(this.element.ownerDocument.documentElement,this.tip)||ne(r).appendTo(l),ne(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new i(this.element,r,{placement:a,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){t._handlePopperPlacementChange(e)}}),ne(r).addClass(ve),"ontouchstart"in document.documentElement&&ne(document.body).children().on("mouseover",null,ne.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,ne(t.element).trigger(t.constructor.Event.SHOWN),e===fe&&t._leave(null,t)};if(ne(this.tip).hasClass(ge)){var h=di.getTransitionDurationFromElement(this.tip);ne(this.tip).one(di.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,i=this.getTipElement(),n=ne.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==pe&&i.parentNode&&i.parentNode.removeChild(i),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),ne(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(ne(this.element).trigger(n),!n.isDefaultPrevented()){if(ne(i).removeClass(ve),"ontouchstart"in document.documentElement&&ne(document.body).children().off("mouseover",null,ne.noop),this._activeTrigger.click=!1,this._activeTrigger[_e]=!1,this._activeTrigger[be]=!1,ne(this.tip).hasClass(ge)){var o=di.getTransitionDurationFromElement(i);ne(i).one(di.TRANSITION_END,r).emulateTransitionEnd(o)}else r();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){ne(this.getTipElement()).addClass(le+"-"+t)},e.getTipElement=function(){return this.tip=this.tip||ne(this.config.template)[0],this.tip},e.setContent=function(){var t=ne(this.getTipElement());this.setElementContent(t.find(ye),this.getTitle()),t.removeClass(ge+" "+ve)},e.setElementContent=function(t,e){var i=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?i?ne(e).parent().is(t)||t.empty().append(e):t.text(ne(e).text()):t[i?"html":"text"](e)},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getAttachment=function(t){return de[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)ne(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if("manual"!==e){var i=e===be?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,n=e===be?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;ne(t.element).on(i,t.config.selector,function(e){return t._enter(e)}).on(n,t.config.selector,function(e){return t._leave(e)})}ne(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})}),this.config.selector?this.config=o({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var i=this.constructor.DATA_KEY;(e=e||ne(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),ne(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusin"===t.type?_e:be]=!0),ne(e.getTipElement()).hasClass(ve)||e._hoverState===pe?e._hoverState=pe:(clearTimeout(e._timeout),e._hoverState=pe,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===pe&&e.show()},e.config.delay.show):e.show())},e._leave=function(t,e){var i=this.constructor.DATA_KEY;(e=e||ne(t.currentTarget).data(i))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),ne(t.currentTarget).data(i,e)),t&&(e._activeTrigger["focusout"===t.type?_e:be]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=fe,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===fe&&e.hide()},e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){return"number"==typeof(t=o({},this.constructor.Default,ne(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),di.typeCheckConfig(re,t,this.constructor.DefaultType),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=ne(this.getTipElement()),e=t.attr("class").match(ce);null!==e&&0<e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(ne(t).removeClass(ge),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each(function(){var i=ne(this).data(oe),n="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new t(this,n),ne(this).data(oe,i)),"string"==typeof e)){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}},{key:"Default",get:function(){return ue}},{key:"NAME",get:function(){return re}},{key:"DATA_KEY",get:function(){return oe}},{key:"Event",get:function(){return me}},{key:"EVENT_KEY",get:function(){return se}},{key:"DefaultType",get:function(){return he}}]),t}(),ne.fn[re]=xe._jQueryInterface,ne.fn[re].Constructor=xe,ne.fn[re].noConflict=function(){return ne.fn[re]=ae,xe._jQueryInterface},xe),bi=(ke="popover",Se="."+(Ce="bs.popover"),De=(we=e).fn[ke],Te="bs-popover",Ae=new RegExp("(^|\\s)"+Te+"\\S+","g"),Me=o({},yi.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ee=o({},yi.DefaultType,{content:"(string|element|function)"}),"fade",Pe=".popover-header",Ie=".popover-body",Oe={HIDE:"hide"+Se,HIDDEN:"hidden"+Se,SHOW:"show"+Se,SHOWN:"shown"+Se,INSERTED:"inserted"+Se,CLICK:"click"+Se,FOCUSIN:"focusin"+Se,FOCUSOUT:"focusout"+Se,MOUSEENTER:"mouseenter"+Se,MOUSELEAVE:"mouseleave"+Se},Ne=function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),(e.prototype.constructor=e).__proto__=i;var o=n.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){we(this.getTipElement()).addClass(Te+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||we(this.config.template)[0],this.tip},o.setContent=function(){var t=we(this.getTipElement());this.setElementContent(t.find(Pe),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Ie),e),t.removeClass("fade show")},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=we(this.getTipElement()),e=t.attr("class").match(Ae);null!==e&&0<e.length&&t.removeClass(e.join(""))},n._jQueryInterface=function(t){return this.each(function(){var e=we(this).data(Ce),i="object"==typeof t?t:null;if((e||!/destroy|hide/.test(t))&&(e||(e=new n(this,i),we(this).data(Ce,e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}})},r(n,null,[{key:"VERSION",get:function(){return"4.1.1"}},{key:"Default",get:function(){return Me}},{key:"NAME",get:function(){return ke}},{key:"DATA_KEY",get:function(){return Ce}},{key:"Event",get:function(){return Oe}},{key:"EVENT_KEY",get:function(){return Se}},{key:"DefaultType",get:function(){return Ee}}]),n}(yi),we.fn[ke]=Ne._jQueryInterface,we.fn[ke].Constructor=Ne,we.fn[ke].noConflict=function(){return we.fn[ke]=De,Ne._jQueryInterface},Ne),_i=(je="scrollspy",$e="."+(Fe="bs.scrollspy"),Re=(Le=e).fn[je],He={offset:10,method:"auto",target:""},ze={offset:"number",method:"string",target:"(string|element)"},Be={ACTIVATE:"activate"+$e,SCROLL:"scroll"+$e,LOAD_DATA_API:"load"+$e+".data-api"},Ue="dropdown-item",We="active",Ye={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},"offset",Ve="position",qe=function(){function t(t,e){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+Ye.NAV_LINKS+","+this._config.target+" "+Ye.LIST_ITEMS+","+this._config.target+" "+Ye.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,Le(this._scrollElement).on(Be.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":Ve,i="auto"===this._config.method?e:this._config.method,n=i===Ve?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),Le.makeArray(Le(this._selector)).map(function(t){var e,r=di.getSelectorFromElement(t);if(r&&(e=Le(r)[0]),e){var o=e.getBoundingClientRect();if(o.width||o.height)return[Le(e)[i]().top+n,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},e.dispose=function(){Le.removeData(this._element,Fe),Le(this._scrollElement).off($e),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=o({},He,"object"==typeof t&&t?t:{})).target){var e=Le(t.target).attr("id");e||(e=di.getUID(je),Le(t.target).attr("id",e)),t.target="#"+e}return di.typeCheckConfig(je,t,ze),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),i<=t){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&(void 0===this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",");e=e.map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'});var i=Le(e.join(","));i.hasClass(Ue)?(i.closest(Ye.DROPDOWN).find(Ye.DROPDOWN_TOGGLE).addClass(We),i.addClass(We)):(i.addClass(We),i.parents(Ye.NAV_LIST_GROUP).prev(Ye.NAV_LINKS+", "+Ye.LIST_ITEMS).addClass(We),i.parents(Ye.NAV_LIST_GROUP).prev(Ye.NAV_ITEMS).children(Ye.NAV_LINKS).addClass(We)),Le(this._scrollElement).trigger(Be.ACTIVATE,{relatedTarget:t})},e._clear=function(){Le(this._selector).filter(Ye.ACTIVE).removeClass(We)},t._jQueryInterface=function(e){return this.each(function(){var i=Le(this).data(Fe);if(i||(i=new t(this,"object"==typeof e&&e),Le(this).data(Fe,i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}},{key:"Default",get:function(){return He}}]),t}(),Le(window).on(Be.LOAD_DATA_API,function(){for(var t=Le.makeArray(Le(Ye.DATA_SPY)),e=t.length;e--;){var i=Le(t[e]);qe._jQueryInterface.call(i,i.data())}}),Le.fn[je]=qe._jQueryInterface,Le.fn[je].Constructor=qe,Le.fn[je].noConflict=function(){return Le.fn[je]=Re,qe._jQueryInterface},qe),xi=(Xe="."+(Ke="bs.tab"),Ze=(Ge=e).fn.tab,Qe={HIDE:"hide"+Xe,HIDDEN:"hidden"+Xe,SHOW:"show"+Xe,SHOWN:"shown"+Xe,CLICK_DATA_API:"click"+Xe+".data-api"},Je="dropdown-menu",ti="active",ei="disabled","fade",ii="show",ni=".dropdown",ri=".nav, .list-group",oi=".active",si="> li > .active",ai='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',li=".dropdown-toggle",ci="> .dropdown-menu .active",hi=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&Ge(this._element).hasClass(ti)||Ge(this._element).hasClass(ei))){var e,i,n=Ge(this._element).closest(ri)[0],r=di.getSelectorFromElement(this._element);if(n){var o="UL"===n.nodeName?si:oi;i=(i=Ge.makeArray(Ge(n).find(o)))[i.length-1]}var s=Ge.Event(Qe.HIDE,{relatedTarget:this._element}),a=Ge.Event(Qe.SHOW,{relatedTarget:i});if(i&&Ge(i).trigger(s),Ge(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(e=Ge(r)[0]),this._activate(this._element,n);var l=function(){var e=Ge.Event(Qe.HIDDEN,{relatedTarget:t._element}),n=Ge.Event(Qe.SHOWN,{relatedTarget:i});Ge(i).trigger(e),Ge(t._element).trigger(n)};e?this._activate(e,e.parentNode,l):l()}}},e.dispose=function(){Ge.removeData(this._element,Ke),this._element=null},e._activate=function(t,e,i){var n=this,r=("UL"===e.nodeName?Ge(e).find(si):Ge(e).children(oi))[0],o=i&&r&&Ge(r).hasClass("fade"),s=function(){return n._transitionComplete(t,r,i)};if(r&&o){var a=di.getTransitionDurationFromElement(r);Ge(r).one(di.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},e._transitionComplete=function(t,e,i){if(e){Ge(e).removeClass(ii+" "+ti);var n=Ge(e.parentNode).find(ci)[0];n&&Ge(n).removeClass(ti),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(Ge(t).addClass(ti),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),di.reflow(t),Ge(t).addClass(ii),t.parentNode&&Ge(t.parentNode).hasClass(Je)){var r=Ge(t).closest(ni)[0];r&&Ge(r).find(li).addClass(ti),t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(e){return this.each(function(){var i=Ge(this),n=i.data(Ke);if(n||(n=new t(this),i.data(Ke,n)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},r(t,null,[{key:"VERSION",get:function(){return"4.1.1"}}]),t}(),Ge(document).on(Qe.CLICK_DATA_API,ai,function(t){t.preventDefault(),hi._jQueryInterface.call(Ge(this),"show")}),Ge.fn.tab=hi._jQueryInterface,Ge.fn.tab.Constructor=hi,Ge.fn.tab.noConflict=function(){return Ge.fn.tab=Ze,hi._jQueryInterface},hi);!function(t){if(void 0===t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||4<=e[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=di,t.Alert=ui,t.Button=pi,t.Carousel=fi,t.Collapse=mi,t.Dropdown=gi,t.Modal=vi,t.Popover=bi,t.Scrollspy=_i,t.Tab=xi,t.Tooltip=yi,Object.defineProperty(t,"__esModule",{value:!0})}),function(t){var e=!1;if("function"==typeof define&&define.amd&&(define(t),e=!0),"object"==typeof exports&&(module.exports=t(),e=!0),!e){var i=window.Cookies,n=window.Cookies=t();n.noConflict=function(){return window.Cookies=i,n}}}(function(){function t(){for(var t=0,e={};t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}return function e(i){function n(e,r,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(o=t({path:"/"},n.defaults,o)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(r),/^[\{\[]/.test(s)&&(r=s)}catch(t){}r=i.write?i.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var c in o)o[c]&&(l+="; "+c,!0!==o[c]&&(l+="="+o[c]));return document.cookie=e+"="+r+l}e||(s={});for(var h=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<h.length;u++){var p=h[u].split("="),f=p.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var m=p[0].replace(d,decodeURIComponent);if(f=i.read?i.read(f,m):i(f,m)||f.replace(d,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(t){}if(e===m){s=f;break}e||(s[m]=f)}catch(t){}}return s}}return n.set=n,n.get=function(t){return n.call(n,t)},n.getJSON=function(){return n.apply({json:!0},[].slice.call(arguments))},n.defaults={},n.remove=function(e,i){n(e,"",t(i,{expires:-1}))},n.withConverter=e,n}(function(){})}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";var t,e;function i(){return t.apply(null,arguments)}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t){return void 0===t}function s(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function a(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var i in e)c(e,i)&&(t[i]=e[i]);return c(e,"toString")&&(t.toString=e.toString),c(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,i,n){return Se(t,e,i,n,!0).utc()}function u(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function p(t){if(null==t._isValid){var i=u(t),n=e.call(i.parsedDateParts,function(t){return null!=t}),r=!isNaN(t._d.getTime())&&i.overflow<0&&!i.empty&&!i.invalidMonth&&!i.invalidWeekday&&!i.weekdayMismatch&&!i.nullInput&&!i.invalidFormat&&!i.userInvalidated&&(!i.meridiem||i.meridiem&&n);if(t._strict&&(r=r&&0===i.charsLeftOver&&0===i.unusedTokens.length&&void 0===i.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function f(t){var e=d(NaN);return null!=t?h(u(e),t):u(e).userInvalidated=!0,e}e=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var m=i.momentProperties=[];function g(t,e){var i,n,r;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=u(e)),o(e._locale)||(t._locale=e._locale),0<m.length)for(i=0;i<m.length;i++)o(r=e[n=m[i]])||(t[n]=r);return t}var v=!1;function y(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,i.updateOffset(this),v=!1)}function b(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function _(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function x(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=_(e)),i}function w(t,e,i){var n,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(n=0;n<r;n++)(i&&t[n]!==e[n]||!i&&x(t[n])!==x(e[n]))&&s++;return s+o}function k(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var n=!0;return h(function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,o=[],s=0;s<arguments.length;s++){if(r="","object"==typeof arguments[s]){for(var a in r+="\n["+s+"] ",arguments[0])r+=a+": "+arguments[0][a]+", ";r=r.slice(0,-2)}else r=arguments[s];o.push(r)}k(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)},e)}var S,D={};function T(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),D[t]||(k(e),D[t]=!0)}function A(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function M(t,e){var i,n=h({},t);for(i in e)c(e,i)&&(r(t[i])&&r(e[i])?(n[i]={},h(n[i],t[i]),h(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)c(t,i)&&!c(e,i)&&r(t[i])&&(n[i]=h({},n[i]));return n}function E(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)c(t,e)&&i.push(e);return i};var P={};function I(t,e){var i=t.toLowerCase();P[i]=P[i+"s"]=P[e]=t}function O(t){return"string"==typeof t?P[t]||P[t.toLowerCase()]:void 0}function N(t){var e,i,n={};for(i in t)c(t,i)&&(e=O(i))&&(n[e]=t[i]);return n}var L={};function j(t,e){L[t]=e}function F(t,e,i){var n=""+Math.abs(t),r=e-n.length;return(0<=t?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}var $=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},z={};function B(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(z[t]=r),e&&(z[e[0]]=function(){return F(r.apply(this,arguments),e[1],e[2])}),i&&(z[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function U(t,e){return t.isValid()?(e=W(e,t.localeData()),H[e]=H[e]||function(t){var e,i,n,r=t.match($);for(e=0,i=r.length;e<i;e++)z[r[e]]?r[e]=z[r[e]]:r[e]=(n=r[e]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(e){var n,o="";for(n=0;n<i;n++)o+=A(r[n])?r[n].call(e,t):r[n];return o}}(e),H[e](t)):t.localeData().invalidDate()}function W(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(R.lastIndex=0;0<=i&&R.test(t);)t=t.replace(R,n),R.lastIndex=0,i-=1;return t}var Y=/\d/,V=/\d\d/,q=/\d{3}/,G=/\d{4}/,K=/[+-]?\d{6}/,X=/\d\d?/,Z=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,J=/\d{1,3}/,tt=/\d{1,4}/,et=/[+-]?\d{1,6}/,it=/\d+/,nt=/[+-]?\d+/,rt=/Z|[+-]\d\d:?\d\d/gi,ot=/Z|[+-]\d\d(?::?\d\d)?/gi,st=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,at={};function lt(t,e,i){at[t]=A(e)?e:function(t,n){return t&&i?i:e}}function ct(t,e){return c(at,t)?at[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,r){return e||i||n||r})))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function ut(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),s(e)&&(n=function(t,i){i[e]=x(t)}),i=0;i<t.length;i++)dt[t[i]]=n}function pt(t,e){ut(t,function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)})}var ft=0,mt=1,gt=2,vt=3,yt=4,bt=5,_t=6,xt=7,wt=8;function kt(t){return Ct(t)?366:365}function Ct(t){return t%4==0&&t%100!=0||t%400==0}B("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),I("year","y"),j("year",1),lt("Y",nt),lt("YY",X,V),lt("YYYY",tt,G),lt("YYYYY",et,K),lt("YYYYYY",et,K),ut(["YYYYY","YYYYYY"],ft),ut("YYYY",function(t,e){e[ft]=2===t.length?i.parseTwoDigitYear(t):x(t)}),ut("YY",function(t,e){e[ft]=i.parseTwoDigitYear(t)}),ut("Y",function(t,e){e[ft]=parseInt(t,10)}),i.parseTwoDigitYear=function(t){return x(t)+(68<x(t)?1900:2e3)};var St,Dt=Tt("FullYear",!0);function Tt(t,e){return function(n){return null!=n?(Mt(this,t,n),i.updateOffset(this,e),this):At(this,t)}}function At(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Mt(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&Ct(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Et(i,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function Et(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=(e%12+12)%12;return t+=(e-i)/12,1===i?Ct(t)?29:28:31-i%7%2}St=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),I("month","M"),j("month",8),lt("M",X),lt("MM",X,V),lt("MMM",function(t,e){return e.monthsShortRegex(t)}),lt("MMMM",function(t,e){return e.monthsRegex(t)}),ut(["M","MM"],function(t,e){e[mt]=x(t)-1}),ut(["MMM","MMMM"],function(t,e,i,n){var r=i._locale.monthsParse(t,n,i._strict);null!=r?e[mt]=r:u(i).invalidMonth=t});var Pt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,It="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ot="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Nt(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=x(e);else if(!s(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),Et(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Lt(t){return null!=t?(Nt(this,t),i.updateOffset(this,!0),this):At(this,"Month")}var jt=st,Ft=st;function $t(){function t(t,e){return e.length-t.length}var e,i,n=[],r=[],o=[];for(e=0;e<12;e++)i=d([2e3,e]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(n.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)n[e]=ht(n[e]),r[e]=ht(r[e]);for(e=0;e<24;e++)o[e]=ht(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Rt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&0<=t&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Ht(t,e,i){var n=7+e-i;return-(7+Rt(t,0,n).getUTCDay()-e)%7+n-1}function zt(t,e,i,n,r){var o,s,a=1+7*(e-1)+(7+i-n)%7+Ht(t,n,r);return a<=0?s=kt(o=t-1)+a:a>kt(t)?(o=t+1,s=a-kt(t)):(o=t,s=a),{year:o,dayOfYear:s}}function Bt(t,e,i){var n,r,o=Ht(t.year(),e,i),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?n=s+Ut(r=t.year()-1,e,i):s>Ut(t.year(),e,i)?(n=s-Ut(t.year(),e,i),r=t.year()+1):(r=t.year(),n=s),{week:n,year:r}}function Ut(t,e,i){var n=Ht(t,e,i),r=Ht(t+1,e,i);return(kt(t)-n+r)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),j("week",5),j("isoWeek",5),lt("w",X),lt("ww",X,V),lt("W",X),lt("WW",X,V),pt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=x(t)}),B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),lt("d",X),lt("e",X),lt("E",X),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),pt(["dd","ddd","dddd"],function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:u(i).invalidWeekday=t}),pt(["d","e","E"],function(t,e,i,n){e[n]=x(t)});var Wt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Vt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qt=st,Gt=st,Kt=st;function Xt(){function t(t,e){return e.length-t.length}var e,i,n,r,o,s=[],a=[],l=[],c=[];for(e=0;e<7;e++)i=d([2e3,1]).day(e),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),o=this.weekdays(i,""),s.push(n),a.push(r),l.push(o),c.push(n),c.push(r),c.push(o);for(s.sort(t),a.sort(t),l.sort(t),c.sort(t),e=0;e<7;e++)a[e]=ht(a[e]),l[e]=ht(l[e]),c[e]=ht(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Zt(){return this.hours()%12||12}function Qt(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Jt(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Zt),B("k",["kk",2],0,function(){return this.hours()||24}),B("hmm",0,0,function(){return""+Zt.apply(this)+F(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Zt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),Qt("a",!0),Qt("A",!1),I("hour","h"),j("hour",13),lt("a",Jt),lt("A",Jt),lt("H",X),lt("h",X),lt("k",X),lt("HH",X,V),lt("hh",X,V),lt("kk",X,V),lt("hmm",Z),lt("hmmss",Q),lt("Hmm",Z),lt("Hmmss",Q),ut(["H","HH"],vt),ut(["k","kk"],function(t,e,i){var n=x(t);e[vt]=24===n?0:n}),ut(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),ut(["h","hh"],function(t,e,i){e[vt]=x(t),u(i).bigHour=!0}),ut("hmm",function(t,e,i){var n=t.length-2;e[vt]=x(t.substr(0,n)),e[yt]=x(t.substr(n)),u(i).bigHour=!0}),ut("hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[vt]=x(t.substr(0,n)),e[yt]=x(t.substr(n,2)),e[bt]=x(t.substr(r)),u(i).bigHour=!0}),ut("Hmm",function(t,e,i){var n=t.length-2;e[vt]=x(t.substr(0,n)),e[yt]=x(t.substr(n))}),ut("Hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[vt]=x(t.substr(0,n)),e[yt]=x(t.substr(n,2)),e[bt]=x(t.substr(r))});var te,ee=Tt("Hours",!0),ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:It,monthsShort:Ot,week:{dow:0,doy:6},weekdays:Wt,weekdaysMin:Vt,weekdaysShort:Yt,meridiemParse:/[ap]\.?m?\.?/i},ne={},re={};function oe(t){return t?t.toLowerCase().replace("_","-"):t}function se(t){var e=null;if(!ne[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=te._abbr,require("./locale/"+t),ae(e)}catch(t){}return ne[t]}function ae(t,e){var i;return t&&((i=o(e)?ce(t):le(t,e))?te=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),te._abbr}function le(t,e){if(null!==e){var i,n=ie;if(e.abbr=t,null!=ne[t])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ne[t]._config;else if(null!=e.parentLocale)if(null!=ne[e.parentLocale])n=ne[e.parentLocale]._config;else{if(null==(i=se(e.parentLocale)))return re[e.parentLocale]||(re[e.parentLocale]=[]),re[e.parentLocale].push({name:t,config:e}),null;n=i._config}return ne[t]=new E(M(n,e)),re[t]&&re[t].forEach(function(t){le(t.name,t.config)}),ae(t),ne[t]}return delete ne[t],null}function ce(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return te;if(!n(t)){if(e=se(t))return e;t=[t]}return function(t){for(var e,i,n,r,o=0;o<t.length;){for(e=(r=oe(t[o]).split("-")).length,i=(i=oe(t[o+1]))?i.split("-"):null;0<e;){if(n=se(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&w(r,i,!0)>=e-1)break;e--}o++}return te}(t)}function he(t){var e,i=t._a;return i&&-2===u(t).overflow&&(e=i[mt]<0||11<i[mt]?mt:i[gt]<1||i[gt]>Et(i[ft],i[mt])?gt:i[vt]<0||24<i[vt]||24===i[vt]&&(0!==i[yt]||0!==i[bt]||0!==i[_t])?vt:i[yt]<0||59<i[yt]?yt:i[bt]<0||59<i[bt]?bt:i[_t]<0||999<i[_t]?_t:-1,u(t)._overflowDayOfYear&&(e<ft||gt<e)&&(e=gt),u(t)._overflowWeeks&&-1===e&&(e=xt),u(t)._overflowWeekday&&-1===e&&(e=wt),u(t).overflow=e),t}function de(t,e,i){return null!=t?t:null!=e?e:i}function ue(t){var e,n,r,o,s,a=[];if(!t._d){var l,c;for(l=t,c=new Date(i.now()),r=l._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()],t._w&&null==t._a[gt]&&null==t._a[mt]&&function(t){var e,i,n,r,o,s,a,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,s=4,i=de(e.GG,t._a[ft],Bt(De(),1,4).year),n=de(e.W,1),((r=de(e.E,1))<1||7<r)&&(l=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var c=Bt(De(),o,s);i=de(e.gg,t._a[ft],c.year),n=de(e.w,c.week),null!=e.d?((r=e.d)<0||6<r)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||6<e.e)&&(l=!0)):r=o}n<1||n>Ut(i,o,s)?u(t)._overflowWeeks=!0:null!=l?u(t)._overflowWeekday=!0:(a=zt(i,n,r,o,s),t._a[ft]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=de(t._a[ft],r[ft]),(t._dayOfYear>kt(s)||0===t._dayOfYear)&&(u(t)._overflowDayOfYear=!0),n=Rt(s,0,t._dayOfYear),t._a[mt]=n.getUTCMonth(),t._a[gt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[yt]&&0===t._a[bt]&&0===t._a[_t]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?Rt:function(t,e,i,n,r,o,s){var a=new Date(t,e,i,n,r,o,s);return t<100&&0<=t&&isFinite(a.getFullYear())&&a.setFullYear(t),a}).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(u(t).weekdayMismatch=!0)}}var pe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,ge=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ye=/^\/?Date\((\-?\d+)/i;function be(t){var e,i,n,r,o,s,a=t._i,l=pe.exec(a)||fe.exec(a);if(l){for(u(t).iso=!0,e=0,i=ge.length;e<i;e++)if(ge[e][1].exec(l[1])){r=ge[e][0],n=!1!==ge[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=ve.length;e<i;e++)if(ve[e][1].exec(l[3])){o=(l[2]||" ")+ve[e][0];break}if(null==o)return void(t._isValid=!1)}if(!n&&null!=o)return void(t._isValid=!1);if(l[4]){if(!me.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),ke(t)}else t._isValid=!1}var _e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;var xe={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function we(t){var e,i,n,r=_e.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(r){var o=function(t,e,i,n,r,o){var s=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ot.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(r,10)];return o&&s.push(parseInt(o,10)),s}(r[4],r[3],r[2],r[5],r[6],r[7]);if(i=o,n=t,(e=r[1])&&Yt.indexOf(e)!==new Date(i[0],i[1],i[2]).getDay()&&(u(n).weekdayMismatch=!0,!(n._isValid=!1)))return;t._a=o,t._tzm=function(t,e,i){if(t)return xe[t];if(e)return 0;var n=parseInt(i,10),r=n%100;return(n-r)/100*60+r}(r[8],r[9],r[10]),t._d=Rt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),u(t).rfc2822=!0}else t._isValid=!1}function ke(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],u(t).empty=!0;var e,n,r,o,s,a,l,h,d=""+t._i,p=d.length,f=0;for(r=W(t._f,t._locale).match($)||[],e=0;e<r.length;e++)o=r[e],(n=(d.match(ct(o,t))||[])[0])&&(0<(s=d.substr(0,d.indexOf(n))).length&&u(t).unusedInput.push(s),d=d.slice(d.indexOf(n)+n.length),f+=n.length),z[o]?(n?u(t).empty=!1:u(t).unusedTokens.push(o),a=o,h=t,null!=(l=n)&&c(dt,a)&&dt[a](l,h._a,h,a)):t._strict&&!n&&u(t).unusedTokens.push(o);u(t).charsLeftOver=p-f,0<d.length&&u(t).unusedInput.push(d),t._a[vt]<=12&&!0===u(t).bigHour&&0<t._a[vt]&&(u(t).bigHour=void 0),u(t).parsedDateParts=t._a.slice(0),u(t).meridiem=t._meridiem,t._a[vt]=function(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):(null!=t.isPM&&((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0)),e)}(t._locale,t._a[vt],t._meridiem),ue(t),he(t)}else we(t);else be(t)}function Ce(t){var e,c,d,m,v=t._i,_=t._f;return t._locale=t._locale||ce(t._l),null===v||void 0===_&&""===v?f({nullInput:!0}):("string"==typeof v&&(t._i=v=t._locale.preparse(v)),b(v)?new y(he(v)):(a(v)?t._d=v:n(_)?function(t){var e,i,n,r,o;if(0===t._f.length)return u(t).invalidFormat=!0,t._d=new Date(NaN);for(r=0;r<t._f.length;r++)o=0,e=g({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],ke(e),p(e)&&(o+=u(e).charsLeftOver,o+=10*u(e).unusedTokens.length,u(e).score=o,(null==n||o<n)&&(n=o,i=e));h(t,i||e)}(t):_?ke(t):o(c=(e=t)._i)?e._d=new Date(i.now()):a(c)?e._d=new Date(c.valueOf()):"string"==typeof c?(d=e,null===(m=ye.exec(d._i))?(be(d),!1===d._isValid&&(delete d._isValid,we(d),!1===d._isValid&&(delete d._isValid,i.createFromInputFallback(d)))):d._d=new Date(+m[1])):n(c)?(e._a=l(c.slice(0),function(t){return parseInt(t,10)}),ue(e)):r(c)?function(t){if(!t._d){var e=N(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ue(t)}}(e):s(c)?e._d=new Date(c):i.createFromInputFallback(e),p(t)||(t._d=null),t))}function Se(t,e,i,o,s){var a,l={};return!0!==i&&!1!==i||(o=i,i=void 0),(r(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||n(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=s,l._l=i,l._i=t,l._f=e,l._strict=o,(a=new y(he(Ce(l))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function De(t,e,i,n){return Se(t,e,i,n,!1)}i.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){};var Te=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=De.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:f()}),Ae=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=De.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:f()});function Me(t,e){var i,r;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return De();for(i=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](i)||(i=e[r]);return i}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pe(t){var e=N(t),i=e.year||0,n=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,l=e.minute||0,c=e.second||0,h=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===St.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var i=!1,n=0;n<Ee.length;++n)if(t[Ee[n]]){if(i)return!1;parseFloat(t[Ee[n]])!==x(t[Ee[n]])&&(i=!0)}return!0}(e),this._milliseconds=+h+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*n+12*i,this._data={},this._locale=ce(),this._bubble()}function Ie(t){return t instanceof Pe}function Oe(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ne(t,e){B(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+F(~~(t/60),2)+e+F(~~t%60,2)})}Ne("Z",":"),Ne("ZZ",""),lt("Z",ot),lt("ZZ",ot),ut(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=je(ot,t)});var Le=/([\+\-]|\d\d)/gi;function je(t,e){var i=(e||"").match(t);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Le)||["-",0,0],r=60*n[1]+x(n[2]);return 0===r?0:"+"===n[0]?r:-r}function Fe(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(b(t)||a(t)?t.valueOf():De(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):De(t).local()}function $e(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Re(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var He=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,ze=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Be(t,e){var i,n,r,o=t,a=null;return Ie(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:s(t)?(o={},e?o[e]=t:o.milliseconds=t):(a=He.exec(t))?(i="-"===a[1]?-1:1,o={y:0,d:x(a[gt])*i,h:x(a[vt])*i,m:x(a[yt])*i,s:x(a[bt])*i,ms:x(Oe(1e3*a[_t]))*i}):(a=ze.exec(t))?(i="-"===a[1]?-1:(a[1],1),o={y:Ue(a[2],i),M:Ue(a[3],i),w:Ue(a[4],i),d:Ue(a[5],i),h:Ue(a[6],i),m:Ue(a[7],i),s:Ue(a[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=function(t,e){var i;return t.isValid()&&e.isValid()?(e=Fe(e,t),t.isBefore(e)?i=We(t,e):((i=We(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}(De(o.from),De(o.to)),(o={}).ms=r.milliseconds,o.M=r.months),n=new Pe(o),Ie(t)&&c(t,"_locale")&&(n._locale=t._locale),n}function Ue(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function We(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ye(t,e){return function(i,n){var r;return null===n||isNaN(+n)||(T(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=n,n=r),Ve(this,Be(i="string"==typeof i?+i:i,n),t),this}}function Ve(t,e,n,r){var o=e._milliseconds,s=Oe(e._days),a=Oe(e._months);t.isValid()&&(r=null==r||r,a&&Nt(t,At(t,"Month")+a*n),s&&Mt(t,"Date",At(t,"Date")+s*n),o&&t._d.setTime(t._d.valueOf()+o*n),r&&i.updateOffset(t,s||a))}Be.fn=Pe.prototype,Be.invalid=function(){return Be(NaN)};var qe=Ye(1,"add"),Ge=Ye(-1,"subtract");function Ke(t,e){var i=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(i,"months");return-(i+(e-n<0?(e-n)/(n-t.clone().add(i-1,"months")):(e-n)/(t.clone().add(i+1,"months")-n)))||0}function Xe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ce(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ze=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function Qe(){return this._locale}function Je(t,e){B(0,[t,t.length],0,e)}function ti(t,e,i,n,r){var o;return null==t?Bt(this,n,r).year:((o=Ut(t,n,r))<e&&(e=o),function(t,e,i,n,r){var o=zt(t,e,i,n,r),s=Rt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}.call(this,t,e,i,n,r))}B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Je("gggg","weekYear"),Je("ggggg","weekYear"),Je("GGGG","isoWeekYear"),Je("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),lt("G",nt),lt("g",nt),lt("GG",X,V),lt("gg",X,V),lt("GGGG",tt,G),lt("gggg",tt,G),lt("GGGGG",et,K),lt("ggggg",et,K),pt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=x(t)}),pt(["gg","GG"],function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)}),B("Q",0,"Qo","quarter"),I("quarter","Q"),j("quarter",7),lt("Q",Y),ut("Q",function(t,e){e[mt]=3*(x(t)-1)}),B("D",["DD",2],"Do","date"),I("date","D"),j("date",9),lt("D",X),lt("DD",X,V),lt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ut(["D","DD"],gt),ut("Do",function(t,e){e[gt]=x(t.match(X)[0])});var ei=Tt("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),j("dayOfYear",4),lt("DDD",J),lt("DDDD",q),ut(["DDD","DDDD"],function(t,e,i){i._dayOfYear=x(t)}),B("m",["mm",2],0,"minute"),I("minute","m"),j("minute",14),lt("m",X),lt("mm",X,V),ut(["m","mm"],yt);var ii=Tt("Minutes",!1);B("s",["ss",2],0,"second"),I("second","s"),j("second",15),lt("s",X),lt("ss",X,V),ut(["s","ss"],bt);var ni,ri=Tt("Seconds",!1);for(B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),j("millisecond",16),lt("S",J,Y),lt("SS",J,V),lt("SSS",J,q),ni="SSSS";ni.length<=9;ni+="S")lt(ni,it);function oi(t,e){e[_t]=x(1e3*("0."+t))}for(ni="S";ni.length<=9;ni+="S")ut(ni,oi);var si=Tt("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var ai=y.prototype;function li(t){return t}ai.add=qe,ai.calendar=function(t,e){var n=t||De(),r=Fe(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",s=e&&(A(e[o])?e[o].call(this,n):e[o]);return this.format(s||this.localeData().calendar(o,this,De(n)))},ai.clone=function(){return new y(this)},ai.diff=function(t,e,i){var n,r,o;if(!this.isValid())return NaN;if(!(n=Fe(t,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),e=O(e)){case"year":o=Ke(this,n)/12;break;case"month":o=Ke(this,n);break;case"quarter":o=Ke(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-r)/864e5;break;case"week":o=(this-n-r)/6048e5;break;default:o=this-n}return i?o:_(o)},ai.endOf=function(t){return void 0===(t=O(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},ai.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=U(this,t);return this.localeData().postformat(e)},ai.from=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||De(t).isValid())?Be({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ai.fromNow=function(t){return this.from(De(),t)},ai.to=function(t,e){return this.isValid()&&(b(t)&&t.isValid()||De(t).isValid())?Be({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ai.toNow=function(t){return this.to(De(),t)},ai.get=function(t){return A(this[t=O(t)])?this[t]():this},ai.invalidAt=function(){return u(this).overflow},ai.isAfter=function(t,e){var i=b(t)?t:De(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=O(o(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},ai.isBefore=function(t,e){var i=b(t)?t:De(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=O(o(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},ai.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},ai.isSame=function(t,e){var i,n=b(t)?t:De(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=O(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},ai.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},ai.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},ai.isValid=function(){return p(this)},ai.lang=Ze,ai.locale=Xe,ai.localeData=Qe,ai.max=Ae,ai.min=Te,ai.parsingFlags=function(){return h({},u(this))},ai.set=function(t,e){if("object"==typeof t)for(var i=function(t){var e=[];for(var i in t)e.push({unit:i,priority:L[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=N(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(A(this[t=O(t)]))return this[t](e);return this},ai.startOf=function(t){switch(t=O(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},ai.subtract=Ge,ai.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},ai.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},ai.toDate=function(){return new Date(this.valueOf())},ai.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||9999<i.year()?U(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(i,"Z")):U(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ai.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+r)},ai.toJSON=function(){return this.isValid()?this.toISOString():null},ai.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ai.unix=function(){return Math.floor(this.valueOf()/1e3)},ai.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ai.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ai.year=Dt,ai.isLeapYear=function(){return Ct(this.year())},ai.weekYear=function(t){return ti.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ai.isoWeekYear=function(t){return ti.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},ai.quarter=ai.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},ai.month=Lt,ai.daysInMonth=function(){return Et(this.year(),this.month())},ai.week=ai.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},ai.isoWeek=ai.isoWeeks=function(t){var e=Bt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},ai.weeksInYear=function(){var t=this.localeData()._week;return Ut(this.year(),t.dow,t.doy)},ai.isoWeeksInYear=function(){return Ut(this.year(),1,4)},ai.date=ei,ai.day=ai.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,i,n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,i=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=i.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-n,"d")):n},ai.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},ai.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=(i=t,n=this.localeData(),"string"==typeof i?n.weekdaysParse(i)%7||7:isNaN(i)?null:i);return this.day(this.day()%7?e:e-7)}return this.day()||7;var i,n},ai.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},ai.hour=ai.hours=ee,ai.minute=ai.minutes=ii,ai.second=ai.seconds=ri,ai.millisecond=ai.milliseconds=si,ai.utcOffset=function(t,e,n){var r,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=je(ot,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=$e(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==t&&(!e||this._changeInProgress?Ve(this,Be(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:$e(this)},ai.utc=function(t){return this.utcOffset(0,t)},ai.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract($e(this),"m")),this},ai.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=je(rt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},ai.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?De(t).utcOffset():0,(this.utcOffset()-t)%60==0)},ai.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ai.isLocal=function(){return!!this.isValid()&&!this._isUTC},ai.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ai.isUtc=Re,ai.isUTC=Re,ai.zoneAbbr=function(){return this._isUTC?"UTC":""},ai.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ai.dates=C("dates accessor is deprecated. Use date instead.",ei),ai.months=C("months accessor is deprecated. Use month instead",Lt),ai.years=C("years accessor is deprecated. Use year instead",Dt),ai.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),ai.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),(t=Ce(t))._a){var e=t._isUTC?d(t._a):De(t._a);this._isDSTShifted=this.isValid()&&0<w(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var ci=E.prototype;function hi(t,e,i,n){var r=ce(),o=d().set(n,e);return r[i](o,t)}function di(t,e,i){if(s(t)&&(e=t,t=void 0),t=t||"",null!=e)return hi(t,e,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=hi(t,n,i,"month");return r}function ui(t,e,i,n){"boolean"==typeof t?s(e)&&(i=e,e=void 0):(e=t,t=!1,s(i=e)&&(i=e,e=void 0)),e=e||"";var r,o=ce(),a=t?o._week.dow:0;if(null!=i)return hi(e,(i+a)%7,n,"day");var l=[];for(r=0;r<7;r++)l[r]=hi(e,(r+a)%7,n,"day");return l}ci.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return A(n)?n.call(e,i):n},ci.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},ci.invalidDate=function(){return this._invalidDate},ci.ordinal=function(t){return this._ordinal.replace("%d",t)},ci.preparse=li,ci.postformat=li,ci.relativeTime=function(t,e,i,n){var r=this._relativeTime[i];return A(r)?r(t,e,i,n):r.replace(/%d/i,t)},ci.pastFuture=function(t,e){var i=this._relativeTime[0<t?"future":"past"];return A(i)?i(e):i.replace(/%s/i,e)},ci.set=function(t){var e,i;for(i in t)A(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ci.months=function(t,e){return t?n(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Pt).test(e)?"format":"standalone"][t.month()]:n(this._months)?this._months:this._months.standalone},ci.monthsShort=function(t,e){return t?n(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Pt.test(e)?"format":"standalone"][t.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ci.monthsParse=function(t,e,i){var n,r,o;if(this._monthsParseExact)return function(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=d([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=St.call(this._shortMonthsParse,s))?r:null:-1!==(r=St.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=St.call(this._shortMonthsParse,s))?r:-1!==(r=St.call(this._longMonthsParse,s))?r:null:-1!==(r=St.call(this._longMonthsParse,s))?r:-1!==(r=St.call(this._shortMonthsParse,s))?r:null}.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=d([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},ci.monthsRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||$t.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=Ft),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},ci.monthsShortRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||$t.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=jt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},ci.week=function(t){return Bt(t,this._week.dow,this._week.doy).week},ci.firstDayOfYear=function(){return this._week.doy},ci.firstDayOfWeek=function(){return this._week.dow},ci.weekdays=function(t,e){return t?n(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone},ci.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},ci.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},ci.weekdaysParse=function(t,e,i){var n,r,o;if(this._weekdaysParseExact)return function(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=d([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=St.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=St.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=St.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=St.call(this._weekdaysParse,s))?r:-1!==(r=St.call(this._shortWeekdaysParse,s))?r:-1!==(r=St.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=St.call(this._shortWeekdaysParse,s))?r:-1!==(r=St.call(this._weekdaysParse,s))?r:-1!==(r=St.call(this._minWeekdaysParse,s))?r:null:-1!==(r=St.call(this._minWeekdaysParse,s))?r:-1!==(r=St.call(this._weekdaysParse,s))?r:-1!==(r=St.call(this._shortWeekdaysParse,s))?r:null}.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=d([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},ci.weekdaysRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=qt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},ci.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Gt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ci.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Xt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Kt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ci.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},ci.meridiem=function(t,e,i){return 11<t?i?"pm":"PM":i?"am":"AM"},ae("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===x(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=C("moment.lang is deprecated. Use moment.locale instead.",ae),i.langData=C("moment.langData is deprecated. Use moment.localeData instead.",ce);var pi=Math.abs;function fi(t,e,i,n){var r=Be(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function mi(t){return t<0?Math.floor(t):Math.ceil(t)}function gi(t){return 4800*t/146097}function vi(t){return 146097*t/4800}function yi(t){return function(){return this.as(t)}}var bi=yi("ms"),_i=yi("s"),xi=yi("m"),wi=yi("h"),ki=yi("d"),Ci=yi("w"),Si=yi("M"),Di=yi("y");function Ti(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ai=Ti("milliseconds"),Mi=Ti("seconds"),Ei=Ti("minutes"),Pi=Ti("hours"),Ii=Ti("days"),Oi=Ti("months"),Ni=Ti("years"),Li=Math.round,ji={ss:44,s:45,m:45,h:22,d:26,M:11},Fi=Math.abs;function $i(t){return(0<t)-(t<0)||+t}function Ri(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i=Fi(this._milliseconds)/1e3,n=Fi(this._days),r=Fi(this._months);e=_((t=_(i/60))/60),i%=60,t%=60;var o=_(r/12),s=r%=12,a=n,l=e,c=t,h=i?i.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var u=d<0?"-":"",p=$i(this._months)!==$i(d)?"-":"",f=$i(this._days)!==$i(d)?"-":"",m=$i(this._milliseconds)!==$i(d)?"-":"";return u+"P"+(o?p+o+"Y":"")+(s?p+s+"M":"")+(a?f+a+"D":"")+(l||c||h?"T":"")+(l?m+l+"H":"")+(c?m+c+"M":"")+(h?m+h+"S":"")}var Hi=Pe.prototype;return Hi.isValid=function(){return this._isValid},Hi.abs=function(){var t=this._data;return this._milliseconds=pi(this._milliseconds),this._days=pi(this._days),this._months=pi(this._months),t.milliseconds=pi(t.milliseconds),t.seconds=pi(t.seconds),t.minutes=pi(t.minutes),t.hours=pi(t.hours),t.months=pi(t.months),t.years=pi(t.years),this},Hi.add=function(t,e){return fi(this,t,e,1)},Hi.subtract=function(t,e){return fi(this,t,e,-1)},Hi.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=O(t))||"year"===t)return e=this._days+n/864e5,i=this._months+gi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(vi(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},Hi.asMilliseconds=bi,Hi.asSeconds=_i,Hi.asMinutes=xi,Hi.asHours=wi,Hi.asDays=ki,Hi.asWeeks=Ci,Hi.asMonths=Si,Hi.asYears=Di,Hi.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},Hi._bubble=function(){var t,e,i,n,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return 0<=o&&0<=s&&0<=a||o<=0&&s<=0&&a<=0||(o+=864e5*mi(vi(a)+s),a=s=0),l.milliseconds=o%1e3,t=_(o/1e3),l.seconds=t%60,e=_(t/60),l.minutes=e%60,i=_(e/60),l.hours=i%24,a+=r=_(gi(s+=_(i/24))),s-=mi(vi(r)),n=_(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},Hi.clone=function(){return Be(this)},Hi.get=function(t){return t=O(t),this.isValid()?this[t+"s"]():NaN},Hi.milliseconds=Ai,Hi.seconds=Mi,Hi.minutes=Ei,Hi.hours=Pi,Hi.days=Ii,Hi.weeks=function(){return _(this.days()/7)},Hi.months=Oi,Hi.years=Ni,Hi.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,i,n,r,o,s,a,l,c,h,d=this.localeData(),u=(e=!t,i=d,n=Be(this).abs(),r=Li(n.as("s")),o=Li(n.as("m")),s=Li(n.as("h")),a=Li(n.as("d")),l=Li(n.as("M")),c=Li(n.as("y")),(h=r<=ji.ss&&["s",r]||r<ji.s&&["ss",r]||o<=1&&["m"]||o<ji.m&&["mm",o]||s<=1&&["h"]||s<ji.h&&["hh",s]||a<=1&&["d"]||a<ji.d&&["dd",a]||l<=1&&["M"]||l<ji.M&&["MM",l]||c<=1&&["y"]||["yy",c])[2]=e,h[3]=0<+this,h[4]=i,function(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}.apply(null,h));return t&&(u=d.pastFuture(+this,u)),d.postformat(u)},Hi.toISOString=Ri,Hi.toString=Ri,Hi.toJSON=Ri,Hi.locale=Xe,Hi.localeData=Qe,Hi.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ri),Hi.lang=Ze,B("X",0,0,"unix"),B("x",0,0,"valueOf"),lt("x",nt),lt("X",/[+-]?\d+(\.\d{1,3})?/),ut("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),ut("x",function(t,e,i){i._d=new Date(x(t))}),i.version="2.22.1",t=De,i.fn=ai,i.min=function(){return Me("isBefore",[].slice.call(arguments,0))},i.max=function(){return Me("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return De(1e3*t)},i.months=function(t,e){return di(t,e,"months")},i.isDate=a,i.locale=ae,i.invalid=f,i.duration=Be,i.isMoment=b,i.weekdays=function(t,e,i){return ui(t,e,i,"weekdays")},i.parseZone=function(){return De.apply(null,arguments).parseZone()},i.localeData=ce,i.isDuration=Ie,i.monthsShort=function(t,e){return di(t,e,"monthsShort")},i.weekdaysMin=function(t,e,i){return ui(t,e,i,"weekdaysMin")},i.defineLocale=le,i.updateLocale=function(t,e){if(null!=e){var i,n,r=ie;null!=(n=se(t))&&(r=n._config),(i=new E(e=M(r,e))).parentLocale=ne[t],ne[t]=i,ae(t)}else null!=ne[t]&&(null!=ne[t].parentLocale?ne[t]=ne[t].parentLocale:null!=ne[t]&&delete ne[t]);return ne[t]},i.locales=function(){return S(ne)},i.weekdaysShort=function(t,e,i){return ui(t,e,i,"weekdaysShort")},i.normalizeUnits=O,i.relativeTimeRounding=function(t){return void 0===t?Li:"function"==typeof t&&(Li=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==ji[t]&&(void 0===e?ji[t]:(ji[t]=e,"s"===t&&(ji.ss=e-1),!0))},i.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},i.prototype=ai,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},i}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],e):t.Tooltip=e(t.Popper)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var i,n=0;n<e.length;n++)(i=e[n]).enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),n=Object.assign||function(t){for(var e,i=1;i<arguments.length;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r={container:!1,delay:0,html:!1,placement:"top",title:"",template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",offset:0},o=function(){function o(t,i){e(this,o),s.call(this),i=n({},r,i),t.jquery&&(t=t[0]),this.reference=t,this.options=i;var a="string"==typeof i.trigger?i.trigger.split(" ").filter(function(t){return-1!==["click","hover","focus"].indexOf(t)}):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(t,a,i)}return i(o,[{key:"_create",value:function(t,e,i,n){var r=window.document.createElement("div");r.innerHTML=e.trim();var o=r.childNodes[0];o.id="tooltip_"+Math.random().toString(36).substr(2,10),o.setAttribute("aria-hidden","false");var s=r.querySelector(this.innerSelector);return this._addTitleContent(t,i,n,s),o}},{key:"_addTitleContent",value:function(t,e,i,n){if(1===e.nodeType||11===e.nodeType)i&&n.appendChild(e);else if(function(t){return t&&"[object Function]"==={}.toString.call(t)}(e)){var r=e.call(t);i?n.innerHTML=r:n.textContent=r}else i?n.innerHTML=e:n.textContent=e}},{key:"_show",value:function(e,i){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.display="",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(),this;var r=e.getAttribute("title")||i.title;if(!r)return this;var o=this._create(e,i.template,r,i.html);e.setAttribute("aria-describedby",o.id);var s=this._findContainer(i.container,e);return this._append(o,s),this._popperOptions=n({},i.popperOptions,{placement:i.placement}),this._popperOptions.modifiers=n({},this._popperOptions.modifiers,{arrow:{element:this.arrowSelector},offset:{offset:i.offset}}),i.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:i.boundariesElement}),this.popperInstance=new t(e,o,this._popperOptions),this._tooltipNode=o,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.display="none",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var t=this;return this._events.forEach(function(e){var i=e.func,n=e.event;t.reference.removeEventListener(n,i)}),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),!this.popperInstance.options.removeOnDestroy&&(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(t,e){return"string"==typeof t?t=window.document.querySelector(t):!1===t&&(t=e.parentNode),t}},{key:"_append",value:function(t,e){e.appendChild(t)}},{key:"_setEventListeners",value:function(t,e,i){var n=this,r=[],o=[];e.forEach(function(t){"hover"===t?(r.push("mouseenter"),o.push("mouseleave")):"focus"===t?(r.push("focus"),o.push("blur")):"click"===t&&(r.push("click"),o.push("click"))}),r.forEach(function(e){var r=function(e){!0===n._isOpening||(e.usedByTooltip=!0,n._scheduleShow(t,i.delay,i,e))};n._events.push({event:e,func:r}),t.addEventListener(e,r)}),o.forEach(function(e){var r=function(e){!0===e.usedByTooltip||n._scheduleHide(t,i.delay,i,e)};n._events.push({event:e,func:r}),t.addEventListener(e,r)})}},{key:"_scheduleShow",value:function(t,e,i){var n=this;this._isOpening=!0;var r=e&&e.show||e||0;this._showTimeout=window.setTimeout(function(){return n._show(t,i)},r)}},{key:"_scheduleHide",value:function(t,e,i,n){var r=this;this._isOpening=!1;var o=e&&e.hide||e||0;window.setTimeout(function(){if(window.clearTimeout(r._showTimeout),!1!==r._isOpen&&document.body.contains(r._tooltipNode)){if("mouseleave"===n.type)if(r._setTooltipNodeEvent(n,t,e,i))return;r._hide(t,i)}},o)}},{key:"_updateTitleContent",value:function(t){if(void 0!==this._tooltipNode){var e=this._tooltipNode.parentNode.querySelector(this.innerSelector);this._clearTitleContent(e,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,t,this.options.html,e),this.options.title=t,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=t)}},{key:"_clearTitleContent",value:function(t,e,i){1===i.nodeType||11===i.nodeType?e&&t.removeChild(i):e?t.innerHTML="":t.textContent=""}}]),o}(),s=function(){var t=this;this.show=function(){return t._show(t.reference,t.options)},this.hide=function(){return t._hide()},this.dispose=function(){return t._dispose()},this.toggle=function(){return t._isOpen?t.hide():t.show()},this.updateTitleContent=function(e){return t._updateTitleContent(e)},this.arrowSelector=".tooltip-arrow, .tooltip__arrow",this.innerSelector=".tooltip-inner, .tooltip__inner",this._events=[],this._setTooltipNodeEvent=function(e,i,n,r){var o=e.relatedreference||e.toElement||e.relatedTarget;return!!t._tooltipNode.contains(o)&&(t._tooltipNode.addEventListener(e.type,function n(o){var s=o.relatedreference||o.toElement||o.relatedTarget;t._tooltipNode.removeEventListener(e.type,n),i.contains(s)||t._scheduleHide(i,r.delay,r,o)}),!0)}};return o}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PerfectScrollbar=e()}(this,function(){"use strict";function t(t){return getComputedStyle(t)}function e(t,e){for(var i in e){var n=e[i];"number"==typeof n&&(n+="px"),t.style[i]=n}return t}function i(t){var e=document.createElement("div");return e.className=t,e}var n="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function r(t,e){if(!n)throw new Error("No element matching method supported");return n.call(t,e)}function o(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function s(t,e){return Array.prototype.filter.call(t.children,function(t){return r(t,e)})}var a={main:"ps",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},l={x:null,y:null};function c(t,e){var i=t.element.classList,n=a.state.scrolling(e);i.contains(n)?clearTimeout(l[e]):i.add(n)}function h(t,e){l[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(a.state.scrolling(e))},t.settings.scrollingThreshold)}var d=function(t){this.element=t,this.handlers={}},u={isEmpty:{configurable:!0}};d.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},d.prototype.unbind=function(t,e){var i=this;this.handlers[t]=this.handlers[t].filter(function(n){return!(!e||n===e)||(i.element.removeEventListener(t,n,!1),!1)})},d.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},u.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(d.prototype,u);var p=function(){this.eventElements=[]};function f(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}p.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new d(t),this.eventElements.push(e)),e},p.prototype.bind=function(t,e,i){this.eventElement(t).bind(e,i)},p.prototype.unbind=function(t,e,i){var n=this.eventElement(t);n.unbind(e,i),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)},p.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},p.prototype.once=function(t,e,i){var n=this.eventElement(t),r=function(t){n.unbind(e,r),i(t)};n.bind(e,r)};var m=function(t,e,i,n,r){var o;if(void 0===n&&(n=!0),void 0===r&&(r=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,i,n,r){var o=i[0],s=i[1],a=i[2],l=i[3],d=i[4],u=i[5];void 0===n&&(n=!0);void 0===r&&(r=!1);var p=t.element;t.reach[l]=null,p[a]<1&&(t.reach[l]="start");p[a]>t[o]-t[s]-1&&(t.reach[l]="end");e&&(p.dispatchEvent(f("ps-scroll-"+l)),e<0?p.dispatchEvent(f("ps-scroll-"+d)):e>0&&p.dispatchEvent(f("ps-scroll-"+u)),n&&function(t,e){c(t,e),h(t,e)}(t,l));t.reach[l]&&(e||r)&&p.dispatchEvent(f("ps-"+l+"-reach-"+t.reach[l]))}(t,i,o,n,r)};function g(t){return parseInt(t,10)||0}var v={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},y=function(t){var i=t.element,n=Math.floor(i.scrollTop);t.containerWidth=i.clientWidth,t.containerHeight=i.clientHeight,t.contentWidth=i.scrollWidth,t.contentHeight=i.scrollHeight,i.contains(t.scrollbarXRail)||(s(i,a.element.rail("x")).forEach(function(t){return o(t)}),i.appendChild(t.scrollbarXRail)),i.contains(t.scrollbarYRail)||(s(i,a.element.rail("y")).forEach(function(t){return o(t)}),i.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=b(t,g(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=g((t.negativeScrollAdjustment+i.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=b(t,g(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=g(n*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,i){var n={width:i.railXWidth},r=Math.floor(t.scrollTop);i.isRtl?n.left=i.negativeScrollAdjustment+t.scrollLeft+i.containerWidth-i.contentWidth:n.left=t.scrollLeft;i.isScrollbarXUsingBottom?n.bottom=i.scrollbarXBottom-r:n.top=i.scrollbarXTop+r;e(i.scrollbarXRail,n);var o={top:r,height:i.railYHeight};i.isScrollbarYUsingRight?i.isRtl?o.right=i.contentWidth-(i.negativeScrollAdjustment+t.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth:o.right=i.scrollbarYRight-t.scrollLeft:i.isRtl?o.left=i.negativeScrollAdjustment+t.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:o.left=i.scrollbarYLeft+t.scrollLeft;e(i.scrollbarYRail,o),e(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),e(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}(i,t),t.scrollbarXActive?i.classList.add(a.state.active("x")):(i.classList.remove(a.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,i.scrollLeft=0),t.scrollbarYActive?i.classList.add(a.state.active("y")):(i.classList.remove(a.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,i.scrollTop=0)};function b(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function _(t,e){var i=e[0],n=e[1],r=e[2],o=e[3],s=e[4],l=e[5],d=e[6],u=e[7],p=e[8],f=t.element,m=null,g=null,v=null;function b(e){f[d]=m+v*(e[r]-g),c(t,u),y(t),e.stopPropagation(),e.preventDefault()}function _(){h(t,u),t[p].classList.remove(a.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",b)}t.event.bind(t[s],"mousedown",function(e){m=f[d],g=e[r],v=(t[n]-t[i])/(t[o]-t[l]),t.event.bind(t.ownerDocument,"mousemove",b),t.event.once(t.ownerDocument,"mouseup",_),t[p].classList.add(a.state.clicking),e.stopPropagation(),e.preventDefault()})}var x={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var i=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=i*t.containerHeight,y(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var i=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=i*t.containerWidth,y(t),e.stopPropagation()})},"drag-thumb":function(t){_(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),_(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(i){if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&(r(e,":hover")||r(t.scrollbarX,":focus")||r(t.scrollbarY,":focus"))){var n,o=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(o){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(r(n=o,"input,[contenteditable]")||r(n,"select,[contenteditable]")||r(n,"textarea,[contenteditable]")||r(n,"button,[contenteditable]"))return}var s=0,a=0;switch(i.which){case 37:s=i.metaKey?-t.contentWidth:i.altKey?-t.containerWidth:-30;break;case 38:a=i.metaKey?t.contentHeight:i.altKey?t.containerHeight:30;break;case 39:s=i.metaKey?t.contentWidth:i.altKey?t.containerWidth:30;break;case 40:a=i.metaKey?-t.contentHeight:i.altKey?-t.containerHeight:-30;break;case 32:a=i.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==s||t.settings.suppressScrollY&&0!==a||(e.scrollTop-=a,e.scrollLeft+=s,y(t),function(i,n){var r=Math.floor(e.scrollTop);if(0===i){if(!t.scrollbarYActive)return!1;if(0===r&&n>0||r>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===o&&i<0||o>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}(s,a)&&i.preventDefault())}})},wheel:function(e){var i=e.element;function n(n){var r=function(t){var e=t.deltaX,i=-1*t.deltaY;return void 0!==e&&void 0!==i||(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!=e&&i!=i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}(n),o=r[0],s=r[1];if(!function(e,n,r){if(!v.isWebKit&&i.querySelector("select:focus"))return!0;if(!i.contains(e))return!1;for(var o=e;o&&o!==i;){if(o.classList.contains(a.element.consuming))return!0;var s=t(o);if([s.overflow,s.overflowX,s.overflowY].join("").match(/(scroll|auto)/)){var l=o.scrollHeight-o.clientHeight;if(l>0&&!(0===o.scrollTop&&r>0||o.scrollTop===l&&r<0))return!0;var c=o.scrollWidth-o.clientWidth;if(c>0&&!(0===o.scrollLeft&&n<0||o.scrollLeft===c&&n>0))return!0}o=o.parentNode}return!1}(n.target,o,s)){var l=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(s?i.scrollTop-=s*e.settings.wheelSpeed:i.scrollTop+=o*e.settings.wheelSpeed,l=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(o?i.scrollLeft+=o*e.settings.wheelSpeed:i.scrollLeft-=s*e.settings.wheelSpeed,l=!0):(i.scrollTop-=s*e.settings.wheelSpeed,i.scrollLeft+=o*e.settings.wheelSpeed),y(e),(l=l||function(t,n){var r=Math.floor(i.scrollTop),o=0===i.scrollTop,s=r+i.offsetHeight===i.scrollHeight,a=0===i.scrollLeft,l=i.scrollLeft+i.offsetWidth===i.scrollWidth;return!(Math.abs(n)>Math.abs(t)?o||s:a||l)||!e.settings.wheelPropagation}(o,s))&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}void 0!==window.onwheel?e.event.bind(i,"wheel",n):void 0!==window.onmousewheel&&e.event.bind(i,"mousewheel",n)},touch:function(e){if(v.supportsTouch||v.supportsIePointer){var i=e.element,n={},r=0,o={},s=null;v.supportsTouch?(e.event.bind(i,"touchstart",d),e.event.bind(i,"touchmove",u),e.event.bind(i,"touchend",p)):v.supportsIePointer&&(window.PointerEvent?(e.event.bind(i,"pointerdown",d),e.event.bind(i,"pointermove",u),e.event.bind(i,"pointerup",p)):window.MSPointerEvent&&(e.event.bind(i,"MSPointerDown",d),e.event.bind(i,"MSPointerMove",u),e.event.bind(i,"MSPointerUp",p)))}function l(t,n){i.scrollTop-=n,i.scrollLeft-=t,y(e)}function c(t){return t.targetTouches?t.targetTouches[0]:t}function h(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function d(t){if(h(t)){var e=c(t);n.pageX=e.pageX,n.pageY=e.pageY,r=(new Date).getTime(),null!==s&&clearInterval(s)}}function u(s){if(h(s)){var d=c(s),u={pageX:d.pageX,pageY:d.pageY},p=u.pageX-n.pageX,f=u.pageY-n.pageY;if(function(e,n,r){if(!i.contains(e))return!1;for(var o=e;o&&o!==i;){if(o.classList.contains(a.element.consuming))return!0;var s=t(o);if([s.overflow,s.overflowX,s.overflowY].join("").match(/(scroll|auto)/)){var l=o.scrollHeight-o.clientHeight;if(l>0&&!(0===o.scrollTop&&r>0||o.scrollTop===l&&r<0))return!0;var c=o.scrollLeft-o.clientWidth;if(c>0&&!(0===o.scrollLeft&&n<0||o.scrollLeft===c&&n>0))return!0}o=o.parentNode}return!1}(s.target,p,f))return;l(p,f),n=u;var m=(new Date).getTime(),g=m-r;g>0&&(o.x=p/g,o.y=f/g,r=m),function(t,n){var r=Math.floor(i.scrollTop),o=i.scrollLeft,s=Math.abs(t),a=Math.abs(n);if(a>s){if(n<0&&r===e.contentHeight-e.containerHeight||n>0&&0===r)return 0===window.scrollY&&n>0&&v.isChrome}else if(s>a&&(t<0&&o===e.contentWidth-e.containerWidth||t>0&&0===o))return!0;return!0}(p,f)&&s.preventDefault()}}function p(){e.settings.swipeEasing&&(clearInterval(s),s=setInterval(function(){e.isInitialized?clearInterval(s):o.x||o.y?Math.abs(o.x)<.01&&Math.abs(o.y)<.01?clearInterval(s):(l(30*o.x,30*o.y),o.x*=.8,o.y*=.8):clearInterval(s)},10))}}},w=function(n,r){var o=this;if(void 0===r&&(r={}),"string"==typeof n&&(n=document.querySelector(n)),!n||!n.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var s in this.element=n,n.classList.add(a.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},r)o.settings[s]=r[s];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var l,c,h=function(){return n.classList.add(a.state.focus)},d=function(){return n.classList.remove(a.state.focus)};this.isRtl="rtl"===t(n).direction,this.isNegativeScroll=(c=n.scrollLeft,n.scrollLeft=-1,l=n.scrollLeft<0,n.scrollLeft=c,l),this.negativeScrollAdjustment=this.isNegativeScroll?n.scrollWidth-n.clientWidth:0,this.event=new p,this.ownerDocument=n.ownerDocument||document,this.scrollbarXRail=i(a.element.rail("x")),n.appendChild(this.scrollbarXRail),this.scrollbarX=i(a.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",h),this.event.bind(this.scrollbarX,"blur",d),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var u=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(u.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=g(u.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=g(u.borderLeftWidth)+g(u.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=g(u.marginLeft)+g(u.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=i(a.element.rail("y")),n.appendChild(this.scrollbarYRail),this.scrollbarY=i(a.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",h),this.event.bind(this.scrollbarY,"blur",d),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var f=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(f.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=g(f.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var i=t(e);return g(i.width)+g(i.paddingLeft)+g(i.paddingRight)+g(i.borderLeftWidth)+g(i.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=g(f.borderTopWidth)+g(f.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=g(f.marginTop)+g(f.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:n.scrollLeft<=0?"start":n.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:n.scrollTop<=0?"start":n.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return x[t](o)}),this.lastScrollTop=Math.floor(n.scrollTop),this.lastScrollLeft=n.scrollLeft,this.event.bind(this.element,"scroll",function(t){return o.onScroll(t)}),y(this)};return w.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=g(t(this.scrollbarXRail).marginLeft)+g(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=g(t(this.scrollbarYRail).marginTop)+g(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),y(this),m(this,"top",0,!1,!0),m(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},w.prototype.onScroll=function(t){this.isAlive&&(y(this),m(this,"top",this.element.scrollTop-this.lastScrollTop),m(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},w.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},w.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},w}),function(t){"use strict";var e=function(t){return t},i=function(e){return t.isArray(e)},n=function(t){return!i(t)&&t instanceof Object},r=function(e,i){return t.inArray(i,e)},o=function(t,e){for(var i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},s=function(t){return t[t.length-1]},a=function(){var t,e={};return o((t=arguments,Array.prototype.slice.call(t)),function(t){o(t,function(t,i){e[i]=t})}),e},l=function(t,e,n){return i(t)?function(t,e){var i=[];return o(t,function(t,n,r){i.push(e(t,n,r))}),i}(t,e):function(t,e,i){var n={};return o(t,function(t,r,o){r=i?i(r,t):r,n[r]=e(t,r,o)}),n}(t,e,n)},c=function(t,e,i){return l(t,function(t,n){return t[e].apply(t,i||[])})};!function(t){var e=function(t,e){var i,n,s,a=(n={},(i=i||{}).publish=function(t,e){o(n[t],function(t){t(e)})},i.subscribe=function(t,e){n[t]=n[t]||[],n[t].push(e)},i.unsubscribe=function(t){o(n,function(e){var i=r(e,t);-1!==i&&e.splice(i,1)})},i),l=t.$;return a.getType=function(){throw'implement me (return type. "text", "radio", etc.)'},a.$=function(t){return t?l.find(t):l},a.disable=function(){a.$().prop("disabled",!0),a.publish("isEnabled",!1)},a.enable=function(){a.$().prop("disabled",!1),a.publish("isEnabled",!0)},e.equalTo=function(t,e){return t===e},e.publishChange=function(t,i){var n=a.get();e.equalTo(n,s)||a.publish("change",{e:t,domElement:i}),s=n},a},a=function(t,i){var n=e(t,i);return n.get=function(){return n.$().val()},n.set=function(t){n.$().val(t)},n.clear=function(){n.set("")},i.buildSetter=function(t){return function(e){t.call(n,e)}},n},l=function(t,e){t=i(t)?t:[t],e=i(e)?e:[e];var n=!0;return t.length!==e.length?n=!1:o(t,function(t){(function(t,e){return-1!==r(t,e)})(e,t)||(n=!1)}),n},h=function(t){var e={},i=a(t,e);return i.getType=function(){return"button"},i.$().on("change",function(t){e.publishChange(t,this)}),i},d=function(e){var n={},r=a(e,n);return r.getType=function(){return"checkbox"},r.get=function(){var e=[];return r.$().filter(":checked").each(function(){e.push(t(this).val())}),e},r.set=function(e){e=i(e)?e:[e],r.$().each(function(){t(this).prop("checked",!1)}),o(e,function(t){r.$().filter('[value="'+t+'"]').prop("checked",!0)})},n.equalTo=l,r.$().change(function(t){n.publishChange(t,this)}),r},u=function(t){var e=x(t,{});return e.getType=function(){return"email"},e},p=function(i){var n={},r=e(i,n);return r.getType=function(){return"file"},r.get=function(){return s(r.$().val().split("\\"))},r.clear=function(){this.$().each(function(){t(this).wrap("<form>").closest("form").get(0).reset(),t(this).unwrap()})},r.$().change(function(t){n.publishChange(t,this)}),r},f=function(t){var e={},i=a(t,e);return i.getType=function(){return"hidden"},i.$().change(function(t){e.publishChange(t,this)}),i},m=function(i){var n={},r=e(i,n);return r.getType=function(){return"file[multiple]"},r.get=function(){var t,e=r.$().get(0).files||[],i=[];for(t=0;t<(e.length||0);t+=1)i.push(e[t].name);return i},r.clear=function(){this.$().each(function(){t(this).wrap("<form>").closest("form").get(0).reset(),t(this).unwrap()})},r.$().change(function(t){n.publishChange(t,this)}),r},g=function(t){var e={},n=a(t,e);return n.getType=function(){return"select[multiple]"},n.get=function(){return n.$().val()||[]},n.set=function(t){n.$().val(""===t?[]:i(t)?t:[t])},e.equalTo=l,n.$().change(function(t){e.publishChange(t,this)}),n},v=function(t){var e=x(t,{});return e.getType=function(){return"password"},e},y=function(e){var i={},n=a(e,i);return n.getType=function(){return"radio"},n.get=function(){return n.$().filter(":checked").val()||null},n.set=function(e){e?n.$().filter('[value="'+e+'"]').prop("checked",!0):n.$().each(function(){t(this).prop("checked",!1)})},n.$().change(function(t){i.publishChange(t,this)}),n},b=function(t){var e={},i=a(t,e);return i.getType=function(){return"range"},i.$().change(function(t){e.publishChange(t,this)}),i},_=function(t){var e={},i=a(t,e);return i.getType=function(){return"select"},i.$().change(function(t){e.publishChange(t,this)}),i},x=function(t){var e={},i=a(t,e);return i.getType=function(){return"text"},i.$().on("change keyup keydown",function(t){e.publishChange(t,this)}),i},w=function(t){var e={},i=a(t,e);return i.getType=function(){return"textarea"},i.$().on("change keyup keydown",function(t){e.publishChange(t,this)}),i},k=function(t){var e=x(t,{});return e.getType=function(){return"url"},e},C=function(e){var i={},s=e.$,a=e.constructorOverride||{button:h,text:x,url:k,email:u,password:v,range:b,textarea:w,select:_,"select[multiple]":g,radio:y,checkbox:d,file:p,"file[multiple]":m,hidden:f},l=function(e,r){(n(r)?r:s.find(r)).each(function(){var n=t(this).attr("name");i[n]=a[e]({$:t(this)})})},c=function(e,l){var c=[],h=n(l)?l:s.find(l);n(l)?i[h.attr("name")]=a[e]({$:h}):(h.each(function(){-1===r(c,t(this).attr("name"))&&c.push(t(this).attr("name"))}),o(c,function(t){i[t]=a[e]({$:s.find('input[name="'+t+'"]')})}))};return s.is("input, select, textarea")?s.is('input[type="button"], button, input[type="submit"]')?l("button",s):s.is("textarea")?l("textarea",s):s.is('input[type="text"]')||s.is("input")&&!s.attr("type")?l("text",s):s.is('input[type="password"]')?l("password",s):s.is('input[type="email"]')?l("email",s):s.is('input[type="url"]')?l("url",s):s.is('input[type="range"]')?l("range",s):s.is("select")?s.is("[multiple]")?l("select[multiple]",s):l("select",s):s.is('input[type="file"]')?s.is("[multiple]")?l("file[multiple]",s):l("file",s):s.is('input[type="hidden"]')?l("hidden",s):s.is('input[type="radio"]')?c("radio",s):s.is('input[type="checkbox"]')?c("checkbox",s):l("text",s):(l("button",'input[type="button"], button, input[type="submit"]'),l("text",'input[type="text"]'),l("password",'input[type="password"]'),l("email",'input[type="email"]'),l("url",'input[type="url"]'),l("range",'input[type="range"]'),l("textarea","textarea"),l("select","select:not([multiple])"),l("select[multiple]","select[multiple]"),l("file",'input[type="file"]:not([multiple])'),l("file[multiple]",'input[type="file"][multiple]'),l("hidden",'input[type="hidden"]'),c("radio",'input[type="radio"]'),c("checkbox",'input[type="checkbox"]')),i};t.fn.inputVal=function(e){var i=t(this),n=C({$:i});return i.is("input, textarea, select")?void 0===e?n[i.attr("name")].get():(n[i.attr("name")].set(e),i):void 0===e?c(n,"get"):(o(e,function(t,e){n[e].set(t)}),i)},t.fn.inputOnChange=function(e){var i=t(this),n=C({$:i});return o(n,function(t){t.subscribe("change",function(t){e.call(t.domElement,t.e)})}),i},t.fn.inputDisable=function(){var e=t(this);return c(C({$:e}),"disable"),e},t.fn.inputEnable=function(){var e=t(this);return c(C({$:e}),"enable"),e},t.fn.inputClear=function(){var e=t(this);return c(C({$:e}),"clear"),e}}(jQuery),t.fn.repeaterVal=function(){var e,i,n=function(t){if(1===t.length&&(0===t[0].key.length||1===t[0].key.length&&!t[0].key[0]))return t[0].val;o(t,function(t){t.head=t.key.shift()});var e,i=function(){var e={};return o(t,function(t){e[t.head]||(e[t.head]=[]),e[t.head].push(t)}),e}();return/^[0-9]+$/.test(t[0].head)?(e=[],o(i,function(t){e.push(n(t))})):(e={},o(i,function(t,i){e[i]=n(t)})),e};return n((e=t(this).inputVal(),i=[],o(e,function(t,e){var n=[];"undefined"!==e&&(n.push(e.match(/^[^\[]*/)[0]),n=n.concat(l(e.match(/\[[^\]]*\]/g),function(t){return t.replace(/[\[\]]/g,"")})),i.push({val:t,key:n}))}),i))},t.fn.repeater=function(n){var r;return n=n||{},t(this).each(function(){var c=t(this),h=n.show||function(){t(this).show()},d=n.hide||function(t){t()},u=c.find("[data-repeater-list]").first(),p=function(e,i){return e.filter(function(){return!i||0===t(this).closest((e=i,n="selector",l(e,function(t){return t[n]})).join(",")).length;var e,n})},f=function(){return p(u.find("[data-repeater-item]"),n.repeaters)},m=u.find("[data-repeater-item]").first().clone().hide(),g=p(p(t(this).find("[data-repeater-item]"),n.repeaters).first().find("[data-repeater-delete]"),n.repeaters);n.isFirstItemUndeletable&&g&&g.remove();var v=function(){var t=u.data("repeater-list");return n.$parent?n.$parent.data("item-name")+"["+t+"]":t},y=function(e){n.repeaters&&e.each(function(){var e=t(this);o(n.repeaters,function(t){e.find(t.selector).repeater(a(t,{$parent:e}))})})},b=function(t,e,i){t&&o(t,function(t){i.call(e.find(t.selector)[0],t)})},_=function(e,i,n){e.each(function(e){var r=t(this);r.data("item-name",i+"["+e+"]"),p(r.find("[name]"),n).each(function(){var o=t(this),a=o.attr("name").match(/\[[^\]]+\]/g),l=a?s(a).replace(/\[|\]/g,""):o.attr("name"),c=i+"["+e+"]["+l+"]"+(o.is(":checkbox")||o.attr("multiple")?"[]":"");o.attr("name",c),b(n,r,function(n){var r=t(this);_(p(r.find("[data-repeater-item]"),n.repeaters||[]),i+"["+e+"]["+r.find("[data-repeater-list]").first().data("repeater-list")+"]",n.repeaters)})})}),u.find("input[name][checked]").removeAttr("checked").prop("checked",!0)};_(f(),v(),n.repeaters),y(f()),n.initEmpty&&f().remove(),n.ready&&n.ready(function(){_(f(),v(),n.repeaters)});var x,w=(x=function(r,s,a){if(s||n.defaultValues){var c={};p(r.find("[name]"),a).each(function(){var e=t(this).attr("name").match(/\[([^\]]*)(\]|\]\[\])$/)[1];c[e]=t(this).attr("name")}),r.inputVal(l((h=s||n.defaultValues,d=function(t,e){return c[e]},i(h)?(u=[],o(h,function(t,e,i){d(t,e,i)&&u.push(t)})):(u={},o(h,function(t,e,i){d(t,e,i)&&(u[e]=t)})),u),e,function(t){return c[t]}))}var h,d,u;b(a,r,function(e){var i=t(this);p(i.find("[data-repeater-item]"),e.repeaters).each(function(){var n=i.find("[data-repeater-list]").data("repeater-list");if(s&&s[n]){var r=t(this).clone();i.find("[data-repeater-item]").remove(),o(s[n],function(t){var n=r.clone();x(n,t,e.repeaters||[]),i.find("[data-repeater-list]").append(n)})}else x(t(this),e.defaultValues,e.repeaters||[])})})},function(e,i){u.append(e),_(f(),v(),n.repeaters),e.find("[name]").each(function(){t(this).inputClear()}),x(e,i||n.defaultValues,n.repeaters)}),k=function(t){var e=m.clone();w(e,t),n.repeaters&&y(e),h.call(e.get(0))};r=function(t){f().remove(),o(t,k)},p(c.find("[data-repeater-create]"),n.repeaters).click(function(){k()}),u.on("click","[data-repeater-delete]",function(){var e=t(this).closest("[data-repeater-item]").get(0);d.call(e,function(){t(e).remove(),_(f(),v(),n.repeaters)})})}),this.setList=r,this}}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){"use strict";function e(e){var i=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).closest("form").ajaxSubmit(i))}function i(e){var i=e.target,n=t(i);if(!n.is("[type=submit],[type=image]")){var r=n.closest("[type=submit]");if(0===r.length)return;i=r[0]}var o=i.form;if(o.clk=i,"image"===i.type)if(void 0!==e.offsetX)o.clk_x=e.offsetX,o.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var s=n.offset();o.clk_x=e.pageX-s.left,o.clk_y=e.pageY-s.top}else o.clk_x=e.pageX-i.offsetLeft,o.clk_y=e.pageY-i.offsetTop;setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function n(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var r=/\r?\n/g,o={};o.fileapi=void 0!==t('<input type="file">').get(0).files,o.formdata=void 0!==window.FormData;var s=!!t.fn.prop;t.fn.attr2=function(){if(!s)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e,i,r,a){function l(i){function r(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(t){n("cannot get iframe.contentWindow document: "+t)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(i){n("cannot get iframe.contentDocument: "+i),e=t.document}return e}function o(){var e=u.attr2("target"),i=u.attr2("action"),o=u.attr("enctype")||u.attr("encoding")||"multipart/form-data";k.setAttribute("target",f),c&&!/post/i.test(c)||k.setAttribute("method","POST"),i!==d.url&&k.setAttribute("action",d.url),d.skipEncodingOverride||c&&!/post/i.test(c)||u.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),d.timeout&&(w=setTimeout(function(){x=!0,a(T)},d.timeout));var s=[];try{if(d.extraData)for(var l in d.extraData)d.extraData.hasOwnProperty(l)&&(t.isPlainObject(d.extraData[l])&&d.extraData[l].hasOwnProperty("name")&&d.extraData[l].hasOwnProperty("value")?s.push(t('<input type="hidden" name="'+d.extraData[l].name+'">',S).val(d.extraData[l].value).appendTo(k)[0]):s.push(t('<input type="hidden" name="'+l+'">',S).val(d.extraData[l]).appendTo(k)[0]));d.iframeTarget||m.appendTo(D),v.attachEvent?v.attachEvent("onload",a):v.addEventListener("load",a,!1),setTimeout(function t(){try{var e=r(v).readyState;n("state = "+e),e&&"uninitialized"===e.toLowerCase()&&setTimeout(t,50)}catch(e){n("Server abort: ",e," (",e.name,")"),a(A),w&&clearTimeout(w),w=void 0}},15);try{k.submit()}catch(t){document.createElement("form").submit.apply(k)}}finally{k.setAttribute("action",i),k.setAttribute("enctype",o),e?k.setAttribute("target",e):u.removeAttr("target"),t(s).remove()}}function a(e){if(!y.aborted&&!O){if((I=r(v))||(n("cannot access response document"),e=A),e===T&&y)return y.abort("timeout"),void C.reject(y,"timeout");if(e===A&&y)return y.abort("server abort"),void C.reject(y,"error","server abort");if(I&&I.location.href!==d.iframeSrc||x){v.detachEvent?v.detachEvent("onload",a):v.removeEventListener("load",a,!1);var i,o="success";try{if(x)throw"timeout";var s="xml"===d.dataType||I.XMLDocument||t.isXMLDoc(I);if(n("isXml="+s),!s&&window.opera&&(null===I.body||!I.body.innerHTML)&&--N)return n("requeing onLoad callback, DOM not available"),void setTimeout(a,250);var l=I.body?I.body:I.documentElement;y.responseText=l?l.innerHTML:null,y.responseXML=I.XMLDocument?I.XMLDocument:I,s&&(d.dataType="xml"),y.getResponseHeader=function(t){return{"content-type":d.dataType}[t.toLowerCase()]},l&&(y.status=Number(l.getAttribute("status"))||y.status,y.statusText=l.getAttribute("statusText")||y.statusText);var c=(d.dataType||"").toLowerCase(),h=/(json|script|text)/.test(c);if(h||d.textarea){var u=I.getElementsByTagName("textarea")[0];if(u)y.responseText=u.value,y.status=Number(u.getAttribute("status"))||y.status,y.statusText=u.getAttribute("statusText")||y.statusText;else if(h){var f=I.getElementsByTagName("pre")[0],g=I.getElementsByTagName("body")[0];f?y.responseText=f.textContent?f.textContent:f.innerText:g&&(y.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!y.responseXML&&y.responseText&&(y.responseXML=L(y.responseText));try{P=F(y,c,d)}catch(t){o="parsererror",y.error=i=t||o}}catch(t){n("error caught: ",t),o="error",y.error=i=t||o}y.aborted&&(n("upload aborted"),o=null),y.status&&(o=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===o?(d.success&&d.success.call(d.context,P,"success",y),C.resolve(y.responseText,"success",y),p&&t.event.trigger("ajaxSuccess",[y,d])):o&&(void 0===i&&(i=y.statusText),d.error&&d.error.call(d.context,y,o,i),C.reject(y,"error",i),p&&t.event.trigger("ajaxError",[y,d,i])),p&&t.event.trigger("ajaxComplete",[y,d]),p&&!--t.active&&t.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,o),O=!0,d.timeout&&clearTimeout(w),setTimeout(function(){d.iframeTarget?m.attr("src",d.iframeSrc):m.remove(),y.responseXML=null},100)}}}var l,h,d,p,f,m,v,y,b,_,x,w,k=u[0],C=t.Deferred();if(C.abort=function(t){y.abort(t)},i)for(h=0;h<g.length;h++)l=t(g[h]),s?l.prop("disabled",!1):l.removeAttr("disabled");(d=t.extend(!0,{},t.ajaxSettings,e)).context=d.context||d,f="jqFormIO"+(new Date).getTime();var S=k.ownerDocument,D=u.closest("body");if(d.iframeTarget?(_=(m=t(d.iframeTarget,S)).attr2("name"))?f=_:m.attr2("name",f):(m=t('<iframe name="'+f+'" src="'+d.iframeSrc+'" />',S)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=m[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var i="timeout"===e?"timeout":"aborted";n("aborting upload... "+i),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(t){}m.attr("src",d.iframeSrc),y.error=i,d.error&&d.error.call(d.context,y,i,e),p&&t.event.trigger("ajaxError",[y,d,i]),d.complete&&d.complete.call(d.context,y,i)}},(p=d.global)&&0==t.active++&&t.event.trigger("ajaxStart"),p&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&!1===d.beforeSend.call(d.context,y,d))return d.global&&t.active--,C.reject(),C;if(y.aborted)return C.reject(),C;(b=k.clk)&&(_=b.name)&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[_]=b.value,"image"===b.type&&(d.extraData[_+".x"]=k.clk_x,d.extraData[_+".y"]=k.clk_y));var T=1,A=2,M=t("meta[name=csrf-token]").attr("content"),E=t("meta[name=csrf-param]").attr("content");E&&M&&(d.extraData=d.extraData||{},d.extraData[E]=M),d.forceSync?o():setTimeout(o,10);var P,I,O,N=50,L=t.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!==e.documentElement.nodeName?e:null},j=t.parseJSON||function(t){return window.eval("("+t+")")},F=function(e,i,n){var r=e.getResponseHeader("content-type")||"",o=("xml"===i||!i)&&r.indexOf("xml")>=0,s=o?e.responseXML:e.responseText;return o&&"parsererror"===s.documentElement.nodeName&&t.error&&t.error("parsererror"),n&&n.dataFilter&&(s=n.dataFilter(s,i)),"string"==typeof s&&(("json"===i||!i)&&r.indexOf("json")>=0?s=j(s):("script"===i||!i)&&r.indexOf("javascript")>=0&&t.globalEval(s)),s};return C}if(!this.length)return n("ajaxSubmit: skipping submit process - no element selected"),this;var c,h,d,u=this;"function"==typeof e?e={success:e}:"string"==typeof e||!1===e&&arguments.length>0?(e={url:e,data:i,dataType:r},"function"==typeof a&&(e.success=a)):void 0===e&&(e={}),c=e.method||e.type||this.attr2("method"),(d=(d="string"==typeof(h=e.url||this.attr2("action"))?t.trim(h):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:d,success:t.ajaxSettings.success,type:c||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var p={};if(this.trigger("form-pre-serialize",[this,e,p]),p.veto)return n("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&!1===e.beforeSerialize(this,e))return n("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var f=e.traditional;void 0===f&&(f=t.ajaxSettings.traditional);var m,g=[],v=this.formToArray(e.semantic,g,e.filtering);if(e.data){var y=t.isFunction(e.data)?e.data(v):e.data;e.extraData=y,m=t.param(y,f)}if(e.beforeSubmit&&!1===e.beforeSubmit(v,this,e))return n("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,e,p]),p.veto)return n("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=t.param(v,f);m&&(b=b?b+"&"+m:m),"GET"===e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+b,e.data=null):e.data=b;var _=[];if(e.resetForm&&_.push(function(){u.resetForm()}),e.clearForm&&_.push(function(){u.clearForm(e.includeHidden)}),!e.dataType&&e.target){var x=e.success||function(){};_.push(function(i,n,r){var o=arguments,s=e.replaceTarget?"replaceWith":"html";t(e.target)[s](i).each(function(){x.apply(this,o)})})}else e.success&&(t.isArray(e.success)?t.merge(_,e.success):_.push(e.success));if(e.success=function(t,i,n){for(var r=e.context||this,o=0,s=_.length;o<s;o++)_[o].apply(r,[t,i,n||u,u])},e.error){var w=e.error;e.error=function(t,i,n){var r=e.context||this;w.apply(r,[t,i,n,u])}}if(e.complete){var k=e.complete;e.complete=function(t,i){var n=e.context||this;k.apply(n,[t,i,u])}}var C=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}).length>0,S="multipart/form-data",D=u.attr("enctype")===S||u.attr("encoding")===S,T=o.fileapi&&o.formdata;n("fileAPI :"+T);var A,M=(C||D)&&!T;!1!==e.iframe&&(e.iframe||M)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){A=l(v)}):A=l(v):A=(C||D)&&T?function(i){for(var n=new FormData,r=0;r<i.length;r++)n.append(i[r].name,i[r].value);if(e.extraData){var o=function(i){var n,r,o=t.param(i,e.traditional).split("&"),s=o.length,a=[];for(n=0;n<s;n++)o[n]=o[n].replace(/\+/g," "),r=o[n].split("="),a.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return a}(e.extraData);for(r=0;r<o.length;r++)o[r]&&n.append(o[r][0],o[r][1])}e.data=null;var s=t.extend(!0,{},t.ajaxSettings,e,{contentType:!1,processData:!1,cache:!1,type:c||"POST"});e.uploadProgress&&(s.xhr=function(){var i=t.ajaxSettings.xhr();return i.upload&&i.upload.addEventListener("progress",function(t){var i=0,n=t.loaded||t.position,r=t.total;t.lengthComputable&&(i=Math.ceil(n/r*100)),e.uploadProgress(t,n,r,i)},!1),i}),s.data=null;var a=s.beforeSend;return s.beforeSend=function(t,i){e.formData?i.data=e.formData:i.data=n,a&&a.call(this,t,i)},t.ajax(s)}(v):t.ajax(e),u.removeData("jqxhr").data("jqxhr",A);for(var E=0;E<g.length;E++)g[E]=null;return this.trigger("form-submit-notify",[this,e]),this},t.fn.ajaxForm=function(r,o,s,a){if(("string"==typeof r||!1===r&&arguments.length>0)&&(r={url:r,data:o,dataType:s},"function"==typeof a&&(r.success=a)),(r=r||{}).delegation=r.delegation&&t.isFunction(t.fn.on),!r.delegation&&0===this.length){var l={s:this.selector,c:this.context};return!t.isReady&&l.s?(n("DOM not ready, queuing ajaxForm"),t(function(){t(l.s,l.c).ajaxForm(r)}),this):(n("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return r.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,i).on("submit.form-plugin",this.selector,r,e).on("click.form-plugin",this.selector,r,i),this):this.ajaxFormUnbind().on("submit.form-plugin",r,e).on("click.form-plugin",r,i)},t.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,i,n){var r=[];if(0===this.length)return r;var s,a,l,c,h,d,u,p,f=this[0],m=this.attr("id"),g=e||void 0===f.elements?f.getElementsByTagName("*"):f.elements;if(g&&(g=t.makeArray(g)),m&&(e||/(Edge|Trident)\//.test(navigator.userAgent))&&(s=t(':input[form="'+m+'"]').get()).length&&(g=(g||[]).concat(s)),!g||!g.length)return r;for(t.isFunction(n)&&(g=t.map(g,n)),a=0,u=g.length;a<u;a++)if((c=(d=g[a]).name)&&!d.disabled)if(e&&f.clk&&"image"===d.type)f.clk===d&&(r.push({name:c,value:t(d).val(),type:d.type}),r.push({name:c+".x",value:f.clk_x},{name:c+".y",value:f.clk_y}));else if((h=t.fieldValue(d,!0))&&h.constructor===Array)for(i&&i.push(d),l=0,p=h.length;l<p;l++)r.push({name:c,value:h[l]});else if(o.fileapi&&"file"===d.type){i&&i.push(d);var v=d.files;if(v.length)for(l=0;l<v.length;l++)r.push({name:c,value:v[l],type:d.type});else r.push({name:c,value:"",type:d.type})}else null!==h&&void 0!==h&&(i&&i.push(d),r.push({name:c,value:h,type:d.type,required:d.required}));if(!e&&f.clk){var y=t(f.clk),b=y[0];(c=b.name)&&!b.disabled&&"image"===b.type&&(r.push({name:c,value:y.val()}),r.push({name:c+".x",value:f.clk_x},{name:c+".y",value:f.clk_y}))}return r},t.fn.formSerialize=function(e){return t.param(this.formToArray(e))},t.fn.fieldSerialize=function(e){var i=[];return this.each(function(){var n=this.name;if(n){var r=t.fieldValue(this,e);if(r&&r.constructor===Array)for(var o=0,s=r.length;o<s;o++)i.push({name:n,value:r[o]});else null!==r&&void 0!==r&&i.push({name:this.name,value:r})}}),t.param(i)},t.fn.fieldValue=function(e){for(var i=[],n=0,r=this.length;n<r;n++){var o=this[n],s=t.fieldValue(o,e);null===s||void 0===s||s.constructor===Array&&!s.length||(s.constructor===Array?t.merge(i,s):i.push(s))}return i},t.fieldValue=function(e,i){var n=e.name,o=e.type,s=e.tagName.toLowerCase();if(void 0===i&&(i=!0),i&&(!n||e.disabled||"reset"===o||"button"===o||("checkbox"===o||"radio"===o)&&!e.checked||("submit"===o||"image"===o)&&e.form&&e.form.clk!==e||"select"===s&&-1===e.selectedIndex))return null;if("select"===s){var a=e.selectedIndex;if(a<0)return null;for(var l=[],c=e.options,h="select-one"===o,d=h?a+1:c.length,u=h?a:0;u<d;u++){var p=c[u];if(p.selected&&!p.disabled){var f=p.value;if(f||(f=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),h)return f;l.push(f)}}return l}return t(e).val().replace(r,"\r\n")},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var i=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var n=this.type,r=this.tagName.toLowerCase();i.test(n)||"textarea"===r?this.value="":"checkbox"===n||"radio"===n?this.checked=!1:"select"===r?this.selectedIndex=-1:"file"===n?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(!0===e&&/hidden/.test(n)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){var e=t(this),i=this.tagName.toLowerCase();switch(i){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var n=e.parents("select");return n.length&&n[0].multiple?"option"===i?this.selected=this.defaultSelected:e.find("option").resetForm():n.resetForm(),!0;case"select":return e.find("option").each(function(t){if(this.selected=this.defaultSelected,this.defaultSelected&&!e[0].multiple)return e[0].selectedIndex=t,!1}),!0;case"label":var r=t(e.attr("for")),o=e.find("input,select,textarea");return r[0]&&o.unshift(r[0]),o.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return e.find("form,input,label,select,textarea").resetForm(),!0}})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var i=this.type;if("checkbox"===i||"radio"===i)this.checked=e;else if("option"===this.tagName.toLowerCase()){var n=t(this).parent("select");e&&n[0]&&"select-one"===n[0].type&&n.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}),function(){"use strict";function t(t){t.fn._fadeIn=t.fn.fadeIn;var e=t.noop||function(){},i=/MSIE/.test(navigator.userAgent),n=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),r=(document.documentMode,t.isFunction(document.createElement("div").style.setExpression));t.blockUI=function(t){a(window,t)},t.unblockUI=function(t){l(window,t)},t.growlUI=function(e,i,n,r){var o=t('<div class="growlUI"></div>');e&&o.append("<h1>"+e+"</h1>"),i&&o.append("<h2>"+i+"</h2>"),void 0===n&&(n=3e3);var s=function(e){e=e||{},t.blockUI({message:o,fadeIn:void 0!==e.fadeIn?e.fadeIn:700,fadeOut:void 0!==e.fadeOut?e.fadeOut:1e3,timeout:void 0!==e.timeout?e.timeout:n,centerY:!1,showOverlay:!1,onUnblock:r,css:t.blockUI.defaults.growlCSS})};s();o.css("opacity");o.mouseover(function(){s({fadeIn:0,timeout:3e4});var e=t(".blockMsg");e.stop(),e.fadeTo(300,1)}).mouseout(function(){t(".blockMsg").fadeOut(1e3)})},t.fn.block=function(e){if(this[0]===window)return t.blockUI(e),this;var i=t.extend({},t.blockUI.defaults,e||{});return this.each(function(){var e=t(this);i.ignoreIfBlocked&&e.data("blockUI.isBlocked")||e.unblock({fadeOut:0})}),this.each(function(){"static"==t.css(this,"position")&&(this.style.position="relative",t(this).data("blockUI.static",!0)),this.style.zoom=1,a(this,e)})},t.fn.unblock=function(e){return this[0]===window?(t.unblockUI(e),this):this.each(function(){l(this,e)})},t.blockUI.version=2.7,t.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var o=null,s=[];function a(a,c){var d,f,m=a==window,g=c&&void 0!==c.message?c.message:void 0;if(!(c=t.extend({},t.blockUI.defaults,c||{})).ignoreIfBlocked||!t(a).data("blockUI.isBlocked")){if(c.overlayCSS=t.extend({},t.blockUI.defaults.overlayCSS,c.overlayCSS||{}),d=t.extend({},t.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),f=t.extend({},t.blockUI.defaults.themedCSS,c.themedCSS||{}),g=void 0===g?c.message:g,m&&o&&l(window,{fadeOut:0}),g&&"string"!=typeof g&&(g.parentNode||g.jquery)){var v=g.jquery?g[0]:g,y={};t(a).data("blockUI.history",y),y.el=v,y.parent=v.parentNode,y.display=v.style.display,y.position=v.style.position,y.parent&&y.parent.removeChild(v)}t(a).data("blockUI.onUnblock",c.onUnblock);var b,_,x,w,k=c.baseZ;b=i||c.forceIframe?t('<iframe class="blockUI" style="z-index:'+k+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):t('<div class="blockUI" style="display:none"></div>'),_=c.theme?t('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+k+++';display:none"></div>'):t('<div class="blockUI blockOverlay" style="z-index:'+k+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&m?(w='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(k+10)+';display:none;position:fixed">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||" ")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):c.theme?(w='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(k+10)+';display:none;position:absolute">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||" ")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):w=m?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(k+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(k+10)+';display:none;position:absolute"></div>',x=t(w),g&&(c.theme?(x.css(f),x.addClass("ui-widget-content")):x.css(d)),c.theme||_.css(c.overlayCSS),_.css("position",m?"fixed":"absolute"),(i||c.forceIframe)&&b.css("opacity",0);var C=[b,_,x],S=t(m?"body":a);t.each(C,function(){this.appendTo(S)}),c.theme&&c.draggable&&t.fn.draggable&&x.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var D=r&&(!t.support.boxModel||t("object,embed",m?null:a).length>0);if(n||D){if(m&&c.allowBodyStretch&&t.support.boxModel&&t("html,body").css("height","100%"),(n||!t.support.boxModel)&&!m)var T=p(a,"borderTopWidth"),A=p(a,"borderLeftWidth"),M=T?"(0 - "+T+")":0,E=A?"(0 - "+A+")":0;t.each(C,function(t,e){var i=e[0].style;if(i.position="absolute",t<2)m?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),m?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),E&&i.setExpression("left",E),M&&i.setExpression("top",M);else if(c.centerY)m&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0;else if(!c.centerY&&m){var n="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';i.setExpression("top",n)}})}if(g&&(c.theme?x.find(".ui-widget-content").append(g):x.append(g),(g.jquery||g.nodeType)&&t(g).show()),(i||c.forceIframe)&&c.showOverlay&&b.show(),c.fadeIn){var P=c.onBlock?c.onBlock:e,I=c.showOverlay&&!g?P:e,O=g?P:e;c.showOverlay&&_._fadeIn(c.fadeIn,I),g&&x._fadeIn(c.fadeIn,O)}else c.showOverlay&&_.show(),g&&x.show(),c.onBlock&&c.onBlock.bind(x)();if(h(1,a,c),m?(o=x[0],s=t(c.focusableElements,o),c.focusInput&&setTimeout(u,20)):function(t,e,i){var n=t.parentNode,r=t.style,o=(n.offsetWidth-t.offsetWidth)/2-p(n,"borderLeftWidth"),s=(n.offsetHeight-t.offsetHeight)/2-p(n,"borderTopWidth");e&&(r.left=o>0?o+"px":"0");i&&(r.top=s>0?s+"px":"0")}(x[0],c.centerX,c.centerY),c.timeout){var N=setTimeout(function(){m?t.unblockUI(c):t(a).unblock(c)},c.timeout);t(a).data("blockUI.timeout",N)}}}function l(e,i){var n,r,a=e==window,l=t(e),d=l.data("blockUI.history"),u=l.data("blockUI.timeout");u&&(clearTimeout(u),l.removeData("blockUI.timeout")),i=t.extend({},t.blockUI.defaults,i||{}),h(0,e,i),null===i.onUnblock&&(i.onUnblock=l.data("blockUI.onUnblock"),l.removeData("blockUI.onUnblock")),r=a?t("body").children().filter(".blockUI").add("body > .blockUI"):l.find(">.blockUI"),i.cursorReset&&(r.length>1&&(r[1].style.cursor=i.cursorReset),r.length>2&&(r[2].style.cursor=i.cursorReset)),a&&(o=s=null),i.fadeOut?(n=r.length,r.stop().fadeOut(i.fadeOut,function(){0==--n&&c(r,d,i,e)})):c(r,d,i,e)}function c(e,i,n,r){var o=t(r);if(!o.data("blockUI.isBlocked")){e.each(function(t,e){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.el.style.cursor="default",i.parent&&i.parent.appendChild(i.el),o.removeData("blockUI.history")),o.data("blockUI.static")&&o.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(r,n);var s=t(document.body),a=s.width(),l=s[0].style.width;s.width(a-1).width(a),s[0].style.width=l}}function h(e,i,n){var r=i==window,s=t(i);if((e||(!r||o)&&(r||s.data("blockUI.isBlocked")))&&(s.data("blockUI.isBlocked",e),r&&n.bindEvents&&(!e||n.showOverlay))){var a="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";e?t(document).bind(a,n,d):t(document).unbind(a,d)}}function d(e){if("keydown"===e.type&&e.keyCode&&9==e.keyCode&&o&&e.data.constrainTabKey){var i=s,n=!e.shiftKey&&e.target===i[i.length-1],r=e.shiftKey&&e.target===i[0];if(n||r)return setTimeout(function(){u(r)},10),!1}var a=e.data,l=t(e.target);return l.hasClass("blockOverlay")&&a.onOverlayClick&&a.onOverlayClick(e),l.parents("div."+a.blockMsgClass).length>0||0===l.parents().children().filter("div.blockUI").length}function u(t){if(s){var e=s[!0===t?s.length-1:0];e&&e.focus()}}function p(e,i){return parseInt(t.css(e,i),10)||0}}"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t,e){function i(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var t=new Date;return i(t.getFullYear(),t.getMonth(),t.getDate())}function r(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function o(i,n){return function(){return n!==e&&t.fn.datepicker.deprecated(n),this[i].apply(this,arguments)}}function s(e){var i={};if(f[e]||(e=e.split("-")[0],f[e])){var n=f[e];return t.each(p,function(t,e){e in n&&(i[e]=n[e])}),i}}var a=function(){var e={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),i=0,n=this.length;i<n;i++)if(0<=this[i].valueOf()-e&&this[i].valueOf()-e<864e5)return i;return-1},remove:function(t){this.splice(t,1)},replace:function(e){e&&(t.isArray(e)||(e=[e]),this.clear(),this.push.apply(this,e))},clear:function(){this.length=0},copy:function(){var t=new a;return t.replace(this),t}};return function(){var i=[];return i.push.apply(i,arguments),t.extend(i,e),i}}(),l=function(e,i){t.data(e,"datepicker",this),this._process_options(i),this.dates=new a,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=t(e),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=t(m.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(t,e){return Number(e)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};l.prototype={constructor:l,_resolveViewName:function(e){return t.each(m.viewModes,function(i,n){if(e===i||-1!==t.inArray(e,n.names))return e=i,!1}),e},_resolveDaysOfWeek:function(e){return t.isArray(e)||(e=e.split(/[,\s]*/)),t.map(e,Number)},_check_template:function(i){try{return i!==e&&""!==i&&((i.match(/[<>]/g)||[]).length<=0||t(i).length>0)}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var r=this.o=t.extend({},this._o),o=r.language;f[o]||(o=o.split("-")[0],f[o]||(o=u.language)),r.language=o,r.startView=this._resolveViewName(r.startView),r.minViewMode=this._resolveViewName(r.minViewMode),r.maxViewMode=this._resolveViewName(r.maxViewMode),r.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,r.startView)),!0!==r.multidate&&(r.multidate=Number(r.multidate)||!1,!1!==r.multidate&&(r.multidate=Math.max(0,r.multidate))),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=m.parseFormat(r.format);r.startDate!==-1/0&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=m.parseDate(r.startDate,s,r.language,r.assumeNearbyYear):r.startDate=-1/0),r.endDate!==1/0&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=m.parseDate(r.endDate,s,r.language,r.assumeNearbyYear):r.endDate=1/0),r.daysOfWeekDisabled=this._resolveDaysOfWeek(r.daysOfWeekDisabled||[]),r.daysOfWeekHighlighted=this._resolveDaysOfWeek(r.daysOfWeekHighlighted||[]),r.datesDisabled=r.datesDisabled||[],t.isArray(r.datesDisabled)||(r.datesDisabled=r.datesDisabled.split(",")),r.datesDisabled=t.map(r.datesDisabled,function(t){return m.parseDate(t,s,r.language,r.assumeNearbyYear)});var a=String(r.orientation).toLowerCase().split(/\s+/g),l=r.orientation.toLowerCase();if(a=t.grep(a,function(t){return/^auto|left|right|top|bottom$/.test(t)}),r.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===a.length)switch(a[0]){case"top":case"bottom":r.orientation.y=a[0];break;case"left":case"right":r.orientation.x=a[0]}else l=t.grep(a,function(t){return/^left|right$/.test(t)}),r.orientation.x=l[0]||"auto",l=t.grep(a,function(t){return/^top|bottom$/.test(t)}),r.orientation.y=l[0]||"auto";if(r.defaultViewDate instanceof Date||"string"==typeof r.defaultViewDate)r.defaultViewDate=m.parseDate(r.defaultViewDate,s,r.language,r.assumeNearbyYear);else if(r.defaultViewDate){var c=r.defaultViewDate.year||(new Date).getFullYear(),h=r.defaultViewDate.month||0,d=r.defaultViewDate.day||1;r.defaultViewDate=i(c,h,d)}else r.defaultViewDate=n()},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var i,n,r,o=0;o<t.length;o++)i=t[o][0],2===t[o].length?(n=e,r=t[o][1]):3===t[o].length&&(n=t[o][1],r=t[o][2]),i.on(r,n)},_unapplyEvents:function(t){for(var i,n,r,o=0;o<t.length;o++)i=t[o][0],2===t[o].length?(r=e,n=t[o][1]):3===t[o].length&&(r=t[o][1],n=t[o][2]),i.off(n,r)},_buildEvents:function(){var e={keyup:t.proxy(function(e){-1===t.inArray(e.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:t.proxy(this.keydown,this),paste:t.proxy(this.paste,this)};!0===this.o.showOnFocus&&(e.focus=t.proxy(this.show,this)),this.isInput?this._events=[[this.element,e]]:this.component&&this.inputField.length?this._events=[[this.inputField,e],[this.component,{click:t.proxy(this.show,this)}]]:this._events=[[this.element,{click:t.proxy(this.show,this),keydown:t.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:t.proxy(function(t){this._focused_from=t.target},this)}],[this.element,{blur:t.proxy(function(t){this._focused_from=t.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":t.proxy(function(t){this.update(t.date)},this)}]),this._secondaryEvents=[[this.picker,{click:t.proxy(this.click,this)}],[this.picker,".prev, .next",{click:t.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:t.proxy(this.dayCellClick,this)}],[t(window),{resize:t.proxy(this.place,this)}],[t(document),{"mousedown touchstart":t.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).length||this.picker.is(t.target)||this.picker.find(t.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(e,i){var n=i||this.dates.get(-1),r=this._utc_to_local(n);this.element.trigger({type:e,date:r,viewMode:this.viewMode,dates:t.map(this.dates,this._utc_to_local),format:t.proxy(function(t,e){0===arguments.length?(t=this.dates.length-1,e=this.o.format):"string"==typeof t&&(e=t,t=this.dates.length-1),e=e||this.o.format;var i=this.dates.get(t);return m.formatDate(i,e,this.o.language)},this)})},show:function(){if(!(this.inputField.prop("disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&t(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(e){var i;if(e.originalEvent.clipboardData&&e.originalEvent.clipboardData.types&&-1!==t.inArray("text/plain",e.originalEvent.clipboardData.types))i=e.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i),this.update(),e.preventDefault()},_utc_to_local:function(t){if(!t)return t;var e=new Date(t.getTime()+6e4*t.getTimezoneOffset());return e.getTimezoneOffset()!==t.getTimezoneOffset()&&(e=new Date(t.getTime()+6e4*e.getTimezoneOffset())),e},_local_to_utc:function(t){return t&&new Date(t.getTime()-6e4*t.getTimezoneOffset())},_zero_time:function(t){return t&&new Date(t.getFullYear(),t.getMonth(),t.getDate())},_zero_utc_time:function(t){return t&&i(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())},getDates:function(){return t.map(this.dates,this._utc_to_local)},getUTCDates:function(){return t.map(this.dates,function(t){return new Date(t)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var t=this.dates.get(-1);return t!==e?new Date(t):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,e),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var e=t.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,t.map(e,this._utc_to_local)),this},setDate:o("setDates"),setUTCDate:o("setUTCDates"),remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var t=this.getFormattedDate();return this.inputField.val(t),this},getFormattedDate:function(i){i===e&&(i=this.o.format);var n=this.o.language;return t.map(this.dates,function(t){return m.formatDate(t,i,n)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(t){return this._process_options({startDate:t}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(t){return this._process_options({endDate:t}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(t){return this._process_options({daysOfWeekDisabled:t}),this.update(),this},setDaysOfWeekHighlighted:function(t){return this._process_options({daysOfWeekHighlighted:t}),this.update(),this},setDatesDisabled:function(t){return this._process_options({datesDisabled:t}),this.update(),this},place:function(){if(this.isInline)return this;var e=this.picker.outerWidth(),i=this.picker.outerHeight(),n=t(this.o.container),r=n.width(),o="body"===this.o.container?t(document).scrollTop():n.scrollTop(),s=n.offset(),a=[0];this.element.parents().each(function(){var e=t(this).css("z-index");"auto"!==e&&0!==Number(e)&&a.push(Number(e))});var l=Math.max.apply(Math,a)+this.o.zIndexOffset,c=this.component?this.component.parent().offset():this.element.offset(),h=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),d=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),u=c.left-s.left,p=c.top-s.top;"body"!==this.o.container&&(p+=o),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(u-=e-d)):c.left<0?(this.picker.addClass("datepicker-orient-left"),u-=c.left-10):u+e>r?(this.picker.addClass("datepicker-orient-right"),u+=d-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var f=this.o.orientation.y;if("auto"===f&&(f=-o+p-i<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+f),"top"===f?p-=i+parseInt(this.picker.css("padding-top")):p+=h,this.o.rtl){var m=r-(u+d);this.picker.css({top:p,right:m,zIndex:l})}else this.picker.css({top:p,left:u,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),n=!0):(i=(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return m.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=t.grep(i,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+='<th class="cw"> </th>');e<this.o.weekStart+7;)i+='<th class="dow',-1!==t.inArray(e,this.o.daysOfWeekDisabled)&&(i+=" disabled"),i+='">'+f[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",i=0;i<12;i++)e+='<span class="month'+(t&&t.getMonth()===i?" focused":"")+'">'+f[this.o.language].monthsShort[i]+"</span>";this.picker.find(".datepicker-months td").html(e)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],o=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),a=n();return e.getUTCFullYear()<o||e.getUTCFullYear()===o&&e.getUTCMonth()<s?i.push("old"):(e.getUTCFullYear()>o||e.getUTCFullYear()===o&&e.getUTCMonth()>s)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&r(e,a)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&i.push("range"),-1!==t.inArray(e.valueOf(),this.range)&&i.push("selected"),e.valueOf()===this.range[0]&&i.push("range-start"),e.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,n,r,o,s,a,l){for(var c,h,d,u="",p=r/10,f=this.picker.find(i),m=Math.floor(o/r)*r,g=m+9*p,v=Math.floor(this.viewDate.getFullYear()/p)*p,y=t.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/p)*p}),b=m-p;b<=g+p;b+=p)c=[n],h=null,b===m-p?c.push("old"):b===g+p&&c.push("new"),-1!==t.inArray(b,y)&&c.push("active"),(b<s||b>a)&&c.push("disabled"),b===v&&c.push("focused"),l!==t.noop&&((d=l(new Date(b,0,1)))===e?d={}:"boolean"==typeof d?d={enabled:d}:"string"==typeof d&&(d={classes:d}),!1===d.enabled&&c.push("disabled"),d.classes&&(c=c.concat(d.classes.split(/\s+/))),d.tooltip&&(h=d.tooltip)),u+='<span class="'+c.join(" ")+'"'+(h?' title="'+h+'"':"")+">"+b+"</span>";f.find(".datepicker-switch").text(m+"-"+g),f.find("td").html(u)},fill:function(){var n,r,o=new Date(this.viewDate),s=o.getUTCFullYear(),a=o.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,c=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,u=f[this.o.language].today||f.en.today||"",p=f[this.o.language].clear||f.en.clear||"",g=f[this.o.language].titleFormat||f.en.titleFormat;if(!isNaN(s)&&!isNaN(a)){this.picker.find(".datepicker-days .datepicker-switch").text(m.formatDate(o,g,this.o.language)),this.picker.find("tfoot .today").text(u).css("display",!0===this.o.todayBtn||"linked"===this.o.todayBtn?"table-cell":"none"),this.picker.find("tfoot .clear").text(p).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var v=i(s,a,0),y=v.getUTCDate();v.setUTCDate(y-(v.getUTCDay()-this.o.weekStart+7)%7);var b=new Date(v);v.getUTCFullYear()<100&&b.setUTCFullYear(v.getUTCFullYear()),b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var _,x,w=[];v.valueOf()<b;){if((_=v.getUTCDay())===this.o.weekStart&&(w.push("<tr>"),this.o.calendarWeeks)){var k=new Date(+v+(this.o.weekStart-_-7)%7*864e5),C=new Date(Number(k)+(11-k.getUTCDay())%7*864e5),S=new Date(Number(S=i(C.getUTCFullYear(),0,1))+(11-S.getUTCDay())%7*864e5),D=(C-S)/864e5/7+1;w.push('<td class="cw">'+D+"</td>")}(x=this.getClassNames(v)).push("day");var T=v.getUTCDate();this.o.beforeShowDay!==t.noop&&((r=this.o.beforeShowDay(this._utc_to_local(v)))===e?r={}:"boolean"==typeof r?r={enabled:r}:"string"==typeof r&&(r={classes:r}),!1===r.enabled&&x.push("disabled"),r.classes&&(x=x.concat(r.classes.split(/\s+/))),r.tooltip&&(n=r.tooltip),r.content&&(T=r.content)),x=t.isFunction(t.uniqueSort)?t.uniqueSort(x):t.unique(x),w.push('<td class="'+x.join(" ")+'"'+(n?' title="'+n+'"':"")+' data-date="'+v.getTime().toString()+'">'+T+"</td>"),n=null,_===this.o.weekEnd&&w.push("</tr>"),v.setUTCDate(v.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(w.join(""));var A=f[this.o.language].monthsTitle||f.en.monthsTitle||"Months",M=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?A:s).end().find("tbody span").removeClass("active");if(t.each(this.dates,function(t,e){e.getUTCFullYear()===s&&M.eq(e.getUTCMonth()).addClass("active")}),(s<l||s>h)&&M.addClass("disabled"),s===l&&M.slice(0,c).addClass("disabled"),s===h&&M.slice(d+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var E=this;t.each(M,function(i,n){var r=new Date(s,i,1),o=E.o.beforeShowMonth(r);o===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1!==o.enabled||t(n).hasClass("disabled")||t(n).addClass("disabled"),o.classes&&t(n).addClass(o.classes),o.tooltip&&t(n).prop("title",o.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,s,l,h,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,s,l,h,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,s,l,h,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t,e,i=new Date(this.viewDate),n=i.getUTCFullYear(),r=i.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,s=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,c=1;switch(this.viewMode){case 4:c*=10;case 3:c*=10;case 2:c*=10;case 1:t=Math.floor(n/c)*c<o,e=Math.floor(n/c)*c+c>a;break;case 0:t=n<=o&&r<s,e=n>=a&&r>l}this.picker.find(".prev").toggleClass("disabled",t),this.picker.find(".next").toggleClass("disabled",e)}},click:function(e){var r,o,s,a;e.preventDefault(),e.stopPropagation(),(r=t(e.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(n(),"linked"===this.o.todayBtn?null:"view")),r.hasClass("clear")&&this.clearDates(),r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),o=1,1===this.viewMode?(a=r.parent().find("span").index(r),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(a)):(a=0,s=Number(r.text()),this.viewDate.setUTCFullYear(s)),this._trigger(m.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(i(s,a,o)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(e){var i=t(e.currentTarget).data("date"),n=new Date(i);this.o.updateViewDate&&(n.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),n.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(n)},navArrowsClick:function(e){var i=t(e.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(i*=12*m.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,i),this._trigger(m.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),(!e&&this.o.updateViewDate||"view"===e)&&(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var i=new Date(t);return i.setUTCDate(t.getUTCDate()+e),i},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!function(t){return t&&!isNaN(t.getTime())}(t))return this.o.defaultViewDate;if(!e)return t;var i,n,r=new Date(t.valueOf()),o=r.getUTCDate(),s=r.getUTCMonth(),a=Math.abs(e);if(e=e>0?1:-1,1===a)n=-1===e?function(){return r.getUTCMonth()===s}:function(){return r.getUTCMonth()!==i},i=s+e,r.setUTCMonth(i),i=(i+12)%12;else{for(var l=0;l<a;l++)r=this.moveMonth(r,e);i=r.getUTCMonth(),r.setUTCDate(o),n=function(){return i!==r.getUTCMonth()}}for(;n();)r.setUTCDate(--o),r.setUTCMonth(i);return r},moveYear:function(t,e){return this.moveMonth(t,12*e)},moveAvailableDate:function(t,e,i){do{if(t=this[i](t,e),!this.dateWithinRange(t))return!1;i="moveDay"}while(this.dateIsDisabled(t));return t},weekOfDateIsDisabled:function(e){return-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(e){return this.weekOfDateIsDisabled(e)||t.grep(this.o.datesDisabled,function(t){return r(e,t)}).length>0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,i,n=!1,r=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(i=this.moveAvailableDate(r,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(i=this.moveAvailableDate(r,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?i=this.moveAvailableDate(r,e,"moveDay"):this.weekOfDateIsDisabled(r)||(i=this.moveAvailableDate(r,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(r,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),i=this.moveAvailableDate(r,e,"moveYear")),i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),n=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}n&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation())},setViewMode:function(t){this.viewMode=t,this.picker.children("div").hide().filter(".datepicker-"+m.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var c=function(e,i){t.data(e,"datepicker",this),this.element=t(e),this.inputs=t.map(i.inputs,function(t){return t.jquery?t[0]:t}),delete i.inputs,this.keepEmptyValues=i.keepEmptyValues,delete i.keepEmptyValues,d.call(t(this.inputs),i).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,function(e){return t.data(e,"datepicker")}),this.updateDates()};c.prototype={updateDates:function(){this.dates=t.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,function(t){return t.valueOf()});t.each(this.pickers,function(t,i){i.setRange(e)})},clearDates:function(){t.each(this.pickers,function(t,e){e.clearDates()})},dateUpdated:function(i){if(!this.updating){this.updating=!0;var n=t.data(i.target,"datepicker");if(n!==e){var r=n.getUTCDate(),o=this.keepEmptyValues,s=t.inArray(i.target,this.inputs),a=s-1,l=s+1,c=this.inputs.length;if(-1!==s){if(t.each(this.pickers,function(t,e){e.getUTCDate()||e!==n&&o||e.setUTCDate(r)}),r<this.dates[a])for(;a>=0&&r<this.dates[a];)this.pickers[a--].setUTCDate(r);else if(r>this.dates[l])for(;l<c&&r>this.dates[l];)this.pickers[l++].setUTCDate(r);this.updateDates(),delete this.updating}}}},destroy:function(){t.map(this.pickers,function(t){t.destroy()}),t(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var h=t.fn.datepicker,d=function(i){var n,r=Array.apply(null,arguments);if(r.shift(),this.each(function(){var e=t(this),o=e.data("datepicker"),a="object"==typeof i&&i;if(!o){var h=function(e,i){function n(t,e){return e.toLowerCase()}var r=t(e).data(),o={},s=new RegExp("^"+i.toLowerCase()+"([A-Z])");for(var a in i=new RegExp("^"+i.toLowerCase()),r)i.test(a)&&(o[a.replace(s,n)]=r[a]);return o}(this,"date"),d=s(t.extend({},u,h,a).language),p=t.extend({},u,d,h,a);e.hasClass("input-daterange")||p.inputs?(t.extend(p,{inputs:p.inputs||e.find("input").toArray()}),o=new c(this,p)):o=new l(this,p),e.data("datepicker",o)}"string"==typeof i&&"function"==typeof o[i]&&(n=o[i].apply(o,r))}),n===e||n instanceof l||n instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return n};t.fn.datepicker=d;var u=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},p=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=l;var f=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},m={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:e,parts:i}},parseDate:function(i,r,o,s){function a(){var t=this.slice(0,c[u].length),e=c[u].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!i)return e;if(i instanceof Date)return i;if("string"==typeof r&&(r=m.parseFormat(r)),r.toValue)return r.toValue(i,r,o);var c,h,d,u,p,g={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},v={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(i in v&&(i=v[i]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(i)){for(c=i.match(/([\-+]\d+)([dmwy])/gi),i=new Date,u=0;u<c.length;u++)h=c[u].match(/([\-+]\d+)([dmwy])/i),d=Number(h[1]),p=g[h[2].toLowerCase()],i=l.prototype[p](i,d);return l.prototype._zero_utc_time(i)}c=i&&i.match(this.nonpunctuation)||[];var y,b,_={},x=["yyyy","yy","M","MM","m","mm","d","dd"],w={yyyy:function(t,e){return t.setUTCFullYear(s?function(t,e){return!0===e&&(e=10),t<100&&(t+=2e3)>(new Date).getFullYear()+e&&(t-=100),t}(e,s):e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};w.yy=w.yyyy,w.M=w.MM=w.mm=w.m,w.dd=w.d,i=n();var k=r.parts.slice();if(c.length!==k.length&&(k=t(k).filter(function(e,i){return-1!==t.inArray(i,x)}).toArray()),c.length===k.length){var C,S,D;for(u=0,C=k.length;u<C;u++){if(y=parseInt(c[u],10),h=k[u],isNaN(y))switch(h){case"MM":b=t(f[o].months).filter(a),y=t.inArray(b[0],f[o].months)+1;break;case"M":b=t(f[o].monthsShort).filter(a),y=t.inArray(b[0],f[o].monthsShort)+1}_[h]=y}for(u=0;u<x.length;u++)(D=x[u])in _&&!isNaN(_[D])&&(S=new Date(i),w[D](S,_[D]),isNaN(S)||(i=S))}return i},formatDate:function(e,i,n){if(!e)return"";if("string"==typeof i&&(i=m.parseFormat(i)),i.toDisplay)return i.toDisplay(e,i,n);var r={d:e.getUTCDate(),D:f[n].daysShort[e.getUTCDay()],DD:f[n].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:f[n].monthsShort[e.getUTCMonth()],MM:f[n].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};r.dd=(r.d<10?"0":"")+r.d,r.mm=(r.m<10?"0":"")+r.m,e=[];for(var o=t.extend([],i.separators),s=0,a=i.parts.length;s<=a;s++)o.length&&e.push(o.shift()),e.push(r[i.parts[s]]);return e.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+u.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+u.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};m.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+m.headTemplate+"<tbody></tbody>"+m.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+m.headTemplate+m.contTemplate+m.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+m.headTemplate+m.contTemplate+m.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+m.headTemplate+m.contTemplate+m.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+m.headTemplate+m.contTemplate+m.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=m,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=h,this},t.fn.datepicker.version="1.8.0",t.fn.datepicker.deprecated=function(t){var e=window.console;e&&e.warn&&e.warn("DEPRECATED: "+t)},t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var i=t(this);i.data("datepicker")||(e.preventDefault(),d.call(i,"show"))}),t(function(){d.call(t('[data-provide="datepicker-inline"]'))})}),$.fn.datepicker.defaults.zIndexOffset=10,function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t,e){function i(){return new Date(Date.UTC.apply(Date,arguments))}"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,i){i===e&&(i=0),i<0&&(i+=this.length),i<0&&(i=0);for(var n=this.length;i<n;i++)if(i in this&&this[i]===t)return i;return-1});var n=function(i,n){var r=this;this.element=t(i),this.container=n.container||"body",this.language=n.language||this.element.data("date-language")||"en",this.language=this.language in o?this.language:this.language.split("-")[0],this.language=this.language in o?this.language:"en",this.isRTL=o[this.language].rtl||!1,this.formatType=n.formatType||this.element.data("format-type")||"standard",this.format=s.parseFormat(n.format||this.element.data("date-format")||o[this.language].format||s.getDefaultFormat(this.formatType,"input"),this.formatType),this.isInline=!1,this.isVisible=!1,this.isInput=this.element.is("input"),this.fontAwesome=n.fontAwesome||this.element.data("font-awesome")||!1,this.bootcssVer=n.bootcssVer||(this.isInput?this.element.is(".form-control")?3:2:this.bootcssVer=this.element.is(".input-group")?3:2),this.component=!!this.element.is(".date")&&(3===this.bootcssVer?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-remove, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar, .add-on .fa-calendar, .add-on .fa-clock-o").parent()),this.componentReset=!!this.element.is(".date")&&(3===this.bootcssVer?this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent():this.element.find(".add-on .icon-remove, .add-on .fa-times").parent()),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.linkField=n.linkField||this.element.data("link-field")||!1,this.linkFormat=s.parseFormat(n.linkFormat||this.element.data("link-format")||s.getDefaultFormat(this.formatType,"link"),this.formatType),this.minuteStep=n.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=n.pickerPosition||this.element.data("picker-position")||"bottom-right",this.showMeridian=n.showMeridian||this.element.data("show-meridian")||!1,this.initialDate=n.initialDate||new Date,this.zIndex=n.zIndex||this.element.data("z-index")||e,this.title=void 0!==n.title&&n.title,this.timezone=n.timezone||function(){var t,e,i,n,r;if((i=(null!=(r=(e=(new Date).toString()).split("(")[1])?r.slice(0,-1):0)||e.split(" "))instanceof Array){n=[];for(var o=0,s=i.length;o<s;o++)(t=null!==(r=i[o].match(/\b[A-Z]+\b/)))&&r[0]&&n.push(t);i=n.pop()}return i}(),this.icons={leftArrow:this.fontAwesome?"fa-arrow-left":3===this.bootcssVer?"glyphicon-arrow-left":"icon-arrow-left",rightArrow:this.fontAwesome?"fa-arrow-right":3===this.bootcssVer?"glyphicon-arrow-right":"icon-arrow-right"},this.icontype=this.fontAwesome?"fa":"glyphicon",this._attachEvents(),this.clickedOutside=function(e){0===t(e.target).closest(".datetimepicker").length&&r.hide()},this.formatViewType="datetime","formatViewType"in n?this.formatViewType=n.formatViewType:"formatViewType"in this.element.data()&&(this.formatViewType=this.element.data("formatViewType")),this.minView=0,"minView"in n?this.minView=n.minView:"minView"in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=s.convertViewMode(this.minView),this.maxView=s.modes.length-1,"maxView"in n?this.maxView=n.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=s.convertViewMode(this.maxView),this.wheelViewModeNavigation=!1,"wheelViewModeNavigation"in n?this.wheelViewModeNavigation=n.wheelViewModeNavigation:"wheelViewModeNavigation"in this.element.data()&&(this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")),this.wheelViewModeNavigationInverseDirection=!1,"wheelViewModeNavigationInverseDirection"in n?this.wheelViewModeNavigationInverseDirection=n.wheelViewModeNavigationInverseDirection:"wheelViewModeNavigationInverseDirection"in this.element.data()&&(this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")),this.wheelViewModeNavigationDelay=100,"wheelViewModeNavigationDelay"in n?this.wheelViewModeNavigationDelay=n.wheelViewModeNavigationDelay:"wheelViewModeNavigationDelay"in this.element.data()&&(this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")),this.startViewMode=2,"startView"in n?this.startViewMode=n.startView:"startView"in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=s.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,this.viewSelect=this.minView,"viewSelect"in n?this.viewSelect=n.viewSelect:"viewSelect"in this.element.data()&&(this.viewSelect=this.element.data("view-select")),this.viewSelect=s.convertViewMode(this.viewSelect),this.forceParse=!0,"forceParse"in n?this.forceParse=n.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse"));for(var a=3===this.bootcssVer?s.templateV3:s.template;-1!==a.indexOf("{iconType}");)a=a.replace("{iconType}",this.icontype);for(;-1!==a.indexOf("{leftArrow}");)a=a.replace("{leftArrow}",this.icons.leftArrow);for(;-1!==a.indexOf("{rightArrow}");)a=a.replace("{rightArrow}",this.icons.rightArrow);if(this.picker=t(a).appendTo(this.isInline?this.element:this.container).on({click:t.proxy(this.click,this),mousedown:t.proxy(this.mousedown,this)}),this.wheelViewModeNavigation&&(t.fn.mousewheel?this.picker.on({mousewheel:t.proxy(this.mousewheel,this)}):console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")),this.isInline?this.picker.addClass("datetimepicker-inline"):this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu"),this.isRTL){this.picker.addClass("datetimepicker-rtl");var l=3===this.bootcssVer?".prev span, .next span":".prev i, .next i";this.picker.find(l).toggleClass(this.icons.leftArrow+" "+this.icons.rightArrow)}t(document).on("mousedown touchend",this.clickedOutside),this.autoclose=!1,"autoclose"in n?this.autoclose=n.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in n?this.keyboardNavigation=n.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=n.todayBtn||this.element.data("date-today-btn")||!1,this.clearBtn=n.clearBtn||this.element.data("date-clear-btn")||!1,this.todayHighlight=n.todayHighlight||this.element.data("date-today-highlight")||!1,this.weekStart=0,void 0!==n.weekStart?this.weekStart=n.weekStart:void 0!==this.element.data("date-weekstart")?this.weekStart=this.element.data("date-weekstart"):void 0!==o[this.language].weekStart&&(this.weekStart=o[this.language].weekStart),this.weekStart=this.weekStart%7,this.weekEnd=(this.weekStart+6)%7,this.onRenderDay=function(t){var e=(n.onRenderDay||function(){return[]})(t);"string"==typeof e&&(e=[e]);return["day"].concat(e||[])},this.onRenderHour=function(t){var e=(n.onRenderHour||function(){return[]})(t);return"string"==typeof e&&(e=[e]),["hour"].concat(e||[])},this.onRenderMinute=function(t){var e=(n.onRenderMinute||function(){return[]})(t),i=["minute"];return"string"==typeof e&&(e=[e]),t<this.startDate||t>this.endDate?i.push("disabled"):Math.floor(this.date.getUTCMinutes()/this.minuteStep)===Math.floor(t.getUTCMinutes()/this.minuteStep)&&i.push("active"),i.concat(e||[])},this.onRenderYear=function(t){var e=(n.onRenderYear||function(){return[]})(t),i=["year"];"string"==typeof e&&(e=[e]),this.date.getUTCFullYear()===t.getUTCFullYear()&&i.push("active");var r=t.getUTCFullYear(),o=this.endDate.getUTCFullYear();return(t<this.startDate||r>o)&&i.push("disabled"),i.concat(e||[])},this.onRenderMonth=function(t){var e=(n.onRenderMonth||function(){return[]})(t);return"string"==typeof e&&(e=[e]),["month"].concat(e||[])},this.startDate=new Date(-8639968443048e3),this.endDate=new Date(8639968443048e3),this.datesDisabled=[],this.daysOfWeekDisabled=[],this.setStartDate(n.startDate||this.element.data("date-startdate")),this.setEndDate(n.endDate||this.element.data("date-enddate")),this.setDatesDisabled(n.datesDisabled||this.element.data("date-dates-disabled")),this.setDaysOfWeekDisabled(n.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.setMinutesDisabled(n.minutesDisabled||this.element.data("date-minute-disabled")),this.setHoursDisabled(n.hoursDisabled||this.element.data("date-hour-disabled")),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show()};n.prototype={constructor:n,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this._events=[[this.element,{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}]]:this.component&&this.hasInput?(this._events=[[this.element.find("input"),{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}],[this.component,{click:t.proxy(this.show,this)}]],this.componentReset&&this._events.push([this.componentReset,{click:t.proxy(this.reset,this)}])):this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:t.proxy(this.show,this)}]];for(var e,i,n=0;n<this._events.length;n++)e=this._events[n][0],i=this._events[n][1],e.on(i)},_detachEvents:function(){for(var t,e,i=0;i<this._events.length;i++)t=this._events[i][0],e=this._events[i][1],t.off(e);this._events=[]},show:function(e){this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.forceParse&&this.update(),this.place(),t(window).on("resize",t.proxy(this.place,this)),e&&(e.stopPropagation(),e.preventDefault()),this.isVisible=!0,this.element.trigger({type:"show",date:this.date})},hide:function(){this.isVisible&&(this.isInline||(this.picker.hide(),t(window).off("resize",this.place),this.viewMode=this.startViewMode,this.showMode(),this.isInput||t(document).off("mousedown",this.hide),this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this.isVisible=!1,this.element.trigger({type:"hide",date:this.date})))},remove:function(){this._detachEvents(),t(document).off("mousedown",this.clickedOutside),this.picker.remove(),delete this.picker,delete this.element.data().datetimepicker},getDate:function(){var t=this.getUTCDate();return null===t?null:new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},getInitialDate:function(){return this.initialDate},setInitialDate:function(t){this.initialDate=t},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){t>=this.startDate&&t<=this.endDate?(this.date=t,this.setValue(),this.viewDate=this.date,this.fill()):this.element.trigger({type:"outOfRange",date:t,startDate:this.startDate,endDate:this.endDate})},setFormat:function(t){var e;this.format=s.parseFormat(t,this.formatType),this.isInput?e=this.element:this.component&&(e=this.element.find("input")),e&&e.val()&&this.setValue()},setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e):(this.component&&this.element.find("input").val(e),this.element.data("date",e)),this.linkField&&t("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))},getFormattedDate:function(t){return t=t||this.format,s.formatDate(this.date,t,this.language,this.formatType,this.timezone)},setStartDate:function(t){this.startDate=t||this.startDate,8639968443048e3!==this.startDate.valueOf()&&(this.startDate=s.parseDate(this.startDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setEndDate:function(t){this.endDate=t||this.endDate,8639968443048e3!==this.endDate.valueOf()&&(this.endDate=s.parseDate(this.endDate,this.format,this.language,this.formatType,this.timezone)),this.update(),this.updateNavArrows()},setDatesDisabled:function(e){this.datesDisabled=e||[],t.isArray(this.datesDisabled)||(this.datesDisabled=this.datesDisabled.split(/,\s*/));var i=this;this.datesDisabled=t.map(this.datesDisabled,function(t){return s.parseDate(t,i.format,i.language,i.formatType,i.timezone).toDateString()}),this.update(),this.updateNavArrows()},setTitle:function(t,e){return this.picker.find(t).find("th:eq(1)").text(!1===this.title?e:this.title)},setDaysOfWeekDisabled:function(e){this.daysOfWeekDisabled=e||[],t.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=t.map(this.daysOfWeekDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},setMinutesDisabled:function(e){this.minutesDisabled=e||[],t.isArray(this.minutesDisabled)||(this.minutesDisabled=this.minutesDisabled.split(/,\s*/)),this.minutesDisabled=t.map(this.minutesDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},setHoursDisabled:function(e){this.hoursDisabled=e||[],t.isArray(this.hoursDisabled)||(this.hoursDisabled=this.hoursDisabled.split(/,\s*/)),this.hoursDisabled=t.map(this.hoursDisabled,function(t){return parseInt(t,10)}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){if(!this.zIndex){var e=0;t("div").each(function(){var i=parseInt(t(this).css("zIndex"),10);i>e&&(e=i)}),this.zIndex=e+10}var i,n,r,o;o=this.container instanceof t?this.container.offset():t(this.container).offset(),this.component?(r=(i=this.component.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(r+=this.component.outerWidth()-this.picker.outerWidth())):(r=(i=this.element.offset()).left,"bottom-left"!==this.pickerPosition&&"top-left"!==this.pickerPosition||(r+=this.element.outerWidth()-this.picker.outerWidth()));var s=document.body.clientWidth||window.innerWidth;r+220>s&&(r=s-220),n="top-left"===this.pickerPosition||"top-right"===this.pickerPosition?i.top-this.picker.outerHeight():i.top+this.height,n-=o.top,r-=o.left,this.picker.css({top:n,left:r,zIndex:this.zIndex})}},hour_minute:"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]",update:function(){var t,e=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):"string"==typeof(t=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate)&&(t=t.replace(/^\s+|\s+$/g,"")),t||(t=new Date,e=!1),"string"==typeof t&&(new RegExp(this.hour_minute).test(t)||new RegExp(this.hour_minute+":[0-5][0-9]").test(t))&&(t=this.getDate()),this.date=s.parseDate(t,this.format,this.language,this.formatType,this.timezone),e&&this.setValue(),this.date<this.startDate?this.viewDate=new Date(this.startDate):this.date>this.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:function(){for(var t=this.weekStart,e="<tr>";t<this.weekStart+7;)e+='<th class="dow">'+o[this.language].daysMin[t++%7]+"</th>";e+="</tr>",this.picker.find(".datetimepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=new Date(this.viewDate),i=0;i<12;i++){e.setUTCMonth(i),t+='<span class="'+this.onRenderMonth(e).join(" ")+'">'+o[this.language].monthsShort[i]+"</span>"}this.picker.find(".datetimepicker-months td").html(t)},fill:function(){if(this.date&&this.viewDate){var e=new Date(this.viewDate),n=e.getUTCFullYear(),a=e.getUTCMonth(),l=e.getUTCDate(),c=e.getUTCHours(),h=this.startDate.getUTCFullYear(),d=this.startDate.getUTCMonth(),u=this.endDate.getUTCFullYear(),p=this.endDate.getUTCMonth()+1,f=new i(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),m=new Date;if(this.setTitle(".datetimepicker-days",o[this.language].months[a]+" "+n),"time"===this.formatViewType){var g=this.getFormattedDate();this.setTitle(".datetimepicker-hours",g),this.setTitle(".datetimepicker-minutes",g)}else this.setTitle(".datetimepicker-hours",l+" "+o[this.language].months[a]+" "+n),this.setTitle(".datetimepicker-minutes",l+" "+o[this.language].months[a]+" "+n);this.picker.find("tfoot th.today").text(o[this.language].today||o.en.today).toggle(!1!==this.todayBtn),this.picker.find("tfoot th.clear").text(o[this.language].clear||o.en.clear).toggle(!1!==this.clearBtn),this.updateNavArrows(),this.fillMonths();var v=i(n,a-1,28,0,0,0,0),y=s.getDaysInMonth(v.getUTCFullYear(),v.getUTCMonth());v.setUTCDate(y),v.setUTCDate(y-(v.getUTCDay()-this.weekStart+7)%7);var b=new Date(v);b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var _,x=[];v.valueOf()<b;)v.getUTCDay()===this.weekStart&&x.push("<tr>"),_=this.onRenderDay(v),v.getUTCFullYear()<n||v.getUTCFullYear()===n&&v.getUTCMonth()<a?_.push("old"):(v.getUTCFullYear()>n||v.getUTCFullYear()===n&&v.getUTCMonth()>a)&&_.push("new"),this.todayHighlight&&v.getUTCFullYear()===m.getFullYear()&&v.getUTCMonth()===m.getMonth()&&v.getUTCDate()===m.getDate()&&_.push("today"),v.valueOf()===f&&_.push("active"),(v.valueOf()+864e5<=this.startDate||v.valueOf()>this.endDate||-1!==t.inArray(v.getUTCDay(),this.daysOfWeekDisabled)||-1!==t.inArray(v.toDateString(),this.datesDisabled))&&_.push("disabled"),x.push('<td class="'+_.join(" ")+'">'+v.getUTCDate()+"</td>"),v.getUTCDay()===this.weekEnd&&x.push("</tr>"),v.setUTCDate(v.getUTCDate()+1);this.picker.find(".datetimepicker-days tbody").empty().append(x.join("")),x=[];var w="",k="",C="",S=this.hoursDisabled||[];e=new Date(this.viewDate);for(var D=0;D<24;D++){e.setUTCHours(D),_=this.onRenderHour(e),-1!==S.indexOf(D)&&_.push("disabled");var T=i(n,a,l,D);T.valueOf()+36e5<=this.startDate||T.valueOf()>this.endDate?_.push("disabled"):c===D&&_.push("active"),this.showMeridian&&2===o[this.language].meridiem.length?((k=D<12?o[this.language].meridiem[0]:o[this.language].meridiem[1])!==C&&(""!==C&&x.push("</fieldset>"),x.push('<fieldset class="hour"><legend>'+k.toUpperCase()+"</legend>")),C=k,w=D%12?D%12:12,D<12?_.push("hour_am"):_.push("hour_pm"),x.push('<span class="'+_.join(" ")+'">'+w+"</span>"),23===D&&x.push("</fieldset>")):(w=D+":00",x.push('<span class="'+_.join(" ")+'">'+w+"</span>"))}this.picker.find(".datetimepicker-hours td").html(x.join("")),x=[],w="",k="",C="";var A=this.minutesDisabled||[];e=new Date(this.viewDate);for(D=0;D<60;D+=this.minuteStep)-1===A.indexOf(D)&&(e.setUTCMinutes(D),e.setUTCSeconds(0),_=this.onRenderMinute(e),this.showMeridian&&2===o[this.language].meridiem.length?((k=c<12?o[this.language].meridiem[0]:o[this.language].meridiem[1])!==C&&(""!==C&&x.push("</fieldset>"),x.push('<fieldset class="minute"><legend>'+k.toUpperCase()+"</legend>")),C=k,w=c%12?c%12:12,x.push('<span class="'+_.join(" ")+'">'+w+":"+(D<10?"0"+D:D)+"</span>"),59===D&&x.push("</fieldset>")):(w=D+":00",x.push('<span class="'+_.join(" ")+'">'+c+":"+(D<10?"0"+D:D)+"</span>")));this.picker.find(".datetimepicker-minutes td").html(x.join(""));var M=this.date.getUTCFullYear(),E=this.setTitle(".datetimepicker-months",n).end().find(".month").removeClass("active");M===n&&E.eq(this.date.getUTCMonth()).addClass("active"),(n<h||n>u)&&E.addClass("disabled"),n===h&&E.slice(0,d).addClass("disabled"),n===u&&E.slice(p).addClass("disabled"),x="",n=10*parseInt(n/10,10);var P=this.setTitle(".datetimepicker-years",n+"-"+(n+9)).end().find("td");n-=1,e=new Date(this.viewDate);for(D=-1;D<11;D++)e.setUTCFullYear(n),_=this.onRenderYear(e),-1!==D&&10!==D||_.push(r),x+='<span class="'+_.join(" ")+'">'+n+"</span>",n+=1;P.html(x),this.place()}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth(),n=t.getUTCDate(),r=t.getUTCHours();switch(this.viewMode){case 0:e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&n<=this.startDate.getUTCDate()&&r<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&n>=this.endDate.getUTCDate()&&r>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&n<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&n>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:e<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),e>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},mousewheel:function(e){if(e.preventDefault(),e.stopPropagation(),!this.wheelPause){this.wheelPause=!0;var i=e.originalEvent.wheelDelta,n=i>0?1:0===i?0:-1;this.wheelViewModeNavigationInverseDirection&&(n=-n),this.showMode(n),setTimeout(t.proxy(function(){this.wheelPause=!1},this),this.wheelViewModeNavigationDelay)}},click:function(e){e.stopPropagation(),e.preventDefault();var n=t(e.target).closest("span, td, th, legend");if(n.is("."+this.icontype)&&(n=t(n).parent().closest("span, td, th, legend")),1===n.length){if(n.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var r=s.modes[this.viewMode].navStep*("prev"===n[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,r);break;case 1:this.viewDate=this.moveDate(this.viewDate,r);break;case 2:this.viewDate=this.moveMonth(this.viewDate,r);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,r)}this.fill(),this.element.trigger({type:n[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"clear":this.reset(),this.autoclose&&this.hide();break;case"today":var o=new Date;(o=i(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours(),o.getMinutes(),o.getSeconds(),0))<this.startDate?o=this.startDate:o>this.endDate&&(o=this.endDate),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(o),this.fill(),this.autoclose&&this.hide()}break;case"span":if(!n.is(".disabled")){var a=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),c=this.viewDate.getUTCDate(),h=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();if(n.is(".month")?(this.viewDate.setUTCDate(1),l=n.parent().find("span").index(n),c=this.viewDate.getUTCDate(),this.viewDate.setUTCMonth(l),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.viewSelect>=3&&this._setDate(i(a,l,c,h,d,u,0))):n.is(".year")?(this.viewDate.setUTCDate(1),a=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(a),this.element.trigger({type:"changeYear",date:this.viewDate}),this.viewSelect>=4&&this._setDate(i(a,l,c,h,d,u,0))):n.is(".hour")?(h=parseInt(n.text(),10)||0,(n.hasClass("hour_am")||n.hasClass("hour_pm"))&&(12===h&&n.hasClass("hour_am")?h=0:12!==h&&n.hasClass("hour_pm")&&(h+=12)),this.viewDate.setUTCHours(h),this.element.trigger({type:"changeHour",date:this.viewDate}),this.viewSelect>=1&&this._setDate(i(a,l,c,h,d,u,0))):n.is(".minute")&&(d=parseInt(n.text().substr(n.text().indexOf(":")+1),10)||0,this.viewDate.setUTCMinutes(d),this.element.trigger({type:"changeMinute",date:this.viewDate}),this.viewSelect>=0&&this._setDate(i(a,l,c,h,d,u,0))),0!==this.viewMode){var p=this.viewMode;this.showMode(-1),this.fill(),p===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(n.is(".day")&&!n.is(".disabled")){c=parseInt(n.text(),10)||1,a=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),h=this.viewDate.getUTCHours(),d=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();n.is(".old")?0===l?(l=11,a-=1):l-=1:n.is(".new")&&(11===l?(l=0,a+=1):l+=1),this.viewDate.setUTCFullYear(a),this.viewDate.setUTCMonth(l,c),this.element.trigger({type:"changeDay",date:this.viewDate}),this.viewSelect>=2&&this._setDate(i(a,l,c,h,d,u,0))}p=this.viewMode;this.showMode(-1),this.fill(),p===this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(t,e){var i;e&&"date"!==e||(this.date=t),e&&"view"!==e||(this.viewDate=t),this.fill(),this.setValue(),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&i.change(),this.element.trigger({type:"changeDate",date:this.getDate()}),null===t&&(this.date=this.viewDate)},moveMinute:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCMinutes(i.getUTCMinutes()+e*this.minuteStep),i},moveHour:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCHours(i.getUTCHours()+e),i},moveDate:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return i.setUTCDate(i.getUTCDate()+e),i},moveMonth:function(t,e){if(!e)return t;var i,n,r=new Date(t.valueOf()),o=r.getUTCDate(),s=r.getUTCMonth(),a=Math.abs(e);if(e=e>0?1:-1,1===a)n=-1===e?function(){return r.getUTCMonth()===s}:function(){return r.getUTCMonth()!==i},i=s+e,r.setUTCMonth(i),(i<0||i>11)&&(i=(i+12)%12);else{for(var l=0;l<a;l++)r=this.moveMonth(r,e);i=r.getUTCMonth(),r.setUTCDate(o),n=function(){return i!==r.getUTCMonth()}}for(;n();)r.setUTCDate(--o),r.setUTCMonth(i);return r},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.startDate&&t<=this.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27===t.keyCode&&this.show();else{var e,i,n,r,o=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;e=37===t.keyCode?-1:1;var s=this.viewMode;t.ctrlKey?s+=2:t.shiftKey&&(s+=1),4===s?(i=this.moveYear(this.date,e),n=this.moveYear(this.viewDate,e)):3===s?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2===s?(i=this.moveDate(this.date,e),n=this.moveDate(this.viewDate,e)):1===s?(i=this.moveHour(this.date,e),n=this.moveHour(this.viewDate,e)):0===s&&(i=this.moveMinute(this.date,e),n=this.moveMinute(this.viewDate,e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),o=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;e=38===t.keyCode?-1:1,s=this.viewMode,t.ctrlKey?s+=2:t.shiftKey&&(s+=1),4===s?(i=this.moveYear(this.date,e),n=this.moveYear(this.viewDate,e)):3===s?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):2===s?(i=this.moveDate(this.date,7*e),n=this.moveDate(this.viewDate,7*e)):1===s?this.showMeridian?(i=this.moveHour(this.date,6*e),n=this.moveHour(this.viewDate,6*e)):(i=this.moveHour(this.date,4*e),n=this.moveHour(this.viewDate,4*e)):0===s&&(i=this.moveMinute(this.date,4*e),n=this.moveMinute(this.viewDate,4*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),o=!0);break;case 13:if(0!==this.viewMode){var a=this.viewMode;this.showMode(-1),this.fill(),a===this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide();t.preventDefault();break;case 9:this.hide()}if(o)this.isInput?r=this.element:this.component&&(r=this.element.find("input")),r&&r.change(),this.element.trigger({type:"changeDate",date:this.getDate()})}},showMode:function(t){if(t){var e=Math.max(0,Math.min(s.modes.length-1,this.viewMode+t));e>=this.minView&&e<=this.maxView&&(this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:e}),this.viewMode=e)}this.picker.find(">div").hide().filter(".datetimepicker-"+s.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},reset:function(){this._setDate(null,"date")},convertViewModeText:function(t){switch(t){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var r=t.fn.datetimepicker;t.fn.datetimepicker=function(i){var r,o=Array.apply(null,arguments);return o.shift(),this.each(function(){var s=t(this),a=s.data("datetimepicker"),l="object"==typeof i&&i;if(a||s.data("datetimepicker",a=new n(this,t.extend({},t.fn.datetimepicker.defaults,l))),"string"==typeof i&&"function"==typeof a[i]&&(r=a[i].apply(a,o))!==e)return!1}),r!==e?r:this},t.fn.datetimepicker.defaults={},t.fn.datetimepicker.Constructor=n;var o=t.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today",clear:"Clear"}},s={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,s.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},getDefaultFormat:function(t,e){if("standard"===t)return"input"===e?"yyyy-mm-dd hh:ii":"yyyy-mm-dd hh:ii:ss";if("php"===t)return"input"===e?"Y-m-d H:i":"Y-m-d H:i:s";throw new Error("Invalid format type.")},validParts:function(t){if("standard"===t)return/t|hh?|HH?|p|P|z|Z|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;if("php"===t)return/[dDjlNwzFmMnStyYaABgGhHis]/g;throw new Error("Invalid format type.")},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(t,e){var i=t.replace(this.validParts(e),"\0").split("\0"),n=t.match(this.validParts(e));if(!i||!i.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:i,parts:n}},parseDate:function(e,r,s,a,l){if(e instanceof Date){var c=new Date(e.valueOf()-6e4*e.getTimezoneOffset());return c.setMilliseconds(0),c}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(e)&&(r=this.parseFormat("yyyy-mm-dd",a)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(e)&&(r=this.parseFormat("yyyy-mm-dd hh:ii",a)),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(e)&&(r=this.parseFormat("yyyy-mm-dd hh:ii:ss",a)),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(e)){var h,d=/([-+]\d+)([dmwy])/,u=e.match(/([-+]\d+)([dmwy])/g);e=new Date;for(var p=0;p<u.length;p++)switch(g=d.exec(u[p]),h=parseInt(g[1]),g[2]){case"d":e.setUTCDate(e.getUTCDate()+h);break;case"m":e=n.prototype.moveMonth.call(n.prototype,e,h);break;case"w":e.setUTCDate(e.getUTCDate()+7*h);break;case"y":e=n.prototype.moveYear.call(n.prototype,e,h)}return i(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),0)}u=e&&e.toString().match(this.nonpunctuation)||[],e=new Date(0,0,0,0,0,0,0);var f,m,g,v={},y=["hh","h","ii","i","ss","s","yyyy","yy","M","MM","m","mm","D","DD","d","dd","H","HH","p","P","z","Z"],b={hh:function(t,e){return t.setUTCHours(e)},h:function(t,e){return t.setUTCHours(e)},HH:function(t,e){return t.setUTCHours(12===e?0:e)},H:function(t,e){return t.setUTCHours(12===e?0:e)},ii:function(t,e){return t.setUTCMinutes(e)},i:function(t,e){return t.setUTCMinutes(e)},ss:function(t,e){return t.setUTCSeconds(e)},s:function(t,e){return t.setUTCSeconds(e)},yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;){if(isNaN(t.getUTCMonth()))return t;t.setUTCDate(t.getUTCDate()-1)}return t},d:function(t,e){return t.setUTCDate(e)},p:function(t,e){return t.setUTCHours(1===e?t.getUTCHours()+12:t.getUTCHours())},z:function(){return l}};if(b.M=b.MM=b.mm=b.m,b.dd=b.d,b.P=b.p,b.Z=b.z,e=i(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()),u.length===r.parts.length){p=0;for(var _=r.parts.length;p<_;p++){if(f=parseInt(u[p],10),g=r.parts[p],isNaN(f))switch(g){case"MM":m=t(o[s].months).filter(function(){var t=this.slice(0,u[p].length);return t===u[p].slice(0,t.length)}),f=t.inArray(m[0],o[s].months)+1;break;case"M":m=t(o[s].monthsShort).filter(function(){var t=this.slice(0,u[p].length),e=u[p].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}),f=t.inArray(m[0],o[s].monthsShort)+1;break;case"p":case"P":f=t.inArray(u[p].toLowerCase(),o[s].meridiem)}v[g]=f}var x;for(p=0;p<y.length;p++)(x=y[p])in v&&!isNaN(v[x])&&b[x](e,v[x])}return e},formatDate:function(e,i,n,r,a){if(null===e)return"";var l;if("standard"===r)l={t:e.getTime(),yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear(),m:e.getUTCMonth()+1,M:o[n].monthsShort[e.getUTCMonth()],MM:o[n].months[e.getUTCMonth()],d:e.getUTCDate(),D:o[n].daysShort[e.getUTCDay()],DD:o[n].days[e.getUTCDay()],p:2===o[n].meridiem.length?o[n].meridiem[e.getUTCHours()<12?0:1]:"",h:e.getUTCHours(),i:e.getUTCMinutes(),s:e.getUTCSeconds(),z:a},2===o[n].meridiem.length?l.H=l.h%12==0?12:l.h%12:l.H=l.h,l.HH=(l.H<10?"0":"")+l.H,l.P=l.p.toUpperCase(),l.Z=l.z,l.hh=(l.h<10?"0":"")+l.h,l.ii=(l.i<10?"0":"")+l.i,l.ss=(l.s<10?"0":"")+l.s,l.dd=(l.d<10?"0":"")+l.d,l.mm=(l.m<10?"0":"")+l.m;else{if("php"!==r)throw new Error("Invalid format type.");(l={y:e.getUTCFullYear().toString().substring(2),Y:e.getUTCFullYear(),F:o[n].months[e.getUTCMonth()],M:o[n].monthsShort[e.getUTCMonth()],n:e.getUTCMonth()+1,t:s.getDaysInMonth(e.getUTCFullYear(),e.getUTCMonth()),j:e.getUTCDate(),l:o[n].days[e.getUTCDay()],D:o[n].daysShort[e.getUTCDay()],w:e.getUTCDay(),N:0===e.getUTCDay()?7:e.getUTCDay(),S:e.getUTCDate()%10<=o[n].suffix.length?o[n].suffix[e.getUTCDate()%10-1]:"",a:2===o[n].meridiem.length?o[n].meridiem[e.getUTCHours()<12?0:1]:"",g:e.getUTCHours()%12==0?12:e.getUTCHours()%12,G:e.getUTCHours(),i:e.getUTCMinutes(),s:e.getUTCSeconds()}).m=(l.n<10?"0":"")+l.n,l.d=(l.j<10?"0":"")+l.j,l.A=l.a.toString().toUpperCase(),l.h=(l.g<10?"0":"")+l.g,l.H=(l.G<10?"0":"")+l.G,l.i=(l.i<10?"0":"")+l.i,l.s=(l.s<10?"0":"")+l.s}e=[];for(var c=t.extend([],i.separators),h=0,d=i.parts.length;h<d;h++)c.length&&e.push(c.shift()),e.push(l[i.parts[h]]);return c.length&&e.push(c.shift()),e.join("")},convertViewMode:function(t){switch(t){case 4:case"decade":t=4;break;case 3:case"year":t=3;break;case 2:case"month":t=2;break;case 1:case"day":t=1;break;case 0:case"hour":t=0}return t},headTemplate:'<thead><tr><th class="prev"><i class="{iconType} {leftArrow}"/></th><th colspan="5" class="switch"></th><th class="next"><i class="{iconType} {rightArrow}"/></th></tr></thead>',headTemplateV3:'<thead><tr><th class="prev"><span class="{iconType} {leftArrow}"></span> </th><th colspan="5" class="switch"></th><th class="next"><span class="{iconType} {rightArrow}"></span> </th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};s.template='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+s.headTemplate+"<tbody></tbody>"+s.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+"</table></div></div>",s.templateV3='<div class="datetimepicker"><div class="datetimepicker-minutes"><table class=" table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+'</table></div><div class="datetimepicker-hours"><table class=" table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+'</table></div><div class="datetimepicker-days"><table class=" table-condensed">'+s.headTemplateV3+"<tbody></tbody>"+s.footTemplate+'</table></div><div class="datetimepicker-months"><table class="table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+'</table></div><div class="datetimepicker-years"><table class="table-condensed">'+s.headTemplateV3+s.contTemplate+s.footTemplate+"</table></div></div>",t.fn.datetimepicker.DPGlobal=s,t.fn.datetimepicker.noConflict=function(){return t.fn.datetimepicker=r,this},t(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(e){var i=t(this);i.data("datetimepicker")||(e.preventDefault(),i.datetimepicker("show"))}),t(function(){t('[data-provide="datetimepicker-inline"]').datetimepicker()})}),function(t,e,i){"use strict";var n=function(e,i){this.widget="",this.$element=t(e),this.defaultTime=i.defaultTime,this.disableFocus=i.disableFocus,this.disableMousewheel=i.disableMousewheel,this.isOpen=i.isOpen,this.minuteStep=i.minuteStep,this.modalBackdrop=i.modalBackdrop,this.orientation=i.orientation,this.secondStep=i.secondStep,this.snapToStep=i.snapToStep,this.showInputs=i.showInputs,this.showMeridian=i.showMeridian,this.showSeconds=i.showSeconds,this.template=i.template,this.appendWidgetTo=i.appendWidgetTo,this.showWidgetOnAddonClick=i.showWidgetOnAddonClick,this.icons=i.icons,this.maxHours=i.maxHours,this.explicitMode=i.explicitMode,this.handleDocumentClick=function(t){var e=t.data.scope;e.$element.parent().find(t.target).length||e.$widget.is(t.target)||e.$widget.find(t.target).length||e.hideWidget()},this._init()};n.prototype={constructor:n,_init:function(){var e=this;this.showWidgetOnAddonClick&&this.$element.parent().hasClass("input-group")&&this.$element.parent().hasClass("bootstrap-timepicker")?(this.$element.parent(".input-group.bootstrap-timepicker").find(".input-group-addon").on({"click.timepicker":t.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":t.proxy(this.showWidget,this),"click.timepicker":t.proxy(this.showWidget,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":t.proxy(this.highlightUnit,this),"click.timepicker":t.proxy(this.highlightUnit,this),"keydown.timepicker":t.proxy(this.elementKeydown,this),"blur.timepicker":t.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":t.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=t(this.getTemplate()).on("click",t.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each(function(){t(this).on({"click.timepicker":function(){t(this).select()},"keydown.timepicker":t.proxy(e.widgetKeydown,e),"keyup.timepicker":t.proxy(e.widgetKeyup,e)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=this.maxHours-1:this.hour--},decrementMinute:function(t){var e;0>(e=t?this.minute-t:this.minute-this.minuteStep)?(this.decrementHour(),this.minute=e+60):this.minute=e},decrementSecond:function(){var t=this.second-this.secondStep;0>t?(this.decrementMinute(!0),this.second=t+60):this.second=t},elementKeydown:function(t){switch(t.which){case 9:if(t.shiftKey){if("hour"===this.highlightedUnit){this.hideWidget();break}this.highlightPrevUnit()}else{if(this.showMeridian&&"meridian"===this.highlightedUnit||this.showSeconds&&"second"===this.highlightedUnit||!this.showMeridian&&!this.showSeconds&&"minute"===this.highlightedUnit){this.hideWidget();break}this.highlightNextUnit()}t.preventDefault(),this.updateFromElementVal();break;case 27:this.updateFromElementVal();break;case 37:t.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:t.preventDefault(),this.highlightNextUnit(),this.updateFromElementVal();break;case 40:switch(t.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var t=this.$element.get(0);if("selectionStart"in t)return t.selectionStart;if(i.selection){t.focus();var e=i.selection.createRange(),n=i.selection.createRange().text.length;return e.moveStart("character",-t.value.length),e.text.length-n}},getTemplate:function(){var t,e,i,n,r,o;switch(this.showInputs?(e='<input type="text" class="bootstrap-timepicker-hour" maxlength="2"/>',i='<input type="text" class="bootstrap-timepicker-minute" maxlength="2"/>',n='<input type="text" class="bootstrap-timepicker-second" maxlength="2"/>',r='<input type="text" class="bootstrap-timepicker-meridian" maxlength="2"/>'):(e='<span class="bootstrap-timepicker-hour"></span>',i='<span class="bootstrap-timepicker-minute"></span>',n='<span class="bootstrap-timepicker-second"></span>',r='<span class="bootstrap-timepicker-meridian"></span>'),o='<table><tr><td><a href="#" data-action="incrementHour"><span class="'+this.icons.up+'"></span></a></td><td class="separator"> </td><td><a href="#" data-action="incrementMinute"><span class="'+this.icons.up+'"></span></a></td>'+(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="incrementSecond"><span class="'+this.icons.up+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><span class="'+this.icons.up+'"></span></a></td>':"")+"</tr><tr><td>"+e+'</td> <td class="separator">:</td><td>'+i+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+n+"</td>":"")+(this.showMeridian?'<td class="separator"> </td><td>'+r+"</td>":"")+'</tr><tr><td><a href="#" data-action="decrementHour"><span class="'+this.icons.down+'"></span></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><span class="'+this.icons.down+'"></span></a></td>'+(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="decrementSecond"><span class="'+this.icons.down+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td><a href="#" data-action="toggleMeridian"><span class="'+this.icons.down+'"></span></a></td>':"")+"</tr></table>",this.template){case"modal":t='<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="'+(this.modalBackdrop?"true":"false")+'"><div class="modal-header"><a href="#" class="close" data-dismiss="modal">×</a><h3>Pick a Time</h3></div><div class="modal-content">'+o+'</div><div class="modal-footer"><a href="#" class="btn btn-primary" data-dismiss="modal">OK</a></div></div>';break;case"dropdown":t='<div class="bootstrap-timepicker-widget dropdown-menu">'+o+"</div>"}return t},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),t(i).off("mousedown.timepicker, touchend.timepicker",this.handleDocumentClick),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="hour",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(0,1):t.setSelectionRange(0,2)},0)},highlightMinute:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="minute",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(2,4):t.setSelectionRange(3,5)},0)},highlightSecond:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="second",t.setSelectionRange&&setTimeout(function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)},0)},highlightMeridian:function(){var t=this.$element.get(0),e=this;this.highlightedUnit="meridian",t.setSelectionRange&&(this.showSeconds?setTimeout(function(){e.hour<10?t.setSelectionRange(8,10):t.setSelectionRange(9,11)},0):setTimeout(function(){e.hour<10?t.setSelectionRange(5,7):t.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}return this.hour===this.maxHours-1?void(this.hour=0):void this.hour++},incrementMinute:function(t){var e;(e=t?this.minute+t:this.minute+this.minuteStep-this.minute%this.minuteStep)>59?(this.incrementHour(),this.minute=e-60):this.minute=e},incrementSecond:function(){var t=this.second+this.secondStep-this.second%this.secondStep;t>59?(this.incrementMinute(!0),this.second=t-60):this.second=t},mousewheel:function(e){if(!this.disableMousewheel){e.preventDefault(),e.stopPropagation();var i=e.originalEvent.wheelDelta||-e.originalEvent.detail,n=null;switch("mousewheel"===e.type?n=-1*e.originalEvent.wheelDelta:"DOMMouseScroll"===e.type&&(n=40*e.originalEvent.detail),n&&(e.preventDefault(),t(this).scrollTop(n+t(this).scrollTop())),this.highlightedUnit){case"minute":i>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":i>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:i>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},changeToNearestStep:function(t,e){return t%e==0?t:Math.round(t%e/e)?(t+(e-t%e))%60:t-t%e},place:function(){if(!this.isInline){var i=this.$widget.outerWidth(),n=this.$widget.outerHeight(),r=t(e).width(),o=t(e).height(),s=t(e).scrollTop(),a=parseInt(this.$element.parents().filter(function(){return"auto"!==t(this).css("z-index")}).first().css("z-index"),10)+10,l=this.component?this.component.parent().offset():this.$element.offset(),c=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),h=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),d=l.left,u=l.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.$widget.addClass("timepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(d-=i-h)):(this.$widget.addClass("timepicker-orient-left"),l.left<0?d-=l.left-10:l.left+i>r&&(d=r-i-10));var p,f,m=this.orientation.y;"auto"===m&&(p=-s+l.top-n,f=s+o-(l.top+c+n),m=Math.max(p,f)===f?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+m),"top"===m?u+=c:u-=n+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:u,left:d,zIndex:a})}},remove:function(){t("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(t){if(this.$element.val())this.updateFromElementVal();else if("current"===t){var e=new Date,i=e.getHours(),n=e.getMinutes(),r=e.getSeconds(),o="AM";0!==r&&(60===(r=Math.ceil(e.getSeconds()/this.secondStep)*this.secondStep)&&(n+=1,r=0)),0!==n&&(60===(n=Math.ceil(e.getMinutes()/this.minuteStep)*this.minuteStep)&&(i+=1,n=0)),this.showMeridian&&(0===i?i=12:i>=12?(i>12&&(i-=12),o="PM"):o="AM"),this.hour=i,this.minute=n,this.second=r,this.meridian=o,this.update()}else!1===t?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(t)},setTime:function(t,e){if(t){var i,n,r,o,s,a;if("object"==typeof t&&t.getMonth)r=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),this.showMeridian&&(a="AM",r>12&&(a="PM",r%=12),12===r&&(a="PM"));else{if((i=(/a/i.test(t)?1:0)+(/p/i.test(t)?2:0))>2)return void this.clear();if(r=(n=t.replace(/[^0-9\:]/g,"").split(":"))[0]?n[0].toString():n.toString(),this.explicitMode&&r.length>2&&r.length%2!=0)return void this.clear();o=n[1]?n[1].toString():"",s=n[2]?n[2].toString():"",r.length>4&&(s=r.slice(-2),r=r.slice(0,-2)),r.length>2&&(o=r.slice(-2),r=r.slice(0,-2)),o.length>2&&(s=o.slice(-2),o=o.slice(0,-2)),r=parseInt(r,10),o=parseInt(o,10),s=parseInt(s,10),isNaN(r)&&(r=0),isNaN(o)&&(o=0),isNaN(s)&&(s=0),s>59&&(s=59),o>59&&(o=59),r>=this.maxHours&&(r=this.maxHours-1),this.showMeridian?(r>12&&(i=2,r-=12),i||(i=1),0===r&&(r=12),a=1===i?"AM":"PM"):12>r&&2===i?r+=12:r>=this.maxHours?r=this.maxHours-1:(0>r||12===r&&1===i)&&(r=0)}this.hour=r,this.snapToStep?(this.minute=this.changeToNearestStep(o,this.minuteStep),this.second=this.changeToNearestStep(s,this.secondStep)):(this.minute=o,this.second=s),this.meridian=a,this.update(e)}else this.clear()},showWidget:function(){this.isOpen||this.$element.is(":disabled")||(this.$widget.appendTo(this.appendWidgetTo),t(i).on("mousedown.timepicker, touchend.timepicker",{scope:this},this.handleDocumentClick),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",t.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0)},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(t){this.updateElement(),t||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var t=this.hour,e=1===this.minute.toString().length?"0"+this.minute:this.minute,i=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(t),this.$widget.find("input.bootstrap-timepicker-minute").val(e),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(i),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(t),this.$widget.find("span.bootstrap-timepicker-minute").text(e),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(i),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var t=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(t,!0)}},widgetClick:function(e){e.stopPropagation(),e.preventDefault();var i=t(e.target),n=i.closest("a").data("action");n&&this[n](),this.update(),i.is("input")&&i.get(0).setSelectionRange(0,2)},widgetKeydown:function(e){var i=t(e.target),n=i.attr("class").replace("bootstrap-timepicker-","");switch(e.which){case 9:if(e.shiftKey){if("hour"===n)return this.hideWidget()}else if(this.showMeridian&&"meridian"===n||this.showSeconds&&"second"===n||!this.showMeridian&&!this.showSeconds&&"minute"===n)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(e.preventDefault(),n){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2);break;case 40:switch(e.preventDefault(),n){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),i.get(0).setSelectionRange(0,2)}},widgetKeyup:function(t){(65===t.which||77===t.which||80===t.which||46===t.which||8===t.which||t.which>=48&&t.which<=57||t.which>=96&&t.which<=105)&&this.updateFromWidgetInputs()}},t.fn.timepicker=function(e){var i=Array.apply(null,arguments);return i.shift(),this.each(function(){var r=t(this),o=r.data("timepicker"),s="object"==typeof e&&e;o||r.data("timepicker",o=new n(this,t.extend({},t.fn.timepicker.defaults,s,t(this).data()))),"string"==typeof e&&o[e].apply(o,i)})},t.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,snapToStep:!1,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,icons:{up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},maxHours:24,explicitMode:!1},t.fn.timepicker.Constructor=n,t(i).on("focus.timepicker.data-api click.timepicker.data-api",'[data-provide="timepicker"]',function(e){var i=t(this);i.data("timepicker")||(e.preventDefault(),i.timepicker())})}(jQuery,window,document),$.fn.timepicker.defaults=$.extend(!0,{},$.fn.timepicker.defaults,{icons:{up:"la la-angle-up",down:"la la-angle-down"}}),function(t,e){if("function"==typeof define&&define.amd)define(["moment","jquery"],function(t,i){return i.fn||(i.fn={}),e(t,i)});else if("object"==typeof module&&module.exports){var i="undefined"!=typeof window?window.jQuery:void 0;i||(i=require("jquery")).fn||(i.fn={});var n="undefined"!=typeof window&&void 0!==window.moment?window.moment:require("moment");module.exports=e(n,i)}else t.daterangepicker=e(t.moment,t.jQuery)}(this,function(t,e){var i=function(i,n,r){if(this.parentEl="body",this.element=e(i),this.startDate=t().startOf("day"),this.endDate=t().endOf("day"),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.autoApply=!1,this.singleDatePicker=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.showISOWeekNumbers=!1,this.showCustomRangeLabel=!0,this.timePicker=!1,this.timePicker24Hour=!1,this.timePickerIncrement=1,this.timePickerSeconds=!1,this.linkedCalendars=!0,this.autoUpdateInput=!0,this.alwaysShowCalendars=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.drops="down",this.element.hasClass("dropup")&&(this.drops="up"),this.buttonClasses="btn btn-sm",this.applyClass="btn-success",this.cancelClass="btn-default",this.locale={direction:"ltr",format:t.localeData().longDateFormat("L"),separator:" - ",applyLabel:"Apply",cancelLabel:"Cancel",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:t.weekdaysMin(),monthNames:t.monthsShort(),firstDay:t.localeData().firstDayOfWeek()},this.callback=function(){},this.isShowing=!1,this.leftCalendar={},this.rightCalendar={},"object"==typeof n&&null!==n||(n={}),"string"==typeof(n=e.extend(this.element.data(),n)).template||n.template instanceof e||(n.template='<div class="daterangepicker dropdown-menu"><div class="calendar left"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_start" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="calendar right"><div class="daterangepicker_input"><input class="input-mini form-control" type="text" name="daterangepicker_end" value="" /><i class="fa fa-calendar glyphicon glyphicon-calendar"></i><div class="calendar-time"><div></div><i class="fa fa-clock-o glyphicon glyphicon-time"></i></div></div><div class="calendar-table"></div></div><div class="ranges"><div class="range_inputs"><button class="applyBtn" disabled="disabled" type="button"></button> <button class="cancelBtn" type="button"></button></div></div></div>'),this.parentEl=n.parentEl&&e(n.parentEl).length?e(n.parentEl):e(this.parentEl),this.container=e(n.template).appendTo(this.parentEl),"object"==typeof n.locale&&("string"==typeof n.locale.direction&&(this.locale.direction=n.locale.direction),"string"==typeof n.locale.format&&(this.locale.format=n.locale.format),"string"==typeof n.locale.separator&&(this.locale.separator=n.locale.separator),"object"==typeof n.locale.daysOfWeek&&(this.locale.daysOfWeek=n.locale.daysOfWeek.slice()),"object"==typeof n.locale.monthNames&&(this.locale.monthNames=n.locale.monthNames.slice()),"number"==typeof n.locale.firstDay&&(this.locale.firstDay=n.locale.firstDay),"string"==typeof n.locale.applyLabel&&(this.locale.applyLabel=n.locale.applyLabel),"string"==typeof n.locale.cancelLabel&&(this.locale.cancelLabel=n.locale.cancelLabel),"string"==typeof n.locale.weekLabel&&(this.locale.weekLabel=n.locale.weekLabel),"string"==typeof n.locale.customRangeLabel)){(p=document.createElement("textarea")).innerHTML=n.locale.customRangeLabel;var o=p.value;this.locale.customRangeLabel=o}if(this.container.addClass(this.locale.direction),"string"==typeof n.startDate&&(this.startDate=t(n.startDate,this.locale.format)),"string"==typeof n.endDate&&(this.endDate=t(n.endDate,this.locale.format)),"string"==typeof n.minDate&&(this.minDate=t(n.minDate,this.locale.format)),"string"==typeof n.maxDate&&(this.maxDate=t(n.maxDate,this.locale.format)),"object"==typeof n.startDate&&(this.startDate=t(n.startDate)),"object"==typeof n.endDate&&(this.endDate=t(n.endDate)),"object"==typeof n.minDate&&(this.minDate=t(n.minDate)),"object"==typeof n.maxDate&&(this.maxDate=t(n.maxDate)),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),"string"==typeof n.applyClass&&(this.applyClass=n.applyClass),"string"==typeof n.cancelClass&&(this.cancelClass=n.cancelClass),"object"==typeof n.dateLimit&&(this.dateLimit=n.dateLimit),"string"==typeof n.opens&&(this.opens=n.opens),"string"==typeof n.drops&&(this.drops=n.drops),"boolean"==typeof n.showWeekNumbers&&(this.showWeekNumbers=n.showWeekNumbers),"boolean"==typeof n.showISOWeekNumbers&&(this.showISOWeekNumbers=n.showISOWeekNumbers),"string"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses),"object"==typeof n.buttonClasses&&(this.buttonClasses=n.buttonClasses.join(" ")),"boolean"==typeof n.showDropdowns&&(this.showDropdowns=n.showDropdowns),"boolean"==typeof n.showCustomRangeLabel&&(this.showCustomRangeLabel=n.showCustomRangeLabel),"boolean"==typeof n.singleDatePicker&&(this.singleDatePicker=n.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof n.timePicker&&(this.timePicker=n.timePicker),"boolean"==typeof n.timePickerSeconds&&(this.timePickerSeconds=n.timePickerSeconds),"number"==typeof n.timePickerIncrement&&(this.timePickerIncrement=n.timePickerIncrement),"boolean"==typeof n.timePicker24Hour&&(this.timePicker24Hour=n.timePicker24Hour),"boolean"==typeof n.autoApply&&(this.autoApply=n.autoApply),"boolean"==typeof n.autoUpdateInput&&(this.autoUpdateInput=n.autoUpdateInput),"boolean"==typeof n.linkedCalendars&&(this.linkedCalendars=n.linkedCalendars),"function"==typeof n.isInvalidDate&&(this.isInvalidDate=n.isInvalidDate),"function"==typeof n.isCustomDate&&(this.isCustomDate=n.isCustomDate),"boolean"==typeof n.alwaysShowCalendars&&(this.alwaysShowCalendars=n.alwaysShowCalendars),0!=this.locale.firstDay)for(var s=this.locale.firstDay;s>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),s--;var a,l,c;if(void 0===n.startDate&&void 0===n.endDate&&e(this.element).is("input[type=text]")){var h=e(this.element).val(),d=h.split(this.locale.separator);a=l=null,2==d.length?(a=t(d[0],this.locale.format),l=t(d[1],this.locale.format)):this.singleDatePicker&&""!==h&&(a=t(h,this.locale.format),l=t(h,this.locale.format)),null!==a&&null!==l&&(this.setStartDate(a),this.setEndDate(l))}if("object"==typeof n.ranges){for(c in n.ranges){a="string"==typeof n.ranges[c][0]?t(n.ranges[c][0],this.locale.format):t(n.ranges[c][0]),l="string"==typeof n.ranges[c][1]?t(n.ranges[c][1],this.locale.format):t(n.ranges[c][1]),this.minDate&&a.isBefore(this.minDate)&&(a=this.minDate.clone());var u=this.maxDate;if(this.dateLimit&&u&&a.clone().add(this.dateLimit).isAfter(u)&&(u=a.clone().add(this.dateLimit)),u&&l.isAfter(u)&&(l=u.clone()),!(this.minDate&&l.isBefore(this.minDate,this.timepicker?"minute":"day")||u&&a.isAfter(u,this.timepicker?"minute":"day"))){var p;(p=document.createElement("textarea")).innerHTML=c;o=p.value;this.ranges[o]=[a,l]}}var f="<ul>";for(c in this.ranges)f+='<li data-range-key="'+c+'">'+c+"</li>";this.showCustomRangeLabel&&(f+='<li data-range-key="'+this.locale.customRangeLabel+'">'+this.locale.customRangeLabel+"</li>"),f+="</ul>",this.container.find(".ranges").prepend(f)}"function"==typeof r&&(this.callback=r),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day"),this.container.find(".calendar-time").hide()),this.timePicker&&this.autoApply&&(this.autoApply=!1),this.autoApply&&"object"!=typeof n.ranges?this.container.find(".ranges").hide():this.autoApply&&this.container.find(".applyBtn, .cancelBtn").addClass("hide"),this.singleDatePicker&&(this.container.addClass("single"),this.container.find(".calendar.left").addClass("single"),this.container.find(".calendar.left").show(),this.container.find(".calendar.right").hide(),this.container.find(".daterangepicker_input input, .daterangepicker_input > i").hide(),this.timePicker?this.container.find(".ranges ul").hide():this.container.find(".ranges").hide()),(void 0===n.ranges&&!this.singleDatePicker||this.alwaysShowCalendars)&&this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),void 0!==n.ranges&&"right"==this.opens&&this.container.find(".ranges").prependTo(this.container.find(".calendar.left").parent()),this.container.find(".applyBtn, .cancelBtn").addClass(this.buttonClasses),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",e.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",e.proxy(this.clickNext,this)).on("mousedown.daterangepicker","td.available",e.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",e.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",e.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.monthselect",e.proxy(this.monthOrYearChanged,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",e.proxy(this.timeChanged,this)).on("click.daterangepicker",".daterangepicker_input input",e.proxy(this.showCalendars,this)).on("focus.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsFocused,this)).on("blur.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsBlurred,this)).on("change.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsChanged,this)).on("keydown.daterangepicker",".daterangepicker_input input",e.proxy(this.formInputsKeydown,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",e.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",e.proxy(this.clickCancel,this)).on("click.daterangepicker","li",e.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",e.proxy(this.hoverRange,this)).on("mouseleave.daterangepicker","li",e.proxy(this.updateFormInputs,this)),this.element.is("input")||this.element.is("button")?this.element.on({"click.daterangepicker":e.proxy(this.show,this),"focus.daterangepicker":e.proxy(this.show,this),"keyup.daterangepicker":e.proxy(this.elementChanged,this),"keydown.daterangepicker":e.proxy(this.keydown,this)}):(this.element.on("click.daterangepicker",e.proxy(this.toggle,this)),this.element.on("keydown.daterangepicker",e.proxy(this.toggle,this))),this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))};return i.prototype={constructor:i,setStartDate:function(e){"string"==typeof e&&(this.startDate=t(e,this.locale.format)),"object"==typeof e&&(this.startDate=t(e)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.minDate&&this.startDate.isBefore(this.minDate)&&(this.startDate=this.minDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.round(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.maxDate&&this.startDate.isAfter(this.maxDate)&&(this.startDate=this.maxDate.clone(),this.timePicker&&this.timePickerIncrement&&this.startDate.minute(Math.floor(this.startDate.minute()/this.timePickerIncrement)*this.timePickerIncrement)),this.isShowing||this.updateElement(),this.updateMonthsInView()},setEndDate:function(e){"string"==typeof e&&(this.endDate=t(e,this.locale.format)),"object"==typeof e&&(this.endDate=t(e)),this.timePicker||(this.endDate=this.endDate.add(1,"d").startOf("day").subtract(1,"second")),this.timePicker&&this.timePickerIncrement&&this.endDate.minute(Math.round(this.endDate.minute()/this.timePickerIncrement)*this.timePickerIncrement),this.endDate.isBefore(this.startDate)&&(this.endDate=this.startDate.clone()),this.maxDate&&this.endDate.isAfter(this.maxDate)&&(this.endDate=this.maxDate.clone()),this.dateLimit&&this.startDate.clone().add(this.dateLimit).isBefore(this.endDate)&&(this.endDate=this.startDate.clone().add(this.dateLimit)),this.previousRightTime=this.endDate.clone(),this.isShowing||this.updateElement(),this.updateMonthsInView()},isInvalidDate:function(){return!1},isCustomDate:function(){return!1},updateView:function(){this.timePicker&&(this.renderTimePicker("left"),this.renderTimePicker("right"),this.endDate?this.container.find(".right .calendar-time select").removeAttr("disabled").removeClass("disabled"):this.container.find(".right .calendar-time select").attr("disabled","disabled").addClass("disabled")),this.endDate?(this.container.find('input[name="daterangepicker_end"]').removeClass("active"),this.container.find('input[name="daterangepicker_start"]').addClass("active")):(this.container.find('input[name="daterangepicker_end"]').addClass("active"),this.container.find('input[name="daterangepicker_start"]').removeClass("active")),this.updateMonthsInView(),this.updateCalendars(),this.updateFormInputs()},updateMonthsInView:function(){if(this.endDate){if(!this.singleDatePicker&&this.leftCalendar.month&&this.rightCalendar.month&&(this.startDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.startDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM"))&&(this.endDate.format("YYYY-MM")==this.leftCalendar.month.format("YYYY-MM")||this.endDate.format("YYYY-MM")==this.rightCalendar.month.format("YYYY-MM")))return;this.leftCalendar.month=this.startDate.clone().date(2),this.linkedCalendars||this.endDate.month()==this.startDate.month()&&this.endDate.year()==this.startDate.year()?this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"):this.rightCalendar.month=this.endDate.clone().date(2)}else this.leftCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&this.rightCalendar.month.format("YYYY-MM")!=this.startDate.format("YYYY-MM")&&(this.leftCalendar.month=this.startDate.clone().date(2),this.rightCalendar.month=this.startDate.clone().date(2).add(1,"month"));this.maxDate&&this.linkedCalendars&&!this.singleDatePicker&&this.rightCalendar.month>this.maxDate&&(this.rightCalendar.month=this.maxDate.clone().date(2),this.leftCalendar.month=this.maxDate.clone().date(2).subtract(1,"month"))},updateCalendars:function(){if(this.timePicker){var t,e,i,n;if(this.endDate){if(t=parseInt(this.container.find(".left .hourselect").val(),10),e=parseInt(this.container.find(".left .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0,!this.timePicker24Hour)"PM"===(n=this.container.find(".left .ampmselect").val())&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0)}else if(t=parseInt(this.container.find(".right .hourselect").val(),10),e=parseInt(this.container.find(".right .minuteselect").val(),10),i=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0,!this.timePicker24Hour)"PM"===(n=this.container.find(".right .ampmselect").val())&&t<12&&(t+=12),"AM"===n&&12===t&&(t=0);this.leftCalendar.month.hour(t).minute(e).second(i),this.rightCalendar.month.hour(t).minute(e).second(i)}this.renderCalendar("left"),this.renderCalendar("right"),this.container.find(".ranges li").removeClass("active"),null!=this.endDate&&this.calculateChosenLabel()},renderCalendar:function(i){var n,r=(n="left"==i?this.leftCalendar:this.rightCalendar).month.month(),o=n.month.year(),s=n.month.hour(),a=n.month.minute(),l=n.month.second(),c=t([o,r]).daysInMonth(),h=t([o,r,1]),d=t([o,r,c]),u=t(h).subtract(1,"month").month(),p=t(h).subtract(1,"month").year(),f=t([p,u]).daysInMonth(),m=h.day();(n=[]).firstDay=h,n.lastDay=d;for(var g=0;g<6;g++)n[g]=[];var v=f-m+this.locale.firstDay+1;v>f&&(v-=7),m==this.locale.firstDay&&(v=f-6);for(var y=t([p,u,v,12,a,l]),b=(g=0,0),_=0;g<42;g++,b++,y=t(y).add(24,"hour"))g>0&&b%7==0&&(b=0,_++),n[_][b]=y.clone().hour(s).minute(a).second(l),y.hour(12),this.minDate&&n[_][b].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&n[_][b].isBefore(this.minDate)&&"left"==i&&(n[_][b]=this.minDate.clone()),this.maxDate&&n[_][b].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&n[_][b].isAfter(this.maxDate)&&"right"==i&&(n[_][b]=this.maxDate.clone());"left"==i?this.leftCalendar.calendar=n:this.rightCalendar.calendar=n;var x="left"==i?this.minDate:this.startDate,w=this.maxDate,k=("left"==i?this.startDate:this.endDate,"ltr"==this.locale.direction?{left:"chevron-left",right:"chevron-right"}:{left:"chevron-right",right:"chevron-left"}),C='<table class="table-condensed">';C+="<thead>",C+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(C+="<th></th>"),x&&!x.isBefore(n.firstDay)||this.linkedCalendars&&"left"!=i?C+="<th></th>":C+='<th class="prev available"><i class="fa fa-'+k.left+" glyphicon glyphicon-"+k.left+'"></i></th>';var S=this.locale.monthNames[n[1][1].month()]+n[1][1].format(" YYYY");if(this.showDropdowns){for(var D=n[1][1].month(),T=n[1][1].year(),A=w&&w.year()||T+5,M=x&&x.year()||T-50,E=T==M,P=T==A,I='<select class="monthselect">',O=0;O<12;O++)(!E||O>=x.month())&&(!P||O<=w.month())?I+="<option value='"+O+"'"+(O===D?" selected='selected'":"")+">"+this.locale.monthNames[O]+"</option>":I+="<option value='"+O+"'"+(O===D?" selected='selected'":"")+" disabled='disabled'>"+this.locale.monthNames[O]+"</option>";I+="</select>";for(var N='<select class="yearselect">',L=M;L<=A;L++)N+='<option value="'+L+'"'+(L===T?' selected="selected"':"")+">"+L+"</option>";S=I+(N+="</select>")}if(C+='<th colspan="5" class="month">'+S+"</th>",w&&!w.isAfter(n.lastDay)||this.linkedCalendars&&"right"!=i&&!this.singleDatePicker?C+="<th></th>":C+='<th class="next available"><i class="fa fa-'+k.right+" glyphicon glyphicon-"+k.right+'"></i></th>',C+="</tr>",C+="<tr>",(this.showWeekNumbers||this.showISOWeekNumbers)&&(C+='<th class="week">'+this.locale.weekLabel+"</th>"),e.each(this.locale.daysOfWeek,function(t,e){C+="<th>"+e+"</th>"}),C+="</tr>",C+="</thead>",C+="<tbody>",null==this.endDate&&this.dateLimit){var j=this.startDate.clone().add(this.dateLimit).endOf("day");w&&!j.isBefore(w)||(w=j)}for(_=0;_<6;_++){C+="<tr>",this.showWeekNumbers?C+='<td class="week">'+n[_][0].week()+"</td>":this.showISOWeekNumbers&&(C+='<td class="week">'+n[_][0].isoWeek()+"</td>");for(b=0;b<7;b++){var F=[];n[_][b].isSame(new Date,"day")&&F.push("today"),n[_][b].isoWeekday()>5&&F.push("weekend"),n[_][b].month()!=n[1][1].month()&&F.push("off"),this.minDate&&n[_][b].isBefore(this.minDate,"day")&&F.push("off","disabled"),w&&n[_][b].isAfter(w,"day")&&F.push("off","disabled"),this.isInvalidDate(n[_][b])&&F.push("off","disabled"),n[_][b].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&F.push("active","start-date"),null!=this.endDate&&n[_][b].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&F.push("active","end-date"),null!=this.endDate&&n[_][b]>this.startDate&&n[_][b]<this.endDate&&F.push("in-range");var $=this.isCustomDate(n[_][b]);!1!==$&&("string"==typeof $?F.push($):Array.prototype.push.apply(F,$));var R="",H=!1;for(g=0;g<F.length;g++)R+=F[g]+" ","disabled"==F[g]&&(H=!0);H||(R+="available"),C+='<td class="'+R.replace(/^\s+|\s+$/g,"")+'" data-title="r'+_+"c"+b+'">'+n[_][b].date()+"</td>"}C+="</tr>"}C+="</tbody>",C+="</table>",this.container.find(".calendar."+i+" .calendar-table").html(C)},renderTimePicker:function(t){if("right"!=t||this.endDate){var e,i,n,r=this.maxDate;if(!this.dateLimit||this.maxDate&&!this.startDate.clone().add(this.dateLimit).isAfter(this.maxDate)||(r=this.startDate.clone().add(this.dateLimit)),"left"==t)i=this.startDate.clone(),n=this.minDate;else if("right"==t){i=this.endDate.clone(),n=this.startDate;var o=this.container.find(".calendar.right .calendar-time div");if(""!=o.html()&&(i.hour(o.find(".hourselect option:selected").val()||i.hour()),i.minute(o.find(".minuteselect option:selected").val()||i.minute()),i.second(o.find(".secondselect option:selected").val()||i.second()),!this.timePicker24Hour)){var s=o.find(".ampmselect option:selected").val();"PM"===s&&i.hour()<12&&i.hour(i.hour()+12),"AM"===s&&12===i.hour()&&i.hour(0)}i.isBefore(this.startDate)&&(i=this.startDate.clone()),r&&i.isAfter(r)&&(i=r.clone())}e='<select class="hourselect">';for(var a=this.timePicker24Hour?0:1,l=this.timePicker24Hour?23:12,c=a;c<=l;c++){var h=c;this.timePicker24Hour||(h=i.hour()>=12?12==c?12:c+12:12==c?0:c);var d=i.clone().hour(h),u=!1;n&&d.minute(59).isBefore(n)&&(u=!0),r&&d.minute(0).isAfter(r)&&(u=!0),h!=i.hour()||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+c+"</option>":'<option value="'+c+'">'+c+"</option>":e+='<option value="'+c+'" selected="selected">'+c+"</option>"}e+="</select> ",e+=': <select class="minuteselect">';for(c=0;c<60;c+=this.timePickerIncrement){var p=c<10?"0"+c:c;d=i.clone().minute(c),u=!1;n&&d.second(59).isBefore(n)&&(u=!0),r&&d.second(0).isAfter(r)&&(u=!0),i.minute()!=c||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":e+='<option value="'+c+'" selected="selected">'+p+"</option>"}if(e+="</select> ",this.timePickerSeconds){e+=': <select class="secondselect">';for(c=0;c<60;c++){p=c<10?"0"+c:c,d=i.clone().second(c),u=!1;n&&d.isBefore(n)&&(u=!0),r&&d.isAfter(r)&&(u=!0),i.second()!=c||u?e+=u?'<option value="'+c+'" disabled="disabled" class="disabled">'+p+"</option>":'<option value="'+c+'">'+p+"</option>":e+='<option value="'+c+'" selected="selected">'+p+"</option>"}e+="</select> "}if(!this.timePicker24Hour){e+='<select class="ampmselect">';var f="",m="";n&&i.clone().hour(12).minute(0).second(0).isBefore(n)&&(f=' disabled="disabled" class="disabled"'),r&&i.clone().hour(0).minute(0).second(0).isAfter(r)&&(m=' disabled="disabled" class="disabled"'),i.hour()>=12?e+='<option value="AM"'+f+'>AM</option><option value="PM" selected="selected"'+m+">PM</option>":e+='<option value="AM" selected="selected"'+f+'>AM</option><option value="PM"'+m+">PM</option>",e+="</select>"}this.container.find(".calendar."+t+" .calendar-time div").html(e)}},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").is(":focus")||this.container.find("input[name=daterangepicker_end]").is(":focus")||(this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.locale.format)),this.endDate&&this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.locale.format)),this.singleDatePicker||this.endDate&&(this.startDate.isBefore(this.endDate)||this.startDate.isSame(this.endDate))?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled"))},move:function(){var t,i={top:0,left:0},n=e(window).width();this.parentEl.is("body")||(i={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},n=this.parentEl[0].clientWidth+this.parentEl.offset().left),t="up"==this.drops?this.element.offset().top-this.container.outerHeight()-i.top:this.element.offset().top+this.element.outerHeight()-i.top,this.container["up"==this.drops?"addClass":"removeClass"]("dropup"),"left"==this.opens?(this.container.css({top:t,right:n-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:t,left:this.element.offset().left-i.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:t,left:this.element.offset().left-i.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>e(window).width()&&this.container.css({left:"auto",right:0}))},show:function(t){this.isShowing||(this._outsideClickProxy=e.proxy(function(t){this.outsideClick(t)},this),e(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),e(window).on("resize.daterangepicker",e.proxy(function(t){this.move(t)},this)),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.previousRightTime=this.endDate.clone(),this.updateView(),this.container.show(),this.move(),this.element.trigger("show.daterangepicker",this),this.isShowing=!0)},hide:function(t){this.isShowing&&(this.endDate||(this.startDate=this.oldStartDate.clone(),this.endDate=this.oldEndDate.clone()),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.callback(this.startDate,this.endDate,this.chosenLabel),this.updateElement(),e(document).off(".daterangepicker"),e(window).off(".daterangepicker"),this.container.hide(),this.element.trigger("hide.daterangepicker",this),this.isShowing=!1)},toggle:function(t){this.isShowing?this.hide():this.show()},outsideClick:function(t){var i=e(t.target);"focusin"==t.type||i.closest(this.element).length||i.closest(this.container).length||i.closest(".calendar-table").length||(this.hide(),this.element.trigger("outsideClick.daterangepicker",this))},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},hoverRange:function(t){if(!this.container.find("input[name=daterangepicker_start]").is(":focus")&&!this.container.find("input[name=daterangepicker_end]").is(":focus")){var e=t.target.getAttribute("data-range-key");if(e==this.locale.customRangeLabel)this.updateView();else{var i=this.ranges[e];this.container.find("input[name=daterangepicker_start]").val(i[0].format(this.locale.format)),this.container.find("input[name=daterangepicker_end]").val(i[1].format(this.locale.format))}}},clickRange:function(t){var e=t.target.getAttribute("data-range-key");if(this.chosenLabel=e,e==this.locale.customRangeLabel)this.showCalendars();else{var i=this.ranges[e];this.startDate=i[0],this.endDate=i[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.alwaysShowCalendars||this.hideCalendars(),this.clickApply()}},clickPrev:function(t){e(t.target).parents(".calendar").hasClass("left")?(this.leftCalendar.month.subtract(1,"month"),this.linkedCalendars&&this.rightCalendar.month.subtract(1,"month")):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(t){e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.month.add(1,"month"):(this.rightCalendar.month.add(1,"month"),this.linkedCalendars&&this.leftCalendar.month.add(1,"month")),this.updateCalendars()},hoverDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),r=i.substr(3,1),o=e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.calendar[n][r]:this.rightCalendar.calendar[n][r];this.endDate&&!this.container.find("input[name=daterangepicker_start]").is(":focus")?this.container.find("input[name=daterangepicker_start]").val(o.format(this.locale.format)):this.endDate||this.container.find("input[name=daterangepicker_end]").is(":focus")||this.container.find("input[name=daterangepicker_end]").val(o.format(this.locale.format));var s=this.leftCalendar,a=this.rightCalendar,l=this.startDate;this.endDate||this.container.find(".calendar tbody td").each(function(t,i){if(!e(i).hasClass("week")){var n=e(i).attr("data-title"),r=n.substr(1,1),c=n.substr(3,1),h=e(i).parents(".calendar").hasClass("left")?s.calendar[r][c]:a.calendar[r][c];h.isAfter(l)&&h.isBefore(o)||h.isSame(o,"day")?e(i).addClass("in-range"):e(i).removeClass("in-range")}})}},clickDate:function(t){if(e(t.target).hasClass("available")){var i=e(t.target).attr("data-title"),n=i.substr(1,1),r=i.substr(3,1),o=e(t.target).parents(".calendar").hasClass("left")?this.leftCalendar.calendar[n][r]:this.rightCalendar.calendar[n][r];if(this.endDate||o.isBefore(this.startDate,"day")){if(this.timePicker){var s=parseInt(this.container.find(".left .hourselect").val(),10);if(!this.timePicker24Hour)"PM"===(c=this.container.find(".left .ampmselect").val())&&s<12&&(s+=12),"AM"===c&&12===s&&(s=0);var a=parseInt(this.container.find(".left .minuteselect").val(),10),l=this.timePickerSeconds?parseInt(this.container.find(".left .secondselect").val(),10):0;o=o.clone().hour(s).minute(a).second(l)}this.endDate=null,this.setStartDate(o.clone())}else if(!this.endDate&&o.isBefore(this.startDate))this.setEndDate(this.startDate.clone());else{if(this.timePicker){var c;s=parseInt(this.container.find(".right .hourselect").val(),10);if(!this.timePicker24Hour)"PM"===(c=this.container.find(".right .ampmselect").val())&&s<12&&(s+=12),"AM"===c&&12===s&&(s=0);a=parseInt(this.container.find(".right .minuteselect").val(),10),l=this.timePickerSeconds?parseInt(this.container.find(".right .secondselect").val(),10):0;o=o.clone().hour(s).minute(a).second(l)}this.setEndDate(o.clone()),this.autoApply&&(this.calculateChosenLabel(),this.clickApply())}this.singleDatePicker&&(this.setEndDate(this.startDate),this.timePicker||this.clickApply()),this.updateView(),t.stopPropagation()}},calculateChosenLabel:function(){var t=!0,e=0;for(var i in this.ranges){if(this.timePicker){var n=this.timePickerSeconds?"YYYY-MM-DD hh:mm:ss":"YYYY-MM-DD hh:mm";if(this.startDate.format(n)==this.ranges[i][0].format(n)&&this.endDate.format(n)==this.ranges[i][1].format(n)){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}}else if(this.startDate.format("YYYY-MM-DD")==this.ranges[i][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[i][1].format("YYYY-MM-DD")){t=!1,this.chosenLabel=this.container.find(".ranges li:eq("+e+")").addClass("active").html();break}e++}t&&(this.showCustomRangeLabel?this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html():this.chosenLabel=null,this.showCalendars())},clickApply:function(t){this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(t){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.hide(),this.element.trigger("cancel.daterangepicker",this)},monthOrYearChanged:function(t){var i=e(t.target).closest(".calendar").hasClass("left"),n=i?"left":"right",r=this.container.find(".calendar."+n),o=parseInt(r.find(".monthselect").val(),10),s=r.find(".yearselect").val();i||(s<this.startDate.year()||s==this.startDate.year()&&o<this.startDate.month())&&(o=this.startDate.month(),s=this.startDate.year()),this.minDate&&(s<this.minDate.year()||s==this.minDate.year()&&o<this.minDate.month())&&(o=this.minDate.month(),s=this.minDate.year()),this.maxDate&&(s>this.maxDate.year()||s==this.maxDate.year()&&o>this.maxDate.month())&&(o=this.maxDate.month(),s=this.maxDate.year()),i?(this.leftCalendar.month.month(o).year(s),this.linkedCalendars&&(this.rightCalendar.month=this.leftCalendar.month.clone().add(1,"month"))):(this.rightCalendar.month.month(o).year(s),this.linkedCalendars&&(this.leftCalendar.month=this.rightCalendar.month.clone().subtract(1,"month"))),this.updateCalendars()},timeChanged:function(t){var i=e(t.target).closest(".calendar"),n=i.hasClass("left"),r=parseInt(i.find(".hourselect").val(),10),o=parseInt(i.find(".minuteselect").val(),10),s=this.timePickerSeconds?parseInt(i.find(".secondselect").val(),10):0;if(!this.timePicker24Hour){var a=i.find(".ampmselect").val();"PM"===a&&r<12&&(r+=12),"AM"===a&&12===r&&(r=0)}if(n){var l=this.startDate.clone();l.hour(r),l.minute(o),l.second(s),this.setStartDate(l),this.singleDatePicker?this.endDate=this.startDate.clone():this.endDate&&this.endDate.format("YYYY-MM-DD")==l.format("YYYY-MM-DD")&&this.endDate.isBefore(l)&&this.setEndDate(l.clone())}else if(this.endDate){var c=this.endDate.clone();c.hour(r),c.minute(o),c.second(s),this.setEndDate(c)}this.updateCalendars(),this.updateFormInputs(),this.renderTimePicker("left"),this.renderTimePicker("right")},formInputsChanged:function(i){var n=e(i.target).closest(".calendar").hasClass("right"),r=t(this.container.find('input[name="daterangepicker_start"]').val(),this.locale.format),o=t(this.container.find('input[name="daterangepicker_end"]').val(),this.locale.format);r.isValid()&&o.isValid()&&(n&&o.isBefore(r)&&(r=o.clone()),this.setStartDate(r),this.setEndDate(o),n?this.container.find('input[name="daterangepicker_start"]').val(this.startDate.format(this.locale.format)):this.container.find('input[name="daterangepicker_end"]').val(this.endDate.format(this.locale.format))),this.updateView()},formInputsFocused:function(t){this.container.find('input[name="daterangepicker_start"], input[name="daterangepicker_end"]').removeClass("active"),e(t.target).addClass("active"),e(t.target).closest(".calendar").hasClass("right")&&(this.endDate=null,this.setStartDate(this.startDate.clone()),this.updateView())},formInputsBlurred:function(e){if(!this.endDate){var i=this.container.find('input[name="daterangepicker_end"]').val(),n=t(i,this.locale.format);n.isValid()&&(this.setEndDate(n),this.updateView())}},formInputsKeydown:function(t){13===t.keyCode&&(t.preventDefault(),this.formInputsChanged(t))},elementChanged:function(){if(this.element.is("input")&&this.element.val().length){var e=this.element.val().split(this.locale.separator),i=null,n=null;2===e.length&&(i=t(e[0],this.locale.format),n=t(e[1],this.locale.format)),(this.singleDatePicker||null===i||null===n)&&(n=i=t(this.element.val(),this.locale.format)),i.isValid()&&n.isValid()&&(this.setStartDate(i),this.setEndDate(n),this.updateView())}},keydown:function(t){9!==t.keyCode&&13!==t.keyCode||this.hide(),27===t.keyCode&&(t.preventDefault(),t.stopPropagation(),this.hide())},updateElement:function(){this.element.is("input")&&!this.singleDatePicker&&this.autoUpdateInput?(this.element.val(this.startDate.format(this.locale.format)+this.locale.separator+this.endDate.format(this.locale.format)),this.element.trigger("change")):this.element.is("input")&&this.autoUpdateInput&&(this.element.val(this.startDate.format(this.locale.format)),this.element.trigger("change"))},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData()}},e.fn.daterangepicker=function(t,n){var r=e.extend(!0,{},e.fn.daterangepicker.defaultOptions,t);return this.each(function(){var t=e(this);t.data("daterangepicker")&&t.data("daterangepicker").remove(),t.data("daterangepicker",new i(t,r,n))}),this},i}),function(t){"use strict";var e=0;function i(e,i){return t.map(e,function(t){return function(t,e){return t+".touchspin_"+e}(t,i)})}t.fn.TouchSpin=function(n){if("destroy"!==n){var r={min:0,max:100,initval:"",replacementval:"",step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalupclass:"glyphicon glyphicon-chevron-up",verticaldownclass:"glyphicon glyphicon-chevron-down",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn btn-default",buttonup_class:"btn btn-default",buttondown_txt:"-",buttonup_txt:"+"},o={min:"min",max:"max",initval:"init-val",replacementval:"replacement-val",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return this.each(function(){var s,a,l,c,h,d,u,p,f=t(this),m=f.data(),g=0,v=!1;function y(){var t,e,i;""!==(t=f.val())?s.decimals>0&&"."===t||(e=parseFloat(t),isNaN(e)&&(e=""!==s.replacementval?s.replacementval:0),i=e,e.toString()!==t&&(i=e),e<s.min&&(i=s.min),e>s.max&&(i=s.max),i=function(t){switch(s.forcestepdivisibility){case"round":return(Math.round(t/s.step)*s.step).toFixed(s.decimals);case"floor":return(Math.floor(t/s.step)*s.step).toFixed(s.decimals);case"ceil":return(Math.ceil(t/s.step)*s.step).toFixed(s.decimals);default:return t}}(i),Number(t).toString()!==i.toString()&&(f.val(i),f.trigger("change"))):""!==s.replacementval&&(f.val(s.replacementval),f.trigger("change"))}function b(){if(s.booster){var t=Math.pow(2,Math.floor(g/s.boostat))*s.step;return s.maxboostedstep&&t>s.maxboostedstep&&(t=s.maxboostedstep,c=Math.round(c/t)*t),Math.max(s.step,t)}return s.step}function _(){y(),c=parseFloat(l.input.val()),isNaN(c)&&(c=0);var t=c,e=b();(c+=e)>s.max&&(c=s.max,f.trigger("touchspin.on.max"),C()),l.input.val(Number(c).toFixed(s.decimals)),t!==c&&f.trigger("change")}function x(){y(),c=parseFloat(l.input.val()),isNaN(c)&&(c=0);var t=c,e=b();(c-=e)<s.min&&(c=s.min,f.trigger("touchspin.on.min"),C()),l.input.val(c.toFixed(s.decimals)),t!==c&&f.trigger("change")}function w(){C(),g=0,v="down",f.trigger("touchspin.on.startspin"),f.trigger("touchspin.on.startdownspin"),u=setTimeout(function(){h=setInterval(function(){g++,x()},s.stepinterval)},s.stepintervaldelay)}function k(){C(),g=0,v="up",f.trigger("touchspin.on.startspin"),f.trigger("touchspin.on.startupspin"),p=setTimeout(function(){d=setInterval(function(){g++,_()},s.stepinterval)},s.stepintervaldelay)}function C(){switch(clearTimeout(u),clearTimeout(p),clearInterval(h),clearInterval(d),v){case"up":f.trigger("touchspin.on.stopupspin"),f.trigger("touchspin.on.stopspin");break;case"down":f.trigger("touchspin.on.stopdownspin"),f.trigger("touchspin.on.stopspin")}g=0,v=!1}!function(){if(f.data("alreadyinitialized"))return;if(f.data("alreadyinitialized",!0),e+=1,f.data("spinnerid",e),!f.is("input"))return void console.log("Must be an input.");s=t.extend({},r,m,(c={},t.each(o,function(t,e){var i="bts-"+e;f.is("[data-"+i+"]")&&(c[t]=f.data(i))}),c),n),""!==s.initval&&""===f.val()&&f.val(s.initval),y(),function(){var e=f.val(),i=f.parent();""!==e&&(e=Number(e).toFixed(s.decimals));f.data("initvalue",e).val(e),f.addClass("form-control"),i.hasClass("input-group")?function(e){e.addClass("bootstrap-touchspin");var i,n,r=f.prev(),o=f.next(),l='<span class="input-group-addon bootstrap-touchspin-prefix">'+s.prefix+"</span>",c='<span class="input-group-addon bootstrap-touchspin-postfix">'+s.postfix+"</span>";r.hasClass("input-group-btn")?(i='<button class="'+s.buttondown_class+' bootstrap-touchspin-down" type="button">'+s.buttondown_txt+"</button>",r.append(i)):(i='<span class="input-group-btn"><button class="'+s.buttondown_class+' bootstrap-touchspin-down" type="button">'+s.buttondown_txt+"</button></span>",t(i).insertBefore(f));o.hasClass("input-group-btn")?(n='<button class="'+s.buttonup_class+' bootstrap-touchspin-up" type="button">'+s.buttonup_txt+"</button>",o.prepend(n)):(n='<span class="input-group-btn"><button class="'+s.buttonup_class+' bootstrap-touchspin-up" type="button">'+s.buttonup_txt+"</button></span>",t(n).insertAfter(f));t(l).insertBefore(f),t(c).insertAfter(f),a=e}(i):function(){var e;e=s.verticalbuttons?'<div class="input-group bootstrap-touchspin"><span class="input-group-addon bootstrap-touchspin-prefix">'+s.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+s.postfix+'</span><span class="input-group-btn-vertical"><button class="'+s.buttondown_class+' bootstrap-touchspin-up" type="button"><i class="'+s.verticalupclass+'"></i></button><button class="'+s.buttonup_class+' bootstrap-touchspin-down" type="button"><i class="'+s.verticaldownclass+'"></i></button></span></div>':'<div class="input-group bootstrap-touchspin"><span class="input-group-btn"><button class="'+s.buttondown_class+' bootstrap-touchspin-down" type="button">'+s.buttondown_txt+'</button></span><span class="input-group-addon bootstrap-touchspin-prefix">'+s.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+s.postfix+'</span><span class="input-group-btn"><button class="'+s.buttonup_class+' bootstrap-touchspin-up" type="button">'+s.buttonup_txt+"</button></span></div>";a=t(e).insertBefore(f),t(".bootstrap-touchspin-prefix",a).after(f),f.hasClass("input-sm")?a.addClass("input-group-sm"):f.hasClass("input-lg")&&a.addClass("input-group-lg")}()}(),l={down:t(".bootstrap-touchspin-down",a),up:t(".bootstrap-touchspin-up",a),input:t("input",a),prefix:t(".bootstrap-touchspin-prefix",a).addClass(s.prefix_extraclass),postfix:t(".bootstrap-touchspin-postfix",a).addClass(s.postfix_extraclass)},function(){""===s.prefix&&l.prefix.hide();""===s.postfix&&l.postfix.hide()}(),f.on("keydown",function(t){var e=t.keyCode||t.which;38===e?("up"!==v&&(_(),k()),t.preventDefault()):40===e&&("down"!==v&&(x(),w()),t.preventDefault())}),f.on("keyup",function(t){var e=t.keyCode||t.which;38===e?C():40===e&&C()}),f.on("blur",function(){y()}),l.down.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("down"!==v&&(x(),w()),t.preventDefault())}),l.down.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),l.up.on("keydown",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||("up"!==v&&(_(),k()),t.preventDefault())}),l.up.on("keyup",function(t){var e=t.keyCode||t.which;32!==e&&13!==e||C()}),l.down.on("mousedown.touchspin",function(t){l.down.off("touchstart.touchspin"),f.is(":disabled")||(x(),w(),t.preventDefault(),t.stopPropagation())}),l.down.on("touchstart.touchspin",function(t){l.down.off("mousedown.touchspin"),f.is(":disabled")||(x(),w(),t.preventDefault(),t.stopPropagation())}),l.up.on("mousedown.touchspin",function(t){l.up.off("touchstart.touchspin"),f.is(":disabled")||(_(),k(),t.preventDefault(),t.stopPropagation())}),l.up.on("touchstart.touchspin",function(t){l.up.off("mousedown.touchspin"),f.is(":disabled")||(_(),k(),t.preventDefault(),t.stopPropagation())}),l.up.on("mouseout touchleave touchend touchcancel",function(t){v&&(t.stopPropagation(),C())}),l.down.on("mouseout touchleave touchend touchcancel",function(t){v&&(t.stopPropagation(),C())}),l.down.on("mousemove touchmove",function(t){v&&(t.stopPropagation(),t.preventDefault())}),l.up.on("mousemove touchmove",function(t){v&&(t.stopPropagation(),t.preventDefault())}),t(document).on(i(["mouseup","touchend","touchcancel"],e).join(" "),function(t){v&&(t.preventDefault(),C())}),t(document).on(i(["mousemove","touchmove","scroll","scrollstart"],e).join(" "),function(t){v&&(t.preventDefault(),C())}),f.on("mousewheel DOMMouseScroll",function(t){if(s.mousewheel&&f.is(":focus")){var e=t.originalEvent.wheelDelta||-t.originalEvent.deltaY||-t.originalEvent.detail;t.stopPropagation(),t.preventDefault(),e<0?x():_()}}),f.on("touchspin.uponce",function(){C(),_()}),f.on("touchspin.downonce",function(){C(),x()}),f.on("touchspin.startupspin",function(){k()}),f.on("touchspin.startdownspin",function(){w()}),f.on("touchspin.stopspin",function(){C()}),f.on("touchspin.updatesettings",function(e,i){!function(e){(function(e){s=t.extend({},s,e)})(e),y();var i=l.input.val();""!==i&&(i=Number(l.input.val()),l.input.val(i.toFixed(s.decimals)))}(i)}),l.input.css("display","block");var c}()})}this.each(function(){var e=t(this).data();t(document).off(i(["mouseup","touchend","touchcancel","mousemove","touchmove","scroll","scrollstart"],e.spinnerid).join(" "))})}}(jQuery),function(t){"use strict";t.event.special.destroyed||(t.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}),t.fn.extend({maxlength:function(e,i){var n=t("body");function r(t){var i=t.val();i=e.twoCharLinebreak?i.replace(/\r(?!\n)|\n(?!\r)/g,"\r\n"):i.replace(new RegExp("\r?\n","g"),"\n");return e.utf8?function(t){for(var e=0,i=0;i<t.length;i++){var n=t.charCodeAt(i);n<128?e++:e+=n>127&&n<2048?2:3}return e}(i):i.length}function o(t,e){return e-r(t)}function s(t,e){e.css({display:"block"}),t.trigger("maxlength.shown")}function a(t,i,n){var r="";return e.message?r="function"==typeof e.message?e.message(t,i):e.message.replace("%charsTyped%",n).replace("%charsRemaining%",i-n).replace("%charsTotal%",i):(e.preText&&(r+=e.preText),e.showCharsTyped?r+=n:r+=i-n,e.showMaxLength&&(r+=e.separator+i),e.postText&&(r+=e.postText)),r}function l(t,i,n,o){var l,c,h,d;o&&(o.html(a(i.val(),n,n-t)),t>0?(l=i,c=e.threshold,h=n,d=!0,!e.alwaysShow&&h-r(l)>c&&(d=!1),d?s(i,o.removeClass(e.limitReachedClass).addClass(e.warningClass)):function(t,e){e.css({display:"none"}),t.trigger("maxlength.hidden")}(i,o)):s(i,o.removeClass(e.warningClass).addClass(e.limitReachedClass))),e.allowOverMax&&(t<0?i.addClass("overmax"):i.removeClass("overmax"))}function c(i,n){var r=function(e){var i=e[0];return t.extend({},"function"==typeof i.getBoundingClientRect?i.getBoundingClientRect():{width:i.offsetWidth,height:i.offsetHeight},e.offset())}(i);if("function"!==t.type(e.placement))if(t.isPlainObject(e.placement))!function(i,n){if(!i||!n)return;var r={};t.each(["top","bottom","left","right","position"],function(t,i){var n=e.placement[i];void 0!==n&&(r[i]=n)}),n.css(r)}(e.placement,n);else{var o=i.outerWidth(),s=n.outerWidth(),a=n.width(),l=n.height();switch(e.appendToParent&&(r.top-=i.parent().offset().top,r.left-=i.parent().offset().left),e.placement){case"bottom":n.css({top:r.top+r.height,left:r.left+r.width/2-a/2});break;case"top":n.css({top:r.top-l,left:r.left+r.width/2-a/2});break;case"left":n.css({top:r.top+r.height/2-l/2,left:r.left-a});break;case"right":n.css({top:r.top+r.height/2-l/2,left:r.left+r.width});break;case"bottom-right":n.css({top:r.top+r.height,left:r.left+r.width});break;case"top-right":n.css({top:r.top-l,left:r.left+o});break;case"top-left":n.css({top:r.top-l,left:r.left-s});break;case"bottom-left":n.css({top:r.top+i.outerHeight(),left:r.left-s});break;case"centered-right":n.css({top:r.top+l/2,left:r.left+o-s-3});break;case"bottom-right-inside":n.css({top:r.top+r.height,left:r.left+r.width-s});break;case"top-right-inside":n.css({top:r.top-l,left:r.left+o-s});break;case"top-left-inside":n.css({top:r.top-l,left:r.left});break;case"bottom-left-inside":n.css({top:r.top+i.outerHeight(),left:r.left})}}else e.placement(i,n,r)}function h(t){var i="maxlength";return e.allowOverMax&&(i="data-bs-mxl"),t.attr(i)||t.attr("size")}return t.isFunction(e)&&!i&&(i=e,e={}),e=t.extend({showOnReady:!1,alwaysShow:!1,threshold:10,warningClass:"label label-success",limitReachedClass:"label label-important label-danger",separator:" / ",preText:"",postText:"",showMaxLength:!0,placement:"bottom",message:null,showCharsTyped:!0,validate:!1,utf8:!1,appendToParent:!1,twoCharLinebreak:!0,allowOverMax:!1},e),this.each(function(){var i,r,s=t(this);function d(){var d=a(s.val(),i,"0");i=h(s),r||(r=t('<span class="bootstrap-maxlength"></span>').css({display:"none",position:"absolute",whiteSpace:"nowrap",zIndex:1099}).html(d)),s.is("textarea")&&(s.data("maxlenghtsizex",s.outerWidth()),s.data("maxlenghtsizey",s.outerHeight()),s.mouseup(function(){s.outerWidth()===s.data("maxlenghtsizex")&&s.outerHeight()===s.data("maxlenghtsizey")||c(s,r),s.data("maxlenghtsizex",s.outerWidth()),s.data("maxlenghtsizey",s.outerHeight())})),e.appendToParent?(s.parent().append(r),s.parent().css("position","relative")):n.append(r),l(o(s,h(s)),s,i,r),c(s,r)}t(window).resize(function(){r&&c(s,r)}),e.allowOverMax&&(t(this).attr("data-bs-mxl",t(this).attr("maxlength")),t(this).removeAttr("maxlength")),e.showOnReady?s.ready(function(){d()}):s.focus(function(){d()}),s.on("maxlength.reposition",function(){c(s,r)}),s.on("destroyed",function(){r&&r.remove()}),s.on("blur",function(){r&&!e.showOnReady&&r.remove()}),s.on("input",function(){var t=h(s),n=o(s,t),a=!0;return e.validate&&n<0?(!function(t,i){var n=t.val(),r=0;e.twoCharLinebreak&&"\n"===(n=n.replace(/\r(?!\n)|\n(?!\r)/g,"\r\n")).substr(n.length-1)&&n.length%2==1&&(r=1),t.val(n.substr(0,i-r))}(s,t),a=!1):l(n,s,i,r),"bottom-right-inside"!==e.placement&&"top-right-inside"!==e.placement||c(s,r),a})})}})}(jQuery),function(t,e){if("function"==typeof define&&define.amd)define(["jquery"],e);else if("undefined"!=typeof exports)e(require("jquery"));else{e(t.jquery),t.bootstrapSwitch={}}}(this,function(t){"use strict";var e,i=(e=t)&&e.__esModule?e:{default:e};var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t};var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=i.default||window.jQuery||window.$,s=function(){function t(e){var i=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$element=o(e),this.options=o.extend({},o.fn.bootstrapSwitch.defaults,this._getElementOptions(),n),this.prevOptions={},this.$wrapper=o("<div>",{class:function(){var t=[];return t.push(i.options.state?"on":"off"),i.options.size&&t.push(i.options.size),i.options.disabled&&t.push("disabled"),i.options.readonly&&t.push("readonly"),i.options.indeterminate&&t.push("indeterminate"),i.options.inverse&&t.push("inverse"),i.$element.attr("id")&&t.push("id-"+i.$element.attr("id")),t.map(i._getClass.bind(i)).concat([i.options.baseClass],i._getClasses(i.options.wrapperClass)).join(" ")}}),this.$container=o("<div>",{class:this._getClass("container")}),this.$on=o("<span>",{html:this.options.onText,class:this._getClass("handle-on")+" "+this._getClass(this.options.onColor)}),this.$off=o("<span>",{html:this.options.offText,class:this._getClass("handle-off")+" "+this._getClass(this.options.offColor)}),this.$label=o("<span>",{html:this.options.labelText,class:this._getClass("label")}),this.$element.on("init.bootstrapSwitch",this.options.onInit.bind(this,e)),this.$element.on("switchChange.bootstrapSwitch",function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];!1===i.options.onSwitchChange.apply(e,n)&&(i.$element.is(":radio")?o('[name="'+i.$element.attr("name")+'"]').trigger("previousState.bootstrapSwitch",!0):i.$element.trigger("previousState.bootstrapSwitch",!0))}),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return r(t,[{key:"setPrevOptions",value:function(){this.prevOptions=n({},this.options)}},{key:"state",value:function(t,e){return void 0===t?this.options.state:this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.$element.is(":radio")?o('[name="'+this.$element.attr("name")+'"]').trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),this.$element.prop("checked",Boolean(t)).trigger("change.bootstrapSwitch",e),this.$element)}},{key:"toggleState",value:function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)}},{key:"size",value:function(t){return void 0===t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this._getClass(this.options.size)),t&&this.$wrapper.addClass(this._getClass(t)),this._width(),this._containerPosition(),this.options.size=t,this.$element)}},{key:"animate",value:function(t){return void 0===t?this.options.animate:this.options.animate===Boolean(t)?this.$element:this.toggleAnimate()}},{key:"toggleAnimate",value:function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this._getClass("animate")),this.$element}},{key:"disabled",value:function(t){return void 0===t?this.options.disabled:this.options.disabled===Boolean(t)?this.$element:this.toggleDisabled()}},{key:"toggleDisabled",value:function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this._getClass("disabled")),this.$element}},{key:"readonly",value:function(t){return void 0===t?this.options.readonly:this.options.readonly===Boolean(t)?this.$element:this.toggleReadonly()}},{key:"toggleReadonly",value:function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this._getClass("readonly")),this.$element}},{key:"indeterminate",value:function(t){return void 0===t?this.options.indeterminate:this.options.indeterminate===Boolean(t)?this.$element:this.toggleIndeterminate()}},{key:"toggleIndeterminate",value:function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this._getClass("indeterminate")),this._containerPosition(),this.$element}},{key:"inverse",value:function(t){return void 0===t?this.options.inverse:this.options.inverse===Boolean(t)?this.$element:this.toggleInverse()}},{key:"toggleInverse",value:function(){this.$wrapper.toggleClass(this._getClass("inverse"));var t=this.$on.clone(!0),e=this.$off.clone(!0);return this.$on.replaceWith(e),this.$off.replaceWith(t),this.$on=e,this.$off=t,this.options.inverse=!this.options.inverse,this.$element}},{key:"onColor",value:function(t){return void 0===t?this.options.onColor:(this.options.onColor&&this.$on.removeClass(this._getClass(this.options.onColor)),this.$on.addClass(this._getClass(t)),this.options.onColor=t,this.$element)}},{key:"offColor",value:function(t){return void 0===t?this.options.offColor:(this.options.offColor&&this.$off.removeClass(this._getClass(this.options.offColor)),this.$off.addClass(this._getClass(t)),this.options.offColor=t,this.$element)}},{key:"onText",value:function(t){return void 0===t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)}},{key:"offText",value:function(t){return void 0===t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)}},{key:"labelText",value:function(t){return void 0===t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)}},{key:"handleWidth",value:function(t){return void 0===t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)}},{key:"labelWidth",value:function(t){return void 0===t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)}},{key:"baseClass",value:function(t){return this.options.baseClass}},{key:"wrapperClass",value:function(t){return void 0===t?this.options.wrapperClass:(t||(t=o.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)}},{key:"radioAllOff",value:function(t){if(void 0===t)return this.options.radioAllOff;var e=Boolean(t);return this.options.radioAllOff===e?this.$element:(this.options.radioAllOff=e,this.$element)}},{key:"onInit",value:function(t){return void 0===t?this.options.onInit:(t||(t=o.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=t,this.$element)}},{key:"onSwitchChange",value:function(t){return void 0===t?this.options.onSwitchChange:(t||(t=o.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=t,this.$element)}},{key:"destroy",value:function(){var t=this.$element.closest("form");return t.length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element}},{key:"_getElementOptions",value:function(){return{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")}}},{key:"_width",value:function(){var t=this,e=this.$on.add(this.$off).add(this.$label).css("width",""),i="auto"===this.options.handleWidth?Math.round(Math.max(this.$on.width(),this.$off.width())):this.options.handleWidth;return e.width(i),this.$label.width(function(e,n){return"auto"!==t.options.labelWidth?t.options.labelWidth:n<i?i:n}),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)}},{key:"_containerPosition",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.state;arguments[1];this.$container.css("margin-left",function(){var i=[0,"-"+t._handleWidth+"px"];return t.options.indeterminate?"-"+t._handleWidth/2+"px":e?t.options.inverse?i[1]:i[0]:t.options.inverse?i[0]:i[1]})}},{key:"_init",value:function(){var t=this,e=function(){t.setPrevOptions(),t._width(),t._containerPosition(),setTimeout(function(){if(t.options.animate)return t.$wrapper.addClass(t._getClass("animate"))},50)};if(this.$wrapper.is(":visible"))e();else var i=window.setInterval(function(){if(t.$wrapper.is(":visible"))return e(),window.clearInterval(i)},50)}},{key:"_elementHandlers",value:function(){var t=this;return this.$element.on({"setPreviousOptions.bootstrapSwitch":this.setPrevOptions.bind(this),"previousState.bootstrapSwitch":function(){t.options=t.prevOptions,t.options.indeterminate&&t.$wrapper.addClass(t._getClass("indeterminate")),t.$element.prop("checked",t.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function(e,i){e.preventDefault(),e.stopImmediatePropagation();var n=t.$element.is(":checked");t._containerPosition(n),n!==t.options.state&&(t.options.state=n,t.$wrapper.toggleClass(t._getClass("off")).toggleClass(t._getClass("on")),i||(t.$element.is(":radio")&&o('[name="'+t.$element.attr("name")+'"]').not(t.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),t.$element.trigger("switchChange.bootstrapSwitch",[n])))},"focus.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.addClass(t._getClass("focused"))},"blur.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.removeClass(t._getClass("focused"))},"keydown.bootstrapSwitch":function(e){!e.which||t.options.disabled||t.options.readonly||37!==e.which&&39!==e.which||(e.preventDefault(),e.stopImmediatePropagation(),t.state(39===e.which))}})}},{key:"_handleHandlers",value:function(){var t=this;return this.$on.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}),this.$off.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")})}},{key:"_labelHandlers",value:function(){var t=this,e={click:function(t){t.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(e){t._dragStart||t.options.disabled||t.options.readonly||(e.preventDefault(),e.stopPropagation(),t._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(t.$container.css("margin-left"),10),t.options.animate&&t.$wrapper.removeClass(t._getClass("animate")),t.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(e){if(null!=t._dragStart){var i=(e.pageX||e.originalEvent.touches[0].pageX)-t._dragStart;e.preventDefault(),i<-t._handleWidth||i>0||(t._dragEnd=i,t.$container.css("margin-left",t._dragEnd+"px"))}},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(e){if(t._dragStart){if(e.preventDefault(),t.options.animate&&t.$wrapper.addClass(t._getClass("animate")),t._dragEnd){var i=t._dragEnd>-t._handleWidth/2;t._dragEnd=!1,t.state(t.options.inverse?!i:i)}else t.state(!t.options.state);t._dragStart=!1}},"mouseleave.bootstrapSwitch":function(){t.$label.trigger("mouseup.bootstrapSwitch")}};this.$label.on(e)}},{key:"_externalLabelHandler",value:function(){var t=this,e=this.$element.closest("label");e.on("click",function(i){i.preventDefault(),i.stopImmediatePropagation(),i.target===e[0]&&t.toggleState()})}},{key:"_formHandler",value:function(){var t=this.$element.closest("form");t.data("bootstrap-switch")||t.on("reset.bootstrapSwitch",function(){window.setTimeout(function(){t.find("input").filter(function(){return o(this).data("bootstrap-switch")}).each(function(){return o(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)}},{key:"_getClass",value:function(t){return this.options.baseClass+"-"+t}},{key:"_getClasses",value:function(t){return o.isArray(t)?t.map(this._getClass.bind(this)):[this._getClass(t)]}}]),t}();o.fn.bootstrapSwitch=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Array.prototype.reduce.call(this,function(e,n){var r=o(n),a=r.data("bootstrap-switch"),l=a||new s(n,t);return a||r.data("bootstrap-switch",l),"string"==typeof t?l[t].apply(l,i):e},this)},o.fn.bootstrapSwitch.Constructor=s,o.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:" ",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}),function(t){"use strict";var e=function(t,e){this.init("multiselectsplitter",t,e)};e.DEFAULTS={selectSize:null,maxSelectSize:null,clearOnFirstChange:!1,onlySameGroup:!1,groupCounter:!1,maximumSelected:null,afterInitialize:null,maximumAlert:function(t){alert("Only "+t+" values can be selected")},createFirstSelect:function(t,e){return"<option>"+t+"</option>"},createSecondSelect:function(t,e){return"<option>"+t+"</option>"},template:'<div class="row" data-multiselectsplitter-wrapper-selector><div class="col-xs-6 col-sm-6"><select class="form-control" data-multiselectsplitter-firstselect-selector></select></div> \x3c!-- Add the extra clearfix for only the required viewport --\x3e<div class="col-xs-6 col-sm-6"><select class="form-control" data-multiselectsplitter-secondselect-selector></select></div></div>'},e.prototype.init=function(i,n,r){var o=this;o.type=i,o.last$ElementSelected=[],o.initialized=!1,o.$element=t(n),o.$element.hide(),o.options=t.extend({},e.DEFAULTS,r),o.$element.after(o.options.template),o.$wrapper=o.$element.next("div[data-multiselectsplitter-wrapper-selector]"),o.$firstSelect=t("select[data-multiselectsplitter-firstselect-selector]",o.$wrapper),o.$secondSelect=t("select[data-multiselectsplitter-secondselect-selector]",o.$wrapper);var s=0,a=0;if(0!=o.$element.find("optgroup").length){o.$element.find("optgroup").each(function(){var e=t(this).attr("label"),i=t(o.options.createFirstSelect(e,o.$element));i.val(e),i.attr("data-current-label",i.text()),o.$firstSelect.append(i);var n=t(this).find("option").length;n>a&&(a=n),s++});var l=Math.max(s,a);l=Math.min(l,10),o.options.selectSize?l=o.options.selectSize:o.options.maxSelectSize&&(l=Math.min(l,o.options.maxSelectSize)),o.$firstSelect.attr("size",l),o.$secondSelect.attr("size",l),o.$element.attr("multiple")&&o.$secondSelect.attr("multiple","multiple"),o.$element.is(":disabled")&&o.disable(),o.$firstSelect.on("change",t.proxy(o.updateParentCategory,o)),o.$secondSelect.on("click change",t.proxy(o.updateChildCategory,o)),o.update=function(){if(!(o.$element.find("option").length<1)){var t,e=o.$element.find("option:selected:first");t=e.length?e.parent().attr("label"):o.$element.find("option:first").parent().attr("label"),o.$firstSelect.find('option[value="'+t+'"]').prop("selected",!0),o.$firstSelect.trigger("change")}},o.update(),o.initialized=!0,o.options.afterInitialize&&o.options.afterInitialize(o.$firstSelect,o.$secondSelect)}},e.prototype.disable=function(){this.$secondSelect.prop("disabled",!0),this.$firstSelect.prop("disabled",!0)},e.prototype.enable=function(){this.$secondSelect.prop("disabled",!1),this.$firstSelect.prop("disabled",!1)},e.prototype.createSecondSelect=function(){var e=this;e.$secondSelect.empty(),t.each(e.$element.find('optgroup[label="'+e.$firstSelect.val()+'"] option'),function(i,n){var r=t(this).val(),o=t(this).text(),s=t(e.options.createSecondSelect(o,e.$firstSelect));s.val(r),t.each(e.$element.find("option:selected"),function(e,i){t(i).val()==r&&s.prop("selected",!0)}),e.$secondSelect.append(s)})},e.prototype.updateParentCategory=function(){var t=this;t.last$ElementSelected=t.$element.find("option:selected"),t.options.clearOnFirstChange&&t.initialized&&t.$element.find("option:selected").prop("selected",!1),t.createSecondSelect(),t.checkSelected(),t.updateCounter()},e.prototype.updateCounter=function(){var e=this;e.$element.attr("multiple")&&e.options.groupCounter&&t.each(e.$firstSelect.find("option"),function(i,n){var r=t(n).val(),o=t(n).data("currentLabel"),s=e.$element.find('optgroup[label="'+r+'"] option:selected').length;s>0&&(o+=" ("+s+")"),t(n).html(o)})},e.prototype.checkSelected=function(){var e=this;if(e.$element.attr("multiple")&&e.options.maximumSelected){var i;if(!((i="function"==typeof e.options.maximumSelected?e.options.maximumSelected(e.$firstSelect,e.$secondSelect):e.options.maximumSelected)<1))if(e.$element.find("option:selected").length>i){e.$firstSelect.find("option:selected").prop("selected",!1),e.$secondSelect.find("option:selected").prop("selected",!1),e.initialized?(e.$element.find("option:selected").prop("selected",!1),e.last$ElementSelected.prop("selected",!0)):t.each(e.$element.find("option:selected"),function(e,n){e>i-1&&t(n).prop("selected",!1)});var n=e.last$ElementSelected.first().parent().attr("label");e.$firstSelect.find('option[value="'+n+'"]').prop("selected",!0),e.createSecondSelect(),e.options.maximumAlert(i)}}},e.prototype.basicUpdateChildCategory=function(e,i){var n=this;n.last$ElementSelected=n.$element.find("option:selected");var r=n.$secondSelect.val();t.isArray(r)||(r=[r]);var o=n.$firstSelect.val(),s=!1;n.$element.attr("multiple")?n.options.onlySameGroup?t.each(n.$element.find("option:selected"),function(e,i){if(t(i).parent().attr("label")!=o)return s=!0,!1}):i||(s=!0):s=!0,s?n.$element.find("option:selected").prop("selected",!1):t.each(n.$element.find("option:selected"),function(e,i){o==t(i).parent().attr("label")&&-1==t.inArray(t(i).val(),r)&&t(i).prop("selected",!1)}),t.each(r,function(t,e){n.$element.find('option[value="'+e+'"]').prop("selected",!0)}),n.checkSelected(),n.updateCounter(),n.$element.trigger("change")},e.prototype.updateChildCategory=function(e){"change"==e.type?this.timeOut=setTimeout(t.proxy(function(){this.basicUpdateChildCategory(e,e.ctrlKey)},this),10):"click"==e.type&&(clearTimeout(this.timeOut),this.basicUpdateChildCategory(e,e.ctrlKey))},e.prototype.destroy=function(){this.$wrapper.remove(),this.$element.removeData(this.type),this.$element.show()},t.fn.multiselectsplitter=function(i){return this.each(function(){var n=t(this),r=n.data("multiselectsplitter"),o="object"==typeof i&&i;(r||"destroy"!=i)&&(r||n.data("multiselectsplitter",r=new e(this,o)),"string"==typeof i&&r[i]())})},t.fn.multiselectsplitter.Constructor=e,t.fn.multiselectsplitter.VERSION="1.0.1"}(jQuery),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(t){!function(t){"use strict";var e,i,n,r=document.createElement("_");if(r.classList.toggle("c3",!1),r.classList.contains("c3")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(e=function(){try{var t={},e=Object.defineProperty,i=e(t,t,t)&&e}catch(t){}return i}(),i={}.toString,n=function(t){if(null==this)throw new TypeError;var e=String(this);if(t&&"[object RegExp]"==i.call(t))throw new TypeError;var n=e.length,r=String(t),o=r.length,s=arguments.length>1?arguments[1]:void 0,a=s?Number(s):0;a!=a&&(a=0);var l=Math.min(Math.max(a,0),n);if(o+l>n)return!1;for(var c=-1;++c<o;)if(e.charCodeAt(l+c)!=r.charCodeAt(c))return!1;return!0},e?e(String.prototype,"startsWith",{value:n,configurable:!0,writable:!0}):String.prototype.startsWith=n),Object.keys||(Object.keys=function(t,e,i){for(e in i=[],t)i.hasOwnProperty.call(t,e)&&i.push(e);return i});var s={useDefault:!1,_set:t.valHooks.select.set};t.valHooks.select.set=function(e,i){return i&&!s.useDefault&&t(e).data("selected",!0),s._set.apply(this,arguments)};var a=null,l=function(){try{return new Event("change"),!0}catch(t){return!1}}();function c(t,e,i,n){for(var r=["content","subtext","tokens"],o=!1,s=0;s<r.length;s++){var a=t[r[s]];if(a&&(n&&(a=d(a)),a=a.toUpperCase(),o="contains"===i?a.indexOf(e)>=0:a.startsWith(e)))break}return o}function h(t){return parseInt(t,10)||0}function d(e){return t.each([{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}],function(){e=e?e.replace(this.re,this.ch):""}),e}t.fn.triggerNative=function(t){var e,i=this[0];i.dispatchEvent?(l?e=new Event(t,{bubbles:!0}):(e=document.createEvent("Event")).initEvent(t,!0,!1),i.dispatchEvent(e)):i.fireEvent?((e=document.createEventObject()).eventType=t,i.fireEvent("on"+t,e)):this.trigger(t)};var u=function(t){var e=function(e){return t[e]},i="(?:"+Object.keys(t).join("|")+")",n=RegExp(i),r=RegExp(i,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(r,e):t}},p=u({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),f=u({"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"}),m={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},g=27,v=13,y=32,b=9,_=38,x=40,w={};w.full=(t.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),w.major=w.full[0];var k={DISABLED:"disabled",DIVIDER:"4"===w.major?"dropdown-divider":"divider",SHOW:"4"===w.major?"show":"open",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"4"===w.major?"btn-light":"btn-default"},C=new RegExp(_+"|"+x),S=new RegExp("^"+b+"$|"+g),D=(new RegExp(v+"|"+y),function(e,i){var n=this;s.useDefault||(t.valHooks.select.set=s._set,s.useDefault=!0),this.$element=t(e),this.$newElement=null,this.$button=null,this.$menu=null,this.options=i,this.selectpicker={main:{map:{newIndex:{},originalIndex:{}}},current:{map:{}},search:{map:{}},view:{},keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){n.selectpicker.keydown.keyHistory=""},800)}}}},null===this.options.title&&(this.options.title=this.$element.attr("title"));var r=this.options.windowPadding;"number"==typeof r&&(this.options.windowPadding=[r,r,r,r]),this.val=D.prototype.val,this.render=D.prototype.render,this.refresh=D.prototype.refresh,this.setStyle=D.prototype.setStyle,this.selectAll=D.prototype.selectAll,this.deselectAll=D.prototype.deselectAll,this.destroy=D.prototype.destroy,this.remove=D.prototype.remove,this.show=D.prototype.show,this.hide=D.prototype.hide,this.init()});function T(e){var i,n=arguments,r=e;[].shift.apply(n);var o=this.each(function(){var e=t(this);if(e.is("select")){var o=e.data("selectpicker"),s="object"==typeof r&&r;if(o){if(s)for(var a in s)s.hasOwnProperty(a)&&(o.options[a]=s[a])}else{var l=t.extend({},D.DEFAULTS,t.fn.selectpicker.defaults||{},e.data(),s);l.template=t.extend({},D.DEFAULTS.template,t.fn.selectpicker.defaults?t.fn.selectpicker.defaults.template:{},e.data().template,s.template),e.data("selectpicker",o=new D(this,l))}"string"==typeof r&&(i=o[r]instanceof Function?o[r].apply(o,n):o.options[r])}});return void 0!==i?i:o}D.VERSION="1.13.0-beta",D.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(t,e){return 1==t?"{0} item selected":"{0} items selected"},maxOptionsText:function(t,e){return[1==t?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==e?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600},"4"===w.major&&(D.DEFAULTS.style="btn-light",D.DEFAULTS.iconBase="",D.DEFAULTS.tickIcon="bs-ok-default"),D.prototype={constructor:D,init:function(){var t=this,e=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createDropdown(),this.createLi(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element.removeClass("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu.addClass(k.MENURIGHT),void 0!==e&&this.$button.attr("data-id",e),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide.bs.select",function(){if(t.isVirtual()){var e=t.$menuInner[0],i=e.firstChild.cloneNode(!1);e.replaceChild(i,e.firstChild),e.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(e){t.$menuInner.attr("aria-expanded",!1),t.$element.trigger("hide.bs.select",e)},"hidden.bs.dropdown":function(e){t.$element.trigger("hidden.bs.select",e)},"show.bs.dropdown":function(e){t.$menuInner.attr("aria-expanded",!0),t.$element.trigger("show.bs.select",e)},"shown.bs.dropdown":function(e){t.$element.trigger("shown.bs.select",e)}}),t.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){t.$button.addClass("bs-invalid"),t.$element.on({"shown.bs.select":function(){t.$element.val(t.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&t.$button.removeClass("bs-invalid"),t.$element.off("rendered.bs.select")}}),t.$button.on("blur.bs.select",function(){t.$element.focus().blur(),t.$button.off("blur.bs.select")})}),setTimeout(function(){t.$element.trigger("loaded.bs.select")})},createDropdown:function(){var e=this.multiple||this.options.showTick?" show-tick":"",i=this.$element.parent().hasClass("input-group")?" input-group-btn":"",n=this.autofocus?" autofocus":"",r=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">×</button>'+this.options.header+"</div>":"",o=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+p(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"></div>':"",s=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn '+k.BUTTONCLASS+'">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn '+k.BUTTONCLASS+'">'+this.options.deselectAllText+"</button></div></div>":"",a=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm '+k.BUTTONCLASS+'">'+this.options.doneButtonText+"</button></div></div>":"",l='<div class="dropdown bootstrap-select'+e+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+n+' role="button"><div class="filter-option"><div class="filter-option-inner"></div></div> <span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu '+("4"===w.major?"":k.SHOW)+'" role="combobox">'+r+o+s+'<div class="inner '+k.SHOW+'" role="listbox" aria-expanded="false" tabindex="-1"><ul class="dropdown-menu inner '+("4"===w.major?k.SHOW:"")+'"></ul></div>'+a+"</div></div>";return t(l)},setPositionData:function(){this.selectpicker.view.canHighlight=[];for(var t=0;t<this.selectpicker.current.data.length;t++){var e=this.selectpicker.current.data[t],i=!0;"divider"===e.type?(i=!1,e.height=this.sizeInfo.dividerHeight):"optgroup-label"===e.type?(i=!1,e.height=this.sizeInfo.dropdownHeaderHeight):e.height=this.sizeInfo.liHeight,e.disabled&&(i=!1),this.selectpicker.view.canHighlight.push(i),e.position=(0===t?0:this.selectpicker.current.data[t-1].position)+e.height}},isVirtual:function(){return!1!==this.options.virtualScroll&&this.selectpicker.main.elements.length>=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(e,i){i=i||0;var n=this;this.selectpicker.current=e?this.selectpicker.search:this.selectpicker.main;var r,o,s=[];function a(t,i){var a,l,c,h,d,u,p,f,m,g=n.selectpicker.current.elements.length,v=[],y=void 0,b=!0,_=n.isVirtual();n.selectpicker.view.scrollTop=t,!0===_&&n.sizeInfo.hasScrollBar&&n.$menu[0].offsetWidth>n.sizeInfo.totalMenuWidth&&(n.sizeInfo.menuWidth=n.$menu[0].offsetWidth,n.sizeInfo.totalMenuWidth=n.sizeInfo.menuWidth+n.sizeInfo.scrollBarWidth,n.$menu.css("min-width",n.sizeInfo.menuWidth)),a=Math.ceil(n.sizeInfo.menuInnerHeight/n.sizeInfo.liHeight*1.5),l=Math.round(g/a)||1;for(var x=0;x<l;x++){var w=(x+1)*a;if(x===l-1&&(w=g),v[x]=[x*a+(x?1:0),w],!g)break;void 0===y&&t<=n.selectpicker.current.data[w-1].position-n.sizeInfo.menuInnerHeight&&(y=x)}if(void 0===y&&(y=0),d=[n.selectpicker.view.position0,n.selectpicker.view.position1],c=Math.max(0,y-1),h=Math.min(l-1,y+1),n.selectpicker.view.position0=Math.max(0,v[c][0])||0,n.selectpicker.view.position1=Math.min(g,v[h][1])||0,u=d[0]!==n.selectpicker.view.position0||d[1]!==n.selectpicker.view.position1,void 0!==n.activeIndex&&(o=n.selectpicker.current.elements[n.selectpicker.current.map.newIndex[n.prevActiveIndex]],s=n.selectpicker.current.elements[n.selectpicker.current.map.newIndex[n.activeIndex]],r=n.selectpicker.current.elements[n.selectpicker.current.map.newIndex[n.selectedIndex]],i&&(n.activeIndex!==n.selectedIndex&&(s.classList.remove("active"),s.firstChild&&s.firstChild.classList.remove("active")),n.activeIndex=void 0),n.activeIndex&&n.activeIndex!==n.selectedIndex&&r&&r.length&&(r.classList.remove("active"),r.firstChild&&r.firstChild.classList.remove("active"))),void 0!==n.prevActiveIndex&&n.prevActiveIndex!==n.activeIndex&&n.prevActiveIndex!==n.selectedIndex&&o&&o.length&&(o.classList.remove("active"),o.firstChild&&o.firstChild.classList.remove("active")),(i||u)&&(p=n.selectpicker.view.visibleElements?n.selectpicker.view.visibleElements.slice():[],n.selectpicker.view.visibleElements=n.selectpicker.current.elements.slice(n.selectpicker.view.position0,n.selectpicker.view.position1),n.setOptionStatus(),(e||!1===_&&i)&&(f=p,m=n.selectpicker.view.visibleElements,b=!(f.length===m.length&&f.every(function(t,e){return t===m[e]}))),(i||!0===_)&&b)){var k,C,S=n.$menuInner[0],D=document.createDocumentFragment(),T=S.firstChild.cloneNode(!1),A=!0===_?n.selectpicker.view.visibleElements:n.selectpicker.current.elements;S.replaceChild(T,S.firstChild);x=0;for(var M=A.length;x<M;x++)D.appendChild(A[x]);!0===_&&(k=0===n.selectpicker.view.position0?0:n.selectpicker.current.data[n.selectpicker.view.position0-1].position,C=n.selectpicker.view.position1>g-1?0:n.selectpicker.current.data[g-1].position-n.selectpicker.current.data[n.selectpicker.view.position1-1].position,S.firstChild.style.marginTop=k+"px",S.firstChild.style.marginBottom=C+"px"),S.firstChild.appendChild(D)}if(n.prevActiveIndex=n.activeIndex,n.options.liveSearch){if(e&&i){var E,P=0;n.selectpicker.view.canHighlight[P]||(P=1+n.selectpicker.view.canHighlight.slice(1).indexOf(!0)),E=n.selectpicker.view.visibleElements[P],n.selectpicker.view.currentActive&&(n.selectpicker.view.currentActive.classList.remove("active"),n.selectpicker.view.currentActive.firstChild&&n.selectpicker.view.currentActive.firstChild.classList.remove("active")),E&&(E.classList.add("active"),E.firstChild&&E.firstChild.classList.add("active")),n.activeIndex=n.selectpicker.current.map.originalIndex[P]}}else n.$menuInner.focus()}this.setPositionData(),a(i,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(t,e){n.noScroll||a(this.scrollTop,e),n.noScroll=!1}),t(window).off("resize.createView").on("resize.createView",function(){a(n.$menuInner[0].scrollTop)})},createLi:function(){var e,i=this,n=[],r=0,o=0,s=[],a=0,l=0,c=-1;this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option"));var h={span:document.createElement("span"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" ")},d=h.span.cloneNode(!1),u=document.createDocumentFragment();d.className=i.options.iconBase+" "+i.options.tickIcon+" check-mark",h.a.appendChild(d),h.a.setAttribute("role","option"),h.subtext.className="text-muted",h.text=h.span.cloneNode(!1),h.text.className="text";var f=function(t,e,i,n){var r=h.li.cloneNode(!1);return t&&(1===t.nodeType||11===t.nodeType?r.appendChild(t):r.innerHTML=t),void 0!==i&&""!==i&&(r.className=i),void 0!==n&&null!==n&&r.classList.add("optgroup-"+n),r},m=function(t,e,i){var n=h.a.cloneNode(!0);return t&&(11===t.nodeType?n.appendChild(t):n.insertAdjacentHTML("beforeend",t)),void 0!==e&""!==e&&(n.className=e),"4"===w.major&&n.classList.add("dropdown-item"),i&&n.setAttribute("style",i),n},g=function(t){var e,n,r=h.text.cloneNode(!1);if(t.optionContent)r.innerHTML=t.optionContent;else{if(r.textContent=t.text,t.optionIcon){var o=h.whitespace.cloneNode(!1);(n=h.span.cloneNode(!1)).className=i.options.iconBase+" "+t.optionIcon,u.appendChild(n),u.appendChild(o)}t.optionSubtext&&((e=h.subtext.cloneNode(!1)).textContent=t.optionSubtext,r.appendChild(e))}return u.appendChild(r),u};if(this.options.title&&!this.multiple){c--;var v=this.$element[0],y=!1;if(!this.selectpicker.view.titleOption.parentNode)this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.innerHTML=this.options.title,this.selectpicker.view.titleOption.value="",y=void 0===t(v.options[v.selectedIndex]).attr("selected")&&void 0===this.$element.data("selected");v.insertBefore(this.selectpicker.view.titleOption,v.firstChild),y&&(v.selectedIndex=0)}var b=this.$element.find("option");b.each(function(d){var v=t(this);if(c++,!v.hasClass("bs-title-option")){var y,_,x=v.data(),w=this.className||"",C=p(this.style.cssText),S=x.content,D=this.textContent,T=x.tokens,A=x.subtext,M=x.icon,E=v.parent(),P=E[0],I="OPTGROUP"===P.tagName,O=I&&P.disabled,N=this.disabled||O,L=this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName,j=E.data();if(!0===x.hidden||i.options.hideDisabled&&(N&&!I||O)){y=x.prevHiddenIndex,v.next().data("prevHiddenIndex",void 0!==y?y:d),c--,L||void 0!==y&&(W=b[y].previousElementSibling)&&"OPTGROUP"===W.tagName&&!W.disabled&&(L=!0),L&&"divider"!==s[s.length-1].type&&(c++,n.push(f(!1,0,k.DIVIDER,a+"div")),s.push({type:"divider",optID:a,originalIndex:d}))}else{if(I&&!0!==x.divider){if(i.options.hideDisabled&&N){if(void 0===j.allOptionsDisabled){var F=E.children();E.data("allOptionsDisabled",F.filter(":disabled").length===F.length)}if(E.data("allOptionsDisabled"))return void c--}var $=" "+P.className||"";if(!this.previousElementSibling){a+=1;var R=P.label,H=p(R),z=j.subtext,B=j.icon;0!==d&&n.length>0&&(c++,n.push(f(!1,0,k.DIVIDER,a+"div")),s.push({type:"divider",optID:a,originalIndex:d})),c++;var U=function(t){var e,n,r=h.text.cloneNode(!1);if(r.textContent=t.labelEscaped,t.labelIcon){var o=h.whitespace.cloneNode(!1);(n=h.span.cloneNode(!1)).className=i.options.iconBase+" "+t.labelIcon,u.appendChild(n),u.appendChild(o)}return t.labelSubtext&&((e=h.subtext.cloneNode(!1)).textContent=t.labelSubtext,r.appendChild(e)),u.appendChild(r),u}({labelEscaped:H,labelSubtext:z,labelIcon:B});n.push(f(U,0,"dropdown-header"+$,a)),s.push({content:H,subtext:z,type:"optgroup-label",optID:a,originalIndex:d}),l=c-1}if(i.options.hideDisabled&&N||!0===x.hidden)return void c--;_=g({text:D,optionContent:S,optionSubtext:A,optionIcon:M}),n.push(f(m(_,"opt "+w+$,C),0,"",a)),s.push({content:D,subtext:A,tokens:T,type:"option",optID:a,headerIndex:l,lastIndex:l+P.childElementCount,originalIndex:d}),r++}else if(!0===x.divider)n.push(f(!1,0,"divider")),s.push({type:"divider",originalIndex:d});else{var W;if(!L&&i.options.hideDisabled)if(void 0!==(y=x.prevHiddenIndex))(W=b[y].previousElementSibling)&&"OPTGROUP"===W.tagName&&!W.disabled&&(L=!0);L&&"divider"!==s[s.length-1].type&&(c++,n.push(f(!1,0,k.DIVIDER,a+"div")),s.push({type:"divider",optID:a,originalIndex:d})),_=g({text:D,optionContent:S,optionSubtext:A,optionIcon:M}),n.push(f(m(_,w,C))),s.push({content:D,subtext:A,tokens:T,type:"option",originalIndex:d}),r++}i.selectpicker.main.map.newIndex[d]=c,i.selectpicker.main.map.originalIndex[c]=d;var Y=s[s.length-1];Y.disabled=N;var V=0;Y.content&&(V+=Y.content.length),Y.subtext&&(V+=Y.subtext.length),M&&(V+=1),V>o&&(o=V,e=n[n.length-1])}}}),this.selectpicker.main.elements=n,this.selectpicker.main.data=s,this.selectpicker.current=this.selectpicker.main,this.selectpicker.view.widestOption=e,this.selectpicker.view.availableOptionsCount=r},findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){var e=this,i=this.$element.find("option"),n=[],r=[];this.togglePlaceholder(),this.tabIndex(),i.each(function(i){if(this.selected&&(n.push(this),r.length<100&&"count"!==e.options.selectedTextFormat)){if(e.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var o,s,a=t(this),l=a.data(),c=l.icon&&e.options.showIcon?'<i class="'+e.options.iconBase+" "+l.icon+'"></i> ':"";o=e.options.showSubtext&&l.subtext&&!e.multiple?' <small class="text-muted">'+l.subtext+"</small>":"",s=void 0!==a.attr("title")?a.attr("title"):l.content&&e.options.showContent?l.content.toString():c+a.html()+o,r.push(s)}});var o=this.multiple?r.join(this.options.multipleSeparator):r[0];if(n.length>100&&(o+="..."),this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var s=this.options.selectedTextFormat.split(">");if(s.length>1&&n.length>s[1]||1===s.length&&n.length>=2){var a=this.selectpicker.view.availableOptionsCount;o=("function"==typeof this.options.countSelectedText?this.options.countSelectedText(n.length,a):this.options.countSelectedText).replace("{0}",n.length.toString()).replace("{1}",a.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(o=this.options.title),o||(o=void 0!==this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",f(t.trim(o.replace(/<[^>]*>?/g,"")))),this.$button.find(".filter-option-inner").html(o),this.$element.trigger("rendered.bs.select")},setStyle:function(t,e){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var i=t||this.options.style;"add"==e?this.$button.addClass(i):"remove"==e?this.$button.removeClass(i):(this.$button.removeClass(this.options.style),this.$button.addClass(i))},liHeight:function(e){if(e||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var i=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div"),o=document.createElement("ul"),s=document.createElement("li"),a=document.createElement("li"),l=document.createElement("li"),c=document.createElement("a"),d=document.createElement("span"),u=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,p=this.options.liveSearch?document.createElement("div"):null,f=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,d.className="text",c.className="dropdown-item",i.className=this.$menu[0].parentNode.className+" "+k.SHOW,i.style.width=this.sizeInfo.selectWidth+"px",n.className="dropdown-menu "+k.SHOW,r.className="inner "+k.SHOW,o.className="dropdown-menu inner "+("4"===w.major?k.SHOW:""),s.className=k.DIVIDER,a.className="dropdown-header",d.appendChild(document.createTextNode("Inner text")),c.appendChild(d),l.appendChild(c),a.appendChild(d.cloneNode(!0)),this.selectpicker.view.widestOption&&o.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)),o.appendChild(l),o.appendChild(s),o.appendChild(a),u&&n.appendChild(u),p){var g=document.createElement("input");p.className="bs-searchbox",g.className="form-control",p.appendChild(g),n.appendChild(p)}f&&n.appendChild(f),r.appendChild(o),n.appendChild(r),m&&n.appendChild(m),i.appendChild(n),document.body.appendChild(i);var v,y=c.offsetHeight,b=a?a.offsetHeight:0,_=u?u.offsetHeight:0,x=p?p.offsetHeight:0,C=f?f.offsetHeight:0,S=m?m.offsetHeight:0,D=t(s).outerHeight(!0),T=!!window.getComputedStyle&&window.getComputedStyle(n),A=n.offsetWidth,M=T?null:t(n),E={vert:h(T?T.paddingTop:M.css("paddingTop"))+h(T?T.paddingBottom:M.css("paddingBottom"))+h(T?T.borderTopWidth:M.css("borderTopWidth"))+h(T?T.borderBottomWidth:M.css("borderBottomWidth")),horiz:h(T?T.paddingLeft:M.css("paddingLeft"))+h(T?T.paddingRight:M.css("paddingRight"))+h(T?T.borderLeftWidth:M.css("borderLeftWidth"))+h(T?T.borderRightWidth:M.css("borderRightWidth"))},P={vert:E.vert+h(T?T.marginTop:M.css("marginTop"))+h(T?T.marginBottom:M.css("marginBottom"))+2,horiz:E.horiz+h(T?T.marginLeft:M.css("marginLeft"))+h(T?T.marginRight:M.css("marginRight"))+2};r.style.overflowY="scroll",v=n.offsetWidth-A,document.body.removeChild(i),this.sizeInfo.liHeight=y,this.sizeInfo.dropdownHeaderHeight=b,this.sizeInfo.headerHeight=_,this.sizeInfo.searchHeight=x,this.sizeInfo.actionsHeight=C,this.sizeInfo.doneButtonHeight=S,this.sizeInfo.dividerHeight=D,this.sizeInfo.menuPadding=E,this.sizeInfo.menuExtras=P,this.sizeInfo.menuWidth=A,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth,this.sizeInfo.scrollBarWidth=v,this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight,this.setPositionData()}},getSelectPosition:function(){var e,i=t(window),n=this.$newElement.offset(),r=t(this.options.container);this.options.container&&!r.is("body")?((e=r.offset()).top+=parseInt(r.css("borderTopWidth")),e.left+=parseInt(r.css("borderLeftWidth"))):e={top:0,left:0};var o=this.options.windowPadding;this.sizeInfo.selectOffsetTop=n.top-e.top-i.scrollTop(),this.sizeInfo.selectOffsetBot=i.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-e.top-o[2],this.sizeInfo.selectOffsetLeft=n.left-e.left-i.scrollLeft(),this.sizeInfo.selectOffsetRight=i.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-e.left-o[1],this.sizeInfo.selectOffsetTop-=o[0],this.sizeInfo.selectOffsetLeft-=o[3]},setMenuSize:function(t){this.getSelectPosition();var e,i,n,r,o,s,a,l=this.sizeInfo.selectWidth,c=this.sizeInfo.liHeight,h=this.sizeInfo.headerHeight,d=this.sizeInfo.searchHeight,u=this.sizeInfo.actionsHeight,p=this.sizeInfo.doneButtonHeight,f=this.sizeInfo.dividerHeight,m=this.sizeInfo.menuPadding,g=0;if(this.options.dropupAuto&&(a=c*this.selectpicker.current.elements.length+m.vert,this.$newElement.toggleClass(k.DROPUP,this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&a+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)r=this.selectpicker.current.elements.length>3?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,i=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,n=r+h+d+u+p,s=Math.max(r-m.vert,0),this.$newElement.hasClass(k.DROPUP)&&(i=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),o=i,e=i-h-d-u-p-m.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(var v=0;v<this.options.size;v++)"divider"===this.selectpicker.current.data[v].type&&g++;e=(i=c*this.options.size+g*f+m.vert)-m.vert,o=i+h+d+u+p,n=s=""}"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(k.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.$menu[0].offsetWidth-l),this.$menu.css({"max-height":o+"px",overflow:"hidden","min-height":n+"px"}),this.$menuInner.css({"max-height":e+"px","overflow-y":"auto","min-height":s+"px"}),this.sizeInfo.menuInnerHeight=e,this.selectpicker.current.data.length&&this.selectpicker.current.data[this.selectpicker.current.data.length-1].position>this.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth,this.$menu.css("min-width",this.sizeInfo.totalMenuWidth)),this.dropdown&&this.dropdown._popper.update()},setSize:function(e){if(this.liHeight(e),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var i,n=this,r=t(window),o=0;this.setMenuSize(),"auto"===this.options.size?(this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return n.setMenuSize()}),r.off("resize.setMenuSize scroll.setMenuSize").on("resize.setMenuSize scroll.setMenuSize",function(){return n.setMenuSize()})):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&(this.$searchbox.off("input.setMenuSize propertychange.setMenuSize"),r.off("resize.setMenuSize scroll.setMenuSize")),e?o=this.$menuInner[0].scrollTop:n.multiple||"number"==typeof(i=n.selectpicker.main.map.newIndex[n.$element[0].selectedIndex])&&!1!==n.options.size&&(o=(o=n.sizeInfo.liHeight*i)-n.sizeInfo.menuInnerHeight/2+n.sizeInfo.liHeight/2),n.createView(!1,o)}},setWidth:function(){var t=this;"auto"===this.options.width?requestAnimationFrame(function(){t.$menu.css("min-width","0"),t.liHeight(),t.setMenuSize();var e=t.$newElement.clone().appendTo("body"),i=e.css("width","auto").children("button").outerWidth();e.remove(),t.sizeInfo.selectWidth=Math.max(t.sizeInfo.totalMenuWidth,i),t.$newElement.css("width",t.sizeInfo.selectWidth+"px")}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=t('<div class="bs-container" />');var e,i,n,r=this,o=t(this.options.container),s=function(t){var s={};r.$bsContainer.addClass(t.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(k.DROPUP,t.hasClass(k.DROPUP)),e=t.offset(),o.is("body")?i={top:0,left:0}:((i=o.offset()).top+=parseInt(o.css("borderTopWidth"))-o.scrollTop(),i.left+=parseInt(o.css("borderLeftWidth"))-o.scrollLeft()),n=t.hasClass(k.DROPUP)?0:t[0].offsetHeight,w.major<4&&(s.top=e.top-i.top+n,s.left=e.left-i.left),s.width=t[0].offsetWidth,r.$bsContainer.css(s)};this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(s(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(k.SHOW,!r.$button.hasClass(k.SHOW)).append(r.$menu))}),t(window).on("resize scroll",function(){s(r.$newElement)}),this.$element.on("hide.bs.select",function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setOptionStatus:function(){var t=this.$element.find("option");if(this.noScroll=!1,this.selectpicker.view.visibleElements&&this.selectpicker.view.visibleElements.length)for(var e=0;e<this.selectpicker.view.visibleElements.length;e++){var i=this.selectpicker.current.map.originalIndex[e+this.selectpicker.view.position0],n=t[i];if(n){var r=this.selectpicker.main.map.newIndex[i],o=this.selectpicker.main.elements[r];this.setDisabled(i,n.disabled||"OPTGROUP"===n.parentNode.tagName&&n.parentNode.disabled,r,o),this.setSelected(i,n.selected,r,o)}}},setSelected:function(t,e,i,n){var r,o,s,a=void 0!==this.activeIndex,l=this.activeIndex===t||e&&!this.multiple&&!a;i||(i=this.selectpicker.main.map.newIndex[t]),n||(n=this.selectpicker.main.elements[i]),s=n.firstChild,e&&(this.selectedIndex=t),n.classList.toggle("selected",e),n.classList.toggle("active",l),l&&(this.selectpicker.view.currentActive=n,this.activeIndex=t),s&&(s.classList.toggle("selected",e),s.classList.toggle("active",l),s.setAttribute("aria-selected",e)),l||!a&&e&&this.prevActiveIndex&&(r=this.selectpicker.main.map.newIndex[this.prevActiveIndex],(o=this.selectpicker.main.elements[r]).classList.remove("active"),o.firstChild&&o.firstChild.classList.remove("active"))},setDisabled:function(t,e,i,n){var r;i||(i=this.selectpicker.main.map.newIndex[t]),n||(n=this.selectpicker.main.elements[i]),r=n.firstChild,n.classList.toggle(k.DISABLED,e),r&&("4"===w.major&&r.classList.toggle(k.DISABLED,e),r.setAttribute("aria-disabled",e),e?r.setAttribute("tabindex",-1):r.setAttribute("tabindex",0))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var t=this;this.isDisabled()?(this.$newElement.addClass(k.DISABLED),this.$button.addClass(k.DISABLED).attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button.hasClass(k.DISABLED)&&(this.$newElement.removeClass(k.DISABLED),this.$button.removeClass(k.DISABLED).attr("aria-disabled",!1)),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!t.isDisabled()})},togglePlaceholder:function(){var t=this.$element[0],e=t.selectedIndex,i=-1===e;i||t.options[e].value||(i=!0),this.$button.toggleClass("bs-placeholder",i)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var e=this,i=t(document);i.data("spaceSelect",!1),this.$button.on("keyup",function(t){/(32)/.test(t.keyCode.toString(10))&&i.data("spaceSelect")&&(t.preventDefault(),i.data("spaceSelect",!1))}),this.$newElement.on("show.bs.dropdown",function(){w.major>3&&!e.dropdown&&(e.dropdown=e.$button.data("bs.dropdown"),e.dropdown._menu=e.$menu[0])}),this.$button.on("click.bs.dropdown.data-api",function(){e.$newElement.hasClass(k.SHOW)||e.setSize()}),this.$element.on("shown.bs.select",function(){e.$menuInner[0].scrollTop!==e.selectpicker.view.scrollTop&&(e.$menuInner[0].scrollTop=e.selectpicker.view.scrollTop),e.options.liveSearch?e.$searchbox.focus():e.$menuInner.focus()}),this.$menuInner.on("click","li a",function(i,n){var r=t(this),o=e.isVirtual()?e.selectpicker.view.position0:0,s=e.selectpicker.current.map.originalIndex[r.parent().index()+o],l=e.$element.val(),c=e.$element.prop("selectedIndex"),h=!0;if(e.multiple&&1!==e.options.maxOptions&&i.stopPropagation(),i.preventDefault(),!e.isDisabled()&&!r.parent().hasClass(k.DISABLED)){var d=e.$element.find("option"),u=d.eq(s),p=u.prop("selected"),f=u.parent("optgroup"),m=e.options.maxOptions,g=f.data("maxOptions")||!1;if(e.multiple){if(u.prop("selected",!p),s===e.activeIndex&&(n=!0),n||(e.prevActiveIndex=e.activeIndex,e.activeIndex=void 0),e.setSelected(s,!p),r.blur(),!1!==m||!1!==g){var v=m<d.filter(":selected").length,y=g<f.find("option:selected").length;if(m&&v||g&&y)if(m&&1==m)d.prop("selected",!1),u.prop("selected",!0),e.$menuInner.find(".selected").removeClass("selected"),e.setSelected(s,!0);else if(g&&1==g){f.find("option:selected").prop("selected",!1),u.prop("selected",!0);var b=e.selectpicker.current.data[r.parent().index()+e.selectpicker.view.position0].optID;e.$menuInner.find(".optgroup-"+b).removeClass("selected"),e.setSelected(s,!0)}else{var _="string"==typeof e.options.maxOptionsText?[e.options.maxOptionsText,e.options.maxOptionsText]:e.options.maxOptionsText,x="function"==typeof _?_(m,g):_,w=x[0].replace("{n}",m),C=x[1].replace("{n}",g),S=t('<div class="notify"></div>');x[2]&&(w=w.replace("{var}",x[2][m>1?0:1]),C=C.replace("{var}",x[2][g>1?0:1])),u.prop("selected",!1),e.$menu.append(S),m&&v&&(S.append(t("<div>"+w+"</div>")),h=!1,e.$element.trigger("maxReached.bs.select")),g&&y&&(S.append(t("<div>"+C+"</div>")),h=!1,e.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){e.setSelected(s,!1)},10),S.delay(750).fadeOut(300,function(){t(this).remove()})}}}else d.prop("selected",!1),u.prop("selected",!0),e.setSelected(s,!0);!e.multiple||e.multiple&&1===e.options.maxOptions?e.$button.focus():e.options.liveSearch&&e.$searchbox.focus(),h&&(l!=e.$element.val()&&e.multiple||c!=e.$element.prop("selectedIndex")&&!e.multiple)&&(a=[s,u.prop("selected"),p],e.$element.triggerNative("change"))}}),this.$menu.on("click","li."+k.DISABLED+" a, .popover-title, .popover-title :not(.close)",function(i){i.currentTarget==this&&(i.preventDefault(),i.stopPropagation(),e.options.liveSearch&&!t(i.target).hasClass("close")?e.$searchbox.focus():e.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(t){t.preventDefault(),t.stopPropagation(),e.options.liveSearch?e.$searchbox.focus():e.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){e.$button.click()}),this.$searchbox.on("click",function(t){t.stopPropagation()}),this.$menu.on("click",".actions-btn",function(i){e.options.liveSearch?e.$searchbox.focus():e.$button.focus(),i.preventDefault(),i.stopPropagation(),t(this).hasClass("bs-select-all")?e.selectAll():e.deselectAll()}),this.$element.on({change:function(){e.render(),e.$element.trigger("changed.bs.select",a),a=null},focus:function(){e.$button.focus()}})},liveSearchListener:function(){var t=this,e=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){t.$searchbox.val()&&t.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(t){t.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var i=t.$searchbox.val();if(t.selectpicker.search.map.newIndex={},t.selectpicker.search.map.originalIndex={},t.selectpicker.search.elements=[],t.selectpicker.search.data=[],i){var n=[],r=i.toUpperCase(),o={},s=[],a=t._searchStyle(),l=t.options.liveSearchNormalize;t._$lisSelected=t.$menuInner.find(".selected");for(var h=0;h<t.selectpicker.main.data.length;h++){var d=t.selectpicker.main.data[h];o[h]||(o[h]=c(d,r,a,l)),o[h]&&void 0!==d.headerIndex&&-1===s.indexOf(d.headerIndex)&&(d.headerIndex>0&&(o[d.headerIndex-1]=!0,s.push(d.headerIndex-1)),o[d.headerIndex]=!0,s.push(d.headerIndex),o[d.lastIndex+1]=!0),o[h]&&"optgroup-label"!==d.type&&s.push(h)}h=0;for(var u=s.length;h<u;h++){var f=s[h],m=s[h-1],g=(d=t.selectpicker.main.data[f],t.selectpicker.main.data[m]);("divider"!==d.type||"divider"===d.type&&g&&"divider"!==g.type&&u-1!==h)&&(t.selectpicker.search.data.push(d),n.push(t.selectpicker.main.elements[f]),t.selectpicker.search.map.newIndex[d.originalIndex]=n.length-1,t.selectpicker.search.map.originalIndex[n.length-1]=d.originalIndex)}t.activeIndex=void 0,t.noScroll=!0,t.$menuInner.scrollTop(0),t.selectpicker.search.elements=n,t.createView(!0),n.length||(e.className="no-results",e.innerHTML=t.options.noneResultsText.replace("{0}",'"'+p(i)+'"'),t.$menuInner[0].firstChild.appendChild(e))}else t.$menuInner.scrollTop(0),t.createView(!1)})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(t){return void 0!==t?(this.$element.val(t).triggerNative("change"),this.$element):this.$element.val()},changeAll:function(t){if(this.multiple){void 0===t&&(t=!0);for(var e=this.$element.find("option"),i=0,n=0,r=0;r<this.selectpicker.current.elements.length;r++){var o=e[this.selectpicker.current.map.originalIndex[r]];o&&(o.selected&&i++,o.selected=t,o.selected&&n++)}i!==n&&(this.setOptionStatus(),this.togglePlaceholder(),this.$element.triggerNative("change"))}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(t){(t=t||window.event)&&t.stopPropagation(),this.$button.trigger("click.bs.dropdown.data-api")},keydown:function(e){var i,n,r,o,s,a=t(this),l=(a.is("input")?a.parent().parent():a.parent()).data("this"),h=l.findLis(),d=!1,u=e.which===b&&!a.hasClass("dropdown-toggle")&&!l.options.selectOnTab,p=C.test(e.which)||u,f=l.$menuInner[0].scrollTop,w=l.isVirtual(),D=!0===w?l.selectpicker.view.position0:0;if(!(n=l.$newElement.hasClass(k.SHOW))&&(p||e.which>=48&&e.which<=57||e.which>=96&&e.which<=105||e.which>=65&&e.which<=90)&&l.$button.trigger("click.bs.dropdown.data-api"),e.which===g&&n&&(e.preventDefault(),l.$button.trigger("click.bs.dropdown.data-api").focus()),p){if(!h.length)return;void 0===(i=!0===w?h.index(h.filter(".active")):l.selectpicker.current.map.newIndex[l.activeIndex])&&(i=-1),-1!==i&&((r=l.selectpicker.current.elements[i+D]).classList.remove("active"),r.firstChild&&r.firstChild.classList.remove("active")),e.which===_?(-1!==i&&i--,i+D<0&&(i+=h.length),l.selectpicker.view.canHighlight[i+D]||-1===(i=l.selectpicker.view.canHighlight.slice(0,i+D).lastIndexOf(!0)-D)&&(i=h.length-1)):(e.which===x||u)&&(++i+D>=l.selectpicker.view.canHighlight.length&&(i=0),l.selectpicker.view.canHighlight[i+D]||(i=i+1+l.selectpicker.view.canHighlight.slice(i+D+1).indexOf(!0))),e.preventDefault();var T=D+i;e.which===_?0===D&&i===h.length-1?(l.$menuInner[0].scrollTop=l.$menuInner[0].scrollHeight,T=l.selectpicker.current.elements.length-1):d=(s=(o=l.selectpicker.current.data[T]).position-o.height)<f:(e.which===x||u)&&(0!==D&&0===i?(l.$menuInner[0].scrollTop=0,T=0):d=(s=(o=l.selectpicker.current.data[T]).position-l.sizeInfo.menuInnerHeight)>f),(r=l.selectpicker.current.elements[T]).classList.add("active"),r.firstChild&&r.firstChild.classList.add("active"),l.activeIndex=l.selectpicker.current.map.originalIndex[T],l.selectpicker.view.currentActive=r,d&&(l.$menuInner[0].scrollTop=s),l.options.liveSearch?l.$searchbox.focus():a.focus()}else if(!a.is("input")&&!S.test(e.which)||e.which===y&&l.selectpicker.keydown.keyHistory){var A,M,E=[];e.preventDefault(),l.selectpicker.keydown.keyHistory+=m[e.which],l.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(l.selectpicker.keydown.resetKeyHistory.cancel),l.selectpicker.keydown.resetKeyHistory.cancel=l.selectpicker.keydown.resetKeyHistory.start(),M=l.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(M)&&(M=M.charAt(0));for(var P=0;P<l.selectpicker.current.data.length;P++){var I=l.selectpicker.current.data[P];c(I,M,"startsWith",!0)&&l.selectpicker.view.canHighlight[P]&&(I.index=P,E.push(I.originalIndex))}if(E.length){var O=0;h.removeClass("active").find("a").removeClass("active"),1===M.length&&(-1===(O=E.indexOf(l.activeIndex))||O===E.length-1?O=0:O++),A=l.selectpicker.current.map.newIndex[E[O]],f-(o=l.selectpicker.current.data[A]).position>0?(s=o.position-o.height,d=!0):(s=o.position-l.sizeInfo.menuInnerHeight,d=o.position>f+l.sizeInfo.menuInnerHeight),(r=l.selectpicker.current.elements[A]).classList.add("active"),r.firstChild&&r.firstChild.classList.add("active"),l.activeIndex=E[O],r.firstChild.focus(),d&&(l.$menuInner[0].scrollTop=s),a.focus()}}n&&(e.which===y&&!l.selectpicker.keydown.keyHistory||e.which===v||e.which===b&&l.options.selectOnTab)&&(e.which!==y&&e.preventDefault(),l.options.liveSearch&&e.which===y||(l.$menuInner.find(".active a").trigger("click",!0),a.focus(),l.options.liveSearch||(e.preventDefault(),t(document).data("spaceSelect",!0))))},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){var e=t.extend({},this.options,this.$element.data());this.options=e,this.selectpicker.main.map.newIndex={},this.selectpicker.main.map.originalIndex={},this.createLi(),this.checkDisabled(),this.render(),this.setStyle(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var A=t.fn.selectpicker;t.fn.selectpicker=T,t.fn.selectpicker.Constructor=D,t.fn.selectpicker.noConflict=function(){return t.fn.selectpicker=A,this},t(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.select",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bs-searchbox input',D.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bs-searchbox input',function(t){t.stopPropagation()}),t(window).on("load.bs.select.data-api",function(){t(".selectpicker").each(function(){var e=t(this);T.call(e,e.data())})})}(t)}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(e)),t(i),i}:t(jQuery)}(function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;var i,n,r,o;return e&&e.requirejs||(e?n=e:e={},function(t){var e,o,s,a,l={},c={},h={},d={},u=Object.prototype.hasOwnProperty,p=[].slice,f=/\.js$/;function m(t,e){return u.call(t,e)}function g(t,e){var i,n,r,o,s,a,l,c,d,u,p,m=e&&e.split("/"),g=h.map,v=g&&g["*"]||{};if(t){for(s=(t=t.split("/")).length-1,h.nodeIdCompat&&f.test(t[s])&&(t[s]=t[s].replace(f,"")),"."===t[0].charAt(0)&&m&&(t=m.slice(0,m.length-1).concat(t)),d=0;d<t.length;d++)if("."===(p=t[d]))t.splice(d,1),d-=1;else if(".."===p){if(0===d||1===d&&".."===t[2]||".."===t[d-1])continue;d>0&&(t.splice(d-1,2),d-=2)}t=t.join("/")}if((m||v)&&g){for(d=(i=t.split("/")).length;d>0;d-=1){if(n=i.slice(0,d).join("/"),m)for(u=m.length;u>0;u-=1)if((r=g[m.slice(0,u).join("/")])&&(r=r[n])){o=r,a=d;break}if(o)break;!l&&v&&v[n]&&(l=v[n],c=d)}!o&&l&&(o=l,a=c),o&&(i.splice(0,a,o),t=i.join("/"))}return t}function v(e,i){return function(){var n=p.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),o.apply(t,n.concat([e,i]))}}function y(t){return function(e){l[t]=e}}function b(i){if(m(c,i)){var n=c[i];delete c[i],d[i]=!0,e.apply(t,n)}if(!m(l,i)&&!m(d,i))throw new Error("No "+i);return l[i]}function _(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function x(t){return t?_(t):[]}s=function(t,e){var i,n,r=_(t),o=r[0],s=e[1];return t=r[1],o&&(i=b(o=g(o,s))),o?t=i&&i.normalize?i.normalize(t,(n=s,function(t){return g(t,n)})):g(t,s):(o=(r=_(t=g(t,s)))[0],t=r[1],o&&(i=b(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:i}},a={require:function(t){return v(t)},exports:function(t){var e=l[t];return void 0!==e?e:l[t]={}},module:function(t){return{id:t,uri:"",exports:l[t],config:function(t){return function(){return h&&h.config&&h.config[t]||{}}}(t)}}},e=function(e,i,n,r){var o,h,u,p,f,g,_,w=[],k=typeof n;if(g=x(r=r||e),"undefined"===k||"function"===k){for(i=!i.length&&n.length?["require","exports","module"]:i,f=0;f<i.length;f+=1)if("require"===(h=(p=s(i[f],g)).f))w[f]=a.require(e);else if("exports"===h)w[f]=a.exports(e),_=!0;else if("module"===h)o=w[f]=a.module(e);else if(m(l,h)||m(c,h)||m(d,h))w[f]=b(h);else{if(!p.p)throw new Error(e+" missing "+h);p.p.load(p.n,v(r,!0),y(h),{}),w[f]=l[h]}u=n?n.apply(l[e],w):void 0,e&&(o&&o.exports!==t&&o.exports!==l[e]?l[e]=o.exports:u===t&&_||(l[e]=u))}else e&&(l[e]=n)},i=n=o=function(i,n,r,l,c){if("string"==typeof i)return a[i]?a[i](n):b(s(i,x(n)).f);if(!i.splice){if((h=i).deps&&o(h.deps,h.callback),!n)return;n.splice?(i=n,n=r,r=null):i=t}return n=n||function(){},"function"==typeof r&&(r=l,l=c),l?e(t,i,n,r):setTimeout(function(){e(t,i,n,r)},4),o},o.config=function(t){return o(t)},i._defined=l,(r=function(t,e,i){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(i=e,e=[]),m(l,t)||m(c,t)||(c[t]=[t,e,i])}).amd={jQuery:!0}}(),e.requirejs=i,e.require=n,e.define=r),e.define("almond",function(){}),e.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),e.define("select2/utils",["jquery"],function(t){var e={};function i(t){var e=t.prototype,i=[];for(var n in e){"function"==typeof e[n]&&("constructor"!==n&&i.push(n))}return i}e.Extend=function(t,e){var i={}.hasOwnProperty;function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},e.Decorate=function(t,e){var n=i(e),r=i(t);function o(){var i=Array.prototype.unshift,n=e.prototype.constructor.length,r=t.prototype.constructor;n>0&&(i.call(arguments,t.prototype.constructor),r=e.prototype.constructor),r.apply(this,arguments)}e.displayName=t.displayName,o.prototype=new function(){this.constructor=o};for(var s=0;s<r.length;s++){var a=r[s];o.prototype[a]=t.prototype[a]}for(var l=function(t){var i=function(){};t in o.prototype&&(i=o.prototype[t]);var n=e.prototype[t];return function(){return Array.prototype.unshift.call(arguments,i),n.apply(this,arguments)}},c=0;c<n.length;c++){var h=n[c];o.prototype[h]=l(h)}return o};var n=function(){this.listeners={}};n.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},n.prototype.trigger=function(t){var e=Array.prototype.slice,i=e.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),i[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},n.prototype.invoke=function(t,e){for(var i=0,n=t.length;i<n;i++)t[i].apply(this,e)},e.Observable=n,e.generateChars=function(t){for(var e="",i=0;i<t;i++){e+=Math.floor(36*Math.random()).toString(36)}return e},e.bind=function(t,e){return function(){t.apply(e,arguments)}},e._convertData=function(t){for(var e in t){var i=e.split("-"),n=t;if(1!==i.length){for(var r=0;r<i.length;r++){var o=i[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in n||(n[o]={}),r==i.length-1&&(n[o]=t[e]),n=n[o]}delete t[e]}}return t},e.hasScroll=function(e,i){var n=t(i),r=i.style.overflowX,o=i.style.overflowY;return(r!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===r||"scroll"===o||(n.innerHeight()<i.scrollHeight||n.innerWidth()<i.scrollWidth))},e.escapeMarkup=function(t){var e={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},e.appendMany=function(e,i){if("1.7"===t.fn.jquery.substr(0,3)){var n=t();t.map(i,function(t){n=n.add(t)}),i=n}e.append(i)},e.__cache={};var r=0;return e.GetUniqueElementId=function(t){var e=t.getAttribute("data-select2-id");return null==e&&(t.id?(e=t.id,t.setAttribute("data-select2-id",e)):(t.setAttribute("data-select2-id",++r),e=r.toString())),e},e.StoreData=function(t,i,n){var r=e.GetUniqueElementId(t);e.__cache[r]||(e.__cache[r]={}),e.__cache[r][i]=n},e.GetData=function(i,n){var r=e.GetUniqueElementId(i);return n?e.__cache[r]&&null!=e.__cache[r][n]?e.__cache[r][n]:t(i).data(n):e.__cache[r]},e.RemoveData=function(t){var i=e.GetUniqueElementId(t);null!=e.__cache[i]&&delete e.__cache[i]},e}),e.define("select2/results",["jquery","./utils"],function(t,e){function i(t,e,n){this.$element=t,this.data=n,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var i=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=t('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),r=this.options.get("translations").get(e.message);n.append(i(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},i.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i<t.results.length;i++){var n=t.results[i],r=this.option(n);e.push(r)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(t,e){e.find(".select2-results").append(t)},i.prototype.sort=function(t){return this.options.get("sorter")(t)},i.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");e.length>0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var i=this;this.data.current(function(n){var r=t.map(n,function(t){return t.id.toString()});i.$results.find(".select2-results__option[aria-selected]").each(function(){var i=t(this),n=e.GetData(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&t.inArray(o,r)>-1?i.attr("aria-selected","true"):i.attr("aria-selected","false")})})},i.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(i){var n=document.createElement("li");n.className="select2-results__option";var r={role:"treeitem","aria-selected":"false"};for(var o in i.disabled&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==i.id&&delete r["aria-selected"],null!=i._resultId&&(n.id=i._resultId),i.title&&(n.title=i.title),i.children&&(r.role="group",r["aria-label"]=i.text,delete r["aria-selected"]),r){var s=r[o];n.setAttribute(o,s)}if(i.children){var a=t(n),l=document.createElement("strong");l.className="select2-results__group";t(l);this.template(i,l);for(var c=[],h=0;h<i.children.length;h++){var d=i.children[h],u=this.option(d);c.push(u)}var p=t("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(c),a.append(l),a.append(p)}else this.template(i,n);return e.StoreData(n,"data",i),n},i.prototype.bind=function(i,n){var r=this,o=i.id+"-results";this.$results.attr("id",o),i.on("results:all",function(t){r.clear(),r.append(t.data),i.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),i.on("results:append",function(t){r.append(t.data),i.isOpen()&&r.setClasses()}),i.on("query",function(t){r.hideMessages(),r.showLoading(t)}),i.on("select",function(){i.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),i.on("unselect",function(){i.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),i.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),i.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),i.on("results:toggle",function(){var t=r.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),i.on("results:select",function(){var t=r.getHighlightedResults();if(0!==t.length){var i=e.GetData(t[0],"data");"true"==t.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:i})}}),i.on("results:previous",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),i=e.index(t);if(!(i<=0)){var n=i-1;0===t.length&&(n=0);var o=e.eq(n);o.trigger("mouseenter");var s=r.$results.offset().top,a=o.offset().top,l=r.$results.scrollTop()+(a-s);0===n?r.$results.scrollTop(0):a-s<0&&r.$results.scrollTop(l)}}),i.on("results:next",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var n=e.eq(i);n.trigger("mouseenter");var o=r.$results.offset().top+r.$results.outerHeight(!1),s=n.offset().top+n.outerHeight(!1),a=r.$results.scrollTop()+s-o;0===i?r.$results.scrollTop(0):s>o&&r.$results.scrollTop(a)}}),i.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),i.on("results:message",function(t){r.displayMessage(t)}),t.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=r.$results.scrollTop(),i=r.$results.get(0).scrollHeight-e+t.deltaY,n=t.deltaY>0&&e-t.deltaY<=0,o=t.deltaY<0&&i<=r.$results.height();n?(r.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(i){var n=t(this),o=e.GetData(this,"data");"true"!==n.attr("aria-selected")?r.trigger("select",{originalEvent:i,data:o}):r.options.get("multiple")?r.trigger("unselect",{originalEvent:i,data:o}):r.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(i){var n=e.GetData(this,"data");r.getHighlightedResults().removeClass("select2-results__option--highlighted"),r.trigger("results:focus",{data:n,element:t(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),i=this.$results.offset().top,n=t.offset().top,r=this.$results.scrollTop()+(n-i),o=n-i;r-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,i){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),o=n(e,i);null==o?i.style.display="none":"string"==typeof o?i.innerHTML=r(o):t(i).append(o)},i}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var i=t('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=e.GetData(this.$element[0],"old-tabindex")?this._tabindex=e.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),i.attr("title",this.$element.attr("title")),i.attr("tabindex",this._tabindex),this.$selection=i,i},n.prototype.bind=function(t,e){var n=this,r=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(t){n.trigger("focus",t)}),this.$selection.on("blur",function(t){n._handleBlur(t)}),this.$selection.on("keydown",function(t){n.trigger("keypress",t),t.which===i.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){n.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){n.update(t.data)}),t.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(t)}),t.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),window.setTimeout(function(){n.$selection.focus()},0),n._detachCloseHandler(t)}),t.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),t.on("disable",function(){n.$selection.attr("tabindex","-1")})},n.prototype._handleBlur=function(e){var i=this;window.setTimeout(function(){document.activeElement==i.$selection[0]||t.contains(i.$selection[0],document.activeElement)||i.trigger("blur",e)},1)},n.prototype._attachCloseHandler=function(i){t(document.body).on("mousedown.select2."+i.id,function(i){var n=t(i.target).closest(".select2");t(".select2.select2-container--open").each(function(){t(this);this!=n[0]&&e.GetData(this,"element").select2("close")})})},n.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(t,e,i,n){function r(){r.__super__.constructor.apply(this,arguments)}return i.Extend(r,e),r.prototype.render=function(){var t=r.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},r.prototype.bind=function(t,e){var i=this;r.__super__.bind.apply(this,arguments);var n=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),t.on("focus",function(e){t.isOpen()||i.$selection.focus()})},r.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},r.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},r.prototype.selectionContainer=function(){return t("<span></span>")},r.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n),i.attr("title",e.title||e.text)}else this.clear()},r}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(t,e,i){function n(t,e){n.__super__.constructor.apply(this,arguments)}return i.Extend(n,e),n.prototype.render=function(){var t=n.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},n.prototype.bind=function(e,r){var o=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){o.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!o.options.get("disabled")){var n=t(this).parent(),r=i.GetData(n[0],"data");o.trigger("unselect",{originalEvent:e,data:r})}})},n.prototype.clear=function(){var t=this.$selection.find(".select2-selection__rendered");t.empty(),t.removeAttr("title")},n.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},n.prototype.selectionContainer=function(){return t('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},n.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],n=0;n<t.length;n++){var r=t[n],o=this.selectionContainer(),s=this.display(r,o);o.append(s),o.attr("title",r.title||r.text),i.StoreData(o[0],"data",r),e.push(o)}var a=this.$selection.find(".select2-selection__rendered");i.appendMany(a,e)}},n}),e.define("select2/selection/placeholder",["../utils"],function(t){function e(t,e,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var i=this.selectionContainer();return i.html(this.display(e)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},e.prototype.update=function(t,e){var i=1==e.length&&e[0].id!=this.placeholder.id;if(e.length>1||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},e}),e.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(t,e,i){function n(){}return n.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){n._handleClear(t)}),e.on("keypress",function(t){n._handleKeyboardClear(t,e)})},n.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){e.stopPropagation();var r=i.GetData(n[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var s={data:r};if(this.trigger("clear",s),s.prevented)this.$element.val(o);else{for(var a=0;a<r.length;a++)if(s={data:r[a]},this.trigger("unselect",s),s.prevented)return void this.$element.val(o);this.$element.trigger("change"),this.trigger("toggle",{})}}}},n.prototype._handleKeyboardClear=function(t,i,n){n.isOpen()||i.which!=e.DELETE&&i.which!=e.BACKSPACE||this._handleClear(i)},n.prototype.update=function(e,n){if(e.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var r=t('<span class="select2-selection__clear">×</span>');i.StoreData(r[0],"data",n),this.$selection.find(".select2-selection__rendered").prepend(r)}},n}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(t,e,i){function n(t,e,i){t.call(this,e,i)}return n.prototype.render=function(e){var i=t('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=i,this.$search=i.find("input");var n=e.call(this);return this._transferTabIndex(),n},n.prototype.bind=function(t,n,r){var o=this;t.call(this,n,r),n.on("open",function(){o.$search.trigger("focus")}),n.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),n.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),n.on("disable",function(){o.$search.prop("disabled",!0)}),n.on("focus",function(t){o.$search.trigger("focus")}),n.on("results:focus",function(t){o.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2-search--inline",function(t){o.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){o._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){if(t.stopPropagation(),o.trigger("keypress",t),o._keyUpPrevented=t.isDefaultPrevented(),t.which===i.BACKSPACE&&""===o.$search.val()){var n=o.$searchContainer.prev(".select2-selection__choice");if(n.length>0){var r=e.GetData(n[0],"data");o.searchRemoveChoice(r),t.preventDefault()}}});var s=document.documentMode,a=s&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(t){a?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(a&&"input"===t.type)o.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=i.SHIFT&&e!=i.CTRL&&e!=i.ALT&&e!=i.TAB&&o.handleSearch(t)}})},n.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},n.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},n.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;(this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i)&&(this.$element.find("[data-select2-tag]").length?this.$element.focus():this.$search.focus())},n.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},n.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";""!==this.$search.attr("placeholder")?t=this.$selection.find(".select2-selection__rendered").innerWidth():t=.75*(this.$search.val().length+1)+"em";this.$search.css("width",t)},n}),e.define("select2/selection/eventRelay",["jquery"],function(t){function e(){}return e.prototype.bind=function(e,i,n){var r=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];e.call(this,i,n),i.on("*",function(e,i){if(-1!==t.inArray(e,o)){i=i||{};var n=t.Event("select2:"+e,{params:i});r.$element.trigger(n),-1!==t.inArray(e,s)&&(i.prevented=n.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,e){function i(t){this.dict=t||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(t){return this.dict[t]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(t){if(!(t in i._cache)){var n=e(t);i._cache[t]=n}return new i(i._cache[t])},i}),e.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("select2/data/base",["../utils"],function(t){function e(t,i){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,i){var n=e.id+"-result-";return n+=t.generateChars(4),null!=i.id?n+="-"+i.id.toString():n+="-"+t.generateChars(4),n},e}),e.define("select2/data/select",["./base","../utils","jquery"],function(t,e,i){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,t),n.prototype.current=function(t){var e=[],n=this;this.$element.find(":selected").each(function(){var t=i(this),r=n.item(t);e.push(r)}),t(e)},n.prototype.select=function(t){var e=this;if(t.selected=!0,i(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(n){var r=[];(t=[t]).push.apply(t,n);for(var o=0;o<t.length;o++){var s=t[o].id;-1===i.inArray(s,r)&&r.push(s)}e.$element.val(r),e.$element.trigger("change")});else{var n=t.id;this.$element.val(n),this.$element.trigger("change")}},n.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,i(t.element).is("option"))return t.element.selected=!1,void this.$element.trigger("change");this.current(function(n){for(var r=[],o=0;o<n.length;o++){var s=n[o].id;s!==t.id&&-1===i.inArray(s,r)&&r.push(s)}e.$element.val(r),e.$element.trigger("change")})}},n.prototype.bind=function(t,e){var i=this;this.container=t,t.on("select",function(t){i.select(t.data)}),t.on("unselect",function(t){i.unselect(t.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){e.RemoveData(this)})},n.prototype.query=function(t,e){var n=[],r=this;this.$element.children().each(function(){var e=i(this);if(e.is("option")||e.is("optgroup")){var o=r.item(e),s=r.matches(t,o);null!==s&&n.push(s)}}),e({results:n})},n.prototype.addOptions=function(t){e.appendMany(this.$element,t)},n.prototype.option=function(t){var n;t.children?(n=document.createElement("optgroup")).label=t.text:void 0!==(n=document.createElement("option")).textContent?n.textContent=t.text:n.innerText=t.text,void 0!==t.id&&(n.value=t.id),t.disabled&&(n.disabled=!0),t.selected&&(n.selected=!0),t.title&&(n.title=t.title);var r=i(n),o=this._normalizeItem(t);return o.element=n,e.StoreData(n,"data",o),r},n.prototype.item=function(t){var n={};if(null!=(n=e.GetData(t[0],"data")))return n;if(t.is("option"))n={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){n={text:t.prop("label"),children:[],title:t.prop("title")};for(var r=t.children("option"),o=[],s=0;s<r.length;s++){var a=i(r[s]),l=this.item(a);o.push(l)}n.children=o}return(n=this._normalizeItem(n)).element=t[0],e.StoreData(t[0],"data",n),n},n.prototype._normalizeItem=function(t){t!==Object(t)&&(t={id:t,text:t});return null!=(t=i.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),i.extend({},{selected:!1,disabled:!1},t)},n.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},n}),e.define("select2/data/array",["./select","../utils","jquery"],function(t,e,i){function n(t,e){var i=e.get("data")||[];n.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(i))}return e.Extend(n,t),n.prototype.select=function(t){var e=this.$element.find("option").filter(function(e,i){return i.value==t.id.toString()});0===e.length&&(e=this.option(t),this.addOptions(e)),n.__super__.select.call(this,t)},n.prototype.convertToOptions=function(t){var n=this,r=this.$element.find("option"),o=r.map(function(){return n.item(i(this)).id}).get(),s=[];function a(t){return function(){return i(this).val()==t.id}}for(var l=0;l<t.length;l++){var c=this._normalizeItem(t[l]);if(i.inArray(c.id,o)>=0){var h=r.filter(a(c)),d=this.item(h),u=i.extend(!0,{},c,d),p=this.option(u);h.replaceWith(p)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);e.appendMany(f,m)}s.push(f)}}return s},n}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(t,e,i){function n(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,t,e)}return e.Extend(n,t),n.prototype._applyDefaults=function(t){var e={data:function(t){return i.extend({},t,{q:t.term})},transport:function(t,e,n){var r=i.ajax(t);return r.then(e),r.fail(n),r}};return i.extend({},e,t,!0)},n.prototype.processResults=function(t){return t},n.prototype.query=function(t,e){var n=this;null!=this._request&&(i.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=i.extend({type:"GET"},this.ajaxOptions);function o(){var o=r.transport(r,function(r){var o=n.processResults(r,t);n.options.get("debug")&&window.console&&console.error&&(o&&o.results&&i.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(o)},function(){"status"in o&&(0===o.status||"0"===o.status)||n.trigger("results:message",{message:"errorLoading"})});n._request=o}"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},n}),e.define("select2/data/tags",["jquery"],function(t){function e(e,i,n){var r=n.get("tags"),o=n.get("createTag");void 0!==o&&(this.createTag=o);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,i,n),t.isArray(r))for(var a=0;a<r.length;a++){var l=r[a],c=this._normalizeItem(l),h=this.option(c);this.$element.append(h)}}return e.prototype.query=function(t,e,i){var n=this;this._removeOldTags(),null!=e.term&&null==e.page?t.call(this,e,function t(r,o){for(var s=r.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!t({results:l.children},!0);if((l.text||"").toUpperCase()===(e.term||"").toUpperCase()||c)return!o&&(r.data=s,void i(r))}if(o)return!0;var h=n.createTag(e);if(null!=h){var d=n.option(h);d.attr("data-select2-tag",!0),n.addOptions([d]),n.insertTag(s,h)}r.results=s,i(r)}):t.call(this,e,i)},e.prototype.createTag=function(e,i){var n=t.trim(i.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(t,e,i){e.unshift(i)},e.prototype._removeOldTags=function(e){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||t(this).remove()})},e}),e.define("select2/data/tokenizer",["jquery"],function(t){function e(t,e,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),t.call(this,e,i)}return e.prototype.bind=function(t,e,i){t.call(this,e,i),this.$search=e.dropdown.$search||e.selection.$search||i.find(".select2-search__field")},e.prototype.query=function(e,i,n){var r=this;i.term=i.term||"";var o=this.tokenizer(i,this.options,function(e){var i=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return t(this).val()===i.id}).length){var n=r.option(i);n.attr("data-select2-tag",!0),r._removeOldTags(),r.addOptions([n])}!function(t){r.trigger("select",{data:t})}(i)});o.term!==i.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.focus()),i.term=o.term),e.call(this,i,n)},e.prototype.tokenizer=function(e,i,n,r){for(var o=n.get("tokenSeparators")||[],s=i.term,a=0,l=this.createTag||function(t){return{id:t.term,text:t.term}};a<s.length;){var c=s[a];if(-1!==t.inArray(c,o)){var h=s.substr(0,a),d=l(t.extend({},i,{term:h}));null!=d?(r(d),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},e}),e.define("select2/data/minimumInputLength",[],function(){function t(t,e,i){this.minimumInputLength=i.get("minimumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),e.define("select2/data/maximumInputLength",[],function(){function t(t,e,i){this.maximumInputLength=i.get("maximumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",this.maximumInputLength>0&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),e.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){var n=this;this.current(function(r){var o=null!=r?r.length:0;n.maximumSelectionLength>0&&o>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t.call(n,e,i)})},t}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=t('<span class="select2-dropdown"><span class="select2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),e.define("select2/dropdown/search",["jquery","../utils"],function(t,e){function i(){}return i.prototype.render=function(e){var i=e.call(this),n=t('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),i.prepend(n),i},i.prototype.bind=function(e,i,n){var r=this;e.call(this,i,n),this.$search.on("keydown",function(t){r.trigger("keypress",t),r._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(e){t(this).off("keyup")}),this.$search.on("keyup input",function(t){r.handleSearch(t)}),i.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),i.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val(""),r.$search.blur()}),i.on("focus",function(){i.isOpen()||r.$search.focus()}),i.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(r.showSearch(t)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},i.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.showSearch=function(t,e){return!0},i}),e.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;n>=0;n--){var r=e[n];this.placeholder.id===r.id&&i.splice(n,1)}return i},t}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(t){function e(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,i,n){var r=this;e.call(this,i,n),i.on("query",function(t){r.lastParams=t,r.loading=!0}),i.on("query:append",function(t){r.lastParams=t,r.loading=!0}),this.$results.on("scroll",function(){var e=t.contains(document.documentElement,r.$loadingMore[0]);!r.loading&&e&&(r.$results.offset().top+r.$results.outerHeight(!1)+50>=r.$loadingMore.offset().top+r.$loadingMore.outerHeight(!1)&&r.loadMore())})},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),i=this.options.get("translations").get("loadingMore");return e.html(i(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(t,e){function i(e,i,n){this.$dropdownParent=n.get("dropdownParent")||t(document.body),e.call(this,i,n)}return i.prototype.bind=function(t,e,i){var n=this,r=!1;t.call(this,e,i),e.on("open",function(){n._showDropdown(),n._attachPositioningHandler(e),r||(r=!0,e.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}))}),e.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},i.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},i.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},i.prototype.render=function(e){var i=t("<span></span>"),n=e.call(this);return i.append(n),this.$dropdownContainer=i,i},i.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},i.prototype._attachPositioningHandler=function(i,n){var r=this,o="scroll.select2."+n.id,s="resize.select2."+n.id,a="orientationchange.select2."+n.id,l=this.$container.parents().filter(e.hasScroll);l.each(function(){e.StoreData(this,"select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})}),l.on(o,function(i){var n=e.GetData(this,"select2-scroll-position");t(this).scrollTop(n.y)}),t(window).on(o+" "+s+" "+a,function(t){r._positionDropdown(),r._resizeDropdown()})},i.prototype._detachPositioningHandler=function(i,n){var r="scroll.select2."+n.id,o="resize.select2."+n.id,s="orientationchange.select2."+n.id;this.$container.parents().filter(e.hasScroll).off(r),t(window).off(r+" "+o+" "+s)},i.prototype._positionDropdown=function(){var e=t(window),i=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=o.top,s.bottom=o.top+s.height;var a=this.$dropdown.outerHeight(!1),l=e.scrollTop(),c=e.scrollTop()+e.height(),h=l<o.top-a,d=c>o.bottom+a,u={left:o.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var f=p.offset();u.top-=f.top,u.left-=f.left,i||n||(r="below"),d||!h||i?!h&&d&&i&&(r="below"):r="above",("above"==r||i&&"below"!==r)&&(u.top=s.top-f.top-a),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(u)},i.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},i.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},i}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function t(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return t.prototype.showSearch=function(t,e){return!(function t(e){for(var i=0,n=0;n<e.length;n++){var r=e[n];r.children?i+=t(r.children):i++}return i}(e.data.results)<this.minimumResultsForSearch)&&t.call(this,e)},t}),e.define("select2/dropdown/selectOnClose",["../utils"],function(t){function e(){}return e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("close",function(t){n._handleSelectOnClose(t)})},e.prototype._handleSelectOnClose=function(e,i){if(i&&null!=i.originalSelect2Event){var n=i.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var o=t.GetData(r[0],"data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),e.define("select2/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",function(t){n._selectTriggered(t)}),e.on("unselect",function(t){n._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var i=e.originalEvent;i&&i.ctrlKey||this.trigger("close",{originalEvent:i,originalSelect2Event:e})},t}),e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,i="Please delete "+e+" character";return 1!=e&&(i+="s"),i},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(t,e,i,n,r,o,s,a,l,c,h,d,u,p,f,m,g,v,y,b,_,x,w,k,C,S,D,T,A){function M(){this.reset()}return M.prototype.apply=function(d){if(null==(d=t.extend(!0,{},this.defaults,d)).dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=p:d.dataAdapter=u,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,b)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null!=d.query){var A=e(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,A)}if(null!=d.initSelection){var M=e(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,M)}}if(null==d.resultsAdapter&&(d.resultsAdapter=i,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,k)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,w)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,D))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;else{var E=c.Decorate(_,x);d.dropdownAdapter=E}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,S)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,T)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var P=e(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,P)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=r:d.selectionAdapter=n,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,o)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var I=e(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,I)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var O=d.language.split("-")[0];d.language=[d.language,O]}else d.language=[d.language];if(t.isArray(d.language)){var N=new h;d.language.push("en");for(var L=d.language,j=0;j<L.length;j++){var F=L[j],$={};try{$=h.loadPath(F)}catch(t){try{F=this.defaults.amdLanguageBase+F,$=h.loadPath(F)}catch(t){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+F+'" could not be automatically loaded. A fallback will be used instead.');continue}}N.extend($)}d.translations=N}else{var R=h.loadPath(this.defaults.amdLanguageBase+"en"),H=new h(d.language);H.extend(R),d.translations=H}return d},M.prototype.reset=function(){function e(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return d[t]||t})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:A,matcher:function i(n,r){if(""===t.trim(n.term))return r;if(r.children&&r.children.length>0){for(var o=t.extend(!0,{},r),s=r.children.length-1;s>=0;s--)null==i(n,r.children[s])&&o.children.splice(s,1);return o.children.length>0?o:i(n,o)}var a=e(r.text).toUpperCase(),l=e(n.term).toUpperCase();return a.indexOf(l)>-1?r:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},M.prototype.set=function(e,i){var n={};n[t.camelCase(e)]=i;var r=c._convertData(n);t.extend(!0,this.defaults,r)},new M}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(t,e,i,n){function r(e,r){if(this.options=e,null!=r&&this.fromElement(r),this.options=i.apply(this.options),r&&r.is("input")){var o=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=n.Decorate(this.options.dataAdapter,o)}}return r.prototype.fromElement=function(t){var i=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),n.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),n.StoreData(t[0],"data",n.GetData(t[0],"select2Tags")),n.StoreData(t[0],"tags",!0)),n.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",n.GetData(t[0],"ajaxUrl")),n.StoreData(t[0],"ajax-Url",n.GetData(t[0],"ajaxUrl")));var r={};r=e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset?e.extend(!0,{},t[0].dataset,n.GetData(t[0])):n.GetData(t[0]);var o=e.extend(!0,{},r);for(var s in o=n._convertData(o))e.inArray(s,i)>-1||(e.isPlainObject(this.options[s])?e.extend(this.options[s],o[s]):this.options[s]=o[s]);return this},r.prototype.get=function(t){return this.options[t]},r.prototype.set=function(t,e){this.options[t]=e},r}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(t,e,i,n){var r=function(t,n){null!=i.GetData(t[0],"select2")&&i.GetData(t[0],"select2").destroy(),this.$element=t,this.id=this._generateId(t),n=n||{},this.options=new e(n,t),r.__super__.constructor.call(this);var o=t.attr("tabindex")||0;i.StoreData(t[0],"old-tabindex",o),t.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(t,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var h=this.options.get("resultsAdapter");this.results=new h(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){d.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),i.StoreData(t[0],"select2",this),t.data("select2",this)};return i.Extend(r,i.Observable),r.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},r.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},r.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var r=t.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==e){var o=t.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(i);if(null!==c&&c.length>=1)return c[1]}return null}return e},r.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},r.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=n?(this._observer=new n(function(i){t.each(i,e._syncA),t.each(i,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},r.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerSelectionEvents=function(){var e=this,i=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(n,r){-1===t.inArray(n,i)&&e.trigger(n,r)})},r.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",function(e,i){t.trigger(e,i)})},r.prototype._registerEvents=function(){var t=this;this.on("open",function(){t.$container.addClass("select2-container--open")}),this.on("close",function(){t.$container.removeClass("select2-container--open")}),this.on("enable",function(){t.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){t.$container.addClass("select2-container--disabled")}),this.on("blur",function(){t.$container.removeClass("select2-container--focus")}),this.on("query",function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,function(i){t.trigger("results:all",{data:i,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(i){t.trigger("results:append",{data:i,query:e})})}),this.on("keypress",function(e){var i=e.which;t.isOpen()?i===n.ESC||i===n.TAB||i===n.UP&&e.altKey?(t.close(),e.preventDefault()):i===n.ENTER?(t.trigger("results:select",{}),e.preventDefault()):i===n.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):i===n.UP?(t.trigger("results:previous",{}),e.preventDefault()):i===n.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(i===n.ENTER||i===n.SPACE||i===n.DOWN&&e.altKey)&&(t.open(),e.preventDefault())})},r.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},r.prototype._syncSubtree=function(t,e){var i=!1,n=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&e.addedNodes.length>0)for(var r=0;r<e.addedNodes.length;r++){e.addedNodes[r].selected&&(i=!0)}else e.removedNodes&&e.removedNodes.length>0&&(i=!0);else i=!0;i&&this.dataAdapter.current(function(t){n.trigger("selection:update",{data:t})})}},r.prototype.trigger=function(t,e){var i=r.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===e&&(e={}),t in n){var o=n[t],s={prevented:!1,name:t,args:e};if(i.call(this,o,s),s.prevented)return void(e.prevented=!0)}i.call(this,t,e)},r.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},r.prototype.open=function(){this.isOpen()||this.trigger("query",{})},r.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},r.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},r.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},r.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},r.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},r.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},r.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var i=e[0];t.isArray(i)&&(i=t.map(i,function(t){return t.toString()})),this.$element.val(i).trigger("change")},r.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",i.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),i.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},r.prototype.render=function(){var e=t('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),i.StoreData(e[0],"element",this.$element),e},r}),e.define("select2/compat/utils",["jquery"],function(t){return{syncCssClasses:function(e,i,n){var r,o,s=[];(r=t.trim(e.attr("class")))&&t((r=""+r).split(/\s+/)).each(function(){0===this.indexOf("select2-")&&s.push(this)}),(r=t.trim(i.attr("class")))&&t((r=""+r).split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(o=n(this))&&s.push(o)}),e.attr("class",s.join(" "))}}}),e.define("select2/compat/containerCss",["jquery","./utils"],function(t,e){function i(t){return null}function n(){}return n.prototype.render=function(n){var r=n.call(this),o=this.options.get("containerCssClass")||"";t.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||i,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(t){var e=a(t);return null!=e?e+" "+t:t}}var l=this.options.get("containerCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},n}),e.define("select2/compat/dropdownCss",["jquery","./utils"],function(t,e){function i(t){return null}function n(){}return n.prototype.render=function(n){var r=n.call(this),o=this.options.get("dropdownCssClass")||"";t.isFunction(o)&&(o=o(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||i,-1!==o.indexOf(":all:")){o=o.replace(":all:","");var a=s;s=function(t){var e=a(t);return null!=e?e+" "+t:t}}var l=this.options.get("dropdownCss")||{};return t.isFunction(l)&&(l=l(this.$element)),e.syncCssClasses(r,this.$element,s),r.css(l),r.addClass(o),r},n}),e.define("select2/compat/initSelection",["jquery"],function(t){function e(t,e,i){i.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=i.get("initSelection"),this._isInitialized=!1,t.call(this,e,i)}return e.prototype.current=function(e,i){var n=this;this._isInitialized?e.call(this,i):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,t.isArray(e)||(e=[e]),i(e)})},e}),e.define("select2/compat/inputData",["jquery","../utils"],function(t,e){function i(t,e,i){this._currentData=[],this._valueSeparator=i.get("valueSeparator")||",","hidden"===e.prop("type")&&i.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),t.call(this,e,i)}return i.prototype.current=function(e,i){function n(e,i){var r=[];return e.selected||-1!==t.inArray(e.id,i)?(e.selected=!0,r.push(e)):e.selected=!1,e.children&&r.push.apply(r,n(e.children,i)),r}for(var r=[],o=0;o<this._currentData.length;o++){var s=this._currentData[o];r.push.apply(r,n(s,this.$element.val().split(this._valueSeparator)))}i(r)},i.prototype.select=function(e,i){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+i.id,this.$element.val(n),this.$element.trigger("change")}else this.current(function(e){t.map(e,function(t){t.selected=!1})}),this.$element.val(i.id),this.$element.trigger("change")},i.prototype.unselect=function(t,e){var i=this;e.selected=!1,this.current(function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r];e.id!=o.id&&n.push(o.id)}i.$element.val(n.join(i._valueSeparator)),i.$element.trigger("change")})},i.prototype.query=function(t,e,i){for(var n=[],r=0;r<this._currentData.length;r++){var o=this._currentData[r],s=this.matches(e,o);null!==s&&n.push(s)}i({results:n})},i.prototype.addOptions=function(i,n){var r=t.map(n,function(t){return e.GetData(t[0],"data")});this._currentData.push.apply(this._currentData,r)},i}),e.define("select2/compat/matcher",["jquery"],function(t){return function(e){return function(i,n){var r=t.extend(!0,{},n);if(null==i.term||""===t.trim(i.term))return r;if(n.children){for(var o=n.children.length-1;o>=0;o--){var s=n.children[o];e(i.term,s.text,s)||r.children.splice(o,1)}if(r.children.length>0)return r}return e(i.term,n.text,n)?r:null}}}),e.define("select2/compat/query",[],function(){function t(t,e,i){i.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.callback=i,this.options.get("query").call(null,e)},t}),e.define("select2/dropdown/attachContainer",[],function(){function t(t,e,i){t.call(this,e,i)}return t.prototype.position=function(t,e,i){i.find(".dropdown-wrapper").append(e),e.addClass("select2-dropdown--below"),i.addClass("select2-container--below")},t}),e.define("select2/dropdown/stopPropagation",[],function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(t){t.stopPropagation()})},t}),e.define("select2/selection/stopPropagation",[],function(){function t(){}return t.prototype.bind=function(t,e,i){t.call(this,e,i);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(t){t.stopPropagation()})},t}),o=function(t){var e,i,n=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],o=Array.prototype.slice;if(t.event.fixHooks)for(var s=n.length;s;)t.event.fixHooks[n[--s]]=t.event.mouseHooks;var a=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=r.length;e;)this.addEventListener(r[--e],l,!1);else this.onmousewheel=l;t.data(this,"mousewheel-line-height",a.getLineHeight(this)),t.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=r.length;e;)this.removeEventListener(r[--e],l,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var i=t(e),n=i["offsetParent"in t.fn?"offsetParent":"parent"]();return n.length||(n=t("body")),parseInt(n.css("fontSize"),10)||parseInt(i.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(n){var r,s=n||window.event,l=o.call(arguments,1),d=0,u=0,p=0,f=0,m=0;if((n=t.event.fix(s)).type="mousewheel","detail"in s&&(p=-1*s.detail),"wheelDelta"in s&&(p=s.wheelDelta),"wheelDeltaY"in s&&(p=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*p,p=0),d=0===p?u:p,"deltaY"in s&&(d=p=-1*s.deltaY),"deltaX"in s&&(u=s.deltaX,0===p&&(d=-1*u)),0!==p||0!==u){if(1===s.deltaMode){var g=t.data(this,"mousewheel-line-height");d*=g,p*=g,u*=g}else if(2===s.deltaMode){var v=t.data(this,"mousewheel-page-height");d*=v,p*=v,u*=v}if(r=Math.max(Math.abs(p),Math.abs(u)),(!i||r<i)&&(i=r,h(s,r)&&(i/=40)),h(s,r)&&(d/=40,u/=40,p/=40),d=Math[d>=1?"floor":"ceil"](d/i),u=Math[u>=1?"floor":"ceil"](u/i),p=Math[p>=1?"floor":"ceil"](p/i),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=n.clientX-y.left,m=n.clientY-y.top}return n.deltaX=u,n.deltaY=p,n.deltaFactor=i,n.offsetX=f,n.offsetY=m,n.deltaMode=0,l.unshift(n,d,u,p),e&&clearTimeout(e),e=setTimeout(c,200),(t.event.dispatch||t.event.handle).apply(this,l)}}function c(){i=null}function h(t,e){return a.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],o):"object"==typeof exports?module.exports=o:o(t),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(t,e,i,n,r){if(null==t.fn.select2){var o=["open","close","destroy"];t.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each(function(){var n=t.extend(!0,{},e);new i(t(this),n)}),this;if("string"==typeof e){var n,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=r.GetData(this,"select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=t[e].apply(t,s)}),t.inArray(e,o)>-1?this:n}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=n),i}),{define:e.define,require:e.require}}(),i=e.require("jquery.select2");return t.fn.select2.amd=e,i}),function(t,e){"function"==typeof define&&define.amd?define("bloodhound",["jquery"],function(i){return t.Bloodhound=e(i)}):"object"==typeof exports?module.exports=e(require("jquery")):t.Bloodhound=e(jQuery)}(this,function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,i){t.each(e,function(t,e){return i(e,t)})},map:t.map,filter:t.grep,every:function(e,i){var n=!0;return e?(t.each(e,function(t,r){if(!(n=i.call(null,r,t,e)))return!1}),!!n):n},some:function(e,i){var n=!1;return e?(t.each(e,function(t,r){if(n=i.call(null,r,t,e))return!1}),!!n):n},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(e){return t.isFunction(e)?e:function(){return String(e)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,i){var n,r;return function(){var o,s,a=this,l=arguments;return o=function(){n=null,i||(r=t.apply(a,l))},s=i&&!n,clearTimeout(n),n=setTimeout(o,e),s&&(r=t.apply(a,l)),r}},throttle:function(t,e){var i,n,r,o,s,a;return s=0,a=function(){s=new Date,r=null,o=t.apply(i,n)},function(){var l=new Date,c=e-(l-s);return i=this,n=arguments,c<=0?(clearTimeout(r),r=null,s=l,o=t.apply(i,n)):r||(r=setTimeout(a,c)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),i="0.11.1",n=function(){"use strict";return{nonword:i,whitespace:t,obj:{nonword:n(i),whitespace:n(t)}};function t(t){return(t=e.toStr(t))?t.split(/\s+/):[]}function i(t){return(t=e.toStr(t))?t.split(/\W+/):[]}function n(t){return function(i){return i=e.isArray(i)?i:[].slice.call(arguments,0),function(n){var r=[];return e.each(i,function(i){r=r.concat(t(e.toStr(n[i])))}),r}}}}(),r=function(){"use strict";function i(i){this.maxSize=e.isNumber(i)?i:100,this.reset(),this.maxSize<=0&&(this.set=this.get=t.noop)}function n(){this.head=this.tail=null}return e.mixin(i.prototype,{set:function(t,e){var i,n=this.list.tail;this.size>=this.maxSize&&(this.list.remove(n),delete this.hash[n.key],this.size--),(i=this.hash[t])?(i.val=e,this.list.moveToFront(i)):(i=new function(t,e){this.key=t,this.val=e,this.prev=this.next=null}(t,e),this.list.add(i),this.hash[t]=i,this.size++)},get:function(t){var e=this.hash[t];if(e)return this.list.moveToFront(e),e.val},reset:function(){this.size=0,this.hash={},this.list=new n}}),e.mixin(n.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),i}(),o=function(){"use strict";var i;try{(i=window.localStorage).setItem("~~~","!"),i.removeItem("~~~")}catch(t){i=null}function n(t,n){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+e.escapeRegExChars(this.prefix)),this.ls=n||i,!this.ls&&this._noop()}return e.mixin(n.prototype,{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=e.noop},_safeSet:function(t,e){try{this.ls.setItem(t,e)}catch(t){"QuotaExceededError"===t.name&&(this.clear(),this._noop())}},get:function(t){return this.isExpired(t)&&this.remove(t),s(this.ls.getItem(this._prefix(t)))},set:function(t,i,n){return e.isNumber(n)?this._safeSet(this._ttlKey(t),o(r()+n)):this.ls.removeItem(this._ttlKey(t)),this._safeSet(this._prefix(t),o(i))},remove:function(t){return this.ls.removeItem(this._ttlKey(t)),this.ls.removeItem(this._prefix(t)),this},clear:function(){var t,e=function(t){var e,n,r=[],o=i.length;for(e=0;e<o;e++)(n=i.key(e)).match(t)&&r.push(n.replace(t,""));return r}(this.keyMatcher);for(t=e.length;t--;)this.remove(e[t]);return this},isExpired:function(t){var i=s(this.ls.getItem(this._ttlKey(t)));return!!(e.isNumber(i)&&r()>i)}}),n;function r(){return(new Date).getTime()}function o(t){return JSON.stringify(e.isUndefined(t)?null:t)}function s(e){return t.parseJSON(e)}}(),s=function(){"use strict";var i=0,n={},o=6,s=new r(10);function a(t){t=t||{},this.cancelled=!1,this.lastReq=null,this._send=t.transport,this._get=t.limiter?t.limiter(this._get):this._get,this._cache=!1===t.cache?new r(0):s}return a.setMaxPendingRequests=function(t){o=t},a.resetCache=function(){s.reset()},e.mixin(a.prototype,{_fingerprint:function(e){return(e=e||{}).url+e.type+t.param(e.data||{})},_get:function(t,e){var r,s,a=this;function l(t){e(null,t),a._cache.set(r,t)}function c(){e(!0)}r=this._fingerprint(t),this.cancelled||r!==this.lastReq||((s=n[r])?s.done(l).fail(c):i<o?(i++,n[r]=this._send(t).done(l).fail(c).always(function(){i--,delete n[r],a.onDeckRequestArgs&&(a._get.apply(a,a.onDeckRequestArgs),a.onDeckRequestArgs=null)})):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(i,n){var r,o;n=n||t.noop,i=e.isString(i)?{url:i}:i||{},o=this._fingerprint(i),this.cancelled=!1,this.lastReq=o,(r=this._cache.get(o))?n(null,r):this._get(i,n)},cancel:function(){this.cancelled=!0}}),a}(),a=window.SearchIndex=function(){"use strict";var i="c",n="i";function r(i){(i=i||{}).datumTokenizer&&i.queryTokenizer||t.error("datumTokenizer and queryTokenizer are both required"),this.identify=i.identify||e.stringify,this.datumTokenizer=i.datumTokenizer,this.queryTokenizer=i.queryTokenizer,this.reset()}return e.mixin(r.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var r=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var a,l;r.datums[a=r.identify(t)]=t,l=o(r.datumTokenizer(t)),e.each(l,function(t){var e,o,l;for(e=r.trie,o=t.split("");l=o.shift();)(e=e[i][l]||(e[i][l]=s()))[n].push(a)})})},get:function(t){var i=this;return e.map(t,function(t){return i.datums[t]})},search:function(t){var r,s,a=this;return r=o(this.queryTokenizer(t)),e.each(r,function(t){var e,r,o,l;if(s&&0===s.length)return!1;for(e=a.trie,r=t.split("");e&&(o=r.shift());)e=e[i][o];if(!e||0!==r.length)return s=[],!1;l=e[n].slice(0),s=s?function(t,e){var i=0,n=0,r=[];t=t.sort(),e=e.sort();var o=t.length,s=e.length;for(;i<o&&n<s;)t[i]<e[n]?i++:t[i]>e[n]?n++:(r.push(t[i]),i++,n++);return r}(s,l):l}),s?e.map(function(t){for(var e={},i=[],n=0,r=t.length;n<r;n++)e[t[n]]||(e[t[n]]=!0,i.push(t[n]));return i}(s),function(t){return a.datums[t]}):[]},all:function(){var t=[];for(var e in this.datums)t.push(this.datums[e]);return t},reset:function(){this.datums={},this.trie=s()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),r;function o(t){return t=e.filter(t,function(t){return!!t}),t=e.map(t,function(t){return t.toLowerCase()})}function s(){var t={};return t[n]=[],t[i]={},t}}(),l=function(){"use strict";var t;function i(t){this.url=t.url,this.ttl=t.ttl,this.cache=t.cache,this.prepare=t.prepare,this.transform=t.transform,this.transport=t.transport,this.thumbprint=t.thumbprint,this.storage=new o(t.cacheKey)}return t={data:"data",protocol:"protocol",thumbprint:"thumbprint"},e.mixin(i.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(e){this.cache&&(this.storage.set(t.data,e,this.ttl),this.storage.set(t.protocol,location.protocol,this.ttl),this.storage.set(t.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var e,i={};return this.cache?(i.data=this.storage.get(t.data),i.protocol=this.storage.get(t.protocol),i.thumbprint=this.storage.get(t.thumbprint),e=i.thumbprint!==this.thumbprint||i.protocol!==location.protocol,i.data&&!e?i.data:null):null},fromNetwork:function(t){var e,i=this;t&&(e=this.prepare(this._settings()),this.transport(e).fail(function(){t(!0)}).done(function(e){t(null,i.transform(e))}))},clear:function(){return this.storage.clear(),this}}),i}(),c=function(){"use strict";function t(t){this.url=t.url,this.prepare=t.prepare,this.transform=t.transform,this.transport=new s({cache:t.cache,limiter:t.limiter,transport:t.transport})}return e.mixin(t.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(t,e){var i,n=this;if(e)return t=t||"",i=this.prepare(t,this._settings()),this.transport.get(i,function(t,i){e(t?[]:n.transform(i))})},cancelLastRequest:function(){this.transport.cancel()}}),t}(),h=function(){"use strict";return function(r){var o,s;return o={initialize:!0,identify:e.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},!(r=e.mixin(o,r||{})).datumTokenizer&&t.error("datumTokenizer is required"),!r.queryTokenizer&&t.error("queryTokenizer is required"),s=r.sorter,r.sorter=s?function(t){return t.sort(s)}:e.identity,r.local=e.isFunction(r.local)?r.local():r.local,r.prefetch=function(r){var o;if(!r)return null;return o={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:e.identity,transform:e.identity,transport:null},r=e.isString(r)?{url:r}:r,!(r=e.mixin(o,r)).url&&t.error("prefetch requires url to be set"),r.transform=r.filter||r.transform,r.cacheKey=r.cacheKey||r.url,r.thumbprint=i+r.thumbprint,r.transport=r.transport?n(r.transport):t.ajax,r}(r.prefetch),r.remote=function(i){var r;if(!i)return;return r={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:e.identity,transport:null},i=e.isString(i)?{url:i}:i,!(i=e.mixin(r,i)).url&&t.error("remote requires url to be set"),i.transform=i.filter||i.transform,i.prepare=function(t){var e,i,n;return e=t.prepare,i=t.replace,n=t.wildcard,e||(e=i?function(t,e){return e.url=i(e.url,t),e}:t.wildcard?function(t,e){return e.url=e.url.replace(n,encodeURIComponent(t)),e}:function(t,e){return e})}(i),i.limiter=function(t){var i,n,r;return i=t.limiter,n=t.rateLimitBy,r=t.rateLimitWait,i||(i=/^throttle$/i.test(n)?function(t){return function(i){return e.throttle(i,t)}}(r):function(t){return function(i){return e.debounce(i,t)}}(r)),i}(i),i.transport=i.transport?n(i.transport):t.ajax,delete i.replace,delete i.wildcard,delete i.rateLimitBy,delete i.rateLimitWait,i}(r.remote),r};function n(i){return function(n){var r=t.Deferred();return i(n,function(t){e.defer(function(){r.resolve(t)})},function(t){e.defer(function(){r.reject(t)})}),r}}}();return function(){"use strict";var i;function r(t){t=h(t),this.sorter=t.sorter,this.identify=t.identify,this.sufficient=t.sufficient,this.local=t.local,this.remote=t.remote?new c(t.remote):null,this.prefetch=t.prefetch?new l(t.prefetch):null,this.index=new a({identify:this.identify,datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),!1!==t.initialize&&this.initialize()}return i=window&&window.Bloodhound,r.noConflict=function(){return window&&(window.Bloodhound=i),r},r.tokenizers=n,e.mixin(r.prototype,{__ttAdapter:function(){var t=this;return this.remote?function(e,i,n){return t.search(e,i,n)}:function(e,i){return t.search(e,i)}},_loadPrefetch:function(){var e,i,n=this;return e=t.Deferred(),this.prefetch?(i=this.prefetch.fromCache())?(this.index.bootstrap(i),e.resolve()):this.prefetch.fromNetwork(function(t,i){if(t)return e.reject();n.add(i),n.prefetch.store(n.index.serialize()),e.resolve()}):e.resolve(),e.promise()},_initialize:function(){var t=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(function(){t.add(t.local)}),this.initPromise},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){return this.index.add(t),this},get:function(t){return t=e.isArray(t)?t:[].slice.call(arguments),this.index.get(t)},search:function(t,i,n){var r,o=this;return r=this.sorter(this.index.search(t)),i(this.remote?r.slice():r),this.remote&&r.length<this.sufficient?this.remote.get(t,function(t){var i=[];e.each(t,function(t){!e.some(r,function(e){return o.identify(t)===o.identify(e)})&&i.push(t)}),n&&n(i)}):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return s.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),r}()}),function(t,e){"function"==typeof define&&define.amd?define("typeahead.js",["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(0,function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,i){t.each(e,function(t,e){return i(e,t)})},map:t.map,filter:t.grep,every:function(e,i){var n=!0;return e?(t.each(e,function(t,r){if(!(n=i.call(null,r,t,e)))return!1}),!!n):n},some:function(e,i){var n=!1;return e?(t.each(e,function(t,r){if(n=i.call(null,r,t,e))return!1}),!!n):n},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function(e){return t.isFunction(e)?e:function(){return String(e)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,i){var n,r;return function(){var o,s,a=this,l=arguments;return o=function(){n=null,i||(r=t.apply(a,l))},s=i&&!n,clearTimeout(n),n=setTimeout(o,e),s&&(r=t.apply(a,l)),r}},throttle:function(t,e){var i,n,r,o,s,a;return s=0,a=function(){s=new Date,r=null,o=t.apply(i,n)},function(){var l=new Date,c=e-(l-s);return i=this,n=arguments,c<=0?(clearTimeout(r),r=null,s=l,o=t.apply(i,n)):r||(r=setTimeout(a,c)),o}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),i=function(){"use strict";var t={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return function(i){var n,r;return r=e.mixin({},t,i),{css:(n={css:(s={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}},e.isMsie()&&e.mixin(s.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),s),classes:r,html:(o=r,{wrapper:'<span class="'+o.wrapper+'"></span>',menu:'<div class="'+o.menu+'"></div>'}),selectors:function(t){var i={};return e.each(t,function(t,e){i[e]="."+t}),i}(r)}).css,html:n.html,classes:n.classes,selectors:n.selectors,mixin:function(t){e.mixin(t,n)}};var o;var s}}(),n=function(){"use strict";var i;function n(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}return"typeahead:",i={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(n.prototype,{_trigger:function(e,i){var n;return n=t.Event("typeahead:"+e),(i=i||[]).unshift(n),this.$el.trigger.apply(this.$el,i),n},before:function(t){var e;return e=[].slice.call(arguments,1),this._trigger("before"+t,e).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=i[t])&&this._trigger(e,[].slice.call(arguments,1))}}),n}(),r=function(){"use strict";var t=/\s+/,e=function(){var t;t=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)};return t}();return{onSync:function(t,e,n){return i.call(this,"sync",t,e,n)},onAsync:function(t,e,n){return i.call(this,"async",t,e,n)},off:function(e){var i;if(!this._callbacks)return this;e=e.split(t);for(;i=e.shift();)delete this._callbacks[i];return this},trigger:function(i){var r,o,s,a,l;if(!this._callbacks)return this;i=i.split(t),s=[].slice.call(arguments,1);for(;(r=i.shift())&&(o=this._callbacks[r]);)a=n(o.sync,this,[r].concat(s)),l=n(o.async,this,[r].concat(s)),a()&&e(l);return this}};function i(e,i,n,r){var o;if(!n)return this;for(i=i.split(t),n=r?function(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}(n,r):n,this._callbacks=this._callbacks||{};o=i.shift();)this._callbacks[o]=this._callbacks[o]||{sync:[],async:[]},this._callbacks[o][e].push(n);return this}function n(t,e,i){return function(){for(var n,r=0,o=t.length;!n&&r<o;r+=1)n=!1===t[r].apply(e,i);return!n}}}(),o=function(t){"use strict";var i={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(n){var r;(n=e.mixin({},i,n)).node&&n.pattern&&(n.pattern=e.isArray(n.pattern)?n.pattern:[n.pattern],r=function(t,i,n){for(var r,o=[],s=0,a=t.length;s<a;s++)o.push(e.escapeRegExChars(t[s]));return r=n?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",i?new RegExp(r):new RegExp(r,"i")}(n.pattern,n.caseSensitive,n.wordsOnly),function t(e,i){var n;for(var r=0;r<e.childNodes.length;r++)3===(n=e.childNodes[r]).nodeType?r+=i(n)?1:0:t(n,i)}(n.node,function(e){var i,o,s;(i=r.exec(e.data))&&(s=t.createElement(n.tagName),n.className&&(s.className=n.className),(o=e.splitText(i.index)).splitText(i[0].length),s.appendChild(o.cloneNode(!0)),e.parentNode.replaceChild(s,o));return!!i}))}}(window.document),s=function(){"use strict";var i;function n(i,n){var r;(i=i||{}).input||t.error("input is missing"),n.mixin(this),this.$hint=t(i.hint),this.$input=t(i.input),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=(r=this.$input,t('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:r.css("font-family"),fontSize:r.css("font-size"),fontStyle:r.css("font-style"),fontVariant:r.css("font-variant"),fontWeight:r.css("font-weight"),wordSpacing:r.css("word-spacing"),letterSpacing:r.css("letter-spacing"),textIndent:r.css("text-indent"),textRendering:r.css("text-rendering"),textTransform:r.css("text-transform")}).insertAfter(r)),this._checkLanguageDirection(),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=e.noop)}return i={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},n.normalizeQuery=function(t){return e.toStr(t).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},e.mixin(n.prototype,r,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(t){var e=i[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(t,e){var i;switch(t){case"up":case"down":i=!o(e);break;default:i=!1}i&&e.preventDefault()},_shouldTrigger:function(t,e){var i;switch(t){case"tab":i=!o(e);break;default:i=!0}return i},_checkLanguageDirection:function(){var t=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==t&&(this.dir=t,this.$hint.attr("dir",t),this.trigger("langDirChanged",t))},_setQuery:function(t,e){var i,r,o,s;o=t,s=this.query,r=!!(i=n.normalizeQuery(o)===n.normalizeQuery(s))&&this.query.length!==t.length,this.query=t,e||i?!e&&r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var t,n,r,o,s=this;return t=e.bind(this._onBlur,this),n=e.bind(this._onFocus,this),r=e.bind(this._onKeydown,this),o=e.bind(this._onInput,this),this.$input.on("blur.tt",t).on("focus.tt",n).on("keydown.tt",r),!e.isMsie()||e.isMsie()>9?this.$input.on("input.tt",o):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){i[t.which||t.keyCode]||e.defer(e.bind(s._onInput,s,t))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(t,e){this.setInputValue(t),this._setQuery(t,e)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(t){this.$input.val(t),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,i;i=(t=this.getInputValue())!==(e=this.getHint())&&0===e.indexOf(t),!(""!==t&&i&&!this.hasOverflow())&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,i,n;return t=this.$input.val().length,i=this.$input[0].selectionStart,e.isNumber(i)?i===t:!document.selection||((n=document.selection.createRange()).moveStart("character",-t),t===n.text.length)},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=t("<div>")}}),n;function o(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}}(),a=function(){"use strict";var i,n;function s(i,r){var o;(i=i||{}).templates=i.templates||{},i.templates.notFound=i.templates.notFound||i.templates.empty,i.source||t.error("missing source"),i.node||t.error("missing node"),i.name&&(o=i.name,!/^[_a-zA-Z0-9-]+$/.test(o))&&t.error("invalid dataset name: "+i.name),r.mixin(this),this.highlight=!!i.highlight,this.name=i.name||n(),this.limit=i.limit||5,this.displayFn=function(t){return t=t||e.stringify,e.isFunction(t)?t:function(e){return e[t]}}(i.display||i.displayKey),this.templates=function(i,n){return{notFound:i.notFound&&e.templatify(i.notFound),pending:i.pending&&e.templatify(i.pending),header:i.header&&e.templatify(i.header),footer:i.footer&&e.templatify(i.footer),suggestion:i.suggestion||function(e){return t("<div>").text(n(e))}}}(i.templates,this.displayFn),this.source=i.source.__ttAdapter?i.source.__ttAdapter():i.source,this.async=e.isUndefined(i.async)?this.source.length>2:!!i.async,this._resetLastSuggestion(),this.$el=t(i.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}return i={val:"tt-selectable-display",obj:"tt-selectable-object"},n=e.getIdGenerator(),s.extractData=function(e){var n=t(e);return n.data(i.obj)?{val:n.data(i.val)||"",obj:n.data(i.obj)||null}:null},e.mixin(s.prototype,r,{_overwrite:function(t,e){(e=e||[]).length?this._renderSuggestions(t,e):this.async&&this.templates.pending?this._renderPending(t):!this.async&&this.templates.notFound?this._renderNotFound(t):this._empty(),this.trigger("rendered",this.name,e,!1)},_append:function(t,e){(e=e||[]).length&&this.$lastSuggestion.length?this._appendSuggestions(t,e):e.length?this._renderSuggestions(t,e):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(t),this.trigger("rendered",this.name,e,!0)},_renderSuggestions:function(t,e){var i;i=this._getSuggestionsFragment(t,e),this.$lastSuggestion=i.children().last(),this.$el.html(i).prepend(this._getHeader(t,e)).append(this._getFooter(t,e))},_appendSuggestions:function(t,e){var i,n;n=(i=this._getSuggestionsFragment(t,e)).children().last(),this.$lastSuggestion.after(i),this.$lastSuggestion=n},_renderPending:function(t){var e=this.templates.pending;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_renderNotFound:function(t){var e=this.templates.notFound;this._resetLastSuggestion(),e&&this.$el.html(e({query:t,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(n,r){var s,a=this;return s=document.createDocumentFragment(),e.each(r,function(e){var r,o;o=a._injectQuery(n,e),r=t(a.templates.suggestion(o)).data(i.obj,e).data(i.val,a.displayFn(e)).addClass(a.classes.suggestion+" "+a.classes.selectable),s.appendChild(r[0])}),this.highlight&&o({className:this.classes.highlight,node:s,pattern:n}),t(s)},_getFooter:function(t,e){return this.templates.footer?this.templates.footer({query:t,suggestions:e,dataset:this.name}):null},_getHeader:function(t,e){return this.templates.header?this.templates.header({query:t,suggestions:e,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=t()},_injectQuery:function(t,i){return e.isObject(i)?e.mixin({_query:t},i):i},update:function(e){var i=this,n=!1,r=!1,o=0;function s(t){r||(r=!0,t=(t||[]).slice(0,i.limit),o=t.length,i._overwrite(e,t),o<i.limit&&i.async&&i.trigger("asyncRequested",e))}this.cancel(),this.cancel=function(){n=!0,i.cancel=t.noop,i.async&&i.trigger("asyncCanceled",e)},this.source(e,s,function(r){r=r||[],!n&&o<i.limit&&(i.cancel=t.noop,o+=r.length,i._append(e,r.slice(0,i.limit-o)),i.async&&i.trigger("asyncReceived",e))}),!r&&s([])},cancel:t.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=t("<div>")}}),s}(),l=function(){"use strict";function i(i,n){var r=this;(i=i||{}).node||t.error("node is required"),n.mixin(this),this.$node=t(i.node),this.query=null,this.datasets=e.map(i.datasets,function(e){var i=r.$node.find(e.node).first();return e.node=i.length?i:t("<div>").appendTo(r.$node),new a(e,n)})}return e.mixin(i.prototype,r,{_onSelectableClick:function(e){this.trigger("selectableClicked",t(e.currentTarget))},_onRendered:function(t,e,i,n){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",e,i,n)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){return e.every(this.datasets,function(t){return t.isEmpty()})},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var t=this.getActiveSelectable();t&&t.removeClass(this.classes.cursor)},_ensureVisible:function(t){var e,i,n,r;i=(e=t.position().top)+t.outerHeight(!0),n=this.$node.scrollTop(),r=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),e<0?this.$node.scrollTop(n+e):r<i&&this.$node.scrollTop(n+(i-r))},bind:function(){var t,i=this;return t=e.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,t),e.each(this.datasets,function(t){t.onSync("asyncRequested",i._propagate,i).onSync("asyncCanceled",i._propagate,i).onSync("asyncReceived",i._propagate,i).onSync("rendered",i._onRendered,i).onSync("cleared",i._onCleared,i)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.addClass(this.classes.open)},close:function(){this.$node.removeClass(this.classes.open),this._removeCursor()},setLanguageDirection:function(t){this.$node.attr("dir",t)},selectableRelativeToCursor:function(t){var e,i,n;return i=this.getActiveSelectable(),e=this._getSelectables(),-1===(n=(n=((n=(i?e.index(i):-1)+t)+1)%(e.length+1)-1)<-1?e.length-1:n)?null:e.eq(n)},setCursor:function(t){this._removeCursor(),(t=t&&t.first())&&(t.addClass(this.classes.cursor),this._ensureVisible(t))},getSelectableData:function(t){return t&&t.length?a.extractData(t):null},getActiveSelectable:function(){var t=this._getSelectables().filter(this.selectors.cursor).first();return t.length?t:null},getTopSelectable:function(){var t=this._getSelectables().first();return t.length?t:null},update:function(t){var i=t!==this.query;return i&&(this.query=t,e.each(this.datasets,function(e){e.update(t)})),i},empty:function(){e.each(this.datasets,function(t){t.clear()}),this.query=null,this.$node.addClass(this.classes.empty)},destroy:function(){this.$node.off(".tt"),this.$node=t("<div>"),e.each(this.datasets,function(t){t.destroy()})}}),i}(),c=function(){"use strict";var t=l.prototype;function i(){l.apply(this,[].slice.call(arguments,0))}return e.mixin(i.prototype,l.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),t.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),t.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),t._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),t._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(e){return this.$node.css("ltr"===e?this.css.ltr:this.css.rtl),t.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),i}(),h=function(){"use strict";function i(i,r){var o,s,a,l,c,h,d,u,p,f,m;(i=i||{}).input||t.error("missing input"),i.menu||t.error("missing menu"),i.eventBus||t.error("missing event bus"),r.mixin(this),this.eventBus=i.eventBus,this.minLength=e.isNumber(i.minLength)?i.minLength:1,this.input=i.input,this.menu=i.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),o=n(this,"activate","open","_onFocused"),s=n(this,"deactivate","_onBlurred"),a=n(this,"isActive","isOpen","_onEnterKeyed"),l=n(this,"isActive","isOpen","_onTabKeyed"),c=n(this,"isActive","_onEscKeyed"),h=n(this,"isActive","open","_onUpKeyed"),d=n(this,"isActive","open","_onDownKeyed"),u=n(this,"isActive","isOpen","_onLeftKeyed"),p=n(this,"isActive","isOpen","_onRightKeyed"),f=n(this,"_openIfActive","_onQueryChanged"),m=n(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",o,this).onSync("blurred",s,this).onSync("enterKeyed",a,this).onSync("tabKeyed",l,this).onSync("escKeyed",c,this).onSync("upKeyed",h,this).onSync("downKeyed",d,this).onSync("leftKeyed",u,this).onSync("rightKeyed",p,this).onSync("queryChanged",f,this).onSync("whitespaceChanged",m,this).onSync("langDirChanged",this._onLangDirChanged,this)}return e.mixin(i.prototype,{_hacks:function(){var i,n;i=this.input.$input||t("<div>"),n=this.menu.$node||t("<div>"),i.on("blur.tt",function(t){var r,o,s;r=document.activeElement,o=n.is(r),s=n.has(r).length>0,e.isMsie()&&(o||s)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer(function(){i.focus()}))}),n.on("mousedown.tt",function(t){t.preventDefault()})},_onSelectableClicked:function(t,e){this.select(e)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(t,e,i,n){this._updateHint(),this.eventBus.trigger("render",i,n,e)},_onAsyncRequested:function(t,e,i){this.eventBus.trigger("asyncrequest",i,e)},_onAsyncCanceled:function(t,e,i){this.eventBus.trigger("asynccancel",i,e)},_onAsyncReceived:function(t,e,i){this.eventBus.trigger("asyncreceive",i,e)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(t,e){var i;(i=this.menu.getActiveSelectable())&&this.select(i)&&e.preventDefault()},_onTabKeyed:function(t,e){var i;(i=this.menu.getActiveSelectable())?this.select(i)&&e.preventDefault():(i=this.menu.getTopSelectable())&&this.autocomplete(i)&&e.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(t,e){this._minLengthMet(e)?this.menu.update(e):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(t,e){this.dir!==e&&(this.dir=e,this.menu.setLanguageDirection(e))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(t){return(t=e.isString(t)?t:this.input.getQuery()||"").length>=this.minLength},_updateHint:function(){var t,i,n,r,o,a;t=this.menu.getTopSelectable(),i=this.menu.getSelectableData(t),n=this.input.getInputValue(),!i||e.isBlankString(n)||this.input.hasOverflow()?this.input.clearHint():(r=s.normalizeQuery(n),o=e.escapeRegExChars(r),(a=new RegExp("^(?:"+o+")(.+$)","i").exec(i.val))&&this.input.setHint(n+a[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(e.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj))&&(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj),this.close(),!0)},autocomplete:function(t){var e,i;return e=this.input.getQuery(),!(!((i=this.menu.getSelectableData(t))&&e!==i.val)||this.eventBus.before("autocomplete",i.obj))&&(this.input.setQuery(i.val),this.eventBus.trigger("autocomplete",i.obj),!0)},moveCursor:function(t){var e,i,n,r;return e=this.input.getQuery(),i=this.menu.selectableRelativeToCursor(t),r=(n=this.menu.getSelectableData(i))?n.obj:null,!(this._minLengthMet()&&this.menu.update(e))&&!this.eventBus.before("cursorchange",r)&&(this.menu.setCursor(i),n?this.input.setInputValue(n.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",r),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),i;function n(t){var i=[].slice.call(arguments,1);return function(){var n=[].slice.call(arguments);e.each(i,function(e){return t[e].apply(t,n)})}}}();!function(){"use strict";var r,o,a;function d(e,i){e.each(function(){var e,n=t(this);(e=n.data(o.typeahead))&&i(e,n)})}function u(i){var n;return(n=e.isJQuery(i)||e.isElement(i)?t(i).first():[]).length?n:null}r=t.fn.typeahead,o={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},a={initialize:function(r,a){var d;return a=e.isArray(a)?a:[].slice.call(arguments,1),d=i((r=r||{}).classNames),this.each(function(){var i,p,f,m,g,v,y,b,_,x,w;e.each(a,function(t){t.highlight=!!r.highlight}),i=t(this),p=t(d.html.wrapper),f=u(r.hint),m=u(r.menu),g=!1!==r.hint&&!f,v=!1!==r.menu&&!m,g&&(f=function(t,e){return t.clone().addClass(e.classes.hint).removeData().css(e.css.hint).css((i=t,{backgroundAttachment:i.css("background-attachment"),backgroundClip:i.css("background-clip"),backgroundColor:i.css("background-color"),backgroundImage:i.css("background-image"),backgroundOrigin:i.css("background-origin"),backgroundPosition:i.css("background-position"),backgroundRepeat:i.css("background-repeat"),backgroundSize:i.css("background-size")})).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1});var i}(i,d)),v&&(m=t(d.html.menu).css(d.css.menu)),f&&f.val(""),i=function(t,e){t.data(o.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(t){}return t}(i,d),(g||v)&&(p.css(d.css.wrapper),i.css(g?d.css.input:d.css.inputWithNoHint),i.wrap(p).parent().prepend(g?f:null).append(v?m:null));w=v?c:l,y=new n({el:i}),b=new s({hint:f,input:i},d),_=new w({node:m,datasets:a},d),x=new h({input:b,menu:_,eventBus:y,minLength:r.minLength},d),i.data(o.www,d),i.data(o.typeahead,x)})},isEnabled:function(){var t;return d(this.first(),function(e){t=e.isEnabled()}),t},enable:function(){return d(this,function(t){t.enable()}),this},disable:function(){return d(this,function(t){t.disable()}),this},isActive:function(){var t;return d(this.first(),function(e){t=e.isActive()}),t},activate:function(){return d(this,function(t){t.activate()}),this},deactivate:function(){return d(this,function(t){t.deactivate()}),this},isOpen:function(){var t;return d(this.first(),function(e){t=e.isOpen()}),t},open:function(){return d(this,function(t){t.open()}),this},close:function(){return d(this,function(t){t.close()}),this},select:function(e){var i=!1,n=t(e);return d(this.first(),function(t){i=t.select(n)}),i},autocomplete:function(e){var i=!1,n=t(e);return d(this.first(),function(t){i=t.autocomplete(n)}),i},moveCursor:function(t){var e=!1;return d(this.first(),function(i){e=i.moveCursor(t)}),e},val:function(t){var e;return arguments.length?(d(this,function(e){e.setVal(t)}),this):(d(this.first(),function(t){e=t.getVal()}),e)},destroy:function(){return d(this,function(t,i){!function(t){var i,n;i=t.data(o.www),n=t.parent().filter(i.selectors.wrapper),e.each(t.data(o.attrs),function(i,n){e.isUndefined(i)?t.removeAttr(n):t.attr(n,i)}),t.removeData(o.typeahead).removeData(o.www).removeData(o.attr).removeClass(i.classes.input),n.length&&(t.detach().insertAfter(n),n.remove())}(i),t.destroy()}),this}},t.fn.typeahead=function(t){return a[t]?a[t].apply(this,[].slice.call(arguments,1)):a.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function(){return t.fn.typeahead=r,this}}()}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}return i.m=t,i.c=e,i.p="",i(0)}([function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=n(i(2)),o=n(i(35)),s=i(36),a=i(41),l=n(i(42)),c=n(i(39)),h=n(i(34)),d=r.default.create;function u(){var t=d();return t.compile=function(e,i){return a.compile(e,i,t)},t.precompile=function(e,i){return a.precompile(e,i,t)},t.AST=o.default,t.Compiler=a.Compiler,t.JavaScriptCompiler=l.default,t.Parser=s.parser,t.parse=s.parse,t}var p=u();p.create=u,h.default(p),p.Visitor=c.default,p.default=p,e.default=p,t.exports=e.default},function(t,e){"use strict";e.default=function(t){return t&&t.__esModule?t:{default:t}},e.__esModule=!0},function(t,e,i){"use strict";var n=i(3).default,r=i(1).default;e.__esModule=!0;var o=n(i(4)),s=r(i(21)),a=r(i(6)),l=n(i(5)),c=n(i(22)),h=r(i(34));function d(){var t=new o.HandlebarsEnvironment;return l.extend(t,o),t.SafeString=s.default,t.Exception=a.default,t.Utils=l,t.escapeExpression=l.escapeExpression,t.VM=c,t.template=function(e){return c.template(e,t)},t}var u=d();u.create=d,h.default(u),u.default=u,e.default=u,t.exports=e.default},function(t,e){"use strict";e.default=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e},e.__esModule=!0},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0,e.HandlebarsEnvironment=c;var r=i(5),o=n(i(6)),s=i(10),a=i(18),l=n(i(20));e.VERSION="4.0.10";e.COMPILER_REVISION=7;e.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};function c(t,e,i){this.helpers=t||{},this.partials=e||{},this.decorators=i||{},s.registerDefaultHelpers(this),a.registerDefaultDecorators(this)}c.prototype={constructor:c,logger:l.default,log:l.default.log,registerHelper:function(t,e){if("[object Object]"===r.toString.call(t)){if(e)throw new o.default("Arg not supported with multiple helpers");r.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if("[object Object]"===r.toString.call(t))r.extend(this.partials,t);else{if(void 0===e)throw new o.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if("[object Object]"===r.toString.call(t)){if(e)throw new o.default("Arg not supported with multiple decorators");r.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var h=l.default.log;e.log=h,e.createFrame=r.createFrame,e.logger=l.default},function(t,e){"use strict";e.__esModule=!0,e.extend=s,e.indexOf=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},e.escapeExpression=function(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}if(!r.test(t))return t;return t.replace(n,o)},e.isEmpty=function(t){return!t&&0!==t||!(!c(t)||0!==t.length)},e.createFrame=function(t){var e=s({},t);return e._parent=t,e},e.blockParams=function(t,e){return t.path=e,t},e.appendContextPath=function(t,e){return(t?t+".":"")+e};var i={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},n=/[&<>"'`=]/g,r=/[&<>"'`=]/;function o(t){return i[t]}function s(t){for(var e=1;e<arguments.length;e++)for(var i in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],i)&&(t[i]=arguments[e][i]);return t}var a=Object.prototype.toString;e.toString=a;var l=function(t){return"function"==typeof t};l(/x/)&&(e.isFunction=l=function(t){return"function"==typeof t&&"[object Function]"===a.call(t)}),e.isFunction=l;var c=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===a.call(t)};e.isArray=c},function(t,e,i){"use strict";var n=i(7).default;e.__esModule=!0;var r=["description","fileName","lineNumber","message","name","number","stack"];function o(t,e){var i=e&&e.loc,s=void 0,a=void 0;i&&(t+=" - "+(s=i.start.line)+":"+(a=i.start.column));for(var l=Error.prototype.constructor.call(this,t),c=0;c<r.length;c++)this[r[c]]=l[r[c]];Error.captureStackTrace&&Error.captureStackTrace(this,o);try{i&&(this.lineNumber=s,n?Object.defineProperty(this,"column",{value:a,enumerable:!0}):this.column=a)}catch(t){}}o.prototype=new Error,e.default=o,t.exports=e.default},function(t,e,i){t.exports={default:i(8),__esModule:!0}},function(t,e,i){var n=i(9);t.exports=function(t,e,i){return n.setDesc(t,e,i)}},function(t,e){var i=Object;t.exports={create:i.create,getProto:i.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:i.getOwnPropertyDescriptor,setDesc:i.defineProperty,setDescs:i.defineProperties,getKeys:i.keys,getNames:i.getOwnPropertyNames,getSymbols:i.getOwnPropertySymbols,each:[].forEach}},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0,e.registerDefaultHelpers=function(t){r.default(t),o.default(t),s.default(t),a.default(t),l.default(t),c.default(t),h.default(t)};var r=n(i(11)),o=n(i(12)),s=n(i(13)),a=n(i(14)),l=n(i(15)),c=n(i(16)),h=n(i(17))},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerHelper("blockHelperMissing",function(e,i){var r=i.inverse,o=i.fn;if(!0===e)return o(this);if(!1===e||null==e)return r(this);if(n.isArray(e))return e.length>0?(i.ids&&(i.ids=[i.name]),t.helpers.each(e,i)):r(this);if(i.data&&i.ids){var s=n.createFrame(i.data);s.contextPath=n.appendContextPath(i.data.contextPath,i.name),i={data:s}}return o(e,i)})},t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=i(5),o=n(i(6));e.default=function(t){t.registerHelper("each",function(t,e){if(!e)throw new o.default("Must pass iterator to #each");var i=e.fn,n=e.inverse,s=0,a="",l=void 0,c=void 0;function h(e,n,o){l&&(l.key=e,l.index=n,l.first=0===n,l.last=!!o,c&&(l.contextPath=c+e)),a+=i(t[e],{data:l,blockParams:r.blockParams([t[e],e],[c+e,null])})}if(e.data&&e.ids&&(c=r.appendContextPath(e.data.contextPath,e.ids[0])+"."),r.isFunction(t)&&(t=t.call(this)),e.data&&(l=r.createFrame(e.data)),t&&"object"==typeof t)if(r.isArray(t))for(var d=t.length;s<d;s++)s in t&&h(s,s,s===t.length-1);else{var u=void 0;for(var p in t)t.hasOwnProperty(p)&&(void 0!==u&&h(u,s-1),u=p,s++);void 0!==u&&h(u,s-1,!0)}return 0===s&&(a=n(this)),a})},t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=n(i(6));e.default=function(t){t.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerHelper("if",function(t,e){return n.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||n.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,i){return t.helpers.if.call(this,e,{fn:i.inverse,inverse:i.fn,hash:i.hash})})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],i=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var r=1;null!=i.hash.level?r=i.hash.level:i.data&&null!=i.data.level&&(r=i.data.level),e[0]=r,t.log.apply(t,e)})},t.exports=e.default},function(t,e){"use strict";e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(t,e){return t&&t[e]})},t.exports=e.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerHelper("with",function(t,e){n.isFunction(t)&&(t=t.call(this));var i=e.fn;if(n.isEmpty(t))return e.inverse(this);var r=e.data;return e.data&&e.ids&&((r=n.createFrame(e.data)).contextPath=n.appendContextPath(e.data.contextPath,e.ids[0])),i(t,{data:r,blockParams:n.blockParams([t],[r&&r.contextPath])})})},t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0,e.registerDefaultDecorators=function(t){r.default(t)};var r=n(i(19))},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5);e.default=function(t){t.registerDecorator("inline",function(t,e,i,r){var o=t;return e.partials||(e.partials={},o=function(r,o){var s=i.partials;i.partials=n.extend({},s,e.partials);var a=t(r,o);return i.partials=s,a}),e.partials[r.args[0]]=r.fn,o})},t.exports=e.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=n.indexOf(r.methodMap,t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];console[e].apply(console,n)}}};e.default=r,t.exports=e.default},function(t,e){"use strict";function i(t){this.string=t}e.__esModule=!0,i.prototype.toString=i.prototype.toHTML=function(){return""+this.string},e.default=i,t.exports=e.default},function(t,e,i){"use strict";var n=i(23).default,r=i(3).default,o=i(1).default;e.__esModule=!0,e.checkRevision=function(t){var e=t&&t[0]||1,i=l.COMPILER_REVISION;if(e!==i){if(e<i){var n=l.REVISION_CHANGES[i],r=l.REVISION_CHANGES[e];throw new a.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+r+").")}throw new a.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}},e.template=function(t,e){if(!e)throw new a.default("No environment passed to template");if(!t||!t.main)throw new a.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var i={strict:function(t,e){if(!(e in t))throw new a.default('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n]&&null!=t[n][e])return t[n][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:s.escapeExpression,invokePartial:function(i,n,r){r.hash&&(n=s.extend({},n,r.hash),r.ids&&(r.ids[0]=!0));i=e.VM.resolvePartial.call(this,i,n,r);var o=e.VM.invokePartial.call(this,i,n,r);null==o&&e.compile&&(r.partials[r.name]=e.compile(i,t.compilerOptions,e),o=r.partials[r.name](n,r));if(null!=o){if(r.indent){for(var l=o.split("\n"),c=0,h=l.length;c<h&&(l[c]||c+1!==h);c++)l[c]=r.indent+l[c];o=l.join("\n")}return o}throw new a.default("The partial "+r.name+" could not be compiled when running in runtime-only mode")},fn:function(e){var i=t[e];return i.decorator=t[e+"_d"],i},programs:[],program:function(t,e,i,n,r){var o=this.programs[t],s=this.fn(t);return e||r||n||i?o=c(this,t,s,e,i,n,r):o||(o=this.programs[t]=c(this,t,s)),o},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var i=t||e;return t&&e&&t!==e&&(i=s.extend({},e,t)),i},nullContext:n({}),noop:e.VM.noop,compilerInfo:t.compiler};function r(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=n.data;r._setup(n),!n.partial&&t.useData&&(o=function(t,e){e&&"root"in e||((e=e?l.createFrame(e):{}).root=t);return e}(e,o));var s=void 0,a=t.useBlockParams?[]:void 0;function c(e){return""+t.main(i,e,i.helpers,i.partials,o,a,s)}return t.useDepths&&(s=n.depths?e!=n.depths[0]?[e].concat(n.depths):n.depths:[e]),(c=d(t.main,c,i,n.depths||[],o,a))(e,n)}return r.isTop=!0,r._setup=function(n){n.partial?(i.helpers=n.helpers,i.partials=n.partials,i.decorators=n.decorators):(i.helpers=i.merge(n.helpers,e.helpers),t.usePartial&&(i.partials=i.merge(n.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=i.merge(n.decorators,e.decorators)))},r._child=function(e,n,r,o){if(t.useBlockParams&&!r)throw new a.default("must pass block params");if(t.useDepths&&!o)throw new a.default("must pass parent depths");return c(i,e,t[e],n,0,r,o)},r},e.wrapProgram=c,e.resolvePartial=function(t,e,i){t?t.call||i.name||(i.name=t,t=i.partials[t]):t="@partial-block"===i.name?i.data["partial-block"]:i.partials[i.name];return t},e.invokePartial=function(t,e,i){var n=i.data&&i.data["partial-block"];i.partial=!0,i.ids&&(i.data.contextPath=i.ids[0]||i.data.contextPath);var r=void 0;i.fn&&i.fn!==h&&function(){i.data=l.createFrame(i.data);var t=i.fn;r=i.data["partial-block"]=function(e){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return i.data=l.createFrame(i.data),i.data["partial-block"]=n,t(e,i)},t.partials&&(i.partials=s.extend({},i.partials,t.partials))}();void 0===t&&r&&(t=r);if(void 0===t)throw new a.default("The partial "+i.name+" could not be found");if(t instanceof Function)return t(e,i)},e.noop=h;var s=r(i(5)),a=o(i(6)),l=i(4);function c(t,e,i,n,r,o,s){function a(e){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=s;return!s||e==s[0]||e===t.nullContext&&null===s[0]||(a=[e].concat(s)),i(t,e,t.helpers,t.partials,r.data||n,o&&[r.blockParams].concat(o),a)}return(a=d(i,a,t,s,n,o)).program=e,a.depth=s?s.length:0,a.blockParams=r||0,a}function h(){return""}function d(t,e,i,n,r,o){if(t.decorator){var a={};e=t.decorator(e,a,i,n&&n[0],r,o,n),s.extend(e,a)}return e}},function(t,e,i){t.exports={default:i(24),__esModule:!0}},function(t,e,i){i(25),t.exports=i(30).Object.seal},function(t,e,i){var n=i(26);i(27)("seal",function(t){return function(e){return t&&n(e)?t(e):e}})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){var n=i(28),r=i(30),o=i(33);t.exports=function(t,e){var i=(r.Object||{})[t]||Object[t],s={};s[t]=e(i),n(n.S+n.F*o(function(){i(1)}),"Object",s)}},function(t,e,i){var n=i(29),r=i(30),o=i(31),s=function(t,e,i){var a,l,c,h=t&s.F,d=t&s.G,u=t&s.S,p=t&s.P,f=t&s.B,m=t&s.W,g=d?r:r[e]||(r[e]={}),v=d?n:u?n[e]:(n[e]||{}).prototype;for(a in d&&(i=e),i)(l=!h&&v&&a in v)&&a in g||(c=l?v[a]:i[a],g[a]=d&&"function"!=typeof v[a]?i[a]:f&&l?o(c,n):m&&v[a]==c?function(t){var e=function(e){return this instanceof t?new t(e):t(e)};return e.prototype=t.prototype,e}(c):p&&"function"==typeof c?o(Function.call,c):c,p&&((g.prototype||(g.prototype={}))[a]=c))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){var i=t.exports={version:"1.2.6"};"number"==typeof __e&&(__e=i)},function(t,e,i){var n=i(32);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){(function(i){"use strict";e.__esModule=!0,e.default=function(t){var e=void 0!==i?i:window,n=e.Handlebars;t.noConflict=function(){return e.Handlebars===t&&(e.Handlebars=n),t}},t.exports=e.default}).call(e,function(){return this}())},function(t,e){"use strict";e.__esModule=!0;var i={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!i.helpers.scopedId(t)&&!t.depth}}};e.default=i,t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default,r=i(3).default;e.__esModule=!0,e.parse=function(t,e){if("Program"===t.type)return t;return o.default.yy=c,c.locInfo=function(t){return new c.SourceLocation(e&&e.srcName,t)},new s.default(e).accept(o.default.parse(t))};var o=n(i(37)),s=n(i(38)),a=r(i(40)),l=i(5);e.parser=o.default;var c={};l.extend(c,a)},function(t,e){"use strict";e.__esModule=!0;var i=function(){var t={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(t,e,i,n,r,o,s){var a=o.length-1;switch(r){case 1:return o[a-1];case 2:this.$=n.prepareProgram(o[a]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=o[a];break;case 9:this.$={type:"CommentStatement",value:n.stripComment(o[a]),strip:n.stripFlags(o[a],o[a]),loc:n.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[a],value:o[a],loc:n.locInfo(this._$)};break;case 11:this.$=n.prepareRawBlock(o[a-2],o[a-1],o[a],this._$);break;case 12:this.$={path:o[a-3],params:o[a-2],hash:o[a-1]};break;case 13:this.$=n.prepareBlock(o[a-3],o[a-2],o[a-1],o[a],!1,this._$);break;case 14:this.$=n.prepareBlock(o[a-3],o[a-2],o[a-1],o[a],!0,this._$);break;case 15:this.$={open:o[a-5],path:o[a-4],params:o[a-3],hash:o[a-2],blockParams:o[a-1],strip:n.stripFlags(o[a-5],o[a])};break;case 16:case 17:this.$={path:o[a-4],params:o[a-3],hash:o[a-2],blockParams:o[a-1],strip:n.stripFlags(o[a-5],o[a])};break;case 18:this.$={strip:n.stripFlags(o[a-1],o[a-1]),program:o[a]};break;case 19:var l=n.prepareBlock(o[a-2],o[a-1],o[a],o[a],!1,this._$),c=n.prepareProgram([l],o[a-1].loc);c.chained=!0,this.$={strip:o[a-2].strip,program:c,chain:!0};break;case 20:this.$=o[a];break;case 21:this.$={path:o[a-1],strip:n.stripFlags(o[a-2],o[a])};break;case 22:case 23:this.$=n.prepareMustache(o[a-3],o[a-2],o[a-1],o[a-4],n.stripFlags(o[a-4],o[a]),this._$);break;case 24:this.$={type:"PartialStatement",name:o[a-3],params:o[a-2],hash:o[a-1],indent:"",strip:n.stripFlags(o[a-4],o[a]),loc:n.locInfo(this._$)};break;case 25:this.$=n.preparePartialBlock(o[a-2],o[a-1],o[a],this._$);break;case 26:this.$={path:o[a-3],params:o[a-2],hash:o[a-1],strip:n.stripFlags(o[a-4],o[a])};break;case 27:case 28:this.$=o[a];break;case 29:this.$={type:"SubExpression",path:o[a-3],params:o[a-2],hash:o[a-1],loc:n.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:o[a],loc:n.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:n.id(o[a-2]),value:o[a],loc:n.locInfo(this._$)};break;case 32:this.$=n.id(o[a-1]);break;case 33:case 34:this.$=o[a];break;case 35:this.$={type:"StringLiteral",value:o[a],original:o[a],loc:n.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(o[a]),original:Number(o[a]),loc:n.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===o[a],original:"true"===o[a],loc:n.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:n.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:n.locInfo(this._$)};break;case 40:case 41:this.$=o[a];break;case 42:this.$=n.preparePath(!0,o[a],this._$);break;case 43:this.$=n.preparePath(!1,o[a],this._$);break;case 44:o[a-2].push({part:n.id(o[a]),original:o[a],separator:o[a-1]}),this.$=o[a-2];break;case 45:this.$=[{part:n.id(o[a]),original:o[a]}];break;case 46:this.$=[];break;case 47:o[a-1].push(o[a]);break;case 48:this.$=[o[a]];break;case 49:o[a-1].push(o[a]);break;case 50:this.$=[];break;case 51:o[a-1].push(o[a]);break;case 58:this.$=[];break;case 59:o[a-1].push(o[a]);break;case 64:this.$=[];break;case 65:o[a-1].push(o[a]);break;case 70:this.$=[];break;case 71:o[a-1].push(o[a]);break;case 78:this.$=[];break;case 79:o[a-1].push(o[a]);break;case 82:this.$=[];break;case 83:o[a-1].push(o[a]);break;case 86:this.$=[];break;case 87:o[a-1].push(o[a]);break;case 90:this.$=[];break;case 91:o[a-1].push(o[a]);break;case 94:this.$=[];break;case 95:o[a-1].push(o[a]);break;case 98:this.$=[o[a]];break;case 99:o[a-1].push(o[a]);break;case 100:this.$=[o[a]];break;case 101:o[a-1].push(o[a])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(t,e){throw new Error(t)},parse:function(t){var e=this,i=[0],n=[null],r=[],o=this.table,s="",a=0,l=0,c=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;r.push(h);var d=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var u,p,f,m,g,v,y,b,_,x,w={};;){if(f=i[i.length-1],this.defaultActions[f]?m=this.defaultActions[f]:(null!==u&&void 0!==u||(x=void 0,"number"!=typeof(x=e.lexer.lex()||1)&&(x=e.symbols_[x]||x),u=x),m=o[f]&&o[f][u]),void 0===m||!m.length||!m[0]){var k="";if(!c){for(v in _=[],o[f])this.terminals_[v]&&v>2&&_.push("'"+this.terminals_[v]+"'");k=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[u]||u)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==u?"end of input":"'"+(this.terminals_[u]||u)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[u]||u,line:this.lexer.yylineno,loc:h,expected:_})}}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+u);switch(m[0]){case 1:i.push(u),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(m[1]),u=null,p?(u=p,p=null):(l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,c>0&&c--);break;case 2:if(y=this.productions_[m[1]][1],w.$=n[n.length-y],w._$={first_line:r[r.length-(y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(y||1)].first_column,last_column:r[r.length-1].last_column},d&&(w._$.range=[r[r.length-(y||1)].range[0],r[r.length-1].range[1]]),void 0!==(g=this.performAction.call(w,s,l,a,this.yy,m[1],n,r)))return g;y&&(i=i.slice(0,-1*y*2),n=n.slice(0,-1*y),r=r.slice(0,-1*y)),i.push(this.productions_[m[1]][0]),n.push(w.$),r.push(w._$),b=o[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},e=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;var t,e,i,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),s=0;s<o.length&&(!(i=this._input.match(this.rules[o[s]]))||e&&!(i[0].length>e[0].length)||(e=i,n=s,this.options.flex));s++);return e?((r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,o[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)},options:{},performAction:function(t,e,i,n){function r(t,i){return e.yytext=e.yytext.substr(t,e.yyleng-i)}switch(i){case 0:if("\\\\"===e.yytext.slice(-2)?(r(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(r(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=r(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=r(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return t}();function i(){this.yy={}}return t.lexer=e,i.prototype=t,t.Parser=i,new i}();e.default=i,t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=n(i(39));function o(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t}function s(t,e,i){void 0===e&&(e=t.length);var n=t[e-1],r=t[e-2];return n?"ContentStatement"===n.type?(r||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original):void 0:i}function a(t,e,i){void 0===e&&(e=-1);var n=t[e+1],r=t[e+2];return n?"ContentStatement"===n.type?(r||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original):void 0:i}function l(t,e,i){var n=t[null==e?0:e+1];if(n&&"ContentStatement"===n.type&&(i||!n.rightStripped)){var r=n.value;n.value=n.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==r}}function c(t,e,i){var n=t[null==e?t.length-1:e-1];if(n&&"ContentStatement"===n.type&&(i||!n.leftStripped)){var r=n.value;return n.value=n.value.replace(i?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==r,n.leftStripped}}o.prototype=new r.default,o.prototype.Program=function(t){var e=!this.options.ignoreStandalone,i=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,r=0,o=n.length;r<o;r++){var h=n[r],d=this.accept(h);if(d){var u=s(n,r,i),p=a(n,r,i),f=d.openStandalone&&u,m=d.closeStandalone&&p,g=d.inlineStandalone&&u&&p;d.close&&l(n,r,!0),d.open&&c(n,r,!0),e&&g&&(l(n,r),c(n,r)&&"PartialStatement"===h.type&&(h.indent=/([ \t]+$)/.exec(n[r-1].original)[1])),e&&f&&(l((h.program||h.inverse).body),c(n,r)),e&&m&&(l(n,r),c((h.inverse||h.program).body))}}return t},o.prototype.BlockStatement=o.prototype.DecoratorBlock=o.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,i=t.program&&t.inverse,n=i,r=i;if(i&&i.chained)for(n=i.body[0].program;r.chained;)r=r.body[r.body.length-1].program;var o={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:a(e.body),closeStandalone:s((n||e).body)};if(t.openStrip.close&&l(e.body,null,!0),i){var h=t.inverseStrip;h.open&&c(e.body,null,!0),h.close&&l(n.body,null,!0),t.closeStrip.open&&c(r.body,null,!0),!this.options.ignoreStandalone&&s(e.body)&&a(n.body)&&(c(e.body),l(n.body))}else t.closeStrip.open&&c(e.body,null,!0);return o},o.prototype.Decorator=o.prototype.MustacheStatement=function(t){return t.strip},o.prototype.PartialStatement=o.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e.default=o,t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=n(i(6));function o(){this.parents=[]}function s(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function a(t){s.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function l(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}o.prototype={constructor:o,mutating:!1,acceptKey:function(t,e){var i=this.accept(t[e]);if(this.mutating){if(i&&!o.prototype[i.type])throw new r.default('Unexpected node type "'+i.type+'" found when accepting '+e+" on "+t.type);t[e]=i}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new r.default(t.type+" requires "+e)},acceptArray:function(t){for(var e=0,i=t.length;e<i;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,i--)},accept:function(t){if(t){if(!this[t.type])throw new r.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:!1!==e?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:s,Decorator:s,BlockStatement:a,DecoratorBlock:a,PartialStatement:l,PartialBlockStatement:function(t){l.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:s,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e.default=o,t.exports=e.default},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0,e.SourceLocation=function(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}},e.id=function(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t},e.stripFlags=function(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}},e.stripComment=function(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")},e.preparePath=function(t,e,i){i=this.locInfo(i);for(var n=t?"@":"",o=[],s=0,a=0,l=e.length;a<l;a++){var c=e[a].part,h=e[a].original!==c;if(n+=(e[a].separator||"")+c,h||".."!==c&&"."!==c&&"this"!==c)o.push(c);else{if(o.length>0)throw new r.default("Invalid path: "+n,{loc:i});".."===c&&(s++,"../")}}return{type:"PathExpression",data:t,depth:s,parts:o,original:n,loc:i}},e.prepareMustache=function(t,e,i,n,r,o){var s=n.charAt(3)||n.charAt(2),a="{"!==s&&"&"!==s;return{type:/\*/.test(n)?"Decorator":"MustacheStatement",path:t,params:e,hash:i,escaped:a,strip:r,loc:this.locInfo(o)}},e.prepareRawBlock=function(t,e,i,n){o(t,i),n=this.locInfo(n);var r={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}},e.prepareBlock=function(t,e,i,n,s,a){n&&n.path&&o(t,n);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var c=void 0,h=void 0;if(i){if(l)throw new r.default("Unexpected inverse block on decorator",i);i.chain&&(i.program.body[0].closeStrip=n.strip),h=i.strip,c=i.program}s&&(s=c,c=e,e=s);return{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:c,openStrip:t.strip,inverseStrip:h,closeStrip:n&&n.strip,loc:this.locInfo(a)}},e.prepareProgram=function(t,e){if(!e&&t.length){var i=t[0].loc,n=t[t.length-1].loc;i&&n&&(e={source:i.source,start:{line:i.start.line,column:i.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}},e.preparePartialBlock=function(t,e,i,n){return o(t,i),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:i&&i.strip,loc:this.locInfo(n)}};var r=n(i(6));function o(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var i={loc:t.path.loc};throw new r.default(t.path.original+" doesn't match "+e,i)}}},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0,e.Compiler=l,e.precompile=function(t,e,i){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);"data"in(e=e||{})||(e.data=!0);e.compat&&(e.useDepths=!0);var n=i.parse(t,e),o=(new i.Compiler).compile(n,e);return(new i.JavaScriptCompiler).compile(o,e)},e.compile=function(t,e,i){void 0===e&&(e={});if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new r.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in(e=o.extend({},e))||(e.data=!0);e.compat&&(e.useDepths=!0);var n=void 0;function s(){var n=i.parse(t,e),r=(new i.Compiler).compile(n,e),o=(new i.JavaScriptCompiler).compile(r,e,void 0,!0);return i.template(o)}function a(t,e){return n||(n=s()),n.call(this,t,e)}return a._setup=function(t){return n||(n=s()),n._setup(t)},a._child=function(t,e,i,r){return n||(n=s()),n._child(t,e,i,r)},a};var r=n(i(6)),o=i(5),s=n(i(35)),a=[].slice;function l(){}function c(t,e){if(t===e)return!0;if(o.isArray(t)&&o.isArray(e)&&t.length===e.length){for(var i=0;i<t.length;i++)if(!c(t[i],e[i]))return!1;return!0}}function h(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}l.prototype={compiler:l,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var i=0;i<e;i++){var n=this.opcodes[i],r=t.opcodes[i];if(n.opcode!==r.opcode||!c(n.args,r.args))return!1}e=this.children.length;for(i=0;i<e;i++)if(!this.children[i].equals(t.children[i]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var i=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},i)for(var n in i)n in i&&(this.options.knownHelpers[n]=i[n]);return this.accept(t)},compileProgram:function(t){var e=(new this.compiler).compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||e.usePartial,this.children[i]=e,this.useDepths=this.useDepths||e.useDepths,i},accept:function(t){if(!this[t.type])throw new r.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,i=e.length,n=0;n<i;n++)this.accept(e[n]);return this.options.blockParams.shift(),this.isSimple=1===i,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){h(t);var e=t.program,i=t.inverse;e=e&&this.compileProgram(e),i=i&&this.compileProgram(i);var n=this.classifySexpr(t);"helper"===n?this.helperSexpr(t,e,i):"simple"===n?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,i),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),i=this.setupFullMustacheParams(t,e,void 0),n=t.path;this.useDecorators=!0,this.opcode("registerDecorator",i.length,n.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var i=t.params;if(i.length>1)throw new r.default("Unsupported number of partial arguments: "+i.length,t);i.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):i.push({type:"PathExpression",parts:[],depth:0}));var n=t.name.original,o="SubExpression"===t.name.type;o&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",o,n,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){h(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,i){var n=t.path,r=n.parts[0],o=null!=e||null!=i;this.opcode("getContext",n.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",i),n.strict=!0,this.accept(n),this.opcode("invokeAmbiguous",r,o)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,i){var n=this.setupFullMustacheParams(t,e,i),o=t.path,a=o.parts[0];if(this.options.knownHelpers[a])this.opcode("invokeKnownHelper",n.length,a);else{if(this.options.knownHelpersOnly)throw new r.default("You specified knownHelpersOnly, but used the unknown helper "+a,t);o.strict=!0,o.falsy=!0,this.accept(o),this.opcode("invokeHelper",n.length,o.original,s.default.helpers.simpleId(o))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],i=s.default.helpers.scopedId(t),n=!t.depth&&!i&&this.blockParamIndex(e);n?this.opcode("lookupBlockParam",n,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,i):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,i=0,n=e.length;for(this.opcode("pushHash");i<n;i++)this.pushParam(e[i].value);for(;i--;)this.opcode("assignToHash",e[i].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=s.default.helpers.simpleId(t.path),i=e&&!!this.blockParamIndex(t.path.parts[0]),n=!i&&s.default.helpers.helperExpression(t),r=!i&&(n||e);if(r&&!n){var o=t.path.parts[0],a=this.options;a.knownHelpers[o]?n=!0:a.knownHelpersOnly&&(r=!1)}return n?"helper":r?"ambiguous":"simple"},pushParams:function(t){for(var e=0,i=t.length;e<i;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var i=void 0;if(!t.parts||s.default.helpers.scopedId(t)||t.depth||(i=this.blockParamIndex(t.parts[0])),i){var n=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,n)}else(e=t.original||e).replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,i,n){var r=t.params;return this.pushParams(r),this.opcode("pushProgram",e),this.opcode("pushProgram",i),t.hash?this.accept(t.hash):this.opcode("emptyHash",n),r},blockParamIndex:function(t){for(var e=0,i=this.options.blockParams.length;e<i;e++){var n=this.options.blockParams[e],r=n&&o.indexOf(n,t);if(n&&r>=0)return[e,r]}}}},function(t,e,i){"use strict";var n=i(1).default;e.__esModule=!0;var r=i(4),o=n(i(6)),s=i(5),a=n(i(43));function l(t){this.value=t}function c(){}c.prototype={nameLookup:function(t,e){return c.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=r.COMPILER_REVISION;return[t,r.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,i){return s.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:i?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,i,n){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!n,this.name=this.environment.name,this.isChild=!!i,this.context=i||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var r=t.opcodes,s=void 0,a=void 0,l=void 0,c=void 0;for(l=0,c=r.length;l<c;l++)s=r[l],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new o.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),n?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var h=this.createFunctionContext(n);if(this.isChild)return h;var d={compiler:this.compilerInfo(),main:h};this.decorators&&(d.main_d=this.decorators,d.useDecorators=!0);var u=this.context,p=u.programs,f=u.decorators;for(l=0,c=p.length;l<c;l++)p[l]&&(d[l]=p[l],f[l]&&(d[l+"_d"]=f[l],d.useDecorators=!0));return this.environment.usePartial&&(d.usePartial=!0),this.options.data&&(d.useData=!0),this.useDepths&&(d.useDepths=!0),this.useBlockParams&&(d.useBlockParams=!0),this.options.compat&&(d.compat=!0),n?d.compilerOptions=this.options:(d.compiler=JSON.stringify(d.compiler),this.source.currentLocation={start:{line:1,column:0}},d=this.objectLiteral(d),e.srcName?(d=d.toStringWithSourceMap({file:e.destName})).map=d.map&&d.map.toString():d=d.toString()),d},preamble:function(){this.lastContext=0,this.source=new a.default(this.options.srcName),this.decorators=new a.default(this.options.srcName)},createFunctionContext:function(t){var e="",i=this.stackVars.concat(this.registers.list);i.length>0&&(e+=", "+i.join(", "));var n=0;for(var r in this.aliases){var o=this.aliases[r];this.aliases.hasOwnProperty(r)&&o.children&&o.referenceCount>1&&(e+=", alias"+ ++n+"="+r,o.children[0]="alias"+n)}var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(e);return t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),") {\n ",a,"}"])},mergeSource:function(t){var e=this.environment.isSimple,i=!this.forceBuffer,n=void 0,r=void 0,o=void 0,s=void 0;return this.source.each(function(t){t.appendToBuffer?(o?t.prepend(" + "):o=t,s=t):(o&&(r?o.prepend("buffer += "):n=!0,s.add(";"),o=s=void 0),r=!0,e||(i=!1))}),i?o?(o.prepend("return "),s.add(";")):r||this.source.push('return "";'):(t+=", buffer = "+(n?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(n?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),i=[this.contextName(0)];this.setupHelperArgs(t,0,i);var n=this.popStack();i.splice(1,0,n),this.push(this.source.functionCall(e,"call",i))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var i=this.topStack();e.splice(1,0,i),this.pushSource(["if (!",this.lastHelper,") { ",i," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,i,n){var r=0;n||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[r++])),this.resolvePath("context",t,r,e,i)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,i){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,i)},resolvePath:function(t,e,i,n,r){var o=this;if(this.options.strict||this.options.assumeObjects)this.push(function(t,e,i,n){var r=e.popStack(),o=0,s=i.length;t&&s--;for(;o<s;o++)r=e.nameLookup(r,i[o],n);return t?[e.aliasable("container.strict"),"(",r,", ",e.quotedString(i[o]),")"]:r}(this.options.strict&&r,this,e,t));else for(var s=e.length;i<s;i++)this.replaceStack(function(r){var s=o.nameLookup(r,e[i],t);return n?[" && ",s]:[" != null ? ",s," : ",r]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var i=this.nameLookup("decorators",e,"decorator"),n=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(i,"",["fn","props","container",n])," || fn;"])},invokeHelper:function(t,e,i){var n=this.popStack(),r=this.setupHelper(t,e),o=i?[r.name," || "]:"",s=["("].concat(o,n);this.options.strict||s.push(" || ",this.aliasable("helpers.helperMissing")),s.push(")"),this.push(this.source.functionCall(s,"call",r.callParams))},invokeKnownHelper:function(t,e){var i=this.setupHelper(t,e);this.push(this.source.functionCall(i.name,"call",i.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var i=this.popStack();this.emptyHash();var n=this.setupHelper(0,t,e),r=["(","(helper = ",this.lastHelper=this.nameLookup("helpers",t,"helper")," || ",i,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",r,n.paramsInit?["),(",n.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",n.callParams)," : helper))"])},invokePartial:function(t,e,i){var n=[],r=this.setupParams(e,1,n);t&&(e=this.popStack(),delete r.name),i&&(r.indent=JSON.stringify(i)),r.helpers="helpers",r.partials="partials",r.decorators="container.decorators",t?n.unshift(e):n.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(r.depths="depths"),r=this.objectLiteral(r),n.push(r),this.push(this.source.functionCall("container.invokePartial","",n))},assignToHash:function(t){var e=this.popStack(),i=void 0,n=void 0,r=void 0;this.trackIds&&(r=this.popStack()),this.stringParams&&(n=this.popStack(),i=this.popStack());var o=this.hash;i&&(o.contexts[t]=i),n&&(o.types[t]=n),r&&(o.ids[t]=r),o.values[t]=e},pushId:function(t,e,i){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(i?" + "+JSON.stringify("."+i):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:c,compileChildren:function(t,e){for(var i=t.children,n=void 0,r=void 0,o=0,s=i.length;o<s;o++){n=i[o],r=new this.compiler;var a=this.matchExistingProgram(n);if(null==a){this.context.programs.push("");var l=this.context.programs.length;n.index=l,n.name="program"+l,this.context.programs[l]=r.compile(n,e,this.context,!this.precompile),this.context.decorators[l]=r.decorators,this.context.environments[l]=n,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams,n.useDepths=this.useDepths,n.useBlockParams=this.useBlockParams}else n.index=a.index,n.name="program"+a.index,this.useDepths=this.useDepths||a.useDepths,this.useBlockParams=this.useBlockParams||a.useBlockParams}},matchExistingProgram:function(t){for(var e=0,i=this.context.environments.length;e<i;e++){var n=this.context.environments[e];if(n&&n.equals(t))return n}},programExpression:function(t){var e=this.environment.children[t],i=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&i.push("blockParams"),this.useDepths&&i.push("depths"),"container.program("+i.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof l||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new l(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],i=void 0,n=void 0,r=void 0;if(!this.isInline())throw new o.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof l)e=["(",i=[s.value]],r=!0;else{n=!0;var a=this.incrStack();e=["((",this.push(a)," = ",s,")"],i=this.topStack()}var c=t.call(this,i);r||this.popStack(),n&&this.stackSlot--,this.push(e.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];if(n instanceof l)this.compileStack.push(n);else{var r=this.incrStack();this.pushSource([r," = ",n,";"]),this.compileStack.push(r)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),i=(e?this.inlineStack:this.compileStack).pop();if(!t&&i instanceof l)return i.value;if(!e){if(!this.stackSlot)throw new o.default("Invalid stack pop");this.stackSlot--}return i},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof l?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):((e=this.aliases[t]=this.source.wrap(t)).aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,i){var n=[];return{params:n,paramsInit:this.setupHelperArgs(e,t,n,i),name:this.nameLookup("helpers",e,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})")].concat(n)}},setupParams:function(t,e,i){var n={},r=[],o=[],s=[],a=!i,l=void 0;a&&(i=[]),n.name=this.quotedString(t),n.hash=this.popStack(),this.trackIds&&(n.hashIds=this.popStack()),this.stringParams&&(n.hashTypes=this.popStack(),n.hashContexts=this.popStack());var c=this.popStack(),h=this.popStack();(h||c)&&(n.fn=h||"container.noop",n.inverse=c||"container.noop");for(var d=e;d--;)l=this.popStack(),i[d]=l,this.trackIds&&(s[d]=this.popStack()),this.stringParams&&(o[d]=this.popStack(),r[d]=this.popStack());return a&&(n.args=this.source.generateArray(i)),this.trackIds&&(n.ids=this.source.generateArray(s)),this.stringParams&&(n.types=this.source.generateArray(o),n.contexts=this.source.generateArray(r)),this.options.data&&(n.data="data"),this.useBlockParams&&(n.blockParams="blockParams"),n},setupHelperArgs:function(t,e,i,n){var r=this.setupParams(t,e,i);return r=this.objectLiteral(r),n?(this.useRegister("options"),i.push("options"),["options=",r]):i?(i.push(r),""):r}},function(){for(var t="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=c.RESERVED_WORDS={},i=0,n=t.length;i<n;i++)e[t[i]]=!0}(),c.isValidJavaScriptVariableName=function(t){return!c.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e.default=c,t.exports=e.default},function(t,e,i){"use strict";e.__esModule=!0;var n=i(5),r=void 0;try{}catch(t){}function o(t,e,i){if(n.isArray(t)){for(var r=[],o=0,s=t.length;o<s;o++)r.push(e.wrap(t[o],i));return r}return"boolean"==typeof t||"number"==typeof t?t+"":t}function s(t){this.srcFile=t,this.source=[]}r||((r=function(t,e,i,n){this.src="",n&&this.add(n)}).prototype={add:function(t){n.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){n.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),s.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add([" ",e,"\n"])}),t},each:function(t){for(var e=0,i=this.source.length;e<i;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new r(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof r?t:(t=o(t,this,e),new r(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,i){return i=this.generateList(i),this.wrap([t,e?"."+e+"(":"(",i,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var i in t)if(t.hasOwnProperty(i)){var n=o(t[i],this);"undefined"!==n&&e.push([this.quotedString(i),":",n])}var r=this.generateList(e);return r.prepend("{"),r.add("}"),r},generateList:function(t){for(var e=this.empty(),i=0,n=t.length;i<n;i++)i&&e.add(","),e.add(o(t[i],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},e.default=s,t.exports=e.default}])}),function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,r=[i(2)],void 0!==(o="function"==typeof(n=function(t){return t})?n.apply(e,r):n)&&(t.exports=o)},function(t,e,i){"use strict";var n,r,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=[i(0),i(10),i(11)],void 0!==(o="function"==typeof(n=function(t,e,i,n){function r(e,i,s){if(!(this instanceof r))return new r(e,i,s);this.el=n,this.events={},this.maskset=n,this.refreshValue=!1,!0!==s&&(t.isPlainObject(e)?i=e:(i=i||{}).alias=e,this.opts=t.extend(!0,{},this.defaults,i),this.noMasksCache=i&&i.definitions!==n,this.userOptions=i||{},this.isRTL=this.opts.numericInput,o(this.opts.alias,i,this.opts))}function o(e,i,s){var a=r.prototype.aliases[e];return a?(a.alias&&o(a.alias,n,s),t.extend(!0,s,a),t.extend(!0,s,i),!0):(null===s.mask&&(s.mask=e),!1)}function a(e,i){function o(e,o,s){var a=!1;if(null!==e&&""!==e||((a=null!==s.regex)?e=(e=s.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(a=!0,e=".*")),1===e.length&&!1===s.greedy&&0!==s.repeat&&(s.placeholder=""),s.repeat>0||"*"===s.repeat||"+"===s.repeat){var l="*"===s.repeat?0:"+"===s.repeat?1:s.repeat;e=s.groupmarker.start+e+s.groupmarker.end+s.quantifiermarker.start+l+","+s.repeat+s.quantifiermarker.end}var c,h=a?"regex_"+s.regex:s.numericInput?e.split("").reverse().join(""):e;return r.prototype.masksCache[h]===n||!0===i?(c={mask:e,maskToken:r.prototype.analyseMask(e,a,s),validPositions:{},_buffer:n,buffer:n,tests:{},metadata:o,maskLength:n},!0!==i&&(r.prototype.masksCache[h]=c,c=t.extend(!0,{},r.prototype.masksCache[h]))):c=t.extend(!0,{},r.prototype.masksCache[h]),c}if(t.isFunction(e.mask)&&(e.mask=e.mask(e)),t.isArray(e.mask)){if(e.mask.length>1){e.keepStatic=null===e.keepStatic||e.keepStatic;var s=e.groupmarker.start;return t.each(e.numericInput?e.mask.reverse():e.mask,function(i,r){s.length>1&&(s+=e.groupmarker.end+e.alternatormarker+e.groupmarker.start),r.mask===n||t.isFunction(r.mask)?s+=r:s+=r.mask}),o(s+=e.groupmarker.end,e.mask,e)}e.mask=e.mask.pop()}return e.mask&&e.mask.mask!==n&&!t.isFunction(e.mask.mask)?o(e.mask.mask,e.mask,e):o(e.mask,e.mask,e)}function l(o,a,c){function f(t,e,i){e=e||0;var r,o,s,a=[],l=0,h=v();do{!0===t&&m().validPositions[l]?(o=(s=m().validPositions[l]).match,r=s.locator.slice(),a.push(!0===i?s.input:!1===i?o.nativeDef:N(l,o))):(o=(s=_(l,r,l-1)).match,r=s.locator.slice(),(!1===c.jitMasking||l<h||"number"==typeof c.jitMasking&&isFinite(c.jitMasking)&&c.jitMasking>l)&&a.push(!1===i?o.nativeDef:N(l,o))),l++}while((V===n||l<V)&&(null!==o.fn||""!==o.def)||e>l);return""===a[a.length-1]&&a.pop(),m().maskLength=l+1,a}function m(){return a}function g(t){var e=m();e.buffer=n,!0!==t&&(e.validPositions={},e.p=0)}function v(t,e,i){var r=-1,o=-1,s=i||m().validPositions;for(var a in t===n&&(t=-1),s){var l=parseInt(a);s[l]&&(e||!0!==s[l].generatedInput)&&(l<=t&&(r=l),l>=t&&(o=l))}return-1!==r&&t-r>1||o<t?r:o}function y(e,i,r,o){var s,a=e,l=t.extend(!0,{},m().validPositions),h=!1;for(m().p=e,s=i-1;s>=a;s--)m().validPositions[s]!==n&&(!0!==r&&(!m().validPositions[s].match.optionality&&function(t){var e=m().validPositions[t];if(e!==n&&null===e.match.fn){var i=m().validPositions[t-1],r=m().validPositions[t+1];return i!==n&&r!==n}return!1}(s)||!1===c.canClearPosition(m(),s,v(),o,c))||delete m().validPositions[s]);for(g(!0),s=a+1;s<=v();){for(;m().validPositions[a]!==n;)a++;if(s<a&&(s=a+1),m().validPositions[s]===n&&M(s))s++;else{var d=_(s);!1===h&&l[a]&&l[a].match.def===d.match.def?(m().validPositions[a]=t.extend(!0,{},l[a]),m().validPositions[a].input=d.input,delete m().validPositions[s],s++):w(a,d.match.def)?!1!==A(a,d.input||N(s),!0)&&(delete m().validPositions[s],s++,h=!0):M(s)||(s++,a--),a++}}g(!0)}function b(t,e){for(var i,r=t,o=v(),s=m().validPositions[o]||k(0)[0],a=s.alternation!==n?s.locator[s.alternation].toString().split(","):[],l=0;l<r.length&&(!((i=r[l]).match&&(c.greedy&&!0!==i.match.optionalQuantifier||(!1===i.match.optionality||!1===i.match.newBlockMarker)&&!0!==i.match.optionalQuantifier)&&(s.alternation===n||s.alternation!==i.alternation||i.locator[s.alternation]!==n&&T(i.locator[s.alternation].toString().split(","),a)))||!0===e&&(null!==i.match.fn||/[0-9a-bA-Z]/.test(i.match.def)));l++);return i}function _(t,e,i){return m().validPositions[t]||b(k(t,e?e.slice():e,i))}function x(t){return m().validPositions[t]?m().validPositions[t]:k(t)[0]}function w(t,e){for(var i=!1,n=k(t),r=0;r<n.length;r++)if(n[r].match&&n[r].match.def===e){i=!0;break}return i}function k(e,i,r){function o(i,r,s,l){function h(s,l,d){function p(e,i){var n=0===t.inArray(e,i.matches);return n||t.each(i.matches,function(t,r){if(!0===r.isQuantifier&&(n=p(e,i.matches[t-1])))return!1}),n}function y(e,i,r){var o,s;if(m().validPositions[e-1]&&r&&m().tests[e])for(var a=m().validPositions[e-1].locator,l=m().tests[e][0].locator,c=0;c<r;c++)if(a[c]!==l[c])return a.slice(r+1);return(m().tests[e]||m().validPositions[e])&&t.each(m().tests[e]||[m().validPositions[e]],function(t,e){var a=r!==n?r:e.alternation,l=e.locator[a]!==n?e.locator[a].toString().indexOf(i):-1;(s===n||l<s)&&-1!==l&&(o=e,s=l)}),o?o.locator.slice((r!==n?r:o.alternation)+1):r!==n?y(e,i):n}if(u>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+m().mask;if(u===e&&s.matches===n)return f.push({match:s,locator:l.reverse(),cd:v}),!0;if(s.matches!==n){if(s.isGroup&&d!==s){if(s=h(i.matches[t.inArray(s,i.matches)+1],l))return!0}else if(s.isOptional){var b=s;if(s=o(s,r,l,d)){if(!p(a=f[f.length-1].match,b))return!0;g=!0,u=e}}else if(s.isAlternator){var _,x=s,w=[],k=f.slice(),C=l.length,S=r.length>0?r.shift():-1;if(-1===S||"string"==typeof S){var D,T=u,A=r.slice(),M=[];if("string"==typeof S)M=S.split(",");else for(D=0;D<x.matches.length;D++)M.push(D);for(var E=0;E<M.length;E++){if(D=parseInt(M[E]),f=[],r=y(u,D,C)||A.slice(),!0!==(s=h(x.matches[D]||i.matches[D],[D].concat(l),d)||s)&&s!==n&&M[M.length-1]<x.matches.length){var P=t.inArray(s,i.matches)+1;i.matches.length>P&&(s=h(i.matches[P],[P].concat(l.slice(1,l.length)),d))&&(M.push(P.toString()),t.each(f,function(t,e){e.alternation=l.length-1}))}_=f.slice(),u=T,f=[];for(var I=0;I<_.length;I++){var O=_[I],N=!1;O.alternation=O.alternation||C;for(var L=0;L<w.length;L++){var j=w[L];if("string"!=typeof S||-1!==t.inArray(O.locator[O.alternation].toString(),M)){if(z=j,(H=O).match.nativeDef===z.match.nativeDef||H.match.def===z.match.nativeDef||H.match.nativeDef===z.match.def){N=!0,O.alternation===j.alternation&&-1===j.locator[j.alternation].toString().indexOf(O.locator[O.alternation])&&(j.locator[j.alternation]=j.locator[j.alternation]+","+O.locator[O.alternation],j.alternation=O.alternation),O.match.nativeDef===j.match.def&&(O.locator[O.alternation]=j.locator[j.alternation],w.splice(w.indexOf(j),1,O));break}if(O.match.def===j.match.def){N=!1;break}if(function(t,i){return null===t.match.fn&&null!==i.match.fn&&i.match.fn.test(t.match.def,m(),e,!1,c,!1)}(O,j)||function(t,i){return null!==t.match.fn&&null!==i.match.fn&&i.match.fn.test(t.match.def.replace(/[\[\]]/g,""),m(),e,!1,c,!1)}(O,j)){O.alternation===j.alternation&&-1===O.locator[O.alternation].toString().indexOf(j.locator[j.alternation].toString().split("")[0])&&(O.na=O.na||O.locator[O.alternation].toString(),-1===O.na.indexOf(O.locator[O.alternation].toString().split("")[0])&&(O.na=O.na+","+O.locator[j.alternation].toString().split("")[0]),N=!0,O.locator[O.alternation]=j.locator[j.alternation].toString().split("")[0]+","+O.locator[O.alternation],w.splice(w.indexOf(j),0,O));break}}}N||w.push(O)}}"string"==typeof S&&(w=t.map(w,function(e,i){if(isFinite(i)){var r=e.alternation,o=e.locator[r].toString().split(",");e.locator[r]=n,e.alternation=n;for(var s=0;s<o.length;s++)-1!==t.inArray(o[s],M)&&(e.locator[r]!==n?(e.locator[r]+=",",e.locator[r]+=o[s]):e.locator[r]=parseInt(o[s]),e.alternation=r);if(e.locator[r]!==n)return e}})),f=k.concat(w),u=e,g=f.length>0,s=w.length>0,r=A.slice()}else s=h(x.matches[S]||i.matches[S],[S].concat(l),d);if(s)return!0}else if(s.isQuantifier&&d!==i.matches[t.inArray(s,i.matches)-1])for(var F=s,$=r.length>0?r.shift():0;$<(isNaN(F.quantifier.max)?$+1:F.quantifier.max)&&u<=e;$++){var R=i.matches[t.inArray(F,i.matches)-1];if(s=h(R,[$].concat(l),R)){if((a=f[f.length-1].match).optionalQuantifier=$>F.quantifier.min-1,p(a,R)){if($>F.quantifier.min-1){g=!0,u=e;break}return!0}return!0}}else if(s=o(s,r,l,d))return!0}else u++;var H,z}for(var d=r.length>0?r.shift():0;d<i.matches.length;d++)if(!0!==i.matches[d].isQuantifier){var p=h(i.matches[d],[d].concat(s),l);if(p&&u===e)return p;if(u>e)break}}function s(t){if(c.keepStatic&&e>0&&t.length>1+(""===t[t.length-1].match.def?1:0)&&!0!==t[0].match.optionality&&!0!==t[0].match.optionalQuantifier&&null===t[0].match.fn&&!/[0-9a-bA-Z]/.test(t[0].match.def)){if(m().validPositions[e-1]===n)return[b(t)];if(m().validPositions[e-1].alternation===t[0].alternation)return[b(t)];if(m().validPositions[e-1])return[b(t)]}return t}var a,l,h,d=m().maskToken,u=i?r:0,p=i?i.slice():[0],f=[],g=!1,v=i?i.join(""):"";if(e>-1){if(i===n){for(var y,_=e-1;(y=m().validPositions[_]||m().tests[_])===n&&_>-1;)_--;y!==n&&_>-1&&(l=y,h=[],t.isArray(l)||(l=[l]),l.length>0&&(l[0].alternation===n?0===(h=b(l.slice()).locator.slice()).length&&(h=l[0].locator.slice()):t.each(l,function(t,e){if(""!==e.def)if(0===h.length)h=e.locator.slice();else for(var i=0;i<h.length;i++)e.locator[i]&&-1===h[i].toString().indexOf(e.locator[i])&&(h[i]+=","+e.locator[i])})),v=(p=h).join(""),u=_)}if(m().tests[e]&&m().tests[e][0].cd===v)return s(m().tests[e]);for(var x=p.shift();x<d.length&&!(o(d[x],p,[x])&&u===e||u>e);x++);}return(0===f.length||g)&&f.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:v}),i!==n&&m().tests[e]?s(t.extend(!0,[],f)):(m().tests[e]=t.extend(!0,[],f),s(m().tests[e]))}function C(){return m()._buffer===n&&(m()._buffer=f(!1,1),m().buffer===n&&(m().buffer=m()._buffer.slice())),m()._buffer}function S(t){return m().buffer!==n&&!0!==t||(m().buffer=f(!0,v(),!0)),m().buffer}function D(t,e,i){var r,o;if(!0===t)g(),t=0,e=i.length;else for(r=t;r<e;r++)delete m().validPositions[r];for(o=t,r=t;r<e;r++)if(g(!0),i[r]!==c.skipOptionalPartCharacter){var s=A(o,i[r],!0,!0);!1!==s&&(g(!0),o=s.caret!==n?s.caret:s.pos+1)}}function T(e,i,r){for(var o,s=c.greedy?i:i.slice(0,1),a=!1,l=r!==n?r.split(","):[],h=0;h<l.length;h++)-1!==(o=e.indexOf(l[h]))&&e.splice(o,1);for(var d=0;d<e.length;d++)if(-1!==t.inArray(e[d],s)){a=!0;break}return a}function A(e,i,o,s,a,l){function h(t){var e=Z?t.begin-t.end>1||t.begin-t.end==1:t.end-t.begin>1||t.end-t.begin==1;return e&&0===t.begin&&t.end===m().maskLength?"full":e}function d(i,o,a){var l=!1;return t.each(k(i),function(d,p){for(var f=p.match,b=o?1:0,_="",x=f.cardinality;x>b;x--)_+=I(i-(x-1));if(o&&(_+=o),S(!0),!1!==(l=null!=f.fn?f.fn.test(_,m(),i,a,c,h(e)):(o===f.def||o===c.skipOptionalPartCharacter)&&""!==f.def&&{c:N(i,f,!0)||f.def,pos:i})){var w=l.c!==n?l.c:o;w=w===c.skipOptionalPartCharacter&&null===f.fn?N(i,f,!0)||f.def:w;var k=i,C=S();if(l.remove!==n&&(t.isArray(l.remove)||(l.remove=[l.remove]),t.each(l.remove.sort(function(t,e){return e-t}),function(t,e){y(e,e+1,!0)})),l.insert!==n&&(t.isArray(l.insert)||(l.insert=[l.insert]),t.each(l.insert.sort(function(t,e){return t-e}),function(t,e){A(e.pos,e.c,!0,s)})),l.refreshFromBuffer){var T=l.refreshFromBuffer;if(D(!0===T?T:T.start,T.end,C),l.pos===n&&l.c===n)return l.pos=v(),!1;if((k=l.pos!==n?l.pos:i)!==i)return l=t.extend(l,A(k,w,!0,s)),!1}else if(!0!==l&&l.pos!==n&&l.pos!==i&&(k=l.pos,D(i,k,S().slice()),k!==i))return l=t.extend(l,A(k,w,!0)),!1;return(!0===l||l.pos!==n||l.c!==n)&&(d>0&&g(!0),u(k,t.extend({},p,{input:function(e,i,n){switch(c.casing||i.casing){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break;case"title":var o=m().validPositions[n-1];e=0===n||o&&o.input===String.fromCharCode(r.keyCode.SPACE)?e.toUpperCase():e.toLowerCase();break;default:if(t.isFunction(c.casing)){var s=Array.prototype.slice.call(arguments);s.push(m().validPositions),e=c.casing.apply(this,s)}}return e}(w,f,k)}),s,h(e))||(l=!1),!1)}}),l}function u(e,i,r,o){if(o||c.insertMode&&m().validPositions[e]!==n&&r===n){var s,a=t.extend(!0,{},m().validPositions),l=v(n,!0);for(s=e;s<=l;s++)delete m().validPositions[s];m().validPositions[e]=t.extend(!0,{},i);var h,d=!0,u=m().validPositions,f=!1,y=m().maskLength;for(s=h=e;s<=l;s++){var b=a[s];if(b!==n)for(var _=h;_<m().maskLength&&(null===b.match.fn&&u[s]&&(!0===u[s].match.optionalQuantifier||!0===u[s].match.optionality)||null!=b.match.fn);){if(_++,!1===f&&a[_]&&a[_].match.def===b.match.def)m().validPositions[_]=t.extend(!0,{},a[_]),m().validPositions[_].input=b.input,p(_),h=_,d=!0;else if(w(_,b.match.def)){var x=A(_,b.input,!0,!0);d=!1!==x,h=x.caret||x.insert?v():_,f=!0}else if(!(d=!0===b.generatedInput)&&_>=m().maskLength-1)break;if(m().maskLength<y&&(m().maskLength=y),d)break}if(!d)break}if(!d)return m().validPositions=t.extend(!0,{},a),g(!0),!1}else m().validPositions[e]=t.extend(!0,{},i);return g(!0),!0}function p(e){for(var i=e-1;i>-1&&!m().validPositions[i];i--);var r,o;for(i++;i<e;i++)m().validPositions[i]===n&&(!1===c.jitMasking||c.jitMasking>i)&&(""===(o=k(i,_(i-1).locator,i-1).slice())[o.length-1].match.def&&o.pop(),(r=b(o))&&(r.match.def===c.radixPointDefinitionSymbol||!M(i,!0)||t.inArray(c.radixPoint,S())<i&&r.match.fn&&r.match.fn.test(N(i),m(),i,!1,c))&&!1!==(x=d(i,N(i,r.match,!0)||(null==r.match.fn?r.match.def:""!==N(i)?N(i):S()[i]),!0))&&(m().validPositions[x.pos||i].generatedInput=!0))}o=!0===o;var f=e;e.begin!==n&&(f=Z&&!h(e)?e.end:e.begin);var x=!0,C=t.extend(!0,{},m().validPositions);if(t.isFunction(c.preValidation)&&!o&&!0!==s&&!0!==l&&(x=c.preValidation(S(),f,i,h(e),c)),!0===x){if(p(f),h(e)&&(z(n,r.keyCode.DELETE,e,!0,!0),f=m().p),f<m().maskLength&&(V===n||f<V)&&(x=d(f,i,o),(!o||!0===s)&&!1===x&&!0!==l)){var P=m().validPositions[f];if(!P||null!==P.match.fn||P.match.def!==i&&i!==c.skipOptionalPartCharacter){if((c.insertMode||m().validPositions[E(f)]===n)&&!M(f,!0))for(var O=f+1,L=E(f);O<=L;O++)if(!1!==(x=d(O,i,o))){!function(e,i){var r=m().validPositions[i];if(r)for(var o=r.locator,s=o.length,a=e;a<i;a++)if(m().validPositions[a]===n&&!M(a,!0)){var l=k(a).slice(),c=b(l,!0),h=-1;""===l[l.length-1].match.def&&l.pop(),t.each(l,function(t,e){for(var i=0;i<s;i++){if(e.locator[i]===n||!T(e.locator[i].toString().split(","),o[i].toString().split(","),e.na)){var r=o[i],a=c.locator[i],l=e.locator[i];r-a>Math.abs(r-l)&&(c=e);break}h<i&&(h=i,c=e)}}),(c=t.extend({},c,{input:N(a,c.match,!0)||c.match.def})).generatedInput=!0,u(a,c,!0),m().validPositions[i]=n,d(i,r.input,!0)}}(f,x.pos!==n?x.pos:O),f=O;break}}else x={caret:E(f)}}!1===x&&c.keepStatic&&!o&&!0!==a&&(x=function(e,i,r){var o,a,l,h,d,u,p,f,y=t.extend(!0,{},m().validPositions),b=!1,_=v();for(h=m().validPositions[_];_>=0;_--)if((l=m().validPositions[_])&&l.alternation!==n){if(o=_,a=m().validPositions[o].alternation,h.locator[l.alternation]!==l.locator[l.alternation])break;h=l}if(a!==n){f=parseInt(o);var x=h.locator[h.alternation||a]!==n?h.locator[h.alternation||a]:p[0];x.length>0&&(x=x.split(",")[0]);var w=m().validPositions[f],C=m().validPositions[f-1];t.each(k(f,C?C.locator:n,f-1),function(o,l){p=l.locator[a]?l.locator[a].toString().split(","):[];for(var h=0;h<p.length;h++){var _=[],k=0,C=0,S=!1;if(x<p[h]&&(l.na===n||-1===t.inArray(p[h],l.na.split(","))||-1===t.inArray(x.toString(),p))){m().validPositions[f]=t.extend(!0,{},l);var D=m().validPositions[f].locator;for(m().validPositions[f].locator[a]=parseInt(p[h]),null==l.match.fn?(w.input!==l.match.def&&(S=!0,!0!==w.generatedInput&&_.push(w.input)),C++,m().validPositions[f].generatedInput=!/[0-9a-bA-Z]/.test(l.match.def),m().validPositions[f].input=l.match.def):m().validPositions[f].input=w.input,d=f+1;d<v(n,!0)+1;d++)(u=m().validPositions[d])&&!0!==u.generatedInput&&/[0-9a-bA-Z]/.test(u.input)?_.push(u.input):d<e&&k++,delete m().validPositions[d];for(S&&_[0]===l.match.def&&_.shift(),g(!0),b=!0;_.length>0;){var T=_.shift();if(T!==c.skipOptionalPartCharacter&&!(b=A(v(n,!0)+1,T,!1,s,!0)))break}if(b){m().validPositions[f].locator=D;var M=v(e)+1;for(d=f+1;d<v()+1;d++)((u=m().validPositions[d])===n||null==u.match.fn)&&d<e+(C-k)&&C++;b=A((e+=C-k)>M?M:e,i,r,s,!0)}if(b)return!1;g(),m().validPositions=t.extend(!0,{},y)}}})}return b}(f,i,o)),!0===x&&(x={pos:f})}if(t.isFunction(c.postValidation)&&!1!==x&&!o&&!0!==s&&!0!==l){var j=c.postValidation(S(!0),x,c);if(j.refreshFromBuffer&&j.buffer){var F=j.refreshFromBuffer;D(!0===F?F:F.start,F.end,j.buffer)}x=!0===j?x:j}return x&&x.pos===n&&(x.pos=f),!1!==x&&!0!==l||(g(!0),m().validPositions=t.extend(!0,{},C)),x}function M(t,e){var i=_(t).match;if(""===i.def&&(i=x(t).match),null!=i.fn)return i.fn;if(!0!==e&&t>-1){var n=k(t);return n.length>1+(""===n[n.length-1].match.def?1:0)}return!1}function E(t,e){var i=m().maskLength;if(t>=i)return i;var n=t;for(k(i+1).length>1&&(f(!0,i+1,!0),i=m().maskLength);++n<i&&(!0===e&&(!0!==x(n).match.newBlockMarker||!M(n))||!0!==e&&!M(n)););return n}function P(t,e){var i,n=t;if(n<=0)return 0;for(;--n>0&&(!0===e&&!0!==x(n).match.newBlockMarker||!0!==e&&!M(n)&&((i=k(n)).length<2||2===i.length&&""===i[1].match.def)););return n}function I(t){return m().validPositions[t]===n?N(t):m().validPositions[t].input}function O(e,i,r,o,s){if(o&&t.isFunction(c.onBeforeWrite)){var a=c.onBeforeWrite.call(K,o,i,r,c);if(a){if(a.refreshFromBuffer){var l=a.refreshFromBuffer;D(!0===l?l:l.start,l.end,a.buffer||i),i=S(!0)}r!==n&&(r=a.caret!==n?a.caret:r)}}e!==n&&(e.inputmask._valueSet(i.join("")),r===n||o!==n&&"blur"===o.type?U(e,r,0===i.length):p&&o&&"input"===o.type?setTimeout(function(){F(e,r)},0):F(e,r),!0===s&&(J=!0,t(e).trigger("input")))}function N(e,i,r){if((i=i||x(e).match).placeholder!==n||!0===r)return t.isFunction(i.placeholder)?i.placeholder(c):i.placeholder;if(null===i.fn){if(e>-1&&m().validPositions[e]===n){var o,s=k(e),a=[];if(s.length>1+(""===s[s.length-1].match.def?1:0))for(var l=0;l<s.length;l++)if(!0!==s[l].match.optionality&&!0!==s[l].match.optionalQuantifier&&(null===s[l].match.fn||o===n||!1!==s[l].match.fn.test(o.match.def,m(),e,!0,c))&&(a.push(s[l]),null===s[l].match.fn&&(o=s[l]),a.length>1&&/[0-9a-bA-Z]/.test(a[0].match.def)))return c.placeholder.charAt(e%c.placeholder.length)}return i.def}return c.placeholder.charAt(e%c.placeholder.length)}function L(e,o,s,a,l){var h=a.slice(),d="",u=-1,p=n;if(g(),s||!0===c.autoUnmask)u=E(u);else{var f=C().slice(0,E(-1)).join(""),y=h.join("").match(new RegExp("^"+r.escapeRegex(f),"g"));y&&y.length>0&&(h.splice(0,y.length*f.length),u=E(u))}if(-1===u?(m().p=E(u),u=0):m().p=u,t.each(h,function(i,r){if(r!==n)if(m().validPositions[i]===n&&h[i]===N(i)&&M(i,!0)&&!1===A(i,h[i],!0,n,n,!0))m().p++;else{var o=new t.Event("_checkval");o.which=r.charCodeAt(0),d+=r;var a=v(n,!0),l=m().validPositions[a],f=_(a+1,l?l.locator.slice():n,a);if(!function(t,e){return-1!==C().slice(t,E(t)).join("").indexOf(e)&&!M(t)&&x(t).match.nativeDef===e.charAt(e.length-1)}(u,d)||s||c.autoUnmask){var y=s?i:null==f.match.fn&&f.match.optionality&&a+1<m().p?a+1:m().p;p=nt.keypressEvent.call(e,o,!0,!1,s,y),u=y+1,d=""}else p=nt.keypressEvent.call(e,o,!0,!1,!0,a+1);if(!1!==p&&!s&&t.isFunction(c.onBeforeWrite)){var b=p;if(p=c.onBeforeWrite.call(K,o,S(),p.forwardPosition,c),(p=t.extend(b,p))&&p.refreshFromBuffer){var w=p.refreshFromBuffer;D(!0===w?w:w.start,w.end,p.buffer),g(!0),p.caret&&(m().p=p.caret,p.forwardPosition=p.caret)}}}}),o){var b=n;i.activeElement===e&&p&&(b=c.numericInput?P(p.forwardPosition):p.forwardPosition),O(e,S(),b,l||new t.Event("checkval"),l&&"input"===l.type)}}function j(e){if(e){if(e.inputmask===n)return e.value;e.inputmask&&e.inputmask.refreshValue&&nt.setValueEvent.call(e)}var i=[],r=m().validPositions;for(var o in r)r[o].match&&null!=r[o].match.fn&&i.push(r[o].input);var s=0===i.length?"":(Z?i.reverse():i).join("");if(t.isFunction(c.onUnMask)){var a=(Z?S().slice().reverse():S()).join("");s=c.onUnMask.call(K,a,s,c)}return s}function F(t,r,o,s){function a(t){return!0===s||!Z||"number"!=typeof t||c.greedy&&""===c.placeholder||(t=S().join("").length-t),t}var l;if(r===n)return t.setSelectionRange?(r=t.selectionStart,o=t.selectionEnd):e.getSelection?(l=e.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==t&&l.commonAncestorContainer!==t||(r=l.startOffset,o=l.endOffset):i.selection&&i.selection.createRange&&(o=(r=0-(l=i.selection.createRange()).duplicate().moveStart("character",-t.inputmask._valueGet().length))+l.text.length),{begin:a(r),end:a(o)};if(r.begin!==n&&(o=r.end,r=r.begin),"number"==typeof r){r=a(r),o="number"==typeof(o=a(o))?o:r;var d=parseInt(((t.ownerDocument.defaultView||e).getComputedStyle?(t.ownerDocument.defaultView||e).getComputedStyle(t,null):t.currentStyle).fontSize)*o;if(t.scrollLeft=d>t.scrollWidth?d:0,h||!1!==c.insertMode||r!==o||o++,t.setSelectionRange)t.selectionStart=r,t.selectionEnd=o;else if(e.getSelection){if(l=i.createRange(),t.firstChild===n||null===t.firstChild){var u=i.createTextNode("");t.appendChild(u)}l.setStart(t.firstChild,r<t.inputmask._valueGet().length?r:t.inputmask._valueGet().length),l.setEnd(t.firstChild,o<t.inputmask._valueGet().length?o:t.inputmask._valueGet().length),l.collapse(!0);var p=e.getSelection();p.removeAllRanges(),p.addRange(l)}else t.createTextRange&&((l=t.createTextRange()).collapse(!0),l.moveEnd("character",o),l.moveStart("character",r),l.select());U(t,{begin:r,end:o})}}function $(e){var i,r,o=S(),s=o.length,a=v(),l={},c=m().validPositions[a],h=c!==n?c.locator.slice():n;for(i=a+1;i<o.length;i++)h=(r=_(i,h,i-1)).locator.slice(),l[i]=t.extend(!0,{},r);var d=c&&c.alternation!==n?c.locator[c.alternation]:n;for(i=s-1;i>a&&((r=l[i]).match.optionality||r.match.optionalQuantifier&&r.match.newBlockMarker||d&&(d!==l[i].locator[c.alternation]&&null!=r.match.fn||null===r.match.fn&&r.locator[c.alternation]&&T(r.locator[c.alternation].toString().split(","),d.toString().split(","))&&""!==k(i)[0].def))&&o[i]===N(i,r.match);i--)s--;return e?{l:s,def:l[s]?l[s].match:n}:s}function R(t){for(var e,i=$(),r=t.length,o=m().validPositions[v()];i<r&&!M(i,!0)&&(e=o!==n?_(i,o.locator.slice(""),o):x(i))&&!0!==e.match.optionality&&(!0!==e.match.optionalQuantifier&&!0!==e.match.newBlockMarker||i+1===r&&""===(o!==n?_(i+1,o.locator.slice(""),o):x(i+1)).match.def);)i++;for(;(e=m().validPositions[i-1])&&e&&e.match.optionality&&e.input===c.skipOptionalPartCharacter;)i--;return t.splice(i),t}function H(e){if(t.isFunction(c.isComplete))return c.isComplete(e,c);if("*"===c.repeat)return n;var i=!1,r=$(!0),o=P(r.l);if(r.def===n||r.def.newBlockMarker||r.def.optionality||r.def.optionalQuantifier){i=!0;for(var s=0;s<=o;s++){var a=_(s).match;if(null!==a.fn&&m().validPositions[s]===n&&!0!==a.optionality&&!0!==a.optionalQuantifier||null===a.fn&&e[s]!==N(s,a)){i=!1;break}}}return i}function z(e,i,o,s,a){if((c.numericInput||Z)&&(i===r.keyCode.BACKSPACE?i=r.keyCode.DELETE:i===r.keyCode.DELETE&&(i=r.keyCode.BACKSPACE),Z)){var l=o.end;o.end=o.begin,o.begin=l}i===r.keyCode.BACKSPACE&&(o.end-o.begin<1||!1===c.insertMode)?(o.begin=P(o.begin),m().validPositions[o.begin]!==n&&m().validPositions[o.begin].input===c.groupSeparator&&o.begin--):i===r.keyCode.DELETE&&o.begin===o.end&&(o.end=M(o.end,!0)&&m().validPositions[o.end]&&m().validPositions[o.end].input!==c.radixPoint?o.end+1:E(o.end)+1,m().validPositions[o.begin]!==n&&m().validPositions[o.begin].input===c.groupSeparator&&o.end++),y(o.begin,o.end,!1,s),!0!==s&&function(){if(c.keepStatic){for(var i=[],r=v(-1,!0),o=t.extend(!0,{},m().validPositions),s=m().validPositions[r];r>=0;r--){var a=m().validPositions[r];if(a){if(!0!==a.generatedInput&&/[0-9a-bA-Z]/.test(a.input)&&i.push(a.input),delete m().validPositions[r],a.alternation!==n&&a.locator[a.alternation]!==s.locator[a.alternation])break;s=a}}if(r>-1)for(m().p=E(v(-1,!0));i.length>0;){var l=new t.Event("keypress");l.which=i.pop().charCodeAt(0),nt.keypressEvent.call(e,l,!0,!1,!1,m().p)}else m().validPositions=t.extend(!0,{},o)}}();var h=v(o.begin,!0);if(h<o.begin)m().p=E(h);else if(!0!==s&&(m().p=o.begin,!0!==a))for(;m().p<h&&m().validPositions[m().p]===n;)m().p++}function B(n){var r=(n.ownerDocument.defaultView||e).getComputedStyle(n,null),o=i.createElement("div");o.style.width=r.width,o.style.textAlign=r.textAlign,(q=i.createElement("div")).className="im-colormask",n.parentNode.insertBefore(q,n),n.parentNode.removeChild(n),q.appendChild(o),q.appendChild(n),n.style.left=o.offsetLeft+"px",t(n).on("click",function(t){return F(n,function(t){var e,o=i.createElement("span");for(var s in r)isNaN(s)&&-1!==s.indexOf("font")&&(o.style[s]=r[s]);o.style.textTransform=r.textTransform,o.style.letterSpacing=r.letterSpacing,o.style.position="absolute",o.style.height="auto",o.style.width="auto",o.style.visibility="hidden",o.style.whiteSpace="nowrap",i.body.appendChild(o);var a,l=n.inputmask._valueGet(),c=0;for(e=0,a=l.length;e<=a;e++){if(o.innerHTML+=l.charAt(e)||"_",o.offsetWidth>=t){var h=t-c,d=o.offsetWidth-t;o.innerHTML=l.charAt(e),e=(h-=o.offsetWidth/3)<d?e-1:e;break}c=o.offsetWidth}return i.body.removeChild(o),e}(t.clientX)),nt.clickEvent.call(n,[t])}),t(n).on("keydown",function(t){t.shiftKey||!1===c.insertMode||setTimeout(function(){U(n)},0)})}function U(t,e,r){function o(){u||null!==a.fn&&l.input!==n?u&&(null!==a.fn&&l.input!==n||""===a.def)&&(u=!1,d+="</span>"):(u=!0,d+="<span class='im-static'>")}function s(n){!0!==n&&p!==e.begin||i.activeElement!==t||(d+="<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>")}var a,l,h,d="",u=!1,p=0;if(q!==n){var f=S();if(e===n?e=F(t):e.begin===n&&(e={begin:e,end:e}),!0!==r){var g=v();do{s(),m().validPositions[p]?(l=m().validPositions[p],a=l.match,h=l.locator.slice(),o(),d+=f[p]):(l=_(p,h,p-1),a=l.match,h=l.locator.slice(),(!1===c.jitMasking||p<g||"number"==typeof c.jitMasking&&isFinite(c.jitMasking)&&c.jitMasking>p)&&(o(),d+=N(p,a))),p++}while((V===n||p<V)&&(null!==a.fn||""!==a.def)||g>p||u);-1===d.indexOf("im-caret")&&s(!0),u&&o()}var y=q.getElementsByTagName("div")[0];y.innerHTML=d,t.inputmask.positionColorMask(t,y)}}a=a||this.maskset,c=c||this.opts;var W,Y,V,q,G,K=this,X=this.el,Z=this.isRTL,Q=!1,J=!1,tt=!1,et=!1,it={on:function(e,i,o){var s=function(e){if(this.inputmask===n&&"FORM"!==this.nodeName){var i=t.data(this,"_inputmask_opts");i?new r(i).mask(this):it.off(this)}else{if("setvalue"===e.type||"FORM"===this.nodeName||!(this.disabled||this.readOnly&&!("keydown"===e.type&&e.ctrlKey&&67===e.keyCode||!1===c.tabThrough&&e.keyCode===r.keyCode.TAB))){switch(e.type){case"input":if(!0===J)return J=!1,e.preventDefault();break;case"keydown":Q=!1,J=!1;break;case"keypress":if(!0===Q)return e.preventDefault();Q=!0;break;case"click":if(d||u){var s=this,a=arguments;return setTimeout(function(){o.apply(s,a)},0),!1}}var l=o.apply(this,arguments);return!1===l&&(e.preventDefault(),e.stopPropagation()),l}e.preventDefault()}};e.inputmask.events[i]=e.inputmask.events[i]||[],e.inputmask.events[i].push(s),-1!==t.inArray(i,["submit","reset"])?null!==e.form&&t(e.form).on(i,s):t(e).on(i,s)},off:function(e,i){var n;e.inputmask&&e.inputmask.events&&(i?(n=[])[i]=e.inputmask.events[i]:n=e.inputmask.events,t.each(n,function(i,n){for(;n.length>0;){var r=n.pop();-1!==t.inArray(i,["submit","reset"])?null!==e.form&&t(e.form).off(i,r):t(e).off(i,r)}delete e.inputmask.events[i]}))}},nt={keydownEvent:function(e){var n,o,s=this,a=t(s),l=e.keyCode,h=F(s);if(l===r.keyCode.BACKSPACE||l===r.keyCode.DELETE||u&&l===r.keyCode.BACKSPACE_SAFARI||e.ctrlKey&&l===r.keyCode.X&&(n=i.createElement("input"),(o="oncut"in n)||(n.setAttribute("oncut","return;"),o="function"==typeof n.oncut),n=null,!o))e.preventDefault(),z(s,l,h),O(s,S(!0),m().p,e,s.inputmask._valueGet()!==S().join("")),s.inputmask._valueGet()===C().join("")?a.trigger("cleared"):!0===H(S())&&a.trigger("complete");else if(l===r.keyCode.END||l===r.keyCode.PAGE_DOWN){e.preventDefault();var d=E(v());c.insertMode||d!==m().maskLength||e.shiftKey||d--,F(s,e.shiftKey?h.begin:d,d,!0)}else l===r.keyCode.HOME&&!e.shiftKey||l===r.keyCode.PAGE_UP?(e.preventDefault(),F(s,0,e.shiftKey?h.begin:0,!0)):(c.undoOnEscape&&l===r.keyCode.ESCAPE||90===l&&e.ctrlKey)&&!0!==e.altKey?(L(s,!0,!1,W.split("")),a.trigger("click")):l!==r.keyCode.INSERT||e.shiftKey||e.ctrlKey?!0===c.tabThrough&&l===r.keyCode.TAB?(!0===e.shiftKey?(null===x(h.begin).match.fn&&(h.begin=E(h.begin)),h.end=P(h.begin,!0),h.begin=P(h.end,!0)):(h.begin=E(h.begin,!0),h.end=E(h.begin,!0),h.end<m().maskLength&&h.end--),h.begin<m().maskLength&&(e.preventDefault(),F(s,h.begin,h.end))):e.shiftKey||!1===c.insertMode&&(l===r.keyCode.RIGHT?setTimeout(function(){var t=F(s);F(s,t.begin)},0):l===r.keyCode.LEFT&&setTimeout(function(){var t=F(s);F(s,Z?t.begin+1:t.begin-1)},0)):(c.insertMode=!c.insertMode,F(s,c.insertMode||h.begin!==m().maskLength?h.begin:h.begin-1));c.onKeyDown.call(this,e,S(),F(s).begin,c),tt=-1!==t.inArray(l,c.ignorables)},keypressEvent:function(e,i,o,s,a){var l=this,h=t(l),d=e.which||e.charCode||e.keyCode;if(!(!0===i||e.ctrlKey&&e.altKey)&&(e.ctrlKey||e.metaKey||tt))return d===r.keyCode.ENTER&&W!==S().join("")&&(W=S().join(""),setTimeout(function(){h.trigger("change")},0)),!0;if(d){46===d&&!1===e.shiftKey&&""!==c.radixPoint&&(d=c.radixPoint.charCodeAt(0));var u,p=i?{begin:a,end:a}:F(l),f=String.fromCharCode(d);m().writeOutBuffer=!0;var v=A(p,f,s);if(!1!==v&&(g(!0),u=v.caret!==n?v.caret:i?v.pos+1:E(v.pos),m().p=u),!1!==o&&(setTimeout(function(){c.onKeyValidation.call(l,d,v,c)},0),m().writeOutBuffer&&!1!==v)){var y=S();O(l,y,c.numericInput&&v.caret===n?P(u):u,e,!0!==i),!0!==i&&setTimeout(function(){!0===H(y)&&h.trigger("complete")},0)}if(e.preventDefault(),i)return!1!==v&&(v.forwardPosition=u),v}},pasteEvent:function(i){var n,r=i.originalEvent||i,o=t(this),s=this.inputmask._valueGet(!0),a=F(this);Z&&(n=a.end,a.end=a.begin,a.begin=n);var l=s.substr(0,a.begin),h=s.substr(a.end,s.length);if(l===(Z?C().reverse():C()).slice(0,a.begin).join("")&&(l=""),h===(Z?C().reverse():C()).slice(a.end).join("")&&(h=""),Z&&(n=l,l=h,h=n),e.clipboardData&&e.clipboardData.getData)s=l+e.clipboardData.getData("Text")+h;else{if(!r.clipboardData||!r.clipboardData.getData)return!0;s=l+r.clipboardData.getData("text/plain")+h}var d=s;if(t.isFunction(c.onBeforePaste)){if(!1===(d=c.onBeforePaste.call(K,s,c)))return i.preventDefault();d||(d=s)}return L(this,!1,!1,Z?d.split("").reverse():d.toString().split("")),O(this,S(),E(v()),i,W!==S().join("")),!0===H(S())&&o.trigger("complete"),i.preventDefault()},inputFallBackEvent:function(e){var i=this,n=i.inputmask._valueGet();if(S().join("")!==n){var o=F(i);if(!1===function(e,i,n){if("."===i.charAt(n.begin-1)&&""!==c.radixPoint&&((i=i.split(""))[n.begin-1]=c.radixPoint.charAt(0),i=i.join("")),i.charAt(n.begin-1)===c.radixPoint&&i.length>S().length){var r=new t.Event("keypress");return r.which=c.radixPoint.charCodeAt(0),nt.keypressEvent.call(e,r,!0,!0,!1,n.begin-1),!1}}(i,n,o))return!1;if(n=n.replace(new RegExp("("+r.escapeRegex(C().join(""))+")*"),""),!1===function(e,i,n){if(d){var r=i.replace(S().join(""),"");if(1===r.length){var o=new t.Event("keypress");return o.which=r.charCodeAt(0),nt.keypressEvent.call(e,o,!0,!0,!1,m().validPositions[n.begin-1]?n.begin:n.begin-1),!1}}}(i,n,o))return!1;o.begin>n.length&&(F(i,n.length),o=F(i));var s=S().join(""),a=n.substr(0,o.begin),l=n.substr(o.begin),h=s.substr(0,o.begin),u=s.substr(o.begin),p=o,f="",g=!1;if(a!==h){p.begin=0;for(var v=(g=a.length>=h.length)?a.length:h.length,y=0;a.charAt(y)===h.charAt(y)&&y<v;y++)p.begin++;g&&(f+=a.slice(p.begin,p.end))}l!==u&&(l.length>u.length?g&&(p.end=p.begin):l.length<u.length?p.end+=u.length-l.length:l.charAt(0)!==u.charAt(0)&&p.end++),O(i,S(),p),f.length>0?t.each(f.split(""),function(e,n){var r=new t.Event("keypress");r.which=n.charCodeAt(0),tt=!1,nt.keypressEvent.call(i,r)}):(p.begin===p.end-1&&F(i,P(p.begin+1),p.end),e.keyCode=r.keyCode.DELETE,nt.keydownEvent.call(i,e)),e.preventDefault()}},setValueEvent:function(e){this.inputmask.refreshValue=!1;var i=this.inputmask._valueGet(!0);t.isFunction(c.onBeforeMask)&&(i=c.onBeforeMask.call(K,i,c)||i),i=i.split(""),L(this,!0,!1,Z?i.reverse():i),W=S().join(""),(c.clearMaskOnLostFocus||c.clearIncomplete)&&this.inputmask._valueGet()===C().join("")&&this.inputmask._valueSet("")},focusEvent:function(t){var e=this.inputmask._valueGet();c.showMaskOnFocus&&(!c.showMaskOnHover||c.showMaskOnHover&&""===e)&&(this.inputmask._valueGet()!==S().join("")?O(this,S(),E(v())):!1===et&&F(this,E(v()))),!0===c.positionCaretOnTab&&!1===et&&""!==e&&(O(this,S(),F(this)),nt.clickEvent.apply(this,[t,!0])),W=S().join("")},mouseleaveEvent:function(t){if(et=!1,c.clearMaskOnLostFocus&&i.activeElement!==this){var e=S().slice(),n=this.inputmask._valueGet();n!==this.getAttribute("placeholder")&&""!==n&&(-1===v()&&n===C().join("")?e=[]:R(e),O(this,e))}},clickEvent:function(e,r){var o=this;setTimeout(function(){if(i.activeElement===o){var e=F(o);if(r&&(Z?e.end=e.begin:e.begin=e.end),e.begin===e.end)switch(c.positionCaretOnClick){case"none":break;case"radixFocus":if(function(e){if(""!==c.radixPoint){var i=m().validPositions;if(i[e]===n||i[e].input===N(e)){if(e<E(-1))return!0;var r=t.inArray(c.radixPoint,S());if(-1!==r){for(var o in i)if(r<o&&i[o].input!==N(o))return!1;return!0}}}return!1}(e.begin)){var s=S().join("").indexOf(c.radixPoint);F(o,c.numericInput?E(s):s);break}default:var a=e.begin,l=v(a,!0),h=E(l);if(a<h)F(o,M(a,!0)||M(a-1,!0)?a:E(a));else{var d=m().validPositions[l],u=_(h,d?d.match.locator:n,d),p=N(h,u.match);if(""!==p&&S()[h]!==p&&!0!==u.match.optionalQuantifier&&!0!==u.match.newBlockMarker||!M(h,!0)&&u.match.def===p){var f=E(h);(a>=f||a===h)&&(h=f)}F(o,h)}}}},0)},dblclickEvent:function(t){var e=this;setTimeout(function(){F(e,0,E(v()))},0)},cutEvent:function(n){var o=t(this),s=F(this),a=n.originalEvent||n,l=e.clipboardData||a.clipboardData,c=Z?S().slice(s.end,s.begin):S().slice(s.begin,s.end);l.setData("text",Z?c.reverse().join(""):c.join("")),i.execCommand&&i.execCommand("copy"),z(this,r.keyCode.DELETE,s),O(this,S(),m().p,n,W!==S().join("")),this.inputmask._valueGet()===C().join("")&&o.trigger("cleared")},blurEvent:function(e){var i=t(this);if(this.inputmask){var r=this.inputmask._valueGet(),o=S().slice();""!==r&&(c.clearMaskOnLostFocus&&(-1===v()&&r===C().join("")?o=[]:R(o)),!1===H(o)&&(setTimeout(function(){i.trigger("incomplete")},0),c.clearIncomplete&&(g(),o=c.clearMaskOnLostFocus?[]:C().slice())),O(this,o,n,e)),W!==S().join("")&&(W=o.join(""),i.trigger("change"))}},mouseenterEvent:function(t){et=!0,i.activeElement!==this&&c.showMaskOnHover&&this.inputmask._valueGet()!==S().join("")&&O(this,S())},submitEvent:function(t){W!==S().join("")&&Y.trigger("change"),c.clearMaskOnLostFocus&&-1===v()&&X.inputmask._valueGet&&X.inputmask._valueGet()===C().join("")&&X.inputmask._valueSet(""),c.removeMaskOnSubmit&&(X.inputmask._valueSet(X.inputmask.unmaskedvalue(),!0),setTimeout(function(){O(X,S())},0))},resetEvent:function(t){X.inputmask.refreshValue=!0,setTimeout(function(){Y.trigger("setvalue")},0)}};if(r.prototype.positionColorMask=function(t,e){t.style.left=e.offsetLeft+"px"},o!==n)switch(o.action){case"isComplete":return X=o.el,H(S());case"unmaskedvalue":return X!==n&&o.value===n||(G=o.value,G=(t.isFunction(c.onBeforeMask)&&c.onBeforeMask.call(K,G,c)||G).split(""),L(n,!1,!1,Z?G.reverse():G),t.isFunction(c.onBeforeWrite)&&c.onBeforeWrite.call(K,n,S(),0,c)),j(X);case"mask":!function(e){it.off(e);var r=function(e,r){var o=e.getAttribute("type"),a="INPUT"===e.tagName&&-1!==t.inArray(o,r.supportsInputType)||e.isContentEditable||"TEXTAREA"===e.tagName;if(!a)if("INPUT"===e.tagName){var l=i.createElement("input");l.setAttribute("type",o),a="text"===l.type,l=null}else a="partial";return!1!==a?function(e){function o(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==v()||!0!==r.nullable?i.activeElement===this&&r.clearMaskOnLostFocus?(Z?R(S().slice()).reverse():R(S().slice())).join(""):l.call(this):"":l.call(this)}function a(e){c.call(this,e),this.inputmask&&t(this).trigger("setvalue")}var l,c;if(!e.inputmask.__valueGet){if(!0!==r.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===s("test".__proto__)?function(t){return t.__proto__}:function(t){return t.constructor.prototype});var h=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value"):n;h&&h.get&&h.set?(l=h.get,c=h.set,Object.defineProperty(e,"value",{get:o,set:a,configurable:!0})):"INPUT"!==e.tagName&&(l=function(){return this.textContent},c=function(t){this.textContent=t},Object.defineProperty(e,"value",{get:o,set:a,configurable:!0}))}else i.__lookupGetter__&&e.__lookupGetter__("value")&&(l=e.__lookupGetter__("value"),c=e.__lookupSetter__("value"),e.__defineGetter__("value",o),e.__defineSetter__("value",a));e.inputmask.__valueGet=l,e.inputmask.__valueSet=c}e.inputmask._valueGet=function(t){return Z&&!0!==t?l.call(this.el).split("").reverse().join(""):l.call(this.el)},e.inputmask._valueSet=function(t,e){c.call(this.el,null===t||t===n?"":!0!==e&&Z?t.split("").reverse().join(""):t)},l===n&&(l=function(){return this.value},c=function(t){this.value=t},function(e){if(t.valHooks&&(t.valHooks[e]===n||!0!==t.valHooks[e].inputmaskpatch)){var i=t.valHooks[e]&&t.valHooks[e].get?t.valHooks[e].get:function(t){return t.value},o=t.valHooks[e]&&t.valHooks[e].set?t.valHooks[e].set:function(t,e){return t.value=e,t};t.valHooks[e]={get:function(t){if(t.inputmask){if(t.inputmask.opts.autoUnmask)return t.inputmask.unmaskedvalue();var e=i(t);return-1!==v(n,n,t.inputmask.maskset.validPositions)||!0!==r.nullable?e:""}return i(t)},set:function(e,i){var n,r=t(e);return n=o(e,i),e.inputmask&&r.trigger("setvalue"),n},inputmaskpatch:!0}}}(e.type),function(e){it.on(e,"mouseenter",function(e){var i=t(this);this.inputmask._valueGet()!==S().join("")&&i.trigger("setvalue")})}(e))}}(e):e.inputmask=n,a}(e,c);if(!1!==r&&(Y=t(X=e),-1===(V=X!==n?X.maxLength:n)&&(V=n),!0===c.colorMask&&B(X),p&&(X.hasOwnProperty("inputmode")&&(X.inputmode=c.inputmode,X.setAttribute("inputmode",c.inputmode)),"rtfm"===c.androidHack&&(!0!==c.colorMask&&B(X),X.type="password")),!0===r&&(it.on(X,"submit",nt.submitEvent),it.on(X,"reset",nt.resetEvent),it.on(X,"mouseenter",nt.mouseenterEvent),it.on(X,"blur",nt.blurEvent),it.on(X,"focus",nt.focusEvent),it.on(X,"mouseleave",nt.mouseleaveEvent),!0!==c.colorMask&&it.on(X,"click",nt.clickEvent),it.on(X,"dblclick",nt.dblclickEvent),it.on(X,"paste",nt.pasteEvent),it.on(X,"dragdrop",nt.pasteEvent),it.on(X,"drop",nt.pasteEvent),it.on(X,"cut",nt.cutEvent),it.on(X,"complete",c.oncomplete),it.on(X,"incomplete",c.onincomplete),it.on(X,"cleared",c.oncleared),p||!0===c.inputEventOnly?X.removeAttribute("maxLength"):(it.on(X,"keydown",nt.keydownEvent),it.on(X,"keypress",nt.keypressEvent)),it.on(X,"compositionstart",t.noop),it.on(X,"compositionupdate",t.noop),it.on(X,"compositionend",t.noop),it.on(X,"keyup",t.noop),it.on(X,"input",nt.inputFallBackEvent),it.on(X,"beforeinput",t.noop)),it.on(X,"setvalue",nt.setValueEvent),W=C().join(""),""!==X.inputmask._valueGet(!0)||!1===c.clearMaskOnLostFocus||i.activeElement===X)){var o=t.isFunction(c.onBeforeMask)&&c.onBeforeMask.call(K,X.inputmask._valueGet(!0),c)||X.inputmask._valueGet(!0);""!==o&&L(X,!0,!1,Z?o.split("").reverse():o.split(""));var a=S().slice();W=a.join(""),!1===H(a)&&c.clearIncomplete&&g(),c.clearMaskOnLostFocus&&i.activeElement!==X&&(-1===v()?a=[]:R(a)),O(X,a),i.activeElement===X&&F(X,E(v()))}}(X);break;case"format":return G=(t.isFunction(c.onBeforeMask)&&c.onBeforeMask.call(K,o.value,c)||o.value).split(""),L(n,!0,!1,Z?G.reverse():G),o.metadata?{value:Z?S().slice().reverse().join(""):S().join(""),metadata:l.call(this,{action:"getmetadata"},a,c)}:Z?S().slice().reverse().join(""):S().join("");case"isValid":o.value?(G=o.value.split(""),L(n,!0,!0,Z?G.reverse():G)):o.value=S().join("");for(var rt=S(),ot=$(),st=rt.length-1;st>ot&&!M(st);st--);return rt.splice(ot,st+1-ot),H(rt)&&o.value===S().join("");case"getemptymask":return C().join("");case"remove":return X&&X.inputmask&&(Y=t(X),X.inputmask._valueSet(c.autoUnmask?j(X):X.inputmask._valueGet(!0)),it.off(X),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(X),"value")&&X.inputmask.__valueGet&&Object.defineProperty(X,"value",{get:X.inputmask.__valueGet,set:X.inputmask.__valueSet,configurable:!0}):i.__lookupGetter__&&X.__lookupGetter__("value")&&X.inputmask.__valueGet&&(X.__defineGetter__("value",X.inputmask.__valueGet),X.__defineSetter__("value",X.inputmask.__valueSet)),X.inputmask=n),X;case"getmetadata":if(t.isArray(a.metadata)){var at=f(!0,0,!1).join("");return t.each(a.metadata,function(t,e){if(e.mask===at)return at=e,!1}),at}return a.metadata}}var c=navigator.userAgent,h=/mobile/i.test(c),d=/iemobile/i.test(c),u=/iphone/i.test(c)&&!d,p=/android/i.test(c)&&!d;return r.prototype={dataAttribute:"data-inputmask",defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:t.noop,onincomplete:t.noop,oncleared:t.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,alias:null,onKeyDown:t.noop,onBeforeMask:null,onBeforePaste:function(e,i){return t.isFunction(i.onBeforeMask)?i.onBeforeMask.call(this,e,i):e},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:t.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:n,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123,0,229],isComplete:null,canClearPosition:t.noop,preValidation:null,postValidation:null,staticDefinitionSymbol:n,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1,importDataAttributes:!0},definitions:{9:{validator:"[0-91-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},aliases:{},masksCache:{},mask:function(s){var c=this;return"string"==typeof s&&(s=i.getElementById(s)||i.querySelectorAll(s)),s=s.nodeName?[s]:s,t.each(s,function(i,s){var h=t.extend(!0,{},c.opts);!function(i,r,s,a){if(!0===r.importDataAttributes){var l,c,h,d,u=function(t,r){null!==(r=r!==n?r:i.getAttribute(a+"-"+t))&&("string"==typeof r&&(0===t.indexOf("on")?r=e[r]:"false"===r?r=!1:"true"===r&&(r=!0)),s[t]=r)},p=i.getAttribute(a);if(p&&""!==p&&(p=p.replace(new RegExp("'","g"),'"'),c=JSON.parse("{"+p+"}")),c)for(d in h=n,c)if("alias"===d.toLowerCase()){h=c[d];break}for(l in u("alias",h),s.alias&&o(s.alias,s,r),r){if(c)for(d in h=n,c)if(d.toLowerCase()===l.toLowerCase()){h=c[d];break}u(l,h)}}t.extend(!0,r,s),("rtl"===i.dir||r.rightAlign)&&(i.style.textAlign="right"),("rtl"===i.dir||r.numericInput)&&(i.dir="ltr",i.removeAttribute("dir"),r.isRTL=!0)}(s,h,t.extend(!0,{},c.userOptions),c.dataAttribute);var d=a(h,c.noMasksCache);d!==n&&(s.inputmask!==n&&(s.inputmask.opts.autoUnmask=!0,s.inputmask.remove()),s.inputmask=new r(n,n,!0),s.inputmask.opts=h,s.inputmask.noMasksCache=c.noMasksCache,s.inputmask.userOptions=t.extend(!0,{},c.userOptions),s.inputmask.isRTL=h.isRTL||h.numericInput,s.inputmask.el=s,s.inputmask.maskset=d,t.data(s,"_inputmask_opts",h),l.call(s.inputmask,{action:"mask"}))}),s&&s[0]&&s[0].inputmask||this},option:function(e,i){return"string"==typeof e?this.opts[e]:"object"===(void 0===e?"undefined":s(e))?(t.extend(this.userOptions,e),this.el&&!0!==i&&this.mask(this.el),this):void 0},unmaskedvalue:function(t){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"unmaskedvalue",value:t})},remove:function(){return l.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"getmetadata"})},isValid:function(t){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"isValid",value:t})},format:function(t,e){return this.maskset=this.maskset||a(this.opts,this.noMasksCache),l.call(this,{action:"format",value:t,metadata:e})},analyseMask:function(e,i,o){function s(t,e,i,n){this.matches=[],this.openGroup=t||!1,this.alternatorGroup=!1,this.isGroup=t||!1,this.isOptional=e||!1,this.isQuantifier=i||!1,this.isAlternator=n||!1,this.quantifier={min:1,max:1}}function a(e,s,a){a=a!==n?a:e.matches.length;var l=e.matches[a-1];if(i)0===s.indexOf("[")||y&&/\\d|\\s|\\w]/i.test(s)||"."===s?e.matches.splice(a++,0,{fn:new RegExp(s,o.casing?"i":""),cardinality:1,optionality:e.isOptional,newBlockMarker:l===n||l.def!==s,casing:null,def:s,placeholder:n,nativeDef:s}):(y&&(s=s[s.length-1]),t.each(s.split(""),function(t,i){l=e.matches[a-1],e.matches.splice(a++,0,{fn:null,cardinality:0,optionality:e.isOptional,newBlockMarker:l===n||l.def!==i&&null!==l.fn,casing:null,def:o.staticDefinitionSymbol||i,placeholder:o.staticDefinitionSymbol!==n?i:n,nativeDef:i})})),y=!1;else{var c=(o.definitions?o.definitions[s]:n)||r.prototype.definitions[s];if(c&&!y){for(var h=c.prevalidator,d=h?h.length:0,u=1;u<c.cardinality;u++){var p=d>=u?h[u-1]:[],f=p.validator,m=p.cardinality;e.matches.splice(a++,0,{fn:f?"string"==typeof f?new RegExp(f,o.casing?"i":""):new function(){this.test=f}:new RegExp("."),cardinality:m||1,optionality:e.isOptional,newBlockMarker:l===n||l.def!==(c.definitionSymbol||s),casing:c.casing,def:c.definitionSymbol||s,placeholder:c.placeholder,nativeDef:s}),l=e.matches[a-1]}e.matches.splice(a++,0,{fn:c.validator?"string"==typeof c.validator?new RegExp(c.validator,o.casing?"i":""):new function(){this.test=c.validator}:new RegExp("."),cardinality:c.cardinality,optionality:e.isOptional,newBlockMarker:l===n||l.def!==(c.definitionSymbol||s),casing:c.casing,def:c.definitionSymbol||s,placeholder:c.placeholder,nativeDef:s})}else e.matches.splice(a++,0,{fn:null,cardinality:0,optionality:e.isOptional,newBlockMarker:l===n||l.def!==s&&null!==l.fn,casing:null,def:o.staticDefinitionSymbol||s,placeholder:o.staticDefinitionSymbol!==n?s:n,nativeDef:s}),y=!1}}function l(){if(_.length>0){if(a(u=_[_.length-1],h),u.isAlternator){p=_.pop();for(var t=0;t<p.matches.length;t++)p.matches[t].isGroup=!1;_.length>0?(u=_[_.length-1]).matches.push(p):b.matches.push(p)}}else a(b,h)}var c,h,d,u,p,f,m,g=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,v=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,y=!1,b=new s,_=[],x=[];for(i&&(o.optionalmarker.start=n,o.optionalmarker.end=n);c=i?v.exec(e):g.exec(e);){if(h=c[0],i)switch(h.charAt(0)){case"?":h="{0,1}";break;case"+":case"*":h="{"+h+"}"}if(y)l();else switch(h.charAt(0)){case o.escapeChar:y=!0,i&&l();break;case o.optionalmarker.end:case o.groupmarker.end:if((d=_.pop()).openGroup=!1,d!==n)if(_.length>0){if((u=_[_.length-1]).matches.push(d),u.isAlternator){p=_.pop();for(var w=0;w<p.matches.length;w++)p.matches[w].isGroup=!1,p.matches[w].alternatorGroup=!1;_.length>0?(u=_[_.length-1]).matches.push(p):b.matches.push(p)}}else b.matches.push(d);else l();break;case o.optionalmarker.start:_.push(new s(!1,!0));break;case o.groupmarker.start:_.push(new s(!0));break;case o.quantifiermarker.start:var k=new s(!1,!1,!0),C=(h=h.replace(/[{}]/g,"")).split(","),S=isNaN(C[0])?C[0]:parseInt(C[0]),D=1===C.length?S:isNaN(C[1])?C[1]:parseInt(C[1]);if("*"!==D&&"+"!==D||(S="*"===D?0:1),k.quantifier={min:S,max:D},_.length>0){var T=_[_.length-1].matches;(c=T.pop()).isGroup||((m=new s(!0)).matches.push(c),c=m),T.push(c),T.push(k)}else(c=b.matches.pop()).isGroup||(i&&null===c.fn&&"."===c.def&&(c.fn=new RegExp(c.def,o.casing?"i":"")),(m=new s(!0)).matches.push(c),c=m),b.matches.push(c),b.matches.push(k);break;case o.alternatormarker:if(_.length>0){var A=(u=_[_.length-1]).matches[u.matches.length-1];f=u.openGroup&&(A.matches===n||!1===A.isGroup&&!1===A.isAlternator)?_.pop():u.matches.pop()}else f=b.matches.pop();if(f.isAlternator)_.push(f);else if(f.alternatorGroup?(p=_.pop(),f.alternatorGroup=!1):p=new s(!1,!1,!1,!0),p.matches.push(f),_.push(p),f.openGroup){f.openGroup=!1;var M=new s(!0);M.alternatorGroup=!0,_.push(M)}break;default:l()}}for(;_.length>0;)d=_.pop(),b.matches.push(d);return b.matches.length>0&&(function e(r){r&&r.matches&&t.each(r.matches,function(t,s){var l=r.matches[t+1];(l===n||l.matches===n||!1===l.isQuantifier)&&s&&s.isGroup&&(s.isGroup=!1,i||(a(s,o.groupmarker.start,0),!0!==s.openGroup&&a(s,o.groupmarker.end))),e(s)})}(b),x.push(b)),(o.numericInput||o.isRTL)&&function t(e){for(var i in e.matches=e.matches.reverse(),e.matches)if(e.matches.hasOwnProperty(i)){var r=parseInt(i);if(e.matches[i].isQuantifier&&e.matches[r+1]&&e.matches[r+1].isGroup){var s=e.matches[i];e.matches.splice(i,1),e.matches.splice(r+1,0,s)}e.matches[i].matches!==n?e.matches[i]=t(e.matches[i]):e.matches[i]=((a=e.matches[i])===o.optionalmarker.start?a=o.optionalmarker.end:a===o.optionalmarker.end?a=o.optionalmarker.start:a===o.groupmarker.start?a=o.groupmarker.end:a===o.groupmarker.end&&(a=o.groupmarker.start),a)}var a;return e}(x[0]),x}},r.extendDefaults=function(e){t.extend(!0,r.prototype.defaults,e)},r.extendDefinitions=function(e){t.extend(!0,r.prototype.definitions,e)},r.extendAliases=function(e){t.extend(!0,r.prototype.aliases,e)},r.format=function(t,e,i){return r(e).format(t,i)},r.unmask=function(t,e){return r(e).unmaskedvalue(t)},r.isValid=function(t,e){return r(e).isValid(t)},r.remove=function(e){t.each(e,function(t,e){e.inputmask&&e.inputmask.remove()})},r.escapeRegex=function(t){return t.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},r.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88},r})?n.apply(e,r):n)&&(t.exports=o)},function(t,e){t.exports=jQuery},function(t,e,i){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}i(4),i(9),i(12),i(13),i(14),i(15);var r=n(i(1)),o=n(i(0)),s=n(i(2));o.default===s.default&&i(16),window.Inputmask=r.default},function(t,e,i){var n=i(5);"string"==typeof n&&(n=[[t.i,n,""]]);var r={hmr:!0,transform:void 0};i(7)(n,r),n.locals&&(t.exports=n.locals)},function(t,e,i){(t.exports=i(6)(void 0)).push([t.i,"span.im-caret {\r\n -webkit-animation: 1s blink step-end infinite;\r\n animation: 1s blink step-end infinite;\r\n}\r\n\r\n@keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\n@-webkit-keyframes blink {\r\n from, to {\r\n border-right-color: black;\r\n }\r\n 50% {\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\nspan.im-static {\r\n color: grey;\r\n}\r\n\r\ndiv.im-colormask {\r\n display: inline-block;\r\n border-style: inset;\r\n border-width: 2px;\r\n -webkit-appearance: textfield;\r\n -moz-appearance: textfield;\r\n appearance: textfield;\r\n}\r\n\r\ndiv.im-colormask > input {\r\n position: absolute;\r\n display: inline-block;\r\n background-color: transparent;\r\n color: transparent;\r\n -webkit-appearance: caret;\r\n -moz-appearance: caret;\r\n appearance: caret;\r\n border-style: none;\r\n left: 0; /*calculated*/\r\n}\r\n\r\ndiv.im-colormask > input:focus {\r\n outline: none;\r\n}\r\n\r\ndiv.im-colormask > input::-moz-selection{\r\n background: none;\r\n}\r\n\r\ndiv.im-colormask > input::selection{\r\n background: none;\r\n}\r\ndiv.im-colormask > input::-moz-selection{\r\n background: none;\r\n}\r\n\r\ndiv.im-colormask > div {\r\n color: black;\r\n display: inline-block;\r\n width: 100px; /*calculated*/\r\n}",""])},function(t,e){function i(t,e){var i,n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),s=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(s).concat([o]).join("\n")}return[n].join("\n")}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=i(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r<this.length;r++){var o=this[r][0];"number"==typeof o&&(n[o]=!0)}for(r=0;r<t.length;r++){var s=t[r];"number"==typeof s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),e.push(s))}},e}},function(t,e,i){function n(t,e){for(var i=0;i<t.length;i++){var n=t[i],r=u[n.id];if(r){for(r.refs++,s=0;s<r.parts.length;s++)r.parts[s](n.parts[s]);for(;s<n.parts.length;s++)r.parts.push(c(n.parts[s],e))}else{for(var o=[],s=0;s<n.parts.length;s++)o.push(c(n.parts[s],e));u[n.id]={id:n.id,refs:1,parts:o}}}}function r(t,e){for(var i=[],n={},r=0;r<t.length;r++){var o=t[r],s=e.base?o[0]+e.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};n[s]?n[s].parts.push(a):i.push(n[s]={id:s,parts:[a]})}return i}function o(t,e){var i=f(t.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=v[v.length-1];if("top"===t.insertAt)n?n.nextSibling?i.insertBefore(e,n.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),v.push(e);else if("bottom"===t.insertAt)i.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=f(t.insertInto+" "+t.insertAt.before);i.insertBefore(e,r)}}function s(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=v.indexOf(t);e>=0&&v.splice(e,1)}function a(t){var e=document.createElement("style");return t.attrs.type="text/css",l(e,t.attrs),o(t,e),e}function l(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}function c(t,e){var i,n,r,c;if(e.transform&&t.css){if(!(c=e.transform(t.css)))return function(){};t.css=c}if(e.singleton){var d=g++;i=m||(m=a(e)),n=h.bind(null,i,d,!1),r=h.bind(null,i,d,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",l(e,t.attrs),o(t,e),e}(e),n=function(t,e,i){var n=i.css,r=i.sourceMap,o=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||o)&&(n=y(n)),r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([n],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,i,e),r=function(){s(i),i.href&&URL.revokeObjectURL(i.href)}):(i=a(e),n=function(t,e){var i=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}.bind(null,i),r=function(){s(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}function h(t,e,i,n){var r=i?"":n.css;if(t.styleSheet)t.styleSheet.cssText=_(e,r);else{var o=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}var d,u={},p=function(){return void 0===d&&(d=function(){return window&&document&&document.all&&!window.atob}.apply(this,arguments)),d},f=function(t){var e={};return function(t){if(void 0===e[t]){var i=function(t){return document.querySelector(t)}.call(this,t);if(i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}}(),m=null,g=0,v=[],y=i(8);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=p()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=r(t,e);return n(i,e),function(t){for(var o=[],s=0;s<i.length;s++){var a=i[s];(l=u[a.id]).refs--,o.push(l)}for(t&&n(r(t,e),e),s=0;s<o.length;s++){var l=o[s];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete u[l.id]}}}};var b,_=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")})},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o)?t:(r=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,r=[i(0),i(1)],void 0!==(o="function"==typeof(n=function(t,e){return e.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+i+"[01])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9])"+i+"(0[1-9]|1[012]))|(30"+i+"(0[13-9]|1[012]))|(31"+i+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(t,e,i){if(isNaN(t))return!1;var n=parseInt(t.concat(e.toString().slice(t.length))),r=parseInt(t.concat(i.toString().slice(t.length)));return!isNaN(n)&&e<=n&&n<=i||!isNaN(r)&&e<=r&&r<=i},determinebaseyear:function(t,e,i){var n=(new Date).getFullYear();if(t>n)return t;if(e<n){for(var r=e.toString().slice(0,2),o=e.toString().slice(2,4);e<r+i;)r--;var s=r+o;return t>s?t:s}if(t<=n&&n<=e){for(var a=n.toString().slice(0,2);e<a+i;)a--;var l=a+i;return l<t?t:l}return n},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()),s.trigger("setvalue")}},getFrontValue:function(t,e,i){for(var n=0,r=0,o=0;o<t.length&&"2"!==t.charAt(o);o++){var s=i.definitions[t.charAt(o)];s?(n+=r,r=s.cardinality):r++}return e.join("").substr(n,r)},postValidation:function(t,e,i){var n,r,o=t.join("");return 0===i.mask.indexOf("y")?(r=o.substr(0,4),n=o.substring(4,10)):(r=o.substring(6,10),n=o.substr(0,6)),e&&(n!==i.leapday||function(t){return isNaN(t)||29===new Date(t,2,0).getDate()}(r))},definitions:{1:{validator:function(t,e,i,n,r){var o=r.regex.val1.test(t);return n||o||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(o=r.regex.val1.test("0"+t.charAt(0)))?o:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=t;isNaN(e.buffer[i+1])||(o+=e.buffer[i+1]);var s=1===o.length?r.regex.val1pre.test(o):r.regex.val1.test(o);if(s&&e.validPositions[i]&&(r.regex.val2(r.separator).test(t+e.validPositions[i].input)||(e.validPositions[i].input="0"===t?"1":"0")),!n&&!s){if(s=r.regex.val1.test(t+"0"))return e.buffer[i]=t,e.buffer[++i]="0",{pos:i,c:"0"};if(s=r.regex.val1.test("0"+t))return e.buffer[i]="0",{pos:++i}}return s},cardinality:1}]},2:{validator:function(t,e,i,n,r){var o=r.getFrontValue(e.mask,e.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=r.regex.val2(r.separator).test(o+t);return n||s||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(s=r.regex.val2(r.separator).test(o+"0"+t.charAt(0)))?s:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){isNaN(e.buffer[i+1])||(t+=e.buffer[i+1]);var o=r.getFrontValue(e.mask,e.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=1===t.length?r.regex.val2pre(r.separator).test(o+t):r.regex.val2(r.separator).test(o+t);return s&&e.validPositions[i]&&(r.regex.val2(r.separator).test(t+e.validPositions[i].input)||(e.validPositions[i].input="0"===t?"1":"0")),n||s||!(s=r.regex.val2(r.separator).test(o+"0"+t))?s:(e.buffer[i]="0",{pos:++i})},cardinality:1}]},y:{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,1);if(o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),e.buffer[i++]=s.charAt(1),{pos:i}}return o},cardinality:1},{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2);if(o=r.isInYearRange(t[0]+s[1]+t[1],r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(1),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i-1]=s.charAt(0),e.buffer[i++]=s.charAt(1),e.buffer[i++]=t.charAt(0),{refreshFromBuffer:{start:i-3,end:i},pos:i}}return o},cardinality:2},{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()),s.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(t,e,i,n,r){if("24"===r.hourFormat&&24===parseInt(t,10))return e.buffer[i-1]="0",e.buffer[i]="0",{refreshFromBuffer:{start:i-1,end:i},c:"0"};var o=r.regex.hrs.test(t);if(!n&&!o&&(t.charAt(1)===r.timeseparator||-1!=="-.:".indexOf(t.charAt(1)))&&(o=r.regex.hrs.test("0"+t.charAt(0))))return e.buffer[i-1]="0",e.buffer[i]=t.charAt(0),{refreshFromBuffer:{start:++i-2,end:i},pos:i,c:r.timeseparator};if(o&&"24"!==r.hourFormat&&r.regex.hrs24.test(t)){var s=parseInt(t,10);return 24===s?(e.buffer[i+5]="a",e.buffer[i+6]="m"):(e.buffer[i+5]="p",e.buffer[i+6]="m"),(s-=12)<10?(e.buffer[i]=s.toString(),e.buffer[i-1]="0"):(e.buffer[i]=s.toString().charAt(1),e.buffer[i-1]=s.toString().charAt(0)),{refreshFromBuffer:{start:i-1,end:i+6},c:e.buffer[i]}}return o},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.hrspre.test(t);return n||o||!(o=r.regex.hrs.test("0"+t))?o:(e.buffer[i]="0",{pos:++i})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.mspre.test(t);return n||o||!(o=r.regex.ms.test("0"+t))?o:(e.buffer[i]="0",{pos:++i})},cardinality:1}]},t:{validator:function(t,e,i,n,r){return r.regex.ampm.test(t+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"[0-3])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+i+"30)|((0[1-6])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0},"yyyy-mm-dd hh:mm:ss":{mask:"y-1-2 h:s:s",placeholder:"yyyy-mm-dd hh:mm:ss",alias:"datetime",separator:"-",leapday:"-02-29",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},onKeyDown:function(t,e,i,n){}}}),e})?n.apply(e,r):n)&&(t.exports=o)},function(t,e,i){"use strict";var n;"function"==typeof Symbol&&Symbol.iterator,void 0!==(n=function(){return window}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n;"function"==typeof Symbol&&Symbol.iterator,void 0!==(n=function(){return document}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,r=[i(0),i(1)],void 0!==(o="function"==typeof(n=function(t,e){return e.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),e.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(t,e,i,n,r){return i-1>-1&&"."!==e.buffer[i-1]?(t=e.buffer[i-1]+t,t=i-2>-1&&"."!==e.buffer[i-2]?e.buffer[i-2]+t:"0"+t):t="00"+t,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(t)},cardinality:1}},onUnMask:function(t,e,i){return t},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(t,e){return(t=t.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(t,e,i){return t},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}}),e})?n.apply(e,r):n)&&(t.exports=o)},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,r=[i(0),i(1)],void 0!==(o="function"==typeof(n=function(t,e,i){function n(t,i){for(var n="",r=0;r<t.length;r++)e.prototype.definitions[t.charAt(r)]||i.definitions[t.charAt(r)]||i.optionalmarker.start===t.charAt(r)||i.optionalmarker.end===t.charAt(r)||i.quantifiermarker.start===t.charAt(r)||i.quantifiermarker.end===t.charAt(r)||i.groupmarker.start===t.charAt(r)||i.groupmarker.end===t.charAt(r)||i.alternatormarker===t.charAt(r)?n+="\\"+t.charAt(r):n+=t.charAt(r);return n}return e.extendAliases({numeric:{mask:function(t){if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator===t.radixPoint&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=i),t.autoGroup=t.autoGroup&&""!==t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var e=Math.floor(t.integerDigits/t.groupSize),r=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0===r?e-1:e),t.integerDigits<1&&(t.integerDigits="*")}t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&!1===t.integerOptional&&(t.positionCaretOnClick="lvp"),t.definitions[";"]=t.definitions["~"],t.definitions[";"].definitionSymbol="~",!0===t.numericInput&&(t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t.decimalProtect=!1);var o="[+]";if(o+=n(t.prefix,t),!0===t.integerOptional?o+="~{1,"+t.integerDigits+"}":o+="~{"+t.integerDigits+"}",t.digits!==i){t.radixPointDefinitionSymbol=t.decimalProtect?":":t.radixPoint;var s=t.digits.toString().split(",");isFinite(s[0]&&s[1]&&isFinite(s[1]))?o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional?o+="["+t.radixPointDefinitionSymbol+";{1,"+t.digits+"}]":o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}")}return o+=n(t.suffix,t),o+="[-]",t.greedy=!1,o},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(e,n,r,o,s){if("-"===r||r===s.negationSymbol.front)return!0===s.allowMinus&&(s.isNegative=s.isNegative===i||!s.isNegative,""===e.join("")||{caret:n,dopost:!0});if(!1===o&&r===s.radixPoint&&s.digits!==i&&(isNaN(s.digits)||parseInt(s.digits)>0)){var a=t.inArray(s.radixPoint,e);if(-1!==a)return!0===s.numericInput?n===a:{caret:a+1}}return!0},postValidation:function(n,r,o){var s=o.suffix.split(""),a=o.prefix.split("");if(r.pos===i&&r.caret!==i&&!0!==r.dopost)return r;var l=r.caret!==i?r.caret:r.pos,c=n.slice();o.numericInput&&(l=c.length-l-1,c=c.reverse());var h=c[l];if(h===o.groupSeparator&&(h=c[l+=1]),l===c.length-o.suffix.length-1&&h===o.radixPoint)return r;h!==i&&h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back&&(c[l]="?",o.prefix.length>0&&l>=(!1===o.isNegative?1:0)&&l<o.prefix.length-1+(!1===o.isNegative?1:0)?a[l-(!1===o.isNegative?1:0)]="?":o.suffix.length>0&&l>=c.length-o.suffix.length-(!1===o.isNegative?1:0)&&(s[l-(c.length-o.suffix.length-(!1===o.isNegative?1:0))]="?")),a=a.join(""),s=s.join("");var d=c.join("").replace(a,"");if(d=(d=(d=(d=d.replace(s,"")).replace(new RegExp(e.escapeRegex(o.groupSeparator),"g"),"")).replace(new RegExp("[-"+e.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(e.escapeRegex(o.negationSymbol.back)+"$"),""),isNaN(o.placeholder)&&(d=d.replace(new RegExp(e.escapeRegex(o.placeholder),"g"),"")),d.length>1&&1!==d.indexOf(o.radixPoint)&&("0"===h&&(d=d.replace(/^\?/g,"")),d=d.replace(/^0/g,"")),d.charAt(0)===o.radixPoint&&""!==o.radixPoint&&!0!==o.numericInput&&(d="0"+d),""!==d){if(d=d.split(""),(!o.digitsOptional||o.enforceDigitsOnBlur&&"blur"===r.event)&&isFinite(o.digits)){var u=t.inArray(o.radixPoint,d),p=t.inArray(o.radixPoint,c);-1===u&&(d.push(o.radixPoint),u=d.length-1);for(var f=1;f<=o.digits;f++)o.digitsOptional&&(!o.enforceDigitsOnBlur||"blur"!==r.event)||d[u+f]!==i&&d[u+f]!==o.placeholder.charAt(0)?-1!==p&&c[p+f]!==i&&(d[u+f]=d[u+f]||c[p+f]):d[u+f]=r.placeholder||o.placeholder.charAt(0)}if(!0!==o.autoGroup||""===o.groupSeparator||h===o.radixPoint&&r.pos===i&&!r.dopost)d=d.join("");else{var m=d[d.length-1]===o.radixPoint&&r.c===o.radixPoint;d=e(function(t,e){var i="";if(i+="("+e.groupSeparator+"*{"+e.groupSize+"}){*}",""!==e.radixPoint){var n=t.join("").split(e.radixPoint);n[1]&&(i+=e.radixPoint+"*{"+n[1].match(/^\d*\??\d*/)[0].length+"}")}return i}(d,o),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(d.join("")),m&&(d+=o.radixPoint),d.charAt(0)===o.groupSeparator&&d.substr(1)}}if(o.isNegative&&"blur"===r.event&&(o.isNegative="0"!==d),d=a+d,d+=s,o.isNegative&&(d=o.negationSymbol.front+d,d+=o.negationSymbol.back),d=d.split(""),h!==i)if(h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back)(l=t.inArray("?",d))>-1?d[l]=h:l=r.caret||0;else if(h===o.radixPoint||h===o.negationSymbol.front||h===o.negationSymbol.back){var g=t.inArray(h,d);-1!==g&&(l=g)}o.numericInput&&(l=d.length-l-1,d=d.reverse());var v={caret:h===i||r.pos!==i?l+(o.numericInput?-1:1):l,buffer:d,refreshFromBuffer:r.dopost||n.join("")!==d.join("")};return v.refreshFromBuffer?v:r},onBeforeWrite:function(n,r,o,s){if(n)switch(n.type){case"keydown":return s.postValidation(r,{caret:o,dopost:!0},s);case"blur":case"checkval":var a;if(function(t){t.parseMinMaxOptions===i&&(null!==t.min&&(t.min=t.min.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,".")),t.min=isFinite(t.min)?parseFloat(t.min):NaN,isNaN(t.min)&&(t.min=Number.MIN_VALUE)),null!==t.max&&(t.max=t.max.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,".")),t.max=isFinite(t.max)?parseFloat(t.max):NaN,isNaN(t.max)&&(t.max=Number.MAX_VALUE)),t.parseMinMaxOptions="done")}(s),null!==s.min||null!==s.max){if(a=s.onUnMask(r.join(""),i,t.extend({},s,{unmaskAsNumber:!0})),null!==s.min&&a<s.min)return s.isNegative=s.min<0,s.postValidation(s.min.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s);if(null!==s.max&&a>s.max)return s.isNegative=s.max<0,s.postValidation(s.max.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s)}return s.postValidation(r,{caret:o,placeholder:"0",event:"blur"},s);case"_checkval":return{caret:o}}},regex:{integerPart:function(t,i){return i?new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?"):new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?\\d+")},integerNPart:function(t){return new RegExp("[\\d"+e.escapeRegex(t.groupSeparator)+e.escapeRegex(t.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(t,n,r,o,s,a){var l=o?new RegExp("[0-9"+e.escapeRegex(s.groupSeparator)+"]").test(t):new RegExp("[0-9]").test(t);if(!0===l){if(!0!==s.numericInput&&n.validPositions[r]!==i&&"~"===n.validPositions[r].match.def&&!a){var c=n.buffer.join(""),h=(c=(c=c.replace(new RegExp("[-"+e.escapeRegex(s.negationSymbol.front)+"]","g"),"")).replace(new RegExp(e.escapeRegex(s.negationSymbol.back)+"$"),"")).split(s.radixPoint);h.length>1&&(h[1]=h[1].replace(/0/g,s.placeholder.charAt(0))),"0"===h[0]&&(h[0]=h[0].replace(/0/g,s.placeholder.charAt(0))),c=h[0]+s.radixPoint+h[1]||"";var d=n._buffer.join("");for(c===s.radixPoint&&(c=d);null===c.match(e.escapeRegex(d)+"$");)d=d.slice(1);l=(c=(c=c.replace(d,"")).split(""))[r]===i?{pos:r,remove:r}:{pos:r}}}else o||t!==s.radixPoint||n.validPositions[r-1]!==i||(n.buffer[r]="0",l={pos:r+1});return l},cardinality:1},"+":{validator:function(t,e,i,n,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(t,e,i,n,r){return r.allowMinus&&t===r.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(t,i,n,r,o){var s="["+e.escapeRegex(o.radixPoint)+"]",a=new RegExp(s).test(t);return a&&i.validPositions[n]&&i.validPositions[n].match.placeholder===o.radixPoint&&(a={caret:n+1}),a},cardinality:1,placeholder:function(t){return t.radixPoint}}},onUnMask:function(t,i,n){if(""===i&&!0===n.nullable)return i;var r=t.replace(n.prefix,"");return r=(r=r.replace(n.suffix,"")).replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(r=r.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==r.indexOf(n.radixPoint)&&(r=r.replace(e.escapeRegex.call(this,n.radixPoint),".")),r=(r=r.replace(new RegExp("^"+e.escapeRegex(n.negationSymbol.front)),"-")).replace(new RegExp(e.escapeRegex(n.negationSymbol.back)+"$"),""),Number(r)):r},isComplete:function(t,i){var n=t.join("");if(t.slice().join("")!==n)return!1;var r=n.replace(i.prefix,"");return r=(r=r.replace(i.suffix,"")).replace(new RegExp(e.escapeRegex(i.groupSeparator),"g"),""),","===i.radixPoint&&(r=r.replace(e.escapeRegex(i.radixPoint),".")),isFinite(r)},onBeforeMask:function(t,n){if(n.isNegative=i,t=t.toString().charAt(t.length-1)===n.radixPoint?t.toString().substr(0,t.length-1):t.toString(),""!==n.radixPoint&&isFinite(t)){var r=t.split("."),o=""!==n.groupSeparator?parseInt(n.groupSize):0;2===r.length&&(r[0].length>o||r[1].length>o||r[0].length<=o&&r[1].length<o)&&(t=t.replace(".",n.radixPoint))}var s=t.match(/,/g),a=t.match(/\./g);if(t=a&&s?a.length>s.length?(t=t.replace(/\./g,"")).replace(",",n.radixPoint):s.length>a.length?(t=t.replace(/,/g,"")).replace(".",n.radixPoint):t.indexOf(".")<t.indexOf(",")?t.replace(/\./g,""):t.replace(/,/g,""):t.replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),0===n.digits&&(-1!==t.indexOf(".")?t=t.substring(0,t.indexOf(".")):-1!==t.indexOf(",")&&(t=t.substring(0,t.indexOf(",")))),""!==n.radixPoint&&isFinite(n.digits)&&-1!==t.indexOf(n.radixPoint)){var l=t.split(n.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(n.digits)<l.toString().length){var c=Math.pow(10,parseInt(n.digits));t=t.replace(e.escapeRegex(n.radixPoint),"."),t=(t=Math.round(parseFloat(t)*c)/c).toString().replace(".",n.radixPoint)}}return t},canClearPosition:function(t,e,i,n,r){var o=t.validPositions[e],s=o.input!==r.radixPoint||null!==t.validPositions[e].match.fn&&!1===r.decimalProtect||o.input===r.radixPoint&&t.validPositions[e+1]&&null===t.validPositions[e+1].match.fn||isFinite(o.input)||e===i||o.input===r.groupSeparator||o.input===r.negationSymbol.front||o.input===r.negationSymbol.back;return!s||"+"!==o.match.nativeDef&&"-"!==o.match.nativeDef||(r.isNegative=!1),s},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey)switch(i.keyCode){case e.keyCode.UP:s.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(o.step)),s.trigger("setvalue");break;case e.keyCode.DOWN:s.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(o.step)),s.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),e})?n.apply(e,r):n)&&(t.exports=o)},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,r=[i(0),i(1)],void 0!==(o="function"==typeof(n=function(t,e){function i(t,e){var i=(t.mask||t).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),n=(e.mask||e).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),r=(t.mask||t).split("#")[0],o=(e.mask||e).split("#")[0];return 0===o.indexOf(r)?-1:0===r.indexOf(o)?1:i.localeCompare(n)}var n=e.prototype.analyseMask;return e.prototype.analyseMask=function(e,i,r){var o={};return r.phoneCodes&&(r.phoneCodes&&r.phoneCodes.length>1e3&&(function t(i,n,r){n=n||"",r=r||o,""!==n&&(r[n]={});for(var s="",a=r[n]||r,l=i.length-1;l>=0;l--)a[s=(e=i[l].mask||i[l]).substr(0,1)]=a[s]||[],a[s].unshift(e.substr(1)),i.splice(l,1);for(var c in a)a[c].length>500&&t(a[c].slice(),c,a)}((e=e.substr(1,e.length-2)).split(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)),e=function e(i){var n="",o=[];for(var s in i)t.isArray(i[s])?1===i[s].length?o.push(s+i[s]):o.push(s+r.groupmarker.start+i[s].join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end):o.push(s+e(i[s]));return 1===o.length?n+=o[0]:n+=r.groupmarker.start+o.join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end,n}(o)),e=e.replace(/9/g,"\\9")),n.call(this,e,i,r)},e.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(t){return t.definitions={"#":e.prototype.definitions[9]},t.phoneCodes.sort(i)},keepStatic:!0,onBeforeMask:function(t,e){var i=t.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(i.indexOf(e.countrycode)>1||-1===i.indexOf(e.countrycode))&&(i="+"+e.countrycode+i),i},onUnMask:function(t,e,i){return t.replace(/[()#-]/g,"")},inputmode:"tel"}}),e})?n.apply(e,r):n)&&(t.exports=o)},function(t,e,i){"use strict";var n,r,o;"function"==typeof Symbol&&Symbol.iterator,r=[i(0),i(1)],void 0!==(o="function"==typeof(n=function(t,e){return e.extendAliases({Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(t,e){return new RegExp(e.regex,e.casing?"i":"").test(t.join(""))},definitions:{r:{validator:function(e,i,n,r,o){function s(t,e){this.matches=[],this.isGroup=t||!1,this.isQuantifier=e||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function a(e,i){var n=!1;i&&(d+="(",p++);for(var r=0;r<e.matches.length;r++){var s=e.matches[r];if(!0===s.isGroup)n=a(s,!0);else if(!0===s.isQuantifier){var c=t.inArray(s,e.matches),h=e.matches[c-1],u=d;if(isNaN(s.quantifier.max)){for(;s.repeaterPart&&s.repeaterPart!==d&&s.repeaterPart.length>d.length&&!(n=a(h,!0)););(n=n||a(h,!0))&&(s.repeaterPart=d),d=u+s.quantifier.max}else{for(var f=0,m=s.quantifier.max-1;f<m&&!(n=a(h,!0));f++);d=u+"{"+s.quantifier.min+","+s.quantifier.max+"}"}}else if(void 0!==s.matches)for(var g=0;g<s.length&&!(n=a(s[g],i));g++);else{var v;if("["==s.charAt(0)){for(v=d,v+=s,_=0;_<p;_++)v+=")";n=(x=new RegExp("^("+v+")$",o.casing?"i":"")).test(l)}else for(var y=0,b=s.length;y<b;y++)if("\\"!==s.charAt(y)){v=d,v=(v+=s.substr(0,y+1)).replace(/\|$/,"");for(var _=0;_<p;_++)v+=")";var x=new RegExp("^("+v+")$",o.casing?"i":"");if(n=x.test(l))break}d+=s}if(n)break}return i&&(d+=")",p--),n}var l,c,h=i.buffer.slice(),d="",u=!1,p=0;null===o.regexTokens&&function(){var t,e,i=new s,n=[];for(o.regexTokens=[];t=o.tokenizer.exec(o.regex);)switch((e=t[0]).charAt(0)){case"(":n.push(new s(!0));break;case")":c=n.pop(),n.length>0?n[n.length-1].matches.push(c):i.matches.push(c);break;case"{":case"+":case"*":var r=new s(!1,!0),a=(e=e.replace(/[{}]/g,"")).split(","),l=isNaN(a[0])?a[0]:parseInt(a[0]),h=1===a.length?l:isNaN(a[1])?a[1]:parseInt(a[1]);if(r.quantifier={min:l,max:h},n.length>0){var d=n[n.length-1].matches;(t=d.pop()).isGroup||((c=new s(!0)).matches.push(t),t=c),d.push(t),d.push(r)}else(t=i.matches.pop()).isGroup||((c=new s(!0)).matches.push(t),t=c),i.matches.push(t),i.matches.push(r);break;default:n.length>0?n[n.length-1].matches.push(e):i.matches.push(e)}i.matches.length>0&&o.regexTokens.push(i)}(),h.splice(n,0,e),l=h.join("");for(var f=0;f<o.regexTokens.length;f++){var m=o.regexTokens[f];if(u=a(m,m.isGroup))break}return u},cardinality:1}}}}),e})?n.apply(e,r):n)&&(t.exports=o)},function(t,e,i){"use strict";var n,r,o,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=[i(2),i(1)],void 0!==(o="function"==typeof(n=function(t,e){return void 0===t.fn.inputmask&&(t.fn.inputmask=function(i,n){var r,o=this[0];if(void 0===n&&(n={}),"string"==typeof i)switch(i){case"unmaskedvalue":return o&&o.inputmask?o.inputmask.unmaskedvalue():t(o).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return o&&o.inputmask?o.inputmask.getemptymask():"";case"hasMaskedValue":return!(!o||!o.inputmask)&&o.inputmask.hasMaskedValue();case"isComplete":return!o||!o.inputmask||o.inputmask.isComplete();case"getmetadata":return o&&o.inputmask?o.inputmask.getmetadata():void 0;case"setvalue":t(o).val(n),o&&void 0===o.inputmask&&t(o).triggerHandler("setvalue");break;case"option":if("string"!=typeof n)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(n)});if(o&&void 0!==o.inputmask)return o.inputmask.option(n);break;default:return n.alias=i,r=new e(n),this.each(function(){r.mask(this)})}else{if("object"==(void 0===i?"undefined":s(i)))return r=new e(i),void 0===i.mask&&void 0===i.alias?this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(i);r.mask(this)}):this.each(function(){r.mask(this)});if(void 0===i)return this.each(function(){(r=new e(n)).mask(this)})}}),t.fn.inputmask})?n.apply(e,r):n)&&(t.exports=o)}]),function(t){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],t):"object"==typeof exports?module.exports=t(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):t(window.dependencyLib||jQuery,window.Inputmask)}(function(t,e){return e.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+i+"[01])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|[12][0-9])"+i+"(0[1-9]|1[012]))|(30"+i+"(0[13-9]|1[012]))|(31"+i+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(t,e,i){if(isNaN(t))return!1;var n=parseInt(t.concat(e.toString().slice(t.length))),r=parseInt(t.concat(i.toString().slice(t.length)));return!isNaN(n)&&e<=n&&n<=i||!isNaN(r)&&e<=r&&r<=i},determinebaseyear:function(t,e,i){var n=(new Date).getFullYear();if(t>n)return t;if(e<n){for(var r=e.toString().slice(0,2),o=e.toString().slice(2,4);e<r+i;)r--;var s=r+o;return t>s?t:s}if(t<=n&&n<=e){for(var a=n.toString().slice(0,2);e<a+i;)a--;var l=a+i;return l<t?t:l}return n},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()),s.trigger("setvalue")}},getFrontValue:function(t,e,i){for(var n=0,r=0,o=0;o<t.length&&"2"!==t.charAt(o);o++){var s=i.definitions[t.charAt(o)];s?(n+=r,r=s.cardinality):r++}return e.join("").substr(n,r)},postValidation:function(t,e,i){var n,r,o=t.join("");return 0===i.mask.indexOf("y")?(r=o.substr(0,4),n=o.substring(4,10)):(r=o.substring(6,10),n=o.substr(0,6)),e&&(n!==i.leapday||function(t){return isNaN(t)||29===new Date(t,2,0).getDate()}(r))},definitions:{1:{validator:function(t,e,i,n,r){var o=r.regex.val1.test(t);return n||o||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(o=r.regex.val1.test("0"+t.charAt(0)))?o:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=t;isNaN(e.buffer[i+1])||(o+=e.buffer[i+1]);var s=1===o.length?r.regex.val1pre.test(o):r.regex.val1.test(o);if(s&&e.validPositions[i]&&(r.regex.val2(r.separator).test(t+e.validPositions[i].input)||(e.validPositions[i].input="0"===t?"1":"0")),!n&&!s){if(s=r.regex.val1.test(t+"0"))return e.buffer[i]=t,e.buffer[++i]="0",{pos:i,c:"0"};if(s=r.regex.val1.test("0"+t))return e.buffer[i]="0",{pos:++i}}return s},cardinality:1}]},2:{validator:function(t,e,i,n,r){var o=r.getFrontValue(e.mask,e.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=r.regex.val2(r.separator).test(o+t);return n||s||t.charAt(1)!==r.separator&&-1==="-./".indexOf(t.charAt(1))||!(s=r.regex.val2(r.separator).test(o+"0"+t.charAt(0)))?s:(e.buffer[i-1]="0",{refreshFromBuffer:{start:i-1,end:i},pos:i,c:t.charAt(0)})},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){isNaN(e.buffer[i+1])||(t+=e.buffer[i+1]);var o=r.getFrontValue(e.mask,e.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=1===t.length?r.regex.val2pre(r.separator).test(o+t):r.regex.val2(r.separator).test(o+t);return s&&e.validPositions[i]&&(r.regex.val2(r.separator).test(t+e.validPositions[i].input)||(e.validPositions[i].input="0"===t?"1":"0")),n||s||!(s=r.regex.val2(r.separator).test(o+"0"+t))?s:(e.buffer[i]="0",{pos:++i})},cardinality:1}]},y:{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,1);if(o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t+"0").toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(0),e.buffer[i++]=s.charAt(1),{pos:i}}return o},cardinality:1},{validator:function(t,e,i,n,r){var o=r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear);if(!n&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2);if(o=r.isInYearRange(t[0]+s[1]+t[1],r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i++]=s.charAt(1),{pos:i};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,t).toString().slice(0,2),o=r.isInYearRange(s+t,r.yearrange.minyear,r.yearrange.maxyear))return e.buffer[i-1]=s.charAt(0),e.buffer[i++]=s.charAt(1),e.buffer[i++]=t.charAt(0),{refreshFromBuffer:{start:i-3,end:i},pos:i}}return o},cardinality:2},{validator:function(t,e,i,n,r){return r.isInYearRange(t,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()),s.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(t,e,i,n,r){if("24"===r.hourFormat&&24===parseInt(t,10))return e.buffer[i-1]="0",e.buffer[i]="0",{refreshFromBuffer:{start:i-1,end:i},c:"0"};var o=r.regex.hrs.test(t);if(!n&&!o&&(t.charAt(1)===r.timeseparator||-1!=="-.:".indexOf(t.charAt(1)))&&(o=r.regex.hrs.test("0"+t.charAt(0))))return e.buffer[i-1]="0",e.buffer[i]=t.charAt(0),{refreshFromBuffer:{start:++i-2,end:i},pos:i,c:r.timeseparator};if(o&&"24"!==r.hourFormat&&r.regex.hrs24.test(t)){var s=parseInt(t,10);return 24===s?(e.buffer[i+5]="a",e.buffer[i+6]="m"):(e.buffer[i+5]="p",e.buffer[i+6]="m"),(s-=12)<10?(e.buffer[i]=s.toString(),e.buffer[i-1]="0"):(e.buffer[i]=s.toString().charAt(1),e.buffer[i-1]=s.toString().charAt(0)),{refreshFromBuffer:{start:i-1,end:i+6},c:e.buffer[i]}}return o},cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.hrspre.test(t);return n||o||!(o=r.regex.hrs.test("0"+t))?o:(e.buffer[i]="0",{pos:++i})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(t,e,i,n,r){var o=r.regex.mspre.test(t);return n||o||!(o=r.regex.ms.test("0"+t))?o:(e.buffer[i]="0",{pos:++i})},cardinality:1}]},t:{validator:function(t,e,i,n,r){return r.regex.ampm.test(t+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey&&i.keyCode===e.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"[0-3])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+i+"30)|((0[1-6])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0},"yyyy-mm-dd hh:mm:ss":{mask:"y-1-2 h:s:s",placeholder:"yyyy-mm-dd hh:mm:ss",alias:"datetime",separator:"-",leapday:"-02-29",regex:{val2pre:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[13-9]|1[012])"+i+"[0-3])|(02"+i+"[0-2])")},val2:function(t){var i=e.escapeRegex.call(this,t);return new RegExp("((0[1-9]|1[012])"+i+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+i+"30)|((0[13578]|1[02])"+i+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},onKeyDown:function(t,e,i,n){}}}),e}),function(t){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],t):"object"==typeof exports?module.exports=t(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):t(window.dependencyLib||jQuery,window.Inputmask)}(function(t,e,i){function n(t,i){for(var n="",r=0;r<t.length;r++)e.prototype.definitions[t.charAt(r)]||i.definitions[t.charAt(r)]||i.optionalmarker.start===t.charAt(r)||i.optionalmarker.end===t.charAt(r)||i.quantifiermarker.start===t.charAt(r)||i.quantifiermarker.end===t.charAt(r)||i.groupmarker.start===t.charAt(r)||i.groupmarker.end===t.charAt(r)||i.alternatormarker===t.charAt(r)?n+="\\"+t.charAt(r):n+=t.charAt(r);return n}return e.extendAliases({numeric:{mask:function(t){if(0!==t.repeat&&isNaN(t.integerDigits)&&(t.integerDigits=t.repeat),t.repeat=0,t.groupSeparator===t.radixPoint&&("."===t.radixPoint?t.groupSeparator=",":","===t.radixPoint?t.groupSeparator=".":t.groupSeparator="")," "===t.groupSeparator&&(t.skipOptionalPartCharacter=i),t.autoGroup=t.autoGroup&&""!==t.groupSeparator,t.autoGroup&&("string"==typeof t.groupSize&&isFinite(t.groupSize)&&(t.groupSize=parseInt(t.groupSize)),isFinite(t.integerDigits))){var e=Math.floor(t.integerDigits/t.groupSize),r=t.integerDigits%t.groupSize;t.integerDigits=parseInt(t.integerDigits)+(0===r?e-1:e),t.integerDigits<1&&(t.integerDigits="*")}t.placeholder.length>1&&(t.placeholder=t.placeholder.charAt(0)),"radixFocus"===t.positionCaretOnClick&&""===t.placeholder&&!1===t.integerOptional&&(t.positionCaretOnClick="lvp"),t.definitions[";"]=t.definitions["~"],t.definitions[";"].definitionSymbol="~",!0===t.numericInput&&(t.positionCaretOnClick="radixFocus"===t.positionCaretOnClick?"lvp":t.positionCaretOnClick,t.digitsOptional=!1,isNaN(t.digits)&&(t.digits=2),t.decimalProtect=!1);var o="[+]";if(o+=n(t.prefix,t),!0===t.integerOptional?o+="~{1,"+t.integerDigits+"}":o+="~{"+t.integerDigits+"}",t.digits!==i){t.radixPointDefinitionSymbol=t.decimalProtect?":":t.radixPoint;var s=t.digits.toString().split(",");isFinite(s[0]&&s[1]&&isFinite(s[1]))?o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}":(isNaN(t.digits)||parseInt(t.digits)>0)&&(t.digitsOptional?o+="["+t.radixPointDefinitionSymbol+";{1,"+t.digits+"}]":o+=t.radixPointDefinitionSymbol+";{"+t.digits+"}")}return o+=n(t.suffix,t),o+="[-]",t.greedy=!1,o},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",preValidation:function(e,n,r,o,s){if("-"===r||r===s.negationSymbol.front)return!0===s.allowMinus&&(s.isNegative=s.isNegative===i||!s.isNegative,""===e.join("")||{caret:n,dopost:!0});if(!1===o&&r===s.radixPoint&&s.digits!==i&&(isNaN(s.digits)||parseInt(s.digits)>0)){var a=t.inArray(s.radixPoint,e);if(-1!==a)return!0===s.numericInput?n===a:{caret:a+1}}return!0},postValidation:function(n,r,o){var s=o.suffix.split(""),a=o.prefix.split("");if(r.pos===i&&r.caret!==i&&!0!==r.dopost)return r;var l=r.caret!==i?r.caret:r.pos,c=n.slice();o.numericInput&&(l=c.length-l-1,c=c.reverse());var h=c[l];if(h===o.groupSeparator&&(h=c[l+=1]),l===c.length-o.suffix.length-1&&h===o.radixPoint)return r;h!==i&&h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back&&(c[l]="?",o.prefix.length>0&&l>=(!1===o.isNegative?1:0)&&l<o.prefix.length-1+(!1===o.isNegative?1:0)?a[l-(!1===o.isNegative?1:0)]="?":o.suffix.length>0&&l>=c.length-o.suffix.length-(!1===o.isNegative?1:0)&&(s[l-(c.length-o.suffix.length-(!1===o.isNegative?1:0))]="?")),a=a.join(""),s=s.join("");var d=c.join("").replace(a,"");if(d=(d=(d=(d=d.replace(s,"")).replace(new RegExp(e.escapeRegex(o.groupSeparator),"g"),"")).replace(new RegExp("[-"+e.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(e.escapeRegex(o.negationSymbol.back)+"$"),""),isNaN(o.placeholder)&&(d=d.replace(new RegExp(e.escapeRegex(o.placeholder),"g"),"")),d.length>1&&1!==d.indexOf(o.radixPoint)&&("0"===h&&(d=d.replace(/^\?/g,"")),d=d.replace(/^0/g,"")),d.charAt(0)===o.radixPoint&&""!==o.radixPoint&&!0!==o.numericInput&&(d="0"+d),""!==d){if(d=d.split(""),(!o.digitsOptional||o.enforceDigitsOnBlur&&"blur"===r.event)&&isFinite(o.digits)){var u=t.inArray(o.radixPoint,d),p=t.inArray(o.radixPoint,c);-1===u&&(d.push(o.radixPoint),u=d.length-1);for(var f=1;f<=o.digits;f++)o.digitsOptional&&(!o.enforceDigitsOnBlur||"blur"!==r.event)||d[u+f]!==i&&d[u+f]!==o.placeholder.charAt(0)?-1!==p&&c[p+f]!==i&&(d[u+f]=d[u+f]||c[p+f]):d[u+f]=r.placeholder||o.placeholder.charAt(0)}if(!0!==o.autoGroup||""===o.groupSeparator||h===o.radixPoint&&r.pos===i&&!r.dopost)d=d.join("");else{var m=d[d.length-1]===o.radixPoint&&r.c===o.radixPoint;d=e(function(t,e){var i="";if(i+="("+e.groupSeparator+"*{"+e.groupSize+"}){*}",""!==e.radixPoint){var n=t.join("").split(e.radixPoint);n[1]&&(i+=e.radixPoint+"*{"+n[1].match(/^\d*\??\d*/)[0].length+"}")}return i}(d,o),{numericInput:!0,jitMasking:!0,definitions:{"*":{validator:"[0-9?]",cardinality:1}}}).format(d.join("")),m&&(d+=o.radixPoint),d.charAt(0)===o.groupSeparator&&d.substr(1)}}if(o.isNegative&&"blur"===r.event&&(o.isNegative="0"!==d),d=a+d,d+=s,o.isNegative&&(d=o.negationSymbol.front+d,d+=o.negationSymbol.back),d=d.split(""),h!==i)if(h!==o.radixPoint&&h!==o.negationSymbol.front&&h!==o.negationSymbol.back)(l=t.inArray("?",d))>-1?d[l]=h:l=r.caret||0;else if(h===o.radixPoint||h===o.negationSymbol.front||h===o.negationSymbol.back){var g=t.inArray(h,d);-1!==g&&(l=g)}o.numericInput&&(l=d.length-l-1,d=d.reverse());var v={caret:h===i||r.pos!==i?l+(o.numericInput?-1:1):l,buffer:d,refreshFromBuffer:r.dopost||n.join("")!==d.join("")};return v.refreshFromBuffer?v:r},onBeforeWrite:function(n,r,o,s){if(n)switch(n.type){case"keydown":return s.postValidation(r,{caret:o,dopost:!0},s);case"blur":case"checkval":var a;if(function(t){t.parseMinMaxOptions===i&&(null!==t.min&&(t.min=t.min.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.min=t.min.replace(t.radixPoint,".")),t.min=isFinite(t.min)?parseFloat(t.min):NaN,isNaN(t.min)&&(t.min=Number.MIN_VALUE)),null!==t.max&&(t.max=t.max.toString().replace(new RegExp(e.escapeRegex(t.groupSeparator),"g"),""),","===t.radixPoint&&(t.max=t.max.replace(t.radixPoint,".")),t.max=isFinite(t.max)?parseFloat(t.max):NaN,isNaN(t.max)&&(t.max=Number.MAX_VALUE)),t.parseMinMaxOptions="done")}(s),null!==s.min||null!==s.max){if(a=s.onUnMask(r.join(""),i,t.extend({},s,{unmaskAsNumber:!0})),null!==s.min&&a<s.min)return s.isNegative=s.min<0,s.postValidation(s.min.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s);if(null!==s.max&&a>s.max)return s.isNegative=s.max<0,s.postValidation(s.max.toString().replace(".",s.radixPoint).split(""),{caret:o,dopost:!0,placeholder:"0"},s)}return s.postValidation(r,{caret:o,placeholder:"0",event:"blur"},s);case"_checkval":return{caret:o}}},regex:{integerPart:function(t,i){return i?new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?"):new RegExp("["+e.escapeRegex(t.negationSymbol.front)+"+]?\\d+")},integerNPart:function(t){return new RegExp("[\\d"+e.escapeRegex(t.groupSeparator)+e.escapeRegex(t.placeholder.charAt(0))+"]+")}},definitions:{"~":{validator:function(t,n,r,o,s,a){var l=o?new RegExp("[0-9"+e.escapeRegex(s.groupSeparator)+"]").test(t):new RegExp("[0-9]").test(t);if(!0===l){if(!0!==s.numericInput&&n.validPositions[r]!==i&&"~"===n.validPositions[r].match.def&&!a){var c=n.buffer.join(""),h=(c=(c=c.replace(new RegExp("[-"+e.escapeRegex(s.negationSymbol.front)+"]","g"),"")).replace(new RegExp(e.escapeRegex(s.negationSymbol.back)+"$"),"")).split(s.radixPoint);h.length>1&&(h[1]=h[1].replace(/0/g,s.placeholder.charAt(0))),"0"===h[0]&&(h[0]=h[0].replace(/0/g,s.placeholder.charAt(0))),c=h[0]+s.radixPoint+h[1]||"";var d=n._buffer.join("");for(c===s.radixPoint&&(c=d);null===c.match(e.escapeRegex(d)+"$");)d=d.slice(1);l=(c=(c=c.replace(d,"")).split(""))[r]===i?{pos:r,remove:r}:{pos:r}}}else o||t!==s.radixPoint||n.validPositions[r-1]!==i||(n.buffer[r]="0",l={pos:r+1});return l},cardinality:1},"+":{validator:function(t,e,i,n,r){return r.allowMinus&&("-"===t||t===r.negationSymbol.front)},cardinality:1,placeholder:""},"-":{validator:function(t,e,i,n,r){return r.allowMinus&&t===r.negationSymbol.back},cardinality:1,placeholder:""},":":{validator:function(t,i,n,r,o){var s="["+e.escapeRegex(o.radixPoint)+"]",a=new RegExp(s).test(t);return a&&i.validPositions[n]&&i.validPositions[n].match.placeholder===o.radixPoint&&(a={caret:n+1}),a},cardinality:1,placeholder:function(t){return t.radixPoint}}},onUnMask:function(t,i,n){if(""===i&&!0===n.nullable)return i;var r=t.replace(n.prefix,"");return r=(r=r.replace(n.suffix,"")).replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),""!==n.placeholder.charAt(0)&&(r=r.replace(new RegExp(n.placeholder.charAt(0),"g"),"0")),n.unmaskAsNumber?(""!==n.radixPoint&&-1!==r.indexOf(n.radixPoint)&&(r=r.replace(e.escapeRegex.call(this,n.radixPoint),".")),r=(r=r.replace(new RegExp("^"+e.escapeRegex(n.negationSymbol.front)),"-")).replace(new RegExp(e.escapeRegex(n.negationSymbol.back)+"$"),""),Number(r)):r},isComplete:function(t,i){var n=t.join("");if(t.slice().join("")!==n)return!1;var r=n.replace(i.prefix,"");return r=(r=r.replace(i.suffix,"")).replace(new RegExp(e.escapeRegex(i.groupSeparator),"g"),""),","===i.radixPoint&&(r=r.replace(e.escapeRegex(i.radixPoint),".")),isFinite(r)},onBeforeMask:function(t,n){if(n.isNegative=i,t=t.toString().charAt(t.length-1)===n.radixPoint?t.toString().substr(0,t.length-1):t.toString(),""!==n.radixPoint&&isFinite(t)){var r=t.split("."),o=""!==n.groupSeparator?parseInt(n.groupSize):0;2===r.length&&(r[0].length>o||r[1].length>o||r[0].length<=o&&r[1].length<o)&&(t=t.replace(".",n.radixPoint))}var s=t.match(/,/g),a=t.match(/\./g);if(t=a&&s?a.length>s.length?(t=t.replace(/\./g,"")).replace(",",n.radixPoint):s.length>a.length?(t=t.replace(/,/g,"")).replace(".",n.radixPoint):t.indexOf(".")<t.indexOf(",")?t.replace(/\./g,""):t.replace(/,/g,""):t.replace(new RegExp(e.escapeRegex(n.groupSeparator),"g"),""),0===n.digits&&(-1!==t.indexOf(".")?t=t.substring(0,t.indexOf(".")):-1!==t.indexOf(",")&&(t=t.substring(0,t.indexOf(",")))),""!==n.radixPoint&&isFinite(n.digits)&&-1!==t.indexOf(n.radixPoint)){var l=t.split(n.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(n.digits)<l.toString().length){var c=Math.pow(10,parseInt(n.digits));t=t.replace(e.escapeRegex(n.radixPoint),"."),t=(t=Math.round(parseFloat(t)*c)/c).toString().replace(".",n.radixPoint)}}return t},canClearPosition:function(t,e,i,n,r){var o=t.validPositions[e],s=o.input!==r.radixPoint||null!==t.validPositions[e].match.fn&&!1===r.decimalProtect||o.input===r.radixPoint&&t.validPositions[e+1]&&null===t.validPositions[e+1].match.fn||isFinite(o.input)||e===i||o.input===r.groupSeparator||o.input===r.negationSymbol.front||o.input===r.negationSymbol.back;return!s||"+"!==o.match.nativeDef&&"-"!==o.match.nativeDef||(r.isNegative=!1),s},onKeyDown:function(i,n,r,o){var s=t(this);if(i.ctrlKey)switch(i.keyCode){case e.keyCode.UP:s.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(o.step)),s.trigger("setvalue");break;case e.keyCode.DOWN:s.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(o.step)),s.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,digitsOptional:!0,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowMinus:!1}}),e}),function(t){"function"==typeof define&&define.amd?define(["./dependencyLibs/inputmask.dependencyLib","./inputmask"],t):"object"==typeof exports?module.exports=t(require("./dependencyLibs/inputmask.dependencyLib"),require("./inputmask")):t(window.dependencyLib||jQuery,window.Inputmask)}(function(t,e){function i(t,e){var i=(t.mask||t).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),n=(e.mask||e).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),r=(t.mask||t).split("#")[0],o=(e.mask||e).split("#")[0];return 0===o.indexOf(r)?-1:0===r.indexOf(o)?1:i.localeCompare(n)}var n=e.prototype.analyseMask;return e.prototype.analyseMask=function(e,i,r){var o={};return r.phoneCodes&&(r.phoneCodes&&r.phoneCodes.length>1e3&&(function t(i,n,r){n=n||"",r=r||o,""!==n&&(r[n]={});for(var s="",a=r[n]||r,l=i.length-1;l>=0;l--)a[s=(e=i[l].mask||i[l]).substr(0,1)]=a[s]||[],a[s].unshift(e.substr(1)),i.splice(l,1);for(var c in a)a[c].length>500&&t(a[c].slice(),c,a)}((e=e.substr(1,e.length-2)).split(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)),e=function e(i){var n="",o=[];for(var s in i)t.isArray(i[s])?1===i[s].length?o.push(s+i[s]):o.push(s+r.groupmarker.start+i[s].join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end):o.push(s+e(i[s]));return 1===o.length?n+=o[0]:n+=r.groupmarker.start+o.join(r.groupmarker.end+r.alternatormarker+r.groupmarker.start)+r.groupmarker.end,n}(o)),e=e.replace(/9/g,"\\9")),n.call(this,e,i,r)},e.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(t){return t.definitions={"#":e.prototype.definitions[9]},t.phoneCodes.sort(i)},keepStatic:!0,onBeforeMask:function(t,e){var i=t.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(i.indexOf(e.countrycode)>1||-1===i.indexOf(e.countrycode))&&(i="+"+e.countrycode+i),i},onUnMask:function(t,e,i){return t.replace(/[()#-]/g,"")},inputmode:"tel"}}),e}),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";var t="10.1.0";function e(t){t.preventDefault()}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function n(t,e,i){i>0&&(s(t,e),setTimeout(function(){a(t,e)},i))}function r(t){return Array.isArray(t)?t:[t]}function o(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function s(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function a(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(t){var e=void 0!==window.pageXOffset,i="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:i?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:i?t.documentElement.scrollTop:t.body.scrollTop}}function c(t,e){return 100/(e-t)}function h(t,e){return 100*e/(t[1]-t[0])}function d(t,e){for(var i=1;t>=e[i];)i+=1;return i}function u(t,e,i){if(i>=t.slice(-1)[0])return 100;var n,r,o,s,a=d(i,t);return n=t[a-1],r=t[a],o=e[a-1],s=e[a],o+function(t,e){return h(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}([n,r],i)/c(o,s)}function p(t,e,i,n){if(100===n)return n;var r,o,s=d(n,t);return i?n-(r=t[s-1])>((o=t[s])-r)/2?o:r:e[s-1]?t[s-1]+function(t,e){return Math.round(t/e)*e}(n-t[s-1],e[s-1]):n}function f(e,n,r){var o;if("number"==typeof n&&(n=[n]),"[object Array]"!==Object.prototype.toString.call(n))throw new Error("noUiSlider ("+t+"): 'range' contains invalid value.");if(!i(o="min"===e?0:"max"===e?100:parseFloat(e))||!i(n[0]))throw new Error("noUiSlider ("+t+"): 'range' value isn't numeric.");r.xPct.push(o),r.xVal.push(n[0]),o?r.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(r.xSteps[0]=n[1]),r.xHighestCompleteStep.push(0)}function m(t,e,i){if(!e)return!0;i.xSteps[t]=h([i.xVal[t],i.xVal[t+1]],e)/c(i.xPct[t],i.xPct[t+1]);var n=(i.xVal[t+1]-i.xVal[t])/i.xNumSteps[t],r=Math.ceil(Number(n.toFixed(3))-1),o=i.xVal[t]+i.xNumSteps[t]*r;i.xHighestCompleteStep[t]=o}function g(t,e,i){this.xPct=[],this.xVal=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var n,r=[];for(n in t)t.hasOwnProperty(n)&&r.push([t[n],n]);for(r.length&&"object"==typeof r[0][0]?r.sort(function(t,e){return t[0][0]-e[0][0]}):r.sort(function(t,e){return t[0]-e[0]}),n=0;n<r.length;n++)f(r[n][1],r[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)m(n,this.xNumSteps[n],this)}g.prototype.getMargin=function(e){var i=this.xNumSteps[0];if(i&&e/i%1!=0)throw new Error("noUiSlider ("+t+"): 'limit', 'margin' and 'padding' must be divisible by step.");return 2===this.xPct.length&&h(this.xVal,e)},g.prototype.toStepping=function(t){return t=u(this.xVal,this.xPct,t)},g.prototype.fromStepping=function(t){return function(t,e,i){if(i>=100)return t.slice(-1)[0];var n,r=d(i,e);return function(t,e){return e*(t[1]-t[0])/100+t[0]}([t[r-1],t[r]],(i-(n=e[r-1]))*c(n,e[r]))}(this.xVal,this.xPct,t)},g.prototype.getStep=function(t){return t=p(this.xPct,this.xSteps,this.snap,t)},g.prototype.getNearbySteps=function(t){var e=d(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},g.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(o);return Math.max.apply(null,t)},g.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var v={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function y(e){if(function(t){return"object"==typeof t&&"function"==typeof t.to&&"function"==typeof t.from}(e))return!0;throw new Error("noUiSlider ("+t+"): 'format' requires 'to' and 'from' methods.")}function b(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'step' is not numeric.");e.singleStep=n}function _(e,i){if("object"!=typeof i||Array.isArray(i))throw new Error("noUiSlider ("+t+"): 'range' is not an object.");if(void 0===i.min||void 0===i.max)throw new Error("noUiSlider ("+t+"): Missing 'min' or 'max' in 'range'.");if(i.min===i.max)throw new Error("noUiSlider ("+t+"): 'range' 'min' and 'max' cannot be equal.");e.spectrum=new g(i,e.snap,e.singleStep)}function x(e,i){if(i=r(i),!Array.isArray(i)||!i.length)throw new Error("noUiSlider ("+t+"): 'start' option is incorrect.");e.handles=i.length,e.start=i}function w(e,i){if(e.snap=i,"boolean"!=typeof i)throw new Error("noUiSlider ("+t+"): 'snap' option must be a boolean.")}function k(e,i){if(e.animate=i,"boolean"!=typeof i)throw new Error("noUiSlider ("+t+"): 'animate' option must be a boolean.")}function C(e,i){if(e.animationDuration=i,"number"!=typeof i)throw new Error("noUiSlider ("+t+"): 'animationDuration' option must be a number.")}function S(e,i){var n,r=[!1];if("lower"===i?i=[!0,!1]:"upper"===i&&(i=[!1,!0]),!0===i||!1===i){for(n=1;n<e.handles;n++)r.push(i);r.push(!1)}else{if(!Array.isArray(i)||!i.length||i.length!==e.handles+1)throw new Error("noUiSlider ("+t+"): 'connect' option doesn't match handle count.");r=i}e.connect=r}function D(e,i){switch(i){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider ("+t+"): 'orientation' option is invalid.")}}function T(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'margin' option must be numeric.");if(0!==n&&(e.margin=e.spectrum.getMargin(n),!e.margin))throw new Error("noUiSlider ("+t+"): 'margin' option is only supported on linear sliders.")}function A(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'limit' option must be numeric.");if(e.limit=e.spectrum.getMargin(n),!e.limit||e.handles<2)throw new Error("noUiSlider ("+t+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function M(e,n){if(!i(n))throw new Error("noUiSlider ("+t+"): 'padding' option must be numeric.");if(0!==n){if(e.padding=e.spectrum.getMargin(n),!e.padding)throw new Error("noUiSlider ("+t+"): 'padding' option is only supported on linear sliders.");if(e.padding<0)throw new Error("noUiSlider ("+t+"): 'padding' option must be a positive number.");if(e.padding>=50)throw new Error("noUiSlider ("+t+"): 'padding' option must be less than half the range.")}}function E(e,i){switch(i){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider ("+t+"): 'direction' option was not recognized.")}}function P(e,i){if("string"!=typeof i)throw new Error("noUiSlider ("+t+"): 'behaviour' must be a string containing options.");var n=i.indexOf("tap")>=0,r=i.indexOf("drag")>=0,o=i.indexOf("fixed")>=0,s=i.indexOf("snap")>=0,a=i.indexOf("hover")>=0;if(o){if(2!==e.handles)throw new Error("noUiSlider ("+t+"): 'fixed' behaviour must be used with 2 handles");T(e,e.start[1]-e.start[0])}e.events={tap:n||s,drag:r,fixed:o,snap:s,hover:a}}function I(e,i){if(e.multitouch=i,"boolean"!=typeof i)throw new Error("noUiSlider ("+t+"): 'multitouch' option must be a boolean.")}function O(e,i){if(!1!==i)if(!0===i){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(!0)}else{if(e.tooltips=r(i),e.tooltips.length!==e.handles)throw new Error("noUiSlider ("+t+"): must pass a formatter for all handles.");e.tooltips.forEach(function(e){if("boolean"!=typeof e&&("object"!=typeof e||"function"!=typeof e.to))throw new Error("noUiSlider ("+t+"): 'tooltips' must be passed a formatter or 'false'.")})}}function N(t,e){t.ariaFormat=e,y(e)}function L(t,e){t.format=e,y(e)}function j(e,i){if(void 0!==i&&"string"!=typeof i&&!1!==i)throw new Error("noUiSlider ("+t+"): 'cssPrefix' must be a string or `false`.");e.cssPrefix=i}function F(e,i){if(void 0!==i&&"object"!=typeof i)throw new Error("noUiSlider ("+t+"): 'cssClasses' must be an object.");if("string"==typeof e.cssPrefix)for(var n in e.cssClasses={},i)i.hasOwnProperty(n)&&(e.cssClasses[n]=e.cssPrefix+i[n]);else e.cssClasses=i}function $(e,i){if(!0!==i&&!1!==i)throw new Error("noUiSlider ("+t+"): 'useRequestAnimationFrame' option should be true (default) or false.");e.useRequestAnimationFrame=i}function R(e){var i={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:v,format:v},n={step:{r:!1,t:b},start:{r:!0,t:x},connect:{r:!0,t:S},direction:{r:!0,t:E},snap:{r:!1,t:w},animate:{r:!1,t:k},animationDuration:{r:!1,t:C},range:{r:!0,t:_},orientation:{r:!1,t:D},margin:{r:!1,t:T},limit:{r:!1,t:A},padding:{r:!1,t:M},behaviour:{r:!0,t:P},multitouch:{r:!0,t:I},ariaFormat:{r:!1,t:N},format:{r:!1,t:L},tooltips:{r:!1,t:O},cssPrefix:{r:!1,t:j},cssClasses:{r:!1,t:F},useRequestAnimationFrame:{r:!1,t:$}},r={connect:!1,direction:"ltr",behaviour:"tap",multitouch:!1,orientation:"horizontal",cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},useRequestAnimationFrame:!0};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(o){if(void 0===e[o]&&void 0===r[o]){if(n[o].r)throw new Error("noUiSlider ("+t+"): '"+o+"' is required.");return!0}n[o].t(i,void 0===e[o]?r[o]:e[o])}),i.pips=e.pips;var o=[["left","top"],["right","bottom"]];return i.style=o[i.dir][i.ort],i.styleOposite=o[i.dir?0:1][i.ort],i}function H(i,o,c){var h,d,u,p,f,m,g,v=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},y=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),b=i,_=[],x=[],w=0,k=o.spectrum,C=[],S={},D=i.ownerDocument,T=D.documentElement,A=D.body;function M(t,e){var i=D.createElement("div");return e&&s(i,e),t.appendChild(i),i}function E(t,e){var i=M(t,o.cssClasses.origin),n=M(i,o.cssClasses.handle);return n.setAttribute("data-handle",e),n.setAttribute("tabindex","0"),n.setAttribute("role","slider"),n.setAttribute("aria-orientation",o.ort?"vertical":"horizontal"),0===e?s(n,o.cssClasses.handleLower):e===o.handles-1&&s(n,o.cssClasses.handleUpper),i}function P(t,e){return!!e&&M(t,o.cssClasses.connect)}function I(t,e){return!!o.tooltips[e]&&M(t.firstChild,o.cssClasses.tooltip)}function O(t,e,i){var n=D.createElement("div"),r=[o.cssClasses.valueNormal,o.cssClasses.valueLarge,o.cssClasses.valueSub],a=[o.cssClasses.markerNormal,o.cssClasses.markerLarge,o.cssClasses.markerSub],l=[o.cssClasses.valueHorizontal,o.cssClasses.valueVertical],c=[o.cssClasses.markerHorizontal,o.cssClasses.markerVertical];function h(t,e){var i=e===o.cssClasses.value,n=i?r:a;return e+" "+(i?l:c)[o.ort]+" "+n[t]}return s(n,o.cssClasses.pips),s(n,0===o.ort?o.cssClasses.pipsHorizontal:o.cssClasses.pipsVertical),Object.keys(t).forEach(function(r){!function(t,r){r[1]=r[1]&&e?e(r[0],r[1]):r[1];var s=M(n,!1);s.className=h(r[1],o.cssClasses.marker),s.style[o.style]=t+"%",r[1]&&((s=M(n,!1)).className=h(r[1],o.cssClasses.value),s.style[o.style]=t+"%",s.innerText=i.to(r[0]))}(r,t[r])}),n}function N(){var t;f&&((t=f).parentElement.removeChild(t),f=null)}function L(e){N();var i=e.mode,n=e.density||1,r=e.filter||!1,o=function(e,i,n){if("range"===e||"steps"===e)return k.xVal;if("count"===e){if(!i)throw new Error("noUiSlider ("+t+"): 'values' required for mode 'count'.");var r,o=100/(i-1),s=0;for(i=[];(r=s++*o)<=100;)i.push(r);e="positions"}return"positions"===e?i.map(function(t){return k.fromStepping(n?k.getStep(t):t)}):"values"===e?n?i.map(function(t){return k.fromStepping(k.getStep(k.toStepping(t)))}):i:void 0}(i,e.values||!1,e.stepped||!1),s=function(t,e,i){var n,r={},o=k.xVal[0],s=k.xVal[k.xVal.length-1],a=!1,l=!1,c=0;return n=i.slice().sort(function(t,e){return t-e}),(i=n.filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==o&&(i.unshift(o),a=!0),i[i.length-1]!==s&&(i.push(s),l=!0),i.forEach(function(n,o){var s,h,d,u,p,f,m,g,v,y=n,b=i[o+1];if("steps"===e&&(s=k.xNumSteps[o]),s||(s=b-y),!1!==y&&void 0!==b)for(s=Math.max(s,1e-7),h=y;h<=b;h=(h+s).toFixed(7)/1){for(m=(p=(u=k.toStepping(h))-c)/t,v=p/(g=Math.round(m)),d=1;d<=g;d+=1)r[(c+d*v).toFixed(5)]=["x",0];f=i.indexOf(h)>-1?1:"steps"===e?2:0,!o&&a&&(f=0),h===b&&l||(r[u.toFixed(5)]=[h,f]),c=u}}),r}(n,i,o),a=e.format||{to:Math.round};return f=b.appendChild(O(s,r,a))}function j(){var t=h.getBoundingClientRect(),e="offset"+["Width","Height"][o.ort];return 0===o.ort?t.width||h[e]:t.height||h[e]}function F(t,e,i,n){var r=function(r){return!b.hasAttribute("disabled")&&(s=b,a=o.cssClasses.tap,(s.classList?!s.classList.contains(a):!new RegExp("\\b"+a+"\\b").test(s.className))&&(!!(r=function(t,e,i){var n,r,s=0===t.type.indexOf("touch"),a=0===t.type.indexOf("mouse"),c=0===t.type.indexOf("pointer");0===t.type.indexOf("MSPointer")&&(c=!0);if(s&&o.multitouch){var h=function(t){return t.target===i||i.contains(t.target)};if("touchstart"===t.type){var d=Array.prototype.filter.call(t.touches,h);if(d.length>1)return!1;n=d[0].pageX,r=d[0].pageY}else{var u=Array.prototype.find.call(t.changedTouches,h);if(!u)return!1;n=u.pageX,r=u.pageY}}else if(s){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY}e=e||l(D),(a||c)&&(n=t.clientX+e.x,r=t.clientY+e.y);return t.pageOffset=e,t.points=[n,r],t.cursor=a||c,t}(r,n.pageOffset,n.target||e))&&(!(t===v.start&&void 0!==r.buttons&&r.buttons>1)&&((!n.hover||!r.buttons)&&(y||r.preventDefault(),r.calcPoint=r.points[o.ort],void i(r,n))))));var s,a},s=[];return t.split(" ").forEach(function(t){e.addEventListener(t,r,!!y&&{passive:!0}),s.push([t,r])}),s}function $(t){var e,i,n,r,s,a,c=100*(t-(e=h,i=o.ort,n=e.getBoundingClientRect(),r=e.ownerDocument,s=r.documentElement,a=l(r),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(a.x=0),i?n.top+a.y-s.clientTop:n.left+a.x-s.clientLeft))/j();return o.dir?100-c:c}function H(t,e,i,n){var r=i.slice(),o=[!t,t],s=[t,!t];n=n.slice(),t&&n.reverse(),n.length>1?n.forEach(function(t,i){var n=G(r,t,r[t]+e,o[i],s[i],!1);!1===n?e=0:(e=n-r[t],r[t]=n)}):o=s=[!0];var a=!1;n.forEach(function(t,n){a=Z(t,i[t]+e,o[n],s[n])||a}),a&&n.forEach(function(t){z("update",t),z("slide",t)})}function z(t,e,i){Object.keys(S).forEach(function(n){var r=n.split(".")[0];t===r&&S[n].forEach(function(t){t.call(p,C.map(o.format.to),e,C.slice(),i||!1,_.slice())})})}function B(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&W(t,e)}function U(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return W(t,e);var i=(o.dir?-1:1)*(t.calcPoint-e.startCalcPoint);H(i>0,100*i/e.baseSize,e.locations,e.handleNumbers)}function W(t,i){i.handle&&(a(i.handle,o.cssClasses.active),w-=1),i.listeners.forEach(function(t){T.removeEventListener(t[0],t[1])}),0===w&&(a(b,o.cssClasses.drag),X(),t.cursor&&(A.style.cursor="",A.removeEventListener("selectstart",e))),i.handleNumbers.forEach(function(t){z("change",t),z("set",t),z("end",t)})}function Y(t,i){var n;if(1===i.handleNumbers.length){var r=d[i.handleNumbers[0]];if(r.hasAttribute("disabled"))return!1;n=r.children[0],w+=1,s(n,o.cssClasses.active)}t.stopPropagation();var a=[],l=F(v.move,T,U,{target:t.target,handle:n,listeners:a,startCalcPoint:t.calcPoint,baseSize:j(),pageOffset:t.pageOffset,handleNumbers:i.handleNumbers,buttonsProperty:t.buttons,locations:_.slice()}),c=F(v.end,T,W,{target:t.target,handle:n,listeners:a,handleNumbers:i.handleNumbers}),h=F("mouseout",T,B,{target:t.target,handle:n,listeners:a,handleNumbers:i.handleNumbers});a.push.apply(a,l.concat(c,h)),t.cursor&&(A.style.cursor=getComputedStyle(t.target).cursor,d.length>1&&s(b,o.cssClasses.drag),A.addEventListener("selectstart",e,!1)),i.handleNumbers.forEach(function(t){z("start",t)})}function V(t){t.stopPropagation();var e=$(t.calcPoint),i=function(t){var e=100,i=!1;return d.forEach(function(n,r){if(!n.hasAttribute("disabled")){var o=Math.abs(_[r]-t);o<e&&(i=r,e=o)}}),i}(e);if(!1===i)return!1;o.events.snap||n(b,o.cssClasses.tap,o.animationDuration),Z(i,e,!0,!0),X(),z("slide",i,!0),z("update",i,!0),z("change",i,!0),z("set",i,!0),o.events.snap&&Y(t,{handleNumbers:[i]})}function q(t){var e=$(t.calcPoint),i=k.getStep(e),n=k.fromStepping(i);Object.keys(S).forEach(function(t){"hover"===t.split(".")[0]&&S[t].forEach(function(t){t.call(p,n)})})}function G(t,e,i,n,r,s){var a;return d.length>1&&(n&&e>0&&(i=Math.max(i,t[e-1]+o.margin)),r&&e<d.length-1&&(i=Math.min(i,t[e+1]-o.margin))),d.length>1&&o.limit&&(n&&e>0&&(i=Math.min(i,t[e-1]+o.limit)),r&&e<d.length-1&&(i=Math.max(i,t[e+1]-o.limit))),o.padding&&(0===e&&(i=Math.max(i,o.padding)),e===d.length-1&&(i=Math.min(i,100-o.padding))),i=k.getStep(i),a=i,!((i=Math.max(Math.min(a,100),0))===t[e]&&!s)&&i}function K(t){return t+"%"}function X(){x.forEach(function(t){var e=_[t]>50?-1:1,i=3+(d.length+e*t);d[t].childNodes[0].style.zIndex=i})}function Z(t,e,i,n){return!1!==(e=G(_,t,e,i,n,!1))&&(function(t,e){_[t]=e,C[t]=k.fromStepping(e);var i=function(){d[t].style[o.style]=K(e),Q(t),Q(t+1)};window.requestAnimationFrame&&o.useRequestAnimationFrame?window.requestAnimationFrame(i):i()}(t,e),!0)}function Q(t){if(u[t]){var e=0,i=100;0!==t&&(e=_[t-1]),t!==u.length-1&&(i=_[t]),u[t].style[o.style]=K(e),u[t].style[o.styleOposite]=K(100-i)}}function J(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=o.format.from(t))||isNaN(t)||Z(e,k.toStepping(t),!1,!1))}function tt(t,e){var i=r(t),s=void 0===_[0];e=void 0===e||!!e,i.forEach(J),o.animate&&!s&&n(b,o.cssClasses.tap,o.animationDuration),x.forEach(function(t){Z(t,_[t],!0,!1)}),X(),x.forEach(function(t){z("update",t),null!==i[t]&&e&&z("set",t)})}function et(){var t=C.map(o.format.to);return 1===t.length?t[0]:t}function it(t,e){S[t]=S[t]||[],S[t].push(e),"update"===t.split(".")[0]&&d.forEach(function(t,e){z("update",e)})}if(b.noUiSlider)throw new Error("noUiSlider ("+t+"): Slider was already initialized.");return function(t){s(t,o.cssClasses.target),0===o.dir?s(t,o.cssClasses.ltr):s(t,o.cssClasses.rtl),0===o.ort?s(t,o.cssClasses.horizontal):s(t,o.cssClasses.vertical),h=M(t,o.cssClasses.base)}(b),function(t,e){d=[],(u=[]).push(P(e,t[0]));for(var i=0;i<o.handles;i++)d.push(E(e,i)),x[i]=i,u.push(P(e,t[i+1]))}(o.connect,h),p={destroy:function(){for(var t in o.cssClasses)o.cssClasses.hasOwnProperty(t)&&a(b,o.cssClasses[t]);for(;b.firstChild;)b.removeChild(b.firstChild);delete b.noUiSlider},steps:function(){return _.map(function(t,e){var i=k.getNearbySteps(t),n=C[e],r=i.thisStep.step,o=null;!1!==r&&n+r>i.stepAfter.startValue&&(r=i.stepAfter.startValue-n),o=n>i.thisStep.startValue?i.thisStep.step:!1!==i.stepBefore.step&&n-i.stepBefore.highestStep,100===t?r=null:0===t&&(o=null);var s=k.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,r]})},on:it,off:function(t){var e=t&&t.split(".")[0],i=e&&t.substring(e.length);Object.keys(S).forEach(function(t){var n=t.split(".")[0],r=t.substring(n.length);e&&e!==n||i&&i!==r||delete S[t]})},get:et,set:tt,reset:function(t){tt(o.start,t)},__moveHandles:function(t,e,i){H(t,e,_,i)},options:c,updateOptions:function(t,e){var i=et(),n=["margin","limit","padding","range","animate","snap","step","format"];n.forEach(function(e){void 0!==t[e]&&(c[e]=t[e])});var r=R(c);n.forEach(function(e){void 0!==t[e]&&(o[e]=r[e])}),k=r.spectrum,o.margin=r.margin,o.limit=r.limit,o.padding=r.padding,o.pips&&L(o.pips),_=[],tt(t.start||i,e)},target:b,removePips:N,pips:L},(m=o.events).fixed||d.forEach(function(t,e){F(v.start,t.children[0],Y,{handleNumbers:[e]})}),m.tap&&F(v.start,h,V,{}),m.hover&&F(v.move,h,q,{hover:!0}),m.drag&&u.forEach(function(t,e){if(!1!==t&&0!==e&&e!==u.length-1){var i=d[e-1],n=d[e],r=[t];s(t,o.cssClasses.draggable),m.fixed&&(r.push(i.children[0]),r.push(n.children[0])),r.forEach(function(t){F(v.start,t,Y,{handles:[i,n],handleNumbers:[e-1,e]})})}}),tt(o.start),o.pips&&L(o.pips),o.tooltips&&(g=d.map(I),it("update",function(t,e,i){if(g[e]){var n=t[e];!0!==o.tooltips[e]&&(n=o.tooltips[e].to(i[e])),g[e].innerHTML=n}})),it("update",function(t,e,i,n,r){x.forEach(function(t){var e=d[t],n=G(_,t,0,!0,!0,!0),s=G(_,t,100,!0,!0,!0),a=r[t],l=o.ariaFormat.to(i[t]);e.children[0].setAttribute("aria-valuemin",n.toFixed(1)),e.children[0].setAttribute("aria-valuemax",s.toFixed(1)),e.children[0].setAttribute("aria-valuenow",a.toFixed(1)),e.children[0].setAttribute("aria-valuetext",l)})}),p}return{version:t,create:function(e,i){if(!e||!e.nodeName)throw new Error("noUiSlider ("+t+"): create requires a single element, got: "+e);var n=H(e,R(i),i);return e.noUiSlider=n,n}}}),function(t,e,i,n){function r(e,i){this.settings=null,this.options=t.extend({},r.Defaults,i),this.$element=t(e),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},t.each(["onResize","onThrottledResize"],t.proxy(function(e,i){this._handlers[i]=t.proxy(this[i],this)},this)),t.each(r.Plugins,t.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(r.Workers,t.proxy(function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})},this)),this.setup(),this.initialize()}r.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},r.Width={Default:"default",Inner:"inner",Outer:"outer"},r.Type={Event:"event",State:"state"},r.Plugins={},r.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,n=this.settings.rtl,r={width:"auto","margin-left":n?e:"","margin-right":n?"":e};!i&&this.$stage.children().css(r),t.css=r}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,i=null,n=this._items.length,r=!this.settings.autoWidth,o=[];for(t.items={merge:!1,width:e};n--;)i=this._mergers[n],i=this.settings.mergeFit&&Math.min(i,this.settings.items)||i,t.items.merge=i>1||t.items.merge,o[n]=r?e*i:this._items[n].width();this._widths=o}},{filter:["items","settings"],run:function(){var e=[],i=this._items,n=this.settings,r=Math.max(2*n.items,4),o=2*Math.ceil(i.length/2),s=n.loop&&i.length?n.rewind?r:Math.max(r,o):0,a="",l="";for(s/=2;s>0;)e.push(this.normalize(e.length/2,!0)),a+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),l=i[e[e.length-1]][0].outerHTML+l,s-=1;this._clones=e,t(a).addClass("cloned").appendTo(this.$stage),t(l).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,n=0,r=0,o=[];++i<e;)n=o[i-1]||0,r=this._widths[this.relative(i)]+this.settings.margin,o.push(n+r*t);this._coordinates=o}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,n=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],n.eq(e).css(t.css);else i&&(t.css.width=t.items.width,n.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,n,r=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,s=this.coordinates(this.current())+o,a=s+this.width()*r,l=[];for(i=0,n=this._coordinates.length;i<n;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*r,(this.op(t,"<=",s)&&this.op(t,">",a)||this.op(e,"<",s)&&this.op(e,">",a))&&l.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+l.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],r.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(t("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},r.prototype.initializeItems=function(){var e=this.$element.find(".owl-item");if(e.length)return this._items=e.get().map(function(e){return t(e)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},r.prototype.initialize=function(){var t,e,i;(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading"))&&(t=this.$element.find("img"),e=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:void 0,i=this.$element.children(e).width(),t.length&&i<=0&&this.preloadAutoWidthImages(t));this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},r.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},r.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,n=-1,r=null;i?(t.each(i,function(t){t<=e&&t>n&&(n=Number(t))}),"function"==typeof(r=t.extend({},this.options,i[n])).stagePadding&&(r.stagePadding=r.stagePadding()),delete r.responsive,r.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+n))):r=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:r}}),this._breakpoint=n,this.settings=r,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},r.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},r.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},r.prototype.update=function(){for(var e=0,i=this._pipe.length,n=t.proxy(function(t){return this[t]},this._invalidated),r={};e<i;)(this._invalidated.all||t.grep(this._pipe[e].filter,n).length>0)&&this._pipe[e].run(r),e++;this._invalidated={},!this.is("valid")&&this.enter("valid")},r.prototype.width=function(t){switch(t=t||r.Width.Default){case r.Width.Inner:case r.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},r.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},r.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},r.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},r.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},r.prototype.onDragStart=function(e){var n=null;3!==e.which&&(t.support.transform?n={x:(n=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===n.length?12:4],y:n[16===n.length?13:5]}:(n=this.$stage.position(),n={x:this.settings.rtl?n.left+this.$stage.width()-this.width()+this.settings.margin:n.left,y:n.top}),this.is("animating")&&(t.support.transform?this.animate(n.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=n,this._drag.stage.current=n,this._drag.pointer=this.pointer(e),t(i).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(i).one("mousemove.owl.core touchmove.owl.core",t.proxy(function(e){var n=this.difference(this._drag.pointer,this.pointer(e));t(i).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(n.x)<Math.abs(n.y)&&this.is("valid")||(e.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},r.prototype.onDragMove=function(t){var e=null,i=null,n=null,r=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,r);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(e=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-e,o.x=((o.x-e)%i+i)%i+e):(e=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),n=this.settings.pullDrag?-1*r.x/5:0,o.x=Math.max(Math.min(o.x,e+n),i+n)),this._drag.stage.current=o,this.animate(o.x))},r.prototype.onDragEnd=function(e){var n=this.difference(this._drag.pointer,this.pointer(e)),r=this._drag.stage.current,o=n.x>0^this.settings.rtl?"left":"right";t(i).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==n.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(r.x,0!==n.x?o:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=o,(Math.abs(n.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},r.prototype.closest=function(e,i){var n=-1,r=this.width(),o=this.coordinates();return this.settings.freeDrag||t.each(o,t.proxy(function(t,s){return"left"===i&&e>s-30&&e<s+30?n=t:"right"===i&&e>s-r-30&&e<s-r+30?n=t+1:this.op(e,"<",s)&&this.op(e,">",void 0!==o[t+1]?o[t+1]:s-r)&&(n="left"===i?t+1:t),-1===n},this)),this.settings.loop||(this.op(e,">",o[this.minimum()])?n=e=this.minimum():this.op(e,"<",o[this.maximum()])&&(n=e=this.maximum())),n},r.prototype.animate=function(e){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),i&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):i?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},r.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},r.prototype.current=function(t){if(void 0===t)return this._current;if(0!==this._items.length){if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});void 0!==e.data&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current}},r.prototype.invalidate=function(e){return"string"===t.type(e)&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,function(t,e){return e})},r.prototype.reset=function(t){void 0!==(t=this.normalize(t))&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},r.prototype.normalize=function(t,e){var i=this._items.length,n=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=void 0:(t<0||t>=i+n)&&(t=((t-n/2)%i+i)%i+n/2),t},r.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},r.prototype.maximum=function(t){var e,i,n,r=this.settings,o=this._coordinates.length;if(r.loop)o=this._clones.length/2+this._items.length-1;else if(r.autoWidth||r.merge){if(e=this._items.length)for(i=this._items[--e].width(),n=this.$element.width();e--&&!((i+=this._items[e].width()+this.settings.margin)>n););o=e+1}else o=r.center?this._items.length-1:this._items.length-r.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},r.prototype.minimum=function(t){return t?0:this._clones.length/2},r.prototype.items=function(t){return void 0===t?this._items.slice():(t=this.normalize(t,!0),this._items[t])},r.prototype.mergers=function(t){return void 0===t?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},r.prototype.clones=function(e){var i=this._clones.length/2,n=i+this._items.length,r=function(t){return t%2==0?n+t/2:i-(t+1)/2};return void 0===e?t.map(this._clones,function(t,e){return r(e)}):t.map(this._clones,function(t,i){return t===e?r(i):null})},r.prototype.speed=function(t){return void 0!==t&&(this._speed=t),this._speed},r.prototype.coordinates=function(e){var i,n=1,r=e-1;return void 0===e?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(n=-1,r=e+1),i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[r]||0))/2*n):i=this._coordinates[r]||0,i=Math.ceil(i))},r.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},r.prototype.to=function(t,e){var i=this.current(),n=null,r=t-this.relative(i),o=(r>0)-(r<0),s=this._items.length,a=this.minimum(),l=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(r)>s/2&&(r+=-1*o*s),(n=(((t=i+r)-a)%s+s)%s+a)!==t&&n-r<=l&&n-r>0&&(i=n-r,t=n,this.reset(i))):t=this.settings.rewind?(t%(l+=1)+l)%l:Math.max(a,Math.min(l,t)),this.speed(this.duration(i,t,e)),this.current(t),this.isVisible()&&this.update()},r.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},r.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},r.prototype.onTransitionEnd=function(t){if(void 0!==t&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},r.prototype.viewport=function(){var n;return this.options.responsiveBaseElement!==e?n=t(this.options.responsiveBaseElement).width():e.innerWidth?n=e.innerWidth:i.documentElement&&i.documentElement.clientWidth?n=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),n},r.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},r.prototype.add=function(e,i){var n=this.relative(this._current);i=void 0===i?this._items.length:this.normalize(i,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:i}),e=this.prepare(e),0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[i-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(e),this._items.splice(i,0,e),this._mergers.splice(i,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[n]&&this.reset(this._items[n].index()),this.invalidate("items"),this.trigger("added",{content:e,position:i})},r.prototype.remove=function(t){void 0!==(t=this.normalize(t,!0))&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},r.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy(function(e,i){this.enter("pre-loading"),i=t(i),t(new Image).one("load",t.proxy(function(t){i.attr("src",t.target.src),i.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))},this))},r.prototype.destroy=function(){for(var n in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(i).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[n].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},r.prototype.op=function(t,e,i){var n=this.settings.rtl;switch(e){case"<":return n?t>i:t<i;case">":return n?t<i:t>i;case">=":return n?t<=i:t>=i;case"<=":return n?t>=i:t<=i}},r.prototype.on=function(t,e,i,n){t.addEventListener?t.addEventListener(e,i,n):t.attachEvent&&t.attachEvent("on"+e,i)},r.prototype.off=function(t,e,i,n){t.removeEventListener?t.removeEventListener(e,i,n):t.detachEvent&&t.detachEvent("on"+e,i)},r.prototype.trigger=function(e,i,n,o,s){var a={item:{count:this._items.length,index:this.current()}},l=t.camelCase(t.grep(["on",e,n],function(t){return t}).join("-").toLowerCase()),c=t.Event([e,"owl",n||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},a,i));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(c)}),this.register({type:r.Type.Event,name:e}),this.$element.trigger(c),this.settings&&"function"==typeof this.settings[l]&&this.settings[l].call(this,c)),c},r.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){void 0===this._states.current[e]&&(this._states.current[e]=0),this._states.current[e]++},this))},r.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy(function(t,e){this._states.current[e]--},this))},r.prototype.register=function(e){if(e.type===r.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var i=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return!i||!i.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&t.namespace.indexOf("owl")>-1:i.apply(this,arguments)},t.event.special[e.name].owl=!0}}else e.type===r.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy(function(i,n){return t.inArray(i,this._states.tags[e.name])===n},this)))},r.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},r.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},r.prototype.pointer=function(t){var i={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i},r.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},r.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.owlCarousel=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=t(this),o=n.data("owl.carousel");o||(o=new r(this,"object"==typeof e&&e),n.data("owl.carousel",o),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(e,i){o.register({type:r.Type.Event,name:i}),o.$element.on(i+".owl.carousel.core",t.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([i]),o[i].apply(this,[].slice.call(arguments,1)),this.release([i]))},o))})),"string"==typeof e&&"_"!==e.charAt(0)&&o[e].apply(o,i)})},t.fn.owlCarousel.Constructor=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=t.extend({},r.Defaults,this._core.options),this._core.$element.on(this._handlers)};r.Defaults={autoRefresh:!0,autoRefreshInterval:500},r.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},r.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},r.prototype.destroy=function(){var t,i;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoRefresh=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type)){var i=this._core.settings,n=i.center&&Math.ceil(i.items/2)||i.items,r=i.center&&-1*n||0,o=(e.property&&void 0!==e.property.value?e.property.value:this._core.current())+r,s=this._core.clones().length,a=t.proxy(function(t,e){this.load(e)},this);for(i.lazyLoadEager>0&&(n+=i.lazyLoadEager,i.loop&&(o-=i.lazyLoadEager,n++));r++<n;)this.load(s/2+this._core.relative(o)),s&&t.each(this._core.clones(this._core.relative(o)),a),o++}},this)},this._core.options=t.extend({},r.Defaults,this._core.options),this._core.$element.on(this._handlers)};r.Defaults={lazyLoad:!1,lazyLoadEager:0},r.prototype.load=function(i){var n=this._core.$stage.children().eq(i),r=n&&n.find(".owl-lazy");!r||t.inArray(n.get(0),this._loaded)>-1||(r.each(t.proxy(function(i,n){var r,o=t(n),s=e.devicePixelRatio>1&&o.attr("data-src-retina")||o.attr("data-src")||o.attr("data-srcset");this._core.trigger("load",{element:o,url:s},"lazy"),o.is("img")?o.one("load.owl.lazy",t.proxy(function(){o.css("opacity",1),this._core.trigger("loaded",{element:o,url:s},"lazy")},this)).attr("src",s):o.is("source")?o.one("load.owl.lazy",t.proxy(function(){this._core.trigger("loaded",{element:o,url:s},"lazy")},this)).attr("srcset",s):((r=new Image).onload=t.proxy(function(){o.css({"background-image":'url("'+s+'")',opacity:"1"}),this._core.trigger("loaded",{element:o,url:s},"lazy")},this),r.src=s)},this)),this._loaded.push(n.get(0)))},r.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=function(i){this._core=i,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=t.extend({},r.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var n=this;t(e).on("load",function(){n._core.settings.autoHeight&&n.update()}),t(e).resize(function(){n._core.settings.autoHeight&&(null!=n._intervalId&&clearTimeout(n._intervalId),n._intervalId=setTimeout(function(){n.update()},250))})};r.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},r.prototype.update=function(){var e=this._core._current,i=e+this._core.settings.items,n=this._core.settings.lazyLoad,r=this._core.$stage.children().toArray().slice(e,i),o=[],s=0;t.each(r,function(e,i){o.push(t(i).height())}),(s=Math.max.apply(null,o))<=1&&n&&this._previousHeight&&(s=this._previousHeight),this._previousHeight=s,this._core.$stage.parent().height(s).addClass(this._core.settings.autoHeightClass)},r.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))}},this)},this._core.options=t.extend({},r.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};r.Defaults={video:!1,videoHeight:!1,videoWidth:!1},r.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",n=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),r=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,s=t.attr("href");if(!s)throw new Error("Missing video URL.");if((n=s.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)i="youtube";else if(n[3].indexOf("vimeo")>-1)i="vimeo";else{if(!(n[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");i="vzaar"}n=n[6],this._videos[s]={type:i,id:n,width:r,height:o},e.attr("data-video",s),this.thumbnail(t,this._videos[s])},r.prototype.thumbnail=function(e,i){var n,r,o,s=i.width&&i.height?"width:"+i.width+"px;height:"+i.height+"px;":"",a=e.find("img"),l="src",c="",h=this._core.settings,d=function(i){r='<div class="owl-video-play-icon"></div>',n=h.lazyLoad?t("<div/>",{class:"owl-video-tn "+c,srcType:i}):t("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+i+")"}),e.after(n),e.after(r)};if(e.wrap(t("<div/>",{class:"owl-video-wrapper",style:s})),this._core.settings.lazyLoad&&(l="data-src",c="owl-lazy"),a.length)return d(a.attr(l)),a.remove(),!1;"youtube"===i.type?(o="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",d(o)):"vimeo"===i.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){o=t[0].thumbnail_large,d(o)}}):"vzaar"===i.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){o=t.framegrab_url,d(o)}})},r.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},r.prototype.play=function(e){var i,n=t(e.target).closest("."+this._core.settings.itemClass),r=this._videos[n.attr("data-video")],o=r.width||"100%",s=r.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),n=this._core.items(this._core.relative(n.index())),this._core.reset(n.index()),(i=t('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",s),i.attr("width",o),"youtube"===r.type?i.attr("src","//www.youtube.com/embed/"+r.id+"?autoplay=1&rel=0&v="+r.id):"vimeo"===r.type?i.attr("src","//player.vimeo.com/video/"+r.id+"?autoplay=1"):"vzaar"===r.type&&i.attr("src","//view.vzaar.com/"+r.id+"/player?autoplay=true"),t(i).wrap('<div class="owl-video-frame" />').insertAfter(n.find(".owl-video")),this._playing=n.addClass("owl-video-playing"))},r.prototype.isInFullScreen=function(){var e=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return e&&t(e).parent().hasClass("owl-video-frame")},r.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=function(e){this.core=e,this.core.options=t.extend({},r.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":t.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};r.Defaults={animateOut:!1,animateIn:!1},r.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,i=t.proxy(this.clear,this),n=this.core.$stage.children().eq(this.previous),r=this.core.$stage.children().eq(this.next),o=this.core.settings.animateIn,s=this.core.settings.animateOut;this.core.current()!==this.previous&&(s&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),n.one(t.support.animation.end,i).css({left:e+"px"}).addClass("animated owl-animated-out").addClass(s)),o&&r.one(t.support.animation.end,i).addClass("animated owl-animated-in").addClass(o))}},r.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},r.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=function(e){this._core=e,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":t.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":t.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":t.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},r.Defaults,this._core.options)};r.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},r.prototype._next=function(n){this._call=e.setTimeout(t.proxy(this._next,this,n),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||i.hidden||this._core.next(n||this._core.settings.autoplaySpeed)},r.prototype.read=function(){return(new Date).getTime()-this._time},r.prototype.play=function(i,n){var r;this._core.is("rotating")||this._core.enter("rotating"),i=i||this._core.settings.autoplayTimeout,r=Math.min(this._time%(this._timeout||i),i),this._paused?(this._time=this.read(),this._paused=!1):e.clearTimeout(this._call),this._time+=this.read()%i-r,this._timeout=i,this._call=e.setTimeout(t.proxy(this._next,this,n),i-r)},r.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,e.clearTimeout(this._call),this._core.leave("rotating"))},r.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,e.clearTimeout(this._call))},r.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){"use strict";var r=function(e){this._core=e,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=t.extend({},r.Defaults,this._core.options),this.$element.on(this._handlers)};r.Defaults={nav:!1,navText:['<span aria-label="Previous">‹</span>','<span aria-label="Next">›</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},r.prototype.initialize=function(){var e,i=this._core.settings;for(e in this._controls.$relative=(i.navContainer?t(i.navContainer):t("<div>").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+i.navElement+">").addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy(function(t){this.prev(i.navSpeed)},this)),this._controls.$next=t("<"+i.navElement+">").addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy(function(t){this.next(i.navSpeed)},this)),i.dotsData||(this._templates=[t('<button role="button">').addClass(i.dotClass).append(t("<span>")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?t(i.dotsContainer):t("<div>").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",t.proxy(function(e){var n=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(n,i.dotsSpeed)},this)),this._overrides)this._core[e]=t.proxy(this[e],this)},r.prototype.destroy=function(){var t,e,i,n,r;for(t in r=this._core.settings,this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&r.navContainer?this._controls[e].html(""):this._controls[e].remove();for(n in this.overides)this._core[n]=this._overrides[n];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},r.prototype.update=function(){var t,e,i=this._core.clones().length/2,n=i+this._core.items().length,r=this._core.maximum(!0),o=this._core.settings,s=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0,0;t<n;t++){if(e>=s||0===e){if(this._pages.push({start:Math.min(r,t-i),end:t-i+s-1}),Math.min(r,t-i)===r)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},r.prototype.draw=function(){var e,i=this._core.settings,n=this._core.items().length<=i.items,r=this._core.relative(this._core.current()),o=i.loop||i.rewind;this._controls.$relative.toggleClass("disabled",!i.nav||n),i.nav&&(this._controls.$previous.toggleClass("disabled",!o&&r<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!o&&r>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!i.dots||n),i.dots&&(e=this._pages.length-this._controls.$absolute.children().length,i.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(new Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},r.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}},r.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy(function(t,i){return t.start<=e&&t.end>=e},this)).pop()},r.prototype.getPosition=function(e){var i,n,r=this._core.settings;return"page"==r.slideBy?(i=t.inArray(this.current(),this._pages),n=this._pages.length,e?++i:--i,i=this._pages[(i%n+n)%n].start):(i=this._core.relative(this._core.current()),n=this._core.items().length,e?i+=r.slideBy:i-=r.slideBy),i},r.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},r.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},r.prototype.to=function(e,i,n){var r;!n&&this._pages.length?(r=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%r+r)%r].start,i)):t.proxy(this._overrides.to,this._core)(e,i)},t.fn.owlCarousel.Constructor.Plugins.Navigation=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){"use strict";var r=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){if(e.namespace){var i=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=e.content}},this),"changed.owl.carousel":t.proxy(function(i){if(i.namespace&&"position"===i.property.name){var n=this._core.items(this._core.relative(this._core.current())),r=t.map(this._hashes,function(t,e){return t===n?e:null}).join();if(!r||e.location.hash.slice(1)===r)return;e.location.hash=r}},this)},this._core.options=t.extend({},r.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(t){var i=e.location.hash.substring(1),n=this._core.$stage.children(),r=this._hashes[i]&&n.index(this._hashes[i]);void 0!==r&&r!==this._core.current()&&this._core.to(this._core.relative(r),!1,!0)},this))};r.Defaults={URLhashListener:!1},r.prototype.destroy=function(){var i,n;for(i in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(i,this._handlers[i]);for(n in Object.getOwnPropertyNames(this))"function"!=typeof this[n]&&(this[n]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=r}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var r=t("<support>").get(0).style,o="Webkit Moz O ms".split(" "),s={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},a=function(){return!!h("transform")},l=function(){return!!h("perspective")},c=function(){return!!h("animation")};function h(e,i){var s=!1,a=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+o.join(a+" ")+a).split(" "),function(t,e){if(r[e]!==n)return s=!i||e,!1}),s}function d(t){return h(t,!0)}(function(){return!!h("transition")})()&&(t.support.transition=new String(d("transition")),t.support.transition.end=s.transition.end[t.support.transition]),c()&&(t.support.animation=new String(d("animation")),t.support.animation.end=s.animation.end[t.support.animation]),a()&&(t.support.transform=new String(d("transform")),t.support.transform3d=l())}(window.Zepto||window.jQuery,window,document),function(t,e){if("function"==typeof define&&define.amd)define(["module","exports"],e);else if("undefined"!=typeof exports)e(module,exports);else{var i={exports:{}};e(i,i.exports),t.autosize=i.exports}}(this,function(t,e){"use strict";var i,n,r="function"==typeof Map?new Map:(i=[],n=[],{has:function(t){return i.indexOf(t)>-1},get:function(t){return n[i.indexOf(t)]},set:function(t,e){-1===i.indexOf(t)&&(i.push(t),n.push(e))},delete:function(t){var e=i.indexOf(t);e>-1&&(i.splice(e,1),n.splice(e,1))}}),o=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(t){o=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function s(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!r.has(t)){var e,i=null,n=null,s=null,a=function(){t.clientWidth!==n&&d()},l=function(e){window.removeEventListener("resize",a,!1),t.removeEventListener("input",d,!1),t.removeEventListener("keyup",d,!1),t.removeEventListener("autosize:destroy",l,!1),t.removeEventListener("autosize:update",d,!1),Object.keys(e).forEach(function(i){t.style[i]=e[i]}),r.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),t.addEventListener("input",d,!1),t.addEventListener("autosize:update",d,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",r.set(t,{destroy:l,update:d}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),i="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(i)&&(i=0),d()}function c(e){var i=t.style.width;t.style.width="0px",t.offsetWidth,t.style.width=i,t.style.overflowY=e}function h(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),r=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+i+"px",n=t.clientWidth,e.forEach(function(t){t.node.scrollTop=t.scrollTop}),r&&(document.documentElement.scrollTop=r)}}function d(){h();var e=Math.round(parseFloat(t.style.height)),i=window.getComputedStyle(t,null),n="content-box"===i.boxSizing?Math.round(parseFloat(i.height)):t.offsetHeight;if(n!==e?"hidden"===i.overflowY&&(c("scroll"),h(),n="content-box"===i.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==i.overflowY&&(c("hidden"),h(),n="content-box"===i.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),s!==n){s=n;var r=o("autosize:resized");try{t.dispatchEvent(r)}catch(t){}}}}function a(t){var e=r.get(t);e&&e.destroy()}function l(t){var e=r.get(t);e&&e.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(t){return t}).destroy=function(t){return t},c.update=function(t){return t}):((c=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return s(t)}),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],a),t},c.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],l),t}),e.default=c,t.exports=e.default}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=t()}}(function(){return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[s]={exports:{}};e[s][0].call(h.exports,function(t){return r(e[s][1][t]||t)},h,h.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,i){var n=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}e.exports=function(t,e){for(;t&&t.nodeType!==n;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},{}],2:[function(t,e,i){function n(t,e,i,n){return function(i){i.delegateTarget=r(i.target,e),i.delegateTarget&&n.call(t,i)}}var r=t("./closest");e.exports=function(t,e,i,r,o){var s=n.apply(this,arguments);return t.addEventListener(i,s,o),{destroy:function(){t.removeEventListener(i,s,o)}}}},{"./closest":1}],3:[function(t,e,i){i.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},i.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||i.node(t[0]))},i.string=function(t){return"string"==typeof t||t instanceof String},i.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},{}],4:[function(t,e,i){var n=t("./is"),r=t("delegate");e.exports=function(t,e,i){if(!t&&!e&&!i)throw new Error("Missing required arguments");if(!n.string(e))throw new TypeError("Second argument must be a String");if(!n.fn(i))throw new TypeError("Third argument must be a Function");if(n.node(t))return function(t,e,i){return t.addEventListener(e,i),{destroy:function(){t.removeEventListener(e,i)}}}(t,e,i);if(n.nodeList(t))return function(t,e,i){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,i)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,i)})}}}(t,e,i);if(n.string(t))return function(t,e,i){return r(document.body,t,e,i)}(t,e,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},{"./is":3,delegate:2}],5:[function(t,e,i){e.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var i=t.hasAttribute("readonly");i||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),i||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(t),n.removeAllRanges(),n.addRange(r),e=n.toString()}return e}},{}],6:[function(t,e,i){function n(){}n.prototype={on:function(t,e,i){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){function n(){r.off(t,n),e.apply(i,arguments)}var r=this;return n._=e,this.on(t,n,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),n=0,r=i.length;n<r;n++)i[n].fn.apply(i[n].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),n=i[t],r=[];if(n&&e)for(var o=0,s=n.length;o<s;o++)n[o].fn!==e&&n[o].fn._!==e&&r.push(n[o]);return r.length?i[t]=r:delete i[t],this}},e.exports=n},{}],7:[function(t,e,i){!function(n,r){if(void 0!==i)r(e,t("select"));else{var o={exports:{}};r(o,n.select),n.clipboardAction=o.exports}}(this,function(t,e){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(e),n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.resolveOptions(e),this.initSelection()}return r(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":n(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=o})},{select:5}],8:[function(t,e,i){!function(n,r){if(void 0!==i)r(e,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var o={exports:{}};r(o,n.clipboardAction,n.tinyEmitter,n.goodListener),n.clipboard=o.exports}}(this,function(t,e,i,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var i="data-clipboard-"+t;if(e.hasAttribute(i))return e.getAttribute(i)}var s=r(e),a=r(i),l=r(n),c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){function e(t,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.resolveOptions(i),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),h(e,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===c(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,l.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return o("action",t)}},{key:"defaultTarget",value:function(t){var e=o("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return o("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,i=!!document.queryCommandSupported;return e.forEach(function(t){i=i&&!!document.queryCommandSupported(t)}),i}}]),e}();t.exports=d})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,document,window,navigator)}):"object"==typeof exports?t(require("jquery"),document,window,navigator):t(jQuery,document,window,navigator)}(function(t,e,i,n,r){"use strict";var o,s,a=0,l=(o=n.userAgent,s=/msie\s\d+/i,o.search(s)>0&&s.exec(o).toString().split(" ")[1]<9&&(t("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,i=[].slice;if("function"!=typeof e)throw new TypeError;var n=i.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=e.prototype;var s=new o,a=e.apply(s,n.concat(i.call(arguments)));return Object(a)===a?a:s}return e.apply(t,n.concat(i.call(arguments)))};return r}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var i;if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return-1;var o=+e||0;if(Math.abs(o)===1/0&&(o=0),o>=r)return-1;for(i=Math.max(o>=0?o:r-Math.abs(o),0);i<r;){if(i in n&&n[i]===t)return i;i++}return-1});var c=function(n,o,s){this.VERSION="2.2.0",this.input=n,this.plugin_count=s,this.current_plugin=0,this.calc_count=0,this.update_tm=0,this.old_from=0,this.old_to=0,this.old_min_interval=null,this.raf_id=null,this.dragging=!1,this.force_redraw=!1,this.no_diapason=!1,this.has_tab_index=!0,this.is_key=!1,this.is_update=!1,this.is_start=!0,this.is_finish=!1,this.is_active=!1,this.is_resize=!1,this.is_click=!1,o=o||{},this.$cache={win:t(i),body:t(e.body),input:t(n),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]},this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]},this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var a,l,c,h=this.$cache.input,d=h.prop("value");for(c in a={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null},"INPUT"!==h[0].nodeName&&console&&console.warn&&console.warn("Base element should be <input>!",h[0]),(l={type:h.data("type"),min:h.data("min"),max:h.data("max"),from:h.data("from"),to:h.data("to"),step:h.data("step"),min_interval:h.data("minInterval"),max_interval:h.data("maxInterval"),drag_interval:h.data("dragInterval"),values:h.data("values"),from_fixed:h.data("fromFixed"),from_min:h.data("fromMin"),from_max:h.data("fromMax"),from_shadow:h.data("fromShadow"),to_fixed:h.data("toFixed"),to_min:h.data("toMin"),to_max:h.data("toMax"),to_shadow:h.data("toShadow"),prettify_enabled:h.data("prettifyEnabled"),prettify_separator:h.data("prettifySeparator"),force_edges:h.data("forceEdges"),keyboard:h.data("keyboard"),grid:h.data("grid"),grid_margin:h.data("gridMargin"),grid_num:h.data("gridNum"),grid_snap:h.data("gridSnap"),hide_min_max:h.data("hideMinMax"),hide_from_to:h.data("hideFromTo"),prefix:h.data("prefix"),postfix:h.data("postfix"),max_postfix:h.data("maxPostfix"),decorate_both:h.data("decorateBoth"),values_separator:h.data("valuesSeparator"),input_values_separator:h.data("inputValuesSeparator"),disable:h.data("disable"),block:h.data("block"),extra_classes:h.data("extraClasses")}).values=l.values&&l.values.split(","),l)l.hasOwnProperty(c)&&(l[c]!==r&&""!==l[c]||delete l[c]);d!==r&&""!==d&&((d=d.split(l.input_values_separator||o.input_values_separator||";"))[0]&&d[0]==+d[0]&&(d[0]=+d[0]),d[1]&&d[1]==+d[1]&&(d[1]=+d[1]),o&&o.values&&o.values.length?(a.from=d[0]&&o.values.indexOf(d[0]),a.to=d[1]&&o.values.indexOf(d[1])):(a.from=d[0]&&+d[0],a.to=d[1]&&+d[1])),t.extend(a,o),t.extend(a,l),this.options=a,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};c.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='<span class="irs js-irs-'+this.plugin_count+" "+this.options.extra_classes+'"></span>';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="0"><span class="irs-line-left"></span><span class="irs-line-mid"></span><span class="irs-line-right"></span></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span><span class="irs-bar"></span>'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar-edge"></span><span class="irs-shadow shadow-single"></span><span class="irs-slider single"></span>'),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-slider from"></span><span class="irs-slider to"></span>'),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,e=this.options.max,i=this.options.from,n=this.options.to;i>t&&n===e?this.$cache.s_from.addClass("type_last"):n<e&&this.$cache.s_to.addClass("type_last")},changeLevel:function(t){switch(t){case"single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake),this.$cache.s_single.addClass("state_hover");break;case"from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.$cache.s_from.addClass("state_hover"),this.$cache.s_from.addClass("type_last"),this.$cache.s_to.removeClass("type_last");break;case"to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake),this.$cache.s_to.addClass("state_hover"),this.$cache.s_to.addClass("type_last"),this.$cache.s_from.removeClass("type_last");break;case"both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),l&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),l&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var e,i;this.target||(e=(i="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,e+=i.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:e}))},pointerMove:function(t){if(this.dragging){var e=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=e-this.coords.x_gap,this.calc()}},pointerUp:function(e){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,l&&t("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(t.contains(this.$cache.cont[0],e.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(e,i){i.preventDefault();var n=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&("both"===e&&this.setTempMinInterval(),e||(e=this.target||"from"),this.current_plugin=this.plugin_count,this.target=e,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=n-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(e),l&&t("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,e){e.preventDefault();var i=e.pageX||e.originalEvent.touches&&e.originalEvent.touches[0].pageX;2!==e.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(i-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,e){if(!(this.current_plugin!==this.plugin_count||e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)){switch(e.which){case 83:case 65:case 40:case 37:e.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:e.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var e=this.coords.p_pointer,i=(this.options.max-this.options.min)/100;i=this.options.step/i,t?e+=i:e-=i,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*e),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),e=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=e,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(e,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var e=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,e=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,e=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(e)),this.target){case"base":var i=(this.options.max-this.options.min)/100,n=(this.result.from-this.options.min)/i,r=(this.result.to-this.options.min)/i;this.coords.p_single_real=this.toFixed(n),this.coords.p_from_real=this.toFixed(n),this.coords.p_to_real=this.toFixed(r),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(e),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(e),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(e),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both":if(this.options.from_fixed||this.options.to_fixed)break;e=this.toFixed(e+.001*this.coords.p_handle),this.coords.p_from_real=this.convertToRealPercent(e)-this.coords.p_gap_left,this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.convertToRealPercent(e)+this.coords.p_gap_right,this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to"),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case"both_one":if(this.options.from_fixed||this.options.to_fixed)break;var o=this.convertToRealPercent(e),s=this.result.from_percent,a=this.result.to_percent-s,l=a/2,c=o-l,h=o+l;c<0&&(h=(c=0)+a),h>100&&(c=(h=100)-a),this.coords.p_from_real=this.calcWithStep(c),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(h),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,e=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return e<0?e=0:e>t&&(e=t),e},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(t){return"single"===this.options.type?"single":t>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%"),this.$cache.single[0].style.left=this.labels.p_single_left+"%"),this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var t,e,i,n,r,o=this.options.values.length,s=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)o?(t=this.decorate(s[this.result.from]),this.$cache.single.html(t)):(n=this._prettify(this.result.from),t=this.decorate(n,this.result.from),this.$cache.single.html(t)),this.calcLabels(),this.labels.p_single_left<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{o?(this.options.decorate_both?(t=this.decorate(s[this.result.from]),t+=this.options.values_separator,t+=this.decorate(s[this.result.to])):t=this.decorate(s[this.result.from]+this.options.values_separator+s[this.result.to]),e=this.decorate(s[this.result.from]),i=this.decorate(s[this.result.to]),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(i)):(n=this._prettify(this.result.from),r=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(n,this.result.from),t+=this.options.values_separator,t+=this.decorate(r,this.result.to)):t=this.decorate(n+this.options.values_separator+r,this.result.to),e=this.decorate(n,this.result.from),i=this.decorate(r,this.result.to),this.$cache.single.html(t),this.$cache.from.html(e),this.$cache.to.html(i)),this.calcLabels();var a=Math.min(this.labels.p_single_left,this.labels.p_from_left),l=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,h=Math.max(l,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",h=c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",h=Math.max(l,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),a<this.labels.p_min+1?this.$cache.min[0].style.visibility="hidden":this.$cache.min[0].style.visibility="visible",h>100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,e,i,n,r=this.options,o=this.$cache,s="number"==typeof r.from_min&&!isNaN(r.from_min),a="number"==typeof r.from_max&&!isNaN(r.from_max),l="number"==typeof r.to_min&&!isNaN(r.to_min),c="number"==typeof r.to_max&&!isNaN(r.to_max);"single"===r.type?r.from_shadow&&(s||a)?(t=this.convertToPercent(s?r.from_min:r.min),e=this.convertToPercent(a?r.from_max:r.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,o.shad_single[0].style.display="block",o.shad_single[0].style.left=t+"%",o.shad_single[0].style.width=e+"%"):o.shad_single[0].style.display="none":(r.from_shadow&&(s||a)?(t=this.convertToPercent(s?r.from_min:r.min),e=this.convertToPercent(a?r.from_max:r.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),e=this.toFixed(e-this.coords.p_handle/100*e),t+=this.coords.p_handle/2,o.shad_from[0].style.display="block",o.shad_from[0].style.left=t+"%",o.shad_from[0].style.width=e+"%"):o.shad_from[0].style.display="none",r.to_shadow&&(l||c)?(i=this.convertToPercent(l?r.to_min:r.min),n=this.convertToPercent(c?r.to_max:r.max)-i,i=this.toFixed(i-this.coords.p_handle/100*i),n=this.toFixed(n-this.coords.p_handle/100*n),i+=this.coords.p_handle/2,o.shad_to[0].style.display="block",o.shad_to[0].style.left=i+"%",o.shad_to[0].style.width=n+"%"):o.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,e){var i,n=this.options.max-this.options.min,r=n/100;return n?(i=(e?t:t-this.options.min)/r,this.toFixed(i)):(this.no_diapason=!0,0)},convertToValue:function(t){var e,i,n=this.options.min,r=this.options.max,o=n.toString().split(".")[1],s=r.toString().split(".")[1],a=0,l=0;if(0===t)return this.options.min;if(100===t)return this.options.max;o&&(a=e=o.length),s&&(a=i=s.length),e&&i&&(a=e>=i?e:i),n<0&&(n=+(n+(l=Math.abs(n))).toFixed(a),r=+(r+l).toFixed(a));var c,h=(r-n)/100*t+n,d=this.options.step.toString().split(".")[1];return d?h=+h.toFixed(d.length):(h/=this.options.step,h=+(h*=this.options.step).toFixed(0)),l&&(h-=l),(c=d?+h.toFixed(d.length):this.toFixed(h))<this.options.min?c=this.options.min:c>this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var e=Math.round(t/this.coords.p_step)*this.coords.p_step;return e>100&&(e=100),100===t&&(e=100),this.toFixed(e)},checkMinInterval:function(t,e,i){var n,r,o=this.options;return o.min_interval?(n=this.convertToValue(t),r=this.convertToValue(e),"from"===i?r-n<o.min_interval&&(n=r-o.min_interval):n-r<o.min_interval&&(n=r+o.min_interval),this.convertToPercent(n)):t},checkMaxInterval:function(t,e,i){var n,r,o=this.options;return o.max_interval?(n=this.convertToValue(t),r=this.convertToValue(e),"from"===i?r-n>o.max_interval&&(n=r-o.max_interval):n-r>o.max_interval&&(n=r+o.max_interval),this.convertToPercent(n)):t},checkDiapason:function(t,e,i){var n=this.convertToValue(t),r=this.options;return"number"!=typeof e&&(e=r.min),"number"!=typeof i&&(i=r.max),n<e&&(n=e),n>i&&(n=i),this.convertToPercent(n)},toFixed:function(t){return+(t=t.toFixed(20))},_prettify:function(t){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(t):this.prettify(t):t},prettify:function(t){return t.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(t,e){return this.options.force_edges?(t<0?t=0:t>100-e&&(t=100-e),this.toFixed(t)):this.toFixed(t)},validate:function(){var t,e,i=this.options,n=this.result,r=i.values,o=r.length;if("string"==typeof i.min&&(i.min=+i.min),"string"==typeof i.max&&(i.max=+i.max),"string"==typeof i.from&&(i.from=+i.from),"string"==typeof i.to&&(i.to=+i.to),"string"==typeof i.step&&(i.step=+i.step),"string"==typeof i.from_min&&(i.from_min=+i.from_min),"string"==typeof i.from_max&&(i.from_max=+i.from_max),"string"==typeof i.to_min&&(i.to_min=+i.to_min),"string"==typeof i.to_max&&(i.to_max=+i.to_max),"string"==typeof i.grid_num&&(i.grid_num=+i.grid_num),i.max<i.min&&(i.max=i.min),o)for(i.p_values=[],i.min=0,i.max=o-1,i.step=1,i.grid_num=i.max,i.grid_snap=!0,e=0;e<o;e++)t=+r[e],isNaN(t)?t=r[e]:(r[e]=t,t=this._prettify(t)),i.p_values.push(t);("number"!=typeof i.from||isNaN(i.from))&&(i.from=i.min),("number"!=typeof i.to||isNaN(i.to))&&(i.to=i.max),"single"===i.type?(i.from<i.min&&(i.from=i.min),i.from>i.max&&(i.from=i.max)):(i.from<i.min&&(i.from=i.min),i.from>i.max&&(i.from=i.max),i.to<i.min&&(i.to=i.min),i.to>i.max&&(i.to=i.max),this.update_check.from&&(this.update_check.from!==i.from&&i.from>i.to&&(i.from=i.to),this.update_check.to!==i.to&&i.to<i.from&&(i.to=i.from)),i.from>i.to&&(i.from=i.to),i.to<i.from&&(i.to=i.from)),("number"!=typeof i.step||isNaN(i.step)||!i.step||i.step<0)&&(i.step=1),"number"==typeof i.from_min&&i.from<i.from_min&&(i.from=i.from_min),"number"==typeof i.from_max&&i.from>i.from_max&&(i.from=i.from_max),"number"==typeof i.to_min&&i.to<i.to_min&&(i.to=i.to_min),"number"==typeof i.to_max&&i.from>i.to_max&&(i.to=i.to_max),n&&(n.min!==i.min&&(n.min=i.min),n.max!==i.max&&(n.max=i.max),(n.from<n.min||n.from>n.max)&&(n.from=i.from),(n.to<n.min||n.to>n.max)&&(n.to=i.to)),("number"!=typeof i.min_interval||isNaN(i.min_interval)||!i.min_interval||i.min_interval<0)&&(i.min_interval=0),("number"!=typeof i.max_interval||isNaN(i.max_interval)||!i.max_interval||i.max_interval<0)&&(i.max_interval=0),i.min_interval&&i.min_interval>i.max-i.min&&(i.min_interval=i.max-i.min),i.max_interval&&i.max_interval>i.max-i.min&&(i.max_interval=i.max-i.min)},decorate:function(t,e){var i="",n=this.options;return n.prefix&&(i+=n.prefix),i+=t,n.max_postfix&&(n.values.length&&t===n.p_values[n.max]?(i+=n.max_postfix,n.postfix&&(i+=" ")):e===n.max&&(i+=n.max_postfix,n.postfix&&(i+=" "))),n.postfix&&(i+=n.postfix),i},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,e,i,n,r,o=this.options,s=o.max-o.min,a=o.grid_num,l=0,c=0,h=4,d="";for(this.calcGridMargin(),o.grid_snap?s>50?(a=50/o.step,l=this.toFixed(o.step/.5)):(a=s/o.step,l=this.toFixed(o.step/(s/100))):l=this.toFixed(100/a),a>4&&(h=3),a>7&&(h=2),a>14&&(h=1),a>28&&(h=0),t=0;t<a+1;t++){for(i=h,(c=this.toFixed(l*t))>100&&(c=100),this.coords.big[t]=c,n=(c-l*(t-1))/(i+1),e=1;e<=i&&0!==c;e++)d+='<span class="irs-grid-pol small" style="left: '+this.toFixed(c-n*e)+'%"></span>';d+='<span class="irs-grid-pol" style="left: '+c+'%"></span>',r=this.convertToValue(c),d+='<span class="irs-grid-text js-grid-text-'+t+'" style="left: '+c+'%">'+(r=o.values.length?o.p_values[r]:this._prettify(r))+"</span>"}this.coords.big_num=Math.ceil(a+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(d),this.cacheGridLabels()}},cacheGridLabels:function(){var t,e,i=this.coords.big_num;for(e=0;e<i;e++)t=this.$cache.grid.find(".js-grid-text-"+e),this.$cache.grid_labels.push(t);this.calcGridLabels()},calcGridLabels:function(){var t,e,i=[],n=[],r=this.coords.big_num;for(t=0;t<r;t++)this.coords.big_w[t]=this.$cache.grid_labels[t].outerWidth(!1),this.coords.big_p[t]=this.toFixed(this.coords.big_w[t]/this.coords.w_rs*100),this.coords.big_x[t]=this.toFixed(this.coords.big_p[t]/2),i[t]=this.toFixed(this.coords.big[t]-this.coords.big_x[t]),n[t]=this.toFixed(i[t]+this.coords.big_p[t]);for(this.options.force_edges&&(i[0]<-this.coords.grid_gap&&(i[0]=-this.coords.grid_gap,n[0]=this.toFixed(i[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),n[r-1]>100+this.coords.grid_gap&&(n[r-1]=100+this.coords.grid_gap,i[r-1]=this.toFixed(n[r-1]-this.coords.big_p[r-1]),this.coords.big_x[r-1]=this.toFixed(this.coords.big_p[r-1]-this.coords.grid_gap))),this.calcGridCollision(2,i,n),this.calcGridCollision(4,i,n),t=0;t<r;t++)e=this.$cache.grid_labels[t][0],this.coords.big_x[t]!==Number.POSITIVE_INFINITY&&(e.style.marginLeft=-this.coords.big_x[t]+"%")},calcGridCollision:function(t,e,i){var n,r,o,s=this.coords.big_num;for(n=0;n<s&&!((r=n+t/2)>=s);n+=t)o=this.$cache.grid_labels[r][0],i[n]<=e[r]?o.style.visibility="visible":o.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(e){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=t.extend(this.options,e),this.validate(),this.updateResult(e),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),t.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},t.fn.ionRangeSlider=function(e){return this.each(function(){t.data(this,"ionRangeSlider")||t.data(this,"ionRangeSlider",new c(this,e,a++))})},function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!i.requestAnimationFrame;++n)i.requestAnimationFrame=i[e[n]+"RequestAnimationFrame"],i.cancelAnimationFrame=i[e[n]+"CancelAnimationFrame"]||i[e[n]+"CancelRequestAnimationFrame"];i.requestAnimationFrame||(i.requestAnimationFrame=function(e,n){var r=(new Date).getTime(),o=Math.max(0,16-(r-t)),s=i.setTimeout(function(){e(r+o)},o);return t=r+o,s}),i.cancelAnimationFrame||(i.cancelAnimationFrame=function(t){clearTimeout(t)})}()});var _createClass=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Emitter=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(t){this._callbacks=this._callbacks||{};var e=this._callbacks[t];if(e){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];for(var o=0,s=s=e;;){if(o>=s.length)break;s[o++].apply(this,n)}}return this}},{key:"off",value:function(t,e){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1===arguments.length)return delete this._callbacks[t],this;for(var n=0;n<i.length;n++){if(i[n]===e){i.splice(n,1);break}}return this}}]),t}(),Dropzone=function(t){function e(t,i){_classCallCheck(this,e);var n,r=_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),o=void 0;if(r.element=t,r.version=e.version,r.defaultOptions.previewTemplate=r.defaultOptions.previewTemplate.replace(/\n*/g,""),r.clickableElements=[],r.listeners=[],r.files=[],"string"==typeof r.element&&(r.element=document.querySelector(r.element)),!r.element||null==r.element.nodeType)throw new Error("Invalid dropzone element.");if(r.element.dropzone)throw new Error("Dropzone already attached.");e.instances.push(r),r.element.dropzone=r;var s,a=null!=(n=e.optionsForElement(r.element))?n:{};if(r.options=e.extend({},r.defaultOptions,a,null!=i?i:{}),r.options.forceFallback||!e.isBrowserSupported())return s=r.options.fallback.call(r),_possibleConstructorReturn(r,s);if(null==r.options.url&&(r.options.url=r.element.getAttribute("action")),!r.options.url)throw new Error("No URL provided.");if(r.options.acceptedFiles&&r.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(r.options.uploadMultiple&&r.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return r.options.acceptedMimeTypes&&(r.options.acceptedFiles=r.options.acceptedMimeTypes,delete r.options.acceptedMimeTypes),null!=r.options.renameFilename&&(r.options.renameFile=function(t){return r.options.renameFilename.call(r,t.name,t)}),r.options.method=r.options.method.toUpperCase(),(o=r.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),!1!==r.options.previewsContainer&&(r.options.previewsContainer?r.previewsContainer=e.getElement(r.options.previewsContainer,"previewsContainer"):r.previewsContainer=r.element),r.options.clickable&&(!0===r.options.clickable?r.clickableElements=[r.element]:r.clickableElements=e.getElements(r.options.clickable,"clickable")),r.init(),r}return _inherits(e,Emitter),_createClass(e,null,[{key:"initClass",value:function(){this.prototype.Emitter=Emitter,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(t,e,i){if(i)return{dzuuid:i.file.upload.uuid,dzchunkindex:i.index,dztotalfilesize:i.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:i.file.upload.totalChunkCount,dzchunkbyteoffset:i.index*this.options.chunkSize}},accept:function(t,e){return e()},chunksUploaded:function(t,e){e()},fallback:function(){var t=void 0;this.element.className=this.element.className+" dz-browser-not-supported";for(var i=0,n=n=this.element.getElementsByTagName("div");;){if(i>=n.length)break;var r=n[i++];if(/(^| )dz-message($| )/.test(r.className)){t=r,r.className="dz-message";break}}t||(t=e.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(t));var o=t.getElementsByTagName("span")[0];return o&&(null!=o.textContent?o.textContent=this.options.dictFallbackMessage:null!=o.innerText&&(o.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,i,n){var r={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},o=t.width/t.height;null==e&&null==i?(e=r.srcWidth,i=r.srcHeight):null==e?e=i*o:null==i&&(i=e/o);var s=(e=Math.min(e,r.srcWidth))/(i=Math.min(i,r.srcHeight));if(r.srcWidth>e||r.srcHeight>i)if("crop"===n)o>s?(r.srcHeight=t.height,r.srcWidth=r.srcHeight*s):(r.srcWidth=t.width,r.srcHeight=r.srcWidth/s);else{if("contain"!==n)throw new Error("Unknown resizeMethod '"+n+"'");o>s?i=e/o:e=i*o}return r.srcX=(t.width-r.srcWidth)/2,r.srcY=(t.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=i,r},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview">\n <div class="dz-image"><img data-dz-thumbnail /></div>\n <div class="dz-details">\n <div class="dz-size"><span data-dz-size></span></div>\n <div class="dz-filename"><span data-dz-name></span></div>\n </div>\n <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n <div class="dz-error-message"><span data-dz-errormessage></span></div>\n <div class="dz-success-mark">\n <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n <title>Check</title>\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n </g>\n </svg>\n </div>\n <div class="dz-error-mark">\n <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n <title>Error</title>\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n </g>\n </g>\n </svg>\n </div>\n</div>',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:function(t){},dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:function(t){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var i=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){t.previewElement=e.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement);for(var n=0,r=r=t.previewElement.querySelectorAll("[data-dz-name]");;){if(n>=r.length)break;var o=r[n++];o.textContent=t.name}for(var s=0,a=a=t.previewElement.querySelectorAll("[data-dz-size]");!(s>=a.length);)(o=a[s++]).innerHTML=this.filesize(t.size);this.options.addRemoveLinks&&(t._removeLink=e.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink));for(var l=function(n){return n.preventDefault(),n.stopPropagation(),t.status===e.UPLOADING?e.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?e.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)},c=0,h=h=t.previewElement.querySelectorAll("[data-dz-remove]");;){if(c>=h.length)break;h[c++].addEventListener("click",l)}}},removedfile:function(t){return null!=t.previewElement&&null!=t.previewElement.parentNode&&t.previewElement.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){if(t.previewElement){t.previewElement.classList.remove("dz-file-preview");for(var i=0,n=n=t.previewElement.querySelectorAll("[data-dz-thumbnail]");;){if(i>=n.length)break;var r=n[i++];r.alt=t.name,r.src=e}return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){if(t.previewElement){t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error);for(var i=0,n=n=t.previewElement.querySelectorAll("[data-dz-errormessage]");;){if(i>=n.length)break;n[i++].textContent=e}}},errormultiple:function(){},processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(t,e,i){if(t.previewElement)for(var n=0,r=r=t.previewElement.querySelectorAll("[data-dz-uploadprogress]");;){if(n>=r.length)break;var o=r[n++];"PROGRESS"===o.nodeName?o.value=e:o.style.width=e+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(t){return this.emit("error",t,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(t){if(t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];for(var r=0,o=o=i;;){if(r>=o.length)break;var s=o[r++];for(var a in s){var l=s[a];t[a]=l}}return t}}]),_createClass(e,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(t){return t.accepted}).map(function(t){return t})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(t){return!t.accepted}).map(function(t){return t})}},{key:"getFilesWithStatus",value:function(t){return this.files.filter(function(e){return e.status===t}).map(function(t){return t})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(e.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(e.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(e.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(t){return t.status===e.UPLOADING||t.status===e.QUEUED}).map(function(t){return t})}},{key:"init",value:function(){var t=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(e.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length){!function e(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null===t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!==t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!==t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var i=t.hiddenFileInput.files;if(i.length)for(var n=0,r=r=i;!(n>=r.length);){var o=r[n++];t.addFile(o)}return t.emit("addedfiles",i),e()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(var i=0,n=n=this.events;;){if(i>=n.length)break;var r=n[i++];this.on(r,this.options[r])}this.on("uploadprogress",function(){return t.updateTotalUploadProgress()}),this.on("removedfile",function(){return t.updateTotalUploadProgress()}),this.on("canceled",function(e){return t.emit("complete",e)}),this.on("complete",function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)});var o=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(e){return t.emit("dragstart",e)},dragenter:function(e){return o(e),t.emit("dragenter",e)},dragover:function(e){var i=void 0;try{i=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",o(e),t.emit("dragover",e)},dragleave:function(e){return t.emit("dragleave",e)},drop:function(e){return o(e),t.drop(e)},dragend:function(e){return t.emit("dragend",e)}}}],this.clickableElements.forEach(function(i){return t.listeners.push({element:i,events:{click:function(n){return(i!==t.element||n.target===t.element||e.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,e.instances.splice(e.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var t=void 0,e=0,i=0;if(this.getActiveFiles().length){for(var n=0,r=r=this.getActiveFiles();;){if(n>=r.length)break;var o=r[n++];e+=o.upload.bytesSent,i+=o.upload.total}t=100*e/i}else t=100;return this.emit("totaluploadprogress",t,i,e)}},{key:"_getParamName",value:function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")}},{key:"_renameFile",value:function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)}},{key:"getFallbackForm",value:function(){var t,i=void 0;if(t=this.getExistingFallback())return t;var n='<div class="dz-fallback">';this.options.dictFallbackText&&(n+="<p>"+this.options.dictFallbackText+"</p>"),n+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>';var r=e.createElement(n);return"FORM"!==this.element.tagName?(i=e.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:r}},{key:"getExistingFallback",value:function(){for(var t=function(t){for(var e=0,i=i=t;;){if(e>=i.length)break;var n=i[e++];if(/(^| )fallback($| )/.test(n.className))return n}},e=["div","form"],i=0;i<e.length;i++){var n,r=e[i];if(n=t(this.element.getElementsByTagName(r)))return n}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var i in t.events){var n=t.events[i];e.push(t.element.addEventListener(i,n,!1))}return e}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(t){return function(){var e=[];for(var i in t.events){var n=t.events[i];e.push(t.element.removeEventListener(i,n,!1))}return e}()})}},{key:"disable",value:function(){var t=this;return this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(e){return t.cancelUpload(e)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(t){var e=0,i="b";if(t>0){for(var n=["tb","gb","mb","kb","b"],r=0;r<n.length;r++){var o=n[r];if(t>=Math.pow(this.options.filesizeBase,4-r)/10){e=t/Math.pow(this.options.filesizeBase,4-r),i=o;break}}e=Math.round(10*e)/10}return"<strong>"+e+"</strong> "+this.options.dictFileSizeUnits[i]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(t){if(t.dataTransfer){this.emit("drop",t);for(var e=[],i=0;i<t.dataTransfer.files.length;i++)e[i]=t.dataTransfer.files[i];if(this.emit("addedfiles",e),e.length){var n=t.dataTransfer.items;n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(e)}}}},{key:"paste",value:function(t){if(null!=__guard__(null!=t?t.clipboardData:void 0,function(t){return t.items})){this.emit("paste",t);var e=t.clipboardData.items;return e.length?this._addFilesFromItems(e):void 0}}},{key:"handleFiles",value:function(t){for(var e=0,i=i=t;;){if(e>=i.length)break;var n=i[e++];this.addFile(n)}}},{key:"_addFilesFromItems",value:function(t){var e=this;return function(){for(var i=[],n=0,r=r=t;;){if(n>=r.length)break;var o,s=r[n++];null!=s.webkitGetAsEntry&&(o=s.webkitGetAsEntry())?o.isFile?i.push(e.addFile(s.getAsFile())):o.isDirectory?i.push(e._addFilesFromDirectory(o,o.name)):i.push(void 0):null!=s.getAsFile&&(null==s.kind||"file"===s.kind)?i.push(e.addFile(s.getAsFile())):i.push(void 0)}return i}()}},{key:"_addFilesFromDirectory",value:function(t,e){var i=this,n=t.createReader(),r=function(t){return __guardMethod__(console,"log",function(e){return e.log(t)})};return function t(){return n.readEntries(function(n){if(n.length>0){for(var r=0,o=o=n;!(r>=o.length);){var s=o[r++];s.isFile?s.file(function(t){if(!i.options.ignoreHiddenFiles||"."!==t.name.substring(0,1))return t.fullPath=e+"/"+t.name,i.addFile(t)}):s.isDirectory&&i._addFilesFromDirectory(s,e+"/"+s.name)}t()}return null},r)}()}},{key:"accept",value:function(t,i){return t.size>1024*this.options.maxFilesize*1024?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):e.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,i):i(this.options.dictInvalidFileType)}},{key:"addFile",value:function(t){var i=this;return t.upload={uuid:e.uuidv4(),progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t),chunked:this.options.chunking&&(this.options.forceChunking||t.size>this.options.chunkSize),totalChunkCount:Math.ceil(t.size/this.options.chunkSize)},this.files.push(t),t.status=e.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return e?(t.accepted=!1,i._errorProcessing([t],e)):(t.accepted=!0,i.options.autoQueue&&i.enqueueFile(t)),i._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(t){for(var e=0,i=i=t;;){if(e>=i.length)break;var n=i[e++];this.enqueueFile(n)}return null}},{key:"enqueueFile",value:function(t){var i=this;if(t.status!==e.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=e.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return i.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(t){var e=this;if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(){return e._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var t=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(i){return t.emit("thumbnail",e,i),t._processingThumbnail=!1,t._processThumbnailQueue()})}}},{key:"removeFile",value:function(t){if(t.status===e.UPLOADING&&this.cancelUpload(t),this.files=without(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(t){null==t&&(t=!1);for(var i=0,n=n=this.files.slice();;){if(i>=n.length)break;var r=n[i++];(r.status!==e.UPLOADING||t)&&this.removeFile(r)}return null}},{key:"resizeImage",value:function(t,i,n,r,o){var s=this;return this.createThumbnail(t,i,n,r,!1,function(i,n){if(null==n)return o(t);var r=s.options.resizeMimeType;null==r&&(r=t.type);var a=n.toDataURL(r,s.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(a=ExifRestore.restore(t.dataURL,a)),o(e.dataURItoBlob(a))})}},{key:"createThumbnail",value:function(t,e,i,n,r,o){var s=this,a=new FileReader;return a.onload=function(){if(t.dataURL=a.result,"image/svg+xml"!==t.type)return s.createThumbnailFromUrl(t,e,i,n,r,o);null!=o&&o(a.result)},a.readAsDataURL(t)}},{key:"createThumbnailFromUrl",value:function(t,e,i,n,r,o,s){var a=this,l=document.createElement("img");return s&&(l.crossOrigin=s),l.onload=function(){var s=function(t){return t(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(s=function(t){return EXIF.getData(l,function(){return t(EXIF.getTag(this,"Orientation"))})}),s(function(r){t.width=l.width,t.height=l.height;var s=a.options.resize.call(a,t,e,i,n),c=document.createElement("canvas"),h=c.getContext("2d");switch(c.width=s.trgWidth,c.height=s.trgHeight,r>4&&(c.width=s.trgHeight,c.height=s.trgWidth),r){case 2:h.translate(c.width,0),h.scale(-1,1);break;case 3:h.translate(c.width,c.height),h.rotate(Math.PI);break;case 4:h.translate(0,c.height),h.scale(1,-1);break;case 5:h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:h.rotate(.5*Math.PI),h.translate(0,-c.height);break;case 7:h.rotate(.5*Math.PI),h.translate(c.width,-c.height),h.scale(-1,1);break;case 8:h.rotate(-.5*Math.PI),h.translate(-c.width,0)}drawImageIOSFix(h,l,null!=s.srcX?s.srcX:0,null!=s.srcY?s.srcY:0,s.srcWidth,s.srcHeight,null!=s.trgX?s.trgX:0,null!=s.trgY?s.trgY:0,s.trgWidth,s.trgHeight);var d=c.toDataURL("image/png");if(null!=o)return o(d,c)})},null!=o&&(l.onerror=o),l.src=t.dataURL}},{key:"processQueue",value:function(){var t=this.options.parallelUploads,e=this.getUploadingFiles().length,i=e;if(!(e>=t)){var n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,t-e));for(;i<t;){if(!n.length)return;this.processFile(n.shift()),i++}}}}},{key:"processFile",value:function(t){return this.processFiles([t])}},{key:"processFiles",value:function(t){for(var i=0,n=n=t;;){if(i>=n.length)break;var r=n[i++];r.processing=!0,r.status=e.UPLOADING,this.emit("processing",r)}return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)}},{key:"_getFilesWithXhr",value:function(t){return this.files.filter(function(e){return e.xhr===t}).map(function(t){return t})}},{key:"cancelUpload",value:function(t){if(t.status===e.UPLOADING){for(var i=this._getFilesWithXhr(t.xhr),n=0,r=r=i;;){if(n>=r.length)break;r[n++].status=e.CANCELED}void 0!==t.xhr&&t.xhr.abort();for(var o=0,s=s=i;;){if(o>=s.length)break;var a=s[o++];this.emit("canceled",a)}this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else t.status!==e.ADDED&&t.status!==e.QUEUED||(t.status=e.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(t){if("function"==typeof t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return t.apply(this,i)}return t}},{key:"uploadFile",value:function(t){return this.uploadFiles([t])}},{key:"uploadFiles",value:function(t){var i=this;this._transformFiles(t,function(n){if(t[0].upload.chunked){var r=t[0],o=n[0];r.upload.chunks=[];var s=function(){for(var n=0;void 0!==r.upload.chunks[n];)n++;if(!(n>=r.upload.totalChunkCount)){0;var s=n*i.options.chunkSize,a=Math.min(s+i.options.chunkSize,r.size),l={name:i._getParamName(0),data:o.webkitSlice?o.webkitSlice(s,a):o.slice(s,a),filename:r.upload.filename,chunkIndex:n};r.upload.chunks[n]={file:r,index:n,dataBlock:l,status:e.UPLOADING,progress:0,retries:0},i._uploadData(t,[l])}};if(r.upload.finishedChunkUpload=function(n){var o=!0;n.status=e.SUCCESS,n.dataBlock=null;for(var a=0;a<r.upload.totalChunkCount;a++){if(void 0===r.upload.chunks[a])return s();r.upload.chunks[a].status!==e.SUCCESS&&(o=!1)}o&&i.options.chunksUploaded(r,function(){i._finished(t,"",null)})},i.options.parallelChunkUploads)for(var a=0;a<r.upload.totalChunkCount;a++)s();else s()}else{for(var l=[],c=0;c<t.length;c++)l[c]={name:i._getParamName(c),data:n[c],filename:t[c].upload.filename};i._uploadData(t,l)}})}},{key:"_getChunk",value:function(t,e){for(var i=0;i<t.upload.totalChunkCount;i++)if(void 0!==t.upload.chunks[i]&&t.upload.chunks[i].xhr===e)return t.upload.chunks[i]}},{key:"_uploadData",value:function(t,i){for(var n=this,r=new XMLHttpRequest,o=0,s=s=t;;){if(o>=s.length)break;s[o++].xhr=r}t[0].upload.chunked&&(t[0].upload.chunks[i[0].chunkIndex].xhr=r);var a=this.resolveOption(this.options.method,t),l=this.resolveOption(this.options.url,t);r.open(a,l,!0),r.timeout=this.resolveOption(this.options.timeout,t),r.withCredentials=!!this.options.withCredentials,r.onload=function(e){n._finishedUploading(t,r,e)},r.onerror=function(){n._handleUploadError(t,r)},(null!=r.upload?r.upload:r).onprogress=function(e){return n._updateFilesUploadProgress(t,r,e)};var c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var h in this.options.headers&&e.extend(c,this.options.headers),c){var d=c[h];d&&r.setRequestHeader(h,d)}var u=new FormData;if(this.options.params){var p=this.options.params;for(var f in"function"==typeof p&&(p=p.call(this,t,r,t[0].upload.chunked?this._getChunk(t[0],r):null)),p){var m=p[f];u.append(f,m)}}for(var g=0,v=v=t;;){if(g>=v.length)break;var y=v[g++];this.emit("sending",y,r,u)}this.options.uploadMultiple&&this.emit("sendingmultiple",t,r,u),this._addFormElementData(u);for(var b=0;b<i.length;b++){var _=i[b];u.append(_.name,_.data,_.filename)}this.submitRequest(r,u,t)}},{key:"_transformFiles",value:function(t,e){for(var i=this,n=[],r=0,o=function(o){i.options.transformFile.call(i,t[o],function(i){n[o]=i,++r===t.length&&e(n)})},s=0;s<t.length;s++)o(s)}},{key:"_addFormElementData",value:function(t){if("FORM"===this.element.tagName)for(var e=0,i=i=this.element.querySelectorAll("input, textarea, select, button");;){if(e>=i.length)break;var n=i[e++],r=n.getAttribute("name"),o=n.getAttribute("type");if(o&&(o=o.toLowerCase()),void 0!==r&&null!==r)if("SELECT"===n.tagName&&n.hasAttribute("multiple"))for(var s=0,a=a=n.options;;){if(s>=a.length)break;var l=a[s++];l.selected&&t.append(r,l.value)}else(!o||"checkbox"!==o&&"radio"!==o||n.checked)&&t.append(r,n.value)}}},{key:"_updateFilesUploadProgress",value:function(t,e,i){var n=void 0;if(void 0!==i){if(n=100*i.loaded/i.total,t[0].upload.chunked){var r=t[0],o=this._getChunk(r,e);o.progress=n,o.total=i.total,o.bytesSent=i.loaded;r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var s=0;s<r.upload.totalChunkCount;s++)void 0!==r.upload.chunks[s]&&void 0!==r.upload.chunks[s].progress&&(r.upload.progress+=r.upload.chunks[s].progress,r.upload.total+=r.upload.chunks[s].total,r.upload.bytesSent+=r.upload.chunks[s].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount}else for(var a=0,l=l=t;;){if(a>=l.length)break;var c=l[a++];c.upload.progress=n,c.upload.total=i.total,c.upload.bytesSent=i.loaded}for(var h=0,d=d=t;;){if(h>=d.length)break;var u=d[h++];this.emit("uploadprogress",u,u.upload.progress,u.upload.bytesSent)}}else{var p=!0;n=100;for(var f=0,m=m=t;;){if(f>=m.length)break;var g=m[f++];100===g.upload.progress&&g.upload.bytesSent===g.upload.total||(p=!1),g.upload.progress=n,g.upload.bytesSent=g.upload.total}if(p)return;for(var v=0,y=y=t;;){if(v>=y.length)break;var b=y[v++];this.emit("uploadprogress",b,n,b.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(t,i,n){var r=void 0;if(t[0].status!==e.CANCELED&&4===i.readyState){if("arraybuffer"!==i.responseType&&"blob"!==i.responseType&&(r=i.responseText,i.getResponseHeader("content-type")&&~i.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(t){n=t,r="Invalid JSON response from server."}this._updateFilesUploadProgress(t),200<=i.status&&i.status<300?t[0].upload.chunked?t[0].upload.finishedChunkUpload(this._getChunk(t[0],i)):this._finished(t,r,n):this._handleUploadError(t,i,r)}}},{key:"_handleUploadError",value:function(t,i,n){if(t[0].status!==e.CANCELED){if(t[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(t[0],i);if(r.retries++<this.options.retryChunksLimit)return void this._uploadData(t,[r.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}for(var o=0,s=s=t;;){if(o>=s.length)break;s[o++];this._errorProcessing(t,n||this.options.dictResponseError.replace("{{statusCode}}",i.status),i)}}}},{key:"submitRequest",value:function(t,e,i){t.send(e)}},{key:"_finished",value:function(t,i,n){for(var r=0,o=o=t;;){if(r>=o.length)break;var s=o[r++];s.status=e.SUCCESS,this.emit("success",s,i,n),this.emit("complete",s)}if(this.options.uploadMultiple&&(this.emit("successmultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(t,i,n){for(var r=0,o=o=t;;){if(r>=o.length)break;var s=o[r++];s.status=e.ERROR,this.emit("error",s,i,n),this.emit("complete",s)}if(this.options.uploadMultiple&&(this.emit("errormultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}}]),e}();Dropzone.initClass(),Dropzone.version="5.4.0",Dropzone.options={},Dropzone.optionsForElement=function(t){return t.getAttribute("id")?Dropzone.options[camelize(t.getAttribute("id"))]:void 0},Dropzone.instances=[],Dropzone.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},Dropzone.autoDiscover=!0,Dropzone.discover=function(){var t=void 0;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];var e=function(e){return function(){for(var i=[],n=0,r=r=e;;){if(n>=r.length)break;var o=r[n++];/(^| )dropzone($| )/.test(o.className)?i.push(t.push(o)):i.push(void 0)}return i}()};e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return function(){for(var e=[],i=0,n=n=t;;){if(i>=n.length)break;var r=n[i++];!1!==Dropzone.optionsForElement(r)?e.push(new Dropzone(r)):e.push(void 0)}return e}()},Dropzone.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],Dropzone.isBrowserSupported=function(){var t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var e=0,i=i=Dropzone.blacklistedBrowsers;;){if(e>=i.length)break;i[e++].test(navigator.userAgent)&&(t=!1)}else t=!1;else t=!1;return t},Dropzone.dataURItoBlob=function(t){for(var e=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(e.length),r=new Uint8Array(n),o=0,s=e.length,a=0<=s;a?o<=s:o>=s;a?o++:o--)r[o]=e.charCodeAt(o);return new Blob([n],{type:i})};var without=function(t,e){return t.filter(function(t){return t!==e}).map(function(t){return t})},camelize=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})};Dropzone.createElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e.childNodes[0]},Dropzone.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},Dropzone.getElement=function(t,e){var i=void 0;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},Dropzone.getElements=function(t,e){var i=void 0,n=void 0;if(t instanceof Array){n=[];try{for(var r=0,o=o=t;!(r>=o.length);)i=o[r++],n.push(this.getElement(i,e))}catch(t){n=null}}else if("string"==typeof t){n=[];for(var s=0,a=a=document.querySelectorAll(t);!(s>=a.length);)i=a[s++],n.push(i)}else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},Dropzone.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},Dropzone.isValidFile=function(t,e){if(!e)return!0;e=e.split(",");for(var i=t.type,n=i.replace(/\/.*$/,""),r=0,o=o=e;;){if(r>=o.length)break;var s=o[r++];if("."===(s=s.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(s.toLowerCase(),t.name.length-s.length))return!0}else if(/\/\*$/.test(s)){if(n===s.replace(/\/.*$/,""))return!0}else if(i===s)return!0}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new Dropzone(this,t)})}),"undefined"!=typeof module&&null!==module?module.exports=Dropzone:window.Dropzone=Dropzone,Dropzone.ADDED="added",Dropzone.QUEUED="queued",Dropzone.ACCEPTED=Dropzone.QUEUED,Dropzone.UPLOADING="uploading",Dropzone.PROCESSING=Dropzone.UPLOADING,Dropzone.CANCELED="canceled",Dropzone.ERROR="error",Dropzone.SUCCESS="success";var detectVerticalSquash=function(t){t.naturalWidth;var e=t.naturalHeight,i=document.createElement("canvas");i.width=1,i.height=e;var n=i.getContext("2d");n.drawImage(t,0,0);for(var r=n.getImageData(1,0,1,e).data,o=0,s=e,a=e;a>o;){0===r[4*(a-1)+3]?s=a:o=a,a=s+o>>1}var l=a/e;return 0===l?1:l},drawImageIOSFix=function(t,e,i,n,r,o,s,a,l,c){var h=detectVerticalSquash(e);return t.drawImage(e,i,n,r,o,s,a,l,c/h)},ExifRestore=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(t){for(var e="",i=void 0,n=void 0,r="",o=void 0,s=void 0,a=void 0,l="",c=0;o=(i=t[c++])>>2,s=(3&i)<<4|(n=t[c++])>>4,a=(15&n)<<2|(r=t[c++])>>6,l=63&r,isNaN(n)?a=l=64:isNaN(r)&&(l=64),e=e+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(l),i=n=r="",o=s=a=l="",c<t.length;);return e}},{key:"restore",value:function(t,e){if(!t.match("data:image/jpeg;base64,"))return e;var i=this.decode64(t.replace("data:image/jpeg;base64,","")),n=this.slice2Segments(i),r=this.exifManipulation(e,n);return"data:image/jpeg;base64,"+this.encode64(r)}},{key:"exifManipulation",value:function(t,e){var i=this.getExifArray(e),n=this.insertExif(t,i);return new Uint8Array(n)}},{key:"getExifArray",value:function(t){for(var e=void 0,i=0;i<t.length;){if(255===(e=t[i])[0]&225===e[1])return e;i++}return[]}},{key:"insertExif",value:function(t,e){var i=t.replace("data:image/jpeg;base64,",""),n=this.decode64(i),r=n.indexOf(255,3),o=n.slice(0,r),s=n.slice(r),a=o;return a=(a=a.concat(e)).concat(s)}},{key:"slice2Segments",value:function(t){for(var e=0,i=[];;){if(255===t[e]&218===t[e+1])break;if(255===t[e]&216===t[e+1])e+=2;else{var n=e+(256*t[e+2]+t[e+3])+2,r=t.slice(e,n);i.push(r),e=n}if(e>t.length)break}return i}},{key:"decode64",value:function(t){var e=void 0,i=void 0,n="",r=void 0,o=void 0,s="",a=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");e=this.KEY_STR.indexOf(t.charAt(a++))<<2|(r=this.KEY_STR.indexOf(t.charAt(a++)))>>4,i=(15&r)<<4|(o=this.KEY_STR.indexOf(t.charAt(a++)))>>2,n=(3&o)<<6|(s=this.KEY_STR.indexOf(t.charAt(a++))),l.push(e),64!==o&&l.push(i),64!==s&&l.push(n),e=i=n="",r=o=s="",a<t.length;);return l}}]),t}();ExifRestore.initClass();var contentLoaded=function(t,e){var i=!1,n=!0,r=t.document,o=r.documentElement,s=r.addEventListener?"addEventListener":"attachEvent",a=r.addEventListener?"removeEventListener":"detachEvent",l=r.addEventListener?"":"on",c=function n(o){if("readystatechange"!==o.type||"complete"===r.readyState)return("load"===o.type?t:r)[a](l+o.type,n,!1),!i&&(i=!0)?e.call(t,o.type||o):void 0};if("complete"!==r.readyState){if(r.createEventObject&&o.doScroll){try{n=!t.frameElement}catch(t){}n&&function t(){try{o.doScroll("left")}catch(e){return void setTimeout(t,50)}return c("poll")}()}return r[s](l+"DOMContentLoaded",c,!1),r[s](l+"readystatechange",c,!1),t[s](l+"load",c,!1)}};function __guard__(t,e){return void 0!==t&&null!==t?e(t):void 0}function __guardMethod__(t,e,i){return void 0!==t&&null!==t&&"function"==typeof t[e]?i(t,e):void 0}Dropzone._autoDiscoverFunction=function(){if(Dropzone.autoDiscover)return Dropzone.discover()},contentLoaded(window,Dropzone._autoDiscoverFunction),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e=function(){function e(t,e,i,n){this.markup=t,this.children=e,this.options=i,this.callback=n}return e.prototype.render=function(e){var i=t(this.markup);if(this.options&&this.options.contents&&i.html(this.options.contents),this.options&&this.options.className&&i.addClass(this.options.className),this.options&&this.options.data&&t.each(this.options.data,function(t,e){i.attr("data-"+t,e)}),this.options&&this.options.click&&i.on("click",this.options.click),this.children){var n=i.find(".note-children-container");this.children.forEach(function(t){t.render(n.length?n:i)})}return this.callback&&this.callback(i,this.options),this.options&&this.options.callback&&this.options.callback(i),e&&e.append(i),i},e}(),i=function(i,n){return function(){var r="object"==typeof arguments[1]?arguments[1]:arguments[0],o=t.isArray(arguments[0])?arguments[0]:[];return r&&r.children&&(o=r.children),new e(i,o,r,n)}},n=i('<div class="note-editor note-frame panel"/>'),r=i('<div class="note-toolbar-wrapper panel-default"><div class="note-toolbar panel-heading" role="toolbar"></div></div>'),o=i('<div class="note-editing-area"/>'),s=i('<textarea class="note-codable" role="textbox" aria-multiline="true"/>'),a=i('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'),l=i(['<output class="note-status-output" aria-live="polite"/>','<div class="note-statusbar" role="status">',' <div class="note-resizebar" role="seperator" aria-orientation="horizontal" aria-label="Resize">',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>'," </div>","</div>"].join("")),c=i('<div class="note-editor"/>'),h=i([' <output class="note-status-output" aria-live="polite"/>','<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"/>'].join("")),d=i('<div class="note-btn-group btn-group">'),u=i('<ul class="dropdown-menu" role="list">',function(e,i){var n=t.isArray(i.items)?i.items.map(function(t){var e="string"==typeof t?t:t.value||"",n=i.template?i.template(t):t,r="object"==typeof t?t.option:void 0;return'<li role="listitem" aria-label="'+t+'"><a href="#" '+('data-value="'+e+'"'+(void 0!==r?' data-option="'+r+'"':""))+">"+n+"</a></li>"}).join(""):i.items;e.html(n).attr({"aria-label":i.title})}),p=i('<ul class="dropdown-menu note-check" role="list">',function(e,i){var n=t.isArray(i.items)?i.items.map(function(t){var e="string"==typeof t?t:t.value||"",n=i.template?i.template(t):t;return'<li role="listitem" aria-label="'+t+'"><a href="#" data-value="'+e+'">'+f(i.checkClassName)+" "+n+"</a></li>"}).join(""):i.items;e.html(n).attr({"aria-label":i.title})}),f=function(t,e){return"<"+(e=e||"i")+' class="'+t+'"/>'},m={editor:n,toolbar:r,editingArea:o,codable:s,editable:a,statusbar:l,airEditor:c,airEditable:h,buttonGroup:d,dropdown:u,dropdownButtonContents:function(t,e){return t+" "+f(e.icons.caret,"span")},dropdownCheck:p,palette:i('<div class="note-color-palette"/>',function(t,e){for(var i=[],n=0,r=e.colors.length;n<r;n++){for(var o=e.eventName,s=e.colors[n],a=e.colorsName[n],l=[],c=0,h=s.length;c<h;c++){var d=s[c],u=a[c];l.push(['<button type="button" class="note-color-btn"','style="background-color:',d,'" ','data-event="',o,'" ','data-value="',d,'" ','title="',u,'" ','aria-label="',u,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}i.push('<div class="note-color-row">'+l.join("")+"</div>")}t.html(i.join("")),e.tooltip&&t.find(".note-color-btn").tooltip({container:e.container,trigger:"hover",placement:"bottom"})}),dialog:i('<div class="modal" aria-hidden="false" tabindex="-1" role="dialog"/>',function(t,e){e.fade&&t.addClass("fade"),t.attr({"aria-label":e.title}),t.html(['<div class="modal-dialog">',' <div class="modal-content">',e.title?' <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">×</button> <h4 class="modal-title">'+e.title+"</h4> </div>":"",' <div class="modal-body">'+e.body+"</div>",e.footer?' <div class="modal-footer">'+e.footer+"</div>":""," </div>","</div>"].join(""))}),popover:i(['<div class="note-popover popover in">',' <div class="arrow"/>',' <div class="popover-content note-children-container"/>',"</div>"].join(""),function(t,e){var i=void 0!==e.direction?e.direction:"bottom";t.addClass(i),e.hideArrow&&t.find(".arrow").hide()}),checkbox:i('<div class="checkbox"></div>',function(t,e){t.html([" <label"+(e.id?' for="'+e.id+'"':"")+">",' <input role="checkbox" type="checkbox"'+(e.id?' id="'+e.id+'"':""),e.checked?" checked":"",' aria-checked="'+(e.checked?"true":"false")+'"/>',e.text?e.text:"","</label>"].join(""))}),icon:f,options:{},button:function(t,e){return i('<button type="button" class="note-btn btn btn-default btn-sm" role="button" tabindex="-1">',function(t,e){e&&e.tooltip&&t.attr({title:e.tooltip,"aria-label":e.tooltip}).tooltip({container:e.container,trigger:"hover",placement:"bottom"})})(t,e)},toggleBtn:function(t,e){t.toggleClass("disabled",!e),t.attr("disabled",!e)},toggleBtnActive:function(t,e){t.toggleClass("active",e)},onDialogShown:function(t,e){t.one("shown.bs.modal",e)},onDialogHidden:function(t,e){t.one("hidden.bs.modal",e)},showDialog:function(t){t.modal("show")},hideDialog:function(t){t.modal("hide")},createLayout:function(t,e){var i=(e.airMode?m.airEditor([m.editingArea([m.airEditable()])]):m.editor([m.toolbar(),m.editingArea([m.codable(),m.editable()]),m.statusbar()])).render();return i.insertAfter(t),{note:t,editor:i,toolbar:i.find(".note-toolbar"),editingArea:i.find(".note-editing-area"),editable:i.find(".note-editable"),codable:i.find(".note-codable"),statusbar:i.find(".note-statusbar")}},removeLayout:function(t,e){t.html(e.editable.html()),e.editor.remove(),t.show()}};var g=0;var v={eq:function(t){return function(e){return t===e}},eq2:function(t,e){return t===e},peq2:function(t){return function(e,i){return e[t]===i[t]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(t,e){return function(i){return t(i)&&e(i)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},uniqueId:function(t){var e=++g+"";return t?t+e:e},rect2bnd:function(t){var e=$(document);return{top:t.top+e.scrollTop(),left:t.left+e.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e},namespaceToCamel:function(t,e){return(e=e||"")+t.split(".").map(function(t){return t.substring(0,1).toUpperCase()+t.substring(1)}).join("")},debounce:function(t,e,i){var n,r=this;return function(){var o=r,s=arguments,a=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||t.apply(o,s)},e),a&&t.apply(o,s)}}};function y(t){return t[0]}function b(t){return t[t.length-1]}function _(t){return t.slice(1)}function x(e,i){return t.inArray(i,e)}function w(t,e){return-1!==x(t,e)}var k={head:y,last:b,initial:function(t){return t.slice(0,t.length-1)},tail:_,prev:function(t,e){var i=x(t,e);return-1===i?null:t[i-1]},next:function(t,e){var i=x(t,e);return-1===i?null:t[i+1]},find:function(t,e){for(var i=0,n=t.length;i<n;i++){var r=t[i];if(e(r))return r}},contains:w,all:function(t,e){for(var i=0,n=t.length;i<n;i++)if(!e(t[i]))return!1;return!0},sum:function(t,e){return e=e||v.self,t.reduce(function(t,i){return t+e(i)},0)},from:function(t){for(var e=[],i=t.length,n=-1;++n<i;)e[n]=t[n];return e},isEmpty:function(t){return!t||!t.length},clusterBy:function(t,e){return t.length?_(t).reduce(function(t,i){var n=b(t);return e(b(n),i)?n[n.length]=i:t[t.length]=[i],t},[[y(t)]]):[]},compact:function(t){for(var e=[],i=0,n=t.length;i<n;i++)t[i]&&e.push(t[i]);return e},unique:function(t){for(var e=[],i=0,n=t.length;i<n;i++)w(e,t[i])||e.push(t[i]);return e}},C="function"==typeof define&&define.amd;var S,D=navigator.userAgent,T=/MSIE|Trident/i.test(D);if(T){var A=/MSIE (\d+[.]\d+)/.exec(D);A&&(S=parseFloat(A[1])),(A=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(D))&&(S=parseFloat(A[1]))}var M=/Edge\/\d+/.test(D),E=!!window.CodeMirror;if(!E&&C)if("function"==typeof __webpack_require__)try{require.resolve("codemirror"),E=!0}catch(t){}else if("undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror"),E=!0}catch(t){}else void 0!==require.specified&&(E=require.specified("codemirror"));var P="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,I=T||M?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",O={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:T,isEdge:M,isFF:!M&&/firefox/i.test(D),isPhantom:/PhantomJS/i.test(D),isWebkit:!M&&/webkit/i.test(D),isChrome:!M&&/chrome/i.test(D),isSafari:!M&&/safari/i.test(D),browserVersion:S,jqueryVersion:parseFloat(t.fn.jquery),isSupportAmd:C,isSupportTouch:P,hasCodeMirror:E,isFontInstalled:function(e){var i="Comic Sans MS"===e?"Courier New":"Comic Sans MS",n=t("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),r=n.css("fontFamily",i).width(),o=n.css("fontFamily",e+","+i).width();return n.remove(),r!==o},isW3CRangeSupport:!!document.createRange,inputEventName:I},N=String.fromCharCode(160);function L(e){return e&&t(e).hasClass("note-editable")}function j(t){return t=t.toUpperCase(),function(e){return e&&e.nodeName.toUpperCase()===t}}function F(t){return t&&3===t.nodeType}function R(t){return t&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(t.nodeName.toUpperCase())}function H(t){return!L(t)&&(t&&/^DIV|^P|^LI|^H[1-7]/.test(t.nodeName.toUpperCase()))}var z=j("PRE"),B=j("LI");var U=j("TABLE"),W=j("DATA");function Y(t){return!(X(t)||V(t)||q(t)||H(t)||U(t)||K(t)||W(t))}function V(t){return t&&/^UL|^OL/.test(t.nodeName.toUpperCase())}var q=j("HR");function G(t){return t&&/^TD|^TH/.test(t.nodeName.toUpperCase())}var K=j("BLOCKQUOTE");function X(t){return G(t)||K(t)||L(t)}var Z=j("A");var Q=j("BODY");var J=O.isMSIE&&O.browserVersion<11?" ":"<br>";function tt(t){return F(t)?t.nodeValue.length:t?t.childNodes.length:0}function et(t){var e=tt(t);return 0===e||(!F(t)&&1===e&&t.innerHTML===J||!(!k.all(t.childNodes,F)||""!==t.innerHTML))}function it(t){R(t)||tt(t)||(t.innerHTML=J)}function nt(t,e){for(;t;){if(e(t))return t;if(L(t))break;t=t.parentNode}return null}function rt(t,e){e=e||v.fail;var i=[];return nt(t,function(t){return L(t)||i.push(t),e(t)}),i}function ot(t,e){e=e||v.fail;for(var i=[];t&&!e(t);)i.push(t),t=t.nextSibling;return i}function st(t,e){var i=e.nextSibling,n=e.parentNode;return i?n.insertBefore(t,i):n.appendChild(t),t}function at(e,i){return t.each(i,function(t,i){e.appendChild(i)}),e}function lt(t){return 0===t.offset}function ct(t){return t.offset===tt(t.node)}function ht(t){return lt(t)||ct(t)}function dt(t,e){for(;t&&t!==e;){if(0!==pt(t))return!1;t=t.parentNode}return!0}function ut(t,e){if(!e)return!1;for(;t&&t!==e;){if(pt(t)!==tt(t.parentNode)-1)return!1;t=t.parentNode}return!0}function pt(t){for(var e=0;t=t.previousSibling;)e+=1;return e}function ft(t){return!!(t&&t.childNodes&&t.childNodes.length)}function mt(t,e){var i,n;if(0===t.offset){if(L(t.node))return null;i=t.node.parentNode,n=pt(t.node)}else ft(t.node)?n=tt(i=t.node.childNodes[t.offset-1]):(i=t.node,n=e?0:t.offset-1);return{node:i,offset:n}}function gt(t,e){var i,n;if(tt(t.node)===t.offset){if(L(t.node))return null;i=t.node.parentNode,n=pt(t.node)+1}else ft(t.node)?(i=t.node.childNodes[t.offset],n=0):(i=t.node,n=e?tt(t.node):t.offset+1);return{node:i,offset:n}}function vt(t,e){return t.node===e.node&&t.offset===e.offset}function yt(t,e){var i=e&&e.isSkipPaddingBlankHTML,n=e&&e.isNotSplitEdgePoint;if(ht(t)&&(F(t.node)||n)){if(lt(t))return t.node;if(ct(t))return t.node.nextSibling}if(F(t.node))return t.node.splitText(t.offset);var r=t.node.childNodes[t.offset],o=st(t.node.cloneNode(!1),t.node);return at(o,ot(r)),i||(it(t.node),it(o)),o}function bt(t,e,i){var n=rt(e.node,v.eq(t));return n.length?1===n.length?yt(e,i):n.reduce(function(t,n){return t===e.node&&(t=yt(e,i)),yt({node:n,offset:t?pt(t):tt(n)},i)}):null}function _t(t){return document.createElement(t)}function xt(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var i=t.parentNode;if(!e){for(var n=[],r=0,o=t.childNodes.length;r<o;r++)n.push(t.childNodes[r]);for(r=0,o=n.length;r<o;r++)i.insertBefore(n[r],t)}i.removeChild(t)}}var wt=j("TEXTAREA");function kt(t,e){var i=wt(t[0])?t.val():t.html();return e?i.replace(/[\n\r]/g,""):i}var Ct={NBSP_CHAR:N,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:J,emptyPara:"<p>"+J+"</p>",makePredByNodeName:j,isEditable:L,isControlSizing:function(e){return e&&t(e).hasClass("note-control-sizing")},isText:F,isElement:function(t){return t&&1===t.nodeType},isVoid:R,isPara:H,isPurePara:function(t){return H(t)&&!B(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:Y,isBlock:v.not(Y),isBodyInline:function(t){return Y(t)&&!nt(t,H)},isBody:Q,isParaInline:function(t){return Y(t)&&!!nt(t,H)},isPre:z,isList:V,isTable:U,isData:W,isCell:G,isBlockquote:K,isBodyContainer:X,isAnchor:Z,isDiv:j("DIV"),isLi:B,isBR:j("BR"),isSpan:j("SPAN"),isB:j("B"),isU:j("U"),isS:j("S"),isI:j("I"),isImg:j("IMG"),isTextarea:wt,isEmpty:et,isEmptyAnchor:v.and(Z,et),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||v.ok;var i=[];return t.previousSibling&&e(t.previousSibling)&&i.push(t.previousSibling),i.push(t),t.nextSibling&&e(t.nextSibling)&&i.push(t.nextSibling),i},nodeLength:tt,isLeftEdgePoint:lt,isRightEdgePoint:ct,isEdgePoint:ht,isLeftEdgeOf:dt,isRightEdgeOf:ut,isLeftEdgePointOf:function(t,e){return lt(t)&&dt(t.node,e)},isRightEdgePointOf:function(t,e){return ct(t)&&ut(t.node,e)},prevPoint:mt,nextPoint:gt,isSamePoint:vt,isVisiblePoint:function(t){if(F(t.node)||!ft(t.node)||et(t.node))return!0;var e=t.node.childNodes[t.offset-1],i=t.node.childNodes[t.offset];return!(e&&!R(e)||i&&!R(i))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=mt(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=gt(t)}return null},isCharPoint:function(t){if(!F(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&" "!==e&&e!==N},walkPoint:function(t,e,i,n){for(var r=t;r&&(i(r),!vt(r,e));)r=gt(r,n&&t.node!==r.node&&e.node!==r.node)},ancestor:nt,singleChildAncestor:function(t,e){for(t=t.parentNode;t&&1===tt(t);){if(e(t))return t;if(L(t))break;t=t.parentNode}return null},listAncestor:rt,lastAncestor:function(t,e){var i=rt(t);return k.last(i.filter(e))},listNext:ot,listPrev:function(t,e){e=e||v.fail;for(var i=[];t&&!e(t);)i.push(t),t=t.previousSibling;return i},listDescendant:function(t,e){var i=[];return e=e||v.ok,function n(r){t!==r&&e(r)&&i.push(r);for(var o=0,s=r.childNodes.length;o<s;o++)n(r.childNodes[o])}(t),i},commonAncestor:function(e,i){for(var n=rt(e),r=i;r;r=r.parentNode)if(t.inArray(r,n)>-1)return r;return null},wrap:function(e,i){var n=e.parentNode,r=t("<"+i+">")[0];return n.insertBefore(r,e),r.appendChild(e),r},insertAfter:st,appendChildNodes:at,position:pt,hasChildren:ft,makeOffsetPath:function(t,e){return rt(e,v.eq(t)).map(pt).reverse()},fromOffsetPath:function(t,e){for(var i=t,n=0,r=e.length;n<r;n++)i=i.childNodes.length<=e[n]?i.childNodes[i.childNodes.length-1]:i.childNodes[e[n]];return i},splitTree:bt,splitPoint:function(t,e){var i,n,r=e?H:X,o=rt(t.node,r),s=k.last(o)||t.node;r(s)?(i=o[o.length-2],n=s):n=(i=s).parentNode;var a=i&&bt(i,t,{isSkipPaddingBlankHTML:e,isNotSplitEdgePoint:e});return a||n!==t.node||(a=t.node.childNodes[t.offset]),{rightNode:a,container:n}},create:_t,createText:function(t){return document.createTextNode(t)},remove:xt,removeWhile:function(t,e){for(;t&&!L(t)&&e(t);){var i=t.parentNode;xt(t),t=i}},replace:function(t,e){if(t.nodeName.toUpperCase()===e.toUpperCase())return t;var i=_t(e);return t.style.cssText&&(i.style.cssText=t.style.cssText),at(i,k.from(t.childNodes)),st(i,t),xt(t),i},html:function(e,i){var n=kt(e);i&&(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(t,e,i){i=i.toUpperCase();var n=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(i)&&!!e,r=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(i);return t+(n||r?"\n":"")}),n=t.trim(n));return n},value:kt,posFromPlaceholder:function(e){var i=t(e),n=i.offset(),r=i.outerHeight(!0);return{left:n.left,top:n.top+r}},attachEvents:function(t,e){Object.keys(e).forEach(function(i){t.on(i,e[i])})},detachEvents:function(t,e){Object.keys(e).forEach(function(i){t.off(i,e[i])})},isCustomStyleTag:function(t){return t&&!F(t)&&k.contains(t.classList,"note-styletag")}};t.summernote=t.summernote||{lang:{}},t.extend(t.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var St={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221},Dt={isEdit:function(t){return k.contains([St.BACKSPACE,St.TAB,St.ENTER,St.SPACE,St.DELETE],t)},isMove:function(t){return k.contains([St.LEFT,St.UP,St.RIGHT,St.DOWN],t)},nameFromCode:v.invertObject(St),code:St};function Tt(t,e){var i,n,r=t.parentElement(),o=document.body.createTextRange(),s=k.from(r.childNodes);for(i=0;i<s.length;i++)if(!Ct.isText(s[i])){if(o.moveToElementText(s[i]),o.compareEndPoints("StartToStart",t)>=0)break;n=s[i]}if(0!==i&&Ct.isText(s[i-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(n||r),a.collapse(!n),l=n?n.nextSibling:r.firstChild;var c=t.duplicate();c.setEndPoint("StartToStart",a);for(var h=c.text.replace(/[\r\n]/g,"").length;h>l.nodeValue.length&&l.nextSibling;)h-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&Ct.isText(l.nextSibling)&&h===l.nodeValue.length&&(h-=l.nodeValue.length,l=l.nextSibling),r=l,i=h}return{cont:r,offset:i}}function At(t){var e=function(t,i){var n,r;if(Ct.isText(t)){var o=Ct.listPrev(t,v.not(Ct.isText)),s=k.last(o).previousSibling;n=s||t.parentNode,i+=k.sum(k.tail(o),Ct.nodeLength),r=!s}else{if(n=t.childNodes[i]||t,Ct.isText(n))return e(n,0);i=0,r=!1}return{node:n,collapseToStart:r,offset:i}},i=document.body.createTextRange(),n=e(t.node,t.offset);return i.moveToElementText(n.node),i.collapse(n.collapseToStart),i.moveStart("character",n.offset),i}var Mt=function(){function e(t,e,i,n){this.sc=t,this.so=e,this.ec=i,this.eo=n,this.isOnEditable=this.makeIsOn(Ct.isEditable),this.isOnList=this.makeIsOn(Ct.isList),this.isOnAnchor=this.makeIsOn(Ct.isAnchor),this.isOnCell=this.makeIsOn(Ct.isCell),this.isOnData=this.makeIsOn(Ct.isData)}return e.prototype.nativeRange=function(){if(O.isW3CRangeSupport){var t=document.createRange();return t.setStart(this.sc,this.so),t.setEnd(this.ec,this.eo),t}var e=At({node:this.sc,offset:this.so});return e.setEndPoint("EndToEnd",At({node:this.ec,offset:this.eo})),e},e.prototype.getPoints=function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}},e.prototype.getStartPoint=function(){return{node:this.sc,offset:this.so}},e.prototype.getEndPoint=function(){return{node:this.ec,offset:this.eo}},e.prototype.select=function(){var t=this.nativeRange();if(O.isW3CRangeSupport){var e=document.getSelection();e.rangeCount>0&&e.removeAllRanges(),e.addRange(t)}else t.select();return this},e.prototype.scrollIntoView=function(e){var i=t(e).height();return e.scrollTop+i<this.sc.offsetTop&&(e.scrollTop+=Math.abs(e.scrollTop+i-this.sc.offsetTop)),this},e.prototype.normalize=function(){var t=function(t,e){if(Ct.isVisiblePoint(t)&&!Ct.isEdgePoint(t)||Ct.isVisiblePoint(t)&&Ct.isRightEdgePoint(t)&&!e||Ct.isVisiblePoint(t)&&Ct.isLeftEdgePoint(t)&&e||Ct.isVisiblePoint(t)&&Ct.isBlock(t.node)&&Ct.isEmpty(t.node))return t;var i=Ct.ancestor(t.node,Ct.isBlock);if((Ct.isLeftEdgePointOf(t,i)||Ct.isVoid(Ct.prevPoint(t).node))&&!e||(Ct.isRightEdgePointOf(t,i)||Ct.isVoid(Ct.nextPoint(t).node))&&e){if(Ct.isVisiblePoint(t))return t;e=!e}return(e?Ct.nextPointUntil(Ct.nextPoint(t),Ct.isVisiblePoint):Ct.prevPointUntil(Ct.prevPoint(t),Ct.isVisiblePoint))||t},i=t(this.getEndPoint(),!1),n=this.isCollapsed()?i:t(this.getStartPoint(),!0);return new e(n.node,n.offset,i.node,i.offset)},e.prototype.nodes=function(t,e){t=t||v.ok;var i=e&&e.includeAncestor,n=e&&e.fullyContains,r=this.getStartPoint(),o=this.getEndPoint(),s=[],a=[];return Ct.walkPoint(r,o,function(e){var r;Ct.isEditable(e.node)||(n?(Ct.isLeftEdgePoint(e)&&a.push(e.node),Ct.isRightEdgePoint(e)&&k.contains(a,e.node)&&(r=e.node)):r=i?Ct.ancestor(e.node,t):e.node,r&&t(r)&&s.push(r))},!0),k.unique(s)},e.prototype.commonAncestor=function(){return Ct.commonAncestor(this.sc,this.ec)},e.prototype.expand=function(t){var i=Ct.ancestor(this.sc,t),n=Ct.ancestor(this.ec,t);if(!i&&!n)return new e(this.sc,this.so,this.ec,this.eo);var r=this.getPoints();return i&&(r.sc=i,r.so=0),n&&(r.ec=n,r.eo=Ct.nodeLength(n)),new e(r.sc,r.so,r.ec,r.eo)},e.prototype.collapse=function(t){return t?new e(this.sc,this.so,this.sc,this.so):new e(this.ec,this.eo,this.ec,this.eo)},e.prototype.splitText=function(){var t=this.sc===this.ec,i=this.getPoints();return Ct.isText(this.ec)&&!Ct.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),Ct.isText(this.sc)&&!Ct.isEdgePoint(this.getStartPoint())&&(i.sc=this.sc.splitText(this.so),i.so=0,t&&(i.ec=i.sc,i.eo=this.eo-this.so)),new e(i.sc,i.so,i.ec,i.eo)},e.prototype.deleteContents=function(){if(this.isCollapsed())return this;var i=this.splitText(),n=i.nodes(null,{fullyContains:!0}),r=Ct.prevPointUntil(i.getStartPoint(),function(t){return!k.contains(n,t.node)}),o=[];return t.each(n,function(t,e){var i=e.parentNode;r.node!==i&&1===Ct.nodeLength(i)&&o.push(i),Ct.remove(e,!1)}),t.each(o,function(t,e){Ct.remove(e,!1)}),new e(r.node,r.offset,r.node,r.offset).normalize()},e.prototype.makeIsOn=function(t){return function(){var e=Ct.ancestor(this.sc,t);return!!e&&e===Ct.ancestor(this.ec,t)}},e.prototype.isLeftEdgeOf=function(t){if(!Ct.isLeftEdgePoint(this.getStartPoint()))return!1;var e=Ct.ancestor(this.sc,t);return e&&Ct.isLeftEdgeOf(this.sc,e)},e.prototype.isCollapsed=function(){return this.sc===this.ec&&this.so===this.eo},e.prototype.wrapBodyInlineWithPara=function(){if(Ct.isBodyContainer(this.sc)&&Ct.isEmpty(this.sc))return this.sc.innerHTML=Ct.emptyPara,new e(this.sc.firstChild,0,this.sc.firstChild,0);var t,i=this.normalize();if(Ct.isParaInline(this.sc)||Ct.isPara(this.sc))return i;if(Ct.isInline(i.sc)){var n=Ct.listAncestor(i.sc,v.not(Ct.isInline));t=k.last(n),Ct.isInline(t)||(t=n[n.length-2]||i.sc.childNodes[i.so])}else t=i.sc.childNodes[i.so>0?i.so-1:0];var r=Ct.listPrev(t,Ct.isParaInline).reverse();if((r=r.concat(Ct.listNext(t.nextSibling,Ct.isParaInline))).length){var o=Ct.wrap(k.head(r),"p");Ct.appendChildNodes(o,k.tail(r))}return this.normalize()},e.prototype.insertNode=function(t){var e=this.wrapBodyInlineWithPara().deleteContents(),i=Ct.splitPoint(e.getStartPoint(),Ct.isInline(t));return i.rightNode?i.rightNode.parentNode.insertBefore(t,i.rightNode):i.container.appendChild(t),t},e.prototype.pasteHTML=function(e){var i=t("<div></div>").html(e)[0],n=k.from(i.childNodes),r=this.wrapBodyInlineWithPara().deleteContents();return n.reverse().map(function(t){return r.insertNode(t)}).reverse()},e.prototype.toString=function(){var t=this.nativeRange();return O.isW3CRangeSupport?t.toString():t.text},e.prototype.getWordRange=function(t){var i=this.getEndPoint();if(!Ct.isCharPoint(i))return this;var n=Ct.prevPointUntil(i,function(t){return!Ct.isCharPoint(t)});return t&&(i=Ct.nextPointUntil(i,function(t){return!Ct.isCharPoint(t)})),new e(n.node,n.offset,i.node,i.offset)},e.prototype.bookmark=function(t){return{s:{path:Ct.makeOffsetPath(t,this.sc),offset:this.so},e:{path:Ct.makeOffsetPath(t,this.ec),offset:this.eo}}},e.prototype.paraBookmark=function(t){return{s:{path:k.tail(Ct.makeOffsetPath(k.head(t),this.sc)),offset:this.so},e:{path:k.tail(Ct.makeOffsetPath(k.last(t),this.ec)),offset:this.eo}}},e.prototype.getClientRects=function(){return this.nativeRange().getClientRects()},e}(),Et={create:function(t,e,i,n){if(4===arguments.length)return new Mt(t,e,i,n);if(2===arguments.length)return new Mt(t,e,i=t,n=e);var r=this.createFromSelection();return r||1!==arguments.length?r:(r=this.createFromNode(arguments[0])).collapse(Ct.emptyPara===arguments[0].innerHTML)},createFromSelection:function(){var t,e,i,n;if(O.isW3CRangeSupport){var r=document.getSelection();if(!r||0===r.rangeCount)return null;if(Ct.isBody(r.anchorNode))return null;var o=r.getRangeAt(0);t=o.startContainer,e=o.startOffset,i=o.endContainer,n=o.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=Tt(l,!0),h=Tt(a,!1);Ct.isText(c.node)&&Ct.isLeftEdgePoint(c)&&Ct.isTextNode(h.node)&&Ct.isRightEdgePoint(h)&&h.node.nextSibling===c.node&&(c=h),t=c.cont,e=c.offset,i=h.cont,n=h.offset}return new Mt(t,e,i,n)},createFromNode:function(t){var e=t,i=0,n=t,r=Ct.nodeLength(n);return Ct.isVoid(e)&&(i=Ct.listPrev(e).length-1,e=e.parentNode),Ct.isBR(n)?(r=Ct.listPrev(n).length-1,n=n.parentNode):Ct.isVoid(n)&&(r=Ct.listPrev(n).length,n=n.parentNode),this.create(e,i,n,r)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var i=Ct.fromOffsetPath(t,e.s.path),n=e.s.offset,r=Ct.fromOffsetPath(t,e.e.path),o=e.e.offset;return new Mt(i,n,r,o)},createFromParaBookmark:function(t,e){var i=t.s.offset,n=t.e.offset,r=Ct.fromOffsetPath(k.head(e),t.s.path),o=Ct.fromOffsetPath(k.last(e),t.e.path);return new Mt(r,i,o,n)}};var Pt=function(){function t(t){this.stack=[],this.stackOffset=-1,this.$editable=t,this.editable=t[0]}return t.prototype.makeSnapshot=function(){var t=Et.create(this.editable);return{contents:this.$editable.html(),bookmark:t?t.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}},t.prototype.applySnapshot=function(t){null!==t.contents&&this.$editable.html(t.contents),null!==t.bookmark&&Et.createFromBookmark(this.editable,t.bookmark).select()},t.prototype.rewind=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])},t.prototype.reset=function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()},t.prototype.undo=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))},t.prototype.redo=function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))},t.prototype.recordUndo=function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot())},t}(),It=function(){function e(){}return e.prototype.jQueryCSS=function(e,i){if(O.jqueryVersion<1.9){var n={};return t.each(i,function(t,i){n[i]=e.css(i)}),n}return e.css(i)},e.prototype.fromNode=function(t){var e=this.jQueryCSS(t,["font-family","font-size","text-align","list-style-type","line-height"])||{};return e["font-size"]=parseInt(e["font-size"],10),e},e.prototype.stylePara=function(e,i){t.each(e.nodes(Ct.isPara,{includeAncestor:!0}),function(e,n){t(n).css(i)})},e.prototype.styleNodes=function(e,i){e=e.splitText();var n=i&&i.nodeName||"SPAN",r=!(!i||!i.expandClosestSibling),o=!(!i||!i.onlyPartialContains);if(e.isCollapsed())return[e.insertNode(Ct.create(n))];var s=Ct.makePredByNodeName(n),a=e.nodes(Ct.isText,{fullyContains:!0}).map(function(t){return Ct.singleChildAncestor(t,s)||Ct.wrap(t,n)});if(r){if(o){var l=e.nodes();s=v.and(s,function(t){return k.contains(l,t)})}return a.map(function(e){var i=Ct.withClosestSiblings(e,s),n=k.head(i),r=k.tail(i);return t.each(r,function(t,e){Ct.appendChildNodes(n,e.childNodes),Ct.remove(e)}),k.head(i)})}return a},e.prototype.current=function(e){var i=t(Ct.isElement(e.sc)?e.sc:e.sc.parentNode),n=this.fromNode(i);try{n=t.extend(n,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||n["font-family"]})}catch(t){}if(e.isOnList()){var r=t.inArray(n["list-style-type"],["circle","disc","disc-leading-zero","square"])>-1;n["list-style"]=r?"unordered":"ordered"}else n["list-style"]="none";var o=Ct.ancestor(e.sc,Ct.isPara);if(o&&o.style["line-height"])n["line-height"]=o.style.lineHeight;else{var s=parseInt(n["line-height"],10)/parseInt(n["font-size"],10);n["line-height"]=s.toFixed(1)}return n.anchor=e.isOnAnchor()&&Ct.ancestor(e.sc,Ct.isAnchor),n.ancestors=Ct.listAncestor(e.sc,Ct.isEditable),n.range=e,n},e}(),Ot=function(){function e(){}return e.prototype.insertOrderedList=function(t){this.toggleList("OL",t)},e.prototype.insertUnorderedList=function(t){this.toggleList("UL",t)},e.prototype.indent=function(e){var i=this,n=Et.create(e).wrapBodyInlineWithPara(),r=n.nodes(Ct.isPara,{includeAncestor:!0}),o=k.clusterBy(r,v.peq2("parentNode"));t.each(o,function(e,n){var r=k.head(n);Ct.isLi(r)?i.wrapList(n,r.parentNode.nodeName):t.each(n,function(e,i){t(i).css("marginLeft",function(t,e){return(parseInt(e,10)||0)+25})})}),n.select()},e.prototype.outdent=function(e){var i=this,n=Et.create(e).wrapBodyInlineWithPara(),r=n.nodes(Ct.isPara,{includeAncestor:!0}),o=k.clusterBy(r,v.peq2("parentNode"));t.each(o,function(e,n){var r=k.head(n);Ct.isLi(r)?i.releaseList([n]):t.each(n,function(e,i){t(i).css("marginLeft",function(t,e){return(e=parseInt(e,10)||0)>25?e-25:""})})}),n.select()},e.prototype.toggleList=function(e,i){var n=this,r=Et.create(i).wrapBodyInlineWithPara(),o=r.nodes(Ct.isPara,{includeAncestor:!0}),s=r.paraBookmark(o),a=k.clusterBy(o,v.peq2("parentNode"));if(k.find(o,Ct.isPurePara)){var l=[];t.each(a,function(t,i){l=l.concat(n.wrapList(i,e))}),o=l}else{var c=r.nodes(Ct.isList,{includeAncestor:!0}).filter(function(i){return!t.nodeName(i,e)});c.length?t.each(c,function(t,i){Ct.replace(i,e)}):o=this.releaseList(a,!0)}Et.createFromParaBookmark(s,o).select()},e.prototype.wrapList=function(t,e){var i=k.head(t),n=k.last(t),r=Ct.isList(i.previousSibling)&&i.previousSibling,o=Ct.isList(n.nextSibling)&&n.nextSibling,s=r||Ct.insertAfter(Ct.create(e||"UL"),n);return t=t.map(function(t){return Ct.isPurePara(t)?Ct.replace(t,"LI"):t}),Ct.appendChildNodes(s,t),o&&(Ct.appendChildNodes(s,k.from(o.childNodes)),Ct.remove(o)),t},e.prototype.releaseList=function(e,i){var n=[];return t.each(e,function(e,r){var o=k.head(r),s=k.last(r),a=i?Ct.lastAncestor(o,Ct.isList):o.parentNode,l=a.childNodes.length>1?Ct.splitTree(a,{node:s.parentNode,offset:Ct.position(s)+1},{isSkipPaddingBlankHTML:!0}):null,c=Ct.splitTree(a,{node:o.parentNode,offset:Ct.position(o)},{isSkipPaddingBlankHTML:!0});r=i?Ct.listDescendant(c,Ct.isLi):k.from(c.childNodes).filter(Ct.isLi),!i&&Ct.isList(a.parentNode)||(r=r.map(function(t){return Ct.replace(t,"P")})),t.each(k.from(r).reverse(),function(t,e){Ct.insertAfter(e,a)});var h=k.compact([a,c,l]);t.each(h,function(e,i){var n=[i].concat(Ct.listDescendant(i,Ct.isList));t.each(n.reverse(),function(t,e){Ct.nodeLength(e)||Ct.remove(e,!0)})}),n=n.concat(r)}),n},e}(),Nt=function(){function e(){this.bullet=new Ot}return e.prototype.insertTab=function(t,e){var i=Ct.createText(new Array(e+1).join(Ct.NBSP_CHAR));(t=t.deleteContents()).insertNode(i,!0),(t=Et.create(i,e)).select()},e.prototype.insertParagraph=function(e){var i=Et.create(e);i=(i=i.deleteContents()).wrapBodyInlineWithPara();var n,r=Ct.ancestor(i.sc,Ct.isPara);if(r){if(Ct.isEmpty(r)&&Ct.isLi(r))return void this.bullet.toggleList(r.parentNode.nodeName);if(Ct.isEmpty(r)&&Ct.isPara(r)&&Ct.isBlockquote(r.parentNode))Ct.insertAfter(r,r.parentNode),n=r;else{n=Ct.splitTree(r,i.getStartPoint());var o=Ct.listDescendant(r,Ct.isEmptyAnchor);o=o.concat(Ct.listDescendant(n,Ct.isEmptyAnchor)),t.each(o,function(t,e){Ct.remove(e)}),(Ct.isHeading(n)||Ct.isPre(n)||Ct.isCustomStyleTag(n))&&Ct.isEmpty(n)&&(n=Ct.replace(n,"p"))}}else{var s=i.sc.childNodes[i.so];n=t(Ct.emptyPara)[0],s?i.sc.insertBefore(n,s):i.sc.appendChild(n)}Et.create(n,0).normalize().select().scrollIntoView(e)},e}(),Lt=function(t,e,i,n){var r={colPos:0,rowPos:0},o=[],s=[];function a(t,e,i,n,r,s,a){var l={baseRow:i,baseCell:n,isRowSpan:r,isColSpan:s,isVirtual:a};o[t]||(o[t]=[]),o[t][e]=l}function l(t,e,i,n){return{baseCell:t.baseCell,action:e,virtualTable:{rowIndex:i,cellIndex:n}}}function c(t,e){if(!o[t])return e;if(!o[t][e])return e;for(var i=e;o[t][i];)if(i++,!o[t][i])return i}function h(t,e){var i=c(t.rowIndex,e.cellIndex),n=e.colSpan>1,o=e.rowSpan>1,s=t.rowIndex===r.rowPos&&e.cellIndex===r.colPos;a(t.rowIndex,i,t,e,o,n,!1);var l=e.attributes.rowSpan?parseInt(e.attributes.rowSpan.value,10):0;if(l>1)for(var h=1;h<l;h++){var u=t.rowIndex+h;d(u,i,e,s),a(u,i,t,e,!0,n,!0)}var p=e.attributes.colSpan?parseInt(e.attributes.colSpan.value,10):0;if(p>1)for(var f=1;f<p;f++){var m=c(t.rowIndex,i+f);d(t.rowIndex,m,e,s),a(t.rowIndex,m,t,e,o,!0,!0)}}function d(t,e,i,n){t===r.rowPos&&r.colPos>=i.cellIndex&&i.cellIndex<=e&&!n&&r.colPos++}function u(t){switch(e){case Lt.where.Column:if(t.isColSpan)return Lt.resultAction.SubtractSpanCount;break;case Lt.where.Row:if(!t.isVirtual&&t.isRowSpan)return Lt.resultAction.AddCell;if(t.isRowSpan)return Lt.resultAction.SubtractSpanCount}return Lt.resultAction.RemoveCell}function p(t){switch(e){case Lt.where.Column:if(t.isColSpan)return Lt.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return Lt.resultAction.Ignore;break;case Lt.where.Row:if(t.isRowSpan)return Lt.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return Lt.resultAction.Ignore}return Lt.resultAction.AddCell}this.getActionList=function(){for(var t=e===Lt.where.Row?r.rowPos:-1,n=e===Lt.where.Column?r.colPos:-1,a=0,c=!0;c;){var h=t>=0?t:a,d=n>=0?n:a,f=o[h];if(!f)return c=!1,s;var m=f[d];if(!m)return c=!1,s;var g=Lt.resultAction.Ignore;switch(i){case Lt.requestAction.Add:g=p(m);break;case Lt.requestAction.Delete:g=u(m)}s.push(l(m,g,h,d)),a++}return s},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())?(r.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()?r.rowPos=t.parentElement.rowIndex:console.error("Impossible to identify start Row point.",t)):console.error("Impossible to identify start Cell point.",t),function(){for(var t=n.rows,e=0;e<t.length;e++)for(var i=t[e].cells,r=0;r<i.length;r++)h(t[e],i[r])}()};Lt.where={Row:0,Column:1},Lt.requestAction={Add:0,Delete:1},Lt.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var jt,Ft=function(){function e(){}return e.prototype.tab=function(t,e){var i=Ct.ancestor(t.commonAncestor(),Ct.isCell),n=Ct.ancestor(i,Ct.isTable),r=Ct.listDescendant(n,Ct.isCell),o=k[e?"prev":"next"](r,i);o&&Et.create(o,0).select()},e.prototype.addRow=function(e,i){for(var n=Ct.ancestor(e.commonAncestor(),Ct.isCell),r=t(n).closest("tr"),o=this.recoverAttributes(r),s=t("<tr"+o+"></tr>"),a=new Lt(n,Lt.where.Row,Lt.requestAction.Add,t(r).closest("table")[0]).getActionList(),l=0;l<a.length;l++){var c=a[l],h=this.recoverAttributes(c.baseCell);switch(c.action){case Lt.resultAction.AddCell:s.append("<td"+h+">"+Ct.blank+"</td>");break;case Lt.resultAction.SumSpanCount:if("top"===i)if((c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=r[0].rowIndex){var d=t("<div></div>").append(t("<td"+h+">"+Ct.blank+"</td>").removeAttr("rowspan")).html();s.append(d);break}var u=parseInt(c.baseCell.rowSpan,10);u++,c.baseCell.setAttribute("rowSpan",u)}}if("top"===i)r.before(s);else{if(n.rowSpan>1){var p=r[0].rowIndex+(n.rowSpan-2);return void t(t(r).parent().find("tr")[p]).after(t(s))}r.after(s)}},e.prototype.addCol=function(e,i){var n=Ct.ancestor(e.commonAncestor(),Ct.isCell),r=t(n).closest("tr");t(r).siblings().push(r);for(var o=new Lt(n,Lt.where.Column,Lt.requestAction.Add,t(r).closest("table")[0]).getActionList(),s=0;s<o.length;s++){var a=o[s],l=this.recoverAttributes(a.baseCell);switch(a.action){case Lt.resultAction.AddCell:"right"===i?t(a.baseCell).after("<td"+l+">"+Ct.blank+"</td>"):t(a.baseCell).before("<td"+l+">"+Ct.blank+"</td>");break;case Lt.resultAction.SumSpanCount:if("right"===i){var c=parseInt(a.baseCell.colSpan,10);c++,a.baseCell.setAttribute("colSpan",c)}else t(a.baseCell).before("<td"+l+">"+Ct.blank+"</td>")}}},e.prototype.recoverAttributes=function(t){var e="";if(!t)return e;for(var i=t.attributes||[],n=0;n<i.length;n++)"id"!==i[n].name.toLowerCase()&&i[n].specified&&(e+=" "+i[n].name+"='"+i[n].value+"'");return e},e.prototype.deleteRow=function(e){for(var i=Ct.ancestor(e.commonAncestor(),Ct.isCell),n=t(i).closest("tr"),r=n.children("td, th").index(t(i)),o=n[0].rowIndex,s=new Lt(i,Lt.where.Row,Lt.requestAction.Delete,t(n).closest("table")[0]).getActionList(),a=0;a<s.length;a++)if(s[a]){var l=s[a].baseCell,c=s[a].virtualTable,h=l.rowSpan&&l.rowSpan>1,d=h?parseInt(l.rowSpan,10):0;switch(s[a].action){case Lt.resultAction.Ignore:continue;case Lt.resultAction.AddCell:var u=n.next("tr")[0];if(!u)continue;var p=n[0].cells[r];h&&(d>2?(d--,u.insertBefore(p,u.cells[r]),u.cells[r].setAttribute("rowSpan",d),u.cells[r].innerHTML=""):2===d&&(u.insertBefore(p,u.cells[r]),u.cells[r].removeAttribute("rowSpan"),u.cells[r].innerHTML=""));continue;case Lt.resultAction.SubtractSpanCount:h&&(d>2?(d--,l.setAttribute("rowSpan",d),c.rowIndex!==o&&l.cellIndex===r&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==o&&l.cellIndex===r&&(l.innerHTML="")));continue;case Lt.resultAction.RemoveCell:continue}}n.remove()},e.prototype.deleteCol=function(e){for(var i=Ct.ancestor(e.commonAncestor(),Ct.isCell),n=t(i).closest("tr"),r=n.children("td, th").index(t(i)),o=new Lt(i,Lt.where.Column,Lt.requestAction.Delete,t(n).closest("table")[0]).getActionList(),s=0;s<o.length;s++)if(o[s])switch(o[s].action){case Lt.resultAction.Ignore:continue;case Lt.resultAction.SubtractSpanCount:var a=o[s].baseCell;if(a.colSpan&&a.colSpan>1){var l=a.colSpan?parseInt(a.colSpan,10):0;l>2?(l--,a.setAttribute("colSpan",l),a.cellIndex===r&&(a.innerHTML="")):2===l&&(a.removeAttribute("colSpan"),a.cellIndex===r&&(a.innerHTML=""))}continue;case Lt.resultAction.RemoveCell:Ct.remove(o[s].baseCell,!0);continue}},e.prototype.createTable=function(e,i,n){for(var r,o=[],s=0;s<e;s++)o.push("<td>"+Ct.blank+"</td>");r=o.join("");for(var a,l=[],c=0;c<i;c++)l.push("<tr>"+r+"</tr>");a=l.join("");var h=t("<table>"+a+"</table>");return n&&n.tableClassName&&h.addClass(n.tableClassName),h[0]},e.prototype.deleteTable=function(e){var i=Ct.ancestor(e.commonAncestor(),Ct.isCell);t(i).closest("table").remove()},e}(),$t=function(){function e(e){var i=this;this.context=e,this.$note=e.layoutInfo.note,this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.options=e.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.style=new It,this.table=new Ft,this.typing=new Nt,this.bullet=new Ot,this.history=new Pt(this.$editable),this.context.memo("help.undo",this.lang.help.undo),this.context.memo("help.redo",this.lang.help.redo),this.context.memo("help.tab",this.lang.help.tab),this.context.memo("help.untab",this.lang.help.untab),this.context.memo("help.insertParagraph",this.lang.help.insertParagraph),this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList),this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList),this.context.memo("help.indent",this.lang.help.indent),this.context.memo("help.outdent",this.lang.help.outdent),this.context.memo("help.formatPara",this.lang.help.formatPara),this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule),this.context.memo("help.fontName",this.lang.help.fontName);for(var n=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],r=0,o=n.length;r<o;r++)this[n[r]]=function(t){return function(e){i.beforeCommand(),document.execCommand(t,!1,e),i.afterCommand(!0)}}(n[r]),this.context.memo("help."+n[r],this.lang.help[n[r]]);this.fontName=this.wrapCommand(function(t){return i.fontStyling("font-family","'"+t+"'")}),this.fontSize=this.wrapCommand(function(t){return i.fontStyling("font-size",t+"px")});for(r=1;r<=6;r++)this["formatH"+r]=function(t){return function(){i.formatBlock("H"+t)}}(r),this.context.memo("help.formatH"+r,this.lang.help["formatH"+r]);this.insertParagraph=this.wrapCommand(function(){i.typing.insertParagraph(i.editable)}),this.insertOrderedList=this.wrapCommand(function(){i.bullet.insertOrderedList(i.editable)}),this.insertUnorderedList=this.wrapCommand(function(){i.bullet.insertUnorderedList(i.editable)}),this.indent=this.wrapCommand(function(){i.bullet.indent(i.editable)}),this.outdent=this.wrapCommand(function(){i.bullet.outdent(i.editable)}),this.insertNode=this.wrapCommand(function(e){i.isLimited(t(e).text().length)||(i.createRange().insertNode(e),Et.createFromNodeAfter(e).select())}),this.insertText=this.wrapCommand(function(t){if(!i.isLimited(t.length)){var e=i.createRange().insertNode(Ct.createText(t));Et.create(e,Ct.nodeLength(e)).select()}}),this.pasteHTML=this.wrapCommand(function(t){if(!i.isLimited(t.length)){var e=i.createRange().pasteHTML(t);Et.createFromNodeAfter(k.last(e)).select()}}),this.formatBlock=this.wrapCommand(function(t,e){var n=i.options.callbacks.onApplyCustomStyle;n?n.call(i,e,i.context,i.onFormatBlock):i.onFormatBlock(t,e)}),this.insertHorizontalRule=this.wrapCommand(function(){var t=i.createRange().insertNode(Ct.create("HR"));t.nextSibling&&Et.create(t.nextSibling,0).normalize().select()}),this.lineHeight=this.wrapCommand(function(t){i.style.stylePara(i.createRange(),{lineHeight:t})}),this.createLink=this.wrapCommand(function(e){var n=e.url,r=e.text,o=e.isNewWindow,s=e.range||i.createRange(),a=s.toString()!==r;"string"==typeof n&&(n=n.trim()),n=i.options.onCreateLink?i.options.onCreateLink(n):/^[A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?/.test(n)?n:"http://"+n;var l=[];if(a){var c=(s=s.deleteContents()).insertNode(t("<A>"+r+"</A>")[0]);l.push(c)}else l=i.style.styleNodes(s,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});t.each(l,function(e,i){t(i).attr("href",n),o?t(i).attr("target","_blank"):t(i).removeAttr("target")});var h=Et.createFromNodeBefore(k.head(l)).getStartPoint(),d=Et.createFromNodeAfter(k.last(l)).getEndPoint();Et.create(h.node,h.offset,d.node,d.offset).select()}),this.color=this.wrapCommand(function(t){var e=t.foreColor,i=t.backColor;e&&document.execCommand("foreColor",!1,e),i&&document.execCommand("backColor",!1,i)}),this.foreColor=this.wrapCommand(function(t){document.execCommand("styleWithCSS",!1,!0),document.execCommand("foreColor",!1,t)}),this.insertTable=this.wrapCommand(function(t){var e=t.split("x");i.createRange().deleteContents().insertNode(i.table.createTable(e[0],e[1],i.options))}),this.removeMedia=this.wrapCommand(function(){var e=t(i.restoreTarget()).parent();e.parent("figure").length?e.parent("figure").remove():e=t(i.restoreTarget()).detach(),i.context.triggerEvent("media.delete",e,i.$editable)}),this.floatMe=this.wrapCommand(function(e){var n=t(i.restoreTarget());n.toggleClass("note-float-left","left"===e),n.toggleClass("note-float-right","right"===e),n.css("float",e)}),this.resize=this.wrapCommand(function(e){t(i.restoreTarget()).css({width:100*e+"%",height:""})})}return e.prototype.initialize=function(){var t=this;this.$editable.on("keydown",function(e){if(e.keyCode===Dt.code.ENTER&&t.context.triggerEvent("enter",e),t.context.triggerEvent("keydown",e),e.isDefaultPrevented()||(t.options.shortcuts?t.handleKeyMap(e):t.preventDefaultEditableShortCuts(e)),t.isLimited(1,e))return!1}).on("keyup",function(e){t.context.triggerEvent("keyup",e)}).on("focus",function(e){t.context.triggerEvent("focus",e)}).on("blur",function(e){t.context.triggerEvent("blur",e)}).on("mousedown",function(e){t.context.triggerEvent("mousedown",e)}).on("mouseup",function(e){t.context.triggerEvent("mouseup",e)}).on("scroll",function(e){t.context.triggerEvent("scroll",e)}).on("paste",function(e){t.context.triggerEvent("paste",e)}),this.$editable.html(Ct.html(this.$note)||Ct.emptyPara),this.$editable.on(O.inputEventName,v.debounce(function(){t.context.triggerEvent("change",t.$editable.html())},100)),this.$editor.on("focusin",function(e){t.context.triggerEvent("focusin",e)}).on("focusout",function(e){t.context.triggerEvent("focusout",e)}),this.options.airMode||(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo()},e.prototype.destroy=function(){this.$editable.off()},e.prototype.handleKeyMap=function(t){var e=this.options.keyMap[O.isMac?"mac":"pc"],i=[];t.metaKey&&i.push("CMD"),t.ctrlKey&&!t.altKey&&i.push("CTRL"),t.shiftKey&&i.push("SHIFT");var n=Dt.nameFromCode[t.keyCode];n&&i.push(n);var r=e[i.join("+")];r?!1!==this.context.invoke(r)&&t.preventDefault():Dt.isEdit(t.keyCode)&&this.afterCommand()},e.prototype.preventDefaultEditableShortCuts=function(t){(t.ctrlKey||t.metaKey)&&k.contains([66,73,85],t.keyCode)&&t.preventDefault()},e.prototype.isLimited=function(t,e){return t=t||0,(void 0===e||!(Dt.isMove(e.keyCode)||e.ctrlKey||e.metaKey||k.contains([Dt.code.BACKSPACE,Dt.code.DELETE],e.keyCode)))&&(this.options.maxTextLength>0&&this.$editable.text().length+t>=this.options.maxTextLength)},e.prototype.createRange=function(){return this.focus(),Et.create(this.editable)},e.prototype.saveRange=function(t){this.lastRange=this.createRange(),t&&this.lastRange.collapse().select()},e.prototype.restoreRange=function(){this.lastRange&&(this.lastRange.select(),this.focus())},e.prototype.saveTarget=function(t){this.$editable.data("target",t)},e.prototype.clearTarget=function(){this.$editable.removeData("target")},e.prototype.restoreTarget=function(){return this.$editable.data("target")},e.prototype.currentStyle=function(){var t=Et.create();return t&&(t=t.normalize()),t?this.style.current(t):this.style.fromNode(this.$editable)},e.prototype.styleFromNode=function(t){return this.style.fromNode(t)},e.prototype.undo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html())},e.prototype.redo=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html())},e.prototype.beforeCommand=function(){this.context.triggerEvent("before.command",this.$editable.html()),this.focus()},e.prototype.afterCommand=function(t){this.normalizeContent(),this.history.recordUndo(),t||this.context.triggerEvent("change",this.$editable.html())},e.prototype.tab=function(){var t=this.createRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(t,this.options.tabSize),this.afterCommand())}},e.prototype.untab=function(){var t=this.createRange();if(t.isCollapsed()&&t.isOnCell())this.table.tab(t,!0);else if(0===this.options.tabSize)return!1},e.prototype.wrapCommand=function(t){var e=this;return function(){e.beforeCommand(),t.apply(e,arguments),e.afterCommand()}},e.prototype.insertImage=function(e,i){var n,r=this;return(n=e,t.Deferred(function(e){var i=t("<img>");i.one("load",function(){i.off("error abort"),e.resolve(i)}).one("error abort",function(){i.off("load").detach(),e.reject(i)}).css({display:"none"}).appendTo(document.body).attr("src",n)}).promise()).then(function(t){r.beforeCommand(),"function"==typeof i?i(t):("string"==typeof i&&t.attr("data-filename",i),t.css("width",Math.min(r.$editable.width(),t.width()))),t.show(),Et.create(r.editable).insertNode(t[0]),Et.createFromNodeAfter(t[0]).select(),r.afterCommand()}).fail(function(t){r.context.triggerEvent("image.upload.error",t)})},e.prototype.insertImages=function(e){var i=this;t.each(e,function(e,n){var r=n.name;i.options.maximumImageFileSize&&i.options.maximumImageFileSize<n.size?i.context.triggerEvent("image.upload.error",i.lang.image.maximumFileSizeError):function(e){return t.Deferred(function(i){t.extend(new FileReader,{onload:function(t){var e=t.target.result;i.resolve(e)},onerror:function(t){i.reject(t)}}).readAsDataURL(e)}).promise()}(n).then(function(t){return i.insertImage(t,r)}).fail(function(){i.context.triggerEvent("image.upload.error")})})},e.prototype.insertImagesOrCallback=function(t){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",t):this.insertImages(t)},e.prototype.getSelectedText=function(){var t=this.createRange();return t.isOnAnchor()&&(t=Et.createFromNode(Ct.ancestor(t.sc,Ct.isAnchor))),t.toString()},e.prototype.onFormatBlock=function(e,i){if(e=O.isMSIE?"<"+e+">":e,document.execCommand("FormatBlock",!1,e),i&&i.length){var n=i[0].className||"";if(n){var r=this.createRange();t([r.sc,r.ec]).closest(e).addClass(n)}}},e.prototype.formatPara=function(){this.formatBlock("P")},e.prototype.fontStyling=function(e,i){var n=this.createRange();if(n){var r=this.style.styleNodes(n);if(t(r).css(e,i),n.isCollapsed()){var o=k.head(r);o&&!Ct.nodeLength(o)&&(o.innerHTML=Ct.ZERO_WIDTH_NBSP_CHAR,Et.createFromNodeAfter(o.firstChild).select(),this.$editable.data("bogus",o))}}},e.prototype.unlink=function(){var t=this.createRange();if(t.isOnAnchor()){var e=Ct.ancestor(t.sc,Ct.isAnchor);(t=Et.createFromNode(e)).select(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}},e.prototype.getLinkInfo=function(){var e=this.createRange().expand(Ct.isAnchor),i=t(k.head(e.nodes(Ct.isAnchor))),n={range:e,text:e.toString(),url:i.length?i.attr("href"):""};return i.length&&(n.isNewWindow="_blank"===i.attr("target")),n},e.prototype.addRow=function(t){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addRow(e,t),this.afterCommand())},e.prototype.addCol=function(t){var e=this.createRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.addCol(e,t),this.afterCommand())},e.prototype.deleteRow=function(){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(t),this.afterCommand())},e.prototype.deleteCol=function(){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(t),this.afterCommand())},e.prototype.deleteTable=function(){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(t),this.afterCommand())},e.prototype.resizeTo=function(t,e,i){var n;if(i){var r=t.y/t.x,o=e.data("ratio");n={width:o>r?t.x:t.y/o,height:o>r?t.x*o:t.y}}else n={width:t.x,height:t.y};e.css(n)},e.prototype.hasFocus=function(){return this.$editable.is(":focus")},e.prototype.focus=function(){this.hasFocus()||this.$editable.focus()},e.prototype.isEmpty=function(){return Ct.isEmpty(this.$editable[0])||Ct.emptyPara===this.$editable.html()},e.prototype.empty=function(){this.context.invoke("code",Ct.emptyPara)},e.prototype.normalizeContent=function(){this.$editable[0].normalize()},e}(),Rt=function(){function t(t){this.context=t,this.$editable=t.layoutInfo.editable}return t.prototype.initialize=function(){this.$editable.on("paste",this.pasteByEvent.bind(this))},t.prototype.pasteByEvent=function(t){var e=t.originalEvent.clipboardData;if(e&&e.items&&e.items.length){var i=k.head(e.items);"file"===i.kind&&-1!==i.type.indexOf("image/")&&this.context.invoke("editor.insertImagesOrCallback",[i.getAsFile()]),this.context.invoke("editor.afterCommand")}},t}(),Ht=function(){function e(e){this.context=e,this.$eventListener=t(document),this.$editor=e.layoutInfo.editor,this.$editable=e.layoutInfo.editable,this.options=e.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=t(['<div class="note-dropzone">',' <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(this.$editor)}return e.prototype.initialize=function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(t){t.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()},e.prototype.attachDragAndDropEvent=function(){var e=this,i=t(),n=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(t){var r=e.context.invoke("codeview.isActivated"),o=e.$editor.width()>0&&e.$editor.height()>0;r||i.length||!o||(e.$editor.addClass("dragover"),e.$dropzone.width(e.$editor.width()),e.$dropzone.height(e.$editor.height()),n.text(e.lang.image.dragImageHere)),i=i.add(t.target)},this.documentEventHandlers.onDragleave=function(t){(i=i.not(t.target)).length||e.$editor.removeClass("dragover")},this.documentEventHandlers.onDrop=function(){i=t(),e.$editor.removeClass("dragover")},this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop),this.$dropzone.on("dragenter",function(){e.$dropzone.addClass("hover"),n.text(e.lang.image.dropImage)}).on("dragleave",function(){e.$dropzone.removeClass("hover"),n.text(e.lang.image.dragImageHere)}),this.$dropzone.on("drop",function(i){var n=i.originalEvent.dataTransfer;i.preventDefault(),n&&n.files&&n.files.length?(e.$editable.focus(),e.context.invoke("editor.insertImagesOrCallback",n.files)):t.each(n.types,function(i,r){var o=n.getData(r);r.toLowerCase().indexOf("text")>-1?e.context.invoke("editor.pasteHTML",o):t(o).each(function(t,i){e.context.invoke("editor.insertNode",i)})})}).on("dragover",!1)},e.prototype.destroy=function(){var t=this;Object.keys(this.documentEventHandlers).forEach(function(e){t.$eventListener.off(e.substr(2).toLowerCase(),t.documentEventHandlers[e])}),this.documentEventHandlers={}},e}();O.hasCodeMirror&&(O.isSupportAmd?require(["codemirror"],function(t){jt=t}):jt=window.CodeMirror);var zt=function(){function t(t){this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options}return t.prototype.sync=function(){this.isActivated()&&O.hasCodeMirror&&this.$codable.data("cmEditor").save()},t.prototype.isActivated=function(){return this.$editor.hasClass("codeview")},t.prototype.toggle=function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")},t.prototype.activate=function(){var t=this;if(this.$codable.val(Ct.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),O.hasCodeMirror){var e=jt.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var i=new jt.TernServer(this.options.codemirror.tern);e.ternServer=i,e.on("cursorActivity",function(t){i.updateArgHints(t)})}e.on("blur",function(i){t.context.triggerEvent("blur.codeview",e.getValue(),i)}),e.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",e)}else this.$codable.on("blur",function(e){t.context.triggerEvent("blur.codeview",t.$codable.val(),e)})},t.prototype.deactivate=function(){if(O.hasCodeMirror){var t=this.$codable.data("cmEditor");this.$codable.val(t.getValue()),t.toTextArea()}var e=Ct.value(this.$codable,this.options.prettifyHtml)||Ct.emptyPara,i=this.$editable.html()!==e;this.$editable.html(e),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),i&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1)},t.prototype.destroy=function(){this.isActivated()&&this.deactivate()},t}(),Bt=function(){function e(e){this.$document=t(document),this.$statusbar=e.layoutInfo.statusbar,this.$editable=e.layoutInfo.editable,this.options=e.options}return e.prototype.initialize=function(){var t=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(e){e.preventDefault(),e.stopPropagation();var i=t.$editable.offset().top-t.$document.scrollTop(),n=function(e){var n=e.clientY-(i+24);n=t.options.minheight>0?Math.max(n,t.options.minheight):n,n=t.options.maxHeight>0?Math.min(n,t.options.maxHeight):n,t.$editable.height(n)};t.$document.on("mousemove",n).one("mouseup",function(){t.$document.off("mousemove",n)})})},e.prototype.destroy=function(){this.$statusbar.off(),this.$statusbar.addClass("locked")},e}(),Ut=function(){function e(e){var i=this;this.context=e,this.$editor=e.layoutInfo.editor,this.$toolbar=e.layoutInfo.toolbar,this.$editable=e.layoutInfo.editable,this.$codable=e.layoutInfo.codable,this.$window=t(window),this.$scrollbar=t("html, body"),this.onResize=function(){i.resizeTo({h:i.$window.height()-i.$toolbar.outerHeight()})}}return e.prototype.resizeTo=function(t){this.$editable.css("height",t.h),this.$codable.css("height",t.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,t.h)},e.prototype.toggle=function(){this.$editor.toggleClass("fullscreen"),this.isFullscreen()?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$window.on("resize",this.onResize).trigger("resize"),this.$scrollbar.css("overflow","hidden")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$scrollbar.css("overflow","visible")),this.context.invoke("toolbar.updateFullscreen",this.isFullscreen())},e.prototype.isFullscreen=function(){return this.$editor.hasClass("fullscreen")},e}(),Wt=function(){function e(e){var i=this;this.context=e,this.$document=t(document),this.$editingArea=e.layoutInfo.editingArea,this.options=e.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(t,e){i.update(e.target)&&e.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){i.update()},"summernote.disable":function(){i.hide()},"summernote.codeview.toggled":function(){i.update()}}}return e.prototype.initialize=function(){var e=this;this.$handle=t(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",function(t){if(Ct.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var i=e.$handle.find(".note-control-selection").data("target"),n=i.offset(),r=e.$document.scrollTop(),o=function(t){e.context.invoke("editor.resizeTo",{x:t.clientX-n.left,y:t.clientY-(n.top-r)},i,!t.shiftKey),e.update(i[0])};e.$document.on("mousemove",o).one("mouseup",function(t){t.preventDefault(),e.$document.off("mousemove",o),e.context.invoke("editor.afterCommand")}),i.data("ratio")||i.data("ratio",i.height()/i.width())}}),this.$handle.on("wheel",function(t){t.preventDefault(),e.update()})},e.prototype.destroy=function(){this.$handle.remove()},e.prototype.update=function(e){if(this.context.isDisabled())return!1;var i=Ct.isImg(e),n=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",e),i){var r=t(e),o=r.position(),s={left:o.left+parseInt(r.css("marginLeft"),10),top:o.top+parseInt(r.css("marginTop"),10)},a={w:r.outerWidth(!1),h:r.outerHeight(!1)};n.css({display:"block",left:s.left,top:s.top,width:a.w,height:a.h}).data("target",r);var l=new Image;l.src=r.attr("src");var c=a.w+"x"+a.h+" ("+this.lang.image.original+": "+l.width+"x"+l.height+")";n.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",e)}else this.hide();return i},e.prototype.hide=function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()},e}(),Yt=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Vt=function(){function e(t){var e=this;this.context=t,this.events={"summernote.keyup":function(t,i){i.isDefaultPrevented()||e.handleKeyup(i)},"summernote.keydown":function(t,i){e.handleKeydown(i)}}}return e.prototype.initialize=function(){this.lastWordRange=null},e.prototype.destroy=function(){this.lastWordRange=null},e.prototype.replace=function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),i=e.match(Yt);if(i&&(i[1]||i[2])){var n=i[1]?e:"http://"+e,r=t("<a />").html(e).attr("href",n)[0];this.lastWordRange.insertNode(r),this.lastWordRange=null,this.context.invoke("editor.focus")}}},e.prototype.handleKeydown=function(t){if(k.contains([Dt.code.ENTER,Dt.code.SPACE],t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=e}},e.prototype.handleKeyup=function(t){k.contains([Dt.code.ENTER,Dt.code.SPACE],t.keyCode)&&this.replace()},e}(),qt=function(){function t(t){var e=this;this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){e.$note.val(t.invoke("code"))}}}return t.prototype.shouldInitialize=function(){return Ct.isTextarea(this.$note[0])},t}(),Gt=function(){function e(t){var e=this;this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.events={"summernote.init summernote.change":function(){e.update()},"summernote.codeview.toggled":function(){e.update()}}}return e.prototype.shouldInitialize=function(){return!!this.options.placeholder},e.prototype.initialize=function(){var e=this;this.$placeholder=t('<div class="note-placeholder">'),this.$placeholder.on("click",function(){e.context.invoke("focus")}).text(this.options.placeholder).prependTo(this.$editingArea),this.update()},e.prototype.destroy=function(){this.$placeholder.remove()},e.prototype.update=function(){var t=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(t)},e}(),Kt=function(){function e(e){this.ui=t.summernote.ui,this.context=e,this.$toolbar=e.layoutInfo.toolbar,this.options=e.options,this.lang=this.options.langInfo,this.invertedKeyMap=v.invertObject(this.options.keyMap[O.isMac?"mac":"pc"])}return e.prototype.representShortcut=function(t){var e=this.invertedKeyMap[t];return this.options.shortcuts&&e?(O.isMac&&(e=e.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(e=e.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""},e.prototype.button=function(t){return!this.options.tooltip&&t.tooltip&&delete t.tooltip,t.container=this.options.container,this.ui.button(t)},e.prototype.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}},e.prototype.destroy=function(){delete this.fontInstalledMap},e.prototype.isFontInstalled=function(t){return this.fontInstalledMap.hasOwnProperty(t)||(this.fontInstalledMap[t]=O.isFontInstalled(t)||k.contains(this.options.fontNamesIgnoreCheck,t)),this.fontInstalledMap[t]},e.prototype.isFontDeservedToAdd=function(e){return""!==(e=e.toLowerCase())&&this.isFontInstalled(e)&&-1===t.inArray(e,["sans-serif","serif","monospace","cursive","fantasy"])},e.prototype.addToolbarButtons=function(){var e=this;this.context.memo("button.style",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.magic),e.options),tooltip:e.lang.style.style,data:{toggle:"dropdown"}}),e.ui.dropdown({className:"dropdown-style",items:e.options.styleTags,title:e.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:e.lang.style.hasOwnProperty(t)?e.lang.style[t]:t});var i=t.tag,n=t.title;return"<"+i+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+n+"</"+i+">"},click:e.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var i=function(t,i){var r=n.options.styleTags[t];n.context.memo("button.style."+r,function(){return e.button({className:"note-btn-style-"+r,contents:'<div data-value="'+r+'">'+r.toUpperCase()+"</div>",tooltip:e.lang.style[r],click:e.context.createInvokeHandler("editor.formatBlock")}).render()})},n=this,r=0,o=this.options.styleTags.length;r<o;r++)i(r);this.context.memo("button.bold",function(){return e.button({className:"note-btn-bold",contents:e.ui.icon(e.options.icons.bold),tooltip:e.lang.font.bold+e.representShortcut("bold"),click:e.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}),this.context.memo("button.italic",function(){return e.button({className:"note-btn-italic",contents:e.ui.icon(e.options.icons.italic),tooltip:e.lang.font.italic+e.representShortcut("italic"),click:e.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}),this.context.memo("button.underline",function(){return e.button({className:"note-btn-underline",contents:e.ui.icon(e.options.icons.underline),tooltip:e.lang.font.underline+e.representShortcut("underline"),click:e.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}),this.context.memo("button.clear",function(){return e.button({contents:e.ui.icon(e.options.icons.eraser),tooltip:e.lang.font.clear+e.representShortcut("removeFormat"),click:e.context.createInvokeHandler("editor.removeFormat")}).render()}),this.context.memo("button.strikethrough",function(){return e.button({className:"note-btn-strikethrough",contents:e.ui.icon(e.options.icons.strikethrough),tooltip:e.lang.font.strikethrough+e.representShortcut("strikethrough"),click:e.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}),this.context.memo("button.superscript",function(){return e.button({className:"note-btn-superscript",contents:e.ui.icon(e.options.icons.superscript),tooltip:e.lang.font.superscript,click:e.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}),this.context.memo("button.subscript",function(){return e.button({className:"note-btn-subscript",contents:e.ui.icon(e.options.icons.subscript),tooltip:e.lang.font.subscript,click:e.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}),this.context.memo("button.fontname",function(){var i=e.context.invoke("editor.currentStyle");return t.each(i["font-family"].split(","),function(i,n){n=n.trim().replace(/['"]+/g,""),e.isFontDeservedToAdd(n)&&-1===t.inArray(n,e.options.fontNames)&&e.options.fontNames.push(n)}),e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontname"/>',e.options),tooltip:e.lang.font.name,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:e.options.icons.menuCheck,items:e.options.fontNames.filter(e.isFontInstalled.bind(e)),title:e.lang.font.name,template:function(t){return"<span style=\"font-family: '"+t+"'\">"+t+"</span>"},click:e.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}),this.context.memo("button.fontsize",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsize"/>',e.options),tooltip:e.lang.font.size,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizes,title:e.lang.font.size,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}),this.context.memo("button.color",function(){return e.ui.buttonGroup({className:"note-color",children:[e.button({className:"note-current-color-button",contents:e.ui.icon(e.options.icons.font+" note-recent-color"),tooltip:e.lang.color.recent,click:function(i){var n=t(i.currentTarget);e.context.invoke("editor.color",{backColor:n.attr("data-backColor"),foreColor:n.attr("data-foreColor")})},callback:function(t){t.find(".note-recent-color").css("background-color","#FFFF00"),t.attr("data-backColor","#FFFF00")}}),e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents("",e.options),tooltip:e.lang.color.more,data:{toggle:"dropdown"}}),e.ui.dropdown({items:['<div class="note-palette">',' <div class="note-palette-title">'+e.lang.color.background+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',e.lang.color.transparent," </button>"," </div>",' <div class="note-holder" data-event="backColor"/>',"</div>",'<div class="note-palette">',' <div class="note-palette-title">'+e.lang.color.foreground+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',e.lang.color.resetToDefault," </button>"," </div>",' <div class="note-holder" data-event="foreColor"/>',"</div>"].join(""),callback:function(i){i.find(".note-holder").each(function(i,n){var r=t(n);r.append(e.ui.palette({colors:e.options.colors,colorsName:e.options.colorsName,eventName:r.data("event"),container:e.options.container,tooltip:e.options.tooltip}).render())})},click:function(i){var n=t(i.target),r=n.data("event"),o=n.data("value");if(r&&o){var s="backColor"===r?"background-color":"color",a=n.closest(".note-color").find(".note-recent-color"),l=n.closest(".note-color").find(".note-current-color-button");a.css(s,o),l.attr("data-"+r,o),e.context.invoke("editor."+r,o)}}})]}).render()}),this.context.memo("button.ul",function(){return e.button({contents:e.ui.icon(e.options.icons.unorderedlist),tooltip:e.lang.lists.unordered+e.representShortcut("insertUnorderedList"),click:e.context.createInvokeHandler("editor.insertUnorderedList")}).render()}),this.context.memo("button.ol",function(){return e.button({contents:e.ui.icon(e.options.icons.orderedlist),tooltip:e.lang.lists.ordered+e.representShortcut("insertOrderedList"),click:e.context.createInvokeHandler("editor.insertOrderedList")}).render()});var s=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),l=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),c=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),h=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),d=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",v.invoke(s,"render")),this.context.memo("button.justifyCenter",v.invoke(a,"render")),this.context.memo("button.justifyRight",v.invoke(l,"render")),this.context.memo("button.justifyFull",v.invoke(c,"render")),this.context.memo("button.outdent",v.invoke(h,"render")),this.context.memo("button.indent",v.invoke(d,"render")),this.context.memo("button.paragraph",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.alignLeft),e.options),tooltip:e.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),e.ui.dropdown([e.ui.buttonGroup({className:"note-align",children:[s,a,l,c]}),e.ui.buttonGroup({className:"note-list",children:[h,d]})])]).render()}),this.context.memo("button.height",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.textHeight),e.options),tooltip:e.lang.font.height,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({items:e.options.lineHeights,checkClassName:e.options.icons.menuCheck,className:"dropdown-line-height",title:e.lang.font.height,click:e.context.createInvokeHandler("editor.lineHeight")})]).render()}),this.context.memo("button.table",function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.table),e.options),tooltip:e.lang.table.table,data:{toggle:"dropdown"}}),e.ui.dropdown({title:e.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">',' <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>',' <div class="note-dimension-picker-highlighted"/>',' <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.options.insertTableMaxSize.col+"em",height:e.options.insertTableMaxSize.row+"em"}).mousedown(e.context.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler.bind(e))}}).render()}),this.context.memo("button.link",function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.link+e.representShortcut("linkDialog.show"),click:e.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.picture",function(){return e.button({contents:e.ui.icon(e.options.icons.picture),tooltip:e.lang.image.image,click:e.context.createInvokeHandler("imageDialog.show")}).render()}),this.context.memo("button.video",function(){return e.button({contents:e.ui.icon(e.options.icons.video),tooltip:e.lang.video.video,click:e.context.createInvokeHandler("videoDialog.show")}).render()}),this.context.memo("button.hr",function(){return e.button({contents:e.ui.icon(e.options.icons.minus),tooltip:e.lang.hr.insert+e.representShortcut("insertHorizontalRule"),click:e.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}),this.context.memo("button.fullscreen",function(){return e.button({className:"btn-fullscreen",contents:e.ui.icon(e.options.icons.arrowsAlt),tooltip:e.lang.options.fullscreen,click:e.context.createInvokeHandler("fullscreen.toggle")}).render()}),this.context.memo("button.codeview",function(){return e.button({className:"btn-codeview",contents:e.ui.icon(e.options.icons.code),tooltip:e.lang.options.codeview,click:e.context.createInvokeHandler("codeview.toggle")}).render()}),this.context.memo("button.redo",function(){return e.button({contents:e.ui.icon(e.options.icons.redo),tooltip:e.lang.history.redo+e.representShortcut("redo"),click:e.context.createInvokeHandler("editor.redo")}).render()}),this.context.memo("button.undo",function(){return e.button({contents:e.ui.icon(e.options.icons.undo),tooltip:e.lang.history.undo+e.representShortcut("undo"),click:e.context.createInvokeHandler("editor.undo")}).render()}),this.context.memo("button.help",function(){return e.button({contents:e.ui.icon(e.options.icons.question),tooltip:e.lang.options.help,click:e.context.createInvokeHandler("helpDialog.show")}).render()})},e.prototype.addImagePopoverButtons=function(){var t=this;this.context.memo("button.imageSize100",function(){return t.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:t.lang.image.resizeFull,click:t.context.createInvokeHandler("editor.resize","1")}).render()}),this.context.memo("button.imageSize50",function(){return t.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:t.lang.image.resizeHalf,click:t.context.createInvokeHandler("editor.resize","0.5")}).render()}),this.context.memo("button.imageSize25",function(){return t.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:t.lang.image.resizeQuarter,click:t.context.createInvokeHandler("editor.resize","0.25")}).render()}),this.context.memo("button.floatLeft",function(){return t.button({contents:t.ui.icon(t.options.icons.alignLeft),tooltip:t.lang.image.floatLeft,click:t.context.createInvokeHandler("editor.floatMe","left")}).render()}),this.context.memo("button.floatRight",function(){return t.button({contents:t.ui.icon(t.options.icons.alignRight),tooltip:t.lang.image.floatRight,click:t.context.createInvokeHandler("editor.floatMe","right")}).render()}),this.context.memo("button.floatNone",function(){return t.button({contents:t.ui.icon(t.options.icons.alignJustify),tooltip:t.lang.image.floatNone,click:t.context.createInvokeHandler("editor.floatMe","none")}).render()}),this.context.memo("button.removeMedia",function(){return t.button({contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.image.remove,click:t.context.createInvokeHandler("editor.removeMedia")}).render()})},e.prototype.addLinkPopoverButtons=function(){var t=this;this.context.memo("button.linkDialogShow",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.edit,click:t.context.createInvokeHandler("linkDialog.show")}).render()}),this.context.memo("button.unlink",function(){return t.button({contents:t.ui.icon(t.options.icons.unlink),tooltip:t.lang.link.unlink,click:t.context.createInvokeHandler("editor.unlink")}).render()})},e.prototype.addTablePopoverButtons=function(){var t=this;this.context.memo("button.addRowUp",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowAbove),tooltip:t.lang.table.addRowAbove,click:t.context.createInvokeHandler("editor.addRow","top")}).render()}),this.context.memo("button.addRowDown",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowBelow),tooltip:t.lang.table.addRowBelow,click:t.context.createInvokeHandler("editor.addRow","bottom")}).render()}),this.context.memo("button.addColLeft",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colBefore),tooltip:t.lang.table.addColLeft,click:t.context.createInvokeHandler("editor.addCol","left")}).render()}),this.context.memo("button.addColRight",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colAfter),tooltip:t.lang.table.addColRight,click:t.context.createInvokeHandler("editor.addCol","right")}).render()}),this.context.memo("button.deleteRow",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowRemove),tooltip:t.lang.table.delRow,click:t.context.createInvokeHandler("editor.deleteRow")}).render()}),this.context.memo("button.deleteCol",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colRemove),tooltip:t.lang.table.delCol,click:t.context.createInvokeHandler("editor.deleteCol")}).render()}),this.context.memo("button.deleteTable",function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.table.delTable,click:t.context.createInvokeHandler("editor.deleteTable")}).render()})},e.prototype.build=function(e,i){for(var n=0,r=i.length;n<r;n++){for(var o=i[n],s=t.isArray(o)?o[0]:o,a=t.isArray(o)?1===o.length?[o[0]]:o[1]:[o],l=this.ui.buttonGroup({className:"note-"+s}).render(),c=0,h=a.length;c<h;c++){var d=this.context.memo("button."+a[c]);d&&l.append("function"==typeof d?d(this.context):d)}l.appendTo(e)}},e.prototype.updateCurrentStyle=function(e){var i=this,n=e||this.$toolbar,r=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(n,{".note-btn-bold":function(){return"bold"===r["font-bold"]},".note-btn-italic":function(){return"italic"===r["font-italic"]},".note-btn-underline":function(){return"underline"===r["font-underline"]},".note-btn-subscript":function(){return"subscript"===r["font-subscript"]},".note-btn-superscript":function(){return"superscript"===r["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===r["font-strikethrough"]}}),r["font-family"]){var o=r["font-family"].split(",").map(function(t){return t.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),s=k.find(o,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each(function(e,i){var n=t(i),r=n.data("value")+""==s+"";n.toggleClass("checked",r)}),n.find(".note-current-fontname").text(s).css("font-family",s)}if(r["font-size"]){var a=r["font-size"];n.find(".dropdown-fontsize a").each(function(e,i){var n=t(i),r=n.data("value")+""==a+"";n.toggleClass("checked",r)}),n.find(".note-current-fontsize").text(a)}if(r["line-height"]){var l=r["line-height"];n.find(".dropdown-line-height li a").each(function(e,n){var r=t(n).data("value")+""==l+"";i.className=r?"checked":""})}},e.prototype.updateBtnStates=function(e,i){var n=this;t.each(i,function(t,i){n.ui.toggleBtnActive(e.find(t),i())})},e.prototype.tableMoveHandler=function(e){var i,n=t(e.target.parentNode),r=n.next(),o=n.find(".note-dimension-picker-mousecatcher"),s=n.find(".note-dimension-picker-highlighted"),a=n.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var l=t(e.target).offset();i={x:e.pageX-l.left,y:e.pageY-l.top}}else i={x:e.offsetX,y:e.offsetY};var c=Math.ceil(i.x/18)||1,h=Math.ceil(i.y/18)||1;s.css({width:c+"em",height:h+"em"}),o.data("value",c+"x"+h),c>3&&c<this.options.insertTableMaxSize.col&&a.css({width:c+1+"em"}),h>3&&h<this.options.insertTableMaxSize.row&&a.css({height:h+1+"em"}),r.html(c+" x "+h)},e}(),Xt=function(){function e(e){this.context=e,this.$window=t(window),this.$document=t(document),this.ui=t.summernote.ui,this.$note=e.layoutInfo.note,this.$editor=e.layoutInfo.editor,this.$toolbar=e.layoutInfo.toolbar,this.options=e.options,this.followScroll=this.followScroll.bind(this)}return e.prototype.shouldInitialize=function(){return!this.options.airMode},e.prototype.initialize=function(){var t=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",function(){t.context.invoke("buttons.updateCurrentStyle")}),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)},e.prototype.destroy=function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)},e.prototype.followScroll=function(){if(this.$editor.hasClass("fullscreen"))return!1;var e=this.$toolbar.parent(".note-toolbar-wrapper"),i=this.$editor.outerHeight(),n=this.$editor.width(),r=this.$toolbar.height();e.css({height:r});var o=0;this.options.otherStaticBar&&(o=t(this.options.otherStaticBar).outerHeight());var s=this.$document.scrollTop(),a=this.$editor.offset().top;s>a-o&&s<a+i-o-r?this.$toolbar.css({position:"fixed",top:o,width:n}):this.$toolbar.css({position:"relative",top:0,width:"100%"})},e.prototype.changeContainer=function(t){t?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer)},e.prototype.updateFullscreen=function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),t),this.changeContainer(t)},e.prototype.updateCodeview=function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),t),t?this.deactivate():this.activate()},e.prototype.activate=function(t){var e=this.$toolbar.find("button");t||(e=e.not(".btn-codeview")),this.ui.toggleBtn(e,!0)},e.prototype.deactivate=function(t){var e=this.$toolbar.find("button");t||(e=e.not(".btn-codeview")),this.ui.toggleBtn(e,!1)},e}(),Zt=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo,e.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}return e.prototype.initialize=function(){var e=this.options.dialogsInBody?this.$body:this.$editor,i=['<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.textToDisplay+"</label>",'<input class="note-link-text form-control note-form-control note-input" type="text" />',"</div>",'<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.url+"</label>",'<input class="note-link-url form-control note-form-control note-input" type="text" value="http://" />',"</div>",this.options.disableLinkTarget?"":t("<div/>").append(this.ui.checkbox({id:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join(""),n='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-link-btn" disabled>'+this.lang.link.insert+"</button>";this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:i,footer:n}).render().appendTo(e)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===Dt.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},e.prototype.toggleLinkBtn=function(t,e,i){this.ui.toggleBtn(t,e.val()&&i.val())},e.prototype.showLinkDialog=function(e){var i=this;return t.Deferred(function(t){var n=i.$dialog.find(".note-link-text"),r=i.$dialog.find(".note-link-url"),o=i.$dialog.find(".note-link-btn"),s=i.$dialog.find("input[type=checkbox]");i.ui.onDialogShown(i.$dialog,function(){i.context.triggerEvent("dialog.shown"),e.url||(e.url=e.text),n.val(e.text);var a=function(){i.toggleLinkBtn(o,n,r),e.text=n.val()};n.on("input",a).on("paste",function(){setTimeout(a,0)});var l=function(){i.toggleLinkBtn(o,n,r),e.text||n.val(r.val())};r.on("input",l).on("paste",function(){setTimeout(l,0)}).val(e.url),O.isSupportTouch||r.trigger("focus"),i.toggleLinkBtn(o,n,r),i.bindEnterKey(r,o),i.bindEnterKey(n,o);var c=void 0!==e.isNewWindow?e.isNewWindow:i.context.options.linkTargetBlank;s.prop("checked",c),o.one("click",function(o){o.preventDefault(),t.resolve({range:e.range,url:r.val(),text:n.val(),isNewWindow:s.is(":checked")}),i.ui.hideDialog(i.$dialog)})}),i.ui.onDialogHidden(i.$dialog,function(){n.off("input paste keypress"),r.off("input paste keypress"),o.off("click"),"pending"===t.state()&&t.reject()}),i.ui.showDialog(i.$dialog)}).promise()},e.prototype.show=function(){var t=this,e=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(e).then(function(e){t.context.invoke("editor.restoreRange"),t.context.invoke("editor.createLink",e)}).fail(function(){t.context.invoke("editor.restoreRange")})},e}(),Qt=function(){function e(e){var i=this;this.context=e,this.ui=t.summernote.ui,this.options=e.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){i.update()},"summernote.disable summernote.dialog.shown":function(){i.hide()}}}return e.prototype.shouldInitialize=function(){return!k.isEmpty(this.options.popover.link)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(t){t.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a> </span>')}}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.link)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(){if(this.context.invoke("editor.hasFocus")){var e=this.context.invoke("editor.createRange");if(e.isCollapsed()&&e.isOnAnchor()){var i=Ct.ancestor(e.sc,Ct.isAnchor),n=t(i).attr("href");this.$popover.find("a").attr("href",n).html(n);var r=Ct.posFromPlaceholder(i);this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()}else this.hide()},e.prototype.hide=function(){this.$popover.hide()},e}(),Jt=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}return e.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e="";if(this.options.maximumImageFileSize){var i=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,i)).toFixed(2)+" "+" KMGTP"[i]+"B";e="<small>"+this.lang.image.maximumFileSize+" : "+n+"</small>"}var r=['<div class="form-group note-form-group note-group-select-from-files">','<label class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input class="note-image-input note-form-control note-input" ',' type="file" name="files" accept="image/*" multiple="multiple" />',e,"</div>",'<div class="form-group note-group-image-url" style="overflow:auto;">','<label class="note-form-label">'+this.lang.image.url+"</label>",'<input class="note-image-url form-control note-form-control note-input ',' col-md-12" type="text" />',"</div>"].join(""),o='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-image-btn" disabled>'+this.lang.image.insert+"</button>";this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:r,footer:o}).render().appendTo(t)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===Dt.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},e.prototype.show=function(){var t=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then(function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange"),"string"==typeof e?t.context.invoke("editor.insertImage",e):t.context.invoke("editor.insertImagesOrCallback",e)}).fail(function(){t.context.invoke("editor.restoreRange")})},e.prototype.showImageDialog=function(){var e=this;return t.Deferred(function(t){var i=e.$dialog.find(".note-image-input"),n=e.$dialog.find(".note-image-url"),r=e.$dialog.find(".note-image-btn");e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),i.replaceWith(i.clone().on("change",function(e){t.resolve(e.target.files||e.target.value)}).val("")),r.click(function(e){e.preventDefault(),t.resolve(n.val())}),n.on("keyup paste",function(){var t=n.val();e.ui.toggleBtn(r,t)}).val(""),O.isSupportTouch||n.trigger("focus"),e.bindEnterKey(n,r)}),e.ui.onDialogHidden(e.$dialog,function(){i.off("change"),n.off("keyup paste keypress"),r.off("click"),"pending"===t.state()&&t.reject()}),e.ui.showDialog(e.$dialog)})},e}(),te=function(){function e(e){var i=this;this.context=e,this.ui=t.summernote.ui,this.editable=e.layoutInfo.editable[0],this.options=e.options,this.events={"summernote.disable":function(){i.hide()}}}return e.prototype.shouldInitialize=function(){return!k.isEmpty(this.options.popover.image)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.image)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(t){if(Ct.isImg(t)){var e=Ct.posFromPlaceholder(t),i=Ct.posFromPlaceholder(this.editable);this.$popover.css({display:"block",left:this.options.popatmouse?event.pageX-20:e.left,top:this.options.popatmouse?event.pageY:Math.min(e.top,i.top)})}else this.hide()},e.prototype.hide=function(){this.$popover.hide()},e}(),ee=function(){function e(e){var i=this;this.context=e,this.ui=t.summernote.ui,this.options=e.options,this.events={"summernote.mousedown":function(t,e){i.update(e.target)},"summernote.keyup summernote.scroll summernote.change":function(){i.update()},"summernote.disable":function(){i.hide()}}}return e.prototype.shouldInitialize=function(){return!k.isEmpty(this.options.popover.table)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.table),O.isFF&&document.execCommand("enableInlineTableEditing",!1,!1)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(t){if(this.context.isDisabled())return!1;var e=Ct.isCell(t);if(e){var i=Ct.posFromPlaceholder(t);this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide();return e},e.prototype.hide=function(){this.$popover.hide()},e}(),ie=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}return e.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e=['<div class="form-group note-form-group row-fluid">','<label class="note-form-label">'+this.lang.video.url+' <small class="text-muted">'+this.lang.video.providers+"</small></label>",'<input class="note-video-url form-control note-form-control note-input" type="text" />',"</div>"].join(""),i='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-video-btn" disabled>'+this.lang.video.insert+"</button>";this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:e,footer:i}).render().appendTo(t)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===Dt.code.ENTER&&(t.preventDefault(),e.trigger("click"))})},e.prototype.createVideoNode=function(e){var i,n=e.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/),r=e.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),o=e.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=e.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),a=e.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),l=e.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),c=e.match(/\/\/v\.qq\.com.*?vid=(.+)/),h=e.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),d=e.match(/^.+.(mp4|m4v)$/),u=e.match(/^.+.(ogg|ogv)$/),p=e.match(/^.+.(webm)$/);if(n&&11===n[1].length){var f=n[1];i=t("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+f).attr("width","640").attr("height","360")}else if(r&&r[0].length)i=t("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+r[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(o&&o[0].length)i=t("<iframe>").attr("frameborder",0).attr("src",o[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)i=t("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(a&&a[2].length)i=t("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+a[2]).attr("width","640").attr("height","360");else if(l&&l[1].length)i=t("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+l[1]);else if(c&&c[1].length||h&&h[2].length){var m=c&&c[1].length?c[1]:h[2];i=t("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","http://v.qq.com/iframe/player.html?vid="+m+"&auto=0")}else{if(!(d||u||p))return!1;i=t("<video controls>").attr("src",e).attr("width","640").attr("height","360")}return i.addClass("note-video-clip"),i[0]},e.prototype.show=function(){var t=this,e=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(e).then(function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange");var i=t.createVideoNode(e);i&&t.context.invoke("editor.insertNode",i)}).fail(function(){t.context.invoke("editor.restoreRange")})},e.prototype.showVideoDialog=function(e){var i=this;return t.Deferred(function(t){var n=i.$dialog.find(".note-video-url"),r=i.$dialog.find(".note-video-btn");i.ui.onDialogShown(i.$dialog,function(){i.context.triggerEvent("dialog.shown"),n.val(e).on("input",function(){i.ui.toggleBtn(r,n.val())}),O.isSupportTouch||n.trigger("focus"),r.click(function(e){e.preventDefault(),t.resolve(n.val())}),i.bindEnterKey(n,r)}),i.ui.onDialogHidden(i.$dialog,function(){n.off("input"),r.off("click"),"pending"===t.state()&&t.reject()}),i.ui.showDialog(i.$dialog)})},e}(),ne=function(){function e(e){this.context=e,this.ui=t.summernote.ui,this.$body=t(document.body),this.$editor=e.layoutInfo.editor,this.options=e.options,this.lang=this.options.langInfo}return e.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,e=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.10</a> · ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:e,callback:function(t){t.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)},e.prototype.destroy=function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()},e.prototype.createShortcutList=function(){var e=this,i=this.options.keyMap[O.isMac?"mac":"pc"];return Object.keys(i).map(function(n){var r=i[n],o=t('<div><div class="help-list-item"/></div>');return o.append(t("<label><kbd>"+n+"</kdb></label>").css({width:180,"margin-right":10})).append(t("<span/>").html(e.context.memo("help."+r)||r)),o.html()}).join("")},e.prototype.showHelpDialog=function(){var e=this;return t.Deferred(function(t){e.ui.onDialogShown(e.$dialog,function(){e.context.triggerEvent("dialog.shown"),t.resolve()}),e.ui.showDialog(e.$dialog)}).promise()},e.prototype.show=function(){var t=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then(function(){t.context.invoke("editor.restoreRange")})},e}(),re=function(){function e(e){var i=this;this.context=e,this.ui=t.summernote.ui,this.options=e.options,this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){i.update()},"summernote.disable summernote.change summernote.dialog.shown":function(){i.hide()},"summernote.focusout":function(t,e){O.isFF||e.relatedTarget&&Ct.ancestor(e.relatedTarget,v.eq(i.$popover[0]))||i.hide()}}}return e.prototype.shouldInitialize=function(){return this.options.airMode&&!k.isEmpty(this.options.popover.air)},e.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air)},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.update=function(){var t=this.context.invoke("editor.currentStyle");if(t.range&&!t.range.isCollapsed()){var e=k.last(t.range.getClientRects());if(e){var i=v.rect2bnd(e);this.$popover.css({display:"block",left:Math.max(i.left+i.width/2,0)-20,top:i.top+i.height}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}else this.hide()},e.prototype.hide=function(){this.$popover.hide()},e}(),oe=function(){function e(e){var i=this;this.context=e,this.ui=t.summernote.ui,this.$editable=e.layoutInfo.editable,this.options=e.options,this.hint=this.options.hint||[],this.direction=this.options.hintDirection||"bottom",this.hints=t.isArray(this.hint)?this.hint:[this.hint],this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||i.handleKeyup(e)},"summernote.keydown":function(t,e){i.handleKeydown(e)},"summernote.disable summernote.dialog.shown":function(){i.hide()}}}return e.prototype.shouldInitialize=function(){return this.hints.length>0},e.prototype.initialize=function(){var e=this;this.lastWordRange=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",function(){e.$content.find(".active").removeClass("active"),t(e).addClass("active"),e.replace()})},e.prototype.destroy=function(){this.$popover.remove()},e.prototype.selectItem=function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2},e.prototype.moveDown=function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var i=t.parent().next();i.length||(i=this.$content.find(".note-hint-group").first()),this.selectItem(i.find(".note-hint-item").first())}},e.prototype.moveUp=function(){var t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var i=t.parent().prev();i.length||(i=this.$content.find(".note-hint-group").last()),this.selectItem(i.find(".note-hint-item").last())}},e.prototype.replace=function(){var t=this.$content.find(".note-hint-item.active");if(t.length){var e=this.nodeFromItem(t);this.lastWordRange.insertNode(e),Et.createFromNode(e).collapse().select(),this.lastWordRange=null,this.hide(),this.context.triggerEvent("change",this.$editable.html(),this.$editable[0]),this.context.invoke("editor.focus")}},e.prototype.nodeFromItem=function(t){var e=this.hints[t.data("index")],i=t.data("item"),n=e.content?e.content(i):i;return"string"==typeof n&&(n=Ct.createText(n)),n},e.prototype.createItemTemplates=function(e,i){var n=this.hints[e];return i.map(function(i,r){var o=t('<div class="note-hint-item"/>');return o.append(n.template?n.template(i):i+""),o.data({index:e,item:i}),o})},e.prototype.handleKeydown=function(t){this.$popover.is(":visible")&&(t.keyCode===Dt.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===Dt.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===Dt.code.DOWN&&(t.preventDefault(),this.moveDown()))},e.prototype.searchKeyword=function(t,e,i){var n=this.hints[t];if(n&&n.match.test(e)&&n.search){var r=n.match.exec(e);n.search(r[1],i)}else i()},e.prototype.createGroup=function(e,i){var n=this,r=t('<div class="note-hint-group note-hint-group-'+e+'"/>');return this.searchKeyword(e,i,function(t){(t=t||[]).length&&(r.html(n.createItemTemplates(e,t)),n.show())}),r},e.prototype.handleKeyup=function(t){var e=this;if(!k.contains([Dt.code.ENTER,Dt.code.UP,Dt.code.DOWN],t.keyCode)){var i=this.context.invoke("editor.createRange").getWordRange(),n=i.toString();if(this.hints.length&&n){this.$content.empty();var r=v.rect2bnd(k.last(i.getClientRects()));r&&(this.$popover.hide(),this.lastWordRange=i,this.hints.forEach(function(t,i){t.match.test(n)&&e.createGroup(i,n).appendTo(e.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:r.left,top:r.top-this.$popover.outerHeight()-5}):this.$popover.css({left:r.left,top:r.top+r.height+5}))}else this.hide()}},e.prototype.show=function(){this.$popover.show()},e.prototype.hide=function(){this.$popover.hide()},e}(),se=function(){function e(e,i){this.ui=t.summernote.ui,this.$note=e,this.memos={},this.modules={},this.layoutInfo={},this.options=i,this.initialize()}return e.prototype.initialize=function(){return this.layoutInfo=this.ui.createLayout(this.$note,this.options),this._initialize(),this.$note.hide(),this},e.prototype.destroy=function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)},e.prototype.reset=function(){var t=this.isDisabled();this.code(Ct.emptyPara),this._destroy(),this._initialize(),t&&this.disable()},e.prototype._initialize=function(){var e=this,i=t.extend({},this.options.buttons);Object.keys(i).forEach(function(t){e.memo("button."+t,i[t])});var n=t.extend({},this.options.modules,t.summernote.plugins||{});Object.keys(n).forEach(function(t){e.module(t,n[t],!0)}),Object.keys(this.modules).forEach(function(t){e.initializeModule(t)})},e.prototype._destroy=function(){var t=this;Object.keys(this.modules).reverse().forEach(function(e){t.removeModule(e)}),Object.keys(this.memos).forEach(function(e){t.removeMemo(e)}),this.triggerEvent("destroy",this)},e.prototype.code=function(t){var e=this.invoke("codeview.isActivated");if(void 0===t)return this.invoke("codeview.sync"),e?this.layoutInfo.codable.val():this.layoutInfo.editable.html();e?this.layoutInfo.codable.val(t):this.layoutInfo.editable.html(t),this.$note.val(t),this.triggerEvent("change",t)},e.prototype.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},e.prototype.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1)},e.prototype.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)},e.prototype.triggerEvent=function(){var t=k.head(arguments),e=k.tail(k.from(arguments)),i=this.options.callbacks[v.namespaceToCamel(t,"on")];i&&i.apply(this.$note[0],e),this.$note.trigger("summernote."+t,e)},e.prototype.initializeModule=function(t){var e=this.modules[t];e.shouldInitialize=e.shouldInitialize||v.ok,e.shouldInitialize()&&(e.initialize&&e.initialize(),e.events&&Ct.attachEvents(this.$note,e.events))},e.prototype.module=function(t,e,i){if(1===arguments.length)return this.modules[t];this.modules[t]=new e(this),i||this.initializeModule(t)},e.prototype.removeModule=function(t){var e=this.modules[t];e.shouldInitialize()&&(e.events&&Ct.detachEvents(this.$note,e.events),e.destroy&&e.destroy()),delete this.modules[t]},e.prototype.memo=function(t,e){if(1===arguments.length)return this.memos[t];this.memos[t]=e},e.prototype.removeMemo=function(t){this.memos[t]&&this.memos[t].destroy&&this.memos[t].destroy(),delete this.memos[t]},e.prototype.createInvokeHandlerAndUpdateState=function(t,e){var i=this;return function(n){i.createInvokeHandler(t,e)(n),i.invoke("buttons.updateCurrentStyle")}},e.prototype.createInvokeHandler=function(e,i){var n=this;return function(r){r.preventDefault();var o=t(r.target);n.invoke(e,i||o.closest("[data-value]").data("value"),o)}},e.prototype.invoke=function(){var t=k.head(arguments),e=k.tail(k.from(arguments)),i=t.split("."),n=i.length>1,r=n&&k.head(i),o=n?k.last(i):k.head(i),s=this.modules[r||"editor"];return!r&&this[o]?this[o].apply(this,e):s&&s[o]&&s.shouldInitialize()?s[o].apply(s,e):void 0},e}();t.fn.extend({summernote:function(){var e=t.type(k.head(arguments)),i="string"===e,n="object"===e,r=t.extend({},t.summernote.options,n?k.head(arguments):{});r.langInfo=t.extend(!0,{},t.summernote.lang["en-US"],t.summernote.lang[r.lang]),r.icons=t.extend(!0,{},t.summernote.options.icons,r.icons),r.tooltip="auto"===r.tooltip?!O.isSupportTouch:r.tooltip,this.each(function(e,i){var n=t(i);if(!n.data("summernote")){var o=new se(n,r);n.data("summernote",o),n.data("summernote").triggerEvent("init",o.layoutInfo)}});var o=this.first();if(o.length){var s=o.data("summernote");if(i)return s.invoke.apply(s,k.from(arguments));r.focus&&s.invoke("editor.focus")}return this}}),t.summernote=t.extend(t.summernote,{version:"0.8.10",ui:m,dom:Ct,plugins:{},options:{modules:{editor:$t,clipboard:Rt,dropzone:Ht,codeview:zt,statusbar:Bt,fullscreen:Ut,handle:Wt,hintPopover:oe,autoLink:Vt,autoSync:qt,placeholder:Gt,buttons:Kt,toolbar:Xt,linkDialog:Zt,linkPopover:Qt,imageDialog:Jt,imagePopover:te,tablePopover:ee,videoDialog:ie,helpDialog:ne,airPopover:re},buttons:{},lang:"en-US",followingToolbar:!0,otherStaticBar:"",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,hintDirection:"bottom",tooltip:"auto",container:"body",maxTextLength:0,styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onBlurCodeview:null,onEnter:null,onKeyup:null,onKeydown:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})}),function(t){var e=t.Markdown=function(t){switch(typeof t){case"undefined":this.dialect=e.dialects.Gruber;break;case"object":this.dialect=t;break;default:if(!(t in e.dialects))throw new Error("Unknown Markdown dialect '"+String(t)+"'");this.dialect=e.dialects[t]}this.em_state=[],this.strong_state=[],this.debug_indent=""};function i(){return"Markdown.mk_block( "+uneval(this.toString())+", "+uneval(this.trailing)+", "+uneval(this.lineNumber)+" )"}function n(){var t=require("util");return"Markdown.mk_block( "+t.inspect(this.toString())+", "+t.inspect(this.trailing)+", "+t.inspect(this.lineNumber)+" )"}t.parse=function(t,i){return new e(i).toTree(t)},t.toHTML=function(e,i,n){var r=t.toHTMLTree(e,i,n);return t.renderJsonML(r)},t.toHTMLTree=function(t,e,i){"string"==typeof t&&(t=this.parse(t,e));var n=d(t),r={};n&&n.references&&(r=n.references);var o=function t(e,i,n){var r;n=n||{};var o=e.slice(0);"function"==typeof n.preprocessTreeNode&&(o=n.preprocessTreeNode(o,i));var s=d(o);if(s){for(r in o[1]={},s)o[1][r]=s[r];s=o[1]}if("string"==typeof o)return o;switch(o[0]){case"header":o[0]="h"+o[1].level,delete o[1].level;break;case"bulletlist":o[0]="ul";break;case"numberlist":o[0]="ol";break;case"listitem":o[0]="li";break;case"para":o[0]="p";break;case"markdown":o[0]="html",s&&delete s.references;break;case"code_block":o[0]="pre",r=s?2:1;var a=["code"];a.push.apply(a,o.splice(r,o.length-r)),o[r]=a;break;case"inlinecode":o[0]="code";break;case"img":o[1].src=o[1].href,delete o[1].href;break;case"linebreak":o[0]="br";break;case"link":o[0]="a";break;case"link_ref":o[0]="a";var l=i[s.ref];if(!l)return s.original;delete s.ref,s.href=l.href,l.title&&(s.title=l.title),delete s.original;break;case"img_ref":o[0]="img";var l=i[s.ref];if(!l)return s.original;delete s.ref,s.src=l.href,l.title&&(s.title=l.title),delete s.original}r=1;if(s){for(var c in o[1]){r=2;break}1===r&&o.splice(r,1)}for(;r<o.length;++r)o[r]=t(o[r],i,n);return o}(t,r,i);return function t(e){var i=d(e)?2:1;for(;i<e.length;)"string"==typeof e[i]?i+1<e.length&&"string"==typeof e[i+1]?e[i]+=e.splice(i+1,1)[0]:++i:(t(e[i]),++i)}(o),o};var r=e.mk_block=function(t,e,r){1==arguments.length&&(e="\n\n");var o=new String(t);return o.trailing=e,o.inspect=n,o.toSource=i,void 0!=r&&(o.lineNumber=r),o};function o(t){for(var e=0,i=-1;-1!==(i=t.indexOf("\n",i+1));)e++;return e}function s(t,e){var i=t+"_state",n="strong"==t?"em_state":"strong_state";function r(t){this.len_after=t,this.name="close_"+e}return function(o,s){if(this[i][0]==e)return this[i].shift(),[o.length,new r(o.length-e.length)];var a=this[n].slice(),l=this[i].slice();this[i].unshift(e);var c=this.processInline(o.substr(e.length)),h=c[c.length-1];this[i].shift();return h instanceof r?(c.pop(),[o.length-h.len_after,[t].concat(c)]):(this[n]=a,this[i]=l,[e.length,e])}}e.prototype.split_blocks=function(t,e){t=t.replace(/(\r\n|\n|\r)/g,"\n");var i,n=/([\s\S]+?)($|\n#|\n(?:\s*\n|$)+)/g,s=[],a=1;for(null!=(i=/^(\s*\n)/.exec(t))&&(a+=o(i[0]),n.lastIndex=i[0].length);null!==(i=n.exec(t));)"\n#"==i[2]&&(i[2]="\n",n.lastIndex--),s.push(r(i[1],i[2],a)),a+=o(i[0]);return s},e.prototype.processBlock=function(t,e){var i=this.dialect.block,n=i.__order__;if("__call__"in i)return i.__call__.call(this,t,e);for(var r=0;r<n.length;r++){var o=i[n[r]].call(this,t,e);if(o)return(!c(o)||o.length>0&&!c(o[0]))&&this.debug(n[r],"didn't return a proper array"),o}return[]},e.prototype.processInline=function(t){return this.dialect.inline.__call__.call(this,String(t))},e.prototype.toTree=function(t,e){var i=t instanceof Array?t:this.split_blocks(t),n=this.tree;try{for(this.tree=e||this.tree||["markdown"];i.length;){var r=this.processBlock(i.shift(),i);r.length&&this.tree.push.apply(this.tree,r)}return this.tree}finally{e&&(this.tree=n)}},e.prototype.debug=function(){var t=Array.prototype.slice.call(arguments);t.unshift(this.debug_indent),"undefined"!=typeof print&&print.apply(print,t),"undefined"!=typeof console&&void 0!==console.log&&console.log.apply(null,t)},e.prototype.loop_re_over_block=function(t,e,i){for(var n,r=e.valueOf();r.length&&null!=(n=t.exec(r));)r=r.substr(n[0].length),i.call(this,n);return r},e.dialects={},e.dialects.Gruber={block:{atxHeader:function(t,e){var i=t.match(/^(#{1,6})\s*(.*?)\s*#*\s*(?:\n|$)/);if(i){var n=["header",{level:i[1].length}];return Array.prototype.push.apply(n,this.processInline(i[2])),i[0].length<t.length&&e.unshift(r(t.substr(i[0].length),t.trailing,t.lineNumber+2)),[n]}},setextHeader:function(t,e){var i=t.match(/^(.*)\n([-=])\2\2+(?:\n|$)/);if(i){var n=["header",{level:"="===i[2]?1:2},i[1]];return i[0].length<t.length&&e.unshift(r(t.substr(i[0].length),t.trailing,t.lineNumber+2)),[n]}},code:function(t,e){var i=[],n=/^(?: {0,3}\t| {4})(.*)\n?/;if(t.match(n)){t:for(;;){var o=this.loop_re_over_block(n,t.valueOf(),function(t){i.push(t[1])});if(o.length){e.unshift(r(o,t.trailing));break t}if(!e.length)break t;if(!e[0].match(n))break t;i.push(t.trailing.replace(/[^\n]/g,"").substring(2)),t=e.shift()}return[["code_block",i.join("\n")]]}},horizRule:function(t,e){var i=t.match(/^(?:([\s\S]*?)\n)?[ \t]*([-_*])(?:[ \t]*\2){2,}[ \t]*(?:\n([\s\S]*))?$/);if(i){var n=[["hr"]];return i[1]&&n.unshift.apply(n,this.processBlock(i[1],[])),i[3]&&e.unshift(r(i[3])),n}},lists:function(){var t="[*+-]|\\d+\\.",e=/[*+-]/,i=new RegExp("^( {0,3})("+t+")[ \t]+"),n="(?: {0,3}\\t| {4})";function o(t,e,i,n){if(e)t.push(["para"].concat(i));else{var r=t[t.length-1]instanceof Array&&"para"==t[t.length-1][0]?t[t.length-1]:t;n&&t.length>1&&i.unshift(n);for(var o=0;o<i.length;o++){var s=i[o];"string"==typeof s&&r.length>1&&"string"==typeof r[r.length-1]?r[r.length-1]+=s:r.push(s)}}}function s(t,e){for(var i=new RegExp("^("+n+"{"+t+"}.*?\\n?)*$"),o=new RegExp("^"+n+"{"+t+"}","gm"),s=[];e.length>0&&i.exec(e[0]);){var a=e.shift(),l=a.replace(o,"");s.push(r(l,a.trailing,a.lineNumber))}return s}function a(t,e,i){var n=t.list,r=n[n.length-1];if(!(r[1]instanceof Array&&"para"==r[1][0]))if(e+1==i.length)r.push(["para"].concat(r.splice(1,r.length-1)));else{var o=r.pop();r.push(["para"].concat(r.splice(1,r.length-1)),o)}}return function(r,c){var h=r.match(i);if(h){for(var d,u,p,f=[],m=M(h),g=!1,v=[f[0].list];;){for(var y=r.split(/(?=\n)/),b="",_=0;_<y.length;_++){var x="",w=y[_].replace(/^\n/,function(t){return x=t,""}),k=(p=f.length,new RegExp("(?:^("+n+"{0,"+p+"} {0,3})("+t+")\\s+)|(^"+n+"{0,"+(p-1)+"}[ ]{0,4})"));if(void 0!==(h=w.match(k))[1]){b.length&&(o(d,g,this.processInline(b),x),g=!1,b=""),h[1]=h[1].replace(/ {0,3}\t/g," ");var C=Math.floor(h[1].length/4)+1;if(C>f.length)m=M(h),d.push(m),d=m[1]=["listitem"];else{var S=!1;for(u=0;u<f.length;u++)if(f[u].indent==h[1]){m=f[u].list,f.splice(u+1,f.length-(u+1)),S=!0;break}S||(++C<=f.length?(f.splice(C,f.length-C),m=f[C-1].list):(m=M(h),d.push(m))),d=["listitem"],m.push(d)}x=""}w.length>h[0].length&&(b+=x+w.substr(h[0].length))}b.length&&(o(d,g,this.processInline(b),x),g=!1,b="");var D=s(f.length,c);D.length>0&&(l(f,a,this),d.push.apply(d,this.toTree(D,[])));var T=c[0]&&c[0].valueOf()||"";if(!T.match(i)&&!T.match(/^ /))break;r=c.shift();var A=this.dialect.block.horizRule(r,c);if(A){v.push.apply(v,A);break}l(f,a,this),g=!0}return v}function M(t){var i=e.exec(t[2])?["bulletlist"]:["numberlist"];return f.push({list:i,indent:t[1]}),i}}}(),blockquote:function(t,e){if(t.match(/^>/m)){var i=[];if(">"!=t[0]){for(var n=t.split(/\n/),o=[],s=t.lineNumber;n.length&&">"!=n[0][0];)o.push(n.shift()),s++;var a=r(o.join("\n"),"\n",t.lineNumber);i.push.apply(i,this.processBlock(a,[])),t=r(n.join("\n"),t.trailing,s)}for(;e.length&&">"==e[0][0];){var l=e.shift();t=r(t+t.trailing+l,l.trailing,t.lineNumber)}var c=t.replace(/^> ?/gm,""),u=(this.tree,this.toTree(c,["blockquote"])),p=d(u);return p&&p.references&&(delete p.references,h(p)&&u.splice(1,1)),i.push(u),i}},referenceDefn:function(t,e){var i=/^\s*\[(.*?)\]:\s*(\S+)(?:\s+(?:(['"])(.*?)\3|\((.*?)\)))?\n?/;if(t.match(i)){d(this.tree)||this.tree.splice(1,0,{});var n=d(this.tree);void 0===n.references&&(n.references={});var o=this.loop_re_over_block(i,t,function(t){t[2]&&"<"==t[2][0]&&">"==t[2][t[2].length-1]&&(t[2]=t[2].substring(1,t[2].length-1));var e=n.references[t[1].toLowerCase()]={href:t[2]};void 0!==t[4]?e.title=t[4]:void 0!==t[5]&&(e.title=t[5])});return o.length&&e.unshift(r(o,t.trailing)),[]}},para:function(t,e){return[["para"].concat(this.processInline(t))]}}},e.dialects.Gruber.inline={__oneElement__:function(t,e,i){var n,r;return e=e||this.dialect.inline.__patterns__,(n=new RegExp("([\\s\\S]*?)("+(e.source||e)+")").exec(t))?n[1]?[n[1].length,n[1]]:(n[2]in this.dialect.inline&&(r=this.dialect.inline[n[2]].call(this,t.substr(n.index),n,i||[])),r=r||[n[2].length,n[2]]):[t.length,t]},__call__:function(t,e){var i,n=[];function r(t){"string"==typeof t&&"string"==typeof n[n.length-1]?n[n.length-1]+=t:n.push(t)}for(;t.length>0;)i=this.dialect.inline.__oneElement__.call(this,t,e,n),t=t.substr(i.shift()),l(i,r);return n},"]":function(){},"}":function(){},__escape__:/^\\[\\`\*_{}\[\]()#\+.!\-]/,"\\":function(t){return this.dialect.inline.__escape__.exec(t)?[2,t.charAt(1)]:[1,"\\"]},"![":function(t){var e=t.match(/^!\[(.*?)\][ \t]*\([ \t]*([^")]*?)(?:[ \t]+(["'])(.*?)\3)?[ \t]*\)/);if(e){e[2]&&"<"==e[2][0]&&">"==e[2][e[2].length-1]&&(e[2]=e[2].substring(1,e[2].length-1)),e[2]=this.dialect.inline.__call__.call(this,e[2],/\\/)[0];var i={alt:e[1],href:e[2]||""};return void 0!==e[4]&&(i.title=e[4]),[e[0].length,["img",i]]}return(e=t.match(/^!\[(.*?)\][ \t]*\[(.*?)\]/))?[e[0].length,["img_ref",{alt:e[1],ref:e[2].toLowerCase(),original:e[0]}]]:[2,"!["]},"[":function(t){var i=String(t),n=e.DialectHelpers.inline_until_char.call(this,t.substr(1),"]");if(!n)return[1,"["];var r,o,s=1+n[0],a=n[1],l=(t=t.substr(s)).match(/^\s*\([ \t]*([^"']*)(?:[ \t]+(["'])(.*?)\2)?[ \t]*\)/);if(l){var c=l[1];if(s+=l[0].length,c&&"<"==c[0]&&">"==c[c.length-1]&&(c=c.substring(1,c.length-1)),!l[3])for(var h=1,d=0;d<c.length;d++)switch(c[d]){case"(":h++;break;case")":0==--h&&(s-=c.length-d,c=c.substring(0,d))}return o={href:(c=this.dialect.inline.__call__.call(this,c,/\\/)[0])||""},void 0!==l[3]&&(o.title=l[3]),r=["link",o].concat(a),[s,r]}return(l=t.match(/^\s*\[(.*?)\]/))?(s+=l[0].length,r=["link_ref",o={ref:(l[1]||String(a)).toLowerCase(),original:i.substr(0,s)}].concat(a),[s,r]):1==a.length&&"string"==typeof a[0]?(r=["link_ref",o={ref:a[0].toLowerCase(),original:i.substr(0,s)},a[0]],[s,r]):[1,"["]},"<":function(t){var e;return null!=(e=t.match(/^<(?:((https?|ftp|mailto):[^>]+)|(.*?@.*?\.[a-zA-Z]+))>/))?e[3]?[e[0].length,["link",{href:"mailto:"+e[3]},e[3]]]:"mailto"==e[2]?[e[0].length,["link",{href:e[1]},e[1].substr("mailto:".length)]]:[e[0].length,["link",{href:e[1]},e[1]]]:[1,"<"]},"`":function(t){var e=t.match(/(`+)(([\s\S]*?)\1)/);return e&&e[2]?[e[1].length+e[2].length,["inlinecode",e[3]]]:[1,"`"]}," \n":function(t){return[3,["linebreak"]]}},e.dialects.Gruber.inline["**"]=s("strong","**"),e.dialects.Gruber.inline.__=s("strong","__"),e.dialects.Gruber.inline["*"]=s("em","*"),e.dialects.Gruber.inline._=s("em","_"),e.buildBlockOrder=function(t){var e=[];for(var i in t)"__order__"!=i&&"__call__"!=i&&e.push(i);t.__order__=e},e.buildInlinePatterns=function(t){var e=[];for(var i in t)if(!i.match(/^__.*__$/)){var n=i.replace(/([\\.*+?|()\[\]{}])/g,"\\$1").replace(/\n/,"\\n");e.push(1==i.length?n:"(?:"+n+")")}e=e.join("|"),t.__patterns__=e;var r=t.__call__;t.__call__=function(t,i){return void 0!=i?r.call(this,t,i):r.call(this,t,e)}},e.DialectHelpers={},e.DialectHelpers.inline_until_char=function(t,e){for(var i=0,n=[];;){if(t.charAt(i)==e)return[++i,n];if(i>=t.length)return null;var r=this.dialect.inline.__oneElement__.call(this,t.substr(i));i+=r[0],n.push.apply(n,r.slice(1))}},e.subclassDialect=function(t){function e(){}function i(){}return e.prototype=t.block,i.prototype=t.inline,{block:new e,inline:new i}},e.buildBlockOrder(e.dialects.Gruber.block),e.buildInlinePatterns(e.dialects.Gruber.inline),e.dialects.Maruku=e.subclassDialect(e.dialects.Gruber),e.dialects.Maruku.processMetaHash=function(t){for(var e=function(t){var e=t.split(""),i=[""],n=!1;for(;e.length;){var r=e.shift();switch(r){case" ":n?i[i.length-1]+=r:i.push("");break;case"'":case'"':n=!n;break;case"\\":r=e.shift();default:i[i.length-1]+=r}}return i}(t),i={},n=0;n<e.length;++n)if(/^#/.test(e[n]))i.id=e[n].substring(1);else if(/^\./.test(e[n]))i.class?i.class=i.class+e[n].replace(/./," "):i.class=e[n].substring(1);else if(/\=/.test(e[n])){var r=e[n].split(/\=/);i[r[0]]=r[1]}return i},e.dialects.Maruku.block.document_meta=function(t,e){if(!(t.lineNumber>1)&&t.match(/^(?:\w+:.*\n)*\w+:.*$/)){d(this.tree)||this.tree.splice(1,0,{});var i=t.split(/\n/);for(p in i){var n=i[p].match(/(\w+):\s*(.*)$/),r=n[1].toLowerCase(),o=n[2];this.tree[1][r]=o}return[]}},e.dialects.Maruku.block.block_meta=function(t,e){var i=t.match(/(^|\n) {0,3}\{:\s*((?:\\\}|[^\}])*)\s*\}$/);if(i){var n,r=this.dialect.processMetaHash(i[2]);if(""===i[1]){var o=this.tree[this.tree.length-1];if(n=d(o),"string"==typeof o)return;for(a in n||(n={},o.splice(1,0,n)),r)n[a]=r[a];return[]}var s=t.replace(/\n.*$/,""),l=this.processBlock(s,[]);for(a in(n=d(l[0]))||(n={},l[0].splice(1,0,n)),r)n[a]=r[a];return l}},e.dialects.Maruku.block.definition_list=function(t,e){var i,n=/^((?:[^\s:].*\n)+):\s+([\s\S]+)$/,r=["dl"];if(a=t.match(n)){for(var o=[t];e.length&&n.exec(e[0]);)o.push(e.shift());for(var s=0;s<o.length;++s){var a,l=(a=o[s].match(n))[1].replace(/\n$/,"").split(/\n/),c=a[2].split(/\n:\s+/);for(i=0;i<l.length;++i)r.push(["dt",l[i]]);for(i=0;i<c.length;++i)r.push(["dd"].concat(this.processInline(c[i].replace(/(\n)\s+/,"$1"))))}return[r]}},e.dialects.Maruku.block.table=function(t,e){var i,n,r=function(t,e){(e=e||"\\s").match(/^[\\|\[\]{}?*.+^$]$/)&&(e="\\"+e);for(var i,n=[],r=new RegExp("^((?:\\\\.|[^\\\\"+e+"])*)"+e+"(.*)");i=t.match(r);)n.push(i[1]),t=i[2];return n.push(t),n};if(n=t.match(/^ {0,3}\|(.+)\n {0,3}\|\s*([\-:]+[\-| :]*)\n((?:\s*\|.*(?:\n|$))*)(?=\n|$)/))n[3]=n[3].replace(/^\s*\|/gm,"");else if(!(n=t.match(/^ {0,3}(\S(?:\\.|[^\\|])*\|.*)\n {0,3}([\-:]+\s*\|[\-| :]*)\n((?:(?:\\.|[^\\|])*\|.*(?:\n|$))*)(?=\n|$)/)))return;var o=["table",["thead",["tr"]],["tbody"]];n[2]=n[2].replace(/\|\s*$/,"").split("|");var s=[];for(l(n[2],function(t){t.match(/^\s*-+:\s*$/)?s.push({align:"right"}):t.match(/^\s*:-+\s*$/)?s.push({align:"left"}):t.match(/^\s*:-+:\s*$/)?s.push({align:"center"}):s.push({})}),n[1]=r(n[1].replace(/\|\s*$/,""),"|"),i=0;i<n[1].length;i++)o[1][1].push(["th",s[i]||{}].concat(this.processInline(n[1][i].trim())));return l(n[3].replace(/\|\s*$/gm,"").split("\n"),function(t){var e=["tr"];for(t=r(t,"|"),i=0;i<t.length;i++)e.push(["td",s[i]||{}].concat(this.processInline(t[i].trim())));o[2].push(e)},this),[o]},e.dialects.Maruku.inline["{:"]=function(t,e,i){if(!i.length)return[2,"{:"];var n=i[i.length-1];if("string"==typeof n)return[2,"{:"];var r=t.match(/^\{:\s*((?:\\\}|[^\}])*)\s*\}/);if(!r)return[2,"{:"];var o=this.dialect.processMetaHash(r[1]),s=d(n);for(var a in s||(s={},n.splice(1,0,s)),o)s[a]=o[a];return[r[0].length,""]},e.dialects.Maruku.inline.__escape__=/^\\[\\`\*_{}\[\]()#\+.!\-|:]/,e.buildBlockOrder(e.dialects.Maruku.block),e.buildInlinePatterns(e.dialects.Maruku.inline);var l,c=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)};l=Array.prototype.forEach?function(t,e,i){return t.forEach(e,i)}:function(t,e,i){for(var n=0;n<t.length;n++)e.call(i||t,t[n],n,t)};var h=function(t){for(var e in t)if(hasOwnProperty.call(t,e))return!1;return!0};function d(t){return c(t)&&t.length>1&&"object"==typeof t[1]&&!c(t[1])?t[1]:void 0}function u(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function f(t){if("string"==typeof t)return u(t);var e=t.shift(),i={},n=[];for(!t.length||"object"!=typeof t[0]||t[0]instanceof Array||(i=t.shift());t.length;)n.push(f(t.shift()));var r="";for(var o in i)r+=" "+o+'="'+u(i[o])+'"';return"img"==e||"br"==e||"hr"==e?"<"+e+r+"/>":"<"+e+r+">"+n.join("")+"</"+e+">"}t.renderJsonML=function(t,e){(e=e||{}).root=e.root||!1;var i=[];if(e.root)i.push(f(t));else for(t.shift(),!t.length||"object"!=typeof t[0]||t[0]instanceof Array||t.shift();t.length;)i.push(f(t.shift()));return i.join("\n\n")}}("undefined"==typeof exports?(window.markdown={},window.markdown):exports),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t){"use strict";var e=function(e,i){t.each(["autofocus","savable","hideable","width","height","resize","iconlibrary","language","footer","fullscreen","hiddenButtons","disabledButtons"],function(n,r){void 0!==t(e).data(r)&&((i="object"==typeof i?i:{})[r]=t(e).data(r))}),this.$ns="bootstrap-markdown",this.$element=t(e),this.$editable={el:null,type:null,attrKeys:[],attrValues:[],content:null},this.$options=t.extend(!0,{},t.fn.markdown.defaults,i,this.$element.data("options")),this.$oldContent=null,this.$isPreview=!1,this.$isFullscreen=!1,this.$editor=null,this.$textarea=null,this.$handler=[],this.$callback=[],this.$nextTab=[],this.showEditor()};e.prototype={constructor:e,__alterButtons:function(e,i){var n=this.$handler,r="all"==e,o=this;t.each(n,function(t,n){!1===(!r&&n.indexOf(e)<0)&&i(o.$editor.find('button[data-handler="'+n+'"]'))})},__buildButtons:function(e,i){var n,r=this.$ns,o=this.$handler,s=this.$callback;for(n=0;n<e.length;n++){var a,l=e[n];for(a=0;a<l.length;a++){var c,h=l[a].data,d=t("<div/>",{class:"btn-group"});for(c=0;c<h.length;c++){var u,p,f=h[c],m=r+"-"+f.name,g=this.__getIcon(f.icon),v=f.btnText?f.btnText:"",y=f.btnClass?f.btnClass:"btn",b=f.tabIndex?f.tabIndex:"-1",_=void 0!==f.hotkey?f.hotkey:"",x=void 0!==jQuery.hotkeys&&""!==_?" ("+_+")":"";(u=t("<button></button>")).text(" "+this.__localize(v)).addClass("btn-default btn-sm").addClass(y),y.match(/btn\-(primary|success|info|warning|danger|link)/)&&u.removeClass("btn-default"),u.attr({type:"button",title:this.__localize(f.title)+x,tabindex:b,"data-provider":r,"data-handler":m,"data-hotkey":_}),!0===f.toggle&&u.attr("data-toggle","button"),(p=t("<span/>")).addClass(g),p.prependTo(u),d.append(u),o.push(m),s.push(f.callback)}i.append(d)}}return i},__setListener:function(){var e=void 0!==this.$textarea.attr("rows"),i=this.$textarea.val().split("\n").length>5?this.$textarea.val().split("\n").length:"5",n=e?this.$textarea.attr("rows"):i;this.$textarea.attr("rows",n),this.$options.resize&&this.$textarea.css("resize",this.$options.resize),this.$textarea.on({focus:t.proxy(this.focus,this),keyup:t.proxy(this.keyup,this),change:t.proxy(this.change,this),select:t.proxy(this.select,this)}),this.eventSupported("keydown")&&this.$textarea.on("keydown",t.proxy(this.keydown,this)),this.eventSupported("keypress")&&this.$textarea.on("keypress",t.proxy(this.keypress,this)),this.$textarea.data("markdown",this)},__handle:function(e){var i=t(e.currentTarget),n=this.$handler,r=this.$callback,o=i.attr("data-handler"),s=r[n.indexOf(o)];t(e.currentTarget).focus(),s(this),this.change(this),o.indexOf("cmdSave")<0&&this.$textarea.focus(),e.preventDefault()},__localize:function(e){var i=t.fn.markdown.messages,n=this.$options.language;return void 0!==i&&void 0!==i[n]&&void 0!==i[n][e]?i[n][e]:e},__getIcon:function(t){return"object"==typeof t?t[this.$options.iconlibrary]:t},setFullscreen:function(e){var i=this.$editor,n=this.$textarea;!0===e?(i.addClass("md-fullscreen-mode"),t("body").addClass("md-nooverflow"),this.$options.onFullscreen(this)):(i.removeClass("md-fullscreen-mode"),t("body").removeClass("md-nooverflow"),1==this.$isPreview&&this.hidePreview().showPreview()),this.$isFullscreen=e,n.focus()},showEditor:function(){var e,i=this,n=this.$ns,r=this.$element,o=(r.css("height"),r.css("width"),this.$editable),s=this.$handler,a=this.$callback,l=this.$options,c=t("<div/>",{class:"md-editor",click:function(){i.focus()}});if(null===this.$editor){var h=t("<div/>",{class:"md-header btn-toolbar"}),d=[];if(l.buttons.length>0&&(d=d.concat(l.buttons[0])),l.additionalButtons.length>0&&t.each(l.additionalButtons[0],function(e,i){var n=t.grep(d,function(t,e){return t.name===i.name});n.length>0?n[0].data=n[0].data.concat(i.data):d.push(l.additionalButtons[0][e])}),l.reorderButtonGroups.length>0&&(d=d.filter(function(t){return l.reorderButtonGroups.indexOf(t.name)>-1}).sort(function(t,e){return l.reorderButtonGroups.indexOf(t.name)<l.reorderButtonGroups.indexOf(e.name)?-1:l.reorderButtonGroups.indexOf(t.name)>l.reorderButtonGroups.indexOf(e.name)?1:0})),d.length>0&&(h=this.__buildButtons([d],h)),l.fullscreen.enable&&h.append('<div class="md-controls"><a class="md-control md-control-fullscreen" href="#"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOn)+'"></span></a></div>').on("click",".md-control-fullscreen",function(t){t.preventDefault(),i.setFullscreen(!0)}),c.append(h),r.is("textarea"))r.before(c),(e=r).addClass("md-input"),c.append(e);else{var u="function"==typeof toMarkdown?toMarkdown(r.html()):r.html(),p=t.trim(u);e=t("<textarea/>",{class:"md-input",val:p}),c.append(e),o.el=r,o.type=r.prop("tagName").toLowerCase(),o.content=r.html(),t(r[0].attributes).each(function(){o.attrKeys.push(this.nodeName),o.attrValues.push(this.nodeValue)}),r.replaceWith(c)}var f,m=t("<div/>",{class:"md-footer"}),g=!1;if(l.savable){g=!0;s.push("cmdSave"),a.push(l.onSave),m.append('<button class="btn btn-success" data-provider="'+n+'" data-handler="cmdSave"><i class="icon icon-white icon-ok"></i> '+this.__localize("Save")+"</button>")}if(f="function"==typeof l.footer?l.footer(this):l.footer,""!==t.trim(f)&&(g=!0,m.append(f)),g&&c.append(m),l.width&&"inherit"!==l.width&&(jQuery.isNumeric(l.width)?(c.css("display","table"),e.css("width",l.width+"px")):c.addClass(l.width)),l.height&&"inherit"!==l.height)if(jQuery.isNumeric(l.height)){var v=l.height;h&&(v=Math.max(0,v-h.outerHeight())),m&&(v=Math.max(0,v-m.outerHeight())),e.css("height",v+"px")}else c.addClass(l.height);this.$editor=c,this.$textarea=e,this.$editable=o,this.$oldContent=this.getContent(),this.__setListener(),this.$editor.attr("id",(new Date).getTime()),this.$editor.on("click",'[data-provider="bootstrap-markdown"]',t.proxy(this.__handle,this)),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this.eventSupported("keydown")&&"object"==typeof jQuery.hotkeys&&h.find('[data-provider="bootstrap-markdown"]').each(function(){var i=t(this),n=i.attr("data-hotkey");""!==n.toLowerCase()&&e.bind("keydown",n,function(){return i.trigger("click"),!1})}),"preview"===l.initialstate?this.showPreview():"fullscreen"===l.initialstate&&l.fullscreen.enable&&this.setFullscreen(!0)}else this.$editor.show();return l.autofocus&&(this.$textarea.focus(),this.$editor.addClass("active")),l.fullscreen.enable&&!1!==l.fullscreen&&(this.$editor.append('<div class="md-fullscreen-controls"><a href="#" class="exit-fullscreen" title="Exit fullscreen"><span class="'+this.__getIcon(l.fullscreen.icons.fullscreenOff)+'"></span></a></div>'),this.$editor.on("click",".exit-fullscreen",function(t){t.preventDefault(),i.setFullscreen(!1)})),this.hideButtons(l.hiddenButtons),this.disableButtons(l.disabledButtons),l.onShow(this),this},parseContent:function(t){t=t||this.$textarea.val();return this.$options.parser?this.$options.parser(t):"object"==typeof markdown?markdown.toHTML(t):"function"==typeof marked?marked(t):t},showPreview:function(){var e,i,n=this.$options,r=this.$textarea,o=r.next(),s=t("<div/>",{class:"md-preview","data-provider":"markdown-preview"});return 1==this.$isPreview?this:(this.$isPreview=!0,this.disableButtons("all").enableButtons("cmdPreview"),e="string"==typeof(i=n.onPreview(this))?i:this.parseContent(),s.html(e),o&&"md-footer"==o.attr("class")?s.insertBefore(o):r.parent().append(s),s.css({width:r.outerWidth()+"px",height:r.outerHeight()+"px"}),this.$options.resize&&s.css("resize",this.$options.resize),r.hide(),s.data("markdown",this),(this.$element.is(":disabled")||this.$element.is("[readonly]"))&&(this.$editor.addClass("md-editor-disabled"),this.disableButtons("all")),this)},hidePreview:function(){return this.$isPreview=!1,this.$editor.find('div[data-provider="markdown-preview"]').remove(),this.enableButtons("all"),this.disableButtons(this.$options.disabledButtons),this.$textarea.show(),this.__setListener(),this},isDirty:function(){return this.$oldContent!=this.getContent()},getContent:function(){return this.$textarea.val()},setContent:function(t){return this.$textarea.val(t),this},findSelection:function(t){var e;if((e=this.getContent().indexOf(t))>=0&&t.length>0){var i,n=this.getSelection();return this.setSelection(e,e+t.length),i=this.getSelection(),this.setSelection(n.start,n.end),i}return null},getSelection:function(){var t=this.$textarea[0];return("selectionStart"in t&&function(){var e=t.selectionEnd-t.selectionStart;return{start:t.selectionStart,end:t.selectionEnd,length:e,text:t.value.substr(t.selectionStart,e)}}||function(){return null})()},setSelection:function(t,e){var i=this.$textarea[0];return("selectionStart"in i&&function(){i.selectionStart=t,i.selectionEnd=e}||function(){return null})()},replaceSelection:function(t){var e=this.$textarea[0];return("selectionStart"in e&&function(){return e.value=e.value.substr(0,e.selectionStart)+t+e.value.substr(e.selectionEnd,e.value.length),e.selectionStart=e.value.length,this}||function(){return e.value+=t,jQuery(e)})()},getNextTab:function(){if(0===this.$nextTab.length)return null;var t,e=this.$nextTab.shift();return"function"==typeof e?t=e():"object"==typeof e&&e.length>0&&(t=e),t},setNextTab:function(t,e){if("string"==typeof t){var i=this;this.$nextTab.push(function(){return i.findSelection(t)})}else if("number"==typeof t&&"number"==typeof e){var n=this.getSelection();this.setSelection(t,e),this.$nextTab.push(this.getSelection()),this.setSelection(n.start,n.end)}},__parseButtonNameParam:function(t){return"string"==typeof t?t.split(" "):t},enableButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.removeAttr("disabled")})}),this},disableButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.attr("disabled","disabled")})}),this},hideButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.addClass("hidden")})}),this},showButtons:function(e){var i=this.__parseButtonNameParam(e),n=this;return t.each(i,function(t,e){n.__alterButtons(i[t],function(t){t.removeClass("hidden")})}),this},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},keyup:function(t){var e=!1;switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:var i;if(null!==(i=this.getNextTab())){var n=this;setTimeout(function(){n.setSelection(i.start,i.end)},500),e=!0}else{var r=this.getSelection();r.start==r.end&&r.end==this.getContent().length?e=!1:(this.setSelection(this.getContent().length,this.getContent().length),e=!0)}break;case 13:e=!1;break;case 27:this.$isFullscreen&&this.setFullscreen(!1),e=!1;break;default:e=!1}e&&(t.stopPropagation(),t.preventDefault()),this.$options.onChange(this)},change:function(t){return this.$options.onChange(this),this},select:function(t){return this.$options.onSelect(this),this},focus:function(e){var i=this.$options,n=(i.hideable,this.$editor);return n.addClass("active"),t(document).find(".md-editor").each(function(){var e;t(this).attr("id")!==n.attr("id")&&(null===(e=t(this).find("textarea").data("markdown"))&&(e=t(this).find('div[data-provider="markdown-preview"]').data("markdown")),e&&e.blur())}),i.onFocus(this),this},blur:function(e){var i=this.$options,n=i.hideable,r=this.$editor,o=this.$editable;if(r.hasClass("active")||0===this.$element.parent().length){if(r.removeClass("active"),n)if(null!==o.el){var s=t("<"+o.type+"/>"),a=this.getContent(),l=this.parseContent(a);t(o.attrKeys).each(function(t,e){s.attr(o.attrKeys[t],o.attrValues[t])}),s.html(l),r.replaceWith(s)}else r.hide();i.onBlur(this)}return this}};var i=t.fn.markdown;t.fn.markdown=function(i){return this.each(function(){var n=t(this),r=n.data("markdown"),o="object"==typeof i&&i;r||n.data("markdown",r=new e(this,o))})},t.fn.markdown.messages={},t.fn.markdown.defaults={autofocus:!1,hideable:!1,savable:!1,width:"inherit",height:"inherit",resize:"none",iconlibrary:"glyph",language:"en",initialstate:"editor",parser:null,buttons:[[{name:"groupFont",data:[{name:"cmdBold",hotkey:"Ctrl+B",title:"Bold",icon:{glyph:"glyphicon glyphicon-bold",fa:"fa fa-bold","fa-3":"icon-bold"},callback:function(t){var e,i,n=t.getSelection(),r=t.getContent();e=0===n.length?t.__localize("strong text"):n.text,"**"===r.substr(n.start-2,2)&&"**"===r.substr(n.end,2)?(t.setSelection(n.start-2,n.end+2),t.replaceSelection(e),i=n.start-2):(t.replaceSelection("**"+e+"**"),i=n.start+2),t.setSelection(i,i+e.length)}},{name:"cmdItalic",title:"Italic",hotkey:"Ctrl+I",icon:{glyph:"glyphicon glyphicon-italic",fa:"fa fa-italic","fa-3":"icon-italic"},callback:function(t){var e,i,n=t.getSelection(),r=t.getContent();e=0===n.length?t.__localize("emphasized text"):n.text,"_"===r.substr(n.start-1,1)&&"_"===r.substr(n.end,1)?(t.setSelection(n.start-1,n.end+1),t.replaceSelection(e),i=n.start-1):(t.replaceSelection("_"+e+"_"),i=n.start+1),t.setSelection(i,i+e.length)}},{name:"cmdHeading",title:"Heading",hotkey:"Ctrl+H",icon:{glyph:"glyphicon glyphicon-header",fa:"fa fa-header","fa-3":"icon-font"},callback:function(t){var e,i,n,r,o=t.getSelection(),s=t.getContent();e=0===o.length?t.__localize("heading text"):o.text+"\n",n=4,"### "===s.substr(o.start-n,n)||(n=3,"###"===s.substr(o.start-n,n))?(t.setSelection(o.start-n,o.end),t.replaceSelection(e),i=o.start-n):o.start>0&&((r=s.substr(o.start-1,1))&&"\n"!=r)?(t.replaceSelection("\n\n### "+e),i=o.start+6):(t.replaceSelection("### "+e),i=o.start+4),t.setSelection(i,i+e.length)}}]},{name:"groupLink",data:[{name:"cmdUrl",title:"URL/Link",hotkey:"Ctrl+L",icon:{glyph:"glyphicon glyphicon-link",fa:"fa fa-link","fa-3":"icon-link"},callback:function(e){var i,n,r,o=e.getSelection();e.getContent();i=0===o.length?e.__localize("enter link description here"):o.text,r=prompt(e.__localize("Insert Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(mailto:)|(//))[a-z0-9]","i");if(null!==r&&""!==r&&"http://"!==r&&s.test(r)){var a=t("<div>"+r+"</div>").text();e.replaceSelection("["+i+"]("+a+")"),n=o.start+1,e.setSelection(n,n+i.length)}}},{name:"cmdImage",title:"Image",hotkey:"Ctrl+G",icon:{glyph:"glyphicon glyphicon-picture",fa:"fa fa-picture-o","fa-3":"icon-picture"},callback:function(e){var i,n,r,o=e.getSelection();e.getContent();i=0===o.length?e.__localize("enter image description here"):o.text,r=prompt(e.__localize("Insert Image Hyperlink"),"http://");var s=new RegExp("^((http|https)://|(//))[a-z0-9]","i");if(null!==r&&""!==r&&"http://"!==r&&s.test(r)){var a=t("<div>"+r+"</div>").text();e.replaceSelection("+'")'),n=o.start+2,e.setNextTab(e.__localize("enter image title here")),e.setSelection(n,n+i.length)}}}]},{name:"groupMisc",data:[{name:"cmdList",hotkey:"Ctrl+U",title:"Unordered List",icon:{glyph:"glyphicon glyphicon-list",fa:"fa fa-list","fa-3":"icon-list-ul"},callback:function(e){var i,n,r=e.getSelection();e.getContent();if(0===r.length)i=e.__localize("list text here"),e.replaceSelection("- "+i),n=r.start+2;else if(r.text.indexOf("\n")<0)i=r.text,e.replaceSelection("- "+i),n=r.start+2;else{var o=[];i=(o=r.text.split("\n"))[0],t.each(o,function(t,e){o[t]="- "+e}),e.replaceSelection("\n\n"+o.join("\n")),n=r.start+4}e.setSelection(n,n+i.length)}},{name:"cmdListO",hotkey:"Ctrl+O",title:"Ordered List",icon:{glyph:"glyphicon glyphicon-th-list",fa:"fa fa-list-ol","fa-3":"icon-list-ol"},callback:function(e){var i,n,r=e.getSelection();e.getContent();if(0===r.length)i=e.__localize("list text here"),e.replaceSelection("1. "+i),n=r.start+3;else if(r.text.indexOf("\n")<0)i=r.text,e.replaceSelection("1. "+i),n=r.start+3;else{var o=[];i=(o=r.text.split("\n"))[0],t.each(o,function(t,e){o[t]="1. "+e}),e.replaceSelection("\n\n"+o.join("\n")),n=r.start+5}e.setSelection(n,n+i.length)}},{name:"cmdCode",hotkey:"Ctrl+K",title:"Code",icon:{glyph:"glyphicon glyphicon-asterisk",fa:"fa fa-code","fa-3":"icon-code"},callback:function(t){var e,i,n=t.getSelection(),r=t.getContent();e=0===n.length?t.__localize("code text here"):n.text,"```\n"===r.substr(n.start-4,4)&&"\n```"===r.substr(n.end,4)?(t.setSelection(n.start-4,n.end+4),t.replaceSelection(e),i=n.start-4):"`"===r.substr(n.start-1,1)&&"`"===r.substr(n.end,1)?(t.setSelection(n.start-1,n.end+1),t.replaceSelection(e),i=n.start-1):r.indexOf("\n")>-1?(t.replaceSelection("```\n"+e+"\n```"),i=n.start+4):(t.replaceSelection("`"+e+"`"),i=n.start+1),t.setSelection(i,i+e.length)}},{name:"cmdQuote",hotkey:"Ctrl+Q",title:"Quote",icon:{glyph:"glyphicon glyphicon-comment",fa:"fa fa-quote-left","fa-3":"icon-quote-left"},callback:function(e){var i,n,r=e.getSelection();e.getContent();if(0===r.length)i=e.__localize("quote here"),e.replaceSelection("> "+i),n=r.start+2;else if(r.text.indexOf("\n")<0)i=r.text,e.replaceSelection("> "+i),n=r.start+2;else{var o=[];i=(o=r.text.split("\n"))[0],t.each(o,function(t,e){o[t]="> "+e}),e.replaceSelection("\n\n"+o.join("\n")),n=r.start+4}e.setSelection(n,n+i.length)}}]},{name:"groupUtil",data:[{name:"cmdPreview",toggle:!0,hotkey:"Ctrl+P",title:"Preview",btnText:"Preview",btnClass:"btn btn-primary btn-sm",icon:{glyph:"glyphicon glyphicon-search",fa:"fa fa-search","fa-3":"icon-search"},callback:function(t){!1===t.$isPreview?t.showPreview():t.hidePreview()}}]}]],additionalButtons:[],reorderButtonGroups:[],hiddenButtons:[],disabledButtons:[],footer:"",fullscreen:{enable:!0,icons:{fullscreenOn:{fa:"fa fa-expand",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-full"},fullscreenOff:{fa:"fa fa-compress",glyph:"glyphicon glyphicon-fullscreen","fa-3":"icon-resize-small"}}},onShow:function(t){},onPreview:function(t){},onSave:function(t){},onBlur:function(t){},onFocus:function(t){},onChange:function(t){},onFullscreen:function(t){},onSelect:function(t){}},t.fn.markdown.Constructor=e,t.fn.markdown.noConflict=function(){return t.fn.markdown=i,this};var n=function(t){var e=t;e.data("markdown")?e.data("markdown").showEditor():e.markdown()};t(document).on("click.markdown.data-api",'[data-provide="markdown-editable"]',function(e){n(t(this)),e.preventDefault()}).on("click focusin",function(e){var i;i=t(document.activeElement),t(document).find(".md-editor").each(function(){var e=t(this),n=i.closest(".md-editor")[0]===this,r=e.find("textarea").data("markdown")||e.find('div[data-provider="markdown-preview"]').data("markdown");r&&!n&&r.blur()})}).ready(function(){t('textarea[data-provide="markdown"]').each(function(){n(t(this))})})}),$.fn.markdown.defaults.iconlibrary="fa",function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){t.extend(t.fn,{validate:function(e){if(this.length){var i=t.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(e){i.submitButton=e.currentTarget,t(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(e){function n(){var n,r;return i.submitButton&&(i.settings.submitHandler||i.formSubmitted)&&(n=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),!i.settings.submitHandler||(r=i.settings.submitHandler.call(i,i.currentForm,e),n&&n.remove(),void 0!==r&&r)}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,n()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):n():(i.focusInvalid(),!1)})),i)}e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var e,i,n;return t(this[0]).is("form")?e=this.validate().form():(n=[],e=!0,i=t(this[0].form).validate(),this.each(function(){(e=i.element(this)&&e)||(n=n.concat(i.errorList))}),i.errorList=n),e},rules:function(e,i){var n,r,o,s,a,l,c=this[0];if(null!=c&&(!c.form&&c.hasAttribute("contenteditable")&&(c.form=this.closest("form")[0],c.name=this.attr("name")),null!=c.form)){if(e)switch(r=(n=t.data(c.form,"validator").settings).rules,o=t.validator.staticRules(c),e){case"add":t.extend(o,t.validator.normalizeRule(i)),delete o.messages,r[c.name]=o,i.messages&&(n.messages[c.name]=t.extend(n.messages[c.name],i.messages));break;case"remove":return i?(l={},t.each(i.split(/\s/),function(t,e){l[e]=o[e],delete o[e]}),l):(delete r[c.name],o)}return(s=t.validator.normalizeRules(t.extend({},t.validator.classRules(c),t.validator.attributeRules(c),t.validator.dataRules(c),t.validator.staticRules(c)),c)).required&&(a=s.required,delete s.required,s=t.extend({required:a},s)),s.remote&&(a=s.remote,delete s.remote,s=t.extend(s,{remote:a})),s}}}),t.extend(t.expr.pseudos||t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){var i=t(e).val();return null!==i&&!!t.trim(""+i)},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:void 0===i?e:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(new RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(e,i){9===i.which&&""===this.elementValue(e)||-1!==t.inArray(i.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(n):t(e).addClass(i).removeClass(n)},unhighlight:function(e,i,n){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(n):t(e).removeClass(i).addClass(n)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}."),step:t.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var e,i=this.groups={};function n(e){!this.form&&this.hasAttribute("contenteditable")&&(this.form=t(this).closest("form")[0],this.name=t(this).attr("name"));var i=t.data(this.form,"validator"),n="on"+e.type.replace(/^validate/,""),r=i.settings;r[n]&&!t(this).is(r.ignore)&&r[n].call(i,this,e)}t.each(this.settings.groups,function(e,n){"string"==typeof n&&(n=n.split(/\s/)),t.each(n,function(t,n){i[n]=e})}),e=this.settings.rules,t.each(e,function(i,n){e[i]=t.validator.normalizeRule(n)}),t(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",n).on("click.validate","select, option, [type='radio'], [type='checkbox']",n),this.settings.invalidHandler&&t(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var i,n,r=this.clean(e),o=this.validationTargetFor(r),s=this,a=!0;return void 0===o?delete this.invalid[r.name]:(this.prepareElement(o),this.currentElements=t(o),(n=this.groups[o.name])&&t.each(this.groups,function(t,e){e===n&&t!==o.name&&(r=s.validationTargetFor(s.clean(s.findByName(t))))&&r.name in s.invalid&&(s.currentElements.push(r),a=s.check(r)&&a)}),i=!1!==this.check(o),a=a&&i,this.invalid[o.name]=!i,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),t(e).attr("aria-invalid",!i)),a},showErrors:function(e){if(e){var i=this;t.extend(this.errorMap,e),this.errorList=t.map(this.errorMap,function(t,e){return{message:t,element:i.findByName(e)[0]}}),this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var e=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(e)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.validClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,i=0;for(e in t)void 0!==t[e]&&null!==t[e]&&!1!==t[e]&&i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var n=this.name||t(this).attr("name");return!n&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=t(this).closest("form")[0],this.name=n),!(n in i||!e.objectLength(t(this).rules()))&&(i[n]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([])},reset:function(){this.resetInternals(),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i,n,r=t(e),o=e.type;return"radio"===o||"checkbox"===o?this.findByName(e.name).filter(":checked").val():"number"===o&&void 0!==e.validity?e.validity.badInput?"NaN":r.val():(i=e.hasAttribute("contenteditable")?r.text():r.val(),"file"===o?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(n=i.lastIndexOf("/"))>=0?i.substr(n+1):(n=i.lastIndexOf("\\"))>=0?i.substr(n+1):i:"string"==typeof i?i.replace(/\r/g,""):i)},check:function(e){e=this.validationTargetFor(this.clean(e));var i,n,r,o,s=t(e).rules(),a=t.map(s,function(t,e){return e}).length,l=!1,c=this.elementValue(e);if("function"==typeof s.normalizer?o=s.normalizer:"function"==typeof this.settings.normalizer&&(o=this.settings.normalizer),o){if("string"!=typeof(c=o.call(e,c)))throw new TypeError("The normalizer should return a string value.");delete s.normalizer}for(n in s){r={method:n,parameters:s[n]};try{if("dependency-mismatch"===(i=t.validator.methods[n].call(this,c,e,r.parameters))&&1===a){l=!0;continue}if(l=!1,"pending"===i)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!i)return this.formatAndAdd(e,r),!1}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+r.method+"' method.",t),t instanceof TypeError&&(t.message+=". Exception occurred when checking element "+e.id+", check the '"+r.method+"' method."),t}}if(!l)return this.objectLength(s)&&this.successList.push(e),!0},customDataMessage:function(e,i){return t(e).data("msg"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(e,i){"string"==typeof i&&(i={method:i});var n=this.findDefined(this.customMessage(e.name,i.method),this.customDataMessage(e,i.method),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i.method],"<strong>Warning: No message defined for "+e.name+"</strong>"),r=/\$?\{(\d+)\}/g;return"function"==typeof n?n=n.call(this,i.parameters,e):r.test(n)&&(n=t.validator.format(n.replace(r,"{$1}"),i.parameters)),n},formatAndAdd:function(t,e){var i=this.defaultMessage(t,e);this.errorList.push({message:i,element:t,method:e.method}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,i;for(t=0;this.errorList[t];t++)i=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var n,r,o,s,a=this.errorsFor(e),l=this.idOrName(e),c=t(e).attr("aria-describedby");a.length?(a.removeClass(this.settings.validClass).addClass(this.settings.errorClass),a.html(i)):(n=a=t("<"+this.settings.errorElement+">").attr("id",l+"-error").addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(n=a.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(n):this.settings.errorPlacement?this.settings.errorPlacement.call(this,n,t(e)):n.insertAfter(e),a.is("label")?a.attr("for",l):0===a.parents("label[for='"+this.escapeCssMeta(l)+"']").length&&(o=a.attr("id"),c?c.match(new RegExp("\\b"+this.escapeCssMeta(o)+"\\b"))||(c+=" "+o):c=o,t(e).attr("aria-describedby",c),(r=this.groups[e.name])&&(s=this,t.each(s.groups,function(e,i){i===r&&t("[name='"+s.escapeCssMeta(e)+"']",s.currentForm).attr("aria-describedby",a.attr("id"))})))),!i&&this.settings.success&&(a.text(""),"string"==typeof this.settings.success?a.addClass(this.settings.success):this.settings.success(a,e)),this.toShow=this.toShow.add(a)},errorsFor:function(e){var i=this.escapeCssMeta(this.idOrName(e)),n=t(e).attr("aria-describedby"),r="label[for='"+i+"'], label[for='"+i+"'] *";return n&&(r=r+", #"+this.escapeCssMeta(n).replace(/\s+/g,", #")),this.errors().filter(r)},escapeCssMeta:function(t){return t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+this.escapeCssMeta(e)+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(e,i){return!!t(e,i.form).length},function:function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,t(e).addClass(this.settings.pendingClass),this.pending[e.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],t(e).removeClass(this.settings.pendingClass),i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.submitButton&&t("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e,i){return i="string"==typeof i&&i||"remote",t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,{method:i})})},destroy:function(){this.resetForm(),t(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},n=t(e).attr("class");return n&&t.each(n.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},normalizeAttributeRule:function(t,e,i,n){/min|max|step/.test(i)&&(null===e||/number|range|text/.test(e))&&(n=Number(n),isNaN(n)&&(n=void 0)),n||0===n?t[i]=n:e===i&&"range"!==e&&(t[i]=!0)},attributeRules:function(e){var i,n,r={},o=t(e),s=e.getAttribute("type");for(i in t.validator.methods)"required"===i?(""===(n=e.getAttribute(i))&&(n=!0),n=!!n):n=o.attr(i),this.normalizeAttributeRule(r,s,i,n);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},dataRules:function(e){var i,n,r={},o=t(e),s=e.getAttribute("type");for(i in t.validator.methods)n=o.data("rule"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()),this.normalizeAttributeRule(r,s,i,n);return r},staticRules:function(e){var i={},n=t.data(e.form,"validator");return n.settings.rules&&(i=t.validator.normalizeRule(n.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(n,r){if(!1!==r){if(r.param||r.depends){var o=!0;switch(typeof r.depends){case"string":o=!!t(r.depends,i.form).length;break;case"function":o=r.depends.call(i,i)}o?e[n]=void 0===r.param||r.param:(t.data(i.form,"validator").resetElements(t(i)),delete e[n])}}else delete e[n]}),t.each(e,function(n,r){e[n]=t.isFunction(r)&&"normalizer"!==n?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,n){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==n?n:t.validator.messages[e],i.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,n){if(!this.depend(n,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:e.length>0},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=n},maxlength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r<=n},rangelength:function(e,i,n){var r=t.isArray(e)?e.length:this.getLength(e,i);return this.optional(i)||r>=n[0]&&r<=n[1]},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||t<=i},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},step:function(e,i,n){var r,o=t(i).attr("type"),s="Step attribute on input type "+o+" is not supported.",a=new RegExp("\\b"+o+"\\b"),l=function(t){var e=(""+t).match(/(?:\.(\d+))?$/);return e&&e[1]?e[1].length:0},c=function(t){return Math.round(t*Math.pow(10,r))},h=!0;if(o&&!a.test(["text","number","range"].join()))throw new Error(s);return r=l(n),(l(e)>r||c(e)%c(n)!=0)&&(h=!1),this.optional(i)||h},equalTo:function(e,i,n){var r=t(n);return this.settings.onfocusout&&r.not(".validate-equalTo-blur").length&&r.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,n,r){if(this.optional(i))return"dependency-mismatch";r="string"==typeof r&&r||"remote";var o,s,a,l=this.previousValue(i,r);return this.settings.messages[i.name]||(this.settings.messages[i.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[i.name][r],this.settings.messages[i.name][r]=l.message,n="string"==typeof n&&{url:n}||n,a=t.param(t.extend({data:e},n.data)),l.old===a?l.valid:(l.old=a,o=this,this.startRequest(i),(s={})[i.name]=e,t.ajax(t.extend(!0,{mode:"abort",port:"validate"+i.name,dataType:"json",data:s,context:o.currentForm,success:function(t){var n,s,a,c=!0===t||"true"===t;o.settings.messages[i.name][r]=l.originalMessage,c?(a=o.formSubmitted,o.resetInternals(),o.toHide=o.errorsFor(i),o.formSubmitted=a,o.successList.push(i),o.invalid[i.name]=!1,o.showErrors()):(n={},s=t||o.defaultMessage(i,{method:r,parameters:e}),n[i.name]=l.message=s,o.invalid[i.name]=!0,o.showErrors(n)),l.valid=c,o.stopRequest(i,c)}},n)),"pending")}}});var e,i={};return t.ajaxPrefilter?t.ajaxPrefilter(function(t,e,n){var r=t.port;"abort"===t.mode&&(i[r]&&i[r].abort(),i[r]=n)}):(e=t.ajax,t.ajax=function(n){var r=("mode"in n?n:t.ajaxSettings).mode,o=("port"in n?n:t.ajaxSettings).port;return"abort"===r?(i[o]&&i[o].abort(),i[o]=e.apply(this,arguments),i[o]):e.apply(this,arguments)}),t}),function(t){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){return function(){function e(t){return t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-“”’]*/g,"")}t.validator.addMethod("maxWords",function(t,i,n){return this.optional(i)||e(t).match(/\b\w+\b/g).length<=n},t.validator.format("Please enter {0} words or less.")),t.validator.addMethod("minWords",function(t,i,n){return this.optional(i)||e(t).match(/\b\w+\b/g).length>=n},t.validator.format("Please enter at least {0} words.")),t.validator.addMethod("rangeWords",function(t,i,n){var r=e(t),o=/\b\w+\b/g;return this.optional(i)||r.match(o).length>=n[0]&&r.match(o).length<=n[1]},t.validator.format("Please enter between {0} and {1} words."))}(),t.validator.addMethod("accept",function(e,i,n){var r,o,s="string"==typeof n?n.replace(/\s/g,""):"image/*",a=this.optional(i);if(a)return a;if("file"===t(i).attr("type")&&(s=s.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g,"\\$&").replace(/,/g,"|").replace(/\/\*/g,"/.*"),i.files&&i.files.length))for(o=new RegExp(".?("+s+")$","i"),r=0;r<i.files.length;r++)if(!i.files[r].type.match(o))return!1;return!0},t.validator.format("Please enter a value with a valid mimetype.")),t.validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^\w+$/i.test(t)},"Letters, numbers, and underscores only please"),t.validator.addMethod("bankaccountNL",function(t,e){if(this.optional(e))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(t))return!1;var i,n=t.replace(/ /g,""),r=0,o=n.length;for(i=0;i<o;i++)r+=(o-i)*n.substring(i,i+1);return r%11==0},"Please specify a valid bank account number"),t.validator.addMethod("bankorgiroaccountNL",function(e,i){return this.optional(i)||t.validator.methods.bankaccountNL.call(this,e,i)||t.validator.methods.giroaccountNL.call(this,e,i)},"Please specify a valid bank or giro account number"),t.validator.addMethod("bic",function(t,e){return this.optional(e)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-9])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(t.toUpperCase())},"Please specify a valid BIC code"),t.validator.addMethod("cifES",function(t,e){"use strict";if(this.optional(e))return!0;var i,n,r,o,s=new RegExp(/^([ABCDEFGHJKLMNPQRSUVW])(\d{7})([0-9A-J])$/gi),a=t.substring(0,1),l=t.substring(1,8),c=t.substring(8,9),h=0,d=0;function u(t){return t%2==0}if(9!==t.length||!s.test(t))return!1;for(i=0;i<l.length;i++)n=parseInt(l[i],10),u(i)?d+=(n*=2)<10?n:n-9:h+=n;return r=(10-(h+d).toString().substr(-1)).toString(),r=parseInt(r,10)>9?"0":r,o="JABCDEFGHI".substr(r,1).toString(),a.match(/[ABEH]/)?c===r:a.match(/[KPQS]/)?c===o:c===r||c===o},"Please specify a valid CIF number."),t.validator.addMethod("cpfBR",function(t){if(11!==(t=t.replace(/([~!@#$%^&*()_+=`{}\[\]\-|\\:;'<>,.\/? ])+/g,"")).length)return!1;var e,i,n,r,o=0;if(e=parseInt(t.substring(9,10),10),i=parseInt(t.substring(10,11),10),n=function(t,e){var i=10*t%11;return 10!==i&&11!==i||(i=0),i===e},""===t||"00000000000"===t||"11111111111"===t||"22222222222"===t||"33333333333"===t||"44444444444"===t||"55555555555"===t||"66666666666"===t||"77777777777"===t||"88888888888"===t||"99999999999"===t)return!1;for(r=1;r<=9;r++)o+=parseInt(t.substring(r-1,r),10)*(11-r);if(n(o,e)){for(o=0,r=1;r<=10;r++)o+=parseInt(t.substring(r-1,r),10)*(12-r);return n(o,i)}return!1},"Please specify a valid CPF number"),t.validator.addMethod("creditcard",function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i,n,r=0,o=0,s=!1;if((t=t.replace(/\D/g,"")).length<13||t.length>19)return!1;for(i=t.length-1;i>=0;i--)n=t.charAt(i),o=parseInt(n,10),s&&(o*=2)>9&&(o-=9),r+=o,s=!s;return r%10==0},"Please enter a valid credit card number."),t.validator.addMethod("creditcardtypes",function(t,e,i){if(/[^0-9\-]+/.test(t))return!1;t=t.replace(/\D/g,"");var n=0;return i.mastercard&&(n|=1),i.visa&&(n|=2),i.amex&&(n|=4),i.dinersclub&&(n|=8),i.enroute&&(n|=16),i.discover&&(n|=32),i.jcb&&(n|=64),i.unknown&&(n|=128),i.all&&(n=255),1&n&&/^(5[12345])/.test(t)?16===t.length:2&n&&/^(4)/.test(t)?16===t.length:4&n&&/^(3[47])/.test(t)?15===t.length:8&n&&/^(3(0[012345]|[68]))/.test(t)?14===t.length:16&n&&/^(2(014|149))/.test(t)?15===t.length:32&n&&/^(6011)/.test(t)?16===t.length:64&n&&/^(3)/.test(t)?16===t.length:64&n&&/^(2131|1800)/.test(t)?15===t.length:!!(128&n)},"Please enter a valid credit card number."),t.validator.addMethod("currency",function(t,e,i){var n,r="string"==typeof i,o=r?i:i[0],s=!!r||i[1];return o=o.replace(/,/g,""),n="^["+(o=s?o+"]":o+"]?")+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",n=new RegExp(n),this.optional(e)||n.test(t)},"Please specify a valid currency"),t.validator.addMethod("dateFA",function(t,e){return this.optional(e)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(t)},t.validator.messages.date),t.validator.addMethod("dateITA",function(t,e){var i,n,r,o,s,a=!1;return/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(t)?(i=t.split("/"),n=parseInt(i[0],10),r=parseInt(i[1],10),o=parseInt(i[2],10),a=(s=new Date(Date.UTC(o,r-1,n,12,0,0,0))).getUTCFullYear()===o&&s.getUTCMonth()===r-1&&s.getUTCDate()===n):a=!1,this.optional(e)||a},t.validator.messages.date),t.validator.addMethod("dateNL",function(t,e){return this.optional(e)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(t)},t.validator.messages.date),t.validator.addMethod("extension",function(t,e,i){return i="string"==typeof i?i.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(e)||t.match(new RegExp("\\.("+i+")$","i"))},t.validator.format("Please enter a value with a valid extension.")),t.validator.addMethod("giroaccountNL",function(t,e){return this.optional(e)||/^[0-9]{1,7}$/.test(t)},"Please specify a valid giro account number"),t.validator.addMethod("iban",function(t,e){if(this.optional(e))return!0;var i,n,r,o,s,a=t.replace(/ /g,"").toUpperCase(),l="",c=!0,h="";if(a.length<5)return!1;if(void 0!==(r={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"}[a.substring(0,2)])&&!new RegExp("^[A-Z]{2}\\d{2}"+r+"$","").test(a))return!1;for(i=a.substring(4,a.length)+a.substring(0,4),o=0;o<i.length;o++)"0"!==(n=i.charAt(o))&&(c=!1),c||(l+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(n));for(s=0;s<l.length;s++)h=(""+h+l.charAt(s))%97;return 1===h},"Please specify a valid IBAN"),t.validator.addMethod("integer",function(t,e){return this.optional(e)||/^-?\d+$/.test(t)},"A positive or negative non-decimal number please"),t.validator.addMethod("ipv4",function(t,e){return this.optional(e)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(t)},"Please enter a valid IP v4 address."),t.validator.addMethod("ipv6",function(t,e){return this.optional(e)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(t)},"Please enter a valid IP v6 address."),t.validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},"Letters only please"),t.validator.addMethod("letterswithbasicpunc",function(t,e){return this.optional(e)||/^[a-z\-.,()'"\s]+$/i.test(t)},"Letters or punctuation only please"),t.validator.addMethod("mobileNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid mobile number"),t.validator.addMethod("mobileUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),t.validator.addMethod("netmask",function(t,e){return this.optional(e)||/^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(254|252|248|240|224|192|128|0)/i.test(t)},"Please enter a valid netmask."),t.validator.addMethod("nieES",function(t,e){"use strict";if(this.optional(e))return!0;var i,n=new RegExp(/^[MXYZ]{1}[0-9]{7,8}[TRWAGMYFPDXBNJZSQVHLCKET]{1}$/gi),r=t.substr(t.length-1).toUpperCase();return!((t=t.toString().toUpperCase()).length>10||t.length<9||!n.test(t))&&(i=9===(t=t.replace(/^[X]/,"0").replace(/^[Y]/,"1").replace(/^[Z]/,"2")).length?t.substr(0,8):t.substr(0,9),"TRWAGMYFPDXBNJZSQVHLCKET".charAt(parseInt(i,10)%23)===r)},"Please specify a valid NIE number."),t.validator.addMethod("nifES",function(t,e){"use strict";return!!this.optional(e)||!!(t=t.toUpperCase()).match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")&&(/^[0-9]{8}[A-Z]{1}$/.test(t)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.substring(8,0)%23)===t.charAt(8):!!/^[KLM]{1}/.test(t)&&t[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.substring(8,1)%23))},"Please specify a valid NIF number."),t.validator.addMethod("nipPL",function(t){"use strict";if(10!==(t=t.replace(/[^0-9]/g,"")).length)return!1;for(var e=[6,5,7,2,3,4,5,6,7],i=0,n=0;n<9;n++)i+=e[n]*t[n];var r=i%11;return(10===r?0:r)===parseInt(t[9],10)},"Please specify a valid NIP number."),t.validator.addMethod("notEqualTo",function(e,i,n){return this.optional(i)||!t.validator.methods.equalTo.call(this,e,i,n)},"Please enter a different value, values must not be the same."),t.validator.addMethod("nowhitespace",function(t,e){return this.optional(e)||/^\S+$/i.test(t)},"No white space please"),t.validator.addMethod("pattern",function(t,e,i){return!!this.optional(e)||("string"==typeof i&&(i=new RegExp("^(?:"+i+")$")),i.test(t))},"Invalid format."),t.validator.addMethod("phoneNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid phone number."),t.validator.addMethod("phonesUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),t.validator.addMethod("phoneUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),t.validator.addMethod("phoneUS",function(t,e){return t=t.replace(/\s+/g,""),this.optional(e)||t.length>9&&t.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),t.validator.addMethod("postalcodeBR",function(t,e){return this.optional(e)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(t)},"Informe um CEP válido."),t.validator.addMethod("postalCodeCA",function(t,e){return this.optional(e)||/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ] *\d[ABCEGHJKLMNPRSTVWXYZ]\d$/i.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postalcodeIT",function(t,e){return this.optional(e)||/^\d{5}$/.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postalcodeNL",function(t,e){return this.optional(e)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postcodeUK",function(t,e){return this.optional(e)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(t)},"Please specify a valid UK postcode"),t.validator.addMethod("require_from_group",function(e,i,n){var r=t(n[1],i.form),o=r.eq(0),s=o.data("valid_req_grp")?o.data("valid_req_grp"):t.extend({},this),a=r.filter(function(){return s.elementValue(this)}).length>=n[0];return o.data("valid_req_grp",s),t(i).data("being_validated")||(r.data("being_validated",!0),r.each(function(){s.element(this)}),r.data("being_validated",!1)),a},t.validator.format("Please fill at least {0} of these fields.")),t.validator.addMethod("skip_or_fill_minimum",function(e,i,n){var r=t(n[1],i.form),o=r.eq(0),s=o.data("valid_skip")?o.data("valid_skip"):t.extend({},this),a=r.filter(function(){return s.elementValue(this)}).length,l=0===a||a>=n[0];return o.data("valid_skip",s),t(i).data("being_validated")||(r.data("being_validated",!0),r.each(function(){s.element(this)}),r.data("being_validated",!1)),l},t.validator.format("Please either skip these fields or fill at least {0} of them.")),t.validator.addMethod("stateUS",function(t,e,i){var n,r=void 0===i,o=!r&&void 0!==i.caseSensitive&&i.caseSensitive,s=!r&&void 0!==i.includeTerritories&&i.includeTerritories,a=!r&&void 0!==i.includeMilitary&&i.includeMilitary;return n=s||a?s&&a?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":s?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",n=o?new RegExp(n):new RegExp(n,"i"),this.optional(e)||n.test(t)},"Please specify a valid state"),t.validator.addMethod("strippedminlength",function(e,i,n){return t(e).text().length>=n},t.validator.format("Please enter at least {0} characters")),t.validator.addMethod("time",function(t,e){return this.optional(e)||/^([01]\d|2[0-3]|[0-9])(:[0-5]\d){1,2}$/.test(t)},"Please enter a valid time, between 00:00 and 23:59"),t.validator.addMethod("time12h",function(t,e){return this.optional(e)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(t)},"Please enter a valid time in 12-hour am/pm format"),t.validator.addMethod("url2",function(t,e){return this.optional(e)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},t.validator.messages.url),t.validator.addMethod("vinUS",function(t){if(17!==t.length)return!1;var e,i,n,r,o,s,a=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],l=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],c=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],h=0;for(e=0;e<17;e++){if(r=c[e],n=t.slice(e,e+1),8===e&&(s=n),isNaN(n)){for(i=0;i<a.length;i++)if(n.toUpperCase()===a[i]){n=l[i],n*=r,isNaN(s)&&8===i&&(s=a[i]);break}}else n*=r;h+=n}return 10===(o=h%11)&&(o="X"),o===s},"The specified vehicle identification number (VIN) is invalid."),t.validator.addMethod("zipcodeUS",function(t,e){return this.optional(e)||/^\d{5}(-\d{4})?$/.test(t)},"The specified US ZIP Code is invalid"),t.validator.addMethod("ziprange",function(t,e){return this.optional(e)||/^90[2-5]\d\{2\}-\d{4}$/.test(t)},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx"),t}),jQuery.validator.setDefaults({errorElement:"div",errorClass:"form-control-feedback",focusInvalid:!1,ignore:"",errorPlacement:function(t,e){var i=$(e).closest(".m-form__group-sub").length>0?$(e).closest(".m-form__group-sub"):$(e).closest(".m-form__group"),n=i.find(".m-form__help");0===i.find(".form-control-feedback").length&&(n.length>0?n.before(t):$(e).closest(".input-group").length>0?$(e).closest(".input-group").after(t):$(e).is(":checkbox")?$(e).closest(".m-checkbox").find(">span").after(t):$(e).after(t))},highlight:function(t){($(t).closest(".m-form__group-sub").length>0?$(t).closest(".m-form__group-sub"):$(t).closest(".m-form__group")).addClass("has-danger")},unhighlight:function(t){($(t).closest(".m-form__group-sub").length>0?$(t).closest(".m-form__group-sub"):$(t).closest(".m-form__group")).removeClass("has-danger")},success:function(t,e){var i=$(t).closest(".m-form__group-sub").length>0?$(t).closest(".m-form__group-sub"):$(t).closest(".m-form__group");i.removeClass("has-danger"),i.find(".form-control-feedback").remove()}}),jQuery.validator.addMethod("email",function(t,e){return!!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(t)},"Please enter a valid Email."),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(e,n,r){n={content:{message:"object"==typeof n?n.message:n,title:n.title?n.title:"",icon:n.icon?n.icon:"",url:n.url?n.url:"#",target:n.target?n.target:"-"}};r=t.extend(!0,{},n,r),this.settings=t.extend(!0,{},i,r),this._defaults=i,"-"==this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),this.init()}var i={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'};String.format=function(){for(var t=arguments[0],e=1;e<arguments.length;e++)t=t.replace(RegExp("\\{"+(e-1)+"\\}","gm"),arguments[e]);return t},t.extend(e.prototype,{init:function(){var t=this;this.buildNotify(),this.settings.content.icon&&this.setIcon(),"#"!=this.settings.content.url&&this.styleURL(),this.styleDismiss(),this.placement(),this.bind(),this.notify={$ele:this.$ele,update:function(e,i){var n={};for(var e in"string"==typeof e?n[e]=i:n=e,n)switch(e){case"type":this.$ele.removeClass("alert-"+t.settings.type),this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+t.settings.type),t.settings.type=n[e],this.$ele.addClass("alert-"+n[e]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+n[e]);break;case"icon":var r=this.$ele.find('[data-notify="icon"]');"class"==t.settings.icon_type.toLowerCase()?r.removeClass(t.settings.content.icon).addClass(n[e]):(r.is("img")||r.find("img"),r.attr("src",n[e]));break;case"progress":var o=t.settings.delay-t.settings.delay*(n[e]/100);this.$ele.data("notify-delay",o),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",n[e]).css("width",n[e]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",n[e]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",n[e]);break;default:this.$ele.find('[data-notify="'+e+'"]').html(n[e])}var s=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(s)},close:function(){t.close()}}},buildNotify:function(){var e=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,e.title,e.message,e.url,e.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"==this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleDismiss:function(){this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1})},placement:function(){var e=this,i=this.settings.offset.y,n={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},r=!1,o=this.settings;switch(t('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return i=Math.max(i,parseInt(t(this).css(o.placement.from))+parseInt(t(this).outerHeight())+parseInt(o.spacing))}),1==this.settings.newest_on_top&&(i=this.settings.offset.y),n[this.settings.placement.from]=i+"px",this.settings.placement.align){case"left":case"right":n[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":n.left=0,n.right=0}this.$ele.css(n).addClass(this.settings.animate.enter),t.each(Array("webkit","moz","o","ms",""),function(t,i){e.$ele[0].style[i+"AnimationIterationCount"]=1}),t(this.settings.element).append(this.$ele),1==this.settings.newest_on_top&&(i=parseInt(i)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(i)),t.isFunction(e.settings.onShow)&&e.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(t){r=!0}).one(this.animations.end,function(i){t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)}),setTimeout(function(){r||t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)},600)},bind:function(){var e=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){e.close()}),this.$ele.mouseover(function(e){t(this).data("data-hover","true")}).mouseout(function(e){t(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){e.$ele.data("notify-delay",e.settings.delay);var i=setInterval(function(){var t=parseInt(e.$ele.data("notify-delay"))-e.settings.timer;if("false"===e.$ele.data("data-hover")&&"pause"==e.settings.mouse_over||"pause"!=e.settings.mouse_over){var n=(e.settings.delay-t)/e.settings.delay*100;e.$ele.data("notify-delay",t),e.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",n).css("width",n+"%")}t<=-e.settings.timer&&(clearInterval(i),e.close())},e.settings.timer)}},close:function(){var e=this,i=parseInt(this.$ele.css(this.settings.placement.from)),n=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit),e.reposition(i),t.isFunction(e.settings.onClose)&&e.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(t){n=!0}).one(this.animations.end,function(i){t(this).remove(),t.isFunction(e.settings.onClosed)&&e.settings.onClosed.call(this)}),setTimeout(function(){n||(e.$ele.remove(),e.settings.onClosed&&e.settings.onClosed(e.$ele))},600)},reposition:function(e){var i=this,n='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',r=this.$ele.nextAll(n);1==this.settings.newest_on_top&&(r=this.$ele.prevAll(n)),r.each(function(){t(this).css(i.settings.placement.from,e),e=parseInt(e)+parseInt(i.settings.spacing)+t(this).outerHeight()})}}),t.notify=function(t,i){return new e(this,t,i).notify},t.notifyDefaults=function(e){return i=t.extend(!0,{},i,e)},t.notifyClose=function(e){void 0===e||"all"==e?t("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t('[data-notify-position="'+e+'"]').find('[data-notify="dismiss"]').trigger("click")}}),$.notifyDefaults({template:'<div data-notify="container" class="alert alert-{0} m-alert" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss"></button><span data-notify="icon"></span><span data-notify="title">{1}</span><span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-animated bg-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>'}),("function"==typeof define&&define.amd?define:function(t,e){"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):window.toastr=e(window.jQuery)})(["jquery"],function(t){return function(){function e(e,i){return e||(e=s()),(l=t("#"+e.containerId)).length?l:(i&&(l=function(e){return(l=t("<div/>").attr("id",e.containerId).addClass(e.positionClass)).appendTo(t(e.target)),l}(e)),l)}function i(e){for(var i=l.children(),r=i.length-1;r>=0;r--)n(t(i[r]),e)}function n(e,i,n){var r=!(!n||!n.force)&&n.force;return!(!e||!r&&0!==t(":focus",e).length||(e[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){a(e)}}),0))}function r(t){c&&c(t)}function o(i){function n(t){return null==t&&(t=""),t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function o(e){var i=e&&!1!==f.closeMethod?f.closeMethod:f.hideMethod,n=e&&!1!==f.closeDuration?f.closeDuration:f.hideDuration,o=e&&!1!==f.closeEasing?f.closeEasing:f.hideEasing;if(!t(":focus",v).length||e)return clearTimeout(w.intervalId),v[i]({duration:n,easing:o,complete:function(){a(v),clearTimeout(g),f.onHidden&&"hidden"!==k.state&&f.onHidden(),k.state="hidden",k.endTime=new Date,r(k)}})}function c(){(f.timeOut>0||f.extendedTimeOut>0)&&(g=setTimeout(o,f.extendedTimeOut),w.maxHideTime=parseFloat(f.extendedTimeOut),w.hideEta=(new Date).getTime()+w.maxHideTime)}function u(){clearTimeout(g),w.hideEta=0,v.stop(!0,!0)[f.showMethod]({duration:f.showDuration,easing:f.showEasing})}function p(){var t=(w.hideEta-(new Date).getTime())/w.maxHideTime*100;_.width(t+"%")}var f=s(),m=i.iconClass||f.iconClass;if(void 0!==i.optionsOverride&&(f=t.extend(f,i.optionsOverride),m=i.optionsOverride.iconClass||m),!function(t,e){if(t.preventDuplicates){if(e.message===h)return!0;h=e.message}return!1}(f,i)){d++,l=e(f,!0);var g=null,v=t("<div/>"),y=t("<div/>"),b=t("<div/>"),_=t("<div/>"),x=t(f.closeHtml),w={intervalId:null,hideEta:null,maxHideTime:null},k={toastId:d,state:"visible",startTime:new Date,options:f,map:i};return i.iconClass&&v.addClass(f.toastClass).addClass(m),function(){if(i.title){var t=i.title;f.escapeHtml&&(t=n(i.title)),y.append(t).addClass(f.titleClass),v.append(y)}}(),function(){if(i.message){var t=i.message;f.escapeHtml&&(t=n(i.message)),b.append(t).addClass(f.messageClass),v.append(b)}}(),f.closeButton&&(x.addClass(f.closeClass).attr("role","button"),v.prepend(x)),f.progressBar&&(_.addClass(f.progressClass),v.prepend(_)),f.rtl&&v.addClass("rtl"),f.newestOnTop?l.prepend(v):l.append(v),function(){var t="";switch(i.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}v.attr("aria-live",t)}(),v.hide(),v[f.showMethod]({duration:f.showDuration,easing:f.showEasing,complete:f.onShown}),f.timeOut>0&&(g=setTimeout(o,f.timeOut),w.maxHideTime=parseFloat(f.timeOut),w.hideEta=(new Date).getTime()+w.maxHideTime,f.progressBar&&(w.intervalId=setInterval(p,10))),f.closeOnHover&&v.hover(u,c),!f.onclick&&f.tapToDismiss&&v.click(o),f.closeButton&&x&&x.click(function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),f.onCloseClick&&f.onCloseClick(t),o(!0)}),f.onclick&&v.click(function(t){f.onclick(t),o()}),r(k),f.debug&&console&&console.log(k),v}}function s(){return t.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">×</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},p.options)}function a(t){l||(l=e()),t.is(":visible")||(t.remove(),t=null,0===l.children().length&&(l.remove(),h=void 0))}var l,c,h,d=0,u={error:"error",info:"info",success:"success",warning:"warning"},p={clear:function(t,r){var o=s();l||e(o),n(t,o,r)||i(o)},remove:function(i){var n=s();return l||e(n),i&&0===t(":focus",i).length?void a(i):void(l.children().length&&l.remove())},error:function(t,e,i){return o({type:u.error,iconClass:s().iconClasses.error,message:t,optionsOverride:i,title:e})},getContainer:e,info:function(t,e,i){return o({type:u.info,iconClass:s().iconClasses.info,message:t,optionsOverride:i,title:e})},options:{},subscribe:function(t){c=t},success:function(t,e,i){return o({type:u.success,iconClass:s().iconClasses.success,message:t,optionsOverride:i,title:e})},version:"2.1.4",warning:function(t,e,i){return o({type:u.warning,iconClass:s().iconClasses.warning,message:t,optionsOverride:i,title:e})}};return p}()}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t,e){"use strict";if(!t.jstree){var i=0,n=!1,r=!1,o=!1,s=[],a=t("script:last").attr("src"),l=window.document;t.jstree={version:"3.3.5",defaults:{plugins:[]},plugins:{},path:a&&-1!==a.indexOf("/")?a.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},t.jstree.create=function(e,n){var r=new t.jstree.core(++i),o=n;return n=t.extend(!0,{},t.jstree.defaults,n),o&&o.plugins&&(n.plugins=o.plugins),t.each(n.plugins,function(t,e){"core"!==t&&(r=r.plugin(e,n[e]))}),t(e).data("jstree",r),r.init(e,n),r},t.jstree.destroy=function(){t(".jstree:jstree").jstree("destroy"),t(l).off(".jstree")},t.jstree.core=function(t){this._id=t,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},t.jstree.reference=function(e){var i=null,n=null;if(!e||!e.id||e.tagName&&e.nodeType||(e=e.id),!n||!n.length)try{n=t(e)}catch(t){}if(!n||!n.length)try{n=t("#"+e.replace(t.jstree.idregex,"\\$&"))}catch(t){}return n&&n.length&&(n=n.closest(".jstree")).length&&(n=n.data("jstree"))?i=n:t(".jstree").each(function(){var n=t(this).data("jstree");if(n&&n._model.data[e])return i=n,!1}),i},t.fn.jstree=function(i){var n="string"==typeof i,r=Array.prototype.slice.call(arguments,1),o=null;return!(!0===i&&!this.length)&&(this.each(function(){var s=t.jstree.reference(this),a=n&&s?s[i]:null;if(o=n&&a?a.apply(s,r):null,s||n||i!==e&&!t.isPlainObject(i)||t.jstree.create(this,i),(s&&!n||!0===i)&&(o=s||!1),null!==o&&o!==e)return!1}),null!==o&&o!==e?o:this)},t.expr.pseudos.jstree=t.expr.createPseudo(function(i){return function(i){return t(i).hasClass("jstree")&&t(i).data("jstree")!==e}}),t.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:t.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,keyboard:{"ctrl-space":function(e){e.type="click",t(e.currentTarget).trigger(e)},enter:function(e){e.type="click",t(e.currentTarget).trigger(e)},left:function(e){if(e.preventDefault(),this.is_open(e.currentTarget))this.close_node(e.currentTarget);else{var i=this.get_parent(e.currentTarget);i&&i.id!==t.jstree.root&&this.get_node(i,!0).children(".jstree-anchor").focus()}},up:function(t){t.preventDefault();var e=this.get_prev_dom(t.currentTarget);e&&e.length&&e.children(".jstree-anchor").focus()},right:function(e){if(e.preventDefault(),this.is_closed(e.currentTarget))this.open_node(e.currentTarget,function(t){this.get_node(t,!0).children(".jstree-anchor").focus()});else if(this.is_open(e.currentTarget)){var i=this.get_node(e.currentTarget,!0).children(".jstree-children")[0];i&&t(this._firstChild(i)).children(".jstree-anchor").focus()}},down:function(t){t.preventDefault();var e=this.get_next_dom(t.currentTarget);e&&e.length&&e.children(".jstree-anchor").focus()},"*":function(t){this.open_all()},home:function(e){e.preventDefault();var i=this._firstChild(this.get_container_ul()[0]);i&&t(i).children(".jstree-anchor").filter(":visible").focus()},end:function(t){t.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(t){t.preventDefault(),this.edit(t.currentTarget)}}},t.jstree.core.prototype={plugin:function(e,i){var n=t.jstree.plugins[e];return n?(this._data[e]={},n.prototype=this,new n(i,this)):this},init:function(e,i){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=t(e).addClass("jstree jstree-"+this._id),this.settings=i,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='tree-item'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(t.jstree.root)},destroy:function(t){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(t){}t||this.element.empty(),this.teardown()},_create_prototype_node:function(){var t,e,i=l.createElement("LI");return i.setAttribute("role","treeitem"),(t=l.createElement("I")).className="jstree-icon jstree-ocl",t.setAttribute("role","presentation"),i.appendChild(t),(t=l.createElement("A")).className="jstree-anchor",t.setAttribute("href","#"),t.setAttribute("tabindex","-1"),(e=l.createElement("I")).className="jstree-icon jstree-themeicon",e.setAttribute("role","presentation"),t.appendChild(e),i.appendChild(t),t=e=null,i},_kbevent_to_func:function(t){var e=[];t.ctrlKey&&e.push("ctrl"),t.altKey&&e.push("alt"),t.shiftKey&&e.push("shift"),e.push({8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"}[t.which]||t.which),e=e.sort().join("-").toLowerCase();var i,n,r=this.settings.core.keyboard;for(i in r)if(r.hasOwnProperty(i)&&("-"!==(n=i)&&"+"!==n&&(n=(n=n.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),n===e))return r[i];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var e="",i=null,n=0;this.element.on("dblclick.jstree",function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;if(l.selection&&l.selection.empty)l.selection.empty();else if(window.getSelection){var e=window.getSelection();try{e.removeAllRanges(),e.collapse()}catch(t){}}}).on("mousedown.jstree",t.proxy(function(t){t.target===this.element[0]&&(t.preventDefault(),n=+new Date)},this)).on("mousedown.jstree",".jstree-ocl",function(t){t.preventDefault()}).on("click.jstree",".jstree-ocl",t.proxy(function(t){this.toggle_node(t.target)},this)).on("dblclick.jstree",".jstree-anchor",t.proxy(function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(t.target)},this)).on("click.jstree",".jstree-anchor",t.proxy(function(e){e.preventDefault(),e.currentTarget!==l.activeElement&&t(e.currentTarget).focus(),this.activate_node(e.currentTarget,e)},this)).on("keydown.jstree",".jstree-anchor",t.proxy(function(t){if(t.target.tagName&&"input"===t.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===t.which?t.which=39:39===t.which&&(t.which=37));var e=this._kbevent_to_func(t);if(e){var i=e.call(this,t);if(!1===i||!0===i)return i}},this)).on("load_node.jstree",t.proxy(function(e,i){i.status&&(i.node.id!==t.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(t.proxy(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var e,i,n=[];for(e=0,i=this._data.core.selected.length;e<i;e++)n=n.concat(this._model.data[this._data.core.selected[e]].parents);for(e=0,i=(n=t.vakata.array_unique(n)).length;e<i;e++)this.open_node(n[e],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}},this),0))},this)).on("keypress.jstree",t.proxy(function(n){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!0;i&&clearTimeout(i),i=setTimeout(function(){e=""},500);var r=String.fromCharCode(n.which).toLowerCase(),o=this.element.find(".jstree-anchor").filter(":visible"),s=o.index(l.activeElement)||0,a=!1;if((e+=r).length>1){if(o.slice(s).each(t.proxy(function(i,n){if(0===t(n).text().toLowerCase().indexOf(e))return t(n).focus(),a=!0,!1},this)),a)return;if(o.slice(0,s).each(t.proxy(function(i,n){if(0===t(n).text().toLowerCase().indexOf(e))return t(n).focus(),a=!0,!1},this)),a)return}if(new RegExp("^"+r.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(e)){if(o.slice(s+1).each(t.proxy(function(e,i){if(t(i).text().toLowerCase().charAt(0)===r)return t(i).focus(),a=!0,!1},this)),a)return;if(o.slice(0,s+1).each(t.proxy(function(e,i){if(t(i).text().toLowerCase().charAt(0)===r)return t(i).focus(),a=!0,!1},this)),a)return}},this)).on("init.jstree",t.proxy(function(){var t=this.settings.core.themes;this._data.core.themes.dots=t.dots,this._data.core.themes.stripes=t.stripes,this._data.core.themes.icons=t.icons,this._data.core.themes.ellipsis=t.ellipsis,this.set_theme(t.name||"default",t.url),this.set_theme_variant(t.variant)},this)).on("loading.jstree",t.proxy(function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()},this)).on("blur.jstree",".jstree-anchor",t.proxy(function(e){this._data.core.focused=null,t(e.currentTarget).filter(".jstree-hovered").mouseleave(),this.element.attr("tabindex","0")},this)).on("focus.jstree",".jstree-anchor",t.proxy(function(e){var i=this.get_node(e.currentTarget);i&&i.id&&(this._data.core.focused=i.id),this.element.find(".jstree-hovered").not(e.currentTarget).mouseleave(),t(e.currentTarget).mouseenter(),this.element.attr("tabindex","-1")},this)).on("focus.jstree",t.proxy(function(){if(+new Date-n>500&&!this._data.core.focused&&this.settings.core.restore_focus){n=0;var t=this.get_node(this.element.attr("aria-activedescendant"),!0);t&&t.find("> .jstree-anchor").focus()}},this)).on("mouseenter.jstree",".jstree-anchor",t.proxy(function(t){this.hover_node(t.currentTarget)},this)).on("mouseleave.jstree",".jstree-anchor",t.proxy(function(t){this.dehover_node(t.currentTarget)},this))},unbind:function(){this.element.off(".jstree"),t(l).off(".jstree-"+this._id)},trigger:function(t,e){e||(e={}),e.instance=this,this.element.triggerHandler(t.replace(".jstree","")+".jstree",e)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var i=this.settings.core.strings;return t.isFunction(i)?i.call(this,e):i&&i[e]?i[e]:e},_firstChild:function(t){for(t=t?t.firstChild:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_nextSibling:function(t){for(t=t?t.nextSibling:null;null!==t&&1!==t.nodeType;)t=t.nextSibling;return t},_previousSibling:function(t){for(t=t?t.previousSibling:null;null!==t&&1!==t.nodeType;)t=t.previousSibling;return t},get_node:function(e,i){var n;e&&e.id&&(e=e.id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(n=t("#"+e.replace(t.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else if((n=t(e,this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else{if(!(n=t(e,this.element)).length||!n.hasClass("jstree"))return!1;e=this._model.data[t.jstree.root]}return i&&(e=e.id===t.jstree.root?this.element:t("#"+e.id.replace(t.jstree.idregex,"\\$&"),this.element)),e}catch(t){return!1}},get_path:function(e,i,n){if(!(e=e.parents?e:this.get_node(e))||e.id===t.jstree.root||!e.parents)return!1;var r,o,s=[];for(s.push(n?e.id:e.text),r=0,o=e.parents.length;r<o;r++)s.push(n?e.parents[r]:this.get_text(e.parents[r]));return s=s.reverse().slice(1),i?s.join(i):s},get_next_dom:function(e,i){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this._firstChild(this.get_container_ul()[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);return!!n&&t(n)}if(!e||!e.length)return!1;if(i){n=e[0];do{n=this._nextSibling(n)}while(n&&0===n.offsetHeight);return!!n&&t(n)}if(e.hasClass("jstree-open")){for(n=this._firstChild(e.children(".jstree-children")[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);if(null!==n)return t(n)}n=e[0];do{n=this._nextSibling(n)}while(n&&0===n.offsetHeight);return null!==n?t(n):e.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(e,i){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this.get_container_ul()[0].lastChild;n&&0===n.offsetHeight;)n=this._previousSibling(n);return!!n&&t(n)}if(!e||!e.length)return!1;if(i){n=e[0];do{n=this._previousSibling(n)}while(n&&0===n.offsetHeight);return!!n&&t(n)}n=e[0];do{n=this._previousSibling(n)}while(n&&0===n.offsetHeight);if(null!==n){for(e=t(n);e.hasClass("jstree-open");)e=e.children(".jstree-children").first().children(".jstree-node:visible:last");return e}return!(!(n=e[0].parentNode.parentNode)||!n.className||-1===n.className.indexOf("jstree-node"))&&t(n)},get_parent:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.parent},get_children_dom:function(t){return(t=this.get_node(t,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!t||!t.length)&&t.children(".jstree-children").children(".jstree-node")},is_parent:function(t){return(t=this.get_node(t))&&(!1===t.state.loaded||t.children.length>0)},is_loaded:function(t){return(t=this.get_node(t))&&t.state.loaded},is_loading:function(t){return(t=this.get_node(t))&&t.state&&t.state.loading},is_open:function(t){return(t=this.get_node(t))&&t.state.opened},is_closed:function(t){return(t=this.get_node(t))&&this.is_parent(t)&&!t.state.opened},is_leaf:function(t){return!this.is_parent(t)},load_node:function(e,i){var n,r,o,s,a;if(t.isArray(e))return this._load_nodes(e.slice(),i),!0;if(!(e=this.get_node(e)))return i&&i.call(this,e,!1),!1;if(e.state.loaded){for(e.state.loaded=!1,o=0,s=e.parents.length;o<s;o++)this._model.data[e.parents[o]].children_d=t.vakata.array_filter(this._model.data[e.parents[o]].children_d,function(i){return-1===t.inArray(i,e.children_d)});for(n=0,r=e.children_d.length;n<r;n++)this._model.data[e.children_d[n]].state.selected&&(a=!0),delete this._model.data[e.children_d[n]];a&&(this._data.core.selected=t.vakata.array_filter(this._data.core.selected,function(i){return-1===t.inArray(i,e.children_d)})),e.children=[],e.children_d=[],a&&this.trigger("changed",{action:"load_node",node:e,selected:this._data.core.selected})}return e.state.failed=!1,e.state.loading=!0,this.get_node(e,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(e,t.proxy(function(t){(e=this._model.data[e.id]).state.loading=!1,e.state.loaded=t,e.state.failed=!e.state.loaded;var n,r=this.get_node(e,!0),o=0,s=this._model.data,a=!1;for(o=0,n=e.children.length;o<n;o++)if(s[e.children[o]]&&!s[e.children[o]].state.hidden){a=!0;break}e.state.loaded&&r&&r.length&&(r.removeClass("jstree-closed jstree-open jstree-leaf"),a?"#"!==e.id&&r.addClass(e.state.opened?"jstree-open":"jstree-closed"):r.addClass("jstree-leaf")),r.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:e,status:t}),i&&i.call(this,e,t)},this)),!0},_load_nodes:function(t,e,i,n){var r,o,s=!0,a=function(){this._load_nodes(t,e,!0)},l=this._model.data,c=[];for(r=0,o=t.length;r<o;r++)l[t[r]]&&(!l[t[r]].state.loaded&&!l[t[r]].state.failed||!i&&n)&&(this.is_loading(t[r])||this.load_node(t[r],a),s=!1);if(s){for(r=0,o=t.length;r<o;r++)l[t[r]]&&l[t[r]].state.loaded&&c.push(t[r]);e&&!e.done&&(e.call(this,c),e.done=!0)}},load_all:function(e,i){if(e||(e=t.jstree.root),!(e=this.get_node(e)))return!1;var n,r,o=[],s=this._model.data,a=s[e.id].children_d;for(e.state&&!e.state.loaded&&o.push(e.id),n=0,r=a.length;n<r;n++)s[a[n]]&&s[a[n]].state&&!s[a[n]].state.loaded&&o.push(a[n]);o.length?this._load_nodes(o,function(){this.load_all(e,i)}):(i&&i.call(this,e),this.trigger("load_all",{node:e}))},_load_node:function(e,i){var n,r=this.settings.core.data,o=function(){return 3!==this.nodeType&&8!==this.nodeType};return r?t.isFunction(r)?r.call(this,e,t.proxy(function(n){!1===n?i.call(this,!1):this["string"==typeof n?"_append_html_data":"_append_json_data"](e,"string"==typeof n?t(t.parseHTML(n)).filter(o):n,function(t){i.call(this,t)})},this)):"object"==typeof r?r.url?(r=t.extend(!0,{},r),t.isFunction(r.url)&&(r.url=r.url.call(this,e)),t.isFunction(r.data)&&(r.data=r.data.call(this,e)),t.ajax(r).done(t.proxy(function(n,r,s){var a=s.getResponseHeader("Content-Type");return a&&-1!==a.indexOf("json")||"object"==typeof n?this._append_json_data(e,n,function(t){i.call(this,t)}):a&&-1!==a.indexOf("html")||"string"==typeof n?this._append_html_data(e,t(t.parseHTML(n)).filter(o),function(t){i.call(this,t)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:e.id,xhr:s})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))},this)).fail(t.proxy(function(t){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:e.id,xhr:t})},i.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)},this))):(n=t.isArray(r)?t.extend(!0,[],r):t.isPlainObject(r)?t.extend(!0,{},r):r,e.id===t.jstree.root?this._append_json_data(e,n,function(t){i.call(this,t)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:e.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1))):"string"==typeof r?e.id===t.jstree.root?this._append_html_data(e,t(t.parseHTML(r)).filter(o),function(t){i.call(this,t)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:e.id})},this.settings.core.error.call(this,this._data.core.last_error),i.call(this,!1)):i.call(this,!1):e.id===t.jstree.root?this._append_html_data(e,this._data.core.original_container_html.clone(!0),function(t){i.call(this,t)}):i.call(this,!1)},_node_changed:function(e){(e=this.get_node(e))&&-1===t.inArray(e.id,this._model.changed)&&this._model.changed.push(e.id)},_append_html_data:function(e,i,n){(e=this.get_node(e)).children=[],e.children_d=[];var r,o,s,a=i.is("ul")?i.children():i,l=e.id,c=[],h=[],d=this._model.data,u=d[l],p=this._data.core.selected.length;for(a.each(t.proxy(function(e,i){(r=this._parse_model_from_html(t(i),l,u.parents.concat()))&&(c.push(r),h.push(r),d[r].children_d.length&&(h=h.concat(d[r].children_d)))},this)),u.children=c,u.children_d=h,o=0,s=u.parents.length;o<s;o++)d[u.parents[o]].children_d=d[u.parents[o]].children_d.concat(h);this.trigger("model",{nodes:h,parent:l}),l!==t.jstree.root?(this._node_changed(l),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==p&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)},_append_json_data:function(e,i,n,r){if(null!==this.element){(e=this.get_node(e)).children=[],e.children_d=[],i.d&&"string"==typeof(i=i.d)&&(i=JSON.parse(i)),t.isArray(i)||(i=[i]);var o=null,s={df:this._model.default_state,dat:i,par:e.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},a=function(t,e){t.data&&(t=t.data);var i,n,r,o,s=t.dat,a=t.par,l=[],c=[],h=[],d=t.df,u=t.t_id,p=t.t_cnt,f=t.m,m=f[a],g=t.sel,v=function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l=t.id.toString(),c={id:l,text:t.text||"",icon:t.icon===e||t.icon,parent:i,parents:n,children:t.children||[],children_d:t.children_d||[],data:t.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in d)d.hasOwnProperty(r)&&(c.state[r]=d[r]);if(t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(c.icon=t.data.jstree.icon),c.icon!==e&&null!==c.icon&&""!==c.icon||(c.icon=!0),t&&t.data&&(c.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(c.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(c.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(c.li_attr[r]=t.li_attr[r]);if(c.li_attr.id||(c.li_attr.id=l),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(c.a_attr[r]=t.a_attr[r]);for(t&&t.children&&!0===t.children&&(c.state.loaded=!1,c.children=[],c.children_d=[]),f[c.id]=c,r=0,o=c.children.length;r<o;r++)s=v(f[c.children[r]],c.id,n),a=f[s],c.children_d.push(s),a.children_d.length&&(c.children_d=c.children_d.concat(a.children_d));return delete t.data,delete t.children,f[c.id].original=t,c.state.selected&&h.push(c.id),c.id},y=function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l,c=!1;do{c="j"+u+"_"+ ++p}while(f[c]);for(r in l={id:!1,text:"string"==typeof t?t:"",icon:"object"!=typeof t||t.icon===e||t.icon,parent:i,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},d)d.hasOwnProperty(r)&&(l.state[r]=d[r]);if(t&&t.id&&(l.id=t.id.toString()),t&&t.text&&(l.text=t.text),t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(l.icon=t.data.jstree.icon),l.icon!==e&&null!==l.icon&&""!==l.icon||(l.icon=!0),t&&t.data&&(l.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(l.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(l.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(l.li_attr[r]=t.li_attr[r]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=c),l.li_attr.id||(l.li_attr.id=l.id),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(l.a_attr[r]=t.a_attr[r]);if(t&&t.children&&t.children.length){for(r=0,o=t.children.length;r<o;r++)s=y(t.children[r],l.id,n),a=f[s],l.children.push(s),a.children_d.length&&(l.children_d=l.children_d.concat(a.children_d));l.children_d=l.children_d.concat(l.children)}return t&&t.children&&!0===t.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete t.data,delete t.children,l.original=t,f[l.id]=l,l.state.selected&&h.push(l.id),l.id};if(s.length&&s[0].id!==e&&s[0].parent!==e){for(n=0,r=s.length;n<r;n++)s[n].children||(s[n].children=[]),s[n].state||(s[n].state={}),f[s[n].id.toString()]=s[n];for(n=0,r=s.length;n<r;n++)f[s[n].parent.toString()]?(f[s[n].parent.toString()].children.push(s[n].id.toString()),m.children_d.push(s[n].id.toString())):(this._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:s[n].id.toString(),parent:s[n].parent.toString()})},this.settings.core.error.call(this,this._data.core.last_error));for(n=0,r=m.children.length;n<r;n++)i=v(f[m.children[n]],a,m.parents.concat()),c.push(i),f[i].children_d.length&&(c=c.concat(f[i].children_d));for(n=0,r=m.parents.length;n<r;n++)f[m.parents[n]].children_d=f[m.parents[n]].children_d.concat(c);o={cnt:p,mod:f,sel:g,par:a,dpc:c,add:h}}else{for(n=0,r=s.length;n<r;n++)(i=y(s[n],a,m.parents.concat()))&&(l.push(i),c.push(i),f[i].children_d.length&&(c=c.concat(f[i].children_d)));for(m.children=l,m.children_d=c,n=0,r=m.parents.length;n<r;n++)f[m.parents[n]].children_d=f[m.parents[n]].children_d.concat(c);o={cnt:p,mod:f,sel:g,par:a,dpc:c,add:h}}if("undefined"!=typeof window&&void 0!==window.document)return o;postMessage(o)},l=function(e,i){if(null!==this.element){this._cnt=e.cnt;var r,o=this._model.data;for(r in o)o.hasOwnProperty(r)&&o[r].state&&o[r].state.loading&&e.mod[r]&&(e.mod[r].state.loading=!0);if(this._model.data=e.mod,i){var s,a=e.add,l=e.sel,c=this._data.core.selected.slice();if(o=this._model.data,l.length!==c.length||t.vakata.array_unique(l.concat(c)).length!==l.length){for(r=0,s=l.length;r<s;r++)-1===t.inArray(l[r],a)&&-1===t.inArray(l[r],c)&&(o[l[r]].state.selected=!1);for(r=0,s=c.length;r<s;r++)-1===t.inArray(c[r],l)&&(o[c[r]].state.selected=!0)}}e.add.length&&(this._data.core.selected=this._data.core.selected.concat(e.add)),this.trigger("model",{nodes:e.dpc,parent:e.par}),e.par!==t.jstree.root?(this._node_changed(e.par),this.redraw()):this.redraw(!0),e.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+a.toString()],{type:"text/javascript"}))),!this._data.core.working||r?(this._data.core.working=!0,(o=new window.Worker(this._wrk)).onmessage=t.proxy(function(t){l.call(this,t.data,!0);try{o.terminate(),o=null}catch(t){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1},this),s.par?o.postMessage(s):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([e,i,n,!0])}catch(t){l.call(this,a(s),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else l.call(this,a(s),!1)}},_parse_model_from_html:function(i,n,r){r=r?[].concat(r):[],n&&r.unshift(n);var o,s,a,l,c,h=this._model.data,d={id:!1,text:!1,icon:!0,parent:n,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(a in this._model.default_state)this._model.default_state.hasOwnProperty(a)&&(d.state[a]=this._model.default_state[a]);if(l=t.vakata.attributes(i,!0),t.each(l,function(e,i){if(!(i=t.trim(i)).length)return!0;d.li_attr[e]=i,"id"===e&&(d.id=i.toString())}),(l=i.children("a").first()).length&&(l=t.vakata.attributes(l,!0),t.each(l,function(e,i){(i=t.trim(i)).length&&(d.a_attr[e]=i)})),(l=i.children("a").first().length?i.children("a").first().clone():i.clone()).children("ins, i, ul").remove(),l=l.html(),l=t("<div />").html(l),d.text=this.settings.core.force_text?l.text():l.html(),l=i.data(),d.data=l?t.extend(!0,{},l):null,d.state.opened=i.hasClass("jstree-open"),d.state.selected=i.children("a").hasClass("jstree-clicked"),d.state.disabled=i.children("a").hasClass("jstree-disabled"),d.data&&d.data.jstree)for(a in d.data.jstree)d.data.jstree.hasOwnProperty(a)&&(d.state[a]=d.data.jstree[a]);(l=i.children("a").children(".jstree-themeicon")).length&&(d.icon=!l.hasClass("jstree-themeicon-hidden")&&l.attr("rel")),d.state.icon!==e&&(d.icon=d.state.icon),d.icon!==e&&null!==d.icon&&""!==d.icon||(d.icon=!0),l=i.children("ul").children("li");do{c="j"+this._id+"_"+ ++this._cnt}while(h[c]);return d.id=d.li_attr.id?d.li_attr.id.toString():c,l.length?(l.each(t.proxy(function(e,i){o=this._parse_model_from_html(t(i),d.id,r),s=this._model.data[o],d.children.push(o),s.children_d.length&&(d.children_d=d.children_d.concat(s.children_d))},this)),d.children_d=d.children_d.concat(d.children)):i.hasClass("jstree-closed")&&(d.state.loaded=!1),d.li_attr.class&&(d.li_attr.class=d.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),d.a_attr.class&&(d.a_attr.class=d.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),h[d.id]=d,d.state.selected&&this._data.core.selected.push(d.id),d.id},_parse_model_from_flat_json:function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l=t.id.toString(),c=this._model.data,h=this._model.default_state,d={id:l,text:t.text||"",icon:t.icon===e||t.icon,parent:i,parents:n,children:t.children||[],children_d:t.children_d||[],data:t.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in h)h.hasOwnProperty(r)&&(d.state[r]=h[r]);if(t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(d.icon=t.data.jstree.icon),d.icon!==e&&null!==d.icon&&""!==d.icon||(d.icon=!0),t&&t.data&&(d.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(d.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(d.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(d.li_attr[r]=t.li_attr[r]);if(d.li_attr.id||(d.li_attr.id=l),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(d.a_attr[r]=t.a_attr[r]);for(t&&t.children&&!0===t.children&&(d.state.loaded=!1,d.children=[],d.children_d=[]),c[d.id]=d,r=0,o=d.children.length;r<o;r++)a=c[s=this._parse_model_from_flat_json(c[d.children[r]],d.id,n)],d.children_d.push(s),a.children_d.length&&(d.children_d=d.children_d.concat(a.children_d));return delete t.data,delete t.children,c[d.id].original=t,d.state.selected&&this._data.core.selected.push(d.id),d.id},_parse_model_from_json:function(t,i,n){n=n?n.concat():[],i&&n.unshift(i);var r,o,s,a,l,c=!1,h=this._model.data,d=this._model.default_state;do{c="j"+this._id+"_"+ ++this._cnt}while(h[c]);for(r in l={id:!1,text:"string"==typeof t?t:"",icon:"object"!=typeof t||t.icon===e||t.icon,parent:i,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},d)d.hasOwnProperty(r)&&(l.state[r]=d[r]);if(t&&t.id&&(l.id=t.id.toString()),t&&t.text&&(l.text=t.text),t&&t.data&&t.data.jstree&&t.data.jstree.icon&&(l.icon=t.data.jstree.icon),l.icon!==e&&null!==l.icon&&""!==l.icon||(l.icon=!0),t&&t.data&&(l.data=t.data,t.data.jstree))for(r in t.data.jstree)t.data.jstree.hasOwnProperty(r)&&(l.state[r]=t.data.jstree[r]);if(t&&"object"==typeof t.state)for(r in t.state)t.state.hasOwnProperty(r)&&(l.state[r]=t.state[r]);if(t&&"object"==typeof t.li_attr)for(r in t.li_attr)t.li_attr.hasOwnProperty(r)&&(l.li_attr[r]=t.li_attr[r]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=c),l.li_attr.id||(l.li_attr.id=l.id),t&&"object"==typeof t.a_attr)for(r in t.a_attr)t.a_attr.hasOwnProperty(r)&&(l.a_attr[r]=t.a_attr[r]);if(t&&t.children&&t.children.length){for(r=0,o=t.children.length;r<o;r++)a=h[s=this._parse_model_from_json(t.children[r],l.id,n)],l.children.push(s),a.children_d.length&&(l.children_d=l.children_d.concat(a.children_d));l.children_d=l.children_d.concat(l.children)}return t&&t.children&&!0===t.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete t.data,delete t.children,l.original=t,h[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var e,i,n,r=this._model.force_full_redraw?this._model.data[t.jstree.root].children.concat([]):this._model.changed.concat([]),o=l.createElement("UL"),s=this._data.core.focused;for(i=0,n=r.length;i<n;i++)(e=this.redraw_node(r[i],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&o.appendChild(e);this._model.force_full_redraw&&(o.className=this.get_container_ul()[0].className,o.setAttribute("role","group"),this.element.empty().append(o)),null!==s&&((e=this.get_node(s,!0))&&e.length&&e.children(".jstree-anchor")[0]!==l.activeElement?e.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:r})},redraw:function(t){t&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(e){var i=this.get_node(e),n=!1,r=!1,o=!1,s=l;if(!i)return!1;if(i.id===t.jstree.root)return this.redraw(!0);if(!(e=this.get_node(e,!0))||!e.length)return!1;if(e.children(".jstree-children").remove(),e=e[0],i.children.length&&i.state.loaded){for((o=s.createElement("UL")).setAttribute("role","group"),o.className="jstree-children",n=0,r=i.children.length;n<r;n++)o.appendChild(this.redraw_node(i.children[n],!0,!0));e.appendChild(o)}},redraw_node:function(e,i,n,r){var o=this.get_node(e),s=!1,a=!1,c=!1,h=!1,d=!1,u=!1,p="",f=l,m=this._model.data,g=!1,v=null,y=0,b=0,_=!1,x=!1;if(!o)return!1;if(o.id===t.jstree.root)return this.redraw(!0);if(i=i||0===o.children.length,e=l.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(o.id[0])?"\\3"+o.id[0]+" "+o.id.substr(1).replace(t.jstree.idregex,"\\$&"):o.id.replace(t.jstree.idregex,"\\$&"))):l.getElementById(o.id))e=t(e),n||((s=e.parent().parent()[0])===this.element[0]&&(s=null),a=e.index()),i||!o.children.length||e.children(".jstree-children").length||(i=!0),i||(c=e.children(".jstree-children")[0]),g=e.children(".jstree-anchor")[0]===l.activeElement,e.remove();else if(i=!0,!n){if(!(null===(s=o.parent!==t.jstree.root?t("#"+o.parent.replace(t.jstree.idregex,"\\$&"),this.element)[0]:null)||s&&m[o.parent].state.opened))return!1;a=t.inArray(o.id,null===s?m[t.jstree.root].children:m[o.parent].children)}for(h in e=this._data.core.node.cloneNode(!0),p="jstree-node ",o.li_attr)if(o.li_attr.hasOwnProperty(h)){if("id"===h)continue;"class"!==h?e.setAttribute(h,o.li_attr[h]):p+=o.li_attr[h]}for(o.a_attr.id||(o.a_attr.id=o.id+"_anchor"),e.setAttribute("aria-selected",!!o.state.selected),e.setAttribute("aria-level",o.parents.length),e.setAttribute("aria-labelledby",o.a_attr.id),o.state.disabled&&e.setAttribute("aria-disabled",!0),h=0,d=o.children.length;h<d;h++)if(!m[o.children[h]].state.hidden){_=!0;break}if(null!==o.parent&&m[o.parent]&&!o.state.hidden&&(h=t.inArray(o.id,m[o.parent].children),x=o.id,-1!==h))for(h++,d=m[o.parent].children.length;h<d&&(m[m[o.parent].children[h]].state.hidden||(x=m[o.parent].children[h]),x===o.id);h++);for(d in o.state.hidden&&(p+=" jstree-hidden"),o.state.loading&&(p+=" jstree-loading"),o.state.loaded&&!_?p+=" jstree-leaf":(p+=o.state.opened&&o.state.loaded?" jstree-open":" jstree-closed",e.setAttribute("aria-expanded",o.state.opened&&o.state.loaded)),x===o.id&&(p+=" jstree-last"),e.id=o.id,e.className=p,p=(o.state.selected?" jstree-clicked":"")+(o.state.disabled?" jstree-disabled":""),o.a_attr)if(o.a_attr.hasOwnProperty(d)){if("href"===d&&"#"===o.a_attr[d])continue;"class"!==d?e.childNodes[1].setAttribute(d,o.a_attr[d]):p+=" "+o.a_attr[d]}if(p.length&&(e.childNodes[1].className="jstree-anchor "+p),(o.icon&&!0!==o.icon||!1===o.icon)&&(!1===o.icon?e.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===o.icon.indexOf("/")&&-1===o.icon.indexOf(".")?e.childNodes[1].childNodes[0].className+=" "+o.icon+" jstree-themeicon-custom":(e.childNodes[1].childNodes[0].style.backgroundImage='url("'+o.icon+'")',e.childNodes[1].childNodes[0].style.backgroundPosition="center center",e.childNodes[1].childNodes[0].style.backgroundSize="auto",e.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?e.childNodes[1].appendChild(f.createTextNode(o.text)):e.childNodes[1].innerHTML+=o.text,i&&o.children.length&&(o.state.opened||r)&&o.state.loaded){for((u=f.createElement("UL")).setAttribute("role","group"),u.className="jstree-children",h=0,d=o.children.length;h<d;h++)u.appendChild(this.redraw_node(o.children[h],i,!0));e.appendChild(u)}if(c&&e.appendChild(c),!n){for(s||(s=this.element[0]),h=0,d=s.childNodes.length;h<d;h++)if(s.childNodes[h]&&s.childNodes[h].className&&-1!==s.childNodes[h].className.indexOf("jstree-children")){v=s.childNodes[h];break}v||((v=f.createElement("UL")).setAttribute("role","group"),v.className="jstree-children",s.appendChild(v)),a<(s=v).childNodes.length?s.insertBefore(e,s.childNodes[a]):s.appendChild(e),g&&(y=this.element[0].scrollTop,b=this.element[0].scrollLeft,e.childNodes[1].focus(),this.element[0].scrollTop=y,this.element[0].scrollLeft=b)}return o.state.opened&&!o.state.loaded&&(o.state.opened=!1,setTimeout(t.proxy(function(){this.open_node(o.id,!1,0)},this),0)),e},open_node:function(i,n,r){var o,s,a,l;if(t.isArray(i)){for(o=0,s=(i=i.slice()).length;o<s;o++)this.open_node(i[o],n,r);return!0}return!(!(i=this.get_node(i))||i.id===t.jstree.root)&&(r=r===e?this.settings.core.animation:r,this.is_closed(i)?this.is_loaded(i)?(a=this.get_node(i,!0),l=this,a.length&&(r&&a.children(".jstree-children").length&&a.children(".jstree-children").stop(!0,!0),i.children.length&&!this._firstChild(a.children(".jstree-children")[0])&&this.draw_children(i),r?(this.trigger("before_open",{node:i}),a.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").attr("aria-expanded",!0).children(".jstree-children").stop(!0,!0).slideDown(r,function(){this.style.display="",l.element&&l.trigger("after_open",{node:i})})):(this.trigger("before_open",{node:i}),a[0].className=a[0].className.replace("jstree-closed","jstree-open"),a[0].setAttribute("aria-expanded",!0))),i.state.opened=!0,n&&n.call(this,i,!0),a.length||this.trigger("before_open",{node:i}),this.trigger("open_node",{node:i}),r&&a.length||this.trigger("after_open",{node:i}),!0):this.is_loading(i)?setTimeout(t.proxy(function(){this.open_node(i,n,r)},this),500):void this.load_node(i,function(t,e){return e?this.open_node(t,n,r):!!n&&n.call(this,t,!1)}):(n&&n.call(this,i,!1),!1))},_open_to:function(e){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var i,n,r=e.parents;for(i=0,n=r.length;i<n;i+=1)i!==t.jstree.root&&this.open_node(r[i],!1,0);return t("#"+e.id.replace(t.jstree.idregex,"\\$&"),this.element)},close_node:function(i,n){var r,o,s,a;if(t.isArray(i)){for(r=0,o=(i=i.slice()).length;r<o;r++)this.close_node(i[r],n);return!0}return!(!(i=this.get_node(i))||i.id===t.jstree.root)&&(!this.is_closed(i)&&(n=n===e?this.settings.core.animation:n,s=this,a=this.get_node(i,!0),i.state.opened=!1,this.trigger("close_node",{node:i}),void(a.length?n?a.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").attr("aria-expanded",!1).children(".jstree-children").stop(!0,!0).slideUp(n,function(){this.style.display="",a.children(".jstree-children").remove(),s.element&&s.trigger("after_close",{node:i})}):(a[0].className=a[0].className.replace("jstree-open","jstree-closed"),a.attr("aria-expanded",!1).children(".jstree-children").remove(),this.trigger("after_close",{node:i})):this.trigger("after_close",{node:i}))))},toggle_node:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.toggle_node(e[i]);return!0}return this.is_closed(e)?this.open_node(e):this.is_open(e)?this.close_node(e):void 0},open_all:function(e,i,n){if(e||(e=t.jstree.root),!(e=this.get_node(e)))return!1;var r,o,s,a=e.id===t.jstree.root?this.get_container_ul():this.get_node(e,!0);if(!a.length){for(r=0,o=e.children_d.length;r<o;r++)this.is_closed(this._model.data[e.children_d[r]])&&(this._model.data[e.children_d[r]].state.opened=!0);return this.trigger("open_all",{node:e})}n=n||a,s=this,(a=this.is_closed(e)?a.find(".jstree-closed").addBack():a.find(".jstree-closed")).each(function(){s.open_node(this,function(t,e){e&&this.is_parent(t)&&this.open_all(t,i,n)},i||0)}),0===n.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(n)})},close_all:function(e,i){if(e||(e=t.jstree.root),!(e=this.get_node(e)))return!1;var n,r,o=e.id===t.jstree.root?this.get_container_ul():this.get_node(e,!0),s=this;for(o.length&&(o=this.is_open(e)?o.find(".jstree-open").addBack():o.find(".jstree-open"),t(o.get().reverse()).each(function(){s.close_node(this,i||0)})),n=0,r=e.children_d.length;n<r;n++)this._model.data[e.children_d[n]].state.opened=!1;this.trigger("close_all",{node:e})},is_disabled:function(t){return(t=this.get_node(t))&&t.state&&t.state.disabled},enable_node:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.enable_node(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.disabled=!1,this.get_node(e,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),this.trigger("enable_node",{node:e})},disable_node:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.disable_node(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.disabled=!0,this.get_node(e,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),this.trigger("disable_node",{node:e})},is_hidden:function(t){return!0===(t=this.get_node(t)).state.hidden},hide_node:function(e,i){var n,r;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.hide_node(e[n],!0);return i||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.hidden||(e.state.hidden=!0,this._node_changed(e.parent),i||this.redraw(),this.trigger("hide_node",{node:e}))},show_node:function(e,i){var n,r;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.show_node(e[n],!0);return i||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;e.state.hidden&&(e.state.hidden=!1,this._node_changed(e.parent),i||this.redraw(),this.trigger("show_node",{node:e}))},hide_all:function(e){var i,n=this._model.data,r=[];for(i in n)n.hasOwnProperty(i)&&i!==t.jstree.root&&!n[i].state.hidden&&(n[i].state.hidden=!0,r.push(i));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("hide_all",{nodes:r}),r},show_all:function(e){var i,n=this._model.data,r=[];for(i in n)n.hasOwnProperty(i)&&i!==t.jstree.root&&n[i].state.hidden&&(n[i].state.hidden=!1,r.push(i));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("show_all",{nodes:r}),r},activate_node:function(t,i){if(this.is_disabled(t))return!1;if(i&&"object"==typeof i||(i={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==e?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&(!i.shiftKey||this._data.core.last_clicked&&this.get_parent(t)&&this.get_parent(t)===this._data.core.last_clicked.parent))if(i.shiftKey){var n,r,o=this.get_node(t).id,s=this._data.core.last_clicked.id,a=this.get_node(this._data.core.last_clicked.parent).children,l=!1;for(n=0,r=a.length;n<r;n+=1)a[n]===o&&(l=!l),a[n]===s&&(l=!l),this.is_disabled(a[n])||!l&&a[n]!==o&&a[n]!==s?this.deselect_node(a[n],!0,i):this.is_hidden(a[n])||this.select_node(a[n],!0,!1,i);this.trigger("changed",{action:"select_node",node:this.get_node(t),selected:this._data.core.selected,event:i})}else this.is_selected(t)?this.deselect_node(t,!1,i):this.select_node(t,!1,!1,i);else!this.settings.core.multiple&&(i.metaKey||i.ctrlKey||i.shiftKey)&&this.is_selected(t)?this.deselect_node(t,!1,i):(this.deselect_all(!0),this.select_node(t,!1,!1,i),this._data.core.last_clicked=this.get_node(t));this.trigger("activate_node",{node:this.get_node(t),event:i})},hover_node:function(t){if(!(t=this.get_node(t,!0))||!t.length||t.children(".jstree-hovered").length)return!1;var e=this.element.find(".jstree-hovered"),i=this.element;e&&e.length&&this.dehover_node(e),t.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(t)}),setTimeout(function(){i.attr("aria-activedescendant",t[0].id)},0)},dehover_node:function(t){if(!(t=this.get_node(t,!0))||!t.length||!t.children(".jstree-hovered").length)return!1;t.children(".jstree-anchor").removeClass("jstree-hovered"),this.trigger("dehover_node",{node:this.get_node(t)})},select_node:function(e,i,n,r){var o,s,a;if(t.isArray(e)){for(s=0,a=(e=e.slice()).length;s<a;s++)this.select_node(e[s],i,n,r);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;o=this.get_node(e,!0),e.state.selected||(e.state.selected=!0,this._data.core.selected.push(e.id),n||(o=this._open_to(e)),o&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass("jstree-clicked"),this.trigger("select_node",{node:e,selected:this._data.core.selected,event:r}),i||this.trigger("changed",{action:"select_node",node:e,selected:this._data.core.selected,event:r}))},deselect_node:function(e,i,n){var r,o,s;if(t.isArray(e)){for(r=0,o=(e=e.slice()).length;r<o;r++)this.deselect_node(e[r],i,n);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;s=this.get_node(e,!0),e.state.selected&&(e.state.selected=!1,this._data.core.selected=t.vakata.array_remove_item(this._data.core.selected,e.id),s.length&&s.attr("aria-selected",!1).children(".jstree-anchor").removeClass("jstree-clicked"),this.trigger("deselect_node",{node:e,selected:this._data.core.selected,event:n}),i||this.trigger("changed",{action:"deselect_node",node:e,selected:this._data.core.selected,event:n}))},select_all:function(e){var i,n,r=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[t.jstree.root].children_d.concat(),i=0,n=this._data.core.selected.length;i<n;i++)this._model.data[this._data.core.selected[i]]&&(this._model.data[this._data.core.selected[i]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),e||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:r})},deselect_all:function(t){var e,i,n=this._data.core.selected.concat([]);for(e=0,i=this._data.core.selected.length;e<i;e++)this._model.data[this._data.core.selected[e]]&&(this._model.data[this._data.core.selected[e]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").parent().attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:n}),t||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:n})},is_selected:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.state.selected},get_selected:function(e){return e?t.map(this._data.core.selected,t.proxy(function(t){return this.get_node(t)},this)):this._data.core.selected.slice()},get_top_selected:function(e){var i,n,r,o,s=this.get_selected(!0),a={};for(i=0,n=s.length;i<n;i++)a[s[i].id]=s[i];for(i=0,n=s.length;i<n;i++)for(r=0,o=s[i].children_d.length;r<o;r++)a[s[i].children_d[r]]&&delete a[s[i].children_d[r]];for(i in s=[],a)a.hasOwnProperty(i)&&s.push(i);return e?t.map(s,t.proxy(function(t){return this.get_node(t)},this)):s},get_bottom_selected:function(e){var i,n,r=this.get_selected(!0),o=[];for(i=0,n=r.length;i<n;i++)r[i].children.length||o.push(r[i].id);return e?t.map(o,t.proxy(function(t){return this.get_node(t)},this)):o},get_state:function(){var e,i={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(e in this._model.data)this._model.data.hasOwnProperty(e)&&e!==t.jstree.root&&(this._model.data[e].state.loaded&&this.settings.core.loaded_state&&i.core.loaded.push(e),this._model.data[e].state.opened&&i.core.open.push(e),this._model.data[e].state.selected&&i.core.selected.push(e));return i},set_state:function(i,n){if(i){if(i.core&&i.core.selected&&i.core.initial_selection===e&&(i.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),i.core){var r,o;if(i.core.loaded)return this.settings.core.loaded_state&&t.isArray(i.core.loaded)&&i.core.loaded.length?this._load_nodes(i.core.loaded,function(t){delete i.core.loaded,this.set_state(i,n)}):(delete i.core.loaded,this.set_state(i,n)),!1;if(i.core.open)return t.isArray(i.core.open)&&i.core.open.length?this._load_nodes(i.core.open,function(t){this.open_node(t,!1,0),delete i.core.open,this.set_state(i,n)}):(delete i.core.open,this.set_state(i,n)),!1;if(i.core.scroll)return i.core.scroll&&i.core.scroll.left!==e&&this.element.scrollLeft(i.core.scroll.left),i.core.scroll&&i.core.scroll.top!==e&&this.element.scrollTop(i.core.scroll.top),delete i.core.scroll,this.set_state(i,n),!1;if(i.core.selected)return r=this,i.core.initial_selection!==e&&i.core.initial_selection!==this._data.core.selected.concat([]).sort().join(",")||(this.deselect_all(),t.each(i.core.selected,function(t,e){r.select_node(e,!1,!0)})),delete i.core.initial_selection,delete i.core.selected,this.set_state(i,n),!1;for(o in i)i.hasOwnProperty(o)&&"core"!==o&&-1===t.inArray(o,this.settings.plugins)&&delete i[o];if(t.isEmptyObject(i.core))return delete i.core,this.set_state(i,n),!1}return!t.isEmptyObject(i)||(i=null,n&&n.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(e,i){this._data.core.state=!0===i?{}:this.get_state(),i&&t.isFunction(i)&&(this._data.core.state=i.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[t.jstree.root]={id:t.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var n=this.get_container_ul()[0].className;e||(this.element.html("<ul class='"+n+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='treeitem' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(t.jstree.root,function(e,i){i&&(this.get_container_ul()[0].className=n,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(t.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(e){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var i=[],n=[],r=this._data.core.selected.concat([]);n.push(e.id),!0===e.state.opened&&i.push(e.id),this.get_node(e,!0).find(".jstree-open").each(function(){n.push(this.id),i.push(this.id)}),this._load_nodes(n,t.proxy(function(t){this.open_node(i,!1,0),this.select_node(r),this.trigger("refresh_node",{node:e,nodes:t})},this),!1,!0)},set_id:function(e,i){if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;var n,r,o=this._model.data,s=e.id;for(i=i.toString(),o[e.parent].children[t.inArray(e.id,o[e.parent].children)]=i,n=0,r=e.parents.length;n<r;n++)o[e.parents[n]].children_d[t.inArray(e.id,o[e.parents[n]].children_d)]=i;for(n=0,r=e.children.length;n<r;n++)o[e.children[n]].parent=i;for(n=0,r=e.children_d.length;n<r;n++)o[e.children_d[n]].parents[t.inArray(e.id,o[e.children_d[n]].parents)]=i;return-1!==(n=t.inArray(e.id,this._data.core.selected))&&(this._data.core.selected[n]=i),(n=this.get_node(e.id,!0))&&(n.attr("id",i),this.element.attr("aria-activedescendant")===e.id&&this.element.attr("aria-activedescendant",i)),delete o[e.id],e.id=i,e.li_attr.id=i,o[i]=e,this.trigger("set_id",{node:e,new:e.id,old:s}),!0},get_text:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.text},set_text:function(e,i){var n,r;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.set_text(e[n],i);return!0}return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&(e.text=i,this.get_node(e,!0).length&&this.redraw_node(e.id),this.trigger("set_text",{obj:e,text:i}),!0)},get_json:function(e,i,n){if(!(e=this.get_node(e||t.jstree.root)))return!1;i&&i.flat&&!n&&(n=[]);var r,o,s={id:e.id,text:e.text,icon:this.get_icon(e),li_attr:t.extend(!0,{},e.li_attr),a_attr:t.extend(!0,{},e.a_attr),state:{},data:(!i||!i.no_data)&&t.extend(!0,t.isArray(e.data)?[]:{},e.data)};if(i&&i.flat?s.parent=e.parent:s.children=[],i&&i.no_state)delete s.state;else for(r in e.state)e.state.hasOwnProperty(r)&&(s.state[r]=e.state[r]);if(i&&i.no_li_attr&&delete s.li_attr,i&&i.no_a_attr&&delete s.a_attr,i&&i.no_id&&(delete s.id,s.li_attr&&s.li_attr.id&&delete s.li_attr.id,s.a_attr&&s.a_attr.id&&delete s.a_attr.id),i&&i.flat&&e.id!==t.jstree.root&&n.push(s),!i||!i.no_children)for(r=0,o=e.children.length;r<o;r++)i&&i.flat?this.get_json(e.children[r],i,n):s.children.push(this.get_json(e.children[r],i));return i&&i.flat?n:e.id===t.jstree.root?s.children:s},create_node:function(i,n,r,o,s){if(null===i&&(i=t.jstree.root),!(i=this.get_node(i)))return!1;if(!(r=r===e?"last":r).toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(i))return this.load_node(i,function(){this.create_node(i,n,r,o,!0)});var a,l,c,h;switch(n||(n={text:this.get_string("New node")}),(n="string"==typeof n?{text:n}:t.extend(!0,{},n)).text===e&&(n.text=this.get_string("New node")),i.id===t.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":a=this.get_node(i.parent),r=t.inArray(i.id,a.children),i=a;break;case"after":a=this.get_node(i.parent),r=t.inArray(i.id,a.children)+1,i=a;break;case"inside":case"first":r=0;break;case"last":r=i.children.length;break;default:r||(r=0)}if(r>i.children.length&&(r=i.children.length),n.id||(n.id=!0),!this.check("create_node",n,i,r))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===n.id&&delete n.id,!(n=this._parse_model_from_json(n,i.id,i.parents.concat())))return!1;for(a=this.get_node(n),(l=[]).push(n),l=l.concat(a.children_d),this.trigger("model",{nodes:l,parent:i.id}),i.children_d=i.children_d.concat(l),c=0,h=i.parents.length;c<h;c++)this._model.data[i.parents[c]].children_d=this._model.data[i.parents[c]].children_d.concat(l);for(n=a,a=[],c=0,h=i.children.length;c<h;c++)a[c>=r?c+1:c]=i.children[c];return a[r]=n.id,i.children=a,this.redraw_node(i,!0),this.trigger("create_node",{node:this.get_node(n),parent:i.id,position:r}),o&&o.call(this,this.get_node(n)),n.id},rename_node:function(e,i){var n,r,o;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.rename_node(e[n],i);return!0}return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&(o=e.text,this.check("rename_node",e,this.get_parent(e),i)?(this.set_text(e,i),this.trigger("rename_node",{node:e,text:i,old:o}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(e){var i,n,r,o,s,a,l,c,h,d,u,p;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.delete_node(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;if(r=this.get_node(e.parent),o=t.inArray(e.id,r.children),d=!1,!this.check("delete_node",e,r,o))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==o&&(r.children=t.vakata.array_remove(r.children,o)),(s=e.children_d.concat([])).push(e.id),a=0,l=e.parents.length;a<l;a++)this._model.data[e.parents[a]].children_d=t.vakata.array_filter(this._model.data[e.parents[a]].children_d,function(e){return-1===t.inArray(e,s)});for(c=0,h=s.length;c<h;c++)if(this._model.data[s[c]].state.selected){d=!0;break}for(d&&(this._data.core.selected=t.vakata.array_filter(this._data.core.selected,function(e){return-1===t.inArray(e,s)})),this.trigger("delete_node",{node:e,parent:r.id}),d&&this.trigger("changed",{action:"delete_node",node:e,selected:this._data.core.selected,parent:r.id}),c=0,h=s.length;c<h;c++)delete this._model.data[s[c]];return-1!==t.inArray(this._data.core.focused,s)&&(this._data.core.focused=null,u=this.element[0].scrollTop,p=this.element[0].scrollLeft,r.id===t.jstree.root?this._model.data[t.jstree.root].children[0]&&this.get_node(this._model.data[t.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(r,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=u,this.element[0].scrollLeft=p),this.redraw_node(r,!0),!0},check:function(e,i,n,r,o){i=i&&i.id?i:this.get_node(i),n=n&&n.id?n:this.get_node(n);var s=e.match(/^move_node|copy_node|create_node$/i)?n:i,a=this.settings.core.check_callback;return"move_node"!==e&&"copy_node"!==e||o&&o.is_multi||i.id!==n.id&&("move_node"!==e||t.inArray(i.id,n.children)!==r)&&-1===t.inArray(n.id,i.children_d)?(s&&s.data&&(s=s.data),s&&s.functions&&(!1===s.functions[e]||!0===s.functions[e])?(!1===s.functions[e]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})}),s.functions[e]):!(!1===a||t.isFunction(a)&&!1===a.call(this,e,i,n,r,o)||a&&!1===a[e])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})},!1)):(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:e,pos:r,obj:!(!i||!i.id)&&i.id,par:!(!n||!n.id)&&n.id})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(i,n,r,o,s,a,l){var c,h,d,u,p,f,m,g,v,y,b,_,x,w;if(n=this.get_node(n),r=r===e?0:r,!n)return!1;if(!r.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,function(){this.move_node(i,n,r,o,!0,!1,l)});if(t.isArray(i)){if(1!==i.length){for(c=0,h=i.length;c<h;c++)(v=this.move_node(i[c],n,r,o,s,!1,l))&&(n=v,r="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===t.jstree.root)return!1;if(d=(i.parent||t.jstree.root).toString(),p=r.toString().match(/^(before|after)$/)&&n.id!==t.jstree.root?this.get_node(n.parent):n,m=!(f=l||(this._model.data[i.id]?this:t.jstree.reference(i.id)))||!f._id||this._id!==f._id,u=f&&f._id&&d&&f._model.data[d]&&f._model.data[d].children?t.inArray(i.id,f._model.data[d].children):-1,f&&f._id&&(i=f._model.data[i.id]),m)return!!(v=this.copy_node(i,n,r,o,s,!1,l))&&(f&&f.delete_node(i),v);switch(n.id===t.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":r=t.inArray(n.id,p.children);break;case"after":r=t.inArray(n.id,p.children)+1;break;case"inside":case"first":r=0;break;case"last":r=p.children.length;break;default:r||(r=0)}if(r>p.children.length&&(r=p.children.length),!this.check("move_node",i,p,r,{core:!0,origin:l,is_multi:f&&f._id&&f._id!==this._id,is_foreign:!f||!f._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(i.parent===p.id){for(g=p.children.concat(),-1!==(v=t.inArray(i.id,g))&&(g=t.vakata.array_remove(g,v),r>v&&r--),v=[],y=0,b=g.length;y<b;y++)v[y>=r?y+1:y]=g[y];v[r]=i.id,p.children=v,this._node_changed(p.id),this.redraw(p.id===t.jstree.root)}else{for((v=i.children_d.concat()).push(i.id),y=0,b=i.parents.length;y<b;y++){for(g=[],_=0,x=(w=f._model.data[i.parents[y]].children_d).length;_<x;_++)-1===t.inArray(w[_],v)&&g.push(w[_]);f._model.data[i.parents[y]].children_d=g}for(f._model.data[d].children=t.vakata.array_remove_item(f._model.data[d].children,i.id),y=0,b=p.parents.length;y<b;y++)this._model.data[p.parents[y]].children_d=this._model.data[p.parents[y]].children_d.concat(v);for(g=[],y=0,b=p.children.length;y<b;y++)g[y>=r?y+1:y]=p.children[y];for(g[r]=i.id,p.children=g,p.children_d.push(i.id),p.children_d=p.children_d.concat(i.children_d),i.parent=p.id,(v=p.parents.concat()).unshift(p.id),w=i.parents.length,i.parents=v,v=v.concat(),y=0,b=i.children_d.length;y<b;y++)this._model.data[i.children_d[y]].parents=this._model.data[i.children_d[y]].parents.slice(0,-1*w),Array.prototype.push.apply(this._model.data[i.children_d[y]].parents,v);d!==t.jstree.root&&p.id!==t.jstree.root||(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(d),this._node_changed(p.id)),a||this.redraw()}return o&&o.call(this,i,p,r),this.trigger("move_node",{node:i,parent:p.id,position:r,old_parent:d,old_position:u,is_multi:f&&f._id&&f._id!==this._id,is_foreign:!f||!f._id,old_instance:f,new_instance:this}),i.id},copy_node:function(i,n,r,o,s,a,l){var c,h,d,u,p,f,m,g,v,y;if(n=this.get_node(n),r=r===e?0:r,!n)return!1;if(!r.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,function(){this.copy_node(i,n,r,o,!0,!1,l)});if(t.isArray(i)){if(1!==i.length){for(c=0,h=i.length;c<h;c++)(u=this.copy_node(i[c],n,r,o,s,!0,l))&&(n=u,r="after");return this.redraw(),!0}i=i[0]}if(!(i=i&&i.id?i:this.get_node(i))||i.id===t.jstree.root)return!1;switch(g=(i.parent||t.jstree.root).toString(),v=r.toString().match(/^(before|after)$/)&&n.id!==t.jstree.root?this.get_node(n.parent):n,!(y=l||(this._model.data[i.id]?this:t.jstree.reference(i.id)))||!y._id||this._id!==y._id,y&&y._id&&(i=y._model.data[i.id]),n.id===t.jstree.root&&("before"===r&&(r="first"),"after"===r&&(r="last")),r){case"before":r=t.inArray(n.id,v.children);break;case"after":r=t.inArray(n.id,v.children)+1;break;case"inside":case"first":r=0;break;case"last":r=v.children.length;break;default:r||(r=0)}if(r>v.children.length&&(r=v.children.length),!this.check("copy_node",i,v,r,{core:!0,origin:l,is_multi:y&&y._id&&y._id!==this._id,is_foreign:!y||!y._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(m=y?y.get_json(i,{no_id:!0,no_data:!0,no_state:!0}):i))return!1;if(!0===m.id&&delete m.id,!(m=this._parse_model_from_json(m,v.id,v.parents.concat())))return!1;for(u=this.get_node(m),i&&i.state&&!1===i.state.loaded&&(u.state.loaded=!1),(d=[]).push(m),d=d.concat(u.children_d),this.trigger("model",{nodes:d,parent:v.id}),p=0,f=v.parents.length;p<f;p++)this._model.data[v.parents[p]].children_d=this._model.data[v.parents[p]].children_d.concat(d);for(d=[],p=0,f=v.children.length;p<f;p++)d[p>=r?p+1:p]=v.children[p];return d[r]=u.id,v.children=d,v.children_d.push(u.id),v.children_d=v.children_d.concat(u.children_d),v.id===t.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(v.id),a||this.redraw(v.id===t.jstree.root),o&&o.call(this,u,v,r),this.trigger("copy_node",{node:u,original:i,parent:v.id,position:r,old_parent:g,old_position:y&&y._id&&g&&y._model.data[g]&&y._model.data[g].children?t.inArray(i.id,y._model.data[g].children):-1,is_multi:y&&y._id&&y._id!==this._id,is_foreign:!y||!y._id,old_instance:y,new_instance:this}),u.id},cut:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var i,s,a,l=[];for(s=0,a=e.length;s<a;s++)(i=this.get_node(e[s]))&&i.id&&i.id!==t.jstree.root&&l.push(i);if(!l.length)return!1;n=l,o=this,r="move_node",this.trigger("cut",{node:e})},copy:function(e){if(e||(e=this._data.core.selected.concat()),t.isArray(e)||(e=[e]),!e.length)return!1;var i,s,a,l=[];for(s=0,a=e.length;s<a;s++)(i=this.get_node(e[s]))&&i.id&&i.id!==t.jstree.root&&l.push(i);if(!l.length)return!1;n=l,o=this,r="copy_node",this.trigger("copy",{node:e})},get_buffer:function(){return{mode:r,node:n,inst:o}},can_paste:function(){return!1!==r&&!1!==n},paste:function(t,e){if(!((t=this.get_node(t))&&r&&r.match(/^(copy_node|move_node)$/)&&n))return!1;this[r](n,t,e,!1,!1,!1,o)&&this.trigger("paste",{parent:t.id,node:n,mode:r}),n=!1,r=!1,o=!1},clear_buffer:function(){n=!1,r=!1,o=!1,this.trigger("clear_buffer")},edit:function(e,i,n){var r,o,s,a,c,h,d,u,p,f=!1;return!!(e=this.get_node(e))&&(this.check("edit",e,this.get_parent(e))?(p=e,i="string"==typeof i?i:e.text,this.set_text(e,""),e=this._open_to(e),p.text=i,r=this._data.core.rtl,o=this.element.width(),this._data.core.focused=p.id,s=e.children(".jstree-anchor").focus(),a=t("<span>"),c=i,h=t("<div />",{css:{position:"absolute",top:"-200px",left:r?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),d=t("<input />",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:t.proxy(function(i){i.stopImmediatePropagation(),i.preventDefault();var r,o=a.children(".jstree-rename-input").val(),l=this.settings.core.force_text;""===o&&(o=c),h.remove(),a.replaceWith(s),a.remove(),c=l?c:t("<div></div>").append(t.parseHTML(c)).html(),this.set_text(e,c),(r=!!this.rename_node(e,l?t("<div></div>").text(o).text():t("<div></div>").append(t.parseHTML(o)).html()))||this.set_text(e,c),this._data.core.focused=p.id,setTimeout(t.proxy(function(){var t=this.get_node(p.id,!0);t.length&&(this._data.core.focused=p.id,t.children(".jstree-anchor").focus())},this),0),n&&n.call(this,p,r,f),d=null},this),keydown:function(t){var e=t.which;27===e&&(f=!0,this.value=c),27!==e&&13!==e&&37!==e&&38!==e&&39!==e&&40!==e&&32!==e||t.stopImmediatePropagation(),27!==e&&13!==e||(t.preventDefault(),this.blur())},click:function(t){t.stopImmediatePropagation()},mousedown:function(t){t.stopImmediatePropagation()},keyup:function(t){d.width(Math.min(h.text("pW"+this.value).width(),o))},keypress:function(t){if(13===t.which)return!1}}),u={fontFamily:s.css("fontFamily")||"",fontSize:s.css("fontSize")||"",fontWeight:s.css("fontWeight")||"",fontStyle:s.css("fontStyle")||"",fontStretch:s.css("fontStretch")||"",fontVariant:s.css("fontVariant")||"",letterSpacing:s.css("letterSpacing")||"",wordSpacing:s.css("wordSpacing")||""},a.attr("class",s.attr("class")).append(s.contents().clone()).append(d),s.replaceWith(a),h.css(u),d.css(u).width(Math.min(h.text("pW"+d[0].value).width(),o))[0].select(),void t(l).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(e){d&&e.target!==d&&t(d).blur()})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,i){if(!e)return!1;if(!0===i){var n=this.settings.core.themes.dir;n||(n=t.jstree.path+"/themes"),i=n+"/"+e+"/style.css"}i&&-1===t.inArray(i,s)&&(t("head").append('<link rel="stylesheet" href="'+i+'" type="text/css" />'),s.push(i)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(t){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=t,t&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(i,n){var r,o,s,a;if(t.isArray(i)){for(r=0,o=(i=i.slice()).length;r<o;r++)this.set_icon(i[r],n);return!0}return!(!(i=this.get_node(i))||i.id===t.jstree.root)&&(a=i.icon,i.icon=!0===n||null===n||n===e||""===n||n,s=this.get_node(i,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===n?(s.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),this.hide_icon(i)):!0===n||null===n||n===e||""===n?(s.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),!1===a&&this.show_icon(i)):-1===n.indexOf("/")&&-1===n.indexOf(".")?(s.removeClass(a).css("background",""),s.addClass(n+" jstree-themeicon-custom").attr("rel",n),!1===a&&this.show_icon(i)):(s.removeClass(a).css("background",""),s.addClass("jstree-themeicon-custom").css("background","url('"+n+"') center center no-repeat").attr("rel",n),!1===a&&this.show_icon(i)),!0)},get_icon:function(e){return!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.icon},hide_icon:function(e){var i,n;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.hide_icon(e[i]);return!0}return!(!(e=this.get_node(e))||e===t.jstree.root)&&(e.icon=!1,this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(e){var i,n,r;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.show_icon(e[i]);return!0}return!(!(e=this.get_node(e))||e===t.jstree.root)&&(r=this.get_node(e,!0),e.icon=!r.length||r.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),e.icon||(e.icon=!0),r.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},t.vakata={},t.vakata.attributes=function(e,i){e=t(e)[0];var n=i?{}:[];return e&&e.attributes&&t.each(e.attributes,function(e,r){-1===t.inArray(r.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==r.value&&""!==t.trim(r.value)&&(i?n[r.name]=r.value:n.push(r.name))}),n},t.vakata.array_unique=function(t){var i,n,r=[],o={};for(i=0,n=t.length;i<n;i++)o[t[i]]===e&&(r.push(t[i]),o[t[i]]=!0);return r},t.vakata.array_remove=function(t,e){return t.splice(e,1),t},t.vakata.array_remove_item=function(e,i){var n=t.inArray(i,e);return-1!==n?t.vakata.array_remove(e,n):e},t.vakata.array_filter=function(t,e,i,n,r){if(t.filter)return t.filter(e,i);for(r in n=[],t)~~r+""==r+""&&r>=0&&e.call(i,t[r],+r,t)&&n.push(t[r]);return n},t.jstree.plugins.changed=function(t,e){var i=[];this.trigger=function(t,n){var r,o;if(n||(n={}),"changed"===t.replace(".jstree","")){n.changed={selected:[],deselected:[]};var s={};for(r=0,o=i.length;r<o;r++)s[i[r]]=1;for(r=0,o=n.selected.length;r<o;r++)s[n.selected[r]]?s[n.selected[r]]=2:n.changed.selected.push(n.selected[r]);for(r=0,o=i.length;r<o;r++)1===s[i[r]]&&n.changed.deselected.push(i[r]);i=n.selected.slice()}e.trigger.call(this,t,n)},this.refresh=function(t,n){return i=[],e.refresh.apply(this,arguments)}};var c,h,d=l.createElement("I");d.className="jstree-icon jstree-checkbox",d.setAttribute("role","presentation"),t.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},t.jstree.plugins.checkbox=function(i,n){this.bind=function(){n.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",t.proxy(function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")},this)).on("loading.jstree",t.proxy(function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()},this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",t.proxy(function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(t.proxy(this._undetermined,this),50)},this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",t.proxy(function(t,e){var i,n,r=this._model.data,o=(r[e.parent],e.nodes);for(i=0,n=o.length;i<n;i++)r[o[i]].state.checked=r[o[i]].state.checked||r[o[i]].original&&r[o[i]].original.state&&r[o[i]].original.state.checked,r[o[i]].state.checked&&this._data.checkbox.selected.push(o[i])},this)),-1===this.settings.checkbox.cascade.indexOf("up")&&-1===this.settings.checkbox.cascade.indexOf("down")||this.element.on("model.jstree",t.proxy(function(e,i){var n,r,o,s,a,l,c=this._model.data,h=c[i.parent],d=i.nodes,u=[],p=this.settings.checkbox.cascade,f=this.settings.checkbox.tie_selection;if(-1!==p.indexOf("down"))if(h.state[f?"selected":"checked"]){for(r=0,o=d.length;r<o;r++)c[d[r]].state[f?"selected":"checked"]=!0;this._data[f?"core":"checkbox"].selected=this._data[f?"core":"checkbox"].selected.concat(d)}else for(r=0,o=d.length;r<o;r++)if(c[d[r]].state[f?"selected":"checked"]){for(s=0,a=c[d[r]].children_d.length;s<a;s++)c[c[d[r]].children_d[s]].state[f?"selected":"checked"]=!0;this._data[f?"core":"checkbox"].selected=this._data[f?"core":"checkbox"].selected.concat(c[d[r]].children_d)}if(-1!==p.indexOf("up")){for(r=0,o=h.children_d.length;r<o;r++)c[h.children_d[r]].children.length||u.push(c[h.children_d[r]].parent);for(s=0,a=(u=t.vakata.array_unique(u)).length;s<a;s++)for(h=c[u[s]];h&&h.id!==t.jstree.root;){for(n=0,r=0,o=h.children.length;r<o;r++)n+=c[h.children[r]].state[f?"selected":"checked"];if(n!==o)break;h.state[f?"selected":"checked"]=!0,this._data[f?"core":"checkbox"].selected.push(h.id),(l=this.get_node(h,!0))&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(f?"jstree-clicked":"jstree-checked"),h=this.get_node(h.parent)}}this._data[f?"core":"checkbox"].selected=t.vakata.array_unique(this._data[f?"core":"checkbox"].selected)},this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",t.proxy(function(e,i){var n,r,o,s,a=i.node,l=this._model.data,c=this.get_node(a.parent),h=this.settings.checkbox.cascade,d=this.settings.checkbox.tie_selection,u={},p=this._data[d?"core":"checkbox"].selected;for(n=0,r=p.length;n<r;n++)u[p[n]]=!0;if(-1!==h.indexOf("down")){var f=this._cascade_new_checked_state(a.id,!0),m=a.children_d.concat(a.id);for(n=0,r=m.length;n<r;n++)f.indexOf(m[n])>-1?u[m[n]]=!0:delete u[m[n]]}if(-1!==h.indexOf("up"))for(;c&&c.id!==t.jstree.root;){for(o=0,n=0,r=c.children.length;n<r;n++)o+=l[c.children[n]].state[d?"selected":"checked"];if(o!==r)break;c.state[d?"selected":"checked"]=!0,u[c.id]=!0,(s=this.get_node(c,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(d?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}for(n in p=[],u)u.hasOwnProperty(n)&&p.push(n);this._data[d?"core":"checkbox"].selected=p},this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",t.proxy(function(e,i){var n,r,o,s=this.get_node(t.jstree.root),a=this._model.data;for(n=0,r=s.children_d.length;n<r;n++)(o=a[s.children_d[n]])&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1)},this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",t.proxy(function(t,e){var i,n,r,o=e.node,s=(this.get_node(o,!0),this.settings.checkbox.cascade),a=this.settings.checkbox.tie_selection,l=this._data[a?"core":"checkbox"].selected,c=o.children_d.concat(o.id);if(-1!==s.indexOf("down")){var h=this._cascade_new_checked_state(o.id,!1);l=l.filter(function(t){return-1===c.indexOf(t)||h.indexOf(t)>-1})}if(-1!==s.indexOf("up")&&-1===l.indexOf(o.id)){for(i=0,n=o.parents.length;i<n;i++)(r=this._model.data[o.parents[i]]).state[a?"selected":"checked"]=!1,r&&r.original&&r.original.state&&r.original.state.undetermined&&(r.original.state.undetermined=!1),(r=this.get_node(o.parents[i],!0))&&r.length&&r.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked");l=l.filter(function(t){return-1===o.parents.indexOf(t)})}this._data[a?"core":"checkbox"].selected=l},this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",t.proxy(function(e,i){for(var n,r,o,s,a=this.get_node(i.parent),l=this._model.data,c=this.settings.checkbox.tie_selection;a&&a.id!==t.jstree.root&&!a.state[c?"selected":"checked"];){for(o=0,n=0,r=a.children.length;n<r;n++)o+=l[a.children[n]].state[c?"selected":"checked"];if(!(r>0&&o===r))break;a.state[c?"selected":"checked"]=!0,this._data[c?"core":"checkbox"].selected.push(a.id),(s=this.get_node(a,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(c?"jstree-clicked":"jstree-checked"),a=this.get_node(a.parent)}},this)).on("move_node.jstree",t.proxy(function(e,i){var n,r,o,s,a,l=i.is_multi,c=i.old_parent,h=this.get_node(i.parent),d=this._model.data,u=this.settings.checkbox.tie_selection;if(!l)for(n=this.get_node(c);n&&n.id!==t.jstree.root&&!n.state[u?"selected":"checked"];){for(r=0,o=0,s=n.children.length;o<s;o++)r+=d[n.children[o]].state[u?"selected":"checked"];if(!(s>0&&r===s))break;n.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(n.id),(a=this.get_node(n,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),n=this.get_node(n.parent)}for(n=h;n&&n.id!==t.jstree.root;){for(r=0,o=0,s=n.children.length;o<s;o++)r+=d[n.children[o]].state[u?"selected":"checked"];if(r===s)n.state[u?"selected":"checked"]||(n.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(n.id),(a=this.get_node(n,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"));else{if(!n.state[u?"selected":"checked"])break;n.state[u?"selected":"checked"]=!1,this._data[u?"core":"checkbox"].selected=t.vakata.array_remove_item(this._data[u?"core":"checkbox"].selected,n.id),(a=this.get_node(n,!0))&&a.length&&a.attr("aria-selected",!1).children(".jstree-anchor").removeClass(u?"jstree-clicked":"jstree-checked")}n=this.get_node(n.parent)}},this))},this.get_undetermined=function(i){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var n,r,o,s,a={},l=this._model.data,c=this.settings.checkbox.tie_selection,h=this._data[c?"core":"checkbox"].selected,d=[],u=this,p=[];for(n=0,r=h.length;n<r;n++)if(l[h[n]]&&l[h[n]].parents)for(o=0,s=l[h[n]].parents.length;o<s&&a[l[h[n]].parents[o]]===e;o++)l[h[n]].parents[o]!==t.jstree.root&&(a[l[h[n]].parents[o]]=!0,d.push(l[h[n]].parents[o]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var i,c=u.get_node(this);if(c)if(c.state.loaded){for(n=0,r=c.children_d.length;n<r;n++)if(!(i=l[c.children_d[n]]).state.loaded&&i.original&&i.original.state&&i.original.state.undetermined&&!0===i.original.state.undetermined)for(a[i.id]===e&&i.id!==t.jstree.root&&(a[i.id]=!0,d.push(i.id)),o=0,s=i.parents.length;o<s;o++)a[i.parents[o]]===e&&i.parents[o]!==t.jstree.root&&(a[i.parents[o]]=!0,d.push(i.parents[o]))}else if(c.original&&c.original.state&&c.original.state.undetermined&&!0===c.original.state.undetermined)for(a[c.id]===e&&c.id!==t.jstree.root&&(a[c.id]=!0,d.push(c.id)),o=0,s=c.parents.length;o<s;o++)a[c.parents[o]]===e&&c.parents[o]!==t.jstree.root&&(a[c.parents[o]]=!0,d.push(c.parents[o]))}),n=0,r=d.length;n<r;n++)l[d[n]].state[c?"selected":"checked"]||p.push(i?l[d[n]]:d[n]);return p},this._undetermined=function(){if(null!==this.element){var t,e,i,n=this.get_undetermined(!1);for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),t=0,e=n.length;t<e;t++)(i=this.get_node(n[t],!0))&&i.length&&i.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(e,i,r,o){if(e=n.redraw_node.apply(this,arguments)){var s,a,l=null,c=null;for(s=0,a=e.childNodes.length;s<a;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){l=e.childNodes[s];break}l&&(!this.settings.checkbox.tie_selection&&this._model.data[e.id].state.checked&&(l.className+=" jstree-checked"),c=d.cloneNode(!1),this._model.data[e.id].state.checkbox_disabled&&(c.className+=" jstree-checkbox-disabled"),l.insertBefore(c,l.childNodes[0]))}return r||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(t.proxy(this._undetermined,this),50)),e},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(e){e=this.get_node(e);var i,n,r=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection,s=this._data[o?"core":"checkbox"].selected,a=this._model.data;if(!e||!0===e.state[o?"selected":"checked"]||-1===r.indexOf("undetermined")||-1===r.indexOf("down")&&-1===r.indexOf("up"))return!1;if(!e.state.loaded&&!0===e.original.state.undetermined)return!0;for(i=0,n=e.children_d.length;i<n;i++)if(-1!==t.inArray(e.children_d[i],s)||!a[e.children_d[i]].state.loaded&&a[e.children_d[i]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(e){var i,n,r;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.disable_checkbox(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled||(e.state.checkbox_disabled=!0,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:e}))},this.enable_checkbox=function(e){var i,n,r;if(t.isArray(e)){for(i=0,n=(e=e.slice()).length;i<n;i++)this.enable_checkbox(e[i]);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled&&(e.state.checkbox_disabled=!1,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:e}))},this.activate_node=function(e,i){return!t(i.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||t(i.target).hasClass("jstree-checkbox"))&&(i.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!t(i.target).hasClass("jstree-checkbox")?n.activate_node.call(this,e,i):!this.is_disabled(e)&&(this.is_checked(e)?this.uncheck_node(e,i):this.check_node(e,i),void this.trigger("activate_node",{node:this.get_node(e)})))},this._cascade_new_checked_state=function(t,e){var i,n,r,o=this.settings.checkbox.tie_selection,s=this._model.data[t],a=[],l=[];if(!this.settings.checkbox.cascade_to_disabled&&s.state.disabled||!this.settings.checkbox.cascade_to_hidden&&s.state.hidden)r=this.get_checked_descendants(t),s.state[o?"selected":"checked"]&&r.push(s.id),a=a.concat(r);else{if(s.children)for(i=0,n=s.children.length;i<n;i++){var c=s.children[i];r=this._cascade_new_checked_state(c,e),a=a.concat(r),r.indexOf(c)>-1&&l.push(c)}var h=this.get_node(s,!0),d=l.length>0&&l.length<s.children.length;s.original&&s.original.state&&s.original.state.undetermined&&(s.original.state.undetermined=d),d?(s.state[o?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(o?"jstree-clicked":"jstree-checked")):e&&l.length===s.children.length?(s.state[o?"selected":"checked"]=e,a.push(s.id),h.attr("aria-selected",!0).children(".jstree-anchor").addClass(o?"jstree-clicked":"jstree-checked")):(s.state[o?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(o?"jstree-clicked":"jstree-checked"))}return a},this.get_checked_descendants=function(t){var e=this,i=e.settings.checkbox.tie_selection;return e._model.data[t].children_d.filter(function(t){return e._model.data[t].state[i?"selected":"checked"]})},this.check_node=function(e,i){if(this.settings.checkbox.tie_selection)return this.select_node(e,!1,!0,i);var n,r,o;if(t.isArray(e)){for(r=0,o=(e=e.slice()).length;r<o;r++)this.check_node(e[r],i);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;n=this.get_node(e,!0),e.state.checked||(e.state.checked=!0,this._data.checkbox.selected.push(e.id),n&&n.length&&n.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:e,selected:this._data.checkbox.selected,event:i}))},this.uncheck_node=function(e,i){if(this.settings.checkbox.tie_selection)return this.deselect_node(e,!1,i);var n,r,o;if(t.isArray(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.uncheck_node(e[n],i);return!0}if(!(e=this.get_node(e))||e.id===t.jstree.root)return!1;o=this.get_node(e,!0),e.state.checked&&(e.state.checked=!1,this._data.checkbox.selected=t.vakata.array_remove_item(this._data.checkbox.selected,e.id),o.length&&o.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:e,selected:this._data.checkbox.selected,event:i}))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var e,i;this._data.checkbox.selected.concat([]);for(this._data.checkbox.selected=this._model.data[t.jstree.root].children_d.concat(),e=0,i=this._data.checkbox.selected.length;e<i;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var t,e,i=this._data.checkbox.selected.concat([]);for(t=0,e=this._data.checkbox.selected.length;t<e;t++)this._model.data[this._data.checkbox.selected[t]]&&(this._model.data[this._data.checkbox.selected[t]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:i})},this.is_checked=function(e){return this.settings.checkbox.tie_selection?this.is_selected(e):!(!(e=this.get_node(e))||e.id===t.jstree.root)&&e.state.checked},this.get_checked=function(e){return this.settings.checkbox.tie_selection?this.get_selected(e):e?t.map(this._data.checkbox.selected,t.proxy(function(t){return this.get_node(t)},this)):this._data.checkbox.selected},this.get_top_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_top_selected(e);var i,n,r,o,s=this.get_checked(!0),a={};for(i=0,n=s.length;i<n;i++)a[s[i].id]=s[i];for(i=0,n=s.length;i<n;i++)for(r=0,o=s[i].children_d.length;r<o;r++)a[s[i].children_d[r]]&&delete a[s[i].children_d[r]];for(i in s=[],a)a.hasOwnProperty(i)&&s.push(i);return e?t.map(s,t.proxy(function(t){return this.get_node(t)},this)):s},this.get_bottom_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(e);var i,n,r=this.get_checked(!0),o=[];for(i=0,n=r.length;i<n;i++)r[i].children.length||o.push(r[i].id);return e?t.map(o,t.proxy(function(t){return this.get_node(t)},this)):o},this.load_node=function(e,i){var r,o,s;if(!t.isArray(e)&&!this.settings.checkbox.tie_selection&&(s=this.get_node(e))&&s.state.loaded)for(r=0,o=s.children_d.length;r<o;r++)this._model.data[s.children_d[r]].state.checked&&(!0,this._data.checkbox.selected=t.vakata.array_remove_item(this._data.checkbox.selected,s.children_d[r]));return n.load_node.apply(this,arguments)},this.get_state=function(){var t=n.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection?t:(t.checkbox=this._data.checkbox.selected.slice(),t)},this.set_state=function(e,i){var r=n.set_state.apply(this,arguments);if(r&&e.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var o=this;t.each(e.checkbox,function(t,e){o.check_node(e)})}return delete e.checkbox,this.set_state(e,i),!1}return r},this.refresh=function(t,e){return this.settings.checkbox.tie_selection||(this._data.checkbox.selected=[]),n.refresh.apply(this,arguments)}},t.jstree.defaults.conditionalselect=function(){return!0},t.jstree.plugins.conditionalselect=function(t,e){this.activate_node=function(t,i){if(this.settings.conditionalselect.call(this,this.get_node(t),i))return e.activate_node.call(this,t,i)}},t.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(e,i){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.create_node(n,{},"last",function(t){try{i.edit(t)}catch(e){setTimeout(function(){i.edit(t)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.edit(n)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.is_selected(n)?i.delete_node(i.get_selected()):i.delete_node(n)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.is_selected(n)?i.cut(i.get_top_selected()):i.cut(n)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.is_selected(n)?i.copy(i.get_top_selected()):i.copy(n)}},paste:{separator_before:!1,icon:!1,_disabled:function(e){return!t.jstree.reference(e.reference).can_paste()},separator_after:!1,label:"Paste",action:function(e){var i=t.jstree.reference(e.reference),n=i.get_node(e.reference);i.paste(n)}}}}}}},t.jstree.plugins.contextmenu=function(i,n){this.bind=function(){n.bind.call(this);var e,i,r=0,o=null;this.element.on("init.jstree loading.jstree ready.jstree",t.proxy(function(){this.get_container_ul().addClass("jstree-contextmenu")},this)).on("contextmenu.jstree",".jstree-anchor",t.proxy(function(t,e){"input"!==t.target.tagName.toLowerCase()&&(t.preventDefault(),r=t.ctrlKey?+new Date:0,(e||o)&&(r=+new Date+1e4),o&&clearTimeout(o),this.is_loading(t.currentTarget)||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY,t))},this)).on("click.jstree",".jstree-anchor",t.proxy(function(e){this._data.contextmenu.visible&&(!r||+new Date-r>250)&&t.vakata.context.hide(),r=0},this)).on("touchstart.jstree",".jstree-anchor",function(n){n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(e=n.originalEvent.changedTouches[0].clientX,i=n.originalEvent.changedTouches[0].clientY,o=setTimeout(function(){t(n.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(n){o&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(Math.abs(e-n.originalEvent.changedTouches[0].clientX)>10||Math.abs(i-n.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(o),t.vakata.context.hide())}).on("touchend.vakata.jstree",function(t){o&&clearTimeout(o)}),t(l).on("context_hide.vakata.jstree",t.proxy(function(e,i){this._data.contextmenu.visible=!1,t(i.reference).removeClass("jstree-context")},this))},this.teardown=function(){this._data.contextmenu.visible&&t.vakata.context.hide(),n.teardown.call(this)},this.show_contextmenu=function(i,n,r,o){if(!(i=this.get_node(i))||i.id===t.jstree.root)return!1;var s=this.settings.contextmenu,a=this.get_node(i,!0).children(".jstree-anchor"),l=!1,c=!1;(s.show_at_node||n===e||r===e)&&(l=a.offset(),n=l.left,r=l.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(i)&&this.activate_node(i,o),c=s.items,t.isFunction(c)&&(c=c.call(this,i,t.proxy(function(t){this._show_contextmenu(i,n,r,t)},this))),t.isPlainObject(c)&&this._show_contextmenu(i,n,r,c)},this._show_contextmenu=function(e,i,n,r){var o=this.get_node(e,!0).children(".jstree-anchor");t(l).one("context_show.vakata.jstree",t.proxy(function(e,i){var n="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";t(i.element).addClass(n),o.addClass("jstree-context")},this)),this._data.contextmenu.visible=!0,t.vakata.context.show(o,{x:i,y:n},r),this.trigger("show_contextmenu",{node:e,x:i,y:n})}},function(t){var e=!1,i={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};t.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){t(l).triggerHandler("context_"+e+".vakata",{reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_execute:function(e){return!(!(e=i.items[e])||e._disabled&&(!t.isFunction(e._disabled)||e._disabled({item:e,reference:i.reference,element:i.element}))||!e.action)&&e.action.call(null,{item:e,reference:i.reference,element:i.element,position:{x:i.position_x,y:i.position_y}})},_parse:function(e,n){if(!e)return!1;n||(i.html="",i.items=[]);var r,o="",s=!1;return n&&(o+="<ul>"),t.each(e,function(e,n){if(!n)return!0;i.items.push(n),!s&&n.separator_before&&(o+="<li class='vakata-context-separator'><a href='#' "+(t.vakata.context.settings.icons?"":'style="margin-left:0px;"')+"> </a></li>"),s=!1,o+="<li class='"+(n._class||"")+(!0===n._disabled||t.isFunction(n._disabled)&&n._disabled({item:n,reference:i.reference,element:i.element})?" vakata-contextmenu-disabled ":"")+"' "+(n.shortcut?" data-shortcut='"+n.shortcut+"' ":"")+">",o+="<a href='#' rel='"+(i.items.length-1)+"' "+(n.title?"title='"+n.title+"'":"")+">",t.vakata.context.settings.icons&&(o+="<i ",n.icon&&(-1!==n.icon.indexOf("/")||-1!==n.icon.indexOf(".")?o+=" style='background:url(\""+n.icon+"\") center center no-repeat' ":o+=" class='"+n.icon+"' "),o+="></i><span class='vakata-contextmenu-sep'> </span>"),o+=(t.isFunction(n.label)?n.label({item:e,reference:i.reference,element:i.element}):n.label)+(n.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+n.shortcut+'">'+(n.shortcut_label||"")+"</span>":"")+"</a>",n.submenu&&(r=t.vakata.context._parse(n.submenu,!0))&&(o+=r),o+="</li>",n.separator_after&&(o+="<li class='vakata-context-separator'><a href='#' "+(t.vakata.context.settings.icons?"":'style="margin-left:0px;"')+"> </a></li>",s=!0)}),o=o.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),n&&(o+="</ul>"),n||(i.html=o,t.vakata.context._trigger("parse")),o.length>10&&o},_show_submenu:function(i){if((i=t(i)).length&&i.children("ul").length){var n=i.children("ul"),r=i.offset().left,o=r+i.outerWidth(),s=i.offset().top,a=n.width(),l=n.height(),c=t(window).width()+t(window).scrollLeft(),h=t(window).height()+t(window).scrollTop();e?i[o-(a+10+i.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):i[o+a>c&&r>c-o?"addClass":"removeClass"]("vakata-context-right"),s+l+10>h&&n.css("bottom","-1px"),i.hasClass("vakata-context-right")?r<a&&n.css("margin-right",r-a):c-o<a&&n.css("margin-left",c-o-a),n.show()}},show:function(n,r,o){var s,a,l,c,h,d,u,p;switch(i.element&&i.element.length&&i.element.width(""),!0){case!r&&!n:return!1;case!!r&&!!n:i.reference=n,i.position_x=r.x,i.position_y=r.y;break;case!r&&!!n:i.reference=n,s=n.offset(),i.position_x=s.left+n.outerHeight(),i.position_y=s.top;break;case!!r&&!n:i.position_x=r.x,i.position_y=r.y}n&&!o&&t(n).data("vakata_contextmenu")&&(o=t(n).data("vakata_contextmenu")),t.vakata.context._parse(o)&&i.element.html(i.html),i.items.length&&(i.element.appendTo("body"),a=i.element,l=i.position_x,c=i.position_y,h=a.width(),d=a.height(),u=t(window).width()+t(window).scrollLeft(),p=t(window).height()+t(window).scrollTop(),e&&(l-=a.outerWidth()-t(n).outerWidth())<t(window).scrollLeft()+20&&(l=t(window).scrollLeft()+20),l+h+20>u&&(l=u-(h+20)),c+d+20>p&&(c=p-(d+20)),i.element.css({left:l,top:c}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),i.is_visible=!0,t.vakata.context._trigger("show"))},hide:function(){i.is_visible&&(i.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),i.is_visible=!1,t.vakata.context._trigger("hide"))}},t(function(){e="rtl"===t("body").css("direction");var n=!1;i.element=t("<ul class='vakata-context'></ul>"),i.element.on("mouseenter","li",function(e){e.stopImmediatePropagation(),t.contains(this,e.relatedTarget)||(n&&clearTimeout(n),i.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),t(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),t.vakata.context._show_submenu(this))}).on("mouseleave","li",function(e){t.contains(this,e.relatedTarget)||t(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(e){t(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),t.vakata.context.settings.hide_onmouseleave&&(n=setTimeout(function(){t.vakata.context.hide()},t.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(e){e.preventDefault(),t(this).blur().parent().hasClass("vakata-context-disabled")||!1===t.vakata.context._execute(t(this).attr("rel"))||t.vakata.context.hide()}).on("keydown","a",function(e){var n=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),t(e.currentTarget).trigger(e);break;case 37:i.is_visible&&(i.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 38:i.is_visible&&((n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),n.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 39:i.is_visible&&(i.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 40:i.is_visible&&((n=i.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(n=i.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),n.addClass("vakata-context-hover").children("a").focus(),e.stopImmediatePropagation(),e.preventDefault());break;case 27:t.vakata.context.hide(),e.preventDefault()}}).on("keydown",function(t){t.preventDefault();var e=i.element.find(".vakata-contextmenu-shortcut-"+t.which).parent();e.parent().not(".vakata-context-disabled")&&e.click()}),t(l).on("mousedown.vakata.jstree",function(e){i.is_visible&&i.element[0]!==e.target&&!t.contains(i.element[0],e.target)&&t.vakata.context.hide()}).on("context_show.vakata.jstree",function(t,n){i.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),e&&i.element.addClass("vakata-context-rtl").css("direction","rtl"),i.element.find("ul").hide().end()})})}(t),t.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},t.jstree.plugins.dnd=function(e,i){this.init=function(t,e){i.init.call(this,t,e),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in l.createElement("span")},this.bind=function(){i.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",t.proxy(function(e){if(this.settings.dnd.large_drag_target&&t(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var i=this.get_node(e.target),n=this.is_selected(i)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=n>1?n+" "+this.get_string("nodes"):this.get_text(e.currentTarget);if(this.settings.core.force_text&&(r=t.vakata.html.escape(r)),i&&i.id&&i.id!==t.jstree.root&&(1===e.which||"touchstart"===e.type||"dragstart"===e.type)&&(!0===this.settings.dnd.is_draggable||t.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,n>1?this.get_top_selected(!0):[i],e))){if(c={jstree:!0,origin:this,obj:this.get_node(i,!0),nodes:n>1?this.get_top_selected():[i.id]},h=e.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),t.vakata.dnd.start(e,c,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+r+'<ins class="jstree-copy" style="display:none;">+</ins></div>');t.vakata.dnd._trigger("start",e,{helper:t(),element:h,data:c})}},this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(e){return e.preventDefault(),t.vakata.dnd._trigger("move",e,{helper:t(),element:h,data:c}),!1}).on("drop.jstree",t.proxy(function(e){return e.preventDefault(),t.vakata.dnd._trigger("stop",e,{helper:t(),element:h,data:c}),!1},this))},this.redraw_node=function(t,e,n,r){if((t=i.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)t.setAttribute("draggable",!0);else{var o,s,a=null;for(o=0,s=t.childNodes.length;o<s;o++)if(t.childNodes[o]&&t.childNodes[o].className&&-1!==t.childNodes[o].className.indexOf("jstree-anchor")){a=t.childNodes[o];break}a&&a.setAttribute("draggable",!0)}return t}},t(function(){var i=!1,n=!1,r=!1,o=!1,s=t('<div id="jstree-marker"> </div>').hide();t(l).on("dnd_start.vakata.jstree",function(t,e){i=!1,r=!1,e&&e.data&&e.data.jstree&&s.appendTo("body")}).on("dnd_move.vakata.jstree",function(a,l){var c=l.event.target!==r.target;if(o&&(l.event&&"dragover"===l.event.type&&!c||clearTimeout(o)),l&&l.data&&l.data.jstree&&(!l.event.target.id||"jstree-marker"!==l.event.target.id)){r=l.event;var h,d,u,p,f,m,g,v,y,b,_,x,w,k,C,S,D=t.jstree.reference(l.event.target),T=!1,A=!1,M=!1;if(D&&D._data&&D._data.dnd)if(s.attr("class","jstree-"+D.get_theme()+(D.settings.core.themes.responsive?" jstree-dnd-responsive":"")),C=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey)),l.helper.children().attr("class","jstree-"+D.get_theme()+" jstree-"+D.get_theme()+"-"+D.get_theme_variant()+" "+(D.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[C?"show":"hide"](),l.event.target!==D.element[0]&&l.event.target!==D.get_container_ul()[0]||0!==D.get_container_ul().children().length){if((T=D.settings.dnd.large_drop_target?t(l.event.target).closest(".jstree-node").children(".jstree-anchor"):t(l.event.target).closest(".jstree-anchor"))&&T.length&&T.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(A=T.offset(),M=(l.event.pageY!==e?l.event.pageY:l.event.originalEvent.pageY)-A.top,u=T.outerHeight(),m=M<u/3?["b","i","a"]:M>u-u/3?["a","i","b"]:M>u/2?["i","a","b"]:["i","b","a"],t.each(m,function(e,r){switch(r){case"b":h=A.left-6,d=A.top,p=D.get_parent(T),f=T.parent().index();break;case"i":w=D.settings.dnd.inside_pos,k=D.get_node(T.parent()),h=A.left-2,d=A.top+u/2+1,p=k.id,f="first"===w?0:"last"===w?k.children.length:Math.min(w,k.children.length);break;case"a":h=A.left-6,d=A.top+u,p=D.get_parent(T),f=T.parent().index()+1}for(g=!0,v=0,y=l.data.nodes.length;v<y;v++)if(b=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey))?"copy_node":"move_node",_=f,"move_node"===b&&"a"===r&&l.data.origin&&l.data.origin===D&&p===D.get_parent(l.data.nodes[v])&&(x=D.get_node(p),_>t.inArray(l.data.nodes[v],x.children)&&(_-=1)),!(g=g&&(D&&D.settings&&D.settings.dnd&&!1===D.settings.dnd.check_while_dragging||D.check(b,l.data.origin&&l.data.origin!==D?l.data.origin.get_node(l.data.nodes[v]):l.data.nodes[v],p,_,{dnd:!0,ref:D.get_node(T.parent()),pos:r,origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==D,is_foreign:!l.data.origin})))){D&&D.last_error&&(n=D.last_error());break}var a,M;if("i"===r&&T.parent().is(".jstree-closed")&&D.settings.dnd.open_timeout&&(l.event&&"dragover"===l.event.type&&!c||(o&&clearTimeout(o),o=setTimeout((a=D,M=T,function(){a.open_node(M)}),D.settings.dnd.open_timeout))),g)return(S=D.get_node(p,!0)).hasClass(".jstree-dnd-parent")||(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),S.addClass("jstree-dnd-parent")),i={ins:D,par:p,pos:"i"!==r||"last"!==w||0!==f||D.is_loaded(k)?f:"last"},s.css({left:h+"px",top:d+"px"}).show(),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=C?"copy":"move"),n={},m=!0,!1}),!0===m))return}else{for(g=!0,v=0,y=l.data.nodes.length;v<y&&(g=g&&D.check(l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey))?"copy_node":"move_node",l.data.origin&&l.data.origin!==D?l.data.origin.get_node(l.data.nodes[v]):l.data.nodes[v],t.jstree.root,"last",{dnd:!0,ref:D.get_node(t.jstree.root),pos:"i",origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==D,is_foreign:!l.data.origin}));v++);if(g)return i={ins:D,par:t.jstree.root,pos:"last"},s.hide(),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=C?"copy":"move"))}t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),i=!1,l.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect="none"),s.hide()}}).on("dnd_scroll.vakata.jstree",function(t,e){e&&e.data&&e.data.jstree&&(s.hide(),i=!1,r=!1,e.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(e,a){if(t(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),o&&clearTimeout(o),a&&a.data&&a.data.jstree){s.hide().detach();var l,c,h=[];if(i){for(l=0,c=a.data.nodes.length;l<c;l++)h[l]=a.data.origin?a.data.origin.get_node(a.data.nodes[l]):a.data.nodes[l];i.ins[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(a.event.metaKey||a.event.ctrlKey))?"copy_node":"move_node"](h,i.par,i.pos,!1,!1,!1,a.data.origin)}else(l=t(a.event.target).closest(".jstree")).length&&n&&n.error&&"check"===n.error&&(l=l.jstree(!0))&&l.settings.core.error.call(this,n);r=!1,i=!1}}).on("keyup.jstree keydown.jstree",function(e,a){(a=t.vakata.dnd._get())&&a.data&&a.data.jstree&&("keyup"===e.type&&27===e.which?(o&&clearTimeout(o),i=!1,n=!1,r=!1,o=!1,s.hide().detach(),t.vakata.dnd._clean()):(a.helper.find(".jstree-copy").first()[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(e.metaKey||e.ctrlKey))?"show":"hide"](),r&&(r.metaKey=e.metaKey,r.ctrlKey=e.ctrlKey,t.vakata.dnd._trigger("move",r))))})}),function(t){t.vakata.html={div:t("<div />"),escape:function(e){return t.vakata.html.div.text(e).html()},strip:function(e){return t.vakata.html.div.empty().append(t.parseHTML(e)).text()}};var i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};t.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(i,n,r){r===e&&(r=t.vakata.dnd._get()),r.event=n,t(l).triggerHandler("dnd_"+i+".vakata",r)},_get:function(){return{data:i.data,element:i.element,helper:i.helper}},_clean:function(){i.helper&&i.helper.remove(),i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),i={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},t(l).off("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).off("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop)},_scroll:function(e){if(!i.scroll_e||!i.scroll_l&&!i.scroll_t)return i.scroll_i&&(clearInterval(i.scroll_i),i.scroll_i=!1),!1;if(!i.scroll_i)return i.scroll_i=setInterval(t.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var n=i.scroll_e.scrollTop(),r=i.scroll_e.scrollLeft();i.scroll_e.scrollTop(n+i.scroll_t*t.vakata.dnd.settings.scroll_speed),i.scroll_e.scrollLeft(r+i.scroll_l*t.vakata.dnd.settings.scroll_speed),n===i.scroll_e.scrollTop()&&r===i.scroll_e.scrollLeft()||t.vakata.dnd._trigger("scroll",i.scroll_e)},start:function(e,n,r){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag&&t.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(t){}return i.init_x=e.pageX,i.init_y=e.pageY,i.data=n,i.is_down=!0,i.element=e.currentTarget,i.target=e.target,i.is_touch="touchstart"===e.type,!1!==r&&(i.helper=t("<div id='vakata-dnd'></div>").html(r).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),t(l).on("mousemove.vakata.jstree touchmove.vakata.jstree",t.vakata.dnd.drag),t(l).on("mouseup.vakata.jstree touchend.vakata.jstree",t.vakata.dnd.stop),!1},drag:function(e){if("touchmove"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_down){if(!i.is_drag){if(!(Math.abs(e.pageX-i.init_x)>(i.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)||Math.abs(e.pageY-i.init_y)>(i.is_touch?t.vakata.dnd.settings.threshold_touch:t.vakata.dnd.settings.threshold)))return;i.helper&&(i.helper.appendTo("body"),i.helper_w=i.helper.outerWidth()),i.is_drag=!0,t(i.target).one("click.vakata",!1),t.vakata.dnd._trigger("start",e)}var n=!1,r=!1,o=!1,s=!1,a=!1,c=!1,h=!1,d=!1,u=!1,p=!1;return i.scroll_t=0,i.scroll_l=0,i.scroll_e=!1,t(t(e.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(t(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var n=t(this),r=n.offset();if(this.scrollHeight>this.offsetHeight&&(r.top+n.height()-e.pageY<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=1),e.pageY-r.top<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(r.left+n.width()-e.pageX<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=1),e.pageX-r.left<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=-1)),i.scroll_t||i.scroll_l)return i.scroll_e=t(this),!1}),i.scroll_e||(n=t(l),r=t(window),o=n.height(),s=r.height(),a=n.width(),c=r.width(),h=n.scrollTop(),d=n.scrollLeft(),o>s&&e.pageY-h<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=-1),o>s&&s-(e.pageY-h)<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_t=1),a>c&&e.pageX-d<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=-1),a>c&&c-(e.pageX-d)<t.vakata.dnd.settings.scroll_proximity&&(i.scroll_l=1),(i.scroll_t||i.scroll_l)&&(i.scroll_e=n)),i.scroll_e&&t.vakata.dnd._scroll(!0),i.helper&&(u=parseInt(e.pageY+t.vakata.dnd.settings.helper_top,10),p=parseInt(e.pageX+t.vakata.dnd.settings.helper_left,10),o&&u+25>o&&(u=o-50),a&&p+i.helper_w>a&&(p=a-(i.helper_w+2)),i.helper.css({left:p+"px",top:u+"px"})),t.vakata.dnd._trigger("move",e),!1}},stop:function(e){if("touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=l.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),i.is_drag)e.target!==i.target&&t(i.target).off("click.vakata"),t.vakata.dnd._trigger("stop",e);else if("touchend"===e.type&&e.target===i.target){var n=setTimeout(function(){t(e.target).click()},100);t(e.target).one("click",function(){n&&clearTimeout(n)})}return t.vakata.dnd._clean(),!1}}}(t),t.jstree.defaults.massload=null,t.jstree.plugins.massload=function(e,i){this.init=function(t,e){this._data.massload={},i.init.call(this,t,e)},this._load_nodes=function(e,n,r,o){var s,a,l,c=this.settings.massload,h=(JSON.stringify(e),[]),d=this._model.data;if(!r){for(s=0,a=e.length;s<a;s++)d[e[s]]&&(d[e[s]].state.loaded||d[e[s]].state.failed)&&!o||(h.push(e[s]),(l=this.get_node(e[s],!0))&&l.length&&l.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},h.length){if(t.isFunction(c))return c.call(this,h,t.proxy(function(t){var s,a;if(t)for(s in t)t.hasOwnProperty(s)&&(this._data.massload[s]=t[s]);for(s=0,a=e.length;s<a;s++)(l=this.get_node(e[s],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);i._load_nodes.call(this,e,n,r,o)},this));if("object"==typeof c&&c&&c.url)return c=t.extend(!0,{},c),t.isFunction(c.url)&&(c.url=c.url.call(this,h)),t.isFunction(c.data)&&(c.data=c.data.call(this,h)),t.ajax(c).done(t.proxy(function(t,s,a){var c,h;if(t)for(c in t)t.hasOwnProperty(c)&&(this._data.massload[c]=t[c]);for(c=0,h=e.length;c<h;c++)(l=this.get_node(e[c],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);i._load_nodes.call(this,e,n,r,o)},this)).fail(t.proxy(function(t){i._load_nodes.call(this,e,n,r,o)},this))}}return i._load_nodes.call(this,e,n,r,o)},this._load_node=function(e,n){var r,o=this._data.massload[e.id],s=null;return o?(s=this["string"==typeof o?"_append_html_data":"_append_json_data"](e,"string"==typeof o?t(t.parseHTML(o)).filter(function(){return 3!==this.nodeType}):o,function(t){n.call(this,t)}),(r=this.get_node(e.id,!0))&&r.length&&r.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[e.id],s):i._load_node.call(this,e,n)}},t.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},t.jstree.plugins.search=function(i,n){this.bind=function(){n.bind.call(this),this._data.search.str="",this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",t.proxy(function(e,i){if(this._data.search.som&&i.res.length){var n,r,o,s,a=this._model.data,l=[];for(n=0,r=i.res.length;n<r;n++)if(a[i.res[n]]&&!a[i.res[n]].state.hidden&&(l.push(i.res[n]),l=l.concat(a[i.res[n]].parents),this._data.search.smc))for(o=0,s=a[i.res[n]].children_d.length;o<s;o++)a[a[i.res[n]].children_d[o]]&&!a[a[i.res[n]].children_d[o]].state.hidden&&l.push(a[i.res[n]].children_d[o]);l=t.vakata.array_remove_item(t.vakata.array_unique(l),t.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(l,!0),this.redraw(!0)}},this)).on("clear_search.jstree",t.proxy(function(t,e){this._data.search.som&&e.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))},this))},this.search=function(i,n,r,o,s,a){if(!1===i||""===t.trim(i.toString()))return this.clear_search();o=(o=this.get_node(o))&&o.id?o.id:null,i=i.toString();var l,c,h=this.settings.search,d=!!h.ajax&&h.ajax,u=this._model.data,p=null,f=[],m=[];if(this._data.search.res.length&&!s&&this.clear_search(),r===e&&(r=h.show_only_matches),a===e&&(a=h.show_only_matches_children),!n&&!1!==d)return t.isFunction(d)?d.call(this,i,t.proxy(function(e){e&&e.d&&(e=e.d),this._load_nodes(t.isArray(e)?t.vakata.array_unique(e):[],function(){this.search(i,!0,r,o,s,a)})},this),o):((d=t.extend({},d)).data||(d.data={}),d.data.str=i,o&&(d.data.inside=o),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=t.ajax(d).fail(t.proxy(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(d)},this.settings.core.error.call(this,this._data.core.last_error)},this)).done(t.proxy(function(e){e&&e.d&&(e=e.d),this._load_nodes(t.isArray(e)?t.vakata.array_unique(e):[],function(){this.search(i,!0,r,o,s,a)})},this)),this._data.search.lastRequest);if(s||(this._data.search.str=i,this._data.search.dom=t(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=r,this._data.search.smc=a),p=new t.vakata.search(i,!0,{caseSensitive:h.case_sensitive,fuzzy:h.fuzzy}),t.each(u[o||t.jstree.root].children_d,function(t,e){var n=u[e];n.text&&!n.state.hidden&&(!h.search_leaves_only||n.state.loaded&&0===n.children.length)&&(h.search_callback&&h.search_callback.call(this,i,n)||!h.search_callback&&p.search(n.text).isMatch)&&(f.push(e),m=m.concat(n.parents))}),f.length){for(l=0,c=(m=t.vakata.array_unique(m)).length;l<c;l++)m[l]!==t.jstree.root&&u[m[l]]&&!0===this.open_node(m[l],null,0)&&this._data.search.opn.push(m[l]);s?(this._data.search.dom=this._data.search.dom.add(t(this.element[0].querySelectorAll("#"+t.map(f,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(t.jstree.idregex,"\\$&"):e.replace(t.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=t.vakata.array_unique(this._data.search.res.concat(f))):(this._data.search.dom=t(this.element[0].querySelectorAll("#"+t.map(f,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(t.jstree.idregex,"\\$&"):e.replace(t.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=f),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:i,res:this._data.search.res,show_only_matches:r})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=t(this.element[0].querySelectorAll("#"+t.map(this._data.search.res,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(t.jstree.idregex,"\\$&"):e.replace(t.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=t()},this.redraw_node=function(e,i,r,o){if((e=n.redraw_node.apply(this,arguments))&&-1!==t.inArray(e.id,this._data.search.res)){var s,a,l=null;for(s=0,a=e.childNodes.length;s<a;s++)if(e.childNodes[s]&&e.childNodes[s].className&&-1!==e.childNodes[s].className.indexOf("jstree-anchor")){l=e.childNodes[s];break}l&&(l.className+=" jstree-search")}return e}},function(t){t.vakata.search=function(e,i,n){n=n||{},!1!==(n=t.extend({},t.vakata.search.defaults,n)).fuzzy&&(n.fuzzy=!0),e=n.caseSensitive?e:e.toLowerCase();var r,o,s,a,l=n.location,c=n.distance,h=n.threshold,d=e.length;return d>32&&(n.fuzzy=!1),n.fuzzy&&(r=1<<d-1,o=function(){var t={},i=0;for(i=0;i<d;i++)t[e.charAt(i)]=0;for(i=0;i<d;i++)t[e.charAt(i)]|=1<<d-i-1;return t}(),s=function(t,e){var i=t/d,n=Math.abs(l-e);return c?i+n/c:n?1:i}),a=function(t){if(t=n.caseSensitive?t:t.toLowerCase(),e===t||-1!==t.indexOf(e))return{isMatch:!0,score:0};if(!n.fuzzy)return{isMatch:!1,score:1};var i,a,c,u,p,f,m,g,v,y=t.length,b=h,_=t.indexOf(e,l),x=d+y,w=1,k=[];for(-1!==_&&(b=Math.min(s(0,_),b),-1!==(_=t.lastIndexOf(e,l+d))&&(b=Math.min(s(0,_),b))),_=-1,i=0;i<d;i++){for(c=0,u=x;c<u;)s(i,l+u)<=b?c=u:x=u,u=Math.floor((x-c)/2+c);for(x=u,f=Math.max(1,l-u+1),m=Math.min(l+u,y)+d,(g=new Array(m+2))[m+1]=(1<<i)-1,a=m;a>=f;a--)if(v=o[t.charAt(a-1)],g[a]=0===i?(g[a+1]<<1|1)&v:(g[a+1]<<1|1)&v|(p[a+1]|p[a])<<1|1|p[a+1],g[a]&r&&(w=s(i,a-1))<=b){if(b=w,_=a-1,k.push(_),!(_>l))break;f=Math.max(1,2*l-_)}if(s(i+1,l)>b)break;p=g}return{isMatch:_>=0,score:w}},!0===i?{search:a}:a(i)},t.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(t),t.jstree.defaults.sort=function(t,e){return this.get_text(t)>this.get_text(e)?1:-1},t.jstree.plugins.sort=function(e,i){this.bind=function(){i.bind.call(this),this.element.on("model.jstree",t.proxy(function(t,e){this.sort(e.parent,!0)},this)).on("rename_node.jstree create_node.jstree",t.proxy(function(t,e){this.sort(e.parent||e.node.parent,!1),this.redraw_node(e.parent||e.node.parent,!0)},this)).on("move_node.jstree copy_node.jstree",t.proxy(function(t,e){this.sort(e.parent,!1),this.redraw_node(e.parent,!0)},this))},this.sort=function(e,i){var n,r;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(t.proxy(this.settings.sort,this)),i))for(n=0,r=e.children_d.length;n<r;n++)this.sort(e.children_d[n],!1)}};var u=!1;t.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},t.jstree.plugins.state=function(e,i){this.bind=function(){i.bind.call(this);var e=t.proxy(function(){this.element.on(this.settings.state.events,t.proxy(function(){u&&clearTimeout(u),u=setTimeout(t.proxy(function(){this.save_state()},this),100)},this)),this.trigger("state_ready")},this);this.element.on("ready.jstree",t.proxy(function(t,i){this.element.one("restore_state.jstree",e),this.restore_state()||e()},this))},this.save_state=function(){var e=this.get_state();this.settings.state.preserve_loaded||delete e.core.loaded;var i={state:e,ttl:this.settings.state.ttl,sec:+new Date};t.vakata.storage.set(this.settings.state.key,JSON.stringify(i))},this.restore_state=function(){var e=t.vakata.storage.get(this.settings.state.key);if(e)try{e=JSON.parse(e)}catch(t){return!1}return!(e&&e.ttl&&e.sec&&+new Date-e.sec>e.ttl)&&(e&&e.state&&(e=e.state),e&&t.isFunction(this.settings.state.filter)&&(e=this.settings.state.filter.call(this,e)),!!e&&(this.settings.state.preserve_loaded||delete e.core.loaded,this.element.one("set_state.jstree",function(i,n){n.instance.trigger("restore_state",{state:t.extend(!0,{},e)})}),this.set_state(e),!0))},this.clear_state=function(){return t.vakata.storage.del(this.settings.state.key)}},function(t,e){t.vakata.storage={set:function(t,e){return window.localStorage.setItem(t,e)},get:function(t){return window.localStorage.getItem(t)},del:function(t){return window.localStorage.removeItem(t)}}}(t),t.jstree.defaults.types={default:{}},t.jstree.defaults.types[t.jstree.root]={},t.jstree.plugins.types=function(i,n){this.init=function(i,r){var o,s;if(r&&r.types&&r.types.default)for(o in r.types)if("default"!==o&&o!==t.jstree.root&&r.types.hasOwnProperty(o))for(s in r.types.default)r.types.default.hasOwnProperty(s)&&r.types[o][s]===e&&(r.types[o][s]=r.types.default[s]);n.init.call(this,i,r),this._model.data[t.jstree.root].type=t.jstree.root},this.refresh=function(e,i){n.refresh.call(this,e,i),this._model.data[t.jstree.root].type=t.jstree.root},this.bind=function(){this.element.on("model.jstree",t.proxy(function(i,n){var r,o,s,a=this._model.data,l=n.nodes,c=this.settings.types,h="default";for(r=0,o=l.length;r<o;r++){if(h="default",a[l[r]].original&&a[l[r]].original.type&&c[a[l[r]].original.type]&&(h=a[l[r]].original.type),a[l[r]].data&&a[l[r]].data.jstree&&a[l[r]].data.jstree.type&&c[a[l[r]].data.jstree.type]&&(h=a[l[r]].data.jstree.type),a[l[r]].type=h,!0===a[l[r]].icon&&c[h].icon!==e&&(a[l[r]].icon=c[h].icon),c[h].li_attr!==e&&"object"==typeof c[h].li_attr)for(s in c[h].li_attr)if(c[h].li_attr.hasOwnProperty(s)){if("id"===s)continue;a[l[r]].li_attr[s]===e?a[l[r]].li_attr[s]=c[h].li_attr[s]:"class"===s&&(a[l[r]].li_attr.class=c[h].li_attr.class+" "+a[l[r]].li_attr.class)}if(c[h].a_attr!==e&&"object"==typeof c[h].a_attr)for(s in c[h].a_attr)if(c[h].a_attr.hasOwnProperty(s)){if("id"===s)continue;a[l[r]].a_attr[s]===e?a[l[r]].a_attr[s]=c[h].a_attr[s]:"href"===s&&"#"===a[l[r]].a_attr[s]?a[l[r]].a_attr.href=c[h].a_attr.href:"class"===s&&(a[l[r]].a_attr.class=c[h].a_attr.class+" "+a[l[r]].a_attr.class)}}a[t.jstree.root].type=t.jstree.root},this)),n.bind.call(this)},this.get_json=function(e,i,r){var o,s,a=this._model.data,l=i?t.extend(!0,{},i,{no_id:!1}):{},c=n.get_json.call(this,e,l,r);if(!1===c)return!1;if(t.isArray(c))for(o=0,s=c.length;o<s;o++)c[o].type=c[o].id&&a[c[o].id]&&a[c[o].id].type?a[c[o].id].type:"default",i&&i.no_id&&(delete c[o].id,c[o].li_attr&&c[o].li_attr.id&&delete c[o].li_attr.id,c[o].a_attr&&c[o].a_attr.id&&delete c[o].a_attr.id);else c.type=c.id&&a[c.id]&&a[c.id].type?a[c.id].type:"default",i&&i.no_id&&(c=this._delete_ids(c));return c},this._delete_ids=function(e){if(t.isArray(e)){for(var i=0,n=e.length;i<n;i++)e[i]=this._delete_ids(e[i]);return e}return delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id,e.children&&t.isArray(e.children)&&(e.children=this._delete_ids(e.children)),e},this.check=function(i,r,o,s,a){if(!1===n.check.call(this,i,r,o,s,a))return!1;r=r&&r.id?r:this.get_node(r),o=o&&o.id?o:this.get_node(o);var l,c,h,d,u=r&&r.id?a&&a.origin?a.origin:t.jstree.reference(r.id):null;switch(u=u&&u._model&&u._model.data?u._model.data:null,i){case"create_node":case"move_node":case"copy_node":if("move_node"!==i||-1===t.inArray(r.id,o.children)){if((l=this.get_rules(o)).max_children!==e&&-1!==l.max_children&&l.max_children===o.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+i,data:JSON.stringify({chk:i,pos:s,obj:!(!r||!r.id)&&r.id,par:!(!o||!o.id)&&o.id})},!1;if(l.valid_children!==e&&-1!==l.valid_children&&-1===t.inArray(r.type||"default",l.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+i,data:JSON.stringify({chk:i,pos:s,obj:!(!r||!r.id)&&r.id,par:!(!o||!o.id)&&o.id})},!1;if(u&&r.children_d&&r.parents){for(c=0,h=0,d=r.children_d.length;h<d;h++)c=Math.max(c,u[r.children_d[h]].parents.length);c=c-r.parents.length+1}(c<=0||c===e)&&(c=1);do{if(l.max_depth!==e&&-1!==l.max_depth&&l.max_depth<c)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+i,data:JSON.stringify({chk:i,pos:s,obj:!(!r||!r.id)&&r.id,par:!(!o||!o.id)&&o.id})},!1;o=this.get_node(o.parent),l=this.get_rules(o),c++}while(o)}}return!0},this.get_rules=function(t){if(!(t=this.get_node(t)))return!1;var i=this.get_type(t,!0);return i.max_depth===e&&(i.max_depth=-1),i.max_children===e&&(i.max_children=-1),i.valid_children===e&&(i.valid_children=-1),i},this.get_type=function(e,i){return!!(e=this.get_node(e))&&(i?t.extend({type:e.type},this.settings.types[e.type]):e.type)},this.set_type=function(i,n){var r,o,s,a,l,c,h,d,u=this._model.data;if(t.isArray(i)){for(o=0,s=(i=i.slice()).length;o<s;o++)this.set_type(i[o],n);return!0}if(r=this.settings.types,i=this.get_node(i),!r[n]||!i)return!1;if((h=this.get_node(i,!0))&&h.length&&(d=h.children(".jstree-anchor")),a=i.type,l=this.get_icon(i),i.type=n,(!0===l||!r[a]||r[a].icon!==e&&l===r[a].icon)&&this.set_icon(i,r[n].icon===e||r[n].icon),r[a]&&r[a].li_attr!==e&&"object"==typeof r[a].li_attr)for(c in r[a].li_attr)if(r[a].li_attr.hasOwnProperty(c)){if("id"===c)continue;"class"===c?(u[i.id].li_attr.class=(u[i.id].li_attr.class||"").replace(r[a].li_attr[c],""),h&&h.removeClass(r[a].li_attr[c])):u[i.id].li_attr[c]===r[a].li_attr[c]&&(u[i.id].li_attr[c]=null,h&&h.removeAttr(c))}if(r[a]&&r[a].a_attr!==e&&"object"==typeof r[a].a_attr)for(c in r[a].a_attr)if(r[a].a_attr.hasOwnProperty(c)){if("id"===c)continue;"class"===c?(u[i.id].a_attr.class=(u[i.id].a_attr.class||"").replace(r[a].a_attr[c],""),d&&d.removeClass(r[a].a_attr[c])):u[i.id].a_attr[c]===r[a].a_attr[c]&&("href"===c?(u[i.id].a_attr[c]="#",d&&d.attr("href","#")):(delete u[i.id].a_attr[c],d&&d.removeAttr(c)))}if(r[n].li_attr!==e&&"object"==typeof r[n].li_attr)for(c in r[n].li_attr)if(r[n].li_attr.hasOwnProperty(c)){if("id"===c)continue;u[i.id].li_attr[c]===e?(u[i.id].li_attr[c]=r[n].li_attr[c],h&&("class"===c?h.addClass(r[n].li_attr[c]):h.attr(c,r[n].li_attr[c]))):"class"===c&&(u[i.id].li_attr.class=r[n].li_attr[c]+" "+u[i.id].li_attr.class,h&&h.addClass(r[n].li_attr[c]))}if(r[n].a_attr!==e&&"object"==typeof r[n].a_attr)for(c in r[n].a_attr)if(r[n].a_attr.hasOwnProperty(c)){if("id"===c)continue;u[i.id].a_attr[c]===e?(u[i.id].a_attr[c]=r[n].a_attr[c],d&&("class"===c?d.addClass(r[n].a_attr[c]):d.attr(c,r[n].a_attr[c]))):"href"===c&&"#"===u[i.id].a_attr[c]?(u[i.id].a_attr.href=r[n].a_attr.href,d&&d.attr("href",r[n].a_attr.href)):"class"===c&&(u[i.id].a_attr.class=r[n].a_attr.class+" "+u[i.id].a_attr.class,d&&d.addClass(r[n].a_attr[c]))}return!0}},t.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(t,e){return t+" ("+e+")"}},t.jstree.plugins.unique=function(i,n){this.check=function(e,i,r,o,s){if(!1===n.check.call(this,e,i,r,o,s))return!1;if(i=i&&i.id?i:this.get_node(i),!(r=r&&r.id?r:this.get_node(r))||!r.children)return!0;var a,l,c,h="rename_node"===e?o:i.text,d=[],u=this.settings.unique.case_sensitive,p=this.settings.unique.trim_whitespace,f=this._model.data;for(a=0,l=r.children.length;a<l;a++)c=f[r.children[a]].text,u||(c=c.toLowerCase()),p&&(c=c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),d.push(c);switch(u||(h=h.toLowerCase()),p&&(h=h.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),e){case"delete_node":return!0;case"rename_node":return c=i.text||"",u||(c=c.toLowerCase()),p&&(c=c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),(a=-1===t.inArray(h,d)||i.text&&c===h)||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+h+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a;case"create_node":return(a=-1===t.inArray(h,d))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+h+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a;case"copy_node":return(a=-1===t.inArray(h,d))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+h+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a;case"move_node":return(a=i.parent===r.id&&(!s||!s.is_multi)||-1===t.inArray(h,d))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+h+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:o,obj:!(!i||!i.id)&&i.id,par:!(!r||!r.id)&&r.id})}),a}return!0},this.create_node=function(i,r,o,s,a){if(!r||r.text===e){if(null===i&&(i=t.jstree.root),!(i=this.get_node(i)))return n.create_node.call(this,i,r,o,s,a);if(!(o=o===e?"last":o).toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(i))return n.create_node.call(this,i,r,o,s,a);r||(r={});var l,c,h,d,u,p,f=this._model.data,m=this.settings.unique.case_sensitive,g=this.settings.unique.trim_whitespace,v=this.settings.unique.duplicate;for(c=l=this.get_string("New node"),h=[],d=0,u=i.children.length;d<u;d++)p=f[i.children[d]].text,m||(p=p.toLowerCase()),g&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),h.push(p);for(d=1,p=c,m||(p=p.toLowerCase()),g&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));-1!==t.inArray(p,h);)p=c=v.call(this,l,++d).toString(),m||(p=p.toLowerCase()),g&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));r.text=c}return n.create_node.call(this,i,r,o,s,a)}};var p=l.createElement("DIV");if(p.setAttribute("unselectable","on"),p.setAttribute("role","presentation"),p.className="jstree-wholerow",p.innerHTML=" ",t.jstree.plugins.wholerow=function(e,i){this.bind=function(){i.bind.call(this),this.element.on("ready.jstree set_state.jstree",t.proxy(function(){this.hide_dots()},this)).on("init.jstree loading.jstree ready.jstree",t.proxy(function(){this.get_container_ul().addClass("jstree-wholerow-ul")},this)).on("deselect_all.jstree",t.proxy(function(t,e){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")},this)).on("changed.jstree",t.proxy(function(t,e){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var i,n,r=!1;for(i=0,n=e.selected.length;i<n;i++)(r=this.get_node(e.selected[i],!0))&&r.length&&r.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("open_node.jstree",t.proxy(function(t,e){this.get_node(e.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")},this)).on("hover_node.jstree dehover_node.jstree",t.proxy(function(t,e){"hover_node"===t.type&&this.is_disabled(e.node)||this.get_node(e.node,!0).children(".jstree-wholerow")["hover_node"===t.type?"addClass":"removeClass"]("jstree-wholerow-hovered")},this)).on("contextmenu.jstree",".jstree-wholerow",t.proxy(function(e){if(this._data.contextmenu){e.preventDefault();var i=t.Event("contextmenu",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,pageX:e.pageX,pageY:e.pageY});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i)}},this)).on("click.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var i=t.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()}).on("dblclick.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var i=t.Event("dblclick",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()}).on("click.jstree",".jstree-leaf > .jstree-ocl",t.proxy(function(e){e.stopImmediatePropagation();var i=t.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});t(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(i).focus()},this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",t.proxy(function(t){return t.stopImmediatePropagation(),this.is_disabled(t.currentTarget)||this.hover_node(t.currentTarget),!1},this)).on("mouseleave.jstree",".jstree-node",t.proxy(function(t){this.dehover_node(t.currentTarget)},this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),i.teardown.call(this)},this.redraw_node=function(e,n,r,o){if(e=i.redraw_node.apply(this,arguments)){var s=p.cloneNode(!0);-1!==t.inArray(e.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(s.className+=" jstree-wholerow-hovered"),e.insertBefore(s,e.childNodes[0])}return e}},l.registerElement&&Object&&Object.create){var f=Object.create(HTMLElement.prototype);f.createdCallback=function(){var e,i={core:{},plugins:[]};for(e in t.jstree.plugins)t.jstree.plugins.hasOwnProperty(e)&&this.attributes[e]&&(i.plugins.push(e),this.getAttribute(e)&&JSON.parse(this.getAttribute(e))&&(i[e]=JSON.parse(this.getAttribute(e))));for(e in t.jstree.defaults.core)t.jstree.defaults.core.hasOwnProperty(e)&&this.attributes[e]&&(i.core[e]=JSON.parse(this.getAttribute(e))||this.getAttribute(e));t(this).jstree(i)};try{l.registerElement("vakata-jstree",{prototype:f})}catch(t){}}}}),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Raphael=e():t.Raphael=e()}(this,function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}return i.m=t,i.c=e,i.p="",i(0)}([function(t,e,i){var n,r;n=[i(1),i(3),i(4)],void 0===(r=function(t){return t}.apply(e,n))||(t.exports=r)},function(t,e,i){var n,r;n=[i(2)],void 0===(r=function(t){function e(n){if(e.is(n,"function"))return i?n():t.on("raphael.DOMload",n);if(e.is(n,A))return e._engine.create[d](e,n.splice(0,3+e.is(n[0],T))).add(n);var r=Array.prototype.slice.call(arguments,0);if(e.is(r[r.length-1],"function")){var o=r.pop();return i?o.call(e._engine.create[d](e,r)):t.on("raphael.DOMload",function(){o.call(e._engine.create[d](e,r))})}return e._engine.create[d](e,arguments)}e.version="2.2.0",e.eve=t;var i,n,r=/[, ]+/,o={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},s=/\{(\d+)\}/g,a="hasOwnProperty",l={doc:document,win:window},c={was:Object.prototype[a].call(l.win,"Raphael"),is:l.win.Raphael},h=function(){this.ca=this.customAttributes={}},d="apply",u="concat",p="ontouchstart"in l.win||l.win.DocumentTouch&&l.doc instanceof DocumentTouch,f="",m=" ",g=String,v="split",y="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[v](m),b={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},_=g.prototype.toLowerCase,x=Math,w=x.max,k=x.min,C=x.abs,S=x.pow,D=x.PI,T="number",A="array",M=Object.prototype.toString,E=(e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),P={NaN:1,Infinity:1,"-Infinity":1},I=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,O=x.round,N=parseFloat,L=parseInt,j=g.prototype.toUpperCase,F=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},$=e._availableAnimAttrs={blur:T,"clip-rect":"csv",cx:T,cy:T,fill:"colour","fill-opacity":T,"font-size":T,height:T,opacity:T,path:"path",r:T,rx:T,ry:T,stroke:"colour","stroke-opacity":T,"stroke-width":T,transform:"transform",width:T,x:T,y:T},R=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,H={hs:1,rg:1},z=/,?([achlmqrstvxz]),?/gi,B=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,U=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,W=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,Y=(e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),V=function(t,e){return N(t)-N(e)},q=function(t){return t},G=e._rectPath=function(t,e,i,n,r){return r?[["M",t+r,e],["l",i-2*r,0],["a",r,r,0,0,1,r,r],["l",0,n-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-i,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-n],["a",r,r,0,0,1,r,-r],["z"]]:[["M",t,e],["l",i,0],["l",0,n],["l",-i,0],["z"]]},K=function(t,e,i,n){return null==n&&(n=i),[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]]},X=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return K(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return K(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return G(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return G(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return G(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return G(e.x,e.y,e.width,e.height)}},Z=e.mapPath=function(t,e){if(!e)return t;var i,n,r,o,s,a,l;for(r=0,s=(t=Tt(t)).length;r<s;r++)for(o=1,a=(l=t[r]).length;o<a;o+=2)i=e.x(l[o],l[o+1]),n=e.y(l[o],l[o+1]),l[o]=i,l[o+1]=n;return t};if(e._g=l,e.type=l.win.SVGAngle||l.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var Q,J=l.doc.createElement("div");if(J.innerHTML='<v:shape adj="1"/>',(Q=J.firstChild).style.behavior="url(#default#VML)",!Q||"object"!=typeof Q.adj)return e.type=f;J=null}function tt(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var i in t)t[a](i)&&(e[i]=tt(t[i]));return e}e.svg=!(e.vml="VML"==e.type),e._Paper=h,e.fn=n=h.prototype=e.prototype,e._id=0,e.is=function(t,e){return"finite"==(e=_.call(e))?!P[a](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||M.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,i,n,r,o,s){if(null==o){var a=t-n,l=i-r;return a||l?(180+180*x.atan2(-l,-a)/D+360)%360:0}return e.angle(t,i,o,s)-e.angle(n,r,o,s)},e.rad=function(t){return t%360*D/180},e.deg=function(t){return Math.round(180*t/D%360*1e3)/1e3},e.snapTo=function(t,i,n){if(n=e.is(n,"finite")?n:10,e.is(t,A)){for(var r=t.length;r--;)if(C(t[r]-i)<=n)return t[r]}else{var o=i%(t=+t);if(o<n)return i-o;if(o>t-n)return i-o+t}return i};var et,it;e.createUUID=(et=/[xy]/g,it=function(t){var e=16*x.random()|0;return("x"==t?e:3&e|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(et,it).toUpperCase()});e.setWindow=function(i){t("raphael.setWindow",e,l.win,i),l.win=i,l.doc=l.win.document,e._engine.initWin&&e._engine.initWin(l.win)};var nt=function(t){if(e.vml){var i,n=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write("<body>"),r.close(),i=r.body}catch(t){i=createPopup().document.body}var o=i.createTextRange();nt=ct(function(t){try{i.style.color=g(t).replace(n,f);var e=o.queryCommandValue("ForeColor");return"#"+("000000"+(e=(255&e)<<16|65280&e|(16711680&e)>>>16).toString(16)).slice(-6)}catch(t){return"none"}})}else{var s=l.doc.createElement("i");s.title="Raphaël Colour Picker",s.style.display="none",l.doc.body.appendChild(s),nt=ct(function(t){return s.style.color=t,l.doc.defaultView.getComputedStyle(s,f).getPropertyValue("color")})}return nt(t)},rt=function(){return"hsb("+[this.h,this.s,this.b]+")"},ot=function(){return"hsl("+[this.h,this.s,this.l]+")"},st=function(){return this.hex},at=function(t,i,n){if(null==i&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,i=t.g,t=t.r),null==i&&e.is(t,"string")){var r=e.getRGB(t);t=r.r,i=r.g,n=r.b}return(t>1||i>1||n>1)&&(t/=255,i/=255,n/=255),[t,i,n]},lt=function(t,i,n,r){var o={r:t*=255,g:i*=255,b:n*=255,hex:e.rgb(t,i,n),toString:st};return e.is(r,"finite")&&(o.opacity=r),o};function ct(t,e,i){return function n(){var r=Array.prototype.slice.call(arguments,0),o=r.join("␀"),s=n.cache=n.cache||{},l=n.count=n.count||[];return s[a](o)?(function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return t.push(t.splice(i,1)[0])}(l,o),i?i(s[o]):s[o]):(l.length>=1e3&&delete s[l.shift()],l.push(o),s[o]=t[d](e,r),i?i(s[o]):s[o])}}e.color=function(t){var i;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(i=e.hsb2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(i=e.hsl2rgb(t),t.r=i.r,t.g=i.g,t.b=i.b,t.hex=i.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(i=e.rgb2hsl(t),t.h=i.h,t.s=i.s,t.l=i.l,i=e.rgb2hsb(t),t.v=i.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=st,t},e.hsb2rgb=function(t,e,i,n){var r,o,s,a,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(i=t.b,e=t.s,n=t.o,t=t.h),a=(l=i*e)*(1-C((t=(t*=360)%360/60)%2-1)),r=o=s=i-l,lt(r+=[l,a,0,0,a,l][t=~~t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],n)},e.hsl2rgb=function(t,e,i,n){var r,o,s,a,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(i=t.l,e=t.s,t=t.h),(t>1||e>1||i>1)&&(t/=360,e/=100,i/=100),t=(t*=360)%360/60,a=(l=2*e*(i<.5?i:1-i))*(1-C(t%2-1)),r=o=s=i-l/2,lt(r+=[l,a,0,0,a,l][t=~~t],o+=[a,l,l,a,0,0][t],s+=[0,0,a,l,l,a][t],n)},e.rgb2hsb=function(t,e,i){var n,r;return t=(i=at(t,e,i))[0],e=i[1],i=i[2],{h:((0==(r=(n=w(t,e,i))-k(t,e,i))?null:n==t?(e-i)/r:n==e?(i-t)/r+2:(t-e)/r+4)+360)%6*60/360,s:0==r?0:r/n,b:n,toString:rt}},e.rgb2hsl=function(t,e,i){var n,r,o,s;return t=(i=at(t,e,i))[0],e=i[1],i=i[2],n=((r=w(t,e,i))+(o=k(t,e,i)))/2,{h:((0==(s=r-o)?null:r==t?(e-i)/s:r==e?(i-t)/s+2:(t-e)/s+4)+360)%6*60/360,s:0==s?0:n<.5?s/(2*n):s/(2-2*n),l:n,toString:ot}},e._path2string=function(){return this.join(",").replace(z,"$1")};e._preload=function(t,e){var i=l.doc.createElement("img");i.style.cssText="position:absolute;left:-9999em;top:-9999em",i.onload=function(){e.call(this),this.onload=null,l.doc.body.removeChild(this)},i.onerror=function(){l.doc.body.removeChild(this)},l.doc.body.appendChild(i),i.src=t};function ht(){return this.hex}function dt(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var o=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?o[3]={x:+t[0],y:+t[1]}:r-2==n&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?o[3]=o[2]:n||(o[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i}e.getRGB=ct(function(t){if(!t||(t=g(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ht};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:ht};!H[a](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=nt(t));var i,n,r,o,s,l,c=t.match(E);return c?(c[2]&&(r=L(c[2].substring(5),16),n=L(c[2].substring(3,5),16),i=L(c[2].substring(1,3),16)),c[3]&&(r=L((s=c[3].charAt(3))+s,16),n=L((s=c[3].charAt(2))+s,16),i=L((s=c[3].charAt(1))+s,16)),c[4]&&(l=c[4][v](R),i=N(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=N(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=N(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(o=N(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100)),c[5]?(l=c[5][v](R),i=N(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=N(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=N(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(i/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(o=N(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100),e.hsb2rgb(i,n,r,o)):c[6]?(l=c[6][v](R),i=N(l[0]),"%"==l[0].slice(-1)&&(i*=2.55),n=N(l[1]),"%"==l[1].slice(-1)&&(n*=2.55),r=N(l[2]),"%"==l[2].slice(-1)&&(r*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(i/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(o=N(l[3])),l[3]&&"%"==l[3].slice(-1)&&(o/=100),e.hsl2rgb(i,n,r,o)):((c={r:i,g:n,b:r,toString:ht}).hex="#"+(16777216|r|n<<8|i<<16).toString(16).slice(1),e.is(o,"finite")&&(c.opacity=o),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ht}},e),e.hsb=ct(function(t,i,n){return e.hsb2rgb(t,i,n).hex}),e.hsl=ct(function(t,i,n){return e.hsl2rgb(t,i,n).hex}),e.rgb=ct(function(t,e,i){function n(t){return t+.5|0}return"#"+(16777216|n(i)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},i=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),i.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var i=ut(t);if(i.arr)return bt(i.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},r=[];return e.is(t,A)&&e.is(t[0],A)&&(r=bt(t)),r.length||g(t).replace(B,function(t,e,i){var o=[],s=e.toLowerCase();if(i.replace(W,function(t,e){e&&o.push(+e)}),"m"==s&&o.length>2&&(r.push([e][u](o.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)r.push([e][u](o));else for(;o.length>=n[s]&&(r.push([e][u](o.splice(0,n[s]))),n[s]););}),r.toString=e._path2string,i.arr=bt(r),r},e.parseTransformString=ct(function(t){if(!t)return null;var i=[];return e.is(t,A)&&e.is(t[0],A)&&(i=bt(t)),i.length||g(t).replace(U,function(t,e,n){var r=[];_.call(e);n.replace(W,function(t,e){e&&r.push(+e)}),i.push([e][u](r))}),i.toString=e._path2string,i});var ut=function(t){var e=ut.ps=ut.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var i in e)e[a](i)&&i!=t&&(e[i].sleep--,!e[i].sleep&&delete e[i])}),e[t]};function pt(t,e,i,n,r){return t*(t*(-3*e+9*i-9*n+3*r)+6*e-12*i+6*n)-3*e+3*i}function ft(t,e,i,n,r,o,s,a,l){null==l&&(l=1);for(var c=(l=l>1?1:l<0?0:l)/2,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],u=0,p=0;p<12;p++){var f=c*h[p]+c,m=pt(f,t,i,r,s),g=pt(f,e,n,o,a),v=m*m+g*g;u+=d[p]*x.sqrt(v)}return c*u}function mt(t,e,i,n,r,o,s,a){if(!(w(t,i)<k(r,s)||k(t,i)>w(r,s)||w(e,n)<k(o,a)||k(e,n)>w(o,a))){var l=(t-i)*(o-a)-(e-n)*(r-s);if(l){var c=((t*n-e*i)*(r-s)-(t-i)*(r*a-o*s))/l,h=((t*n-e*i)*(o-a)-(e-n)*(r*a-o*s))/l,d=+c.toFixed(2),u=+h.toFixed(2);if(!(d<+k(t,i).toFixed(2)||d>+w(t,i).toFixed(2)||d<+k(r,s).toFixed(2)||d>+w(r,s).toFixed(2)||u<+k(e,n).toFixed(2)||u>+w(e,n).toFixed(2)||u<+k(o,a).toFixed(2)||u>+w(o,a).toFixed(2)))return{x:c,y:h}}}}function gt(t,i,n){var r=e.bezierBBox(t),o=e.bezierBBox(i);if(!e.isBBoxIntersect(r,o))return n?0:[];for(var s=ft.apply(0,t),a=ft.apply(0,i),l=w(~~(s/5),1),c=w(~~(a/5),1),h=[],d=[],u={},p=n?0:[],f=0;f<l+1;f++){var m=e.findDotsAtSegment.apply(e,t.concat(f/l));h.push({x:m.x,y:m.y,t:f/l})}for(f=0;f<c+1;f++)m=e.findDotsAtSegment.apply(e,i.concat(f/c)),d.push({x:m.x,y:m.y,t:f/c});for(f=0;f<l;f++)for(var g=0;g<c;g++){var v=h[f],y=h[f+1],b=d[g],_=d[g+1],x=C(y.x-v.x)<.001?"y":"x",S=C(_.x-b.x)<.001?"y":"x",D=mt(v.x,v.y,y.x,y.y,b.x,b.y,_.x,_.y);if(D){if(u[D.x.toFixed(4)]==D.y.toFixed(4))continue;u[D.x.toFixed(4)]=D.y.toFixed(4);var T=v.t+C((D[x]-v[x])/(y[x]-v[x]))*(y.t-v.t),A=b.t+C((D[S]-b[S])/(_[S]-b[S]))*(_.t-b.t);T>=0&&T<=1.001&&A>=0&&A<=1.001&&(n?p++:p.push({x:D.x,y:D.y,t1:k(T,1),t2:k(A,1)}))}}return p}function vt(t,i,n){t=e._path2curve(t),i=e._path2curve(i);for(var r,o,s,a,l,c,h,d,u,p,f=n?0:[],m=0,g=t.length;m<g;m++){var v=t[m];if("M"==v[0])r=l=v[1],o=c=v[2];else{"C"==v[0]?(r=(u=[r,o].concat(v.slice(1)))[6],o=u[7]):(u=[r,o,r,o,l,c,l,c],r=l,o=c);for(var y=0,b=i.length;y<b;y++){var _=i[y];if("M"==_[0])s=h=_[1],a=d=_[2];else{"C"==_[0]?(s=(p=[s,a].concat(_.slice(1)))[6],a=p[7]):(p=[s,a,s,a,h,d,h,d],s=h,a=d);var x=gt(u,p,n);if(n)f+=x;else{for(var w=0,k=x.length;w<k;w++)x[w].segment1=m,x[w].segment2=y,x[w].bez1=u,x[w].bez2=p;f=f.concat(x)}}}}}return f}e.findDotsAtSegment=function(t,e,i,n,r,o,s,a,l){var c=1-l,h=S(c,3),d=S(c,2),u=l*l,p=u*l,f=h*t+3*d*l*i+3*c*l*l*r+p*s,m=h*e+3*d*l*n+3*c*l*l*o+p*a,g=t+2*l*(i-t)+u*(r-2*i+t),v=e+2*l*(n-e)+u*(o-2*n+e),y=i+2*l*(r-i)+u*(s-2*r+i),b=n+2*l*(o-n)+u*(a-2*o+n),_=c*t+l*i,w=c*e+l*n,k=c*r+l*s,C=c*o+l*a,T=90-180*x.atan2(g-y,v-b)/D;return(g>y||v<b)&&(T+=180),{x:f,y:m,m:{x:g,y:v},n:{x:y,y:b},start:{x:_,y:w},end:{x:k,y:C},alpha:T}},e.bezierBBox=function(t,i,n,r,o,s,a,l){e.is(t,"array")||(t=[t,i,n,r,o,s,a,l]);var c=Dt.apply(null,t);return{x:c.min.x,y:c.min.y,x2:c.max.x,y2:c.max.y,width:c.max.x-c.min.x,height:c.max.y-c.min.y}},e.isPointInsideBBox=function(t,e,i){return e>=t.x&&e<=t.x2&&i>=t.y&&i<=t.y2},e.isBBoxIntersect=function(t,i){var n=e.isPointInsideBBox;return n(i,t.x,t.y)||n(i,t.x2,t.y)||n(i,t.x,t.y2)||n(i,t.x2,t.y2)||n(t,i.x,i.y)||n(t,i.x2,i.y)||n(t,i.x,i.y2)||n(t,i.x2,i.y2)||(t.x<i.x2&&t.x>i.x||i.x<t.x2&&i.x>t.x)&&(t.y<i.y2&&t.y>i.y||i.y<t.y2&&i.y>t.y)},e.pathIntersection=function(t,e){return vt(t,e)},e.pathIntersectionNumber=function(t,e){return vt(t,e,1)},e.isPointInsidePath=function(t,i,n){var r=e.pathBBox(t);return e.isPointInsideBBox(r,i,n)&&vt(t,[["M",i,n],["H",r.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var yt=e.pathBBox=function(t){var e=ut(t);if(e.bbox)return tt(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var i,n=0,r=0,o=[],s=[],a=0,l=(t=Tt(t)).length;a<l;a++)if("M"==(i=t[a])[0])n=i[1],r=i[2],o.push(n),s.push(r);else{var c=Dt(n,r,i[1],i[2],i[3],i[4],i[5],i[6]);o=o[u](c.min.x,c.max.x),s=s[u](c.min.y,c.max.y),n=i[5],r=i[6]}var h=k[d](0,o),p=k[d](0,s),f=w[d](0,o),m=w[d](0,s),g=f-h,v=m-p,y={x:h,y:p,x2:f,y2:m,width:g,height:v,cx:h+g/2,cy:p+v/2};return e.bbox=tt(y),y},bt=function(t){var i=tt(t);return i.toString=e._path2string,i},_t=e._pathToRelative=function(t){var i=ut(t);if(i.rel)return bt(i.rel);e.is(t,A)&&e.is(t&&t[0],A)||(t=e.parsePathString(t));var n=[],r=0,o=0,s=0,a=0,l=0;"M"==t[0][0]&&(s=r=t[0][1],a=o=t[0][2],l++,n.push(["M",r,o]));for(var c=l,h=t.length;c<h;c++){var d=n[c]=[],u=t[c];if(u[0]!=_.call(u[0]))switch(d[0]=_.call(u[0]),d[0]){case"a":d[1]=u[1],d[2]=u[2],d[3]=u[3],d[4]=u[4],d[5]=u[5],d[6]=+(u[6]-r).toFixed(3),d[7]=+(u[7]-o).toFixed(3);break;case"v":d[1]=+(u[1]-o).toFixed(3);break;case"m":s=u[1],a=u[2];default:for(var p=1,f=u.length;p<f;p++)d[p]=+(u[p]-(p%2?r:o)).toFixed(3)}else{d=n[c]=[],"m"==u[0]&&(s=u[1]+r,a=u[2]+o);for(var m=0,g=u.length;m<g;m++)n[c][m]=u[m]}var v=n[c].length;switch(n[c][0]){case"z":r=s,o=a;break;case"h":r+=+n[c][v-1];break;case"v":o+=+n[c][v-1];break;default:r+=+n[c][v-2],o+=+n[c][v-1]}}return n.toString=e._path2string,i.rel=bt(n),n},xt=e._pathToAbsolute=function(t){var i=ut(t);if(i.abs)return bt(i.abs);if(e.is(t,A)&&e.is(t&&t[0],A)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var n=[],r=0,o=0,s=0,a=0,l=0;"M"==t[0][0]&&(s=r=+t[0][1],a=o=+t[0][2],l++,n[0]=["M",r,o]);for(var c,h,d=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),p=l,f=t.length;p<f;p++){if(n.push(c=[]),(h=t[p])[0]!=j.call(h[0]))switch(c[0]=j.call(h[0]),c[0]){case"A":c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=+(h[6]+r),c[7]=+(h[7]+o);break;case"V":c[1]=+h[1]+o;break;case"H":c[1]=+h[1]+r;break;case"R":for(var m=[r,o][u](h.slice(1)),g=2,v=m.length;g<v;g++)m[g]=+m[g]+r,m[++g]=+m[g]+o;n.pop(),n=n[u](dt(m,d));break;case"M":s=+h[1]+r,a=+h[2]+o;default:for(g=1,v=h.length;g<v;g++)c[g]=+h[g]+(g%2?r:o)}else if("R"==h[0])m=[r,o][u](h.slice(1)),n.pop(),n=n[u](dt(m,d)),c=["R"][u](h.slice(-2));else for(var y=0,b=h.length;y<b;y++)c[y]=h[y];switch(c[0]){case"Z":r=s,o=a;break;case"H":r=c[1];break;case"V":o=c[1];break;case"M":s=c[c.length-2],a=c[c.length-1];default:r=c[c.length-2],o=c[c.length-1]}}return n.toString=e._path2string,i.abs=bt(n),n},wt=function(t,e,i,n){return[t,e,i,n,i,n]},kt=function(t,e,i,n,r,o){return[1/3*t+2/3*i,1/3*e+2/3*n,1/3*r+2/3*i,1/3*o+2/3*n,r,o]},Ct=function(t,e,i,n,r,o,s,a,l,c){var h,d=120*D/180,p=D/180*(+r||0),f=[],m=ct(function(t,e,i){return{x:t*x.cos(i)-e*x.sin(i),y:t*x.sin(i)+e*x.cos(i)}});if(c)A=c[0],M=c[1],S=c[2],T=c[3];else{t=(h=m(t,e,-p)).x,e=h.y,a=(h=m(a,l,-p)).x,l=h.y;x.cos(D/180*r),x.sin(D/180*r);var g=(t-a)/2,y=(e-l)/2,b=g*g/(i*i)+y*y/(n*n);b>1&&(i*=b=x.sqrt(b),n*=b);var _=i*i,w=n*n,k=(o==s?-1:1)*x.sqrt(C((_*w-_*y*y-w*g*g)/(_*y*y+w*g*g))),S=k*i*y/n+(t+a)/2,T=k*-n*g/i+(e+l)/2,A=x.asin(((e-T)/n).toFixed(9)),M=x.asin(((l-T)/n).toFixed(9));A=t<S?D-A:A,M=a<S?D-M:M,A<0&&(A=2*D+A),M<0&&(M=2*D+M),s&&A>M&&(A-=2*D),!s&&M>A&&(M-=2*D)}var E=M-A;if(C(E)>d){var P=M,I=a,O=l;M=A+d*(s&&M>A?1:-1),a=S+i*x.cos(M),l=T+n*x.sin(M),f=Ct(a,l,i,n,r,0,s,I,O,[M,P,S,T])}E=M-A;var N=x.cos(A),L=x.sin(A),j=x.cos(M),F=x.sin(M),$=x.tan(E/4),R=4/3*i*$,H=4/3*n*$,z=[t,e],B=[t+R*L,e-H*N],U=[a+R*F,l-H*j],W=[a,l];if(B[0]=2*z[0]-B[0],B[1]=2*z[1]-B[1],c)return[B,U,W][u](f);for(var Y=[],V=0,q=(f=[B,U,W][u](f).join()[v](",")).length;V<q;V++)Y[V]=V%2?m(f[V-1],f[V],p).y:m(f[V],f[V+1],p).x;return Y},St=function(t,e,i,n,r,o,s,a,l){var c=1-l;return{x:S(c,3)*t+3*S(c,2)*l*i+3*c*l*l*r+S(l,3)*s,y:S(c,3)*e+3*S(c,2)*l*n+3*c*l*l*o+S(l,3)*a}},Dt=ct(function(t,e,i,n,r,o,s,a){var l,c=r-2*i+t-(s-2*r+i),h=2*(i-t)-2*(r-i),u=t-i,p=(-h+x.sqrt(h*h-4*c*u))/2/c,f=(-h-x.sqrt(h*h-4*c*u))/2/c,m=[e,a],g=[t,s];return C(p)>"1e12"&&(p=.5),C(f)>"1e12"&&(f=.5),p>0&&p<1&&(l=St(t,e,i,n,r,o,s,a,p),g.push(l.x),m.push(l.y)),f>0&&f<1&&(l=St(t,e,i,n,r,o,s,a,f),g.push(l.x),m.push(l.y)),c=o-2*n+e-(a-2*o+n),u=e-n,p=(-(h=2*(n-e)-2*(o-n))+x.sqrt(h*h-4*c*u))/2/c,f=(-h-x.sqrt(h*h-4*c*u))/2/c,C(p)>"1e12"&&(p=.5),C(f)>"1e12"&&(f=.5),p>0&&p<1&&(l=St(t,e,i,n,r,o,s,a,p),g.push(l.x),m.push(l.y)),f>0&&f<1&&(l=St(t,e,i,n,r,o,s,a,f),g.push(l.x),m.push(l.y)),{min:{x:k[d](0,g),y:k[d](0,m)},max:{x:w[d](0,g),y:w[d](0,m)}}}),Tt=e._path2curve=ct(function(t,e){var i=!e&&ut(t);if(!e&&i.curve)return bt(i.curve);for(var n=xt(t),r=e&&xt(e),o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=function(t,e,i){var n,r;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][u](Ct[d](0,[e.x,e.y][u](t.slice(1))));break;case"S":"C"==i||"S"==i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r][u](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][u](kt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][u](kt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][u](wt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][u](wt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][u](wt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][u](wt(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(t[e].length>7){t[e].shift();for(var i=t[e];i.length;)h[e]="A",r&&(p[e]="A"),t.splice(e++,0,["C"][u](i.splice(0,6)));t.splice(e,1),v=w(n.length,r&&r.length||0)}},c=function(t,e,i,o,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),i.bx=0,i.by=0,i.x=t[s][1],i.y=t[s][2],v=w(n.length,r&&r.length||0))},h=[],p=[],f="",m="",g=0,v=w(n.length,r&&r.length||0);g<v;g++){n[g]&&(f=n[g][0]),"C"!=f&&(h[g]=f,g&&(m=h[g-1])),n[g]=a(n[g],o,m),"A"!=h[g]&&"C"==f&&(h[g]="C"),l(n,g),r&&(r[g]&&(f=r[g][0]),"C"!=f&&(p[g]=f,g&&(m=p[g-1])),r[g]=a(r[g],s,m),"A"!=p[g]&&"C"==f&&(p[g]="C"),l(r,g)),c(n,r,o,s,g),c(r,n,s,o,g);var y=n[g],b=r&&r[g],_=y.length,x=r&&b.length;o.x=y[_-2],o.y=y[_-1],o.bx=N(y[_-4])||o.x,o.by=N(y[_-3])||o.y,s.bx=r&&(N(b[x-4])||s.x),s.by=r&&(N(b[x-3])||s.y),s.x=r&&b[x-2],s.y=r&&b[x-1]}return r||(i.curve=bt(n)),r?[n,r]:n},null,bt),At=(e._parseDots=ct(function(t){for(var i=[],n=0,r=t.length;n<r;n++){var o={},s=t[n].match(/^([^:]*):?([\d\.]*)/);if(o.color=e.getRGB(s[1]),o.color.error)return null;o.opacity=o.color.opacity,o.color=o.color.hex,s[2]&&(o.offset=s[2]+"%"),i.push(o)}for(n=1,r=i.length-1;n<r;n++)if(!i[n].offset){for(var a=N(i[n-1].offset||0),l=0,c=n+1;c<r;c++)if(i[c].offset){l=i[c].offset;break}l||(l=100,c=r);for(var h=((l=N(l))-a)/(c-n+1);n<c;n++)a+=h,i[n].offset=a+"%"}return i}),e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Mt=(e._tofront=function(t,e){e.top!==t&&(At(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},e._toback=function(t,e){e.bottom!==t&&(At(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},e._insertafter=function(t,e,i){At(t,i),e==i.top&&(i.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},e._insertbefore=function(t,e,i){At(t,i),e==i.bottom&&(i.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},e.toMatrix=function(t,e){var i=yt(t),n={_:{transform:f},getBBox:function(){return i}};return Et(n,e),n.matrix}),Et=(e.transformPath=function(t,e){return Z(t,Mt(t,e))},e._extractTransform=function(t,i){if(null==i)return t._.transform;i=g(i).replace(/\.{3}|\u2026/g,t._.transform||f);var n,r,o=e.parseTransformString(i),s=0,a=1,l=1,c=t._,h=new Ot;if(c.transform=o||[],o)for(var d=0,u=o.length;d<u;d++){var p,m,v,y,b,_=o[d],x=_.length,w=g(_[0]).toLowerCase(),k=_[0]!=w,C=k?h.invert():0;"t"==w&&3==x?k?(p=C.x(0,0),m=C.y(0,0),v=C.x(_[1],_[2]),y=C.y(_[1],_[2]),h.translate(v-p,y-m)):h.translate(_[1],_[2]):"r"==w?2==x?(b=b||t.getBBox(1),h.rotate(_[1],b.x+b.width/2,b.y+b.height/2),s+=_[1]):4==x&&(k?(v=C.x(_[2],_[3]),y=C.y(_[2],_[3]),h.rotate(_[1],v,y)):h.rotate(_[1],_[2],_[3]),s+=_[1]):"s"==w?2==x||3==x?(b=b||t.getBBox(1),h.scale(_[1],_[x-1],b.x+b.width/2,b.y+b.height/2),a*=_[1],l*=_[x-1]):5==x&&(k?(v=C.x(_[3],_[4]),y=C.y(_[3],_[4]),h.scale(_[1],_[2],v,y)):h.scale(_[1],_[2],_[3],_[4]),a*=_[1],l*=_[2]):"m"==w&&7==x&&h.add(_[1],_[2],_[3],_[4],_[5],_[6]),c.dirtyT=1,t.matrix=h}t.matrix=h,c.sx=a,c.sy=l,c.deg=s,c.dx=n=h.e,c.dy=r=h.f,1==a&&1==l&&!s&&c.bbox?(c.bbox.x+=+n,c.bbox.y+=+r):c.dirtyT=1}),Pt=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},It=e._equaliseTransform=function(t,i){i=g(i).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],i=e.parseTransformString(i)||[];for(var n,r,o,s,a=w(t.length,i.length),l=[],c=[],h=0;h<a;h++){if(o=t[h]||Pt(i[h]),s=i[h]||Pt(o),o[0]!=s[0]||"r"==o[0].toLowerCase()&&(o[2]!=s[2]||o[3]!=s[3])||"s"==o[0].toLowerCase()&&(o[3]!=s[3]||o[4]!=s[4]))return;for(l[h]=[],c[h]=[],n=0,r=w(o.length,s.length);n<r;n++)n in o&&(l[h][n]=o[n]),n in s&&(c[h][n]=s[n])}return{from:l,to:c}};function Ot(t,e,i,n,r,o){null!=t?(this.a=+t,this.b=+e,this.c=+i,this.d=+n,this.e=+r,this.f=+o):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}e._getContainer=function(t,i,n,r){var o;if(null!=(o=null!=r||e.is(t,"object")?t:l.doc.getElementById(t)))return o.tagName?null==i?{container:o,width:o.style.pixelWidth||o.offsetWidth,height:o.style.pixelHeight||o.offsetHeight}:{container:o,width:i,height:n}:{container:1,x:t,y:i,width:n,height:r}},e.pathToRelative=_t,e._engine={},e.path2curve=Tt,e.matrix=function(t,e,i,n,r,o){return new Ot(t,e,i,n,r,o)},function(t){function i(t){return t[0]*t[0]+t[1]*t[1]}function n(t){var e=x.sqrt(i(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,i,n,r,o){var s,a,l,c,h=[[],[],[]],d=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],u=[[t,i,r],[e,n,o],[0,0,1]];for(t&&t instanceof Ot&&(u=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),s=0;s<3;s++)for(a=0;a<3;a++){for(c=0,l=0;l<3;l++)c+=d[s][l]*u[l][a];h[s][a]=c}this.a=h[0][0],this.b=h[1][0],this.c=h[0][1],this.d=h[1][1],this.e=h[0][2],this.f=h[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new Ot(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new Ot(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,i,n){null==e&&(e=t),(i||n)&&this.add(1,0,0,1,i,n),this.add(t,0,0,e,0,0),(i||n)&&this.add(1,0,0,1,-i,-n)},t.rotate=function(t,i,n){t=e.rad(t),i=i||0,n=n||0;var r=+x.cos(t).toFixed(9),o=+x.sin(t).toFixed(9);this.add(r,o,-o,r,i,n),this.add(1,0,0,1,-i,-n)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[g.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var r=[[this.a,this.c],[this.b,this.d]];t.scalex=x.sqrt(i(r[0])),n(r[0]),t.shear=r[0][0]*r[1][0]+r[0][1]*r[1][1],r[1]=[r[1][0]-r[0][0]*t.shear,r[1][1]-r[0][1]*t.shear],t.scaley=x.sqrt(i(r[1])),n(r[1]),t.shear/=t.scaley;var o=-r[0][1],s=r[1][1];return s<0?(t.rotate=e.deg(x.acos(s)),o<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(x.asin(o)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[v]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:f)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:f)+(e.rotate?"r"+[e.rotate,0,0]:f)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(Ot.prototype);for(var Nt=function(){this.returnValue=!1},Lt=function(){return this.originalEvent.preventDefault()},jt=function(){this.cancelBubble=!0},Ft=function(){return this.originalEvent.stopPropagation()},$t=function(t){var e=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,i=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft;return{x:t.clientX+i,y:t.clientY+e}},Rt=l.doc.addEventListener?function(t,e,i,n){var r=function(t){var e=$t(t);return i.call(n,t,e.x,e.y)};if(t.addEventListener(e,r,!1),p&&b[e]){var o=function(e){for(var r=$t(e),o=e,s=0,a=e.targetTouches&&e.targetTouches.length;s<a;s++)if(e.targetTouches[s].target==t){(e=e.targetTouches[s]).originalEvent=o,e.preventDefault=Lt,e.stopPropagation=Ft;break}return i.call(n,e,r.x,r.y)};t.addEventListener(b[e],o,!1)}return function(){return t.removeEventListener(e,r,!1),p&&b[e]&&t.removeEventListener(b[e],o,!1),!0}}:l.doc.attachEvent?function(t,e,i,n){var r=function(t){t=t||l.win.event;var e=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,r=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft,o=t.clientX+r,s=t.clientY+e;return t.preventDefault=t.preventDefault||Nt,t.stopPropagation=t.stopPropagation||jt,i.call(n,t,o,s)};return t.attachEvent("on"+e,r),function(){return t.detachEvent("on"+e,r),!0}}:void 0,Ht=[],zt=function(e){for(var i,n=e.clientX,r=e.clientY,o=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,s=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft,a=Ht.length;a--;){if(i=Ht[a],p&&e.touches){for(var c,h=e.touches.length;h--;)if((c=e.touches[h]).identifier==i.el._drag.id){n=c.clientX,r=c.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var d,u=i.el.node,f=u.nextSibling,m=u.parentNode,g=u.style.display;l.win.opera&&m.removeChild(u),u.style.display="none",d=i.el.paper.getElementByPoint(n,r),u.style.display=g,l.win.opera&&(f?m.insertBefore(u,f):m.appendChild(u)),d&&t("raphael.drag.over."+i.el.id,i.el,d),n+=s,r+=o,t("raphael.drag.move."+i.el.id,i.move_scope||i.el,n-i.el._drag.x,r-i.el._drag.y,n,r,e)}},Bt=function(i){e.unmousemove(zt).unmouseup(Bt);for(var n,r=Ht.length;r--;)(n=Ht[r]).el._drag={},t("raphael.drag.end."+n.el.id,n.end_scope||n.start_scope||n.move_scope||n.el,i);Ht=[]},Ut=e.el={},Wt=y.length;Wt--;)!function(t){e[t]=Ut[t]=function(i,n){return e.is(i,"function")&&(this.events=this.events||[],this.events.push({name:t,f:i,unbind:Rt(this.shape||this.node||l.doc,t,i,n||this)})),this},e["un"+t]=Ut["un"+t]=function(i){for(var n=this.events||[],r=n.length;r--;)n[r].name!=t||!e.is(i,"undefined")&&n[r].f!=i||(n[r].unbind(),n.splice(r,1),!n.length&&delete this.events);return this}}(y[Wt]);Ut.data=function(i,n){var r=Y[this.id]=Y[this.id]||{};if(0==arguments.length)return r;if(1==arguments.length){if(e.is(i,"object")){for(var o in i)i[a](o)&&this.data(o,i[o]);return this}return t("raphael.data.get."+this.id,this,r[i],i),r[i]}return r[i]=n,t("raphael.data.set."+this.id,this,n,i),this},Ut.removeData=function(t){return null==t?Y[this.id]={}:Y[this.id]&&delete Y[this.id][t],this},Ut.getData=function(){return tt(Y[this.id]||{})},Ut.hover=function(t,e,i,n){return this.mouseover(t,i).mouseout(e,n||i)},Ut.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Yt=[];Ut.drag=function(i,n,r,o,s,a){function c(c){(c.originalEvent||c).preventDefault();var h=c.clientX,d=c.clientY,u=l.doc.documentElement.scrollTop||l.doc.body.scrollTop,f=l.doc.documentElement.scrollLeft||l.doc.body.scrollLeft;if(this._drag.id=c.identifier,p&&c.touches)for(var m,g=c.touches.length;g--;)if(m=c.touches[g],this._drag.id=m.identifier,m.identifier==this._drag.id){h=m.clientX,d=m.clientY;break}this._drag.x=h+f,this._drag.y=d+u,!Ht.length&&e.mousemove(zt).mouseup(Bt),Ht.push({el:this,move_scope:o,start_scope:s,end_scope:a}),n&&t.on("raphael.drag.start."+this.id,n),i&&t.on("raphael.drag.move."+this.id,i),r&&t.on("raphael.drag.end."+this.id,r),t("raphael.drag.start."+this.id,s||o||this,c.clientX+f,c.clientY+u,c)}return this._drag={},Yt.push({el:this,start:c}),this.mousedown(c),this},Ut.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},Ut.undrag=function(){for(var i=Yt.length;i--;)Yt[i].el==this&&(this.unmousedown(Yt[i].start),Yt.splice(i,1),t.unbind("raphael.drag.*."+this.id));!Yt.length&&e.unmousemove(zt).unmouseup(Bt),Ht=[]},n.circle=function(t,i,n){var r=e._engine.circle(this,t||0,i||0,n||0);return this.__set__&&this.__set__.push(r),r},n.rect=function(t,i,n,r,o){var s=e._engine.rect(this,t||0,i||0,n||0,r||0,o||0);return this.__set__&&this.__set__.push(s),s},n.ellipse=function(t,i,n,r){var o=e._engine.ellipse(this,t||0,i||0,n||0,r||0);return this.__set__&&this.__set__.push(o),o},n.path=function(t){t&&!e.is(t,"string")&&!e.is(t[0],A)&&(t+=f);var i=e._engine.path(e.format[d](e,arguments),this);return this.__set__&&this.__set__.push(i),i},n.image=function(t,i,n,r,o){var s=e._engine.image(this,t||"about:blank",i||0,n||0,r||0,o||0);return this.__set__&&this.__set__.push(s),s},n.text=function(t,i,n){var r=e._engine.text(this,t||0,i||0,g(n));return this.__set__&&this.__set__.push(r),r},n.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var i=new ce(t);return this.__set__&&this.__set__.push(i),i.paper=this,i.type="set",i},n.setStart=function(t){this.__set__=t||this.set()},n.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},n.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},n.setSize=function(t,i){return e._engine.setSize.call(this,t,i)},n.setViewBox=function(t,i,n,r,o){return e._engine.setViewBox.call(this,t,i,n,r,o)},n.top=n.bottom=null,n.raphael=e;function Vt(){return this.x+m+this.y+m+this.width+" × "+this.height}n.getElementByPoint=function(t,e){var i,n,r,o,s,a,c,h=this.canvas,d=l.doc.elementFromPoint(t,e);if(l.win.opera&&"svg"==d.tagName){var u=(n=(i=h).getBoundingClientRect(),r=i.ownerDocument,o=r.body,s=r.documentElement,a=s.clientTop||o.clientTop||0,c=s.clientLeft||o.clientLeft||0,{y:n.top+(l.win.pageYOffset||s.scrollTop||o.scrollTop)-a,x:n.left+(l.win.pageXOffset||s.scrollLeft||o.scrollLeft)-c}),p=h.createSVGRect();p.x=t-u.x,p.y=e-u.y,p.width=p.height=1;var f=h.getIntersectionList(p,null);f.length&&(d=f[f.length-1])}if(!d)return null;for(;d.parentNode&&d!=h.parentNode&&!d.raphael;)d=d.parentNode;return d==this.canvas.parentNode&&(d=h),d=d&&d.raphael?this.getById(d.raphaelid):null},n.getElementsByBBox=function(t){var i=this.set();return this.forEach(function(n){e.isBBoxIntersect(n.getBBox(),t)&&i.push(n)}),i},n.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},n.forEach=function(t,e){for(var i=this.bottom;i;){if(!1===t.call(e,i))return this;i=i.next}return this},n.getElementsByPoint=function(t,e){var i=this.set();return this.forEach(function(n){n.isPointInside(t,e)&&i.push(n)}),i},Ut.isPointInside=function(t,i){var n=this.realPath=X[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(n=e.transformPath(n,this.attr("transform"))),e.isPointInsidePath(n,t,i)},Ut.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=X[this.type](this),e.bboxwt=yt(this.realPath),e.bboxwt.toString=Vt,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=X[this.type](this)),e.bbox=yt(Z(this.realPath,this.matrix)),e.bbox.toString=Vt,e.dirty=e.dirtyT=0),e.bbox)},Ut.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Ut.glow=function(t){if("text"==this.type)return null;var e={width:((t=t||{}).width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},i=e.width/2,n=this.paper,r=n.set(),o=this.realPath||X[this.type](this);o=this.matrix?Z(o,this.matrix):o;for(var s=1;s<i+1;s++)r.push(n.path(o).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/i*s).toFixed(3),opacity:+(e.opacity/i).toFixed(3)}));return r.insertBefore(this).translate(e.offsetx,e.offsety)};var qt=function(t,i,n,r,o,s,a,l,c){return null==c?ft(t,i,n,r,o,s,a,l):e.findDotsAtSegment(t,i,n,r,o,s,a,l,function(t,e,i,n,r,o,s,a,l){if(!(l<0||ft(t,e,i,n,r,o,s,a)<l)){var c,h=.5,d=1-h;for(c=ft(t,e,i,n,r,o,s,a,d);C(c-l)>.01;)h/=2,c=ft(t,e,i,n,r,o,s,a,d+=(c<l?1:-1)*h);return d}}(t,i,n,r,o,s,a,l,c))},Gt=function(t,i){return function(n,r,o){for(var s,a,l,c,h,d="",u={},p=0,f=0,m=(n=Tt(n)).length;f<m;f++){if("M"==(l=n[f])[0])s=+l[1],a=+l[2];else{if(p+(c=qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6]))>r){if(i&&!u.start){if(d+=["C"+(h=qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-p)).start.x,h.start.y,h.m.x,h.m.y,h.x,h.y],o)return d;u.start=d,d=["M"+h.x,h.y+"C"+h.n.x,h.n.y,h.end.x,h.end.y,l[5],l[6]].join(),p+=c,s=+l[5],a=+l[6];continue}if(!t&&!i)return{x:(h=qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],r-p)).x,y:h.y,alpha:h.alpha}}p+=c,s=+l[5],a=+l[6]}d+=l.shift()+l}return u.end=d,(h=t?p:i?u:e.findDotsAtSegment(s,a,l[0],l[1],l[2],l[3],l[4],l[5],1)).alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}},Kt=Gt(1),Xt=Gt(),Zt=Gt(0,1);e.getTotalLength=Kt,e.getPointAtLength=Xt,e.getSubpath=function(t,e,i){if(this.getTotalLength(t)-i<1e-6)return Zt(t,e).end;var n=Zt(t,i,1);return e?Zt(n,e).end:n},Ut.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():Kt(t)},Ut.getPointAtLength=function(t){var e=this.getPath();if(e)return Xt(e,t)},Ut.getPath=function(){var t,i=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return i&&(t=i(this)),t},Ut.getSubpath=function(t,i){var n=this.getPath();if(n)return e.getSubpath(n,t,i)};var Qt=e.easing_formulas={linear:function(t){return t},"<":function(t){return S(t,1.7)},">":function(t){return S(t,.48)},"<>":function(t){var e=.48-t/1.04,i=x.sqrt(.1734+e*e),n=i-e,r=-i-e,o=S(C(n),1/3)*(n<0?-1:1)+S(C(r),1/3)*(r<0?-1:1)+.5;return 3*(1-o)*o*o+o*o*o},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:S(2,-10*t)*x.sin(2*D*(t-.075)/.3)+1},bounce:function(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375}};Qt.easeIn=Qt["ease-in"]=Qt["<"],Qt.easeOut=Qt["ease-out"]=Qt[">"],Qt.easeInOut=Qt["ease-in-out"]=Qt["<>"],Qt["back-in"]=Qt.backIn,Qt["back-out"]=Qt.backOut;var Jt=[],te=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ee=function(){for(var i=+new Date,n=0;n<Jt.length;n++){var r=Jt[n];if(!r.el.removed&&!r.paused){var o,s,l=i-r.start,c=r.ms,h=r.easing,d=r.from,p=r.diff,f=r.to,g=(r.t,r.el),v={},y={};if(r.initstatus?(l=(r.initstatus*r.anim.top-r.prev)/(r.percent-r.prev)*c,r.status=r.initstatus,delete r.initstatus,r.stop&&Jt.splice(n--,1)):r.status=(r.prev+(r.percent-r.prev)*(l/c))/r.anim.top,!(l<0))if(l<c){var b=h(l/c);for(var _ in d)if(d[a](_)){switch($[_]){case T:o=+d[_]+b*c*p[_];break;case"colour":o="rgb("+[ie(O(d[_].r+b*c*p[_].r)),ie(O(d[_].g+b*c*p[_].g)),ie(O(d[_].b+b*c*p[_].b))].join(",")+")";break;case"path":o=[];for(var x=0,w=d[_].length;x<w;x++){o[x]=[d[_][x][0]];for(var k=1,C=d[_][x].length;k<C;k++)o[x][k]=+d[_][x][k]+b*c*p[_][x][k];o[x]=o[x].join(m)}o=o.join(m);break;case"transform":if(p[_].real)for(o=[],x=0,w=d[_].length;x<w;x++)for(o[x]=[d[_][x][0]],k=1,C=d[_][x].length;k<C;k++)o[x][k]=d[_][x][k]+b*c*p[_][x][k];else{var S=function(t){return+d[_][t]+b*c*p[_][t]};o=[["m",S(0),S(1),S(2),S(3),S(4),S(5)]]}break;case"csv":if("clip-rect"==_)for(o=[],x=4;x--;)o[x]=+d[_][x]+b*c*p[_][x];break;default:var D=[][u](d[_]);for(o=[],x=g.paper.customAttributes[_].length;x--;)o[x]=+D[x]+b*c*p[_][x]}v[_]=o}g.attr(v),function(e,i,n){setTimeout(function(){t("raphael.anim.frame."+e,i,n)})}(g.id,g,r.anim)}else{if(function(i,n,r){setTimeout(function(){t("raphael.anim.frame."+n.id,n,r),t("raphael.anim.finish."+n.id,n,r),e.is(i,"function")&&i.call(n)})}(r.callback,g,r.anim),g.attr(f),Jt.splice(n--,1),r.repeat>1&&!r.next){for(s in f)f[a](s)&&(y[s]=r.totalOrigin[s]);r.el.attr(y),oe(r.anim,r.el,r.anim.percents[0],null,r.totalOrigin,r.repeat-1)}r.next&&!r.stop&&oe(r.anim,r.el,r.next,null,r.totalOrigin,r.repeat)}}}Jt.length&&te(ee)},ie=function(t){return t>255?255:t<0?0:t};function ne(t,e,i,n,r,o){var s=3*e,a=3*(n-e)-s,l=1-s-a,c=3*i,h=3*(r-i)-c,d=1-c-h;function u(t){return((l*t+a)*t+s)*t}return function(t,e){var i=function(t,e){var i,n,r,o,c,h;for(r=t,h=0;h<8;h++){if(o=u(r)-t,C(o)<e)return r;if(C(c=(3*l*r+2*a)*r+s)<1e-6)break;r-=o/c}if(n=1,(r=t)<(i=0))return i;if(r>n)return n;for(;i<n;){if(o=u(r),C(o-t)<e)return r;t>o?i=r:n=r,r=(n-i)/2+i}return r}(t,e);return((d*i+h)*i+c)*i}(t,1/(200*o))}function re(t,e){var i=[],n={};if(this.ms=e,this.times=1,t){for(var r in t)t[a](r)&&(n[N(r)]=t[r],i.push(N(r)));i.sort(V)}this.anim=n,this.top=i[i.length-1],this.percents=i}function oe(i,n,o,s,l,c){o=N(o);var h,d,p,f,m,y,b=i.ms,_={},x={},w={};if(s)for(C=0,S=Jt.length;C<S;C++){var k=Jt[C];if(k.el.id==n.id&&k.anim==i){k.percent!=o?(Jt.splice(C,1),p=1):d=k,n.attr(k.totalOrigin);break}}else s=+x;for(var C=0,S=i.percents.length;C<S;C++){if(i.percents[C]==o||i.percents[C]>s*i.top){o=i.percents[C],m=i.percents[C-1]||0,b=b/i.top*(o-m),f=i.percents[C+1],h=i.anim[o];break}s&&n.attr(i.anim[i.percents[C]])}if(h){if(d)d.initstatus=s,d.start=new Date-d.ms*s;else{for(var D in h)if(h[a](D)&&($[a](D)||n.paper.customAttributes[a](D)))switch(_[D]=n.attr(D),null==_[D]&&(_[D]=F[D]),x[D]=h[D],$[D]){case T:w[D]=(x[D]-_[D])/b;break;case"colour":_[D]=e.getRGB(_[D]);var A=e.getRGB(x[D]);w[D]={r:(A.r-_[D].r)/b,g:(A.g-_[D].g)/b,b:(A.b-_[D].b)/b};break;case"path":var M=Tt(_[D],x[D]),E=M[1];for(_[D]=M[0],w[D]=[],C=0,S=_[D].length;C<S;C++){w[D][C]=[0];for(var P=1,O=_[D][C].length;P<O;P++)w[D][C][P]=(E[C][P]-_[D][C][P])/b}break;case"transform":var L=n._,j=It(L[D],x[D]);if(j)for(_[D]=j.from,x[D]=j.to,w[D]=[],w[D].real=!0,C=0,S=_[D].length;C<S;C++)for(w[D][C]=[_[D][C][0]],P=1,O=_[D][C].length;P<O;P++)w[D][C][P]=(x[D][C][P]-_[D][C][P])/b;else{var R=n.matrix||new Ot,H={_:{transform:L.transform},getBBox:function(){return n.getBBox(1)}};_[D]=[R.a,R.b,R.c,R.d,R.e,R.f],Et(H,x[D]),x[D]=H._.transform,w[D]=[(H.matrix.a-R.a)/b,(H.matrix.b-R.b)/b,(H.matrix.c-R.c)/b,(H.matrix.d-R.d)/b,(H.matrix.e-R.e)/b,(H.matrix.f-R.f)/b]}break;case"csv":var z=g(h[D])[v](r),B=g(_[D])[v](r);if("clip-rect"==D)for(_[D]=B,w[D]=[],C=B.length;C--;)w[D][C]=(z[C]-_[D][C])/b;x[D]=z;break;default:for(z=[][u](h[D]),B=[][u](_[D]),w[D]=[],C=n.paper.customAttributes[D].length;C--;)w[D][C]=((z[C]||0)-(B[C]||0))/b}var U=h.easing,W=e.easing_formulas[U];if(!W)if((W=g(U).match(I))&&5==W.length){var Y=W;W=function(t){return ne(t,+Y[1],+Y[2],+Y[3],+Y[4],b)}}else W=q;if(k={anim:i,percent:o,timestamp:y=h.start||i.start||+new Date,start:y+(i.del||0),status:0,initstatus:s||0,stop:!1,ms:b,easing:W,from:_,diff:w,to:x,el:n,callback:h.callback,prev:m,next:f,repeat:c||i.times,origin:n.attr(),totalOrigin:l},Jt.push(k),s&&!d&&!p&&(k.stop=!0,k.start=new Date-b*s,1==Jt.length))return ee();p&&(k.start=new Date-k.ms*s),1==Jt.length&&te(ee)}t("raphael.anim.start."+n.id,n,i)}}function se(t){for(var e=0;e<Jt.length;e++)Jt[e].el.paper==t&&Jt.splice(e--,1)}Ut.animateWith=function(t,i,n,r,o,s){if(this.removed)return s&&s.call(this),this;var a=n instanceof re?n:e.animation(n,r,o,s);oe(a,this,a.percents[0],null,this.attr());for(var l=0,c=Jt.length;l<c;l++)if(Jt[l].anim==i&&Jt[l].el==t){Jt[c-1].start=Jt[l].start;break}return this},Ut.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},re.prototype.delay=function(t){var e=new re(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},re.prototype.repeat=function(t){var e=new re(this.anim,this.ms);return e.del=this.del,e.times=x.floor(w(t,0))||1,e},e.animation=function(t,i,n,r){if(t instanceof re)return t;!e.is(n,"function")&&n||(r=r||n||null,n=null),t=Object(t),i=+i||0;var o,s,l={};for(s in t)t[a](s)&&N(s)!=s&&N(s)+"%"!=s&&(o=!0,l[s]=t[s]);if(o)return n&&(l.easing=n),r&&(l.callback=r),new re({100:l},i);if(r){var c=0;for(var h in t){var d=L(h);t[a](h)&&d>c&&(c=d)}!t[c+="%"].callback&&(t[c].callback=r)}return new re(t,i)},Ut.animate=function(t,i,n,r){if(this.removed)return r&&r.call(this),this;var o=t instanceof re?t:e.animation(t,i,n,r);return oe(o,this,o.percents[0],null,this.attr()),this},Ut.setTime=function(t,e){return t&&null!=e&&this.status(t,k(e,t.ms)/t.ms),this},Ut.status=function(t,e){var i,n,r=[],o=0;if(null!=e)return oe(t,this,-1,k(e,1)),this;for(i=Jt.length;o<i;o++)if((n=Jt[o]).el.id==this.id&&(!t||n.anim==t)){if(t)return n.status;r.push({anim:n.anim,status:n.status})}return t?0:r},Ut.pause=function(e){for(var i=0;i<Jt.length;i++)Jt[i].el.id!=this.id||e&&Jt[i].anim!=e||!1!==t("raphael.anim.pause."+this.id,this,Jt[i].anim)&&(Jt[i].paused=!0);return this},Ut.resume=function(e){for(var i=0;i<Jt.length;i++)if(Jt[i].el.id==this.id&&(!e||Jt[i].anim==e)){var n=Jt[i];!1!==t("raphael.anim.resume."+this.id,this,n.anim)&&(delete n.paused,this.status(n.anim,n.status))}return this},Ut.stop=function(e){for(var i=0;i<Jt.length;i++)Jt[i].el.id!=this.id||e&&Jt[i].anim!=e||!1!==t("raphael.anim.stop."+this.id,this,Jt[i].anim)&&Jt.splice(i--,1);return this},t.on("raphael.remove",se),t.on("raphael.clear",se),Ut.toString=function(){return"Raphaël’s object"};var ae,le,ce=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,i=t.length;e<i;e++)!t[e]||t[e].constructor!=Ut.constructor&&t[e].constructor!=ce||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},he=ce.prototype;for(var de in he.push=function(){for(var t,e,i=0,n=arguments.length;i<n;i++)!(t=arguments[i])||t.constructor!=Ut.constructor&&t.constructor!=ce||(this[e=this.items.length]=this.items[e]=t,this.length++);return this},he.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},he.forEach=function(t,e){for(var i=0,n=this.items.length;i<n;i++)if(!1===t.call(e,this.items[i],i))return this;return this},Ut)Ut[a](de)&&(he[de]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t][d](i,e)})}}(de));return he.attr=function(t,i){if(t&&e.is(t,A)&&e.is(t[0],"object"))for(var n=0,r=t.length;n<r;n++)this.items[n].attr(t[n]);else for(var o=0,s=this.items.length;o<s;o++)this.items[o].attr(t,i);return this},he.clear=function(){for(;this.length;)this.pop()},he.splice=function(t,e,i){t=t<0?w(this.length+t,0):t,e=w(0,k(this.length-t,e));var n,r=[],o=[],s=[];for(n=2;n<arguments.length;n++)s.push(arguments[n]);for(n=0;n<e;n++)o.push(this[t+n]);for(;n<this.length-t;n++)r.push(this[t+n]);var a=s.length;for(n=0;n<a+r.length;n++)this.items[t+n]=this[t+n]=n<a?s[n]:r[n-a];for(n=this.items.length=this.length-=e-a;this[n];)delete this[n++];return new ce(o)},he.exclude=function(t){for(var e=0,i=this.length;e<i;e++)if(this[e]==t)return this.splice(e,1),!0},he.animate=function(t,i,n,r){(e.is(n,"function")||!n)&&(r=n||null);var o,s,a=this.items.length,l=a,c=this;if(!a)return this;r&&(s=function(){!--a&&r.call(c)}),n=e.is(n,"string")?n:s;var h=e.animation(t,i,n,s);for(o=this.items[--l].animate(h);l--;)this.items[l]&&!this.items[l].removed&&this.items[l].animateWith(o,h,h),this.items[l]&&!this.items[l].removed||a--;return this},he.insertAfter=function(t){for(var e=this.items.length;e--;)this.items[e].insertAfter(t);return this},he.getBBox=function(){for(var t=[],e=[],i=[],n=[],r=this.items.length;r--;)if(!this.items[r].removed){var o=this.items[r].getBBox();t.push(o.x),e.push(o.y),i.push(o.x+o.width),n.push(o.y+o.height)}return{x:t=k[d](0,t),y:e=k[d](0,e),x2:i=w[d](0,i),y2:n=w[d](0,n),width:i-t,height:n-e}},he.clone=function(t){t=this.paper.set();for(var e=0,i=this.items.length;e<i;e++)t.push(this.items[e].clone());return t},he.toString=function(){return"Raphaël‘s set"},he.glow=function(t){var e=this.paper.set();return this.forEach(function(i,n){var r=i.glow(t);null!=r&&r.forEach(function(t,i){e.push(t)})}),e},he.isPointInside=function(t,e){var i=!1;return this.forEach(function(n){if(n.isPointInside(t,e))return i=!0,!1}),i},e.registerFont=function(t){if(!t.face)return t;this.fonts=this.fonts||{};var e={w:t.w,face:{},glyphs:{}},i=t.face["font-family"];for(var n in t.face)t.face[a](n)&&(e.face[n]=t.face[n]);if(this.fonts[i]?this.fonts[i].push(e):this.fonts[i]=[e],!t.svg)for(var r in e.face["units-per-em"]=L(t.face["units-per-em"],10),t.glyphs)if(t.glyphs[a](r)){var o=t.glyphs[r];if(e.glyphs[r]={w:o.w,k:{},d:o.d&&"M"+o.d.replace(/[mlcxtrv]/g,function(t){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[t]||"M"})+"z"},o.k)for(var s in o.k)o[a](s)&&(e.glyphs[r].k[s]=o.k[s])}return t},n.getFont=function(t,i,n,r){if(r=r||"normal",n=n||"normal",i=+i||{normal:400,bold:700,lighter:300,bolder:800}[i]||400,e.fonts){var o,s=e.fonts[t];if(!s){var l=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,f)+"(\\s|$)","i");for(var c in e.fonts)if(e.fonts[a](c)&&l.test(c)){s=e.fonts[c];break}}if(s)for(var h=0,d=s.length;h<d&&((o=s[h]).face["font-weight"]!=i||o.face["font-style"]!=n&&o.face["font-style"]||o.face["font-stretch"]!=r);h++);return o}},n.print=function(t,i,n,o,s,a,l,c){a=a||"middle",l=w(k(l||0,1),-1),c=w(k(c||1,3),1);var h,d=g(n)[v](f),u=0,p=0,m=f;if(e.is(o,"string")&&(o=this.getFont(o)),o){h=(s||16)/o.face["units-per-em"];for(var y=o.face.bbox[v](r),b=+y[0],_=y[3]-y[1],x=0,C=+y[1]+("baseline"==a?_+ +o.face.descent:_/2),S=0,D=d.length;S<D;S++){if("\n"==d[S])u=0,A=0,p=0,x+=_*c;else{var T=p&&o.glyphs[d[S-1]]||{},A=o.glyphs[d[S]];u+=p?(T.w||o.w)+(T.k&&T.k[d[S]]||0)+o.w*l:0,p=1}A&&A.d&&(m+=e.transformPath(A.d,["t",u*h,x*h,"s",h,h,b,C,"t",(t-b)/h,(i-C)/h]))}}return this.path(m).attr({fill:"#000",stroke:"none"})},n.add=function(t){if(e.is(t,"array"))for(var i,n=this.set(),r=0,s=t.length;r<s;r++)i=t[r]||{},o[a](i.type)&&n.push(this[i.type]().attr(i));return n},e.format=function(t,i){var n=e.is(i,A)?[0][u](i):arguments;return t&&e.is(t,"string")&&n.length-1&&(t=t.replace(s,function(t,e){return null==n[++e]?f:n[e]})),t||f},e.fullfill=(ae=/\{([^\}]+)\}/g,le=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(t,e){return String(t).replace(ae,function(t,i){return function(t,e,i){var n=i;return e.replace(le,function(t,e,i,r,o){e=e||r,n&&(e in n&&(n=n[e]),"function"==typeof n&&o&&(n=n()))}),n=(null==n||n==i?t:n)+""}(t,i,e)})}),e.ninja=function(){if(c.was)l.win.Raphael=c.is;else{window.Raphael=void 0;try{delete window.Raphael}catch(t){}}return e},e.st=he,t.on("raphael.DOMload",function(){i=!0}),function(t,i,n){null==t.readyState&&t.addEventListener&&(t.addEventListener("DOMContentLoaded",n=function(){t.removeEventListener("DOMContentLoaded",n,!1),t.readyState="complete"},!1),t.readyState="loading"),function i(){/in/.test(t.readyState)?setTimeout(i,9):e.eve("raphael.DOMload")}()}(document),e}.apply(e,n))||(t.exports=r)},function(t,e,i){var n,r,o,s,a,l,c,h,d,u,p,f,m;s="hasOwnProperty",a=/[\.\/]/,l=/\s*,\s*/,c=function(t,e){return t-e},h={n:{}},d=function(){for(var t=0,e=this.length;t<e;t++)if(void 0!==this[t])return this[t]},u=function(){for(var t=this.length;--t;)if(void 0!==this[t])return this[t]},p=Object.prototype.toString,f=String,m=Array.isArray||function(t){return t instanceof Array||"[object Array]"==p.call(t)},eve=function(t,e){var i,n=o,s=Array.prototype.slice.call(arguments,2),a=eve.listeners(t),l=0,h=[],p={},f=[],m=r;f.firstDefined=d,f.lastDefined=u,r=t,o=0;for(var g=0,v=a.length;g<v;g++)"zIndex"in a[g]&&(h.push(a[g].zIndex),a[g].zIndex<0&&(p[a[g].zIndex]=a[g]));for(h.sort(c);h[l]<0;)if(i=p[h[l++]],f.push(i.apply(e,s)),o)return o=n,f;for(g=0;g<v;g++)if("zIndex"in(i=a[g]))if(i.zIndex==h[l]){if(f.push(i.apply(e,s)),o)break;do{if((i=p[h[++l]])&&f.push(i.apply(e,s)),o)break}while(i)}else p[i.zIndex]=i;else if(f.push(i.apply(e,s)),o)break;return o=n,r=m,f},eve._events=h,eve.listeners=function(t){var e,i,n,r,o,s,l,c,d=m(t)?t:t.split(a),u=h,p=[u],f=[];for(r=0,o=d.length;r<o;r++){for(c=[],s=0,l=p.length;s<l;s++)for(i=[(u=p[s].n)[d[r]],u["*"]],n=2;n--;)(e=i[n])&&(c.push(e),f=f.concat(e.f||[]));p=c}return f},eve.separator=function(t){t?(t="["+(t=f(t).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",a=new RegExp(t)):a=/[\.\/]/},eve.on=function(t,e){if("function"!=typeof e)return function(){};for(var i=m(t)?m(t[0])?t:[t]:f(t).split(l),n=0,r=i.length;n<r;n++)!function(t){for(var i,n=m(t)?t:f(t).split(a),r=h,o=0,s=n.length;o<s;o++)r=(r=r.n).hasOwnProperty(n[o])&&r[n[o]]||(r[n[o]]={n:{}});for(r.f=r.f||[],o=0,s=r.f.length;o<s;o++)if(r.f[o]==e){i=!0;break}!i&&r.f.push(e)}(i[n]);return function(t){+t==+t&&(e.zIndex=+t)}},eve.f=function(t){var e=[].slice.call(arguments,1);return function(){eve.apply(null,[t,null].concat(e).concat([].slice.call(arguments,0)))}},eve.stop=function(){o=1},eve.nt=function(t){var e=m(r)?r.join("."):r;return t?new RegExp("(?:\\.|\\/|^)"+t+"(?:\\.|\\/|$)").test(e):e},eve.nts=function(){return m(r)?r:r.split(a)},eve.off=eve.unbind=function(t,e){if(t){var i=m(t)?m(t[0])?t:[t]:f(t).split(l);if(i.length>1)for(var n=0,r=i.length;n<r;n++)eve.off(i[n],e);else{i=m(t)?t:f(t).split(a);var o,c,d,u,p,g=[h];for(n=0,r=i.length;n<r;n++)for(u=0;u<g.length;u+=d.length-2){if(d=[u,1],o=g[u].n,"*"!=i[n])o[i[n]]&&d.push(o[i[n]]);else for(c in o)o[s](c)&&d.push(o[c]);g.splice.apply(g,d)}for(n=0,r=g.length;n<r;n++)for(o=g[n];o.n;){if(e){if(o.f){for(u=0,p=o.f.length;u<p;u++)if(o.f[u]==e){o.f.splice(u,1);break}!o.f.length&&delete o.f}for(c in o.n)if(o.n[s](c)&&o.n[c].f){var v=o.n[c].f;for(u=0,p=v.length;u<p;u++)if(v[u]==e){v.splice(u,1);break}!v.length&&delete o.n[c].f}}else for(c in delete o.f,o.n)o.n[s](c)&&o.n[c].f&&delete o.n[c].f;o=o.n}}}else eve._events=h={n:{}}},eve.once=function(t,e){var i=function(){return eve.off(t,i),e.apply(this,arguments)};return eve.on(t,i)},eve.version="0.5.0",eve.toString=function(){return"You are running Eve 0.5.0"},void 0!==t&&t.exports?t.exports=eve:void 0===(n=function(){return eve}.apply(e,[]))||(t.exports=n)},function(t,e,i){var n,r;n=[i(1)],void 0===(r=function(t){if(!t||t.svg){var e="hasOwnProperty",i=String,n=parseFloat,r=parseInt,o=Math,s=o.max,a=o.abs,l=o.pow,c=/[, ]+/,h=t.eve,d="",u=" ",p="http://www.w3.org/1999/xlink",f={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},m={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var g=function(n,r){if(r)for(var o in"string"==typeof n&&(n=g(n)),r)r[e](o)&&("xlink:"==o.substring(0,6)?n.setAttributeNS(p,o.substring(6),i(r[o])):n.setAttribute(o,i(r[o])));else(n=t._g.doc.createElementNS("http://www.w3.org/2000/svg",n)).style&&(n.style.webkitTapHighlightColor="rgba(0,0,0,0)");return n},v=function(e,r){var c="linear",h=e.id+r,u=.5,p=.5,f=e.node,m=e.paper,v=f.style,b=t._g.doc.getElementById(h);if(!b){if(r=(r=i(r).replace(t._radial_gradient,function(t,e,i){if(c="radial",e&&i){u=n(e);var r=2*((p=n(i))>.5)-1;l(u-.5,2)+l(p-.5,2)>.25&&(p=o.sqrt(.25-l(u-.5,2))*r+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*r)}return d})).split(/\s*\-\s*/),"linear"==c){var _=r.shift();if(_=-n(_),isNaN(_))return null;var x=[0,0,o.cos(t.rad(_)),o.sin(t.rad(_))],w=1/(s(a(x[2]),a(x[3]))||1);x[2]*=w,x[3]*=w,x[2]<0&&(x[0]=-x[2],x[2]=0),x[3]<0&&(x[1]=-x[3],x[3]=0)}var k=t._parseDots(r);if(!k)return null;if(h=h.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&h!=e.gradient.id&&(m.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){b=g(c+"Gradient",{id:h}),e.gradient=b,g(b,"radial"==c?{fx:u,fy:p}:{x1:x[0],y1:x[1],x2:x[2],y2:x[3],gradientTransform:e.matrix.invert()}),m.defs.appendChild(b);for(var C=0,S=k.length;C<S;C++)b.appendChild(g("stop",{offset:k[C].offset?k[C].offset:C?"100%":"0%","stop-color":k[C].color||"#fff","stop-opacity":isFinite(k[C].opacity)?k[C].opacity:1}))}}return g(f,{fill:y(h),opacity:1,"fill-opacity":1}),v.fill=d,v.opacity=1,v.fillOpacity=1,1},y=function(t){if((e=document.documentMode)&&(9===e||10===e))return"url('#"+t+"')";var e,i=document.location;return"url('"+(i.protocol+"//"+i.host+i.pathname+i.search)+"#"+t+"')"},b=function(t){var e=t.getBBox(1);g(t.pattern,{patternTransform:t.matrix.invert()+" translate("+e.x+","+e.y+")"})},_=function(n,r,o){if("path"==n.type){for(var s,a,l,c,h,u=i(r).toLowerCase().split("-"),p=n.paper,v=o?"end":"start",y=n.node,b=n.attrs,_=b["stroke-width"],x=u.length,w="classic",k=3,C=3,S=5;x--;)switch(u[x]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=u[x];break;case"wide":C=5;break;case"narrow":C=2;break;case"long":k=5;break;case"short":k=2}if("open"==w?(k+=2,C+=2,S+=2,l=1,c=o?4:1,h={fill:"none",stroke:b.stroke}):(c=l=k/2,h={fill:b.stroke,stroke:"none"}),n._.arrows?o?(n._.arrows.endPath&&m[n._.arrows.endPath]--,n._.arrows.endMarker&&m[n._.arrows.endMarker]--):(n._.arrows.startPath&&m[n._.arrows.startPath]--,n._.arrows.startMarker&&m[n._.arrows.startMarker]--):n._.arrows={},"none"!=w){var D="raphael-marker-"+w,T="raphael-marker-"+v+w+k+C+"-obj"+n.id;t._g.doc.getElementById(D)?m[D]++:(p.defs.appendChild(g(g("path"),{"stroke-linecap":"round",d:f[w],id:D})),m[D]=1);var A,M=t._g.doc.getElementById(T);M?(m[T]++,A=M.getElementsByTagName("use")[0]):(M=g(g("marker"),{id:T,markerHeight:C,markerWidth:k,orient:"auto",refX:c,refY:C/2}),A=g(g("use"),{"xlink:href":"#"+D,transform:(o?"rotate(180 "+k/2+" "+C/2+") ":d)+"scale("+k/S+","+C/S+")","stroke-width":(1/((k/S+C/S)/2)).toFixed(4)}),M.appendChild(A),p.defs.appendChild(M),m[T]=1),g(A,h);var E=l*("diamond"!=w&&"oval"!=w);o?(s=n._.arrows.startdx*_||0,a=t.getTotalLength(b.path)-E*_):(s=E*_,a=t.getTotalLength(b.path)-(n._.arrows.enddx*_||0)),(h={})["marker-"+v]="url(#"+T+")",(a||s)&&(h.d=t.getSubpath(b.path,s,a)),g(y,h),n._.arrows[v+"Path"]=D,n._.arrows[v+"Marker"]=T,n._.arrows[v+"dx"]=E,n._.arrows[v+"Type"]=w,n._.arrows[v+"String"]=r}else o?(s=n._.arrows.startdx*_||0,a=t.getTotalLength(b.path)-s):(s=0,a=t.getTotalLength(b.path)-(n._.arrows.enddx*_||0)),n._.arrows[v+"Path"]&&g(y,{d:t.getSubpath(b.path,s,a)}),delete n._.arrows[v+"Path"],delete n._.arrows[v+"Marker"],delete n._.arrows[v+"dx"],delete n._.arrows[v+"Type"],delete n._.arrows[v+"String"];for(h in m)if(m[e](h)&&!m[h]){var P=t._g.doc.getElementById(h);P&&P.parentNode.removeChild(P)}}},x={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},w=function(t,e,n){if(e=x[i(e).toLowerCase()]){for(var r=t.attrs["stroke-width"]||"1",o={round:r,square:r,butt:0}[t.attrs["stroke-linecap"]||n["stroke-linecap"]]||0,s=[],a=e.length;a--;)s[a]=e[a]*r+(a%2?1:-1)*o;g(t.node,{"stroke-dasharray":s.join(",")})}else g(t.node,{"stroke-dasharray":"none"})},k=function(n,o){var l=n.node,h=n.attrs,u=l.style.visibility;for(var f in l.style.visibility="hidden",o)if(o[e](f)){if(!t._availableAttrs[e](f))continue;var m=o[f];switch(h[f]=m,f){case"blur":n.blur(m);break;case"title":var y=l.getElementsByTagName("title");if(y.length&&(y=y[0]))y.firstChild.nodeValue=m;else{y=g("title");var x=t._g.doc.createTextNode(m);y.appendChild(x),l.appendChild(y)}break;case"href":case"target":var k=l.parentNode;if("a"!=k.tagName.toLowerCase()){var S=g("a");k.insertBefore(S,l),S.appendChild(l),k=S}"target"==f?k.setAttributeNS(p,"show","blank"==m?"new":m):k.setAttributeNS(p,f,m);break;case"cursor":l.style.cursor=m;break;case"transform":n.transform(m);break;case"arrow-start":_(n,m);break;case"arrow-end":_(n,m,1);break;case"clip-rect":var D=i(m).split(c);if(4==D.length){n.clip&&n.clip.parentNode.parentNode.removeChild(n.clip.parentNode);var T=g("clipPath"),A=g("rect");T.id=t.createUUID(),g(A,{x:D[0],y:D[1],width:D[2],height:D[3]}),T.appendChild(A),n.paper.defs.appendChild(T),g(l,{"clip-path":"url(#"+T.id+")"}),n.clip=A}if(!m){var M=l.getAttribute("clip-path");if(M){var E=t._g.doc.getElementById(M.replace(/(^url\(#|\)$)/g,d));E&&E.parentNode.removeChild(E),g(l,{"clip-path":d}),delete n.clip}}break;case"path":"path"==n.type&&(g(l,{d:m?h.path=t._pathToAbsolute(m):"M0,0"}),n._.dirty=1,n._.arrows&&("startString"in n._.arrows&&_(n,n._.arrows.startString),"endString"in n._.arrows&&_(n,n._.arrows.endString,1)));break;case"width":if(l.setAttribute(f,m),n._.dirty=1,!h.fx)break;f="x",m=h.x;case"x":h.fx&&(m=-h.x-(h.width||0));case"rx":if("rx"==f&&"rect"==n.type)break;case"cx":l.setAttribute(f,m),n.pattern&&b(n),n._.dirty=1;break;case"height":if(l.setAttribute(f,m),n._.dirty=1,!h.fy)break;f="y",m=h.y;case"y":h.fy&&(m=-h.y-(h.height||0));case"ry":if("ry"==f&&"rect"==n.type)break;case"cy":l.setAttribute(f,m),n.pattern&&b(n),n._.dirty=1;break;case"r":"rect"==n.type?g(l,{rx:m,ry:m}):l.setAttribute(f,m),n._.dirty=1;break;case"src":"image"==n.type&&l.setAttributeNS(p,"href",m);break;case"stroke-width":1==n._.sx&&1==n._.sy||(m/=s(a(n._.sx),a(n._.sy))||1),l.setAttribute(f,m),h["stroke-dasharray"]&&w(n,h["stroke-dasharray"],o),n._.arrows&&("startString"in n._.arrows&&_(n,n._.arrows.startString),"endString"in n._.arrows&&_(n,n._.arrows.endString,1));break;case"stroke-dasharray":w(n,m,o);break;case"fill":var P=i(m).match(t._ISURL);if(P){T=g("pattern");var I=g("image");T.id=t.createUUID(),g(T,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),g(I,{x:0,y:0,"xlink:href":P[1]}),T.appendChild(I),function(e){t._preload(P[1],function(){var t=this.offsetWidth,i=this.offsetHeight;g(e,{width:t,height:i}),g(I,{width:t,height:i})})}(T),n.paper.defs.appendChild(T),g(l,{fill:"url(#"+T.id+")"}),n.pattern=T,n.pattern&&b(n);break}var O=t.getRGB(m);if(O.error){if(("circle"==n.type||"ellipse"==n.type||"r"!=i(m).charAt())&&v(n,m)){if("opacity"in h||"fill-opacity"in h){var N=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,d));if(N){var L=N.getElementsByTagName("stop");g(L[L.length-1],{"stop-opacity":("opacity"in h?h.opacity:1)*("fill-opacity"in h?h["fill-opacity"]:1)})}}h.gradient=m,h.fill="none";break}}else delete o.gradient,delete h.gradient,!t.is(h.opacity,"undefined")&&t.is(o.opacity,"undefined")&&g(l,{opacity:h.opacity}),!t.is(h["fill-opacity"],"undefined")&&t.is(o["fill-opacity"],"undefined")&&g(l,{"fill-opacity":h["fill-opacity"]});O[e]("opacity")&&g(l,{"fill-opacity":O.opacity>1?O.opacity/100:O.opacity});case"stroke":O=t.getRGB(m),l.setAttribute(f,O.hex),"stroke"==f&&O[e]("opacity")&&g(l,{"stroke-opacity":O.opacity>1?O.opacity/100:O.opacity}),"stroke"==f&&n._.arrows&&("startString"in n._.arrows&&_(n,n._.arrows.startString),"endString"in n._.arrows&&_(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=i(m).charAt())&&v(n,m);break;case"opacity":h.gradient&&!h[e]("stroke-opacity")&&g(l,{"stroke-opacity":m>1?m/100:m});case"fill-opacity":if(h.gradient){(N=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,d)))&&(L=N.getElementsByTagName("stop"),g(L[L.length-1],{"stop-opacity":m}));break}default:"font-size"==f&&(m=r(m,10)+"px");var j=f.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[j]=m,n._.dirty=1,l.setAttribute(f,m)}}C(n,o),l.style.visibility=u},C=function(n,o){if("text"==n.type&&(o[e]("text")||o[e]("font")||o[e]("font-size")||o[e]("x")||o[e]("y"))){var s=n.attrs,a=n.node,l=a.firstChild?r(t._g.doc.defaultView.getComputedStyle(a.firstChild,d).getPropertyValue("font-size"),10):10;if(o[e]("text")){for(s.text=o.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,h=i(o.text).split("\n"),u=[],p=0,f=h.length;p<f;p++)c=g("tspan"),p&&g(c,{dy:1.2*l,x:s.x}),c.appendChild(t._g.doc.createTextNode(h[p])),a.appendChild(c),u[p]=c}else for(p=0,f=(u=a.getElementsByTagName("tspan")).length;p<f;p++)p?g(u[p],{dy:1.2*l,x:s.x}):g(u[0],{dy:0});g(a,{x:s.x,y:s.y}),n._.dirty=1;var m=n._getBBox(),v=s.y-(m.y+m.height/2);v&&t.is(v,"finite")&&g(u[0],{dy:v})}},S=function(t){return t.parentNode&&"a"===t.parentNode.tagName.toLowerCase()?t.parentNode:t},D=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),e.raphaelid=this.id,this.matrix=t.matrix(),this.realPath=null,this.paper=i,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},T=t.el;D.prototype=T,T.constructor=D,t._engine.path=function(t,e){var i=g("path");e.canvas&&e.canvas.appendChild(i);var n=new D(i,e);return n.type="path",k(n,{fill:"none",stroke:"#000",path:t}),n},T.rotate=function(t,e,r){if(this.removed)return this;if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2])),t=n(t[0]),null==r&&(e=r),null==e||null==r){var o=this.getBBox(1);e=o.x+o.width/2,r=o.y+o.height/2}return this.transform(this._.transform.concat([["r",t,e,r]])),this},T.scale=function(t,e,r,o){if(this.removed)return this;if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2]),o=n(t[3])),t=n(t[0]),null==e&&(e=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,e,r,o]])),this},T.translate=function(t,e){return this.removed?this:((t=i(t).split(c)).length-1&&(e=n(t[1])),t=n(t[0])||0,e=+e||0,this.transform(this._.transform.concat([["t",t,e]])),this)},T.transform=function(i){var n=this._;if(null==i)return n.transform;if(t._extractTransform(this,i),this.clip&&g(this.clip,{transform:this.matrix.invert()}),this.pattern&&b(this),this.node&&g(this.node,{transform:this.matrix}),1!=n.sx||1!=n.sy){var r=this.attrs[e]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":r})}return this},T.hide=function(){return this.removed||(this.node.style.display="none"),this},T.show=function(){return this.removed||(this.node.style.display=""),this},T.remove=function(){var e=S(this.node);if(!this.removed&&e.parentNode){var i=this.paper;for(var n in i.__set__&&i.__set__.exclude(this),h.unbind("raphael.*.*."+this.id),this.gradient&&i.defs.removeChild(this.gradient),t._tear(this,i),e.parentNode.removeChild(e),this.removeData(),this)this[n]="function"==typeof this[n]?t._removedFactory(n):null;this.removed=!0}},T._getBBox=function(){if("none"==this.node.style.display){this.show();var t=!0}var e,i=!1;this.paper.canvas.parentElement?e=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(e=this.paper.canvas.parentNode.style),e&&"none"==e.display&&(i=!0,e.display="");var n={};try{n=this.node.getBBox()}catch(t){n={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{n=n||{},i&&(e.display="none")}return t&&this.hide(),n},T.attr=function(i,n){if(this.removed)return this;if(null==i){var r={};for(var o in this.attrs)this.attrs[e](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==n&&t.is(i,"string")){if("fill"==i&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==i)return this._.transform;for(var s=i.split(c),a={},l=0,d=s.length;l<d;l++)(i=s[l])in this.attrs?a[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?a[i]=this.paper.customAttributes[i].def:a[i]=t._availableAttrs[i];return d-1?a:a[s[0]]}if(null==n&&t.is(i,"array")){for(a={},l=0,d=i.length;l<d;l++)a[i[l]]=this.attr(i[l]);return a}if(null!=n){var u={};u[i]=n}else null!=i&&t.is(i,"object")&&(u=i);for(var p in u)h("raphael.attr."+p+"."+this.id,this,u[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&u[e](p)&&t.is(this.paper.customAttributes[p],"function")){var f=this.paper.customAttributes[p].apply(this,[].concat(u[p]));for(var m in this.attrs[p]=u[p],f)f[e](m)&&(u[m]=f[m])}return k(this,u),this},T.toFront=function(){if(this.removed)return this;var e=S(this.node);e.parentNode.appendChild(e);var i=this.paper;return i.top!=this&&t._tofront(this,i),this},T.toBack=function(){if(this.removed)return this;var e=S(this.node),i=e.parentNode;i.insertBefore(e,i.firstChild),t._toback(this,this.paper);this.paper;return this},T.insertAfter=function(e){if(this.removed||!e)return this;var i=S(this.node),n=S(e.node||e[e.length-1].node);return n.nextSibling?n.parentNode.insertBefore(i,n.nextSibling):n.parentNode.appendChild(i),t._insertafter(this,e,this.paper),this},T.insertBefore=function(e){if(this.removed||!e)return this;var i=S(this.node),n=S(e.node||e[0].node);return n.parentNode.insertBefore(i,n),t._insertbefore(this,e,this.paper),this},T.blur=function(e){var i=this;if(0!=+e){var n=g("filter"),r=g("feGaussianBlur");i.attrs.blur=e,n.id=t.createUUID(),g(r,{stdDeviation:+e||1.5}),n.appendChild(r),i.paper.defs.appendChild(n),i._blur=n,g(i.node,{filter:"url(#"+n.id+")"})}else i._blur&&(i._blur.parentNode.removeChild(i._blur),delete i._blur,delete i.attrs.blur),i.node.removeAttribute("filter");return i},t._engine.circle=function(t,e,i,n){var r=g("circle");t.canvas&&t.canvas.appendChild(r);var o=new D(r,t);return o.attrs={cx:e,cy:i,r:n,fill:"none",stroke:"#000"},o.type="circle",g(r,o.attrs),o},t._engine.rect=function(t,e,i,n,r,o){var s=g("rect");t.canvas&&t.canvas.appendChild(s);var a=new D(s,t);return a.attrs={x:e,y:i,width:n,height:r,rx:o||0,ry:o||0,fill:"none",stroke:"#000"},a.type="rect",g(s,a.attrs),a},t._engine.ellipse=function(t,e,i,n,r){var o=g("ellipse");t.canvas&&t.canvas.appendChild(o);var s=new D(o,t);return s.attrs={cx:e,cy:i,rx:n,ry:r,fill:"none",stroke:"#000"},s.type="ellipse",g(o,s.attrs),s},t._engine.image=function(t,e,i,n,r,o){var s=g("image");g(s,{x:i,y:n,width:r,height:o,preserveAspectRatio:"none"}),s.setAttributeNS(p,"href",e),t.canvas&&t.canvas.appendChild(s);var a=new D(s,t);return a.attrs={x:i,y:n,width:r,height:o,src:e},a.type="image",a},t._engine.text=function(e,i,n,r){var o=g("text");e.canvas&&e.canvas.appendChild(o);var s=new D(o,e);return s.attrs={x:i,y:n,"text-anchor":"middle",text:r,"font-family":t._availableAttrs["font-family"],"font-size":t._availableAttrs["font-size"],stroke:"none",fill:"#000"},s.type="text",k(s,s.attrs),s},t._engine.setSize=function(t,e){return this.width=t||this.width,this.height=e||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e&&e.container,n=e.x,r=e.y,o=e.width,s=e.height;if(!i)throw new Error("SVG container not found.");var a,l=g("svg"),c="overflow:hidden;";return n=n||0,r=r||0,o=o||512,g(l,{height:s=s||342,version:1.1,width:o,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),1==i?(l.style.cssText=c+"position:absolute;left:"+n+"px;top:"+r+"px",t._g.doc.body.appendChild(l),a=1):(l.style.cssText=c+"position:relative",i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l)),(i=new t._Paper).width=o,i.height=s,i.canvas=l,i.clear(),i._left=i._top=0,a&&(i.renderfix=function(){}),i.renderfix(),i},t._engine.setViewBox=function(t,e,i,n,r){h("raphael.setViewBox",this,this._viewBox,[t,e,i,n,r]);var o,a,l=this.getSize(),c=s(i/l.width,n/l.height),d=this.top,p=r?"xMidYMid meet":"xMinYMin";for(null==t?(this._vbSize&&(c=1),delete this._vbSize,o="0 0 "+this.width+u+this.height):(this._vbSize=c,o=t+u+e+u+i+u+n),g(this.canvas,{viewBox:o,preserveAspectRatio:p});c&&d;)a="stroke-width"in d.attrs?d.attrs["stroke-width"]:1,d.attr({"stroke-width":a}),d._.dirty=1,d._.dirtyT=1,d=d.prev;return this._viewBox=[t,e,i,n,!!r],this},t.prototype.renderfix=function(){var t,e=this.canvas,i=e.style;try{t=e.getScreenCTM()||e.createSVGMatrix()}catch(i){t=e.createSVGMatrix()}var n=-t.e%1,r=-t.f%1;(n||r)&&(n&&(this._left=(this._left+n)%1,i.left=this._left+"px"),r&&(this._top=(this._top+r)%1,i.top=this._top+"px"))},t.prototype.clear=function(){t.eve("raphael.clear",this);for(var e=this.canvas;e.firstChild;)e.removeChild(e.firstChild);this.bottom=this.top=null,(this.desc=g("desc")).appendChild(t._g.doc.createTextNode("Created with Raphaël "+t.version)),e.appendChild(this.desc),e.appendChild(this.defs=g("defs"))},t.prototype.remove=function(){for(var e in h("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null};var A=t.st;for(var M in T)T[e](M)&&!A[e](M)&&(A[M]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(M))}}.apply(e,n))||(t.exports=r)},function(t,e,i){var n,r;n=[i(1)],void 0===(r=function(t){if(!t||t.vml){var e="hasOwnProperty",i=String,n=parseFloat,r=Math,o=r.round,s=r.max,a=r.min,l=r.abs,c=/[, ]+/,h=t.eve,d=" ",u="",p={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},f=/([clmz]),?([^clmz]*)/gi,m=/ progid:\S+Blur\([^\)]+\)/g,g=/-?[^,\s-]+/g,v="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",y=21600,b={path:1,rect:1,image:1},_={circle:1,ellipse:1},x=function(e,i,n){var r=t.matrix();return r.rotate(-e,.5,.5),{dx:r.x(i,n),dy:r.y(i,n)}},w=function(t,e,i,n,r,o){var s=t._,a=t.matrix,c=s.fillpos,h=t.node,u=h.style,p=1,f="",m=y/e,g=y/i;if(u.visibility="hidden",e&&i){if(h.coordsize=l(m)+d+l(g),u.rotation=o*(e*i<0?-1:1),o){var v=x(o,n,r);n=v.dx,r=v.dy}if(e<0&&(f+="x"),i<0&&(f+=" y")&&(p=-1),u.flip=f,h.coordorigin=n*-m+d+r*-g,c||s.fillsize){var b=h.getElementsByTagName("fill");b=b&&b[0],h.removeChild(b),c&&(v=x(o,a.x(c[0],c[1]),a.y(c[0],c[1])),b.position=v.dx*p+d+v.dy*p),s.fillsize&&(b.size=s.fillsize[0]*l(e)+d+s.fillsize[1]*l(i)),h.appendChild(b)}u.visibility="visible"}};t.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var k,C=function(t,e,n){for(var r=i(e).toLowerCase().split("-"),o=n?"end":"start",s=r.length,a="classic",l="medium",c="medium";s--;)switch(r[s]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":a=r[s];break;case"wide":case"narrow":c=r[s];break;case"long":case"short":l=r[s]}var h=t.node.getElementsByTagName("stroke")[0];h[o+"arrow"]=a,h[o+"arrowlength"]=l,h[o+"arrowwidth"]=c},S=function(r,l){r.attrs=r.attrs||{};var h=r.node,m=r.attrs,v=h.style,x=b[r.type]&&(l.x!=m.x||l.y!=m.y||l.width!=m.width||l.height!=m.height||l.cx!=m.cx||l.cy!=m.cy||l.rx!=m.rx||l.ry!=m.ry||l.r!=m.r),S=_[r.type]&&(m.cx!=l.cx||m.cy!=l.cy||m.r!=l.r||m.rx!=l.rx||m.ry!=l.ry),T=r;for(var A in l)l[e](A)&&(m[A]=l[A]);if(x&&(m.path=t._getPath[r.type](r),r._.dirty=1),l.href&&(h.href=l.href),l.title&&(h.title=l.title),l.target&&(h.target=l.target),l.cursor&&(v.cursor=l.cursor),"blur"in l&&r.blur(l.blur),(l.path&&"path"==r.type||x)&&(h.path=function(e){var n=/[ahqstv]/gi,r=t._pathToAbsolute;if(i(e).match(n)&&(r=t._path2curve),n=/[clmz]/g,r==t._pathToAbsolute&&!i(e).match(n)){var s=i(e).replace(f,function(t,e,i){var n=[],r="m"==e.toLowerCase(),s=p[e];return i.replace(g,function(t){r&&2==n.length&&(s+=n+p["m"==e?"l":"L"],n=[]),n.push(o(t*y))}),s+n});return s}var a,l,c=r(e);s=[];for(var h=0,m=c.length;h<m;h++){a=c[h],"z"==(l=c[h][0].toLowerCase())&&(l="x");for(var v=1,b=a.length;v<b;v++)l+=o(a[v]*y)+(v!=b-1?",":u);s.push(l)}return s.join(d)}(~i(m.path).toLowerCase().indexOf("r")?t._pathToAbsolute(m.path):m.path),r._.dirty=1,"image"==r.type&&(r._.fillpos=[m.x,m.y],r._.fillsize=[m.width,m.height],w(r,1,1,0,0,0))),"transform"in l&&r.transform(l.transform),S){var M=+m.cx,E=+m.cy,P=+m.rx||+m.r||0,I=+m.ry||+m.r||0;h.path=t.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",o((M-P)*y),o((E-I)*y),o((M+P)*y),o((E+I)*y),o(M*y)),r._.dirty=1}if("clip-rect"in l){var O=i(l["clip-rect"]).split(c);if(4==O.length){O[2]=+O[2]+ +O[0],O[3]=+O[3]+ +O[1];var N=h.clipRect||t._g.doc.createElement("div"),L=N.style;L.clip=t.format("rect({1}px {2}px {3}px {0}px)",O),h.clipRect||(L.position="absolute",L.top=0,L.left=0,L.width=r.paper.width+"px",L.height=r.paper.height+"px",h.parentNode.insertBefore(N,h),N.appendChild(h),h.clipRect=N)}l["clip-rect"]||h.clipRect&&(h.clipRect.style.clip="auto")}if(r.textpath){var j=r.textpath.style;l.font&&(j.font=l.font),l["font-family"]&&(j.fontFamily='"'+l["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,u)+'"'),l["font-size"]&&(j.fontSize=l["font-size"]),l["font-weight"]&&(j.fontWeight=l["font-weight"]),l["font-style"]&&(j.fontStyle=l["font-style"])}if("arrow-start"in l&&C(T,l["arrow-start"]),"arrow-end"in l&&C(T,l["arrow-end"],1),null!=l.opacity||null!=l.fill||null!=l.src||null!=l.stroke||null!=l["stroke-width"]||null!=l["stroke-opacity"]||null!=l["fill-opacity"]||null!=l["stroke-dasharray"]||null!=l["stroke-miterlimit"]||null!=l["stroke-linejoin"]||null!=l["stroke-linecap"]){var F=h.getElementsByTagName("fill");if(!(F=F&&F[0])&&(F=k("fill")),"image"==r.type&&l.src&&(F.src=l.src),l.fill&&(F.on=!0),null!=F.on&&"none"!=l.fill&&null!==l.fill||(F.on=!1),F.on&&l.fill){var $=i(l.fill).match(t._ISURL);if($){F.parentNode==h&&h.removeChild(F),F.rotate=!0,F.src=$[1],F.type="tile";var R=r.getBBox(1);F.position=R.x+d+R.y,r._.fillpos=[R.x,R.y],t._preload($[1],function(){r._.fillsize=[this.offsetWidth,this.offsetHeight]})}else F.color=t.getRGB(l.fill).hex,F.src=u,F.type="solid",t.getRGB(l.fill).error&&(T.type in{circle:1,ellipse:1}||"r"!=i(l.fill).charAt())&&D(T,l.fill,F)&&(m.fill="none",m.gradient=l.fill,F.rotate=!1)}if("fill-opacity"in l||"opacity"in l){var H=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+t.getRGB(l.fill).o+1||2)-1);H=a(s(H,0),1),F.opacity=H,F.src&&(F.color="none")}h.appendChild(F);var z=h.getElementsByTagName("stroke")&&h.getElementsByTagName("stroke")[0],B=!1;!z&&(B=z=k("stroke")),(l.stroke&&"none"!=l.stroke||l["stroke-width"]||null!=l["stroke-opacity"]||l["stroke-dasharray"]||l["stroke-miterlimit"]||l["stroke-linejoin"]||l["stroke-linecap"])&&(z.on=!0),("none"==l.stroke||null===l.stroke||null==z.on||0==l.stroke||0==l["stroke-width"])&&(z.on=!1);var U=t.getRGB(l.stroke);z.on&&l.stroke&&(z.color=U.hex),H=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+U.o+1||2)-1);var W=.75*(n(l["stroke-width"])||1);if(H=a(s(H,0),1),null==l["stroke-width"]&&(W=m["stroke-width"]),l["stroke-width"]&&(z.weight=W),W&&W<1&&(H*=W)&&(z.weight=1),z.opacity=H,l["stroke-linejoin"]&&(z.joinstyle=l["stroke-linejoin"]||"miter"),z.miterlimit=l["stroke-miterlimit"]||8,l["stroke-linecap"]&&(z.endcap="butt"==l["stroke-linecap"]?"flat":"square"==l["stroke-linecap"]?"square":"round"),"stroke-dasharray"in l){var Y={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};z.dashstyle=Y[e](l["stroke-dasharray"])?Y[l["stroke-dasharray"]]:u}B&&h.appendChild(z)}if("text"==T.type){T.paper.canvas.style.display=u;var V=T.paper.span,q=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/);v=V.style,m.font&&(v.font=m.font),m["font-family"]&&(v.fontFamily=m["font-family"]),m["font-weight"]&&(v.fontWeight=m["font-weight"]),m["font-style"]&&(v.fontStyle=m["font-style"]),q=n(m["font-size"]||q&&q[0])||10,v.fontSize=100*q+"px",T.textpath.string&&(V.innerHTML=i(T.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var G=V.getBoundingClientRect();T.W=m.w=(G.right-G.left)/100,T.H=m.h=(G.bottom-G.top)/100,T.X=m.x,T.Y=m.y+T.H/2,("x"in l||"y"in l)&&(T.path.v=t.format("m{0},{1}l{2},{1}",o(m.x*y),o(m.y*y),o(m.x*y)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],X=0,Z=K.length;X<Z;X++)if(K[X]in l){T._.dirty=1;break}switch(m["text-anchor"]){case"start":T.textpath.style["v-text-align"]="left",T.bbx=T.W/2;break;case"end":T.textpath.style["v-text-align"]="right",T.bbx=-T.W/2;break;default:T.textpath.style["v-text-align"]="center",T.bbx=0}T.textpath.style["v-text-kern"]=!0}},D=function(e,o,s){e.attrs=e.attrs||{};e.attrs;var a=Math.pow,l="linear",c=".5 .5";if(e.attrs.gradient=o,o=(o=i(o).replace(t._radial_gradient,function(t,e,i){return l="radial",e&&i&&(e=n(e),i=n(i),a(e-.5,2)+a(i-.5,2)>.25&&(i=r.sqrt(.25-a(e-.5,2))*(2*(i>.5)-1)+.5),c=e+d+i),u})).split(/\s*\-\s*/),"linear"==l){var h=o.shift();if(h=-n(h),isNaN(h))return null}var p=t._parseDots(o);if(!p)return null;if(e=e.shape||e.node,p.length){e.removeChild(s),s.on=!0,s.method="none",s.color=p[0].color,s.color2=p[p.length-1].color;for(var f=[],m=0,g=p.length;m<g;m++)p[m].offset&&f.push(p[m].offset+d+p[m].color);s.colors=f.length?f.join():"0% "+s.color,"radial"==l?(s.type="gradientTitle",s.focus="100%",s.focussize="0 0",s.focusposition=c,s.angle=0):(s.type="gradient",s.angle=(270-h)%360),e.appendChild(s)}return 1},T=function(e,i){this[0]=this.node=e,e.raphael=!0,this.id=t._oid++,e.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=i,this.matrix=t.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!i.bottom&&(i.bottom=this),this.prev=i.top,i.top&&(i.top.next=this),i.top=this,this.next=null},A=t.el;T.prototype=A,A.constructor=T,A.transform=function(e){if(null==e)return this._.transform;var n,r=this.paper._viewBoxShift,o=r?"s"+[r.scale,r.scale]+"-1-1t"+[r.dx,r.dy]:u;r&&(n=e=i(e).replace(/\.{3}|\u2026/g,this._.transform||u)),t._extractTransform(this,o+e);var s,a=this.matrix.clone(),l=this.skew,c=this.node,h=~i(this.attrs.fill).indexOf("-"),p=!i(this.attrs.fill).indexOf("url(");if(a.translate(1,1),p||h||"image"==this.type)if(l.matrix="1 0 0 1",l.offset="0 0",s=a.split(),h&&s.noRotation||!s.isSimple){c.style.filter=a.toFilter();var f=this.getBBox(),m=this.getBBox(1),g=f.x-m.x,v=f.y-m.y;c.coordorigin=g*-y+d+v*-y,w(this,1,1,g,v,0)}else c.style.filter=u,w(this,s.scalex,s.scaley,s.dx,s.dy,s.rotate);else c.style.filter=u,l.matrix=i(a),l.offset=a.offset();return null!==n&&(this._.transform=n,t._extractTransform(this,n)),this},A.rotate=function(t,e,r){if(this.removed)return this;if(null!=t){if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2])),t=n(t[0]),null==r&&(e=r),null==e||null==r){var o=this.getBBox(1);e=o.x+o.width/2,r=o.y+o.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",t,e,r]])),this}},A.translate=function(t,e){return this.removed?this:((t=i(t).split(c)).length-1&&(e=n(t[1])),t=n(t[0])||0,e=+e||0,this._.bbox&&(this._.bbox.x+=t,this._.bbox.y+=e),this.transform(this._.transform.concat([["t",t,e]])),this)},A.scale=function(t,e,r,o){if(this.removed)return this;if((t=i(t).split(c)).length-1&&(e=n(t[1]),r=n(t[2]),o=n(t[3]),isNaN(r)&&(r=null),isNaN(o)&&(o=null)),t=n(t[0]),null==e&&(e=t),null==o&&(r=o),null==r||null==o)var s=this.getBBox(1);return r=null==r?s.x+s.width/2:r,o=null==o?s.y+s.height/2:o,this.transform(this._.transform.concat([["s",t,e,r,o]])),this._.dirtyT=1,this},A.hide=function(){return!this.removed&&(this.node.style.display="none"),this},A.show=function(){return!this.removed&&(this.node.style.display=u),this},A.auxGetBBox=t.el.getBBox,A.getBBox=function(){var t=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var e={},i=1/this.paper._viewBoxShift.scale;return e.x=t.x-this.paper._viewBoxShift.dx,e.x*=i,e.y=t.y-this.paper._viewBoxShift.dy,e.y*=i,e.width=t.width*i,e.height=t.height*i,e.x2=e.x+e.width,e.y2=e.y+e.height,e}return t},A._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},A.remove=function(){if(!this.removed&&this.node.parentNode){for(var e in this.paper.__set__&&this.paper.__set__.exclude(this),t.eve.unbind("raphael.*.*."+this.id),t._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;this.removed=!0}},A.attr=function(i,n){if(this.removed)return this;if(null==i){var r={};for(var o in this.attrs)this.attrs[e](o)&&(r[o]=this.attrs[o]);return r.gradient&&"none"==r.fill&&(r.fill=r.gradient)&&delete r.gradient,r.transform=this._.transform,r}if(null==n&&t.is(i,"string")){if("fill"==i&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(var s=i.split(c),a={},l=0,d=s.length;l<d;l++)(i=s[l])in this.attrs?a[i]=this.attrs[i]:t.is(this.paper.customAttributes[i],"function")?a[i]=this.paper.customAttributes[i].def:a[i]=t._availableAttrs[i];return d-1?a:a[s[0]]}if(this.attrs&&null==n&&t.is(i,"array")){for(a={},l=0,d=i.length;l<d;l++)a[i[l]]=this.attr(i[l]);return a}var u;for(var p in null!=n&&((u={})[i]=n),null==n&&t.is(i,"object")&&(u=i),u)h("raphael.attr."+p+"."+this.id,this,u[p]);if(u){for(p in this.paper.customAttributes)if(this.paper.customAttributes[e](p)&&u[e](p)&&t.is(this.paper.customAttributes[p],"function")){var f=this.paper.customAttributes[p].apply(this,[].concat(u[p]));for(var m in this.attrs[p]=u[p],f)f[e](m)&&(u[m]=f[m])}u.text&&"text"==this.type&&(this.textpath.string=u.text),S(this,u)}return this},A.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&t._tofront(this,this.paper),this},A.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),t._toback(this,this.paper)),this)},A.insertAfter=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[e.length-1]),e.node.nextSibling?e.node.parentNode.insertBefore(this.node,e.node.nextSibling):e.node.parentNode.appendChild(this.node),t._insertafter(this,e,this.paper),this)},A.insertBefore=function(e){return this.removed?this:(e.constructor==t.st.constructor&&(e=e[0]),e.node.parentNode.insertBefore(this.node,e.node),t._insertbefore(this,e,this.paper),this)},A.blur=function(e){var i=this.node.runtimeStyle,n=i.filter;return n=n.replace(m,u),0!=+e?(this.attrs.blur=e,i.filter=n+d+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+e||1.5)+")",i.margin=t.format("-{0}px 0 0 -{0}px",o(+e||1.5))):(i.filter=n,i.margin=0,delete this.attrs.blur),this},t._engine.path=function(t,e){var i=k("shape");i.style.cssText=v,i.coordsize=y+d+y,i.coordorigin=e.coordorigin;var n=new T(i,e),r={fill:"none",stroke:"#000"};t&&(r.path=t),n.type="path",n.path=[],n.Path=u,S(n,r),e.canvas&&e.canvas.appendChild(i);var o=k("skew");return o.on=!0,i.appendChild(o),n.skew=o,n.transform(u),n},t._engine.rect=function(e,i,n,r,o,s){var a=t._rectPath(i,n,r,o,s),l=e.path(a),c=l.attrs;return l.X=c.x=i,l.Y=c.y=n,l.W=c.width=r,l.H=c.height=o,c.r=s,c.path=a,l.type="rect",l},t._engine.ellipse=function(t,e,i,n,r){var o=t.path();o.attrs;return o.X=e-n,o.Y=i-r,o.W=2*n,o.H=2*r,o.type="ellipse",S(o,{cx:e,cy:i,rx:n,ry:r}),o},t._engine.circle=function(t,e,i,n){var r=t.path();r.attrs;return r.X=e-n,r.Y=i-n,r.W=r.H=2*n,r.type="circle",S(r,{cx:e,cy:i,r:n}),r},t._engine.image=function(e,i,n,r,o,s){var a=t._rectPath(n,r,o,s),l=e.path(a).attr({stroke:"none"}),c=l.attrs,h=l.node,d=h.getElementsByTagName("fill")[0];return c.src=i,l.X=c.x=n,l.Y=c.y=r,l.W=c.width=o,l.H=c.height=s,c.path=a,l.type="image",d.parentNode==h&&h.removeChild(d),d.rotate=!0,d.src=i,d.type="tile",l._.fillpos=[n,r],l._.fillsize=[o,s],h.appendChild(d),w(l,1,1,0,0,0),l},t._engine.text=function(e,n,r,s){var a=k("shape"),l=k("path"),c=k("textpath");n=n||0,r=r||0,s=s||"",l.v=t.format("m{0},{1}l{2},{1}",o(n*y),o(r*y),o(n*y)+1),l.textpathok=!0,c.string=i(s),c.on=!0,a.style.cssText=v,a.coordsize=y+d+y,a.coordorigin="0 0";var h=new T(a,e),p={fill:"#000",stroke:"none",font:t._availableAttrs.font,text:s};h.shape=a,h.path=l,h.textpath=c,h.type="text",h.attrs.text=i(s),h.attrs.x=n,h.attrs.y=r,h.attrs.w=1,h.attrs.h=1,S(h,p),a.appendChild(c),a.appendChild(l),e.canvas.appendChild(a);var f=k("skew");return f.on=!0,a.appendChild(f),h.skew=f,h.transform(u),h},t._engine.setSize=function(e,i){var n=this.canvas.style;return this.width=e,this.height=i,e==+e&&(e+="px"),i==+i&&(i+="px"),n.width=e,n.height=i,n.clip="rect(0 "+e+" "+i+" 0)",this._viewBox&&t._engine.setViewBox.apply(this,this._viewBox),this},t._engine.setViewBox=function(e,i,n,r,o){t.eve("raphael.setViewBox",this,this._viewBox,[e,i,n,r,o]);var s,a,l=this.getSize(),c=l.width,h=l.height;return o&&(a=c/n,n*(s=h/r)<c&&(e-=(c-n*s)/2/s),r*a<h&&(i-=(h-r*a)/2/a)),this._viewBox=[e,i,n,r,!!o],this._viewBoxShift={dx:-e,dy:-i,scale:l},this.forEach(function(t){t.transform("...")}),this},t._engine.initWin=function(t){var e=t.document;e.styleSheets.length<31?e.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):e.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!e.namespaces.rvml&&e.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),k=function(t){return e.createElement("<rvml:"+t+' class="rvml">')}}catch(t){k=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),i=e.container,n=e.height,r=e.width,o=e.x,s=e.y;if(!i)throw new Error("VML container not found.");var a=new t._Paper,l=a.canvas=t._g.doc.createElement("div"),c=l.style;return o=o||0,s=s||0,r=r||512,n=n||342,a.width=r,a.height=n,r==+r&&(r+="px"),n==+n&&(n+="px"),a.coordsize=216e5+d+216e5,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(a.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",r,n),1==i?(t._g.doc.body.appendChild(l),c.left=o+"px",c.top=s+"px",c.position="absolute"):i.firstChild?i.insertBefore(l,i.firstChild):i.appendChild(l),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=u,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){for(var e in t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var M=t.st;for(var E in A)A[e](E)&&!M[e](E)&&(M[E]=function(t){return function(){var e=arguments;return this.forEach(function(i){i[t].apply(i,e)})}}(E))}}.apply(e,n))||(t.exports=r)}])}),function(){var t,e,i,n,r=[].slice,o=function(t,e){return function(){return t.apply(e,arguments)}},s={}.hasOwnProperty,a=function(t,e){for(var i in e)s.call(e,i)&&(t[i]=e[i]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l=[].indexOf||function(t){for(var e=0,i=this.length;e<i;e++)if(e in this&&this[e]===t)return e;return-1};e=window.Morris={},t=jQuery,e.EventEmitter=function(){function t(){}return t.prototype.on=function(t,e){return null==this.handlers&&(this.handlers={}),null==this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this},t.prototype.fire=function(){var t,e,i,n,o,s,a;if(i=arguments[0],t=2<=arguments.length?r.call(arguments,1):[],null!=this.handlers&&null!=this.handlers[i]){for(a=[],n=0,o=(s=this.handlers[i]).length;n<o;n++)e=s[n],a.push(e.apply(null,t));return a}},t}(),e.commas=function(t){var e,i,n,r;return null!=t?(n=t<0?"-":"",e=Math.abs(t),n+=(i=Math.floor(e).toFixed(0)).replace(/(?=(?:\d{3})+$)(?!^)/g,","),(r=e.toString()).length>i.length&&(n+=r.slice(i.length)),n):"-"},e.pad2=function(t){return(t<10?"0":"")+t},e.Grid=function(i){function n(e){this.resizeHandler=o(this.resizeHandler,this);var i=this;if("string"==typeof e.element?this.el=t(document.getElementById(e.element)):this.el=t(e.element),null==this.el||0===this.el.length)throw new Error("Graph container element not found");"static"===this.el.css("position")&&this.el.css("position","relative"),this.options=t.extend({},this.gridDefaults,this.defaults||{},e),"string"==typeof this.options.units&&(this.options.postUnits=e.units),this.raphael=new Raphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.selectFrom=null,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(t){var e,n,r,o;return n=i.el.offset(),o=t.pageX-n.left,i.selectFrom?(e=i.data[i.hitTest(Math.min(o,i.selectFrom))]._x,r=i.data[i.hitTest(Math.max(o,i.selectFrom))]._x-e,i.selectionRect.attr({x:e,width:r})):i.fire("hovermove",o,t.pageY-n.top)}),this.el.bind("mouseleave",function(t){return i.selectFrom&&(i.selectionRect.hide(),i.selectFrom=null),i.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(t){var e,n;return n=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],e=i.el.offset(),i.fire("hovermove",n.pageX-e.left,n.pageY-e.top)}),this.el.bind("click",function(t){var e;return e=i.el.offset(),i.fire("gridclick",t.pageX-e.left,t.pageY-e.top)}),this.options.rangeSelect&&(this.selectionRect=this.raphael.rect(0,0,0,this.el.innerHeight()).attr({fill:this.options.rangeSelectColor,stroke:!1}).toBack().hide(),this.el.bind("mousedown",function(t){var e;return e=i.el.offset(),i.startRange(t.pageX-e.left)}),this.el.bind("mouseup",function(t){var e;return e=i.el.offset(),i.endRange(t.pageX-e.left),i.fire("hovermove",t.pageX-e.left,t.pageY-e.top)})),this.options.resize&&t(window).bind("resize",function(t){return null!=i.timeoutId&&window.clearTimeout(i.timeoutId),i.timeoutId=window.setTimeout(i.resizeHandler,100)}),this.el.css("-webkit-tap-highlight-color","rgba(0,0,0,0)"),this.postInit&&this.postInit()}return a(n,i),n.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,gridTextFamily:"sans-serif",gridTextWeight:"normal",hideHover:!1,yLabelFormat:null,xLabelAngle:0,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"],rangeSelect:null,rangeSelectColor:"#eef",resize:!1},n.prototype.setData=function(t,i){var n,r,o,s,a,l,c,h,d,u,p,f,m,g,v;return null==i&&(i=!0),this.options.data=t,null==t||0===t.length?(this.data=[],this.raphael.clear(),void(null!=this.hover&&this.hover.hide())):(f=this.cumulative?0:null,m=this.cumulative?0:null,this.options.goals.length>0&&(a=Math.min.apply(Math,this.options.goals),s=Math.max.apply(Math,this.options.goals),m=null!=m?Math.min(m,a):a,f=null!=f?Math.max(f,s):s),this.data=function(){var i,n,s;for(s=[],o=i=0,n=t.length;i<n;o=++i)c=t[o],(l={src:c}).label=c[this.options.xkey],this.options.parseTime?(l.x=e.parseDate(l.label),this.options.dateFormat?l.label=this.options.dateFormat(l.x):"number"==typeof l.label&&(l.label=new Date(l.label).toString())):(l.x=o,this.options.xLabelFormat&&(l.label=this.options.xLabelFormat(l))),d=0,l.y=function(){var t,e,i,n;for(i=this.options.ykeys,n=[],r=t=0,e=i.length;t<e;r=++t)p=i[r],"string"==typeof(g=c[p])&&(g=parseFloat(g)),null!=g&&"number"!=typeof g&&(g=null),null!=g&&(this.cumulative?d+=g:null!=f?(f=Math.max(g,f),m=Math.min(g,m)):f=m=g),this.cumulative&&null!=d&&(f=Math.max(d,f),m=Math.min(d,m)),n.push(g);return n}.call(this),s.push(l);return s}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(t,e){return(t.x>e.x)-(e.x>t.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.events.length>0&&(this.options.parseTime?this.events=function(){var t,i,r,o;for(o=[],t=0,i=(r=this.options.events).length;t<i;t++)n=r[t],o.push(e.parseDate(n));return o}.call(this):this.events=this.options.events,this.xmax=Math.max(this.xmax,Math.max.apply(Math,this.events)),this.xmin=Math.min(this.xmin,Math.min.apply(Math,this.events))),this.xmin===this.xmax&&(this.xmin-=1,this.xmax+=1),this.ymin=this.yboundary("min",m),this.ymax=this.yboundary("max",f),this.ymin===this.ymax&&(m&&(this.ymin-=1),this.ymax+=1),!0!==(v=this.options.axes)&&"both"!==v&&"y"!==v&&!0!==this.options.grid||(this.options.ymax===this.gridDefaults.ymax&&this.options.ymin===this.gridDefaults.ymin?(this.grid=this.autoGridLines(this.ymin,this.ymax,this.options.numLines),this.ymin=Math.min(this.ymin,this.grid[0]),this.ymax=Math.max(this.ymax,this.grid[this.grid.length-1])):(h=(this.ymax-this.ymin)/(this.options.numLines-1),this.grid=function(){var t,e,i;for(i=[],u=t=this.ymin,e=this.ymax;h>0?t<=e:t>=e;u=t+=h)i.push(u);return i}.call(this))),this.dirty=!0,i?this.redraw():void 0)},n.prototype.yboundary=function(t,e){var i,n;return"string"==typeof(i=this.options["y"+t])?"auto"===i.slice(0,4)?i.length>5?(n=parseInt(i.slice(5),10),null==e?n:Math[t](e,n)):null!=e?e:0:parseInt(i,10):i},n.prototype.autoGridLines=function(t,e,i){var n,r,o,s,a,l,c,h,d;return a=e-t,d=Math.floor(Math.log(a)/Math.log(10)),c=Math.pow(10,d),r=Math.floor(t/c)*c,n=Math.ceil(e/c)*c,l=(n-r)/(i-1),1===c&&l>1&&Math.ceil(l)!==l&&(l=Math.ceil(l),n=r+l*(i-1)),r<0&&n>0&&(r=Math.floor(t/l)*l,n=Math.ceil(e/l)*l),l<1?(s=Math.floor(Math.log(l)/Math.log(10)),o=function(){var t,e;for(e=[],h=t=r;l>0?t<=n:t>=n;h=t+=l)e.push(parseFloat(h.toFixed(1-s)));return e}()):o=function(){var t,e;for(e=[],h=t=r;l>0?t<=n:t>=n;h=t+=l)e.push(h);return e}(),o},n.prototype._calc=function(){var t,e,i,n,r,o,s,a;if(r=this.el.width(),i=this.el.height(),(this.elementWidth!==r||this.elementHeight!==i||this.dirty)&&(this.elementWidth=r,this.elementHeight=i,this.dirty=!1,this.left=this.options.padding,this.right=this.elementWidth-this.options.padding,this.top=this.options.padding,this.bottom=this.elementHeight-this.options.padding,!0!==(s=this.options.axes)&&"both"!==s&&"y"!==s||(o=function(){var t,i,n,r;for(r=[],t=0,i=(n=this.grid).length;t<i;t++)e=n[t],r.push(this.measureText(this.yAxisFormat(e)).width);return r}.call(this),this.left+=Math.max.apply(Math,o)),!0!==(a=this.options.axes)&&"both"!==a&&"x"!==a||(t=function(){var t,e,i;for(i=[],n=t=0,e=this.data.length;0<=e?t<e:t>e;n=0<=e?++t:--t)i.push(this.measureText(this.data[n].text,-this.options.xLabelAngle).height);return i}.call(this),this.bottom-=Math.max.apply(Math,t)),this.width=Math.max(1,this.right-this.left),this.height=Math.max(1,this.bottom-this.top),this.dx=this.width/(this.xmax-this.xmin),this.dy=this.height/(this.ymax-this.ymin),this.calc))return this.calc()},n.prototype.transY=function(t){return this.bottom-(t-this.ymin)*this.dy},n.prototype.transX=function(t){return 1===this.data.length?(this.left+this.right)/2:this.left+(t-this.xmin)*this.dx},n.prototype.redraw=function(){if(this.raphael.clear(),this._calc(),this.drawGrid(),this.drawGoals(),this.drawEvents(),this.draw)return this.draw()},n.prototype.measureText=function(t,e){var i,n;return null==e&&(e=0),i=(n=this.raphael.text(100,100,t).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).rotate(e)).getBBox(),n.remove(),i},n.prototype.yAxisFormat=function(t){return this.yLabelFormat(t)},n.prototype.yLabelFormat=function(t){return"function"==typeof this.options.yLabelFormat?this.options.yLabelFormat(t):""+this.options.preUnits+e.commas(t)+this.options.postUnits},n.prototype.drawGrid=function(){var t,e,i,n,r,o,s,a;if(!1!==this.options.grid||!0===(r=this.options.axes)||"both"===r||"y"===r){for(a=[],i=0,n=(o=this.grid).length;i<n;i++)t=o[i],e=this.transY(t),!0!==(s=this.options.axes)&&"both"!==s&&"y"!==s||this.drawYAxisLabel(this.left-this.options.padding/2,e,this.yAxisFormat(t)),this.options.grid?a.push(this.drawGridLine("M"+this.left+","+e+"H"+(this.left+this.width))):a.push(void 0);return a}},n.prototype.drawGoals=function(){var t,e,i,n,r,o,s;for(s=[],i=n=0,r=(o=this.options.goals).length;n<r;i=++n)e=o[i],t=this.options.goalLineColors[i%this.options.goalLineColors.length],s.push(this.drawGoal(e,t));return s},n.prototype.drawEvents=function(){var t,e,i,n,r,o,s;for(s=[],i=n=0,r=(o=this.events).length;n<r;i=++n)e=o[i],t=this.options.eventLineColors[i%this.options.eventLineColors.length],s.push(this.drawEvent(e,t));return s},n.prototype.drawGoal=function(t,e){return this.raphael.path("M"+this.left+","+this.transY(t)+"H"+this.right).attr("stroke",e).attr("stroke-width",this.options.goalStrokeWidth)},n.prototype.drawEvent=function(t,e){return this.raphael.path("M"+this.transX(t)+","+this.bottom+"V"+this.top).attr("stroke",e).attr("stroke-width",this.options.eventStrokeWidth)},n.prototype.drawYAxisLabel=function(t,e,i){return this.raphael.text(t,e,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor).attr("text-anchor","end")},n.prototype.drawGridLine=function(t){return this.raphael.path(t).attr("stroke",this.options.gridLineColor).attr("stroke-width",this.options.gridStrokeWidth)},n.prototype.startRange=function(t){return this.hover.hide(),this.selectFrom=t,this.selectionRect.attr({x:t,width:0}).show()},n.prototype.endRange=function(t){var e,i;if(this.selectFrom)return i=Math.min(this.selectFrom,t),e=Math.max(this.selectFrom,t),this.options.rangeSelect.call(this.el,{start:this.data[this.hitTest(i)].x,end:this.data[this.hitTest(e)].x}),this.selectFrom=null},n.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},n}(e.EventEmitter),e.parseDate=function(t){var e,i,n,r,o,s,a,l,c,h,d;return"number"==typeof t?t:(i=t.match(/^(\d+) Q(\d)$/),r=t.match(/^(\d+)-(\d+)$/),o=t.match(/^(\d+)-(\d+)-(\d+)$/),a=t.match(/^(\d+) W(\d+)$/),l=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+)(Z|([+-])(\d\d):?(\d\d))?$/),c=t.match(/^(\d+)-(\d+)-(\d+)[ T](\d+):(\d+):(\d+(\.\d+)?)(Z|([+-])(\d\d):?(\d\d))?$/),i?new Date(parseInt(i[1],10),3*parseInt(i[2],10)-1,1).getTime():r?new Date(parseInt(r[1],10),parseInt(r[2],10)-1,1).getTime():o?new Date(parseInt(o[1],10),parseInt(o[2],10)-1,parseInt(o[3],10)).getTime():a?(4!==(h=new Date(parseInt(a[1],10),0,1)).getDay()&&h.setMonth(0,1+(4-h.getDay()+7)%7),h.getTime()+6048e5*parseInt(a[2],10)):l?l[6]?(s=0,"Z"!==l[6]&&(s=60*parseInt(l[8],10)+parseInt(l[9],10),"+"===l[7]&&(s=0-s)),Date.UTC(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)+s)):new Date(parseInt(l[1],10),parseInt(l[2],10)-1,parseInt(l[3],10),parseInt(l[4],10),parseInt(l[5],10)).getTime():c?(d=parseFloat(c[6]),e=Math.floor(d),n=Math.round(1e3*(d-e)),c[8]?(s=0,"Z"!==c[8]&&(s=60*parseInt(c[10],10)+parseInt(c[11],10),"+"===c[9]&&(s=0-s)),Date.UTC(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10)+s,e,n)):new Date(parseInt(c[1],10),parseInt(c[2],10)-1,parseInt(c[3],10),parseInt(c[4],10),parseInt(c[5],10),e,n).getTime()):new Date(parseInt(t,10),0,1).getTime())},e.Hover=function(){function i(i){null==i&&(i={}),this.options=t.extend({},e.Hover.defaults,i),this.el=t("<div class='"+this.options.class+"'></div>"),this.el.hide(),this.options.parent.append(this.el)}return i.defaults={class:"morris-hover morris-default-style"},i.prototype.update=function(t,e,i){return t?(this.html(t),this.show(),this.moveTo(e,i)):this.hide()},i.prototype.html=function(t){return this.el.html(t)},i.prototype.moveTo=function(t,e){var i,n,r,o,s,a;return s=this.options.parent.innerWidth(),o=this.options.parent.innerHeight(),n=this.el.outerWidth(),i=this.el.outerHeight(),r=Math.min(Math.max(0,t-n/2),s-n),null!=e?(a=e-i-10)<0&&(a=e+10)+i>o&&(a=o/2-i/2):a=o/2-i/2,this.el.css({left:r+"px",top:parseInt(a)+"px"})},i.prototype.show=function(){return this.el.show()},i.prototype.hide=function(){return this.el.hide()},i}(),e.Line=function(t){function i(t){if(this.hilight=o(this.hilight,this),this.onHoverOut=o(this.onHoverOut,this),this.onHoverMove=o(this.onHoverMove,this),this.onGridClick=o(this.onGridClick,this),!(this instanceof e.Line))return new e.Line(t);i.__super__.constructor.call(this,t)}return a(i,t),i.prototype.init=function(){if("always"!==this.options.hideHover)return this.hover=new e.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},i.prototype.defaults={lineWidth:3,pointSize:4,lineColors:["#0b62a4","#7A92A3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],pointStrokeWidths:[1],pointStrokeColors:["#ffffff"],pointFillColors:[],smooth:!0,xLabels:"auto",xLabelFormat:null,xLabelMargin:24,hideHover:!1},i.prototype.calc=function(){return this.calcPoints(),this.generatePaths()},i.prototype.calcPoints=function(){var t,e,i,n,r,o;for(o=[],i=0,n=(r=this.data).length;i<n;i++)(t=r[i])._x=this.transX(t.x),t._y=function(){var i,n,r,o;for(o=[],i=0,n=(r=t.y).length;i<n;i++)null!=(e=r[i])?o.push(this.transY(e)):o.push(e);return o}.call(this),o.push(t._ymax=Math.min.apply(Math,[this.bottom].concat(function(){var i,n,r,o;for(o=[],i=0,n=(r=t._y).length;i<n;i++)null!=(e=r[i])&&o.push(e);return o}())));return o},i.prototype.hitTest=function(t){var e,i,n,r;if(0===this.data.length)return null;for(e=i=0,n=(r=this.data.slice(1)).length;i<n&&!(t<(r[e]._x+this.data[e]._x)/2);e=++i);return e},i.prototype.onGridClick=function(t,e){var i;return i=this.hitTest(t),this.fire("click",i,this.data[i].src,t,e)},i.prototype.onHoverMove=function(t,e){var i;return i=this.hitTest(t),this.displayHoverForRow(i)},i.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.displayHoverForRow(null)},i.prototype.displayHoverForRow=function(t){var e;return null!=t?((e=this.hover).update.apply(e,this.hoverContentForRow(t)),this.hilight(t)):(this.hover.hide(),this.hilight())},i.prototype.hoverContentForRow=function(t){var e,i,n,r,o,s,a;for(e="<div class='morris-hover-row-label'>"+(n=this.data[t]).label+"</div>",i=o=0,s=(a=n.y).length;o<s;i=++o)r=a[i],e+="<div class='morris-hover-point' style='color: "+this.colorFor(n,i,"label")+"'>\n "+this.options.labels[i]+":\n "+this.yLabelFormat(r)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(e=this.options.hoverCallback(t,this.options,e,n.src)),[e,n._x,n._ymax]},i.prototype.generatePaths=function(){var t,i,n,r;return this.paths=function(){var o,s,a,c;for(c=[],i=o=0,s=this.options.ykeys.length;0<=s?o<s:o>s;i=0<=s?++o:--o)r="boolean"==typeof this.options.smooth?this.options.smooth:(a=this.options.ykeys[i],l.call(this.options.smooth,a)>=0),(t=function(){var t,e,r,o;for(o=[],t=0,e=(r=this.data).length;t<e;t++)void 0!==(n=r[t])._y[i]&&o.push({x:n._x,y:n._y[i]});return o}.call(this)).length>1?c.push(e.Line.createPath(t,r,this.bottom)):c.push(null);return c}.call(this)},i.prototype.draw=function(){var t;if(!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries(),!1===this.options.hideHover)return this.displayHoverForRow(this.data.length-1)},i.prototype.drawXAxis=function(){var t,i,n,r,o,s,a,l,c,h,d=this;for(a=this.bottom+this.options.padding/2,o=null,r=null,t=function(t,e){var i,n,s,l,c;return c=(i=d.drawXAxisLabel(d.transX(e),a,t)).getBBox(),i.transform("r"+-d.options.xLabelAngle),n=i.getBBox(),i.transform("t0,"+n.height/2+"..."),0!==d.options.xLabelAngle&&(l=-.5*c.width*Math.cos(d.options.xLabelAngle*Math.PI/180),i.transform("t"+l+",0...")),n=i.getBBox(),(null==o||o>=n.x+n.width||null!=r&&r>=n.x)&&n.x>=0&&n.x+n.width<d.el.width()?(0!==d.options.xLabelAngle&&(s=1.25*d.options.gridTextSize/Math.sin(d.options.xLabelAngle*Math.PI/180),r=n.x-s),o=n.x-d.options.xLabelMargin):i.remove()},(n=this.options.parseTime?1===this.data.length&&"auto"===this.options.xLabels?[[this.data[0].label,this.data[0].x]]:e.labelSeries(this.xmin,this.xmax,this.width,this.options.xLabels,this.options.xLabelFormat):function(){var t,e,i,n;for(n=[],t=0,e=(i=this.data).length;t<e;t++)s=i[t],n.push([s.label,s.x]);return n}.call(this)).reverse(),h=[],l=0,c=n.length;l<c;l++)i=n[l],h.push(t(i[0],i[1]));return h},i.prototype.drawSeries=function(){var t,e,i,n,r,o;for(this.seriesPoints=[],t=e=n=this.options.ykeys.length-1;n<=0?e<=0:e>=0;t=n<=0?++e:--e)this._drawLineFor(t);for(o=[],t=i=r=this.options.ykeys.length-1;r<=0?i<=0:i>=0;t=r<=0?++i:--i)o.push(this._drawPointFor(t));return o},i.prototype._drawPointFor=function(t){var e,i,n,r,o,s;for(this.seriesPoints[t]=[],s=[],n=0,r=(o=this.data).length;n<r;n++)e=null,null!=(i=o[n])._y[t]&&(e=this.drawLinePoint(i._x,i._y[t],this.colorFor(i,t,"point"),t)),s.push(this.seriesPoints[t].push(e));return s},i.prototype._drawLineFor=function(t){var e;if(null!==(e=this.paths[t]))return this.drawLinePath(e,this.colorFor(null,t,"line"),t)},i.createPath=function(t,i,n){var r,o,s,a,l,c,h,d,u,p;for(h="",i&&(s=e.Line.gradients(t)),d={y:null},a=u=0,p=t.length;u<p;a=++u)null!=(r=t[a]).y&&(null!=d.y?i?(o=s[a],c=s[a-1],l=(r.x-d.x)/4,h+="C"+(d.x+l)+","+Math.min(n,d.y+l*c)+","+(r.x-l)+","+Math.min(n,r.y-l*o)+","+r.x+","+r.y):h+="L"+r.x+","+r.y:i&&null==s[a]||(h+="M"+r.x+","+r.y)),d=r;return h},i.gradients=function(t){var e,i,n,r,o,s,a,l;for(i=function(t,e){return(t.y-e.y)/(t.x-e.x)},l=[],n=s=0,a=t.length;s<a;n=++s)null!=(e=t[n]).y?(r=t[n+1]||{y:null},null!=(o=t[n-1]||{y:null}).y&&null!=r.y?l.push(i(o,r)):null!=o.y?l.push(i(o,e)):null!=r.y?l.push(i(e,r)):l.push(null)):l.push(null);return l},i.prototype.hilight=function(t){var e,i,n,r,o;if(null!==this.prevHilight&&this.prevHilight!==t)for(e=i=0,r=this.seriesPoints.length-1;0<=r?i<=r:i>=r;e=0<=r?++i:--i)this.seriesPoints[e][this.prevHilight]&&this.seriesPoints[e][this.prevHilight].animate(this.pointShrinkSeries(e));if(null!==t&&this.prevHilight!==t)for(e=n=0,o=this.seriesPoints.length-1;0<=o?n<=o:n>=o;e=0<=o?++n:--n)this.seriesPoints[e][t]&&this.seriesPoints[e][t].animate(this.pointGrowSeries(e));return this.prevHilight=t},i.prototype.colorFor=function(t,e,i){return"function"==typeof this.options.lineColors?this.options.lineColors.call(this,t,e,i):"point"===i&&this.options.pointFillColors[e%this.options.pointFillColors.length]||this.options.lineColors[e%this.options.lineColors.length]},i.prototype.drawXAxisLabel=function(t,e,i){return this.raphael.text(t,e,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},i.prototype.drawLinePath=function(t,e,i){return this.raphael.path(t).attr("stroke",e).attr("stroke-width",this.lineWidthForSeries(i))},i.prototype.drawLinePoint=function(t,e,i,n){return this.raphael.circle(t,e,this.pointSizeForSeries(n)).attr("fill",i).attr("stroke-width",this.pointStrokeWidthForSeries(n)).attr("stroke",this.pointStrokeColorForSeries(n))},i.prototype.pointStrokeWidthForSeries=function(t){return this.options.pointStrokeWidths[t%this.options.pointStrokeWidths.length]},i.prototype.pointStrokeColorForSeries=function(t){return this.options.pointStrokeColors[t%this.options.pointStrokeColors.length]},i.prototype.lineWidthForSeries=function(t){return this.options.lineWidth instanceof Array?this.options.lineWidth[t%this.options.lineWidth.length]:this.options.lineWidth},i.prototype.pointSizeForSeries=function(t){return this.options.pointSize instanceof Array?this.options.pointSize[t%this.options.pointSize.length]:this.options.pointSize},i.prototype.pointGrowSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)+3},25,"linear")},i.prototype.pointShrinkSeries=function(t){return Raphael.animation({r:this.pointSizeForSeries(t)},25,"linear")},i}(e.Grid),e.labelSeries=function(i,n,r,o,s){var a,l,c,h,d,u,p,f,m,g,v;if(c=200*(n-i)/r,l=new Date(i),void 0===(p=e.LABEL_SPECS[o]))for(m=0,g=(v=e.AUTO_LABEL_ORDER).length;m<g;m++)if(h=v[m],c>=(u=e.LABEL_SPECS[h]).span){p=u;break}for(void 0===p&&(p=e.LABEL_SPECS.second),s&&(p=t.extend({},p,{fmt:s})),a=p.start(l),d=[];(f=a.getTime())<=n;)f>=i&&d.push([p.fmt(a),f]),p.incr(a);return d},i=function(t){return{span:60*t*1e3,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours())},fmt:function(t){return e.pad2(t.getHours())+":"+e.pad2(t.getMinutes())},incr:function(e){return e.setUTCMinutes(e.getUTCMinutes()+t)}}},n=function(t){return{span:1e3*t,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes())},fmt:function(t){return e.pad2(t.getHours())+":"+e.pad2(t.getMinutes())+":"+e.pad2(t.getSeconds())},incr:function(e){return e.setUTCSeconds(e.getUTCSeconds()+t)}}},e.LABEL_SPECS={decade:{span:1728e8,start:function(t){return new Date(t.getFullYear()-t.getFullYear()%10,0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+10)}},year:{span:1728e7,start:function(t){return new Date(t.getFullYear(),0,1)},fmt:function(t){return""+t.getFullYear()},incr:function(t){return t.setFullYear(t.getFullYear()+1)}},month:{span:24192e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),1)},fmt:function(t){return t.getFullYear()+"-"+e.pad2(t.getMonth()+1)},incr:function(t){return t.setMonth(t.getMonth()+1)}},week:{span:6048e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+e.pad2(t.getMonth()+1)+"-"+e.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+7)}},day:{span:864e5,start:function(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fmt:function(t){return t.getFullYear()+"-"+e.pad2(t.getMonth()+1)+"-"+e.pad2(t.getDate())},incr:function(t){return t.setDate(t.getDate()+1)}},hour:i(60),"30min":i(30),"15min":i(15),"10min":i(10),"5min":i(5),minute:i(1),"30sec":n(30),"15sec":n(15),"10sec":n(10),"5sec":n(5),second:n(1)},e.AUTO_LABEL_ORDER=["decade","year","month","week","day","hour","30min","15min","10min","5min","minute","30sec","15sec","10sec","5sec","second"],e.Area=function(i){var n;function r(i){var o;if(!(this instanceof e.Area))return new e.Area(i);o=t.extend({},n,i),this.cumulative=!o.behaveLikeLine,"auto"===o.fillOpacity&&(o.fillOpacity=o.behaveLikeLine?.8:1),r.__super__.constructor.call(this,o)}return a(r,i),n={fillOpacity:"auto",behaveLikeLine:!1},r.prototype.calcPoints=function(){var t,e,i,n,r,o,s;for(s=[],n=0,r=(o=this.data).length;n<r;n++)(t=o[n])._x=this.transX(t.x),e=0,t._y=function(){var n,r,o,s;for(s=[],n=0,r=(o=t.y).length;n<r;n++)i=o[n],this.options.behaveLikeLine?s.push(this.transY(i)):(e+=i||0,s.push(this.transY(e)));return s}.call(this),s.push(t._ymax=Math.max.apply(Math,t._y));return s},r.prototype.drawSeries=function(){var t,e,i,n,r,o,s,a;for(this.seriesPoints=[],a=[],i=0,n=(e=this.options.behaveLikeLine?function(){o=[];for(var t=0,e=this.options.ykeys.length-1;0<=e?t<=e:t>=e;0<=e?t++:t--)o.push(t);return o}.apply(this):function(){s=[];for(var t=r=this.options.ykeys.length-1;r<=0?t<=0:t>=0;r<=0?t++:t--)s.push(t);return s}.apply(this)).length;i<n;i++)t=e[i],this._drawFillFor(t),this._drawLineFor(t),a.push(this._drawPointFor(t));return a},r.prototype._drawFillFor=function(t){var e;if(null!==(e=this.paths[t]))return e=e+"L"+this.transX(this.xmax)+","+this.bottom+"L"+this.transX(this.xmin)+","+this.bottom+"Z",this.drawFilledPath(e,this.fillForSeries(t))},r.prototype.fillForSeries=function(t){var e;return e=Raphael.rgb2hsl(this.colorFor(this.data[t],t,"line")),Raphael.hsl(e.h,this.options.behaveLikeLine?.9*e.s:.75*e.s,Math.min(.98,this.options.behaveLikeLine?1.2*e.l:1.25*e.l))},r.prototype.drawFilledPath=function(t,e){return this.raphael.path(t).attr("fill",e).attr("fill-opacity",this.options.fillOpacity).attr("stroke","none")},r}(e.Line),e.Bar=function(i){function n(i){if(this.onHoverOut=o(this.onHoverOut,this),this.onHoverMove=o(this.onHoverMove,this),this.onGridClick=o(this.onGridClick,this),!(this instanceof e.Bar))return new e.Bar(i);n.__super__.constructor.call(this,t.extend({},i,{parseTime:!1}))}return a(n,i),n.prototype.init=function(){if(this.cumulative=this.options.stacked,"always"!==this.options.hideHover)return this.hover=new e.Hover({parent:this.el}),this.on("hovermove",this.onHoverMove),this.on("hoverout",this.onHoverOut),this.on("gridclick",this.onGridClick)},n.prototype.defaults={barSizeRatio:.75,barGap:3,barColors:["#0b62a4","#7a92a3","#4da74d","#afd8f8","#edc240","#cb4b4b","#9440ed"],barOpacity:1,barRadius:[0,0,0,0],xLabelMargin:50},n.prototype.calc=function(){var t;if(this.calcBars(),!1===this.options.hideHover)return(t=this.hover).update.apply(t,this.hoverContentForRow(this.data.length-1))},n.prototype.calcBars=function(){var t,e,i,n,r,o,s;for(s=[],t=n=0,r=(o=this.data).length;n<r;t=++n)(e=o[t])._x=this.left+this.width*(t+.5)/this.data.length,s.push(e._y=function(){var t,n,r,o;for(o=[],t=0,n=(r=e.y).length;t<n;t++)null!=(i=r[t])?o.push(this.transY(i)):o.push(null);return o}.call(this));return s},n.prototype.draw=function(){var t;return!0!==(t=this.options.axes)&&"both"!==t&&"x"!==t||this.drawXAxis(),this.drawSeries()},n.prototype.drawXAxis=function(){var t,e,i,n,r,o,s,a,l,c,h,d,u;for(c=this.bottom+(this.options.xAxisLabelTopPadding||this.options.padding/2),s=null,o=null,u=[],t=h=0,d=this.data.length;0<=d?h<d:h>d;t=0<=d?++h:--h)a=this.data[this.data.length-1-t],l=(e=this.drawXAxisLabel(a._x,c,a.label)).getBBox(),e.transform("r"+-this.options.xLabelAngle),i=e.getBBox(),e.transform("t0,"+i.height/2+"..."),0!==this.options.xLabelAngle&&(r=-.5*l.width*Math.cos(this.options.xLabelAngle*Math.PI/180),e.transform("t"+r+",0...")),(null==s||s>=i.x+i.width||null!=o&&o>=i.x)&&i.x>=0&&i.x+i.width<this.el.width()?(0!==this.options.xLabelAngle&&(n=1.25*this.options.gridTextSize/Math.sin(this.options.xLabelAngle*Math.PI/180),o=i.x-n),u.push(s=i.x-this.options.xLabelMargin)):u.push(e.remove());return u},n.prototype.drawSeries=function(){var t,e,i,n,r,o,s,a,l,c,h,d,u,p,f;return i=this.width/this.options.data.length,a=this.options.stacked?1:this.options.ykeys.length,t=(i*this.options.barSizeRatio-this.options.barGap*(a-1))/a,this.options.barSize&&(t=Math.min(t,this.options.barSize)),d=i-t*a-this.options.barGap*(a-1),s=d/2,f=this.ymin<=0&&this.ymax>=0?this.transY(0):null,this.bars=function(){var a,d,m,g;for(m=this.data,g=[],n=a=0,d=m.length;a<d;n=++a)l=m[n],r=0,g.push(function(){var a,d,m,g;for(m=l._y,g=[],c=a=0,d=m.length;a<d;c=++a)null!==(p=m[c])?(f?(u=Math.min(p,f),e=Math.max(p,f)):(u=p,e=this.bottom),o=this.left+n*i+s,this.options.stacked||(o+=c*(t+this.options.barGap)),h=e-u,this.options.verticalGridCondition&&this.options.verticalGridCondition(l.x)&&this.drawBar(this.left+n*i,this.top,i,Math.abs(this.top-this.bottom),this.options.verticalGridColor,this.options.verticalGridOpacity,this.options.barRadius),this.options.stacked&&(u-=r),this.drawBar(o,u,t,h,this.colorFor(l,c,"bar"),this.options.barOpacity,this.options.barRadius),g.push(r+=h)):g.push(null);return g}.call(this));return g}.call(this)},n.prototype.colorFor=function(t,e,i){var n,r;return"function"==typeof this.options.barColors?(n={x:t.x,y:t.y[e],label:t.label},r={index:e,key:this.options.ykeys[e],label:this.options.labels[e]},this.options.barColors.call(this,n,r,i)):this.options.barColors[e%this.options.barColors.length]},n.prototype.hitTest=function(t){return 0===this.data.length?null:(t=Math.max(Math.min(t,this.right),this.left),Math.min(this.data.length-1,Math.floor((t-this.left)/(this.width/this.data.length))))},n.prototype.onGridClick=function(t,e){var i;return i=this.hitTest(t),this.fire("click",i,this.data[i].src,t,e)},n.prototype.onHoverMove=function(t,e){var i,n;return i=this.hitTest(t),(n=this.hover).update.apply(n,this.hoverContentForRow(i))},n.prototype.onHoverOut=function(){if(!1!==this.options.hideHover)return this.hover.hide()},n.prototype.hoverContentForRow=function(t){var e,i,n,r,o,s,a;for(e="<div class='morris-hover-row-label'>"+(n=this.data[t]).label+"</div>",i=o=0,s=(a=n.y).length;o<s;i=++o)r=a[i],e+="<div class='morris-hover-point' style='color: "+this.colorFor(n,i,"label")+"'>\n "+this.options.labels[i]+":\n "+this.yLabelFormat(r)+"\n</div>";return"function"==typeof this.options.hoverCallback&&(e=this.options.hoverCallback(t,this.options,e,n.src)),[e,this.left+(t+.5)*this.width/this.data.length]},n.prototype.drawXAxisLabel=function(t,e,i){return this.raphael.text(t,e,i).attr("font-size",this.options.gridTextSize).attr("font-family",this.options.gridTextFamily).attr("font-weight",this.options.gridTextWeight).attr("fill",this.options.gridTextColor)},n.prototype.drawBar=function(t,e,i,n,r,o,s){var a;return(0===(a=Math.max.apply(Math,s))||a>n?this.raphael.rect(t,e,i,n):this.raphael.path(this.roundedRect(t,e,i,n,s))).attr("fill",r).attr("fill-opacity",o).attr("stroke","none")},n.prototype.roundedRect=function(t,e,i,n,r){return null==r&&(r=[0,0,0,0]),["M",t,r[0]+e,"Q",t,e,t+r[0],e,"L",t+i-r[1],e,"Q",t+i,e,t+i,e+r[1],"L",t+i,e+n-r[2],"Q",t+i,e+n,t+i-r[2],e+n,"L",t+r[3],e+n,"Q",t,e+n,t,e+n-r[3],"Z"]},n}(e.Grid),e.Donut=function(i){function n(i){this.resizeHandler=o(this.resizeHandler,this),this.select=o(this.select,this),this.click=o(this.click,this);var n=this;if(!(this instanceof e.Donut))return new e.Donut(i);if(this.options=t.extend({},this.defaults,i),"string"==typeof i.element?this.el=t(document.getElementById(i.element)):this.el=t(i.element),null===this.el||0===this.el.length)throw new Error("Graph placeholder not found.");void 0!==i.data&&0!==i.data.length&&(this.raphael=new Raphael(this.el[0]),this.options.resize&&t(window).bind("resize",function(t){return null!=n.timeoutId&&window.clearTimeout(n.timeoutId),n.timeoutId=window.setTimeout(n.resizeHandler,100)}),this.setData(i.data))}return a(n,i),n.prototype.defaults={colors:["#0B62A4","#3980B5","#679DC6","#95BBD7","#B0CCE1","#095791","#095085","#083E67","#052C48","#042135"],backgroundColor:"#FFFFFF",labelColor:"#000000",formatter:e.commas,resize:!1},n.prototype.redraw=function(){var t,i,n,r,o,s,a,l,c,h,d,u,p,f,m,g,v,y,b,_,x,w;for(this.raphael.clear(),i=this.el.width()/2,n=this.el.height()/2,u=(Math.min(i,n)-10)/3,d=0,p=0,g=(b=this.values).length;p<g;p++)d+=b[p];for(l=5/(2*u),t=1.9999*Math.PI-l*this.data.length,s=0,o=0,this.segments=[],r=f=0,v=(_=this.values).length;f<v;r=++f)c=s+l+t*(_[r]/d),(h=new e.DonutSegment(i,n,2*u,u,s,c,this.data[r].color||this.options.colors[o%this.options.colors.length],this.options.backgroundColor,o,this.raphael)).render(),this.segments.push(h),h.on("hover",this.select),h.on("click",this.click),s=c,o+=1;for(this.text1=this.drawEmptyDonutLabel(i,n-10,this.options.labelColor,15,800),this.text2=this.drawEmptyDonutLabel(i,n+10,this.options.labelColor,14),a=Math.max.apply(Math,this.values),o=0,w=[],m=0,y=(x=this.values).length;m<y;m++){if(x[m]===a){this.select(o);break}w.push(o+=1)}return w},n.prototype.setData=function(t){var e;return this.data=t,this.values=function(){var t,i,n,r;for(r=[],t=0,i=(n=this.data).length;t<i;t++)e=n[t],r.push(parseFloat(e.value));return r}.call(this),this.redraw()},n.prototype.click=function(t){return this.fire("click",t,this.data[t])},n.prototype.select=function(t){var e,i,n,r;for(i=0,n=(r=this.segments).length;i<n;i++)r[i].deselect();return this.segments[t].select(),e=this.data[t],this.setLabels(e.label,this.options.formatter(e.value,e))},n.prototype.setLabels=function(t,e){var i,n,r,o,s,a,l,c;return o=1.8*(i=2*(Math.min(this.el.width()/2,this.el.height()/2)-10)/3),r=i/2,n=i/3,this.text1.attr({text:t,transform:""}),s=this.text1.getBBox(),a=Math.min(o/s.width,r/s.height),this.text1.attr({transform:"S"+a+","+a+","+(s.x+s.width/2)+","+(s.y+s.height)}),this.text2.attr({text:e,transform:""}),l=this.text2.getBBox(),c=Math.min(o/l.width,n/l.height),this.text2.attr({transform:"S"+c+","+c+","+(l.x+l.width/2)+","+l.y})},n.prototype.drawEmptyDonutLabel=function(t,e,i,n,r){var o;return o=this.raphael.text(t,e,"").attr("font-size",n).attr("fill",i),null!=r&&o.attr("font-weight",r),o},n.prototype.resizeHandler=function(){return this.timeoutId=null,this.raphael.setSize(this.el.width(),this.el.height()),this.redraw()},n}(e.EventEmitter),e.DonutSegment=function(t){function e(t,e,i,n,r,s,a,l,c,h){this.cx=t,this.cy=e,this.inner=i,this.outer=n,this.color=a,this.backgroundColor=l,this.index=c,this.raphael=h,this.deselect=o(this.deselect,this),this.select=o(this.select,this),this.sin_p0=Math.sin(r),this.cos_p0=Math.cos(r),this.sin_p1=Math.sin(s),this.cos_p1=Math.cos(s),this.is_long=s-r>Math.PI?1:0,this.path=this.calcSegment(this.inner+3,this.inner+this.outer-5),this.selectedPath=this.calcSegment(this.inner+3,this.inner+this.outer),this.hilight=this.calcArc(this.inner)}return a(e,t),e.prototype.calcArcPoints=function(t){return[this.cx+t*this.sin_p0,this.cy+t*this.cos_p0,this.cx+t*this.sin_p1,this.cy+t*this.cos_p1]},e.prototype.calcSegment=function(t,e){var i,n,r,o,s,a,l,c,h,d;return i=(h=this.calcArcPoints(t))[0],r=h[1],n=h[2],o=h[3],s=(d=this.calcArcPoints(e))[0],l=d[1],a=d[2],c=d[3],"M"+i+","+r+"A"+t+","+t+",0,"+this.is_long+",0,"+n+","+o+"L"+a+","+c+"A"+e+","+e+",0,"+this.is_long+",1,"+s+","+l+"Z"},e.prototype.calcArc=function(t){var e,i,n,r,o;return e=(o=this.calcArcPoints(t))[0],n=o[1],i=o[2],r=o[3],"M"+e+","+n+"A"+t+","+t+",0,"+this.is_long+",0,"+i+","+r},e.prototype.render=function(){var t=this;return this.arc=this.drawDonutArc(this.hilight,this.color),this.seg=this.drawDonutSegment(this.path,this.color,this.backgroundColor,function(){return t.fire("hover",t.index)},function(){return t.fire("click",t.index)})},e.prototype.drawDonutArc=function(t,e){return this.raphael.path(t).attr({stroke:e,"stroke-width":2,opacity:0})},e.prototype.drawDonutSegment=function(t,e,i,n,r){return this.raphael.path(t).attr({fill:e,stroke:i,"stroke-width":3}).hover(n).click(r)},e.prototype.select=function(){if(!this.selected)return this.seg.animate({path:this.selectedPath},150,"<>"),this.arc.animate({opacity:1},150,"<>"),this.selected=!0},e.prototype.deselect=function(){if(this.selected)return this.seg.animate({path:this.path},150,"<>"),this.arc.animate({opacity:0},150,"<>"),this.selected=!1},e}(e.EventEmitter)}.call(this),function(t,e){"function"==typeof define&&define.amd?define("Chartist",[],function(){return t.Chartist=e()}):"object"==typeof module&&module.exports?module.exports=e():t.Chartist=e()}(this,function(){var t={version:"0.11.0"};return function(t,e,i){"use strict";i.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},i.noop=function(t){return t},i.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},i.extend=function(t){var e,n,r;for(t=t||{},e=1;e<arguments.length;e++)for(var o in n=arguments[e])"object"!=typeof(r=n[o])||null===r||r instanceof Array?t[o]=r:t[o]=i.extend(t[o],r);return t},i.replaceAll=function(t,e,i){return t.replace(new RegExp(e,"g"),i)},i.ensureUnit=function(t,e){return"number"==typeof t&&(t+=e),t},i.quantity=function(t){if("string"==typeof t){var e=/^(\d+)\s*(.*)$/g.exec(t);return{value:+e[1],unit:e[2]||void 0}}return{value:t}},i.querySelector=function(t){return t instanceof Node?t:e.querySelector(t)},i.times=function(t){return Array.apply(null,new Array(t))},i.sum=function(t,e){return t+(e||0)},i.mapMultiply=function(t){return function(e){return e*t}},i.mapAdd=function(t){return function(e){return e+t}},i.serialMap=function(t,e){var n=[],r=Math.max.apply(null,t.map(function(t){return t.length}));return i.times(r).forEach(function(i,r){var o=t.map(function(t){return t[r]});n[r]=e.apply(null,o)}),n},i.roundWithPrecision=function(t,e){var n=Math.pow(10,e||i.precision);return Math.round(t*n)/n},i.precision=8,i.escapingMap={"&":"&","<":"<",">":">",'"':""","'":"'"},i.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),Object.keys(i.escapingMap).reduce(function(t,e){return i.replaceAll(t,e,i.escapingMap[e])},t))},i.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(i.escapingMap).reduce(function(t,e){return i.replaceAll(t,i.escapingMap[e],e)},t);try{t=void 0!==(t=JSON.parse(t)).data?t.data:t}catch(t){}return t},i.createSvg=function(t,e,n,r){var o;return e=e||"100%",n=n||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(i.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),(o=new i.Svg("svg").attr({width:e,height:n}).addClass(r))._node.style.width=e,o._node.style.height=n,t.appendChild(o._node),o},i.normalizeData=function(t,e,n){var r,o={raw:t,normalized:{}};return o.normalized.series=i.getDataArray({series:t.series||[]},e,n),r=o.normalized.series.every(function(t){return t instanceof Array})?Math.max.apply(null,o.normalized.series.map(function(t){return t.length})):o.normalized.series.length,o.normalized.labels=(t.labels||[]).slice(),Array.prototype.push.apply(o.normalized.labels,i.times(Math.max(0,r-o.normalized.labels.length)).map(function(){return""})),e&&i.reverseData(o.normalized),o},i.safeHasProperty=function(t,e){return null!==t&&"object"==typeof t&&t.hasOwnProperty(e)},i.isDataHoleValue=function(t){return null===t||void 0===t||"number"==typeof t&&isNaN(t)},i.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;e<t.series.length;e++)"object"==typeof t.series[e]&&void 0!==t.series[e].data?t.series[e].data.reverse():t.series[e]instanceof Array&&t.series[e].reverse()},i.getDataArray=function(t,e,n){return t.series.map(function t(e){if(i.safeHasProperty(e,"value"))return t(e.value);if(i.safeHasProperty(e,"data"))return t(e.data);if(e instanceof Array)return e.map(t);if(!i.isDataHoleValue(e)){if(n){var r={};return"string"==typeof n?r[n]=i.getNumberOrUndefined(e):r.y=i.getNumberOrUndefined(e),r.x=e.hasOwnProperty("x")?i.getNumberOrUndefined(e.x):r.x,r.y=e.hasOwnProperty("y")?i.getNumberOrUndefined(e.y):r.y,r}return i.getNumberOrUndefined(e)}})},i.normalizePadding=function(t,e){return e=e||0,"number"==typeof t?{top:t,right:t,bottom:t,left:t}:{top:"number"==typeof t.top?t.top:e,right:"number"==typeof t.right?t.right:e,bottom:"number"==typeof t.bottom?t.bottom:e,left:"number"==typeof t.left?t.left:e}},i.getMetaData=function(t,e){var i=t.data?t.data[e]:t[e];return i?i.meta:void 0},i.orderOfMagnitude=function(t){return Math.floor(Math.log(Math.abs(t))/Math.LN10)},i.projectLength=function(t,e,i){return e/i.range*t},i.getAvailableHeight=function(t,e){return Math.max((i.quantity(e.height).value||t.height())-(e.chartPadding.top+e.chartPadding.bottom)-e.axisX.offset,0)},i.getHighLow=function(t,e,n){var r={high:void 0===(e=i.extend({},e,n?e["axis"+n.toUpperCase()]:{})).high?-Number.MAX_VALUE:+e.high,low:void 0===e.low?Number.MAX_VALUE:+e.low},o=void 0===e.high,s=void 0===e.low;return(o||s)&&function t(e){if(void 0!==e)if(e instanceof Array)for(var i=0;i<e.length;i++)t(e[i]);else{var a=n?+e[n]:+e;o&&a>r.high&&(r.high=a),s&&a<r.low&&(r.low=a)}}(t),(e.referenceValue||0===e.referenceValue)&&(r.high=Math.max(e.referenceValue,r.high),r.low=Math.min(e.referenceValue,r.low)),r.high<=r.low&&(0===r.low?r.high=1:r.low<0?r.high=0:r.high>0?r.low=0:(r.high=1,r.low=0)),r},i.isNumeric=function(t){return null!==t&&isFinite(t)},i.isFalseyButZero=function(t){return!t&&0!==t},i.getNumberOrUndefined=function(t){return i.isNumeric(t)?+t:void 0},i.isMultiValue=function(t){return"object"==typeof t&&("x"in t||"y"in t)},i.getMultiValue=function(t,e){return i.isMultiValue(t)?i.getNumberOrUndefined(t[e||"y"]):i.getNumberOrUndefined(t)},i.rho=function(t){if(1===t)return t;function e(t,i){return t%i==0?i:e(i,t%i)}function i(t){return t*t+1}var n,r=2,o=2;if(t%2==0)return 2;do{r=i(r)%t,o=i(i(o))%t,n=e(Math.abs(r-o),t)}while(1===n);return n},i.getBounds=function(t,e,n,r){var o,s,a,l=0,c={high:e.high,low:e.low};c.valueRange=c.high-c.low,c.oom=i.orderOfMagnitude(c.valueRange),c.step=Math.pow(10,c.oom),c.min=Math.floor(c.low/c.step)*c.step,c.max=Math.ceil(c.high/c.step)*c.step,c.range=c.max-c.min,c.numberOfSteps=Math.round(c.range/c.step);var h=i.projectLength(t,c.step,c)<n,d=r?i.rho(c.range):0;if(r&&i.projectLength(t,1,c)>=n)c.step=1;else if(r&&d<c.step&&i.projectLength(t,d,c)>=n)c.step=d;else for(;;){if(h&&i.projectLength(t,c.step,c)<=n)c.step*=2;else{if(h||!(i.projectLength(t,c.step/2,c)>=n))break;if(c.step/=2,r&&c.step%1!=0){c.step*=2;break}}if(l++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}var u=2.221e-16;function p(t,e){return t===(t+=e)&&(t*=1+(e>0?u:-u)),t}for(c.step=Math.max(c.step,u),s=c.min,a=c.max;s+c.step<=c.low;)s=p(s,c.step);for(;a-c.step>=c.high;)a=p(a,-c.step);c.min=s,c.max=a,c.range=c.max-c.min;var f=[];for(o=c.min;o<=c.max;o=p(o,c.step)){var m=i.roundWithPrecision(o);m!==f[f.length-1]&&f.push(m)}return c.values=f,c},i.polarToCartesian=function(t,e,i,n){var r=(n-90)*Math.PI/180;return{x:t+i*Math.cos(r),y:e+i*Math.sin(r)}},i.createChartRect=function(t,e,n){var r=!(!e.axisX&&!e.axisY),o=r?e.axisY.offset:0,s=r?e.axisX.offset:0,a=t.width()||i.quantity(e.width).value||0,l=t.height()||i.quantity(e.height).value||0,c=i.normalizePadding(e.chartPadding,n);a=Math.max(a,o+c.left+c.right),l=Math.max(l,s+c.top+c.bottom);var h={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return r?("start"===e.axisX.position?(h.y2=c.top+s,h.y1=Math.max(l-c.bottom,h.y2+1)):(h.y2=c.top,h.y1=Math.max(l-c.bottom-s,h.y2+1)),"start"===e.axisY.position?(h.x1=c.left+o,h.x2=Math.max(a-c.right,h.x1+1)):(h.x1=c.left,h.x2=Math.max(a-c.right-o,h.x1+1))):(h.x1=c.left,h.x2=Math.max(a-c.right,h.x1+1),h.y2=c.top,h.y1=Math.max(l-c.bottom,h.y2+1)),h},i.createGrid=function(t,e,n,r,o,s,a,l){var c={};c[n.units.pos+"1"]=t,c[n.units.pos+"2"]=t,c[n.counterUnits.pos+"1"]=r,c[n.counterUnits.pos+"2"]=r+o;var h=s.elem("line",c,a.join(" "));l.emit("draw",i.extend({type:"grid",axis:n,index:e,group:s,element:h},c))},i.createGridBackground=function(t,e,i,n){var r=t.elem("rect",{x:e.x1,y:e.y2,width:e.width(),height:e.height()},i,!0);n.emit("draw",{type:"gridBackground",group:t,element:r})},i.createLabel=function(t,n,r,o,s,a,l,c,h,d,u){var p,f={};if(f[s.units.pos]=t+l[s.units.pos],f[s.counterUnits.pos]=l[s.counterUnits.pos],f[s.units.len]=n,f[s.counterUnits.len]=Math.max(0,a-10),d){var m=e.createElement("span");m.className=h.join(" "),m.setAttribute("xmlns",i.namespaces.xhtml),m.innerText=o[r],m.style[s.units.len]=Math.round(f[s.units.len])+"px",m.style[s.counterUnits.len]=Math.round(f[s.counterUnits.len])+"px",p=c.foreignObject(m,i.extend({style:"overflow: visible;"},f))}else p=c.elem("text",f,h.join(" ")).text(o[r]);u.emit("draw",i.extend({type:"label",axis:s,index:r,group:c,element:p,text:o[r]},f))},i.getSeriesOption=function(t,e,i){if(t.name&&e.series&&e.series[t.name]){var n=e.series[t.name];return n.hasOwnProperty(i)?n[i]:e[i]}return e[i]},i.optionsProvider=function(e,n,r){var o,s,a=i.extend({},e),l=[];function c(e){var l=o;if(o=i.extend({},a),n)for(s=0;s<n.length;s++){t.matchMedia(n[s][0]).matches&&(o=i.extend(o,n[s][1]))}r&&e&&r.emit("optionsChanged",{previousOptions:l,currentOptions:o})}if(!t.matchMedia)throw"window.matchMedia not found! Make sure you're using a polyfill.";if(n)for(s=0;s<n.length;s++){var h=t.matchMedia(n[s][0]);h.addListener(c),l.push(h)}return c(),{removeMediaQueryListeners:function(){l.forEach(function(t){t.removeListener(c)})},getCurrentOptions:function(){return i.extend({},o)}}},i.splitIntoSegments=function(t,e,n){n=i.extend({},{increasingX:!1,fillHoles:!1},n);for(var r=[],o=!0,s=0;s<t.length;s+=2)void 0===i.getMultiValue(e[s/2].value)?n.fillHoles||(o=!0):(n.increasingX&&s>=2&&t[s]<=t[s-2]&&(o=!0),o&&(r.push({pathCoordinates:[],valueData:[]}),o=!1),r[r.length-1].pathCoordinates.push(t[s],t[s+1]),r[r.length-1].valueData.push(e[s/2]));return r}}(window,document,t),function(t,e,i){"use strict";i.Interpolation={},i.Interpolation.none=function(t){return t=i.extend({},{fillHoles:!1},t),function(e,n){for(var r=new i.Svg.Path,o=!0,s=0;s<e.length;s+=2){var a=e[s],l=e[s+1],c=n[s/2];void 0!==i.getMultiValue(c.value)?(o?r.move(a,l,!1,c):r.line(a,l,!1,c),o=!1):t.fillHoles||(o=!0)}return r}},i.Interpolation.simple=function(t){t=i.extend({},{divisor:2,fillHoles:!1},t);var e=1/Math.max(1,t.divisor);return function(n,r){for(var o,s,a,l=new i.Svg.Path,c=0;c<n.length;c+=2){var h=n[c],d=n[c+1],u=(h-o)*e,p=r[c/2];void 0!==p.value?(void 0===a?l.move(h,d,!1,p):l.curve(o+u,s,h-u,d,h,d,!1,p),o=h,s=d,a=p):t.fillHoles||(o=h=a=void 0)}return l}},i.Interpolation.cardinal=function(t){t=i.extend({},{tension:1,fillHoles:!1},t);var e=Math.min(1,Math.max(0,t.tension)),n=1-e;return function r(o,s){var a=i.splitIntoSegments(o,s,{fillHoles:t.fillHoles});if(a.length){if(a.length>1){var l=[];return a.forEach(function(t){l.push(r(t.pathCoordinates,t.valueData))}),i.Svg.Path.join(l)}if(o=a[0].pathCoordinates,s=a[0].valueData,o.length<=4)return i.Interpolation.none()(o,s);for(var c=(new i.Svg.Path).move(o[0],o[1],!1,s[0]),h=0,d=o.length;d-2>h;h+=2){var u=[{x:+o[h-2],y:+o[h-1]},{x:+o[h],y:+o[h+1]},{x:+o[h+2],y:+o[h+3]},{x:+o[h+4],y:+o[h+5]}];d-4===h?u[3]=u[2]:h||(u[0]={x:+o[h],y:+o[h+1]}),c.curve(e*(-u[0].x+6*u[1].x+u[2].x)/6+n*u[2].x,e*(-u[0].y+6*u[1].y+u[2].y)/6+n*u[2].y,e*(u[1].x+6*u[2].x-u[3].x)/6+n*u[2].x,e*(u[1].y+6*u[2].y-u[3].y)/6+n*u[2].y,u[2].x,u[2].y,!1,s[(h+2)/2])}return c}return i.Interpolation.none()([])}},i.Interpolation.monotoneCubic=function(t){return t=i.extend({},{fillHoles:!1},t),function e(n,r){var o=i.splitIntoSegments(n,r,{fillHoles:t.fillHoles,increasingX:!0});if(o.length){if(o.length>1){var s=[];return o.forEach(function(t){s.push(e(t.pathCoordinates,t.valueData))}),i.Svg.Path.join(s)}if(n=o[0].pathCoordinates,r=o[0].valueData,n.length<=4)return i.Interpolation.none()(n,r);var a,l,c=[],h=[],d=n.length/2,u=[],p=[],f=[],m=[];for(a=0;a<d;a++)c[a]=n[2*a],h[a]=n[2*a+1];for(a=0;a<d-1;a++)f[a]=h[a+1]-h[a],m[a]=c[a+1]-c[a],p[a]=f[a]/m[a];for(u[0]=p[0],u[d-1]=p[d-2],a=1;a<d-1;a++)0===p[a]||0===p[a-1]||p[a-1]>0!=p[a]>0?u[a]=0:(u[a]=3*(m[a-1]+m[a])/((2*m[a]+m[a-1])/p[a-1]+(m[a]+2*m[a-1])/p[a]),isFinite(u[a])||(u[a]=0));for(l=(new i.Svg.Path).move(c[0],h[0],!1,r[0]),a=0;a<d-1;a++)l.curve(c[a]+m[a]/3,h[a]+u[a]*m[a]/3,c[a+1]-m[a]/3,h[a+1]-u[a+1]*m[a]/3,c[a+1],h[a+1],!1,r[a+1]);return l}return i.Interpolation.none()([])}},i.Interpolation.step=function(t){return t=i.extend({},{postpone:!0,fillHoles:!1},t),function(e,n){for(var r,o,s,a=new i.Svg.Path,l=0;l<e.length;l+=2){var c=e[l],h=e[l+1],d=n[l/2];void 0!==d.value?(void 0===s?a.move(c,h,!1,d):(t.postpone?a.line(c,o,!1,s):a.line(r,h,!1,d),a.line(c,h,!1,d)),r=c,o=h,s=d):t.fillHoles||(r=o=s=void 0)}return a}}}(window,document,t),function(t,e,i){"use strict";i.EventEmitter=function(){var t=[];return{addEventHandler:function(e,i){t[e]=t[e]||[],t[e].push(i)},removeEventHandler:function(e,i){t[e]&&(i?(t[e].splice(t[e].indexOf(i),1),0===t[e].length&&delete t[e]):delete t[e])},emit:function(e,i){t[e]&&t[e].forEach(function(t){t(i)}),t["*"]&&t["*"].forEach(function(t){t(e,i)})}}}}(window,document,t),function(t,e,i){"use strict";i.Class={extend:function(t,e){var n=e||this.prototype||i.Class,r=Object.create(n);i.Class.cloneDefinitions(r,t);var o=function(){var t,e=r.constructor||function(){};return t=this===i?Object.create(r):this,e.apply(t,Array.prototype.slice.call(arguments,0)),t};return o.prototype=r,o.super=n,o.extend=this.extend,o},cloneDefinitions:function(){var t=function(t){var e=[];if(t.length)for(var i=0;i<t.length;i++)e.push(t[i]);return e}(arguments),e=t[0];return t.splice(1,t.length-1).forEach(function(t){Object.getOwnPropertyNames(t).forEach(function(i){delete e[i],Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}),e}}}(window,document,t),function(t,e,i){"use strict";i.Base=i.Class.extend({constructor:function(e,n,r,o,s){this.container=i.querySelector(e),this.data=n||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.defaultOptions=r,this.options=o,this.responsiveOptions=s,this.eventEmitter=i.EventEmitter(),this.supportsForeignObject=i.Svg.isSupported("Extensibility"),this.supportsAnimations=i.Svg.isSupported("AnimationEventsAttribute"),this.resizeListener=function(){this.update()}.bind(this),this.container&&(this.container.__chartist__&&this.container.__chartist__.detach(),this.container.__chartist__=this),this.initializeTimeoutId=setTimeout(function(){t.addEventListener("resize",this.resizeListener),this.optionsProvider=i.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter),this.eventEmitter.addEventHandler("optionsChanged",function(){this.update()}.bind(this)),this.options.plugins&&this.options.plugins.forEach(function(t){t instanceof Array?t[0](this,t[1]):t(this)}.bind(this)),this.eventEmitter.emit("data",{type:"initial",data:this.data}),this.createChart(this.optionsProvider.getCurrentOptions()),this.initializeTimeoutId=void 0}.bind(this),0)},optionsProvider:void 0,container:void 0,svg:void 0,eventEmitter:void 0,createChart:function(){throw new Error("Base chart type can't be instantiated!")},update:function(t,e,n){return t&&(this.data=t||{},this.data.labels=this.data.labels||[],this.data.series=this.data.series||[],this.eventEmitter.emit("data",{type:"update",data:this.data})),e&&(this.options=i.extend({},n?this.options:this.defaultOptions,e),this.initializeTimeoutId||(this.optionsProvider.removeMediaQueryListeners(),this.optionsProvider=i.optionsProvider(this.options,this.responsiveOptions,this.eventEmitter))),this.initializeTimeoutId||this.createChart(this.optionsProvider.getCurrentOptions()),this},detach:function(){return this.initializeTimeoutId?t.clearTimeout(this.initializeTimeoutId):(t.removeEventListener("resize",this.resizeListener),this.optionsProvider.removeMediaQueryListeners()),this},on:function(t,e){return this.eventEmitter.addEventHandler(t,e),this},off:function(t,e){return this.eventEmitter.removeEventHandler(t,e),this},version:i.version,supportsForeignObject:!1})}(window,document,t),function(t,e,i){"use strict";i.Svg=i.Class.extend({constructor:function(t,n,r,o,s){t instanceof Element?this._node=t:(this._node=e.createElementNS(i.namespaces.svg,t),"svg"===t&&this.attr({"xmlns:ct":i.namespaces.ct})),n&&this.attr(n),r&&this.addClass(r),o&&(s&&o._node.firstChild?o._node.insertBefore(this._node,o._node.firstChild):o._node.appendChild(this._node))},attr:function(t,e){return"string"==typeof t?e?this._node.getAttributeNS(e,t):this._node.getAttribute(t):(Object.keys(t).forEach(function(e){if(void 0!==t[e])if(-1!==e.indexOf(":")){var n=e.split(":");this._node.setAttributeNS(i.namespaces[n[0]],e,t[e])}else this._node.setAttribute(e,t[e])}.bind(this)),this)},elem:function(t,e,n,r){return new i.Svg(t,e,n,this,r)},parent:function(){return this._node.parentNode instanceof SVGElement?new i.Svg(this._node.parentNode):null},root:function(){for(var t=this._node;"svg"!==t.nodeName;)t=t.parentNode;return new i.Svg(t)},querySelector:function(t){var e=this._node.querySelector(t);return e?new i.Svg(e):null},querySelectorAll:function(t){var e=this._node.querySelectorAll(t);return e.length?new i.Svg.List(e):null},getNode:function(){return this._node},foreignObject:function(t,n,r,o){if("string"==typeof t){var s=e.createElement("div");s.innerHTML=t,t=s.firstChild}t.setAttribute("xmlns",i.namespaces.xmlns);var a=this.elem("foreignObject",n,r,o);return a._node.appendChild(t),a},text:function(t){return this._node.appendChild(e.createTextNode(t)),this},empty:function(){for(;this._node.firstChild;)this._node.removeChild(this._node.firstChild);return this},remove:function(){return this._node.parentNode.removeChild(this._node),this.parent()},replace:function(t){return this._node.parentNode.replaceChild(t._node,this._node),t},append:function(t,e){return e&&this._node.firstChild?this._node.insertBefore(t._node,this._node.firstChild):this._node.appendChild(t._node),this},classes:function(){return this._node.getAttribute("class")?this._node.getAttribute("class").trim().split(/\s+/):[]},addClass:function(t){return this._node.setAttribute("class",this.classes(this._node).concat(t.trim().split(/\s+/)).filter(function(t,e,i){return i.indexOf(t)===e}).join(" ")),this},removeClass:function(t){var e=t.trim().split(/\s+/);return this._node.setAttribute("class",this.classes(this._node).filter(function(t){return-1===e.indexOf(t)}).join(" ")),this},removeAllClasses:function(){return this._node.setAttribute("class",""),this},height:function(){return this._node.getBoundingClientRect().height},width:function(){return this._node.getBoundingClientRect().width},animate:function(t,e,n){return void 0===e&&(e=!0),Object.keys(t).forEach(function(r){function o(t,e){var o,s,a,l={};t.easing&&(a=t.easing instanceof Array?t.easing:i.Svg.Easing[t.easing],delete t.easing),t.begin=i.ensureUnit(t.begin,"ms"),t.dur=i.ensureUnit(t.dur,"ms"),a&&(t.calcMode="spline",t.keySplines=a.join(" "),t.keyTimes="0;1"),e&&(t.fill="freeze",l[r]=t.from,this.attr(l),s=i.quantity(t.begin||0).value,t.begin="indefinite"),o=this.elem("animate",i.extend({attributeName:r},t)),e&&setTimeout(function(){try{o._node.beginElement()}catch(e){l[r]=t.to,this.attr(l),o.remove()}}.bind(this),s),n&&o._node.addEventListener("beginEvent",function(){n.emit("animationBegin",{element:this,animate:o._node,params:t})}.bind(this)),o._node.addEventListener("endEvent",function(){n&&n.emit("animationEnd",{element:this,animate:o._node,params:t}),e&&(l[r]=t.to,this.attr(l),o.remove())}.bind(this))}t[r]instanceof Array?t[r].forEach(function(t){o.bind(this)(t,!1)}.bind(this)):o.bind(this)(t[r],e)}.bind(this)),this}}),i.Svg.isSupported=function(t){return e.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#"+t,"1.1")};i.Svg.Easing={easeInSine:[.47,0,.745,.715],easeOutSine:[.39,.575,.565,1],easeInOutSine:[.445,.05,.55,.95],easeInQuad:[.55,.085,.68,.53],easeOutQuad:[.25,.46,.45,.94],easeInOutQuad:[.455,.03,.515,.955],easeInCubic:[.55,.055,.675,.19],easeOutCubic:[.215,.61,.355,1],easeInOutCubic:[.645,.045,.355,1],easeInQuart:[.895,.03,.685,.22],easeOutQuart:[.165,.84,.44,1],easeInOutQuart:[.77,0,.175,1],easeInQuint:[.755,.05,.855,.06],easeOutQuint:[.23,1,.32,1],easeInOutQuint:[.86,0,.07,1],easeInExpo:[.95,.05,.795,.035],easeOutExpo:[.19,1,.22,1],easeInOutExpo:[1,0,0,1],easeInCirc:[.6,.04,.98,.335],easeOutCirc:[.075,.82,.165,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]},i.Svg.List=i.Class.extend({constructor:function(t){var e=this;this.svgElements=[];for(var n=0;n<t.length;n++)this.svgElements.push(new i.Svg(t[n]));Object.keys(i.Svg.prototype).filter(function(t){return-1===["constructor","parent","querySelector","querySelectorAll","replace","append","classes","height","width"].indexOf(t)}).forEach(function(t){e[t]=function(){var n=Array.prototype.slice.call(arguments,0);return e.svgElements.forEach(function(e){i.Svg.prototype[t].apply(e,n)}),e}})}})}(window,document,t),function(t,e,i){"use strict";var n={m:["x","y"],l:["x","y"],c:["x1","y1","x2","y2","x","y"],a:["rx","ry","xAr","lAf","sf","x","y"]},r={accuracy:3};function o(t,e,n,r,o,s){var a=i.extend({command:o?t.toLowerCase():t.toUpperCase()},e,s?{data:s}:{});n.splice(r,0,a)}function s(t,e){t.forEach(function(i,r){n[i.command.toLowerCase()].forEach(function(n,o){e(i,n,r,o,t)})})}i.Svg.Path=i.Class.extend({constructor:function(t,e){this.pathElements=[],this.pos=0,this.close=t,this.options=i.extend({},r,e)},position:function(t){return void 0!==t?(this.pos=Math.max(0,Math.min(this.pathElements.length,t)),this):this.pos},remove:function(t){return this.pathElements.splice(this.pos,t),this},move:function(t,e,i,n){return o("M",{x:+t,y:+e},this.pathElements,this.pos++,i,n),this},line:function(t,e,i,n){return o("L",{x:+t,y:+e},this.pathElements,this.pos++,i,n),this},curve:function(t,e,i,n,r,s,a,l){return o("C",{x1:+t,y1:+e,x2:+i,y2:+n,x:+r,y:+s},this.pathElements,this.pos++,a,l),this},arc:function(t,e,i,n,r,s,a,l,c){return o("A",{rx:+t,ry:+e,xAr:+i,lAf:+n,sf:+r,x:+s,y:+a},this.pathElements,this.pos++,l,c),this},scale:function(t,e){return s(this.pathElements,function(i,n){i[n]*="x"===n[0]?t:e}),this},translate:function(t,e){return s(this.pathElements,function(i,n){i[n]+="x"===n[0]?t:e}),this},transform:function(t){return s(this.pathElements,function(e,i,n,r,o){var s=t(e,i,n,r,o);(s||0===s)&&(e[i]=s)}),this},parse:function(t){var e=t.replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([0-9])([A-Za-z])/g,"$1 $2").split(/[\s,]+/).reduce(function(t,e){return e.match(/[A-Za-z]/)&&t.push([]),t[t.length-1].push(e),t},[]);"Z"===e[e.length-1][0].toUpperCase()&&e.pop();var r=e.map(function(t){var e=t.shift(),r=n[e.toLowerCase()];return i.extend({command:e},r.reduce(function(e,i,n){return e[i]=+t[n],e},{}))}),o=[this.pos,0];return Array.prototype.push.apply(o,r),Array.prototype.splice.apply(this.pathElements,o),this.pos+=r.length,this},stringify:function(){var t=Math.pow(10,this.options.accuracy);return this.pathElements.reduce(function(e,i){var r=n[i.command.toLowerCase()].map(function(e){return this.options.accuracy?Math.round(i[e]*t)/t:i[e]}.bind(this));return e+i.command+r.join(",")}.bind(this),"")+(this.close?"Z":"")},clone:function(t){var e=new i.Svg.Path(t||this.close);return e.pos=this.pos,e.pathElements=this.pathElements.slice().map(function(t){return i.extend({},t)}),e.options=i.extend({},this.options),e},splitByCommand:function(t){var e=[new i.Svg.Path];return this.pathElements.forEach(function(n){n.command===t.toUpperCase()&&0!==e[e.length-1].pathElements.length&&e.push(new i.Svg.Path),e[e.length-1].pathElements.push(n)}),e}}),i.Svg.Path.elementDescriptions=n,i.Svg.Path.join=function(t,e,n){for(var r=new i.Svg.Path(e,n),o=0;o<t.length;o++)for(var s=t[o],a=0;a<s.pathElements.length;a++)r.pathElements.push(s.pathElements[a]);return r}}(window,document,t),function(t,e,i){"use strict";var n={x:{pos:"x",len:"width",dir:"horizontal",rectStart:"x1",rectEnd:"x2",rectOffset:"y2"},y:{pos:"y",len:"height",dir:"vertical",rectStart:"y2",rectEnd:"y1",rectOffset:"x1"}};i.Axis=i.Class.extend({constructor:function(t,e,i,r){this.units=t,this.counterUnits=t===n.x?n.y:n.x,this.chartRect=e,this.axisLength=e[t.rectEnd]-e[t.rectStart],this.gridOffset=e[t.rectOffset],this.ticks=i,this.options=r},createGridAndLabels:function(t,e,n,r,o){var s=r["axis"+this.units.pos.toUpperCase()],a=this.ticks.map(this.projectValue.bind(this)),l=this.ticks.map(s.labelInterpolationFnc);a.forEach(function(c,h){var d,u={x:0,y:0};d=a[h+1]?a[h+1]-c:Math.max(this.axisLength-c,30),i.isFalseyButZero(l[h])&&""!==l[h]||("x"===this.units.pos?(c=this.chartRect.x1+c,u.x=r.axisX.labelOffset.x,"start"===r.axisX.position?u.y=this.chartRect.padding.top+r.axisX.labelOffset.y+(n?5:20):u.y=this.chartRect.y1+r.axisX.labelOffset.y+(n?5:20)):(c=this.chartRect.y1-c,u.y=r.axisY.labelOffset.y-(n?d:0),"start"===r.axisY.position?u.x=n?this.chartRect.padding.left+r.axisY.labelOffset.x:this.chartRect.x1-10:u.x=this.chartRect.x2+r.axisY.labelOffset.x+10),s.showGrid&&i.createGrid(c,h,this,this.gridOffset,this.chartRect[this.counterUnits.len](),t,[r.classNames.grid,r.classNames[this.units.dir]],o),s.showLabel&&i.createLabel(c,d,h,l,this,s.offset,u,e,[r.classNames.label,r.classNames[this.units.dir],"start"===s.position?r.classNames[s.position]:r.classNames.end],n,o))}.bind(this))},projectValue:function(t,e,i){throw new Error("Base axis can't be instantiated!")}}),i.Axis.units=n}(window,document,t),function(t,e,i){"use strict";i.AutoScaleAxis=i.Axis.extend({constructor:function(t,e,n,r){var o=r.highLow||i.getHighLow(e,r,t.pos);this.bounds=i.getBounds(n[t.rectEnd]-n[t.rectStart],o,r.scaleMinSpace||20,r.onlyInteger),this.range={min:this.bounds.min,max:this.bounds.max},i.AutoScaleAxis.super.constructor.call(this,t,n,this.bounds.values,r)},projectValue:function(t){return this.axisLength*(+i.getMultiValue(t,this.units.pos)-this.bounds.min)/this.bounds.range}})}(window,document,t),function(t,e,i){"use strict";i.FixedScaleAxis=i.Axis.extend({constructor:function(t,e,n,r){var o=r.highLow||i.getHighLow(e,r,t.pos);this.divisor=r.divisor||1,this.ticks=r.ticks||i.times(this.divisor).map(function(t,e){return o.low+(o.high-o.low)/this.divisor*e}.bind(this)),this.ticks.sort(function(t,e){return t-e}),this.range={min:o.low,max:o.high},i.FixedScaleAxis.super.constructor.call(this,t,n,this.ticks,r),this.stepLength=this.axisLength/this.divisor},projectValue:function(t){return this.axisLength*(+i.getMultiValue(t,this.units.pos)-this.range.min)/(this.range.max-this.range.min)}})}(window,document,t),function(t,e,i){"use strict";i.StepAxis=i.Axis.extend({constructor:function(t,e,n,r){i.StepAxis.super.constructor.call(this,t,n,r.ticks,r);var o=Math.max(1,r.ticks.length-(r.stretch?1:0));this.stepLength=this.axisLength/o},projectValue:function(t,e){return this.stepLength*e}})}(window,document,t),function(t,e,i){"use strict";var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,showGridBackground:!1,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};i.Line=i.Base.extend({constructor:function(t,e,r,o){i.Line.super.constructor.call(this,t,e,n,i.extend({},n,r),o)},createChart:function(t){var e=i.normalizeData(this.data,t.reverseData,!0);this.svg=i.createSvg(this.container,t.width,t.height,t.classNames.chart);var r,o,s=this.svg.elem("g").addClass(t.classNames.gridGroup),a=this.svg.elem("g"),l=this.svg.elem("g").addClass(t.classNames.labelGroup),c=i.createChartRect(this.svg,t,n.padding);r=void 0===t.axisX.type?new i.StepAxis(i.Axis.units.x,e.normalized.series,c,i.extend({},t.axisX,{ticks:e.normalized.labels,stretch:t.fullWidth})):t.axisX.type.call(i,i.Axis.units.x,e.normalized.series,c,t.axisX),o=void 0===t.axisY.type?new i.AutoScaleAxis(i.Axis.units.y,e.normalized.series,c,i.extend({},t.axisY,{high:i.isNumeric(t.high)?t.high:t.axisY.high,low:i.isNumeric(t.low)?t.low:t.axisY.low})):t.axisY.type.call(i,i.Axis.units.y,e.normalized.series,c,t.axisY),r.createGridAndLabels(s,l,this.supportsForeignObject,t,this.eventEmitter),o.createGridAndLabels(s,l,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&i.createGridBackground(s,c,t.classNames.gridBackground,this.eventEmitter),e.raw.series.forEach(function(n,s){var l=a.elem("g");l.attr({"ct:series-name":n.name,"ct:meta":i.serialize(n.meta)}),l.addClass([t.classNames.series,n.className||t.classNames.series+"-"+i.alphaNumerate(s)].join(" "));var h=[],d=[];e.normalized.series[s].forEach(function(t,a){var l={x:c.x1+r.projectValue(t,a,e.normalized.series[s]),y:c.y1-o.projectValue(t,a,e.normalized.series[s])};h.push(l.x,l.y),d.push({value:t,valueIndex:a,meta:i.getMetaData(n,a)})}.bind(this));var u={lineSmooth:i.getSeriesOption(n,t,"lineSmooth"),showPoint:i.getSeriesOption(n,t,"showPoint"),showLine:i.getSeriesOption(n,t,"showLine"),showArea:i.getSeriesOption(n,t,"showArea"),areaBase:i.getSeriesOption(n,t,"areaBase")},p=("function"==typeof u.lineSmooth?u.lineSmooth:u.lineSmooth?i.Interpolation.monotoneCubic():i.Interpolation.none())(h,d);if(u.showPoint&&p.pathElements.forEach(function(e){var a=l.elem("line",{x1:e.x,y1:e.y,x2:e.x+.01,y2:e.y},t.classNames.point).attr({"ct:value":[e.data.value.x,e.data.value.y].filter(i.isNumeric).join(","),"ct:meta":i.serialize(e.data.meta)});this.eventEmitter.emit("draw",{type:"point",value:e.data.value,index:e.data.valueIndex,meta:e.data.meta,series:n,seriesIndex:s,axisX:r,axisY:o,group:l,element:a,x:e.x,y:e.y})}.bind(this)),u.showLine){var f=l.elem("path",{d:p.stringify()},t.classNames.line,!0);this.eventEmitter.emit("draw",{type:"line",values:e.normalized.series[s],path:p.clone(),chartRect:c,index:s,series:n,seriesIndex:s,seriesMeta:n.meta,axisX:r,axisY:o,group:l,element:f})}if(u.showArea&&o.range){var m=Math.max(Math.min(u.areaBase,o.range.max),o.range.min),g=c.y1-o.projectValue(m);p.splitByCommand("M").filter(function(t){return t.pathElements.length>1}).map(function(t){var e=t.pathElements[0],i=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,g).line(e.x,e.y).position(t.pathElements.length+1).line(i.x,g)}).forEach(function(i){var a=l.elem("path",{d:i.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized.series[s],path:i.clone(),series:n,seriesIndex:s,axisX:r,axisY:o,chartRect:c,index:s,group:l,element:a})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:o.bounds,chartRect:c,axisX:r,axisY:o,svg:this.svg,options:t})}})}(window,document,t),function(t,e,i){"use strict";var n={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:i.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,referenceValue:0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,showGridBackground:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",gridBackground:"ct-grid-background",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};i.Bar=i.Base.extend({constructor:function(t,e,r,o){i.Bar.super.constructor.call(this,t,e,n,i.extend({},n,r),o)},createChart:function(t){var e,r;t.distributeSeries?(e=i.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y")).normalized.series=e.normalized.series.map(function(t){return[t]}):e=i.normalizeData(this.data,t.reverseData,t.horizontalBars?"x":"y"),this.svg=i.createSvg(this.container,t.width,t.height,t.classNames.chart+(t.horizontalBars?" "+t.classNames.horizontalBars:""));var o=this.svg.elem("g").addClass(t.classNames.gridGroup),s=this.svg.elem("g"),a=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==e.normalized.series.length){var l=i.serialMap(e.normalized.series,function(){return Array.prototype.slice.call(arguments).map(function(t){return t}).reduce(function(t,e){return{x:t.x+(e&&e.x)||0,y:t.y+(e&&e.y)||0}},{x:0,y:0})});r=i.getHighLow([l],t,t.horizontalBars?"x":"y")}else r=i.getHighLow(e.normalized.series,t,t.horizontalBars?"x":"y");r.high=+t.high||(0===t.high?0:r.high),r.low=+t.low||(0===t.low?0:r.low);var c,h,d,u,p,f=i.createChartRect(this.svg,t,n.padding);h=t.distributeSeries&&t.stackBars?e.normalized.labels.slice(0,1):e.normalized.labels,t.horizontalBars?(c=u=void 0===t.axisX.type?new i.AutoScaleAxis(i.Axis.units.x,e.normalized.series,f,i.extend({},t.axisX,{highLow:r,referenceValue:0})):t.axisX.type.call(i,i.Axis.units.x,e.normalized.series,f,i.extend({},t.axisX,{highLow:r,referenceValue:0})),d=p=void 0===t.axisY.type?new i.StepAxis(i.Axis.units.y,e.normalized.series,f,{ticks:h}):t.axisY.type.call(i,i.Axis.units.y,e.normalized.series,f,t.axisY)):(d=u=void 0===t.axisX.type?new i.StepAxis(i.Axis.units.x,e.normalized.series,f,{ticks:h}):t.axisX.type.call(i,i.Axis.units.x,e.normalized.series,f,t.axisX),c=p=void 0===t.axisY.type?new i.AutoScaleAxis(i.Axis.units.y,e.normalized.series,f,i.extend({},t.axisY,{highLow:r,referenceValue:0})):t.axisY.type.call(i,i.Axis.units.y,e.normalized.series,f,i.extend({},t.axisY,{highLow:r,referenceValue:0})));var m=t.horizontalBars?f.x1+c.projectValue(0):f.y1-c.projectValue(0),g=[];d.createGridAndLabels(o,a,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(o,a,this.supportsForeignObject,t,this.eventEmitter),t.showGridBackground&&i.createGridBackground(o,f,t.classNames.gridBackground,this.eventEmitter),e.raw.series.forEach(function(n,r){var o,a,l=r-(e.raw.series.length-1)/2;o=t.distributeSeries&&!t.stackBars?d.axisLength/e.normalized.series.length/2:t.distributeSeries&&t.stackBars?d.axisLength/2:d.axisLength/e.normalized.series[r].length/2,(a=s.elem("g")).attr({"ct:series-name":n.name,"ct:meta":i.serialize(n.meta)}),a.addClass([t.classNames.series,n.className||t.classNames.series+"-"+i.alphaNumerate(r)].join(" ")),e.normalized.series[r].forEach(function(s,h){var v,y,b,_;if(_=t.distributeSeries&&!t.stackBars?r:t.distributeSeries&&t.stackBars?0:h,v=t.horizontalBars?{x:f.x1+c.projectValue(s&&s.x?s.x:0,h,e.normalized.series[r]),y:f.y1-d.projectValue(s&&s.y?s.y:0,_,e.normalized.series[r])}:{x:f.x1+d.projectValue(s&&s.x?s.x:0,_,e.normalized.series[r]),y:f.y1-c.projectValue(s&&s.y?s.y:0,h,e.normalized.series[r])},d instanceof i.StepAxis&&(d.options.stretch||(v[d.units.pos]+=o*(t.horizontalBars?-1:1)),v[d.units.pos]+=t.stackBars||t.distributeSeries?0:l*t.seriesBarDistance*(t.horizontalBars?-1:1)),b=g[h]||m,g[h]=b-(m-v[d.counterUnits.pos]),void 0!==s){var x={};x[d.units.pos+"1"]=v[d.units.pos],x[d.units.pos+"2"]=v[d.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(x[d.counterUnits.pos+"1"]=m,x[d.counterUnits.pos+"2"]=v[d.counterUnits.pos]):(x[d.counterUnits.pos+"1"]=b,x[d.counterUnits.pos+"2"]=g[h]),x.x1=Math.min(Math.max(x.x1,f.x1),f.x2),x.x2=Math.min(Math.max(x.x2,f.x1),f.x2),x.y1=Math.min(Math.max(x.y1,f.y2),f.y1),x.y2=Math.min(Math.max(x.y2,f.y2),f.y1);var w=i.getMetaData(n,h);y=a.elem("line",x,t.classNames.bar).attr({"ct:value":[s.x,s.y].filter(i.isNumeric).join(","),"ct:meta":i.serialize(w)}),this.eventEmitter.emit("draw",i.extend({type:"bar",value:s,index:h,meta:w,series:n,seriesIndex:r,axisX:u,axisY:p,chartRect:f,group:a,element:y},x))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:f,axisX:u,axisY:p,svg:this.svg,options:t})}})}(window,document,t),function(t,e,i){"use strict";var n={width:void 0,height:void 0,chartPadding:5,classNames:{chartPie:"ct-chart-pie",chartDonut:"ct-chart-donut",series:"ct-series",slicePie:"ct-slice-pie",sliceDonut:"ct-slice-donut",sliceDonutSolid:"ct-slice-donut-solid",label:"ct-label"},startAngle:0,total:void 0,donut:!1,donutSolid:!1,donutWidth:60,showLabel:!0,labelOffset:0,labelPosition:"inside",labelInterpolationFnc:i.noop,labelDirection:"neutral",reverseData:!1,ignoreEmptyValues:!1};function r(t,e,i){var n=e.x>t.x;return n&&"explode"===i||!n&&"implode"===i?"start":n&&"implode"===i||!n&&"explode"===i?"end":"middle"}i.Pie=i.Base.extend({constructor:function(t,e,r,o){i.Pie.super.constructor.call(this,t,e,n,i.extend({},n,r),o)},createChart:function(t){var e,o,s,a,l,c=i.normalizeData(this.data),h=[],d=t.startAngle;this.svg=i.createSvg(this.container,t.width,t.height,t.donut?t.classNames.chartDonut:t.classNames.chartPie),o=i.createChartRect(this.svg,t,n.padding),s=Math.min(o.width()/2,o.height()/2),l=t.total||c.normalized.series.reduce(function(t,e){return t+e},0);var u=i.quantity(t.donutWidth);"%"===u.unit&&(u.value*=s/100),s-=t.donut&&!t.donutSolid?u.value/2:0,a="outside"===t.labelPosition||t.donut&&!t.donutSolid?s:"center"===t.labelPosition?0:t.donutSolid?s-u.value/2:s/2,a+=t.labelOffset;var p={x:o.x1+o.width()/2,y:o.y2+o.height()/2},f=1===c.raw.series.filter(function(t){return t.hasOwnProperty("value")?0!==t.value:0!==t}).length;c.raw.series.forEach(function(t,e){h[e]=this.svg.elem("g",null,null)}.bind(this)),t.showLabel&&(e=this.svg.elem("g",null,null)),c.raw.series.forEach(function(n,o){if(0!==c.normalized.series[o]||!t.ignoreEmptyValues){h[o].attr({"ct:series-name":n.name}),h[o].addClass([t.classNames.series,n.className||t.classNames.series+"-"+i.alphaNumerate(o)].join(" "));var m=l>0?d+c.normalized.series[o]/l*360:0,g=Math.max(0,d-(0===o||f?0:.2));m-g>=359.99&&(m=g+359.99);var v,y,b,_=i.polarToCartesian(p.x,p.y,s,g),x=i.polarToCartesian(p.x,p.y,s,m),w=new i.Svg.Path(!t.donut||t.donutSolid).move(x.x,x.y).arc(s,s,0,m-d>180,0,_.x,_.y);t.donut?t.donutSolid&&(b=s-u.value,v=i.polarToCartesian(p.x,p.y,b,d-(0===o||f?0:.2)),y=i.polarToCartesian(p.x,p.y,b,m),w.line(v.x,v.y),w.arc(b,b,0,m-d>180,1,y.x,y.y)):w.line(p.x,p.y);var k=t.classNames.slicePie;t.donut&&(k=t.classNames.sliceDonut,t.donutSolid&&(k=t.classNames.sliceDonutSolid));var C=h[o].elem("path",{d:w.stringify()},k);if(C.attr({"ct:value":c.normalized.series[o],"ct:meta":i.serialize(n.meta)}),t.donut&&!t.donutSolid&&(C._node.style.strokeWidth=u.value+"px"),this.eventEmitter.emit("draw",{type:"slice",value:c.normalized.series[o],totalDataSum:l,index:o,meta:n.meta,series:n,group:h[o],element:C,path:w.clone(),center:p,radius:s,startAngle:d,endAngle:m}),t.showLabel){var S,D;S=1===c.raw.series.length?{x:p.x,y:p.y}:i.polarToCartesian(p.x,p.y,a,d+(m-d)/2),D=c.normalized.labels&&!i.isFalseyButZero(c.normalized.labels[o])?c.normalized.labels[o]:c.normalized.series[o];var T=t.labelInterpolationFnc(D,o);if(T||0===T){var A=e.elem("text",{dx:S.x,dy:S.y,"text-anchor":r(p,S,t.labelDirection)},t.classNames.label).text(""+T);this.eventEmitter.emit("draw",{type:"label",index:o,group:e,element:A,text:""+T,x:S.x,y:S.y})}}d=m}}.bind(this)),this.eventEmitter.emit("created",{chartRect:o,svg:this.svg,options:t})},determineAnchorPosition:r})}(window,document,t),t}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function(){return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=i[s]={exports:{}};e[s][0].call(h.exports,function(t){var i=e[s][1][t];return r(i||t)},h,h.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}}()({1:[function(t,e,i){var n=t(5);function r(t){if(t){var e=[0,0,0],i=1,r=t.match(/^#([a-fA-F0-9]{3})$/i);if(r){r=r[1];for(var o=0;o<e.length;o++)e[o]=parseInt(r[o]+r[o],16)}else if(r=t.match(/^#([a-fA-F0-9]{6})$/i)){r=r[1];for(o=0;o<e.length;o++)e[o]=parseInt(r.slice(2*o,2*o+2),16)}else if(r=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=parseInt(r[o+1]);i=parseFloat(r[4])}else if(r=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<e.length;o++)e[o]=Math.round(2.55*parseFloat(r[o+1]));i=parseFloat(r[4])}else if(r=t.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(e=n[r[1]]))return}for(o=0;o<e.length;o++)e[o]=h(e[o],0,255);return i=i||0==i?h(i,0,1):1,e[3]=i,e}}function o(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[h(parseInt(e[1]),0,360),h(parseFloat(e[2]),0,100),h(parseFloat(e[3]),0,100),h(isNaN(i)?1:i,0,1)]}}}function s(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[h(parseInt(e[1]),0,360),h(parseFloat(e[2]),0,100),h(parseFloat(e[3]),0,100),h(isNaN(i)?1:i,0,1)]}}}function a(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function l(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function c(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function h(t,e,i){return Math.min(Math.max(e,t),i)}function d(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}e.exports={getRgba:r,getHsla:o,getRgb:function(t){var e=r(t);return e&&e.slice(0,3)},getHsl:function(t){var e=o(t);return e&&e.slice(0,3)},getHwb:s,getAlpha:function(t){var e=r(t);if(e)return e[3];if(e=o(t))return e[3];if(e=s(t))return e[3]},hexString:function(t){return"#"+d(t[0])+d(t[1])+d(t[2])},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return a(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:a,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return l(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+r+"%)"},percentaString:l,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return c(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:c,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return u[t.slice(0,3)]}};var u={};for(var p in n)u[n[p]]=p},{5:5}],2:[function(t,e,i){var n=t(4),r=t(1),o=function(t){return t instanceof o?t:this instanceof o?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=r.getRgba(t))?this.setValues("rgb",e):(e=r.getHsla(t))?this.setValues("hsl",e):(e=r.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new o(t);var e};o.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return r.hexString(this.values.rgb)},rgbString:function(){return r.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return r.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return r.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return r.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return r.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return r.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return r.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,r=2*n-1,o=this.alpha()-i.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,a=1-s;return this.rgb(s*this.red()+a*i.red(),s*this.green()+a*i.green(),s*this.blue()+a*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new o,n=this.values,r=i.values;for(var s in n)n.hasOwnProperty(s)&&(t=n[s],"[object Array]"===(e={}.toString.call(t))?r[s]=t.slice(0):"[object Number]"===e?r[s]=t:console.error("unexpected color value:",t));return i}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},o.prototype.setValues=function(t,e){var i,r,o=this.values,s=this.spaces,a=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)o[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)o[t][i]=e[t.charAt(i)];l=e.a}else if(void 0!==e[s[t][0]]){var c=s[t];for(i=0;i<t.length;i++)o[t][i]=e[c[i]];l=e.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===l?o.alpha:l)),"alpha"===t)return!1;for(i=0;i<t.length;i++)r=Math.max(0,Math.min(a[t][i],o[t][i])),o[t][i]=Math.round(r);for(var h in s)h!==t&&(o[h]=n[t][h](o[t]));return!0},o.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},o.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:i===n[e]?this:(n[e]=i,this.setValues(t,n),this)},"undefined"!=typeof window&&(window.Color=o),e.exports=o},{1:1,4:4}],3:[function(t,e,i){function n(t){var e,i,n=t[0]/255,r=t[1]/255,o=t[2]/255,s=Math.min(n,r,o),a=Math.max(n,r,o),l=a-s;return a==s?e=0:n==a?e=(r-o)/l:r==a?e=2+(o-n)/l:o==a&&(e=4+(n-r)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(s+a)/2,[e,100*(a==s?0:i<=.5?l/(a+s):l/(2-a-s)),100*i]}function o(t){var e,i,n=t[0],r=t[1],o=t[2],s=Math.min(n,r,o),a=Math.max(n,r,o),l=a-s;return i=0==a?0:l/a*1e3/10,a==s?e=0:n==a?e=(r-o)/l:r==a?e=2+(o-n)/l:o==a&&(e=4+(n-r)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,a/255*1e3/10]}function s(t){var e=t[0],i=t[1],r=t[2];return[n(t)[0],100*(1/255*Math.min(e,Math.min(i,r))),100*(r=1-1/255*Math.max(e,Math.max(i,r)))]}function a(t){var e,i=t[0]/255,n=t[1]/255,r=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-r)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-r-e)/(1-e)||0),100*e]}function l(t){return S[JSON.stringify(t)]}function c(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function h(t){var e=c(t),i=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,i=(i/=95.047)>.008856?Math.pow(i,1/3):7.787*i+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function d(t){var e,i,n,r,o,s=t[0]/360,a=t[1]/100,l=t[2]/100;if(0==a)return[o=255*l,o,o];e=2*l-(i=l<.5?l*(1+a):l+a-l*a),r=[0,0,0];for(var c=0;c<3;c++)(n=s+1/3*-(c-1))<0&&n++,n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,r[c]=255*o;return r}function u(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-i),a=255*n*(1-i*o),l=255*n*(1-i*(1-o));n*=255;switch(r){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}}function p(t){var e,i,n,o,s=t[0]/360,a=t[1]/100,l=t[2]/100,c=a+l;switch(c>1&&(a/=c,l/=c),i=1-l,n=6*s-(e=Math.floor(6*s)),0!=(1&e)&&(n=1-n),o=a+n*(i-a),e){default:case 6:case 0:r=i,g=o,b=a;break;case 1:r=o,g=i,b=a;break;case 2:r=a,g=i,b=o;break;case 3:r=a,g=o,b=i;break;case 4:r=o,g=a,b=i;break;case 5:r=i,g=a,b=o}return[255*r,255*g,255*b]}function f(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r))]}function m(t){var e,i,n,r=t[0]/100,o=t[1]/100,s=t[2]/100;return i=-.9689*r+1.8758*o+.0415*s,n=.0557*r+-.204*o+1.057*s,e=(e=3.2406*r+-1.5372*o+-.4986*s)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function v(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function y(t){var e,i,n,r,o=t[0],s=t[1],a=t[2];return o<=8?r=(i=100*o/903.3)/100*7.787+16/116:(i=100*Math.pow((o+16)/116,3),r=Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(s/500+r-16/116)/7.787:95.047*Math.pow(s/500+r,3),i,n=n/108.883<=.008859?n=108.883*(r-a/200-16/116)/7.787:108.883*Math.pow(r-a/200,3)]}function _(t){var e,i=t[0],n=t[1],r=t[2];return(e=360*Math.atan2(r,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+r*r),e]}function x(t){return m(y(t))}function w(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function k(t){return C[t]}e.exports={rgb2hsl:n,rgb2hsv:o,rgb2hwb:s,rgb2cmyk:a,rgb2keyword:l,rgb2xyz:c,rgb2lab:h,rgb2lch:function(t){return _(h(t))},hsl2rgb:d,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;if(0===n)return[0,0,0];return[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]},hsl2hwb:function(t){return s(d(t))},hsl2cmyk:function(t){return a(d(t))},hsl2keyword:function(t){return l(d(t))},hsv2rgb:u,hsv2hsl:function(t){var e,i,n=t[0],r=t[1]/100,o=t[2]/100;return e=r*o,[n,100*(e=(e/=(i=(2-r)*o)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return s(u(t))},hsv2cmyk:function(t){return a(u(t))},hsv2keyword:function(t){return l(u(t))},hwb2rgb:p,hwb2hsl:function(t){return n(p(t))},hwb2hsv:function(t){return o(p(t))},hwb2cmyk:function(t){return a(p(t))},hwb2keyword:function(t){return l(p(t))},cmyk2rgb:f,cmyk2hsl:function(t){return n(f(t))},cmyk2hsv:function(t){return o(f(t))},cmyk2hwb:function(t){return s(f(t))},cmyk2keyword:function(t){return l(f(t))},keyword2rgb:k,keyword2hsl:function(t){return n(k(t))},keyword2hsv:function(t){return o(k(t))},keyword2hwb:function(t){return s(k(t))},keyword2cmyk:function(t){return a(k(t))},keyword2lab:function(t){return h(k(t))},keyword2xyz:function(t){return c(k(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return _(v(t))},lab2xyz:y,lab2rgb:x,lab2lch:_,lch2lab:w,lch2xyz:function(t){return y(w(t))},lch2rgb:function(t){return x(w(t))}};var C={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},S={};for(var D in C)S[JSON.stringify(C[D])]=D},{}],4:[function(t,e,i){var n=t(3),r=function(){return new c};for(var o in n){r[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),n[t](e)}}(o);var s=/(\w+)2(\w+)/.exec(o),a=s[1],l=s[2];(r[a]=r[a]||{})[l]=r[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=n[t](e);if("string"==typeof i||void 0===i)return i;for(var r=0;r<i.length;r++)i[r]=Math.round(i[r]);return i}}(o)}var c=function(){this.convs={}};c.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},c.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},c.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=r[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){c.prototype[t]=function(e){return this.routeSpace(t,arguments)}}),e.exports=r},{3:3}],5:[function(t,e,i){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],6:[function(t,e,i){var n,r;n=this,r=function(){"use strict";var i,n;function r(){return i.apply(null,arguments)}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return void 0===t}function l(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function h(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function u(t,e){for(var i in e)d(e,i)&&(t[i]=e[i]);return d(e,"toString")&&(t.toString=e.toString),d(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,i,n){return Me(t,e,i,n,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function m(t){if(null==t._isValid){var e=f(t),i=n.call(e.parsedDateParts,function(t){return null!=t}),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function g(t){var e=p(NaN);return null!=t?u(f(e),t):f(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var v=r.momentProperties=[];function y(t,e){var i,n,r;if(a(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),a(e._i)||(t._i=e._i),a(e._f)||(t._f=e._f),a(e._l)||(t._l=e._l),a(e._strict)||(t._strict=e._strict),a(e._tzm)||(t._tzm=e._tzm),a(e._isUTC)||(t._isUTC=e._isUTC),a(e._offset)||(t._offset=e._offset),a(e._pf)||(t._pf=f(e)),a(e._locale)||(t._locale=e._locale),v.length>0)for(i=0;i<v.length;i++)a(r=e[n=v[i]])||(t[n]=r);return t}var b=!1;function _(t){y(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,r.updateOffset(this),b=!1)}function x(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=w(e)),i}function C(t,e,i){var n,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(n=0;n<r;n++)(i&&t[n]!==e[n]||!i&&k(t[n])!==k(e[n]))&&s++;return s+o}function S(t){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function D(t,e){var i=!0;return u(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,t),i){for(var n,o=[],s=0;s<arguments.length;s++){if(n="","object"==typeof arguments[s]){for(var a in n+="\n["+s+"] ",arguments[0])n+=a+": "+arguments[0][a]+", ";n=n.slice(0,-2)}else n=arguments[s];o.push(n)}S(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)},e)}var T,A={};function M(t,e){null!=r.deprecationHandler&&r.deprecationHandler(t,e),A[t]||(S(e),A[t]=!0)}function E(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t,e){var i,n=u({},t);for(i in e)d(e,i)&&(s(t[i])&&s(e[i])?(n[i]={},u(n[i],t[i]),u(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)d(t,i)&&!d(e,i)&&s(t[i])&&(n[i]=u({},n[i]));return n}function I(t){null!=t&&this.set(t)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,T=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)d(t,e)&&i.push(e);return i};var O={};function N(t,e){var i=t.toLowerCase();O[i]=O[i+"s"]=O[e]=t}function L(t){return"string"==typeof t?O[t]||O[t.toLowerCase()]:void 0}function j(t){var e,i,n={};for(i in t)d(t,i)&&(e=L(i))&&(n[e]=t[i]);return n}var F={};function $(t,e){F[t]=e}function R(t,e,i){var n=""+Math.abs(t),r=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},U={};function W(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(U[t]=r),e&&(U[e[0]]=function(){return R(r.apply(this,arguments),e[1],e[2])}),i&&(U[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function Y(t,e){return t.isValid()?(e=V(e,t.localeData()),B[e]=B[e]||function(t){var e,i,n,r=t.match(H);for(e=0,i=r.length;e<i;e++)U[r[e]]?r[e]=U[r[e]]:r[e]=(n=r[e]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(e){var n,o="";for(n=0;n<i;n++)o+=E(r[n])?r[n].call(e,t):r[n];return o}}(e),B[e](t)):t.localeData().invalidDate()}function V(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;i>=0&&z.test(t);)t=t.replace(z,n),z.lastIndex=0,i-=1;return t}var q=/\d/,G=/\d\d/,K=/\d{3}/,X=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,it=/\d{1,4}/,nt=/[+-]?\d{1,6}/,rt=/\d+/,ot=/[+-]?\d+/,st=/Z|[+-]\d\d:?\d\d/gi,at=/Z|[+-]\d\d(?::?\d\d)?/gi,lt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ct={};function ht(t,e,i){ct[t]=E(e)?e:function(t,n){return t&&i?i:e}}function dt(t,e){return d(ct,t)?ct[t](e._strict,e._locale):new RegExp(ut(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,r){return e||i||n||r})))}function ut(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pt={};function ft(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),l(e)&&(n=function(t,i){i[e]=k(t)}),i=0;i<t.length;i++)pt[t[i]]=n}function mt(t,e){ft(t,function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)})}function gt(t,e,i){null!=e&&d(pt,t)&&pt[t](e,i._a,i,t)}var vt=0,yt=1,bt=2,_t=3,xt=4,wt=5,kt=6,Ct=7,St=8;function Dt(t){return Tt(t)?366:365}function Tt(t){return t%4==0&&t%100!=0||t%400==0}W("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),W(0,["YY",2],0,function(){return this.year()%100}),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),N("year","y"),$("year",1),ht("Y",ot),ht("YY",Q,G),ht("YYYY",it,X),ht("YYYYY",nt,Z),ht("YYYYYY",nt,Z),ft(["YYYYY","YYYYYY"],vt),ft("YYYY",function(t,e){e[vt]=2===t.length?r.parseTwoDigitYear(t):k(t)}),ft("YY",function(t,e){e[vt]=r.parseTwoDigitYear(t)}),ft("Y",function(t,e){e[vt]=parseInt(t,10)}),r.parseTwoDigitYear=function(t){return k(t)+(k(t)>68?1900:2e3)};var At,Mt=Et("FullYear",!0);function Et(t,e){return function(i){return null!=i?(It(this,t,i),r.updateOffset(this,e),this):Pt(this,t)}}function Pt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function It(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&Tt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Ot(i,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function Ot(t,e){if(isNaN(t)||isNaN(e))return NaN;var i,n=(e%(i=12)+i)%i;return t+=(e-n)/12,1===n?Tt(t)?29:28:31-n%7%2}At=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},W("M",["MM",2],"Mo",function(){return this.month()+1}),W("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),W("MMMM",0,0,function(t){return this.localeData().months(this,t)}),N("month","M"),$("month",8),ht("M",Q),ht("MM",Q,G),ht("MMM",function(t,e){return e.monthsShortRegex(t)}),ht("MMMM",function(t,e){return e.monthsRegex(t)}),ft(["M","MM"],function(t,e){e[yt]=k(t)-1}),ft(["MMM","MMMM"],function(t,e,i,n){var r=i._locale.monthsParse(t,n,i._strict);null!=r?e[yt]=r:f(i).invalidMonth=t});var Nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Lt="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var jt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ft(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!l(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),Ot(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function $t(t){return null!=t?(Ft(this,t),r.updateOffset(this,!0),this):Pt(this,"Month")}var Rt=lt;var Ht=lt;function zt(){function t(t,e){return e.length-t.length}var e,i,n=[],r=[],o=[];for(e=0;e<12;e++)i=p([2e3,e]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(n.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)n[e]=ut(n[e]),r[e]=ut(r[e]);for(e=0;e<24;e++)o[e]=ut(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function Bt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Ut(t,e,i){var n=7+e-i;return-((7+Bt(t,0,n).getUTCDay()-e)%7)+n-1}function Wt(t,e,i,n,r){var o,s,a=1+7*(e-1)+(7+i-n)%7+Ut(t,n,r);return a<=0?s=Dt(o=t-1)+a:a>Dt(t)?(o=t+1,s=a-Dt(t)):(o=t,s=a),{year:o,dayOfYear:s}}function Yt(t,e,i){var n,r,o=Ut(t.year(),e,i),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?n=s+Vt(r=t.year()-1,e,i):s>Vt(t.year(),e,i)?(n=s-Vt(t.year(),e,i),r=t.year()+1):(r=t.year(),n=s),{week:n,year:r}}function Vt(t,e,i){var n=Ut(t,e,i),r=Ut(t+1,e,i);return(Dt(t)-n+r)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),$("week",5),$("isoWeek",5),ht("w",Q),ht("ww",Q,G),ht("W",Q),ht("WW",Q,G),mt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=k(t)});W("d",0,"do","day"),W("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),W("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),W("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),$("day",11),$("weekday",11),$("isoWeekday",11),ht("d",Q),ht("e",Q),ht("E",Q),ht("dd",function(t,e){return e.weekdaysMinRegex(t)}),ht("ddd",function(t,e){return e.weekdaysShortRegex(t)}),ht("dddd",function(t,e){return e.weekdaysRegex(t)}),mt(["dd","ddd","dddd"],function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:f(i).invalidWeekday=t}),mt(["d","e","E"],function(t,e,i,n){e[n]=k(t)});var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Gt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Kt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Xt=lt;var Zt=lt;var Qt=lt;function Jt(){function t(t,e){return e.length-t.length}var e,i,n,r,o,s=[],a=[],l=[],c=[];for(e=0;e<7;e++)i=p([2e3,1]).day(e),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),o=this.weekdays(i,""),s.push(n),a.push(r),l.push(o),c.push(n),c.push(r),c.push(o);for(s.sort(t),a.sort(t),l.sort(t),c.sort(t),e=0;e<7;e++)a[e]=ut(a[e]),l[e]=ut(l[e]),c[e]=ut(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function te(){return this.hours()%12||12}function ee(t,e){W(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ie(t,e){return e._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,te),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+te.apply(this)+R(this.minutes(),2)}),W("hmmss",0,0,function(){return""+te.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+R(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)}),ee("a",!0),ee("A",!1),N("hour","h"),$("hour",13),ht("a",ie),ht("A",ie),ht("H",Q),ht("h",Q),ht("k",Q),ht("HH",Q,G),ht("hh",Q,G),ht("kk",Q,G),ht("hmm",J),ht("hmmss",tt),ht("Hmm",J),ht("Hmmss",tt),ft(["H","HH"],_t),ft(["k","kk"],function(t,e,i){var n=k(t);e[_t]=24===n?0:n}),ft(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),ft(["h","hh"],function(t,e,i){e[_t]=k(t),f(i).bigHour=!0}),ft("hmm",function(t,e,i){var n=t.length-2;e[_t]=k(t.substr(0,n)),e[xt]=k(t.substr(n)),f(i).bigHour=!0}),ft("hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[_t]=k(t.substr(0,n)),e[xt]=k(t.substr(n,2)),e[wt]=k(t.substr(r)),f(i).bigHour=!0}),ft("Hmm",function(t,e,i){var n=t.length-2;e[_t]=k(t.substr(0,n)),e[xt]=k(t.substr(n))}),ft("Hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[_t]=k(t.substr(0,n)),e[xt]=k(t.substr(n,2)),e[wt]=k(t.substr(r))});var ne,re=Et("Hours",!0),oe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Lt,monthsShort:jt,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:Kt,weekdaysShort:Gt,meridiemParse:/[ap]\.?m?\.?/i},se={},ae={};function le(t){return t?t.toLowerCase().replace("_","-"):t}function ce(i){var n=null;if(!se[i]&&void 0!==e&&e&&e.exports)try{n=ne._abbr,t("./locale/"+i),he(n)}catch(t){}return se[i]}function he(t,e){var i;return t&&(i=a(e)?ue(t):de(t,e))&&(ne=i),ne._abbr}function de(t,e){if(null!==e){var i=oe;if(e.abbr=t,null!=se[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=se[t]._config;else if(null!=e.parentLocale){if(null==se[e.parentLocale])return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;i=se[e.parentLocale]._config}return se[t]=new I(P(i,e)),ae[t]&&ae[t].forEach(function(t){de(t.name,t.config)}),he(t),se[t]}return delete se[t],null}function ue(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ne;if(!o(t)){if(e=ce(t))return e;t=[t]}return function(t){for(var e,i,n,r,o=0;o<t.length;){for(e=(r=le(t[o]).split("-")).length,i=(i=le(t[o+1]))?i.split("-"):null;e>0;){if(n=ce(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&C(r,i,!0)>=e-1)break;e--}o++}return null}(t)}function pe(t){var e,i=t._a;return i&&-2===f(t).overflow&&(e=i[yt]<0||i[yt]>11?yt:i[bt]<1||i[bt]>Ot(i[vt],i[yt])?bt:i[_t]<0||i[_t]>24||24===i[_t]&&(0!==i[xt]||0!==i[wt]||0!==i[kt])?_t:i[xt]<0||i[xt]>59?xt:i[wt]<0||i[wt]>59?wt:i[kt]<0||i[kt]>999?kt:-1,f(t)._overflowDayOfYear&&(e<vt||e>bt)&&(e=bt),f(t)._overflowWeeks&&-1===e&&(e=Ct),f(t)._overflowWeekday&&-1===e&&(e=St),f(t).overflow=e),t}function fe(t,e,i){return null!=t?t:null!=e?e:i}function me(t){var e,i,n,o,s,a=[];if(!t._d){for(n=function(t){var e=new Date(r.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[bt]&&null==t._a[yt]&&function(t){var e,i,n,r,o,s,a,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,s=4,i=fe(e.GG,t._a[vt],Yt(Ee(),1,4).year),n=fe(e.W,1),((r=fe(e.E,1))<1||r>7)&&(l=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var c=Yt(Ee(),o,s);i=fe(e.gg,t._a[vt],c.year),n=fe(e.w,c.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}n<1||n>Vt(i,o,s)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(a=Wt(i,n,r,o,s),t._a[vt]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=fe(t._a[vt],n[vt]),(t._dayOfYear>Dt(s)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),i=Bt(s,0,t._dayOfYear),t._a[yt]=i.getUTCMonth(),t._a[bt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=n[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[_t]&&0===t._a[xt]&&0===t._a[wt]&&0===t._a[kt]&&(t._nextDay=!0,t._a[_t]=0),t._d=(t._useUTC?Bt:function(t,e,i,n,r,o,s){var a=new Date(t,e,i,n,r,o,s);return t<100&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}).apply(null,a),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[_t]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}var ge=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ve=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ye=/Z|[+-]\d\d(?::?\d\d)?/,be=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_e=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xe=/^\/?Date\((\-?\d+)/i;function we(t){var e,i,n,r,o,s,a=t._i,l=ge.exec(a)||ve.exec(a);if(l){for(f(t).iso=!0,e=0,i=be.length;e<i;e++)if(be[e][1].exec(l[1])){r=be[e][0],n=!1!==be[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=_e.length;e<i;e++)if(_e[e][1].exec(l[3])){o=(l[2]||" ")+_e[e][0];break}if(null==o)return void(t._isValid=!1)}if(!n&&null!=o)return void(t._isValid=!1);if(l[4]){if(!ye.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),Te(t)}else t._isValid=!1}var ke=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Ce(t,e,i,n,r,o){var s=[function(t){var e=parseInt(t,10);if(e<=49)return 2e3+e;if(e<=999)return 1900+e;return e}(t),jt.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(r,10)];return o&&s.push(parseInt(o,10)),s}var Se={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function De(t){var e=ke.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(e){var i=Ce(e[4],e[3],e[2],e[5],e[6],e[7]);if(!function(t,e,i){return!t||Gt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(f(i).weekdayMismatch=!0,i._isValid=!1,!1)}(e[1],i,t))return;t._a=i,t._tzm=function(t,e,i){if(t)return Se[t];if(e)return 0;var n=parseInt(i,10),r=n%100;return(n-r)/100*60+r}(e[8],e[9],e[10]),t._d=Bt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function Te(t){if(t._f!==r.ISO_8601)if(t._f!==r.RFC_2822){t._a=[],f(t).empty=!0;var e,i,n,o,s,a=""+t._i,l=a.length,c=0;for(n=V(t._f,t._locale).match(H)||[],e=0;e<n.length;e++)o=n[e],(i=(a.match(dt(o,t))||[])[0])&&((s=a.substr(0,a.indexOf(i))).length>0&&f(t).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),c+=i.length),U[o]?(i?f(t).empty=!1:f(t).unusedTokens.push(o),gt(o,i,t)):t._strict&&!i&&f(t).unusedTokens.push(o);f(t).charsLeftOver=l-c,a.length>0&&f(t).unusedInput.push(a),t._a[_t]<=12&&!0===f(t).bigHour&&t._a[_t]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[_t]=function(t,e,i){var n;if(null==i)return e;return null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}(t._locale,t._a[_t],t._meridiem),me(t),pe(t)}else De(t);else we(t)}function Ae(t){var e=t._i,i=t._f;return t._locale=t._locale||ue(t._l),null===e||void 0===i&&""===e?g({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),x(e)?new _(pe(e)):(c(e)?t._d=e:o(i)?function(t){var e,i,n,r,o;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<t._f.length;r++)o=0,e=y({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Te(e),m(e)&&(o+=f(e).charsLeftOver,o+=10*f(e).unusedTokens.length,f(e).score=o,(null==n||o<n)&&(n=o,i=e));u(t,i||e)}(t):i?Te(t):function(t){var e=t._i;a(e)?t._d=new Date(r.now()):c(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=xe.exec(t._i);null===e?(we(t),!1===t._isValid&&(delete t._isValid,De(t),!1===t._isValid&&(delete t._isValid,r.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):o(e)?(t._a=h(e.slice(0),function(t){return parseInt(t,10)}),me(t)):s(e)?function(t){if(!t._d){var e=j(t._i);t._a=h([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),me(t)}}(t):l(e)?t._d=new Date(e):r.createFromInputFallback(t)}(t),m(t)||(t._d=null),t))}function Me(t,e,i,n,r){var a,l={};return!0!==i&&!1!==i||(n=i,i=void 0),(s(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||o(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=r,l._l=i,l._i=t,l._f=e,l._strict=n,(a=new _(pe(Ae(l))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Ee(t,e,i,n){return Me(t,e,i,n,!1)}r.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Pe=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ee.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()}),Ie=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ee.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:g()});function Oe(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Ee();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}var Ne=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Le(t){var e=j(t),i=e.year||0,n=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,l=e.minute||0,c=e.second||0,h=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===At.call(Ne,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var i=!1,n=0;n<Ne.length;++n)if(t[Ne[n]]){if(i)return!1;parseFloat(t[Ne[n]])!==k(t[Ne[n]])&&(i=!0)}return!0}(e),this._milliseconds=+h+1e3*c+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*n+12*i,this._data={},this._locale=ue(),this._bubble()}function je(t){return t instanceof Le}function Fe(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function $e(t,e){W(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+R(~~(t/60),2)+e+R(~~t%60,2)})}$e("Z",":"),$e("ZZ",""),ht("Z",at),ht("ZZ",at),ft(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=He(at,t)});var Re=/([\+\-]|\d\d)/gi;function He(t,e){var i=(e||"").match(t);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Re)||["-",0,0],r=60*n[1]+k(n[2]);return 0===r?0:"+"===n[0]?r:-r}function ze(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(x(t)||c(t)?t.valueOf():Ee(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),r.updateOffset(i,!1),i):Ee(t).local()}function Be(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ue(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}r.updateOffset=function(){};var We=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ye=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ve(t,e){var i,n,r,o=t,s=null;return je(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:l(t)?(o={},e?o[e]=t:o.milliseconds=t):(s=We.exec(t))?(i="-"===s[1]?-1:1,o={y:0,d:k(s[bt])*i,h:k(s[_t])*i,m:k(s[xt])*i,s:k(s[wt])*i,ms:k(Fe(1e3*s[kt]))*i}):(s=Ye.exec(t))?(i="-"===s[1]?-1:(s[1],1),o={y:qe(s[2],i),M:qe(s[3],i),w:qe(s[4],i),d:qe(s[5],i),h:qe(s[6],i),m:qe(s[7],i),s:qe(s[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=function(t,e){var i;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=ze(e,t),t.isBefore(e)?i=Ge(t,e):((i=Ge(e,t)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(Ee(o.from),Ee(o.to)),(o={}).ms=r.milliseconds,o.M=r.months),n=new Le(o),je(t)&&d(t,"_locale")&&(n._locale=t._locale),n}function qe(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Ge(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ke(t,e){return function(i,n){var r;return null===n||isNaN(+n)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=n,n=r),Xe(this,Ve(i="string"==typeof i?+i:i,n),t),this}}function Xe(t,e,i,n){var o=e._milliseconds,s=Fe(e._days),a=Fe(e._months);t.isValid()&&(n=null==n||n,a&&Ft(t,Pt(t,"Month")+a*i),s&&It(t,"Date",Pt(t,"Date")+s*i),o&&t._d.setTime(t._d.valueOf()+o*i),n&&r.updateOffset(t,s||a))}Ve.fn=Le.prototype,Ve.invalid=function(){return Ve(NaN)};var Ze=Ke(1,"add"),Qe=Ke(-1,"subtract");function Je(t,e){var i=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(i,"months");return-(i+(e-n<0?(e-n)/(n-t.clone().add(i-1,"months")):(e-n)/(t.clone().add(i+1,"months")-n)))||0}function ti(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ue(t))&&(this._locale=e),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ei=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function ii(){return this._locale}function ni(t,e){W(0,[t,t.length],0,e)}function ri(t,e,i,n,r){var o;return null==t?Yt(this,n,r).year:(e>(o=Vt(t,n,r))&&(e=o),function(t,e,i,n,r){var o=Wt(t,e,i,n,r),s=Bt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}.call(this,t,e,i,n,r))}W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ni("gggg","weekYear"),ni("ggggg","weekYear"),ni("GGGG","isoWeekYear"),ni("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),$("weekYear",1),$("isoWeekYear",1),ht("G",ot),ht("g",ot),ht("GG",Q,G),ht("gg",Q,G),ht("GGGG",it,X),ht("gggg",it,X),ht("GGGGG",nt,Z),ht("ggggg",nt,Z),mt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=k(t)}),mt(["gg","GG"],function(t,e,i,n){e[n]=r.parseTwoDigitYear(t)}),W("Q",0,"Qo","quarter"),N("quarter","Q"),$("quarter",7),ht("Q",q),ft("Q",function(t,e){e[yt]=3*(k(t)-1)}),W("D",["DD",2],"Do","date"),N("date","D"),$("date",9),ht("D",Q),ht("DD",Q,G),ht("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ft(["D","DD"],bt),ft("Do",function(t,e){e[bt]=k(t.match(Q)[0])});var oi=Et("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),$("dayOfYear",4),ht("DDD",et),ht("DDDD",K),ft(["DDD","DDDD"],function(t,e,i){i._dayOfYear=k(t)}),W("m",["mm",2],0,"minute"),N("minute","m"),$("minute",14),ht("m",Q),ht("mm",Q,G),ft(["m","mm"],xt);var si=Et("Minutes",!1);W("s",["ss",2],0,"second"),N("second","s"),$("second",15),ht("s",Q),ht("ss",Q,G),ft(["s","ss"],wt);var ai,li=Et("Seconds",!1);for(W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),N("millisecond","ms"),$("millisecond",16),ht("S",et,q),ht("SS",et,G),ht("SSS",et,K),ai="SSSS";ai.length<=9;ai+="S")ht(ai,rt);function ci(t,e){e[kt]=k(1e3*("0."+t))}for(ai="S";ai.length<=9;ai+="S")ft(ai,ci);var hi=Et("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var di=_.prototype;function ui(t){return t}di.add=Ze,di.calendar=function(t,e){var i=t||Ee(),n=ze(i,this).startOf("day"),o=r.calendarFormat(this,n)||"sameElse",s=e&&(E(e[o])?e[o].call(this,i):e[o]);return this.format(s||this.localeData().calendar(o,this,Ee(i)))},di.clone=function(){return new _(this)},di.diff=function(t,e,i){var n,r,o;if(!this.isValid())return NaN;if(!(n=ze(t,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),e=L(e)){case"year":o=Je(this,n)/12;break;case"month":o=Je(this,n);break;case"quarter":o=Je(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-r)/864e5;break;case"week":o=(this-n-r)/6048e5;break;default:o=this-n}return i?o:w(o)},di.endOf=function(t){return void 0===(t=L(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},di.format=function(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=Y(this,t);return this.localeData().postformat(e)},di.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||Ee(t).isValid())?Ve({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},di.fromNow=function(t){return this.from(Ee(),t)},di.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||Ee(t).isValid())?Ve({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},di.toNow=function(t){return this.to(Ee(),t)},di.get=function(t){return E(this[t=L(t)])?this[t]():this},di.invalidAt=function(){return f(this).overflow},di.isAfter=function(t,e){var i=x(t)?t:Ee(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=L(a(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},di.isBefore=function(t,e){var i=x(t)?t:Ee(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=L(a(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},di.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},di.isSame=function(t,e){var i,n=x(t)?t:Ee(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=L(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},di.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},di.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},di.isValid=function(){return m(this)},di.lang=ei,di.locale=ti,di.localeData=ii,di.max=Ie,di.min=Pe,di.parsingFlags=function(){return u({},f(this))},di.set=function(t,e){if("object"==typeof t)for(var i=function(t){var e=[];for(var i in t)e.push({unit:i,priority:F[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}(t=j(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(E(this[t=L(t)]))return this[t](e);return this},di.startOf=function(t){switch(t=L(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},di.subtract=Qe,di.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},di.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},di.toDate=function(){return new Date(this.valueOf())},di.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?Y(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",Y(i,"Z")):Y(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},di.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+r)},di.toJSON=function(){return this.isValid()?this.toISOString():null},di.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},di.unix=function(){return Math.floor(this.valueOf()/1e3)},di.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},di.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},di.year=Mt,di.isLeapYear=function(){return Tt(this.year())},di.weekYear=function(t){return ri.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},di.isoWeekYear=function(t){return ri.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},di.quarter=di.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},di.month=$t,di.daysInMonth=function(){return Ot(this.year(),this.month())},di.week=di.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},di.isoWeek=di.isoWeeks=function(t){var e=Yt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},di.weeksInYear=function(){var t=this.localeData()._week;return Vt(this.year(),t.dow,t.doy)},di.isoWeeksInYear=function(){return Vt(this.year(),1,4)},di.date=oi,di.day=di.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},di.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},di.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},di.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},di.hour=di.hours=re,di.minute=di.minutes=si,di.second=di.seconds=li,di.millisecond=di.milliseconds=hi,di.utcOffset=function(t,e,i){var n,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=He(at,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(n=Be(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),o!==t&&(!e||this._changeInProgress?Xe(this,Ve(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Be(this)},di.utc=function(t){return this.utcOffset(0,t)},di.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Be(this),"m")),this},di.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=He(st,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},di.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ee(t).utcOffset():0,(this.utcOffset()-t)%60==0)},di.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},di.isLocal=function(){return!!this.isValid()&&!this._isUTC},di.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},di.isUtc=Ue,di.isUTC=Ue,di.zoneAbbr=function(){return this._isUTC?"UTC":""},di.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},di.dates=D("dates accessor is deprecated. Use date instead.",oi),di.months=D("months accessor is deprecated. Use month instead",$t),di.years=D("years accessor is deprecated. Use year instead",Mt),di.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),di.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var t={};if(y(t,this),(t=Ae(t))._a){var e=t._isUTC?p(t._a):Ee(t._a);this._isDSTShifted=this.isValid()&&C(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var pi=I.prototype;function fi(t,e,i,n){var r=ue(),o=p().set(n,e);return r[i](o,t)}function mi(t,e,i){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return fi(t,e,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=fi(t,n,i,"month");return r}function gi(t,e,i,n){"boolean"==typeof t?(l(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,l(e)&&(i=e,e=void 0),e=e||"");var r,o=ue(),s=t?o._week.dow:0;if(null!=i)return fi(e,(i+s)%7,n,"day");var a=[];for(r=0;r<7;r++)a[r]=fi(e,(r+s)%7,n,"day");return a}pi.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return E(n)?n.call(e,i):n},pi.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},pi.invalidDate=function(){return this._invalidDate},pi.ordinal=function(t){return this._ordinal.replace("%d",t)},pi.preparse=ui,pi.postformat=ui,pi.relativeTime=function(t,e,i,n){var r=this._relativeTime[i];return E(r)?r(t,e,i,n):r.replace(/%d/i,t)},pi.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return E(i)?i(e):i.replace(/%s/i,e)},pi.set=function(t){var e,i;for(i in t)E(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},pi.months=function(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Nt).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone},pi.monthsShort=function(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Nt.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pi.monthsParse=function(t,e,i){var n,r,o;if(this._monthsParseExact)return function(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=At.call(this._shortMonthsParse,s))?r:null:-1!==(r=At.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=At.call(this._shortMonthsParse,s))?r:-1!==(r=At.call(this._longMonthsParse,s))?r:null:-1!==(r=At.call(this._longMonthsParse,s))?r:-1!==(r=At.call(this._shortMonthsParse,s))?r:null}.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(r=p([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},pi.monthsRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||zt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ht),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},pi.monthsShortRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||zt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Rt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},pi.week=function(t){return Yt(t,this._week.dow,this._week.doy).week},pi.firstDayOfYear=function(){return this._week.doy},pi.firstDayOfWeek=function(){return this._week.dow},pi.weekdays=function(t,e){return t?o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},pi.weekdaysMin=function(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin},pi.weekdaysShort=function(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort},pi.weekdaysParse=function(t,e,i){var n,r,o;if(this._weekdaysParseExact)return function(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=At.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=At.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=At.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=At.call(this._weekdaysParse,s))?r:-1!==(r=At.call(this._shortWeekdaysParse,s))?r:-1!==(r=At.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=At.call(this._shortWeekdaysParse,s))?r:-1!==(r=At.call(this._weekdaysParse,s))?r:-1!==(r=At.call(this._minWeekdaysParse,s))?r:null:-1!==(r=At.call(this._minWeekdaysParse,s))?r:-1!==(r=At.call(this._weekdaysParse,s))?r:-1!==(r=At.call(this._shortWeekdaysParse,s))?r:null}.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=p([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},pi.weekdaysRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Xt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},pi.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pi.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Jt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Qt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pi.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},pi.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},he("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=D("moment.lang is deprecated. Use moment.locale instead.",he),r.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ue);var vi=Math.abs;function yi(t,e,i,n){var r=Ve(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function bi(t){return t<0?Math.floor(t):Math.ceil(t)}function _i(t){return 4800*t/146097}function xi(t){return 146097*t/4800}function wi(t){return function(){return this.as(t)}}var ki=wi("ms"),Ci=wi("s"),Si=wi("m"),Di=wi("h"),Ti=wi("d"),Ai=wi("w"),Mi=wi("M"),Ei=wi("y");function Pi(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ii=Pi("milliseconds"),Oi=Pi("seconds"),Ni=Pi("minutes"),Li=Pi("hours"),ji=Pi("days"),Fi=Pi("months"),$i=Pi("years");var Ri=Math.round,Hi={ss:44,s:45,m:45,h:22,d:26,M:11};var zi=Math.abs;function Bi(t){return(t>0)-(t<0)||+t}function Ui(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i=zi(this._milliseconds)/1e3,n=zi(this._days),r=zi(this._months);e=w((t=w(i/60))/60),i%=60,t%=60;var o=w(r/12),s=r%=12,a=n,l=e,c=t,h=i?i.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var u=d<0?"-":"",p=Bi(this._months)!==Bi(d)?"-":"",f=Bi(this._days)!==Bi(d)?"-":"",m=Bi(this._milliseconds)!==Bi(d)?"-":"";return u+"P"+(o?p+o+"Y":"")+(s?p+s+"M":"")+(a?f+a+"D":"")+(l||c||h?"T":"")+(l?m+l+"H":"")+(c?m+c+"M":"")+(h?m+h+"S":"")}var Wi=Le.prototype;return Wi.isValid=function(){return this._isValid},Wi.abs=function(){var t=this._data;return this._milliseconds=vi(this._milliseconds),this._days=vi(this._days),this._months=vi(this._months),t.milliseconds=vi(t.milliseconds),t.seconds=vi(t.seconds),t.minutes=vi(t.minutes),t.hours=vi(t.hours),t.months=vi(t.months),t.years=vi(t.years),this},Wi.add=function(t,e){return yi(this,t,e,1)},Wi.subtract=function(t,e){return yi(this,t,e,-1)},Wi.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=L(t))||"year"===t)return e=this._days+n/864e5,i=this._months+_i(e),"month"===t?i:i/12;switch(e=this._days+Math.round(xi(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},Wi.asMilliseconds=ki,Wi.asSeconds=Ci,Wi.asMinutes=Si,Wi.asHours=Di,Wi.asDays=Ti,Wi.asWeeks=Ai,Wi.asMonths=Mi,Wi.asYears=Ei,Wi.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Wi._bubble=function(){var t,e,i,n,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*bi(xi(a)+s),s=0,a=0),l.milliseconds=o%1e3,t=w(o/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,i=w(e/60),l.hours=i%24,a+=r=w(_i(s+=w(i/24))),s-=bi(xi(r)),n=w(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},Wi.clone=function(){return Ve(this)},Wi.get=function(t){return t=L(t),this.isValid()?this[t+"s"]():NaN},Wi.milliseconds=Ii,Wi.seconds=Oi,Wi.minutes=Ni,Wi.hours=Li,Wi.days=ji,Wi.weeks=function(){return w(this.days()/7)},Wi.months=Fi,Wi.years=$i,Wi.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=function(t,e,i){var n=Ve(t).abs(),r=Ri(n.as("s")),o=Ri(n.as("m")),s=Ri(n.as("h")),a=Ri(n.as("d")),l=Ri(n.as("M")),c=Ri(n.as("y")),h=r<=Hi.ss&&["s",r]||r<Hi.s&&["ss",r]||o<=1&&["m"]||o<Hi.m&&["mm",o]||s<=1&&["h"]||s<Hi.h&&["hh",s]||a<=1&&["d"]||a<Hi.d&&["dd",a]||l<=1&&["M"]||l<Hi.M&&["MM",l]||c<=1&&["y"]||["yy",c];return h[2]=e,h[3]=+t>0,h[4]=i,function(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}.apply(null,h)}(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},Wi.toISOString=Ui,Wi.toString=Ui,Wi.toJSON=Ui,Wi.locale=ti,Wi.localeData=ii,Wi.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ui),Wi.lang=ei,W("X",0,0,"unix"),W("x",0,0,"valueOf"),ht("x",ot),ht("X",/[+-]?\d+(\.\d{1,3})?/),ft("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),ft("x",function(t,e,i){i._d=new Date(k(t))}),r.version="2.20.1",i=Ee,r.fn=di,r.min=function(){return Oe("isBefore",[].slice.call(arguments,0))},r.max=function(){return Oe("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=p,r.unix=function(t){return Ee(1e3*t)},r.months=function(t,e){return mi(t,e,"months")},r.isDate=c,r.locale=he,r.invalid=g,r.duration=Ve,r.isMoment=x,r.weekdays=function(t,e,i){return gi(t,e,i,"weekdays")},r.parseZone=function(){return Ee.apply(null,arguments).parseZone()},r.localeData=ue,r.isDuration=je,r.monthsShort=function(t,e){return mi(t,e,"monthsShort")},r.weekdaysMin=function(t,e,i){return gi(t,e,i,"weekdaysMin")},r.defineLocale=de,r.updateLocale=function(t,e){if(null!=e){var i,n,r=oe;null!=(n=ce(t))&&(r=n._config),(i=new I(e=P(r,e))).parentLocale=se[t],se[t]=i,he(t)}else null!=se[t]&&(null!=se[t].parentLocale?se[t]=se[t].parentLocale:null!=se[t]&&delete se[t]);return se[t]},r.locales=function(){return T(se)},r.weekdaysShort=function(t,e,i){return gi(t,e,i,"weekdaysShort")},r.normalizeUnits=L,r.relativeTimeRounding=function(t){return void 0===t?Ri:"function"==typeof t&&(Ri=t,!0)},r.relativeTimeThreshold=function(t,e){return void 0!==Hi[t]&&(void 0===e?Hi[t]:(Hi[t]=e,"s"===t&&(Hi.ss=e-1),!0))},r.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},r.prototype=di,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},r},"object"==typeof i&&void 0!==e?e.exports=r():n.moment=r()},{}],7:[function(t,e,i){var n=t(29)();n.helpers=t(45),t(27)(n),n.defaults=t(25),n.Element=t(26),n.elements=t(40),n.Interaction=t(28),n.layouts=t(30),n.platform=t(48),n.plugins=t(31),n.Ticks=t(34),t(22)(n),t(23)(n),t(24)(n),t(33)(n),t(32)(n),t(35)(n),t(55)(n),t(53)(n),t(54)(n),t(56)(n),t(57)(n),t(58)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var r=t(49);for(var o in r)r.hasOwnProperty(o)&&n.plugins.register(r[o]);n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=r.legend._element,n.Title=r.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";var n=t(25),r=t(40),o=t(45);n._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),n._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return t.length>0&&(t[0].yLabel?i=t[0].yLabel:e.labels.length>0&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(t){t.controllers.bar=t.DatasetController.extend({dataElementType:r.Rectangle,initialize:function(){var e;t.DatasetController.prototype.initialize.apply(this,arguments),(e=this.getMeta()).stack=this.getDataset().stack,e.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this,r=n.chart,s=n.getMeta(),a=n.getDataset(),l=t.custom||{},c=r.options.elements.rectangle;t._xScale=n.getScaleForId(s.xAxisID),t._yScale=n.getScaleForId(s.yAxisID),t._datasetIndex=n.index,t._index=e,t._model={datasetLabel:a.label,label:r.data.labels[e],borderSkipped:l.borderSkipped?l.borderSkipped:c.borderSkipped,backgroundColor:l.backgroundColor?l.backgroundColor:o.valueAtIndexOrDefault(a.backgroundColor,e,c.backgroundColor),borderColor:l.borderColor?l.borderColor:o.valueAtIndexOrDefault(a.borderColor,e,c.borderColor),borderWidth:l.borderWidth?l.borderWidth:o.valueAtIndexOrDefault(a.borderWidth,e,c.borderWidth)},n.updateElementGeometry(t,e,i),t.pivot()},updateElementGeometry:function(t,e,i){var n=this,r=t._model,o=n.getValueScale(),s=o.getBasePixel(),a=o.isHorizontal(),l=n._ruler||n.getRuler(),c=n.calculateBarValuePixels(n.index,e),h=n.calculateBarIndexPixels(n.index,e,l);r.horizontal=a,r.base=i?s:c.base,r.x=a?i?s:c.head:h.center,r.y=a?h.center:i?s:c.head,r.height=a?h.size:void 0,r.width=a?void 0:h.size},getValueScaleId:function(){return this.getMeta().yAxisID},getIndexScaleId:function(){return this.getMeta().xAxisID},getValueScale:function(){return this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return this.getScaleForId(this.getIndexScaleId())},_getStacks:function(t){var e,i,n=this.chart,r=this.getIndexScale().options.stacked,o=void 0===t?n.data.datasets.length:t+1,s=[];for(e=0;e<o;++e)(i=n.getDatasetMeta(e)).bar&&n.isDatasetVisible(e)&&(!1===r||!0===r&&-1===s.indexOf(i.stack)||void 0===r&&(void 0===i.stack||-1===s.indexOf(i.stack)))&&s.push(i.stack);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},getRuler:function(){var t,e,i=this.getIndexScale(),n=this.getStackCount(),r=this.index,s=i.isHorizontal(),a=s?i.left:i.top,l=a+(s?i.width:i.height),c=[];for(t=0,e=this.getMeta().data.length;t<e;++t)c.push(i.getPixelForValue(null,t,r));return{min:o.isNullOrUndef(i.options.barThickness)?function(t,e){var i,n,r,o,s=t.isHorizontal()?t.width:t.height,a=t.getTicks();for(r=1,o=e.length;r<o;++r)s=Math.min(s,e[r]-e[r-1]);for(r=0,o=a.length;r<o;++r)n=t.getPixelForTick(r),s=r>0?Math.min(s,n-i):s,i=n;return s}(i,c):-1,pixels:c,start:a,end:l,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,r,o,s,a,l=this.chart,c=this.getMeta(),h=this.getValueScale(),d=l.data.datasets,u=h.getRightValue(d[t].data[e]),p=h.options.stacked,f=c.stack,m=0;if(p||void 0===p&&void 0!==f)for(i=0;i<t;++i)(n=l.getDatasetMeta(i)).bar&&n.stack===f&&n.controller.getValueScaleId()===h.id&&l.isDatasetVisible(i)&&(r=h.getRightValue(d[i].data[e]),(u<0&&r<0||u>=0&&r>0)&&(m+=r));return o=h.getPixelForValue(m),{size:a=((s=h.getPixelForValue(m+u))-o)/2,base:o,head:s,center:s+a/2}},calculateBarIndexPixels:function(t,e,i){var n=i.scale.options,r="flex"===n.barThickness?function(t,e,i){var n,r=e.pixels,o=r[t],s=t>0?r[t-1]:null,a=t<r.length-1?r[t+1]:null,l=i.categoryPercentage;return null===s&&(s=o-(null===a?e.end-o:a-o)),null===a&&(a=o+o-s),n=o-(o-s)/2*l,{chunk:(a-s)/2*l/e.stackCount,ratio:i.barPercentage,start:n}}(e,i,n):function(t,e,i){var n,r,s=i.barThickness,a=e.stackCount,l=e.pixels[t];return o.isNullOrUndef(s)?(n=e.min*i.categoryPercentage,r=i.barPercentage):(n=s*a,r=1),{chunk:n/a,ratio:r,start:l-n/2}}(e,i,n),s=this.getStackIndex(t,this.getMeta().stack),a=r.start+r.chunk*s+r.chunk/2,l=Math.min(o.valueOrDefault(n.maxBarThickness,1/0),r.chunk*r.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}},draw:function(){var t=this.chart,e=this.getValueScale(),i=this.getMeta().data,n=this.getDataset(),r=i.length,s=0;for(o.canvas.clipArea(t.ctx,t.chartArea);s<r;++s)isNaN(e.getRightValue(n.data[s]))||i[s].draw();o.canvas.unclipArea(t.ctx)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},r=t._model;r.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(e.hoverBackgroundColor,i,o.getHoverColor(r.backgroundColor)),r.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(e.hoverBorderColor,i,o.getHoverColor(r.borderColor)),r.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(e.hoverBorderWidth,i,r.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},r=t._model,s=this.chart.options.elements.rectangle;r.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(e.backgroundColor,i,s.backgroundColor),r.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(e.borderColor,i,s.borderColor),r.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(e.borderWidth,i,s.borderWidth)}}),t.controllers.horizontalBar=t.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,i){"use strict";var n=t(25),r=t(40),o=t(45);n._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:r.Point,update:function(t){var e=this,i=e.getMeta().data;o.each(i,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,r=n.getMeta(),o=t.custom||{},s=n.getScaleForId(r.xAxisID),a=n.getScaleForId(r.yAxisID),l=n._resolveElementOptions(t,e),c=n.getDataset().data[e],h=n.index,d=i?s.getPixelForDecimal(.5):s.getPixelForValue("object"==typeof c?c:NaN,e,h),u=i?a.getBasePixel():a.getPixelForValue(c,e,h);t._xScale=s,t._yScale=a,t._options=l,t._datasetIndex=h,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,radius:i?0:l.radius,skip:o.skip||isNaN(d)||isNaN(u),x:d,y:u},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=o.valueOrDefault(i.hoverBackgroundColor,o.getHoverColor(i.backgroundColor)),e.borderColor=o.valueOrDefault(i.hoverBorderColor,o.getHoverColor(i.borderColor)),e.borderWidth=o.valueOrDefault(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},removeHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=i.backgroundColor,e.borderColor=i.borderColor,e.borderWidth=i.borderWidth,e.radius=i.radius},_resolveElementOptions:function(t,e){var i,n,r,s=this.chart,a=s.data.datasets[this.index],l=t.custom||{},c=s.options.elements.point,h=o.options.resolve,d=a.data[e],u={},p={chart:s,dataIndex:e,dataset:a,datasetIndex:this.index},f=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(i=0,n=f.length;i<n;++i)u[r=f[i]]=h([l[r],a[r],c[r]],p,e);return u.radius=h([l.radius,d?d.r:void 0,a.radius,c.radius],p,e),u}})}},{25:25,40:40,45:45}],17:[function(t,e,i){"use strict";var n=t(25),r=t(40),o=t(45);n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,r=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),r[o]&&e.push(r[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var r=t.getDatasetMeta(0),s=e.datasets[0],a=r.data[n],l=a&&a.custom||{},c=o.valueAtIndexOrDefault,h=t.options.elements.arc;return{text:i,fillStyle:l.backgroundColor?l.backgroundColor:c(s.backgroundColor,n,h.backgroundColor),strokeStyle:l.borderColor?l.borderColor:c(s.borderColor,n,h.borderColor),lineWidth:l.borderWidth?l.borderWidth:c(s.borderWidth,n,h.borderWidth),hidden:isNaN(s.data[n])||r.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,r,o=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)(r=s.getDatasetMeta(i)).data[o]&&(r.data[o].hidden=!r.data[o].hidden);s.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return o.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}}),n._set("pie",o.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),e.exports=function(t){t.controllers.doughnut=t.controllers.pie=t.DatasetController.extend({dataElementType:r.Arc,linkScales:o.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(t){var e=this,i=e.chart,n=i.chartArea,r=i.options,s=r.elements.arc,a=n.right-n.left-s.borderWidth,l=n.bottom-n.top-s.borderWidth,c=Math.min(a,l),h={x:0,y:0},d=e.getMeta(),u=r.cutoutPercentage,p=r.circumference;if(p<2*Math.PI){var f=r.rotation%(2*Math.PI),m=(f+=2*Math.PI*(f>=Math.PI?-1:f<-Math.PI?1:0))+p,g={x:Math.cos(f),y:Math.sin(f)},v={x:Math.cos(m),y:Math.sin(m)},y=f<=0&&m>=0||f<=2*Math.PI&&2*Math.PI<=m,b=f<=.5*Math.PI&&.5*Math.PI<=m||f<=2.5*Math.PI&&2.5*Math.PI<=m,_=f<=-Math.PI&&-Math.PI<=m||f<=Math.PI&&Math.PI<=m,x=f<=.5*-Math.PI&&.5*-Math.PI<=m||f<=1.5*Math.PI&&1.5*Math.PI<=m,w=u/100,k={x:_?-1:Math.min(g.x*(g.x<0?1:w),v.x*(v.x<0?1:w)),y:x?-1:Math.min(g.y*(g.y<0?1:w),v.y*(v.y<0?1:w))},C={x:y?1:Math.max(g.x*(g.x>0?1:w),v.x*(v.x>0?1:w)),y:b?1:Math.max(g.y*(g.y>0?1:w),v.y*(v.y>0?1:w))},S={width:.5*(C.x-k.x),height:.5*(C.y-k.y)};c=Math.min(a/S.width,l/S.height),h={x:-.5*(C.x+k.x),y:-.5*(C.y+k.y)}}i.borderWidth=e.getMaxBorderWidth(d.data),i.outerRadius=Math.max((c-i.borderWidth)/2,0),i.innerRadius=Math.max(u?i.outerRadius/100*u:0,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),i.offsetX=h.x*i.outerRadius,i.offsetY=h.y*i.outerRadius,d.total=e.calculateTotal(),e.outerRadius=i.outerRadius-i.radiusLength*e.getRingIndex(e.index),e.innerRadius=Math.max(e.outerRadius-i.radiusLength,0),o.each(d.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){var n=this,r=n.chart,s=r.chartArea,a=r.options,l=a.animation,c=(s.left+s.right)/2,h=(s.top+s.bottom)/2,d=a.rotation,u=a.rotation,p=n.getDataset(),f=i&&l.animateRotate?0:t.hidden?0:n.calculateCircumference(p.data[e])*(a.circumference/(2*Math.PI)),m=i&&l.animateScale?0:n.innerRadius,g=i&&l.animateScale?0:n.outerRadius,v=o.valueAtIndexOrDefault;o.extend(t,{_datasetIndex:n.index,_index:e,_model:{x:c+r.offsetX,y:h+r.offsetY,startAngle:d,endAngle:u,circumference:f,outerRadius:g,innerRadius:m,label:v(p.label,e,r.data.labels[e])}});var y=t._model;this.removeHoverStyle(t),i&&l.animateRotate||(y.startAngle=0===e?a.rotation:n.getMeta().data[e-1]._model.endAngle,y.endAngle=y.startAngle+y.circumference),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return o.each(i.data,function(i,r){t=e.data[r],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,r=this.index,o=t.length,s=0;s<o;s++)e=t[s]._model?t[s]._model.borderWidth:0,n=(i=t[s]._chart?t[s]._chart.config.data.datasets[r].hoverBorderWidth:0)>(n=e>n?e:n)?i:n;return n}})}},{25:25,40:40,45:45}],18:[function(t,e,i){"use strict";var n=t(25),r=t(40),o=t(45);n._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function e(t,e){return o.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:r.Line,dataElementType:r.Point,update:function(t){var i,n,r,s=this,a=s.getMeta(),l=a.dataset,c=a.data||[],h=s.chart.options,d=h.elements.line,u=s.getScaleForId(a.yAxisID),p=s.getDataset(),f=e(p,h);for(f&&(r=l.custom||{},void 0!==p.tension&&void 0===p.lineTension&&(p.lineTension=p.tension),l._scale=u,l._datasetIndex=s.index,l._children=c,l._model={spanGaps:p.spanGaps?p.spanGaps:h.spanGaps,tension:r.tension?r.tension:o.valueOrDefault(p.lineTension,d.tension),backgroundColor:r.backgroundColor?r.backgroundColor:p.backgroundColor||d.backgroundColor,borderWidth:r.borderWidth?r.borderWidth:p.borderWidth||d.borderWidth,borderColor:r.borderColor?r.borderColor:p.borderColor||d.borderColor,borderCapStyle:r.borderCapStyle?r.borderCapStyle:p.borderCapStyle||d.borderCapStyle,borderDash:r.borderDash?r.borderDash:p.borderDash||d.borderDash,borderDashOffset:r.borderDashOffset?r.borderDashOffset:p.borderDashOffset||d.borderDashOffset,borderJoinStyle:r.borderJoinStyle?r.borderJoinStyle:p.borderJoinStyle||d.borderJoinStyle,fill:r.fill?r.fill:void 0!==p.fill?p.fill:d.fill,steppedLine:r.steppedLine?r.steppedLine:o.valueOrDefault(p.steppedLine,d.stepped),cubicInterpolationMode:r.cubicInterpolationMode?r.cubicInterpolationMode:o.valueOrDefault(p.cubicInterpolationMode,d.cubicInterpolationMode)},l.pivot()),i=0,n=c.length;i<n;++i)s.updateElement(c[i],i,t);for(f&&0!==l._model.tension&&s.updateBezierControlPoints(),i=0,n=c.length;i<n;++i)c[i].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),r=t.custom||{};return r.backgroundColor?i=r.backgroundColor:n.pointBackgroundColor?i=o.valueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),r=t.custom||{};return r.borderColor?i=r.borderColor:n.pointBorderColor?i=o.valueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),r=t.custom||{};return isNaN(r.borderWidth)?!isNaN(n.pointBorderWidth)||o.isArray(n.pointBorderWidth)?i=o.valueAtIndexOrDefault(n.pointBorderWidth,e,i):isNaN(n.borderWidth)||(i=n.borderWidth):i=r.borderWidth,i},updateElement:function(t,e,i){var n,r,s=this,a=s.getMeta(),l=t.custom||{},c=s.getDataset(),h=s.index,d=c.data[e],u=s.getScaleForId(a.yAxisID),p=s.getScaleForId(a.xAxisID),f=s.chart.options.elements.point;void 0!==c.radius&&void 0===c.pointRadius&&(c.pointRadius=c.radius),void 0!==c.hitRadius&&void 0===c.pointHitRadius&&(c.pointHitRadius=c.hitRadius),n=p.getPixelForValue("object"==typeof d?d:NaN,e,h),r=i?u.getBasePixel():s.calculatePointY(d,e,h),t._xScale=p,t._yScale=u,t._datasetIndex=h,t._index=e,t._model={x:n,y:r,skip:l.skip||isNaN(n)||isNaN(r),radius:l.radius||o.valueAtIndexOrDefault(c.pointRadius,e,f.radius),pointStyle:l.pointStyle||o.valueAtIndexOrDefault(c.pointStyle,e,f.pointStyle),backgroundColor:s.getPointBackgroundColor(t,e),borderColor:s.getPointBorderColor(t,e),borderWidth:s.getPointBorderWidth(t,e),tension:a.dataset._model?a.dataset._model.tension:0,steppedLine:!!a.dataset._model&&a.dataset._model.steppedLine,hitRadius:l.hitRadius||o.valueAtIndexOrDefault(c.pointHitRadius,e,f.hitRadius)}},calculatePointY:function(t,e,i){var n,r,o,s=this.chart,a=this.getMeta(),l=this.getScaleForId(a.yAxisID),c=0,h=0;if(l.options.stacked){for(n=0;n<i;n++)if(r=s.data.datasets[n],"line"===(o=s.getDatasetMeta(n)).type&&o.yAxisID===l.id&&s.isDatasetVisible(n)){var d=Number(l.getRightValue(r.data[e]));d<0?h+=d||0:c+=d||0}var u=Number(l.getRightValue(t));return u<0?l.getPixelForValue(h+u):l.getPixelForValue(c+u)}return l.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,r=this.getMeta(),s=this.chart.chartArea,a=r.data||[];function l(t,e,i){return Math.max(Math.min(t,i),e)}if(r.dataset._model.spanGaps&&(a=a.filter(function(t){return!t._model.skip})),"monotone"===r.dataset._model.cubicInterpolationMode)o.splineCurveMonotone(a);else for(t=0,e=a.length;t<e;++t)i=a[t]._model,n=o.splineCurve(o.previousItem(a,t)._model,i,o.nextItem(a,t)._model,r.dataset._model.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(this.chart.options.elements.line.capBezierPoints)for(t=0,e=a.length;t<e;++t)(i=a[t]._model).controlPointPreviousX=l(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=l(i.controlPointPreviousY,s.top,s.bottom),i.controlPointNextX=l(i.controlPointNextX,s.left,s.right),i.controlPointNextY=l(i.controlPointNextY,s.top,s.bottom)},draw:function(){var t=this.chart,i=this.getMeta(),n=i.data||[],r=t.chartArea,s=n.length,a=0;for(o.canvas.clipArea(t.ctx,r),e(this.getDataset(),t.options)&&i.dataset.draw(),o.canvas.unclipArea(t.ctx);a<s;++a)n[a].draw(r)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},r=t._model;r.radius=n.hoverRadius||o.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),r.backgroundColor=n.hoverBackgroundColor||o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,o.getHoverColor(r.backgroundColor)),r.borderColor=n.hoverBorderColor||o.valueAtIndexOrDefault(e.pointHoverBorderColor,i,o.getHoverColor(r.borderColor)),r.borderWidth=n.hoverBorderWidth||o.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,r.borderWidth)},removeHoverStyle:function(t){var e=this,i=e.chart.data.datasets[t._datasetIndex],n=t._index,r=t.custom||{},s=t._model;void 0!==i.radius&&void 0===i.pointRadius&&(i.pointRadius=i.radius),s.radius=r.radius||o.valueAtIndexOrDefault(i.pointRadius,n,e.chart.options.elements.point.radius),s.backgroundColor=e.getPointBackgroundColor(t,n),s.borderColor=e.getPointBorderColor(t,n),s.borderWidth=e.getPointBorderWidth(t,n)}})}},{25:25,40:40,45:45}],19:[function(t,e,i){"use strict";var n=t(25),r=t(40),o=t(45);n._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,r=i.labels;if(n.length)for(var o=0;o<n[0].data.length;++o)e.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),r[o]&&e.push(r[o]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(i,n){var r=t.getDatasetMeta(0),s=e.datasets[0],a=r.data[n].custom||{},l=o.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:i,fillStyle:a.backgroundColor?a.backgroundColor:l(s.backgroundColor,n,c.backgroundColor),strokeStyle:a.borderColor?a.borderColor:l(s.borderColor,n,c.borderColor),lineWidth:a.borderWidth?a.borderWidth:l(s.borderWidth,n,c.borderWidth),hidden:isNaN(s.data[n])||r.data[n].hidden,index:n}}):[]}},onClick:function(t,e){var i,n,r,o=e.index,s=this.chart;for(i=0,n=(s.data.datasets||[]).length;i<n;++i)(r=s.getDatasetMeta(i)).data[o].hidden=!r.data[o].hidden;s.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),e.exports=function(t){t.controllers.polarArea=t.DatasetController.extend({dataElementType:r.Arc,linkScales:o.noop,update:function(t){var e=this,i=e.chart,n=i.chartArea,r=e.getMeta(),s=i.options,a=s.elements.arc,l=Math.min(n.right-n.left,n.bottom-n.top);i.outerRadius=Math.max((l-a.borderWidth/2)/2,0),i.innerRadius=Math.max(s.cutoutPercentage?i.outerRadius/100*s.cutoutPercentage:1,0),i.radiusLength=(i.outerRadius-i.innerRadius)/i.getVisibleDatasetCount(),e.outerRadius=i.outerRadius-i.radiusLength*e.index,e.innerRadius=e.outerRadius-i.radiusLength,r.count=e.countVisibleElements(),o.each(r.data,function(i,n){e.updateElement(i,n,t)})},updateElement:function(t,e,i){for(var n=this,r=n.chart,s=n.getDataset(),a=r.options,l=a.animation,c=r.scale,h=r.data.labels,d=n.calculateCircumference(s.data[e]),u=c.xCenter,p=c.yCenter,f=0,m=n.getMeta(),g=0;g<e;++g)isNaN(s.data[g])||m.data[g].hidden||++f;var v=a.startAngle,y=t.hidden?0:c.getDistanceFromCenterForValue(s.data[e]),b=v+d*f,_=b+(t.hidden?0:d),x=l.animateScale?0:c.getDistanceFromCenterForValue(s.data[e]);o.extend(t,{_datasetIndex:n.index,_index:e,_scale:c,_model:{x:u,y:p,innerRadius:0,outerRadius:i?x:y,startAngle:i&&l.animateRotate?v:b,endAngle:i&&l.animateRotate?v:_,label:o.valueAtIndexOrDefault(h,e,h[e])}}),n.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(e){t.DatasetController.prototype.removeHoverStyle.call(this,e,this.chart.options.elements.arc)},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),i=0;return o.each(e.data,function(e,n){isNaN(t.data[n])||e.hidden||i++}),i},calculateCircumference:function(t){var e=this.getMeta().count;return e>0&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),r=t(40),o=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:r.Line,dataElementType:r.Point,linkScales:o.noop,update:function(t){var e=this,i=e.getMeta(),n=i.dataset,r=i.data,s=n.custom||{},a=e.getDataset(),l=e.chart.options.elements.line,c=e.chart.scale;void 0!==a.tension&&void 0===a.lineTension&&(a.lineTension=a.tension),o.extend(i.dataset,{_datasetIndex:e.index,_scale:c,_children:r,_loop:!0,_model:{tension:s.tension?s.tension:o.valueOrDefault(a.lineTension,l.tension),backgroundColor:s.backgroundColor?s.backgroundColor:a.backgroundColor||l.backgroundColor,borderWidth:s.borderWidth?s.borderWidth:a.borderWidth||l.borderWidth,borderColor:s.borderColor?s.borderColor:a.borderColor||l.borderColor,fill:s.fill?s.fill:void 0!==a.fill?a.fill:l.fill,borderCapStyle:s.borderCapStyle?s.borderCapStyle:a.borderCapStyle||l.borderCapStyle,borderDash:s.borderDash?s.borderDash:a.borderDash||l.borderDash,borderDashOffset:s.borderDashOffset?s.borderDashOffset:a.borderDashOffset||l.borderDashOffset,borderJoinStyle:s.borderJoinStyle?s.borderJoinStyle:a.borderJoinStyle||l.borderJoinStyle}}),i.dataset.pivot(),o.each(r,function(i,n){e.updateElement(i,n,t)},e),e.updateBezierControlPoints()},updateElement:function(t,e,i){var n=this,r=t.custom||{},s=n.getDataset(),a=n.chart.scale,l=n.chart.options.elements.point,c=a.getPointPositionForValue(e,s.data[e]);void 0!==s.radius&&void 0===s.pointRadius&&(s.pointRadius=s.radius),void 0!==s.hitRadius&&void 0===s.pointHitRadius&&(s.pointHitRadius=s.hitRadius),o.extend(t,{_datasetIndex:n.index,_index:e,_scale:a,_model:{x:i?a.xCenter:c.x,y:i?a.yCenter:c.y,tension:r.tension?r.tension:o.valueOrDefault(s.lineTension,n.chart.options.elements.line.tension),radius:r.radius?r.radius:o.valueAtIndexOrDefault(s.pointRadius,e,l.radius),backgroundColor:r.backgroundColor?r.backgroundColor:o.valueAtIndexOrDefault(s.pointBackgroundColor,e,l.backgroundColor),borderColor:r.borderColor?r.borderColor:o.valueAtIndexOrDefault(s.pointBorderColor,e,l.borderColor),borderWidth:r.borderWidth?r.borderWidth:o.valueAtIndexOrDefault(s.pointBorderWidth,e,l.borderWidth),pointStyle:r.pointStyle?r.pointStyle:o.valueAtIndexOrDefault(s.pointStyle,e,l.pointStyle),hitRadius:r.hitRadius?r.hitRadius:o.valueAtIndexOrDefault(s.pointHitRadius,e,l.hitRadius)}}),t._model.skip=r.skip?r.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,e=this.getMeta();o.each(e.data,function(i,n){var r=i._model,s=o.splineCurve(o.previousItem(e.data,n,!0)._model,r,o.nextItem(e.data,n,!0)._model,r.tension);r.controlPointPreviousX=Math.max(Math.min(s.previous.x,t.right),t.left),r.controlPointPreviousY=Math.max(Math.min(s.previous.y,t.bottom),t.top),r.controlPointNextX=Math.max(Math.min(s.next.x,t.right),t.left),r.controlPointNextY=Math.max(Math.min(s.next.y,t.bottom),t.top),i.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,r=t._model;r.radius=i.hoverRadius?i.hoverRadius:o.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),r.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:o.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,o.getHoverColor(r.backgroundColor)),r.borderColor=i.hoverBorderColor?i.hoverBorderColor:o.valueAtIndexOrDefault(e.pointHoverBorderColor,n,o.getHoverColor(r.borderColor)),r.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:o.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,r.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,r=t._model,s=this.chart.options.elements.point;r.radius=i.radius?i.radius:o.valueAtIndexOrDefault(e.pointRadius,n,s.radius),r.backgroundColor=i.backgroundColor?i.backgroundColor:o.valueAtIndexOrDefault(e.pointBackgroundColor,n,s.backgroundColor),r.borderColor=i.borderColor?i.borderColor:o.valueAtIndexOrDefault(e.pointBorderColor,n,s.borderColor),r.borderWidth=i.borderWidth?i.borderWidth:o.valueAtIndexOrDefault(e.pointBorderWidth,n,s.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,i){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),e.exports=function(t){t.Animation=r.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var r,o,s=this.animations;for(e.chart=t,n||(t.animating=!0),r=0,o=s.length;r<o;++r)if(s[r].chart===t)return void(s[r]=e);s.push(e),1===s.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=o.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=o.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=this,e=Date.now(),i=0;t.dropFrames>1&&(i=Math.floor(t.dropFrames),t.dropFrames=t.dropFrames%1),t.advance(1+i);var n=Date.now();t.dropFrames+=(n-e)/t.frameDuration,t.animations.length>0&&t.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,r=0;r<n.length;)i=(e=n[r]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),o.callback(e.render,[i,e],i),o.callback(e.onAnimationProgress,[e],i),e.currentStep>=e.numSteps?(o.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(r,1)):++r}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var n=t(25),r=t(45),o=t(28),s=t(30),a=t(48),l=t(31);e.exports=function(t){function e(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},r.extend(t.prototype,{construct:function(e,i){var o=this;i=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=r.configMerge(n.global,n[t.type],t.options||{}),t}(i);var s=a.acquireContext(e,i),l=s&&s.canvas,c=l&&l.height,h=l&&l.width;o.id=r.uid(),o.ctx=s,o.canvas=l,o.config=i,o.width=h,o.height=c,o.aspectRatio=c?h/c:null,o.options=i.options,o._bufferedRender=!1,o.chart=o,o.controller=o,t.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(t){o.config.data=t}}),s&&l?(o.initialize(),o.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),r.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return r.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,o=i.maintainAspectRatio&&e.aspectRatio||null,s=Math.max(0,Math.floor(r.getMaximumWidth(n))),a=Math.max(0,Math.floor(o?s/o:r.getMaximumHeight(n)));if((e.width!==s||e.height!==a)&&(n.width=e.width=s,n.height=e.height=a,n.style.width=s+"px",n.style.height=a+"px",r.retinaScale(e,i.devicePixelRatio),!t)){var c={width:s,height:a};l.notify(e,"resize",[c]),e.options.onResize&&e.options.onResize(e,c),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;r.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),r.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var i=this,n=i.options,o=i.scales||{},s=[],a=Object.keys(o).reduce(function(t,e){return t[e]=!1,t},{});n.scales&&(s=s.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&s.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),r.each(s,function(n){var s=n.options,l=s.id,c=r.valueOrDefault(s.type,n.dtype);e(s.position)!==e(n.dposition)&&(s.position=n.dposition),a[l]=!0;var h=null;if(l in o&&o[l].type===c)(h=o[l]).options=s,h.ctx=i.ctx,h.chart=i;else{var d=t.scaleService.getScaleConstructor(c);if(!d)return;h=new d({id:l,type:c,options:s,ctx:i.ctx,chart:i}),o[h.id]=h}h.mergeTicksOptions(),n.isDefault&&(i.scale=h)}),r.each(a,function(t,e){t||delete o[e]}),i.scales=o,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return r.each(e.data.datasets,function(r,o){var s=e.getDatasetMeta(o),a=r.type||e.config.type;if(s.type&&s.type!==a&&(e.destroyDatasetMeta(o),s=e.getDatasetMeta(o)),s.type=a,i.push(s.type),s.controller)s.controller.updateIndex(o),s.controller.linkScales();else{var l=t.controllers[s.type];if(void 0===l)throw new Error('"'+s.type+'" is not a chart type.');s.controller=new l(e,o),n.push(s.controller)}},e),n},resetElements:function(){var t=this;r.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var i,n,o=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),n=(i=o).options,r.each(i.scales,function(t){s.removeBox(i,t)}),n=r.configMerge(t.defaults.global,t.defaults[i.config.type],n),i.options=i.config.options=n,i.ensureScalesHaveIDs(),i.buildOrUpdateScales(),i.tooltip._options=n.tooltips,i.tooltip.initialize(),l._invalidate(o),!1!==l.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var a=o.buildOrUpdateControllers();r.each(o.data.datasets,function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()},o),o.updateLayout(),o.options.animation&&o.options.animation.duration&&r.each(a,function(t){t.reset()}),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],l.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:o.render(e)}},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(s.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);l.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==l.notify(this,"beforeDatasetUpdate",[i])&&(e.controller.update(),l.notify(this,"afterDatasetUpdate",[i]))},render:function(e){var i=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=e.duration,o=e.lazy;if(!1!==l.notify(i,"beforeRender")){var s=i.options.animation,a=function(t){l.notify(i,"afterRender"),r.callback(s&&s.onComplete,[t],i)};if(s&&(void 0!==n&&0!==n||void 0===n&&0!==s.duration)){var c=new t.Animation({numSteps:(n||s.duration)/16.66,easing:e.easing||s.easing,render:function(t,e){var i=r.easing.effects[e.easing],n=e.currentStep,o=n/e.numSteps;t.draw(i(o),o,n)},onAnimationProgress:s.onProgress,onAnimationComplete:a});t.animationService.addAnimation(i,c,n,o)}else i.draw(),a(new t.Animation({numSteps:0,chart:i}));return i}},draw:function(t){var e=this;e.clear(),r.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==l.notify(e,"beforeDraw",[t])&&(r.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),l.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==l.notify(e,"beforeDatasetsDraw",[t])){for(var i=(e.data.datasets||[]).length-1;i>=0;--i)e.isDatasetVisible(i)&&e.drawDataset(i,t);l.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==l.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),l.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==l.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),l.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return o.modes.single(this,t)},getElementsAtEvent:function(t){return o.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return o.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=o.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return o.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var e,i,n=this,o=n.canvas;for(n.stop(),e=0,i=n.data.datasets.length;e<i;++e)n.destroyDatasetMeta(e);o&&(n.unbindEvents(),r.canvas.clear(n),a.releaseContext(n.ctx),n.canvas=null,n.ctx=null),l.notify(n,"destroy"),delete t.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new t.Tooltip({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var t=this,e=t._listeners={},i=function(){t.eventHandler.apply(t,arguments)};r.each(t.options.events,function(n){a.addEventListener(t,n,i),e[n]=i}),t.options.responsive&&(i=function(){t.resize()},a.addEventListener(t,"resize",i),e.resize=i)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,r.each(e,function(e,i){a.removeEventListener(t,i,e)}))},updateHoverStyle:function(t,e,i){var n,r,o,s=i?"setHoverStyle":"removeHoverStyle";for(r=0,o=t.length;r<o;++r)(n=t[r])&&this.getDatasetMeta(n._datasetIndex).controller[s](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==l.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);i&&(n=i._start?i.handleEvent(t):n|i.handleEvent(t)),l.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},o=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,o.mode,o),r.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,o.mode,!1),i.active.length&&o.mode&&i.updateHoverStyle(i.active,o.mode,!0),e=!r.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),t.Controller=t}},{25:25,28:28,30:30,31:31,45:45,48:48}],24:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){var e=["push","pop","shift","splice","unshift"];function i(t,i){var n=t._chartjs;if(n){var r=n.listeners,o=r.indexOf(i);-1!==o&&r.splice(o,1),r.length>0||(e.forEach(function(e){delete t[e]}),delete t._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},n.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),i=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=i.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=i.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&i(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],r=i.data;for(t=0,e=n.length;t<e;++t)r[t]=r[t]||this.createMetaData(t);i.dataset=i.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,r,o=this,s=o.getDataset(),a=s.data||(s.data=[]);o._data!==a&&(o._data&&i(o._data,o),r=o,(t=a)._chartjs?t._chartjs.listeners.push(r):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}}),e.forEach(function(e){var i="onData"+e.charAt(0).toUpperCase()+e.slice(1),r=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),o=r.apply(this,e);return n.each(t._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),o}})})),o._data=a),o.resyncElements()},update:n.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,r=0;r<n;++r)i[r].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],r=t._index,o=t.custom||{},s=n.valueAtIndexOrDefault,a=t._model;a.backgroundColor=o.backgroundColor?o.backgroundColor:s(i.backgroundColor,r,e.backgroundColor),a.borderColor=o.borderColor?o.borderColor:s(i.borderColor,r,e.borderColor),a.borderWidth=o.borderWidth?o.borderWidth:s(i.borderWidth,r,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,r=t.custom||{},o=n.valueAtIndexOrDefault,s=n.getHoverColor,a=t._model;a.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:o(e.hoverBackgroundColor,i,s(a.backgroundColor)),a.borderColor=r.hoverBorderColor?r.hoverBorderColor:o(e.hoverBorderColor,i,s(a.borderColor)),a.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:o(e.hoverBorderWidth,i,a.borderWidth)},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):n>i&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=n.inherits}},{45:45}],25:[function(t,e,i){"use strict";var n=t(45);e.exports={_set:function(t,e){return n.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,i){"use strict";var n=t(2),r=t(45);var o=function(t){r.extend(this,t),this.initialize.apply(this,arguments)};r.extend(o.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=r.clone(t._model)),t._start={},t},transition:function(t){var e=this,i=e._model,r=e._start,o=e._view;return i&&1!==t?(o||(o=e._view={}),r||(r=e._start={}),function(t,e,i,r){var o,s,a,l,c,h,d,u,p,f=Object.keys(i);for(o=0,s=f.length;o<s;++o)if(h=i[a=f[o]],e.hasOwnProperty(a)||(e[a]=h),(l=e[a])!==h&&"_"!==a[0]){if(t.hasOwnProperty(a)||(t[a]=l),(d=typeof h)==typeof(c=t[a]))if("string"===d){if((u=n(c)).valid&&(p=n(h)).valid){e[a]=p.mix(u,r).rgbString();continue}}else if("number"===d&&isFinite(c)&&isFinite(h)){e[a]=c+(h-c)*r;continue}e[a]=h}}(r,o,i,t),e):(e._view=i,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return r.isNumber(this._model.x)&&r.isNumber(this._model.y)}}),o.extend=r.inherits,e.exports=o},{2:2,45:45}],27:[function(t,e,i){"use strict";var n=t(2),r=t(25),o=t(45);e.exports=function(t){function e(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function i(t){return void 0!==t&&null!==t&&"none"!==t}function s(t,n,r){var o=document.defaultView,s=t.parentNode,a=o.getComputedStyle(t)[n],l=o.getComputedStyle(s)[n],c=i(a),h=i(l),d=Number.POSITIVE_INFINITY;return c||h?Math.min(c?e(a,t,r):d,h?e(l,s,r):d):"none"}o.configMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,r){var s=i[e]||{},a=n[e];"scales"===e?i[e]=o.scaleMerge(s,a):"scale"===e?i[e]=o.merge(s,[t.scaleService.getScaleDefaults(a.type),a]):o._merger(e,i,n,r)}})},o.scaleMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(e,i,n,r){if("xAxes"===e||"yAxes"===e){var s,a,l,c=n[e].length;for(i[e]||(i[e]=[]),s=0;s<c;++s)l=n[e][s],a=o.valueOrDefault(l.type,"xAxes"===e?"category":"linear"),s>=i[e].length&&i[e].push({}),!i[e][s].type||l.type&&l.type!==i[e][s].type?o.merge(i[e][s],[t.scaleService.getScaleDefaults(a),l]):o.merge(i[e][s],l)}else o._merger(e,i,n,r)}})},o.where=function(t,e){if(o.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return o.each(t,function(t){e(t)&&i.push(t)}),i},o.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,r=t.length;n<r;++n)if(e.call(i,t[n],n,t))return n;return-1},o.findNextWhere=function(t,e,i){o.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var r=t[n];if(e(r))return r}},o.findPreviousWhere=function(t,e,i){o.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;n>=0;n--){var r=t[n];if(e(r))return r}},o.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},o.almostEquals=function(t,e,i){return Math.abs(t-e)<i},o.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&i+e>t},o.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},o.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},o.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e},o.toRadians=function(t){return t*(Math.PI/180)},o.toDegrees=function(t){return t*(180/Math.PI)},o.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n),o=Math.atan2(n,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:r}},o.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},o.aliasPixel=function(t){return t%2==0?0:.5},o.splineCurve=function(t,e,i,n){var r=t.skip?e:t,o=e,s=i.skip?e:i,a=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),l=Math.sqrt(Math.pow(s.x-o.x,2)+Math.pow(s.y-o.y,2)),c=a/(a+l),h=l/(a+l),d=n*(c=isNaN(c)?0:c),u=n*(h=isNaN(h)?0:h);return{previous:{x:o.x-d*(s.x-r.x),y:o.y-d*(s.y-r.y)},next:{x:o.x+u*(s.x-r.x),y:o.y+u*(s.y-r.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(t){var e,i,n,r,s,a,l,c,h,d=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),u=d.length;for(e=0;e<u;++e)if(!(n=d[e]).model.skip){if(i=e>0?d[e-1]:null,(r=e<u-1?d[e+1]:null)&&!r.model.skip){var p=r.model.x-n.model.x;n.deltaK=0!==p?(r.model.y-n.model.y)/p:0}!i||i.model.skip?n.mK=n.deltaK:!r||r.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<u-1;++e)n=d[e],r=d[e+1],n.model.skip||r.model.skip||(o.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=r.mK=0:(s=n.mK/n.deltaK,a=r.mK/n.deltaK,(c=Math.pow(s,2)+Math.pow(a,2))<=9||(l=3/Math.sqrt(c),n.mK=s*l*n.deltaK,r.mK=a*l*n.deltaK)));for(e=0;e<u;++e)(n=d[e]).model.skip||(i=e>0?d[e-1]:null,r=e<u-1?d[e+1]:null,i&&!i.model.skip&&(h=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-h,n.model.controlPointPreviousY=n.model.y-h*n.mK),r&&!r.model.skip&&(h=(r.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+h,n.model.controlPointNextY=n.model.y+h*n.mK))},o.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},o.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},o.niceNum=function(t,e){var i=Math.floor(o.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},o.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},o.getRelativePosition=function(t,e){var i,n,r=t.originalEvent||t,s=t.currentTarget||t.srcElement,a=s.getBoundingClientRect(),l=r.touches;l&&l.length>0?(i=l[0].clientX,n=l[0].clientY):(i=r.clientX,n=r.clientY);var c=parseFloat(o.getStyle(s,"padding-left")),h=parseFloat(o.getStyle(s,"padding-top")),d=parseFloat(o.getStyle(s,"padding-right")),u=parseFloat(o.getStyle(s,"padding-bottom")),p=a.right-a.left-c-d,f=a.bottom-a.top-h-u;return{x:i=Math.round((i-a.left-c)/p*s.width/e.currentDevicePixelRatio),y:n=Math.round((n-a.top-h)/f*s.height/e.currentDevicePixelRatio)}},o.getConstraintWidth=function(t){return s(t,"max-width","clientWidth")},o.getConstraintHeight=function(t){return s(t,"max-height","clientHeight")},o.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(o.getStyle(e,"padding-left"),10),n=parseInt(o.getStyle(e,"padding-right"),10),r=e.clientWidth-i-n,s=o.getConstraintWidth(t);return isNaN(s)?r:Math.min(r,s)},o.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(o.getStyle(e,"padding-top"),10),n=parseInt(o.getStyle(e,"padding-bottom"),10),r=e.clientHeight-i-n,s=o.getConstraintHeight(t);return isNaN(s)?r:Math.min(r,s)},o.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},o.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,r=t.height,o=t.width;n.height=r*i,n.width=o*i,t.ctx.scale(i,i),n.style.height||n.style.width||(n.style.height=r+"px",n.style.width=o+"px")}},o.fontString=function(t,e,i){return e+" "+t+"px "+i},o.longestText=function(t,e,i,n){var r=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},s=n.garbageCollect=[],n.font=e),t.font=e;var a=0;o.each(i,function(e){void 0!==e&&null!==e&&!0!==o.isArray(e)?a=o.measureText(t,r,s,a,e):o.isArray(e)&&o.each(e,function(e){void 0===e||null===e||o.isArray(e)||(a=o.measureText(t,r,s,a,e))})});var l=s.length/2;if(l>i.length){for(var c=0;c<l;c++)delete r[s[c]];s.splice(0,l)}return a},o.measureText=function(t,e,i,n,r){var o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n},o.numberOfLabelLines=function(t){var e=1;return o.each(t,function(t){o.isArray(t)&&t.length>e&&(e=t.length)}),e},o.color=n?function(t){return t instanceof CanvasGradient&&(t=r.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},o.getHoverColor=function(t){return t instanceof CanvasPattern?t:o.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,i){"use strict";var n=t(45);function r(t,e){return t.native?{x:t.x,y:t.y}:n.getRelativePosition(t,e)}function o(t,e){var i,n,r,o,s;for(n=0,o=t.data.datasets.length;n<o;++n)if(t.isDatasetVisible(n))for(r=0,s=(i=t.getDatasetMeta(n)).data.length;r<s;++r){var a=i.data[r];a._view.skip||e(a)}}function s(t,e){var i=[];return o(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function a(t,e,i,n){var r=Number.POSITIVE_INFINITY,s=[];return o(t,function(t){if(!i||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),a=n(e,o);a<r?(s=[t],r=a):a===r&&s.push(t)}}),s}function l(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var r=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}function c(t,e,i){var n=r(e,t);i.axis=i.axis||"x";var o=l(i.axis),c=i.intersect?s(t,n):a(t,n,!1,o),h=[];return c.length?(t.data.datasets.forEach(function(e,i){if(t.isDatasetVisible(i)){var n=t.getDatasetMeta(i).data[c[0]._index];n&&!n._view.skip&&h.push(n)}}),h):[]}e.exports={modes:{single:function(t,e){var i=r(e,t),n=[];return o(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:c,index:c,dataset:function(t,e,i){var n=r(e,t);i.axis=i.axis||"xy";var o=l(i.axis),c=i.intersect?s(t,n):a(t,n,!1,o);return c.length>0&&(c=t.getDatasetMeta(c[0]._datasetIndex).data),c},"x-axis":function(t,e){return c(t,e,{intersect:!1})},point:function(t,e){return s(t,r(e,t))},nearest:function(t,e,i){var n=r(e,t);i.axis=i.axis||"xy";var o=l(i.axis),s=a(t,n,i.intersect,o);return s.length>1&&s.sort(function(t,e){var i=t.getArea()-e.getArea();return 0===i&&(i=t._datasetIndex-e._datasetIndex),i}),s.slice(0,1)},x:function(t,e,i){var n=r(e,t),s=[],a=!1;return o(t,function(t){t.inXRange(n.x)&&s.push(t),t.inRange(n.x,n.y)&&(a=!0)}),i.intersect&&!a&&(s=[]),s},y:function(t,e,i){var n=r(e,t),s=[],a=!1;return o(t,function(t){t.inYRange(n.y)&&s.push(t),t.inRange(n.x,n.y)&&(a=!0)}),i.intersect&&!a&&(s=[]),s}}}},{45:45}],29:[function(t,e,i){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t,t}},{25:25}],30:[function(t,e,i){"use strict";var n=t(45);function r(t,e){return n.where(t,function(t){return t.position===e})}function o(t,e){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,i){var n=e?i:t,r=e?t:i;return n.weight===r.weight?n._tmpIndex_-r._tmpIndex_:n.weight-r.weight}),t.forEach(function(t){delete t._tmpIndex_})}e.exports={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,r=["fullWidth","position","weight"],o=r.length,s=0;s<o;++s)n=r[s],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(t,e,i){if(t){var s=t.options.layout||{},a=n.options.toPadding(s.padding),l=a.left,c=a.right,h=a.top,d=a.bottom,u=r(t.boxes,"left"),p=r(t.boxes,"right"),f=r(t.boxes,"top"),m=r(t.boxes,"bottom"),g=r(t.boxes,"chartArea");o(u,!0),o(p,!1),o(f,!0),o(m,!1);var v=e-l-c,y=i-h-d,b=y/2,_=(e-v/2)/(u.length+p.length),x=(i-b)/(f.length+m.length),w=v,k=y,C=[];n.each(u.concat(p,f,m),function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?v:w,x),k-=e.height):(e=t.update(_,k),w-=e.width),C.push({horizontal:i,minSize:e,box:t})});var S=0,D=0,T=0,A=0;n.each(f.concat(m),function(t){if(t.getPadding){var e=t.getPadding();S=Math.max(S,e.left),D=Math.max(D,e.right)}}),n.each(u.concat(p),function(t){if(t.getPadding){var e=t.getPadding();T=Math.max(T,e.top),A=Math.max(A,e.bottom)}});var M=l,E=c,P=h,I=d;n.each(u.concat(p),R),n.each(u,function(t){M+=t.width}),n.each(p,function(t){E+=t.width}),n.each(f.concat(m),R),n.each(f,function(t){P+=t.height}),n.each(m,function(t){I+=t.height}),n.each(u.concat(p),function(t){var e=n.findNextWhere(C,function(e){return e.box===t}),i={left:0,right:0,top:P,bottom:I};e&&t.update(e.minSize.width,k,i)}),M=l,E=c,P=h,I=d,n.each(u,function(t){M+=t.width}),n.each(p,function(t){E+=t.width}),n.each(f,function(t){P+=t.height}),n.each(m,function(t){I+=t.height});var O=Math.max(S-M,0);M+=O,E+=Math.max(D-E,0);var N=Math.max(T-P,0);P+=N,I+=Math.max(A-I,0);var L=i-P-I,j=e-M-E;j===w&&L===k||(n.each(u,function(t){t.height=L}),n.each(p,function(t){t.height=L}),n.each(f,function(t){t.fullWidth||(t.width=j)}),n.each(m,function(t){t.fullWidth||(t.width=j)}),k=L,w=j);var F=l+O,$=h+N;n.each(u.concat(f),H),F+=w,$+=k,n.each(p,H),n.each(m,H),t.chartArea={left:M,top:P,right:M+w,bottom:P+k},n.each(g,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(w,k)})}function R(t){var e=n.findNextWhere(C,function(e){return e.box===t});if(e)if(t.isHorizontal()){var i={left:Math.max(M,S),right:Math.max(E,D),top:0,bottom:0};t.update(t.fullWidth?v:w,y/2,i)}else t.update(e.minSize.width,k)}function H(t){t.isHorizontal()?(t.left=t.fullWidth?l:M,t.right=t.fullWidth?e-c:M+w,t.top=$,t.bottom=$+t.height,$=t.bottom):(t.left=F,t.right=F+t.width,t.top=P,t.bottom=P+k,F=t.right)}}}},{45:45}],31:[function(t,e,i){"use strict";var n=t(25),r=t(45);n._set("global",{plugins:{}}),e.exports={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach(function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,r,o,s,a,l=this.descriptors(t),c=l.length;for(n=0;n<c;++n)if("function"==typeof(a=(o=(r=l[n]).plugin)[e])&&((s=[t].concat(i||[])).push(r.options),!1===a.apply(o,s)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],o=[],s=t&&t.config||{},a=s.options&&s.options.plugins||{};return this._plugins.concat(s.plugins||[]).forEach(function(t){if(-1===i.indexOf(t)){var e=t.id,s=a[e];!1!==s&&(!0===s&&(s=r.clone(n.global.plugins[e])),i.push(t),o.push({plugin:t,options:s||{}}))}}),e.descriptors=o,e.id=this._cacheId,o},_invalidate:function(t){delete t.$plugins}}},{25:25,45:45}],32:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45),s=t(34);function a(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function l(t,e,i){var n=t.getPixelForTick(e);return i&&(n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}n._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",lineHeight:1.2,padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:s.formatters.values,minor:{},major:{}}}),e.exports=function(t){function e(t,e,i){return o.isArray(e)?o.longestText(t,i,e):t.measureText(e).width}function i(t){var e=o.valueOrDefault,i=n.global,r=e(t.fontSize,i.defaultFontSize),s=e(t.fontStyle,i.defaultFontStyle),a=e(t.fontFamily,i.defaultFontFamily);return{size:r,style:s,family:a,font:o.fontString(r,s,a)}}function s(t){return o.options.toLineHeight(o.valueOrDefault(t.lineHeight,1.2),o.valueOrDefault(t.fontSize,n.global.defaultFontSize))}t.Scale=r.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){o.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,r,s,a,l,c,h=this;for(h.beforeUpdate(),h.maxWidth=t,h.maxHeight=e,h.margins=o.extend({left:0,right:0,top:0,bottom:0},i),h.longestTextCache=h.longestTextCache||{},h.beforeSetDimensions(),h.setDimensions(),h.afterSetDimensions(),h.beforeDataLimits(),h.determineDataLimits(),h.afterDataLimits(),h.beforeBuildTicks(),l=h.buildTicks()||[],h.afterBuildTicks(),h.beforeTickToLabelConversion(),s=h.convertTicksToLabels(l)||h.ticks,h.afterTickToLabelConversion(),h.ticks=s,n=0,r=s.length;n<r;++n)a=s[n],(c=l[n])?c.label=a:l.push(c={label:a,major:!1});return h._ticks=l,h.beforeCalculateTickRotation(),h.calculateTickRotation(),h.afterCalculateTickRotation(),h.beforeFit(),h.fit(),h.afterFit(),h.afterUpdate(),h.minSize},afterUpdate:function(){o.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){o.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){o.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){o.callback(this.options.beforeDataLimits,[this])},determineDataLimits:o.noop,afterDataLimits:function(){o.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){o.callback(this.options.beforeBuildTicks,[this])},buildTicks:o.noop,afterBuildTicks:function(){o.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){o.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){o.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){o.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,n=t.options.ticks,r=a(t._ticks),s=i(n);e.font=s.font;var l=n.minRotation||0;if(r.length&&t.options.display&&t.isHorizontal())for(var c,h=o.longestText(e,s.font,r,t.longestTextCache),d=h,u=t.getPixelForTick(1)-t.getPixelForTick(0)-6;d>u&&l<n.maxRotation;){var p=o.toRadians(l);if(c=Math.cos(p),Math.sin(p)*h>t.maxHeight){l--;break}l++,d=c*h}t.labelRotation=l},afterCalculateTickRotation:function(){o.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){o.callback(this.options.beforeFit,[this])},fit:function(){var t=this,n=t.minSize={width:0,height:0},r=a(t._ticks),l=t.options,c=l.ticks,h=l.scaleLabel,d=l.gridLines,u=l.display,p=t.isHorizontal(),f=i(c),m=l.gridLines.tickMarkLength;if(n.width=p?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:u&&d.drawTicks?m:0,n.height=p?u&&d.drawTicks?m:0:t.maxHeight,h.display&&u){var g=s(h)+o.options.toPadding(h.padding).height;p?n.height+=g:n.width+=g}if(c.display&&u){var v=o.longestText(t.ctx,f.font,r,t.longestTextCache),y=o.numberOfLabelLines(r),b=.5*f.size,_=t.options.ticks.padding;if(p){t.longestLabelWidth=v;var x=o.toRadians(t.labelRotation),w=Math.cos(x),k=Math.sin(x)*v+f.size*y+b*(y-1)+b;n.height=Math.min(t.maxHeight,n.height+k+_),t.ctx.font=f.font;var C=e(t.ctx,r[0],f.font),S=e(t.ctx,r[r.length-1],f.font);0!==t.labelRotation?(t.paddingLeft="bottom"===l.position?w*C+3:w*b+3,t.paddingRight="bottom"===l.position?w*b+3:w*S+3):(t.paddingLeft=C/2+3,t.paddingRight=S/2+3)}else c.mirror?v=0:v+=_+b,n.width=Math.min(t.maxWidth,n.width+v),t.paddingTop=f.size/2,t.paddingBottom=f.size/2}t.handleMargins(),t.width=n.width,t.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){o.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(o.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:o.noop,getPixelForValue:o.noop,getValueForPixel:o.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),r=n*t+e.paddingLeft;i&&(r+=n/2);var o=e.left+Math.round(r);return o+=e.isFullWidth()?e.margins.left:0}var s=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(s/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,i,n,r,s=this,a=s.isHorizontal(),l=s.options.ticks.minor,c=t.length,h=o.toRadians(s.labelRotation),d=Math.cos(h),u=s.longestLabelWidth*d,p=[];for(l.maxTicksLimit&&(r=l.maxTicksLimit),a&&(e=!1,(u+l.autoSkipPadding)*c>s.width-(s.paddingLeft+s.paddingRight)&&(e=1+Math.floor((u+l.autoSkipPadding)*c/(s.width-(s.paddingLeft+s.paddingRight)))),r&&c>r&&(e=Math.max(e,Math.floor(c/r)))),i=0;i<c;i++)n=t[i],(e>1&&i%e>0||i%e==0&&i+e>=c)&&i!==c-1&&delete n.label,p.push(n);return p},draw:function(t){var e=this,r=e.options;if(r.display){var a=e.ctx,c=n.global,h=r.ticks.minor,d=r.ticks.major||h,u=r.gridLines,p=r.scaleLabel,f=0!==e.labelRotation,m=e.isHorizontal(),g=h.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),v=o.valueOrDefault(h.fontColor,c.defaultFontColor),y=i(h),b=o.valueOrDefault(d.fontColor,c.defaultFontColor),_=i(d),x=u.drawTicks?u.tickMarkLength:0,w=o.valueOrDefault(p.fontColor,c.defaultFontColor),k=i(p),C=o.options.toPadding(p.padding),S=o.toRadians(e.labelRotation),D=[],T=e.options.gridLines.lineWidth,A="right"===r.position?e.right:e.right-T-x,M="right"===r.position?e.right+x:e.right,E="bottom"===r.position?e.top+T:e.bottom-x-T,P="bottom"===r.position?e.top+T+x:e.bottom+T;if(o.each(g,function(i,n){if(!o.isNullOrUndef(i.label)){var s,a,d,p,v,y,b,_,w,k,C,I,O,N,L=i.label;n===e.zeroLineIndex&&r.offset===u.offsetGridLines?(s=u.zeroLineWidth,a=u.zeroLineColor,d=u.zeroLineBorderDash,p=u.zeroLineBorderDashOffset):(s=o.valueAtIndexOrDefault(u.lineWidth,n),a=o.valueAtIndexOrDefault(u.color,n),d=o.valueOrDefault(u.borderDash,c.borderDash),p=o.valueOrDefault(u.borderDashOffset,c.borderDashOffset));var j="middle",F="middle",$=h.padding;if(m){var R=x+$;"bottom"===r.position?(F=f?"middle":"top",j=f?"right":"center",N=e.top+R):(F=f?"middle":"bottom",j=f?"left":"center",N=e.bottom-R);var H=l(e,n,u.offsetGridLines&&g.length>1);H<e.left&&(a="rgba(0,0,0,0)"),H+=o.aliasPixel(s),O=e.getPixelForTick(n)+h.labelOffset,v=b=w=C=H,y=E,_=P,k=t.top,I=t.bottom+T}else{var z,B="left"===r.position;h.mirror?(j=B?"left":"right",z=$):(j=B?"right":"left",z=x+$),O=B?e.right-z:e.left+z;var U=l(e,n,u.offsetGridLines&&g.length>1);U<e.top&&(a="rgba(0,0,0,0)"),U+=o.aliasPixel(s),N=e.getPixelForTick(n)+h.labelOffset,v=A,b=M,w=t.left,C=t.right+T,y=_=k=I=U}D.push({tx1:v,ty1:y,tx2:b,ty2:_,x1:w,y1:k,x2:C,y2:I,labelX:O,labelY:N,glWidth:s,glColor:a,glBorderDash:d,glBorderDashOffset:p,rotation:-1*S,label:L,major:i.major,textBaseline:F,textAlign:j})}}),o.each(D,function(t){if(u.display&&(a.save(),a.lineWidth=t.glWidth,a.strokeStyle=t.glColor,a.setLineDash&&(a.setLineDash(t.glBorderDash),a.lineDashOffset=t.glBorderDashOffset),a.beginPath(),u.drawTicks&&(a.moveTo(t.tx1,t.ty1),a.lineTo(t.tx2,t.ty2)),u.drawOnChartArea&&(a.moveTo(t.x1,t.y1),a.lineTo(t.x2,t.y2)),a.stroke(),a.restore()),h.display){a.save(),a.translate(t.labelX,t.labelY),a.rotate(t.rotation),a.font=t.major?_.font:y.font,a.fillStyle=t.major?b:v,a.textBaseline=t.textBaseline,a.textAlign=t.textAlign;var i=t.label;if(o.isArray(i))for(var n=i.length,r=1.5*y.size,s=e.isHorizontal()?0:-r*(n-1)/2,l=0;l<n;++l)a.fillText(""+i[l],0,s),s+=r;else a.fillText(i,0,0);a.restore()}}),p.display){var I,O,N=0,L=s(p)/2;if(m)I=e.left+(e.right-e.left)/2,O="bottom"===r.position?e.bottom-L-C.bottom:e.top+L+C.top;else{var j="left"===r.position;I=j?e.left+L+C.top:e.right-L-C.top,O=e.top+(e.bottom-e.top)/2,N=j?-.5*Math.PI:.5*Math.PI}a.save(),a.translate(I,O),a.rotate(N),a.textAlign="center",a.textBaseline="middle",a.fillStyle=w,a.font=k.font,a.fillText(p.labelString,0,0),a.restore()}if(u.drawBorder){a.lineWidth=o.valueAtIndexOrDefault(u.lineWidth,0),a.strokeStyle=o.valueAtIndexOrDefault(u.color,0);var F=e.left,$=e.right+T,R=e.top,H=e.bottom+T,z=o.aliasPixel(a.lineWidth);m?(R=H="top"===r.position?e.bottom:e.top,R+=z,H+=z):(F=$="left"===r.position?e.right:e.left,F+=z,$+=z),a.beginPath(),a.moveTo(F,R),a.lineTo($,H),a.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,i){"use strict";var n=t(25),r=t(45),o=t(30);e.exports=function(t){t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=r.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?r.merge({},[n.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=r.extend(this.defaults[t],e))},addScalesToLayout:function(t){r.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,o.addBox(t,e)})}}}},{25:25,30:30,45:45}],34:[function(t,e,i){"use strict";var n=t(45);e.exports={formatters:{values:function(t){return n.isArray(t)?t:""+t},linear:function(t,e,i){var r=i.length>3?i[2]-i[1]:i[1]-i[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var o=n.log10(Math.abs(r)),s="";if(0!==t){var a=-1*Math.floor(o);a=Math.max(Math.min(a,20),0),s=t.toFixed(a)}else s="0";return s},logarithmic:function(t,e,i){var r=t/Math.pow(10,Math.floor(n.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45);n._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:o.noop,title:function(t,e){var i="",n=e.labels,r=n?n.length:0;if(t.length>0){var o=t[0];o.xLabel?i=o.xLabel:r>0&&o.index<r&&(i=n[o.index])}return i},afterTitle:o.noop,beforeBody:o.noop,beforeLabel:o.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:o.noop,afterBody:o.noop,beforeFooter:o.noop,footer:o.noop,afterFooter:o.noop}}}),e.exports=function(t){function e(t,e){var i=o.color(t);return i.alpha(e*i.alpha()).rgbaString()}function i(t,e){return e&&(o.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function s(t){var e=n.global,i=o.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:i(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:i(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:i(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:i(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:i(t.titleFontStyle,e.defaultFontStyle),titleFontSize:i(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:i(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:i(t.footerFontStyle,e.defaultFontStyle),footerFontSize:i(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}t.Tooltip=r.extend({initialize:function(){this._model=s(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),n=t.title.apply(this,arguments),r=t.afterTitle.apply(this,arguments),o=[];return o=i(o=i(o=i(o,e),n),r)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,e){var n=this,r=n._options.callbacks,s=[];return o.each(t,function(t){var o={before:[],lines:[],after:[]};i(o.before,r.beforeLabel.call(n,t,e)),i(o.lines,r.label.call(n,t,e)),i(o.after,r.afterLabel.call(n,t,e)),s.push(o)}),s},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return o.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),r=t.afterFooter.apply(this,arguments),o=[];return o=i(o=i(o=i(o,e),n),r)},update:function(e){var i,n,r,a,l,c,h,d=this,u=d._options,p=d._model,f=d._model=s(u),m=d._active,g=d._data,v={xAlign:p.xAlign,yAlign:p.yAlign},y={x:p.x,y:p.y},b={width:p.width,height:p.height},_={x:p.caretX,y:p.caretY};if(m.length){f.opacity=1;var x=[],w=[];_=t.Tooltip.positioners[u.position].call(d,m,d._eventPosition);var k=[];for(i=0,n=m.length;i<n;++i)k.push((r=m[i],a=void 0,l=void 0,void 0,void 0,a=r._xScale,l=r._yScale||r._scale,c=r._index,h=r._datasetIndex,{xLabel:a?a.getLabelForIndex(c,h):"",yLabel:l?l.getLabelForIndex(c,h):"",index:c,datasetIndex:h,x:r._model.x,y:r._model.y}));u.filter&&(k=k.filter(function(t){return u.filter(t,g)})),u.itemSort&&(k=k.sort(function(t,e){return u.itemSort(t,e,g)})),o.each(k,function(t){x.push(u.callbacks.labelColor.call(d,t,d._chart)),w.push(u.callbacks.labelTextColor.call(d,t,d._chart))}),f.title=d.getTitle(k,g),f.beforeBody=d.getBeforeBody(k,g),f.body=d.getBody(k,g),f.afterBody=d.getAfterBody(k,g),f.footer=d.getFooter(k,g),f.x=Math.round(_.x),f.y=Math.round(_.y),f.caretPadding=u.caretPadding,f.labelColors=x,f.labelTextColors=w,f.dataPoints=k,y=function(t,e,i,n){var r=t.x,o=t.y,s=t.caretSize,a=t.caretPadding,l=t.cornerRadius,c=i.xAlign,h=i.yAlign,d=s+a,u=l+a;return"right"===c?r-=e.width:"center"===c&&((r-=e.width/2)+e.width>n.width&&(r=n.width-e.width),r<0&&(r=0)),"top"===h?o+=d:o-="bottom"===h?e.height+d:e.height/2,"center"===h?"left"===c?r+=d:"right"===c&&(r-=d):"left"===c?r-=u:"right"===c&&(r+=u),{x:r,y:o}}(f,b=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,r=0,s=e.body,a=s.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=e.beforeBody.length+e.afterBody.length;var l=e.title.length,c=e.footer.length,h=e.titleFontSize,d=e.bodyFontSize,u=e.footerFontSize;n+=l*h,n+=l?(l-1)*e.titleSpacing:0,n+=l?e.titleMarginBottom:0,n+=a*d,n+=a?(a-1)*e.bodySpacing:0,n+=c?e.footerMarginTop:0,n+=c*u,n+=c?(c-1)*e.footerSpacing:0;var p=0,f=function(t){r=Math.max(r,i.measureText(t).width+p)};return i.font=o.fontString(h,e._titleFontStyle,e._titleFontFamily),o.each(e.title,f),i.font=o.fontString(d,e._bodyFontStyle,e._bodyFontFamily),o.each(e.beforeBody.concat(e.afterBody),f),p=e.displayColors?d+2:0,o.each(s,function(t){o.each(t.before,f),o.each(t.lines,f),o.each(t.after,f)}),p=0,i.font=o.fontString(u,e._footerFontStyle,e._footerFontFamily),o.each(e.footer,f),{width:r+=2*e.xPadding,height:n}}(this,f),v=function(t,e){var i,n,r,o,s,a=t._model,l=t._chart,c=t._chart.chartArea,h="center",d="center";a.y<e.height?d="top":a.y>l.height-e.height&&(d="bottom");var u=(c.left+c.right)/2,p=(c.top+c.bottom)/2;"center"===d?(i=function(t){return t<=u},n=function(t){return t>u}):(i=function(t){return t<=e.width/2},n=function(t){return t>=l.width-e.width/2}),r=function(t){return t+e.width+a.caretSize+a.caretPadding>l.width},o=function(t){return t-e.width-a.caretSize-a.caretPadding<0},s=function(t){return t<=p?"top":"bottom"},i(a.x)?(h="left",r(a.x)&&(h="center",d=s(a.y))):n(a.x)&&(h="right",o(a.x)&&(h="center",d=s(a.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:h,yAlign:f.yAlign?f.yAlign:d}}(this,b),d._chart)}else f.opacity=0;return f.xAlign=v.xAlign,f.yAlign=v.yAlign,f.x=y.x,f.y=y.y,f.width=b.width,f.height=b.height,f.caretX=_.x,f.caretY=_.y,d._model=f,e&&u.custom&&u.custom.call(d,f),d},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,r=this.getCaretPosition(t,e,n);i.lineTo(r.x1,r.y1),i.lineTo(r.x2,r.y2),i.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,i){var n,r,o,s,a,l,c=i.caretSize,h=i.cornerRadius,d=i.xAlign,u=i.yAlign,p=t.x,f=t.y,m=e.width,g=e.height;if("center"===u)a=f+g/2,"left"===d?(r=(n=p)-c,o=n,s=a+c,l=a-c):(r=(n=p+m)+c,o=n,s=a-c,l=a+c);else if("left"===d?(n=(r=p+h+c)-c,o=r+c):"right"===d?(n=(r=p+m-h-c)-c,o=r+c):(n=(r=i.caretX)-c,o=r+c),"top"===u)a=(s=f)-c,l=s;else{a=(s=f+g)+c,l=s;var v=o;o=n,n=v}return{x1:n,x2:r,x3:o,y1:s,y2:a,y3:l}},drawTitle:function(t,i,n,r){var s=i.title;if(s.length){n.textAlign=i._titleAlign,n.textBaseline="top";var a,l,c=i.titleFontSize,h=i.titleSpacing;for(n.fillStyle=e(i.titleFontColor,r),n.font=o.fontString(c,i._titleFontStyle,i._titleFontFamily),a=0,l=s.length;a<l;++a)n.fillText(s[a],t.x,t.y),t.y+=c+h,a+1===s.length&&(t.y+=i.titleMarginBottom-h)}},drawBody:function(t,i,n,r){var s=i.bodyFontSize,a=i.bodySpacing,l=i.body;n.textAlign=i._bodyAlign,n.textBaseline="top",n.font=o.fontString(s,i._bodyFontStyle,i._bodyFontFamily);var c=0,h=function(e){n.fillText(e,t.x+c,t.y),t.y+=s+a};n.fillStyle=e(i.bodyFontColor,r),o.each(i.beforeBody,h);var d=i.displayColors;c=d?s+2:0,o.each(l,function(a,l){var c=e(i.labelTextColors[l],r);n.fillStyle=c,o.each(a.before,h),o.each(a.lines,function(o){d&&(n.fillStyle=e(i.legendColorBackground,r),n.fillRect(t.x,t.y,s,s),n.lineWidth=1,n.strokeStyle=e(i.labelColors[l].borderColor,r),n.strokeRect(t.x,t.y,s,s),n.fillStyle=e(i.labelColors[l].backgroundColor,r),n.fillRect(t.x+1,t.y+1,s-2,s-2),n.fillStyle=c),h(o)}),o.each(a.after,h)}),c=0,o.each(i.afterBody,h),t.y-=a},drawFooter:function(t,i,n,r){var s=i.footer;s.length&&(t.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=e(i.footerFontColor,r),n.font=o.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),o.each(s,function(e){n.fillText(e,t.x,t.y),t.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,i,n,r,o){n.fillStyle=e(i.backgroundColor,o),n.strokeStyle=e(i.borderColor,o),n.lineWidth=i.borderWidth;var s=i.xAlign,a=i.yAlign,l=t.x,c=t.y,h=r.width,d=r.height,u=i.cornerRadius;n.beginPath(),n.moveTo(l+u,c),"top"===a&&this.drawCaret(t,r),n.lineTo(l+h-u,c),n.quadraticCurveTo(l+h,c,l+h,c+u),"center"===a&&"right"===s&&this.drawCaret(t,r),n.lineTo(l+h,c+d-u),n.quadraticCurveTo(l+h,c+d,l+h-u,c+d),"bottom"===a&&this.drawCaret(t,r),n.lineTo(l+u,c+d),n.quadraticCurveTo(l,c+d,l,c+d-u),"center"===a&&"left"===s&&this.drawCaret(t,r),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},r=Math.abs(e.opacity<.001)?0:e.opacity,o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&o&&(this.drawBackground(n,e,t,i,r),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,r),this.drawBody(n,e,t,r),this.drawFooter(n,e,t,r))}},handleEvent:function(t){var e,i=this,n=i._options;return i._lastActive=i._lastActive||[],"mouseout"===t.type?i._active=[]:i._active=i._chart.getElementsAtEventForMode(t,n.mode,n),(e=!o.arrayEquals(i._active,i._lastActive))&&(i._lastActive=i._active,(n.enabled||n.custom)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0),i.pivot())),e}}),t.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,r=0,o=0;for(e=0,i=t.length;e<i;++e){var s=t[e];if(s&&s.hasValue()){var a=s.tooltipPosition();n+=a.x,r+=a.y,++o}}return{x:Math.round(n/o),y:Math.round(r/o)}},nearest:function(t,e){var i,n,r,s=e.x,a=e.y,l=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var c=t[i];if(c&&c.hasValue()){var h=c.getCenterPoint(),d=o.distanceBetweenPoints(e,h);d<l&&(l=d,r=c)}}if(r){var u=r.tooltipPosition();s=u.x,a=u.y}return{x:s,y:a}}}}},{25:25,26:26,45:45}],36:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45);n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=r.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=o.getAngleFromPoint(i,{x:t,y:e}),r=n.angle,s=n.distance,a=i.startAngle,l=i.endAngle;l<a;)l+=2*Math.PI;for(;r>l;)r-=2*Math.PI;for(;r<a;)r+=2*Math.PI;var c=r>=a&&r<=l,h=s>=i.innerRadius&&s<=i.outerRadius;return c&&h}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45),s=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:s.defaultColor,borderWidth:3,borderColor:s.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=r.extend({draw:function(){var t,e,i,n,r=this._view,a=this._chart.ctx,l=r.spanGaps,c=this._children.slice(),h=s.elements.line,d=-1;for(this._loop&&c.length&&c.push(c[0]),a.save(),a.lineCap=r.borderCapStyle||h.borderCapStyle,a.setLineDash&&a.setLineDash(r.borderDash||h.borderDash),a.lineDashOffset=r.borderDashOffset||h.borderDashOffset,a.lineJoin=r.borderJoinStyle||h.borderJoinStyle,a.lineWidth=r.borderWidth||h.borderWidth,a.strokeStyle=r.borderColor||s.defaultColor,a.beginPath(),d=-1,t=0;t<c.length;++t)e=c[t],i=o.previousItem(c,t),n=e._view,0===t?n.skip||(a.moveTo(n.x,n.y),d=t):(i=-1===d?i:c[d],n.skip||(d!==t-1&&!l||-1===d?a.moveTo(n.x,n.y):o.canvas.lineTo(a,i._view,e._view),d=t));a.stroke(),a.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45),s=n.global.defaultColor;function a(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}n._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:s,borderColor:s,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=r.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:a,inXRange:a,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._model,r=this._chart.ctx,a=e.pointStyle,l=e.radius,c=e.x,h=e.y,d=o.color,u=0;e.skip||(r.strokeStyle=e.borderColor||s,r.lineWidth=o.valueOrDefault(e.borderWidth,n.global.elements.point.borderWidth),r.fillStyle=e.backgroundColor||s,void 0!==t&&(i.x<t.left||1.01*t.right<i.x||i.y<t.top||1.01*t.bottom<i.y)&&(i.x<t.left?u=(c-i.x)/(t.left-i.x):1.01*t.right<i.x?u=(i.x-c)/(i.x-t.right):i.y<t.top?u=(h-i.y)/(t.top-i.y):1.01*t.bottom<i.y&&(u=(i.y-h)/(i.y-t.bottom)),u=Math.round(100*u)/100,r.strokeStyle=d(r.strokeStyle).alpha(u).rgbString(),r.fillStyle=d(r.fillStyle).alpha(u).rgbString()),o.canvas.drawPoint(r,a,l,c,h))}})},{25:25,26:26,45:45}],39:[function(t,e,i){"use strict";var n=t(25),r=t(26);function o(t){return void 0!==t._view.width}function s(t){var e,i,n,r,s=t._view;if(o(t)){var a=s.width/2;e=s.x-a,i=s.x+a,n=Math.min(s.y,s.base),r=Math.max(s.y,s.base)}else{var l=s.height/2;e=Math.min(s.x,s.base),i=Math.max(s.x,s.base),n=s.y-l,r=s.y+l}return{left:e,top:n,right:i,bottom:r}}n._set("global",{elements:{rectangle:{backgroundColor:n.global.defaultColor,borderColor:n.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=r.extend({draw:function(){var t,e,i,n,r,o,s,a=this._chart.ctx,l=this._view,c=l.borderWidth;if(l.horizontal?(t=l.base,e=l.x,i=l.y-l.height/2,n=l.y+l.height/2,r=e>t?1:-1,o=1,s=l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,i=l.y,r=1,o=(n=l.base)>i?1:-1,s=l.borderSkipped||"bottom"),c){var h=Math.min(Math.abs(t-e),Math.abs(i-n)),d=(c=c>h?h:c)/2,u=t+("left"!==s?d*r:0),p=e+("right"!==s?-d*r:0),f=i+("top"!==s?d*o:0),m=n+("bottom"!==s?-d*o:0);u!==p&&(i=f,n=m),f!==m&&(t=u,e=p)}a.beginPath(),a.fillStyle=l.backgroundColor,a.strokeStyle=l.borderColor,a.lineWidth=c;var g=[[t,n],[t,i],[e,i],[e,n]],v=["bottom","left","top","right"].indexOf(s,0);function y(t){return g[(v+t)%4]}-1===v&&(v=0);var b=y(0);a.moveTo(b[0],b[1]);for(var _=1;_<4;_++)b=y(_),a.lineTo(b[0],b[1]);a.fill(),c&&a.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=s(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){if(!this._view)return!1;var i=s(this);return o(this)?t>=i.left&&t<=i.right:e>=i.top&&e<=i.bottom},inXRange:function(t){var e=s(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=s(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return o(this)?(t=i.x,e=(i.y+i.base)/2):(t=(i.x+i.base)/2,e=i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42);i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,r,o){if(o){var s=Math.min(o,n/2),a=Math.min(o,r/2);t.moveTo(e+s,i),t.lineTo(e+n-s,i),t.quadraticCurveTo(e+n,i,e+n,i+a),t.lineTo(e+n,i+r-a),t.quadraticCurveTo(e+n,i+r,e+n-s,i+r),t.lineTo(e+s,i+r),t.quadraticCurveTo(e,i+r,e,i+r-a),t.lineTo(e,i+a),t.quadraticCurveTo(e,i,e+s,i)}else t.rect(e,i,n,r)},drawPoint:function(t,e,i,n,r){var o,s,a,l,c,h;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,r,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),c=(s=3*i/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(n-s/2,r+c/3),t.lineTo(n+s/2,r+c/3),t.lineTo(n,r-2*c/3),t.closePath(),t.fill();break;case"rect":h=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-h,r-h,2*h,2*h),t.strokeRect(n-h,r-h,2*h,2*h);break;case"rectRounded":var d=i/Math.SQRT2,u=n-d,p=r-d,f=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,u,p,f,f,i/2),t.closePath(),t.fill();break;case"rectRot":h=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-h,r),t.lineTo(n,r+h),t.lineTo(n+h,r),t.lineTo(n,r-h),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,r+i),t.lineTo(n,r-i),t.moveTo(n-i,r),t.lineTo(n+i,r),t.closePath();break;case"crossRot":t.beginPath(),a=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-a,r-l),t.lineTo(n+a,r+l),t.moveTo(n-a,r+l),t.lineTo(n+a,r-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,r+i),t.lineTo(n,r-i),t.moveTo(n-i,r),t.lineTo(n+i,r),a=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-a,r-l),t.lineTo(n+a,r+l),t.moveTo(n-a,r+l),t.lineTo(n+a,r-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,r),t.lineTo(n+i,r),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,r),t.lineTo(n+i,r),t.closePath()}t.stroke()}}else t.drawImage(e,n-e.width/2,r-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){if(i.steppedLine)return"after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n,r={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(t){return null===t||void 0===t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return r.valueOrDefault(r.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var o,s,a;if(r.isArray(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(r.isObject(t))for(s=(a=Object.keys(t)).length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])},arrayEquals:function(t,e){var i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o instanceof Array&&s instanceof Array){if(!r.arrayEquals(o,s))return!1}else if(o!==s)return!1;return!0},clone:function(t){if(r.isArray(t))return t.map(r.clone);if(r.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,o=0;o<n;++o)e[i[o]]=r.clone(t[i[o]]);return e}return t},_merger:function(t,e,i,n){var o=e[t],s=i[t];r.isObject(o)&&r.isObject(s)?r.merge(o,s,n):e[t]=r.clone(s)},_mergerIf:function(t,e,i){var n=e[t],o=i[t];r.isObject(n)&&r.isObject(o)?r.mergeIf(n,o):e.hasOwnProperty(t)||(e[t]=r.clone(o))},merge:function(t,e,i){var n,o,s,a,l,c=r.isArray(e)?e:[e],h=c.length;if(!r.isObject(t))return t;for(n=(i=i||{}).merger||r._merger,o=0;o<h;++o)if(e=c[o],r.isObject(e))for(l=0,a=(s=Object.keys(e)).length;l<a;++l)n(s[l],t,e,i);return t},mergeIf:function(t,e){return r.merge(t,e,{merger:r._mergerIf})},extend:function(t){for(var e=function(e,i){t[i]=e},i=1,n=arguments.length;i<n;++i)r.each(arguments[i],e);return t},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=r.inherits,t&&r.extend(i.prototype,t),i.__super__=e.prototype,i}};e.exports=r,r.callCallback=r.callback,r.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},r.getValueOrDefault=r.valueOrDefault,r.getValueAtIndexOrDefault=r.valueAtIndexOrDefault},{}],43:[function(t,e,i){"use strict";var n=t(42),r={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-r.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*r.easeInBounce(2*t):.5*r.easeOutBounce(2*t-1)+.5}};e.exports={effects:r},n.easingEffects=r},{42:42}],44:[function(t,e,i){"use strict";var n=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,r,o;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,r=+t.bottom||0,o=+t.left||0):e=i=r=o=+t||0,{top:e,right:i,bottom:r,left:o,height:e+r,width:o+i}},resolve:function(t,e,i){var r,o,s;for(r=0,o=t.length;r<o;++r)if(void 0!==(s=t[r])&&(void 0!==e&&"function"==typeof s&&(s=s(e)),void 0!==i&&n.isArray(s)&&(s=s[i]),void 0!==s))return s}}},{42:42}],45:[function(t,e,i){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,i){"use strict";var n=t(45),r="$chartjs",o="chartjs-",s=o+"render-monitor",a=o+"render-animation",l=["animationstart","webkitAnimationStart"],c={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function h(t,e){var i=n.getStyle(t,e),r=i&&i.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var d=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function u(t,e,i){t.addEventListener(e,i,d)}function p(t,e,i){t.removeEventListener(e,i,d)}function f(t,e,i,n,r){return{type:t,chart:e,native:r||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function m(t,e,i){var c,h,d,p,m=t[r]||(t[r]={}),g=m.resizer=function(t){var e=document.createElement("div"),i=o+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var r=e.childNodes[0],s=e.childNodes[1];e._reset=function(){r.scrollLeft=1e6,r.scrollTop=1e6,s.scrollLeft=1e6,s.scrollTop=1e6};var a=function(){e._reset(),t()};return u(r,"scroll",a.bind(r,"expand")),u(s,"scroll",a.bind(s,"shrink")),e}((c=function(){if(m.resizer)return e(f("resize",i))},d=!1,p=[],function(){p=Array.prototype.slice.call(arguments),h=h||this,d||(d=!0,n.requestAnimFrame.call(window,function(){d=!1,c.apply(h,p)}))}));!function(t,e){var i=t[r]||(t[r]={}),o=i.renderProxy=function(t){t.animationName===a&&e()};n.each(l,function(e){u(t,e,o)}),i.reflow=!!t.offsetParent,t.classList.add(s)}(t,function(){if(m.resizer){var e=t.parentNode;e&&e!==g.parentNode&&e.insertBefore(g,e.firstChild),g._reset()}})}function g(t){var e=t[r]||{},i=e.resizer;delete e.resizer,function(t){var e=t[r]||{},i=e.renderProxy;i&&(n.each(l,function(e){p(t,e,i)}),delete e.renderProxy),t.classList.remove(s)}(t),i&&i.parentNode&&i.parentNode.removeChild(i)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,i,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+a+"{"+n+"}@keyframes "+a+"{"+n+"}."+s+"{-webkit-animation:"+a+" 0.001s;animation:"+a+" 0.001s;}",i=(t=this)._style||document.createElement("style"),t._style||(t._style=i,e="/* Chart.js */\n"+e,i.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),o=t.getAttribute("width");if(t[r]={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===o||""===o){var s=h(t,"width");void 0!==s&&(t.width=s)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var a=h(t,"height");void 0!==s&&(t.height=a)}}(t,e),i):null},releaseContext:function(t){var e=t.canvas;if(e[r]){var i=e[r].initial;["height","width"].forEach(function(t){var r=i[t];n.isNullOrUndef(r)?e.removeAttribute(t):e.setAttribute(t,r)}),n.each(i.style||{},function(t,i){e.style[i]=t}),e.width=e.width,delete e[r]}},addEventListener:function(t,e,i){var o=t.canvas;if("resize"!==e){var s=i[r]||(i[r]={});u(o,e,(s.proxies||(s.proxies={}))[t.id+"_"+e]=function(e){i(function(t,e){var i=c[t.type]||t.type,r=n.getRelativePosition(t,e);return f(i,e,r.x,r.y,t)}(e,t))})}else m(o,i,t)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var o=((i[r]||{}).proxies||{})[t.id+"_"+e];o&&p(n,e,o)}else g(n)}},n.addEvent=u,n.removeEvent=p},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),r=t(46),o=t(47),s=o._enabled?o:r;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},s)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,i){"use strict";var n=t(25),r=t(40),o=t(45);n._set("global",{plugins:{filler:{propagate:!0}}});var s={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),r=n&&i.isDatasetVisible(e)&&n.dataset._children||[],o=r.length||0;return o?function(t,e){return e<o&&r[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function a(t,e,i){var n,r=t._model||{},o=r.fill;if(void 0===o&&(o=!!r.backgroundColor),!1===o||null===o)return!1;if(!0===o)return"origin";if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=e+n),!(n===e||n<0||n>=i)&&n;switch(o){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return o;default:return!1}}function l(t){var e,i=t.el._model||{},n=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===r?o=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?o=i.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o;if("number"==typeof o&&isFinite(o))return{x:(e=n.isHorizontal())?o:null,y:e?null:o}}return null}function c(t,e,i){var n,r=t[e].fill,o=[e];if(!i)return r;for(;!1!==r&&-1===o.indexOf(r);){if(!isFinite(r))return r;if(!(n=t[r]))return!1;if(n.visible)return r;o.push(r),r=n.fill}return!1}function h(t){var e=t.fill,i="dataset";return!1===e?null:(isFinite(e)||(i="boundary"),s[i](t))}function d(t){return t&&!t.skip}function u(t,e,i,n,r){var s;if(n&&r){for(t.moveTo(e[0].x,e[0].y),s=1;s<n;++s)o.canvas.lineTo(t,e[s-1],e[s]);for(t.lineTo(i[r-1].x,i[r-1].y),s=r-1;s>0;--s)o.canvas.lineTo(t,i[s],i[s-1],!0)}}e.exports={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,o,s,d=(t.data.datasets||[]).length,u=e.propagate,p=[];for(n=0;n<d;++n)s=null,(o=(i=t.getDatasetMeta(n)).dataset)&&o._model&&o instanceof r.Line&&(s={visible:t.isDatasetVisible(n),fill:a(o,n,d),chart:t,el:o}),i.$filler=s,p.push(s);for(n=0;n<d;++n)(s=p[n])&&(s.fill=c(p,n,u),s.boundary=l(s),s.mapper=h(s))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var r=t.ctx,s=i.el,a=s._view,l=s._children||[],c=i.mapper,h=a.backgroundColor||n.global.defaultColor;c&&h&&l.length&&(o.canvas.clipArea(r,t.chartArea),function(t,e,i,n,r,o){var s,a,l,c,h,p,f,m=e.length,g=n.spanGaps,v=[],y=[],b=0,_=0;for(t.beginPath(),s=0,a=m+!!o;s<a;++s)h=i(c=e[l=s%m]._view,l,n),p=d(c),f=d(h),p&&f?(b=v.push(c),_=y.push(h)):b&&_&&(g?(p&&v.push(c),f&&y.push(h)):(u(t,v,y,b,_),b=_=0,v=[],y=[]));u(t,v,y,b,_),t.closePath(),t.fillStyle=r,t.fill()}(r,l,c,a,h,s._loop),o.canvas.unclipArea(r))}}}},{25:25,40:40,45:45}],51:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45),s=t(30),a=o.noop;function l(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}n._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,r=n.getDatasetMeta(i);r.hidden=null===r.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return o.isArray(e.datasets)?e.datasets.map(function(e,i){return{text:e.label,fillStyle:o.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:i}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var c=r.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:a,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:a,beforeSetDimensions:a,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:a,beforeBuildLabels:a,buildLabels:function(){var t=this,e=t.options.labels||{},i=o.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter(function(i){return e.filter(i,t.chart.data)})),t.options.reverse&&i.reverse(),t.legendItems=i},afterBuildLabels:a,beforeFit:a,fit:function(){var t=this,e=t.options,i=e.labels,r=e.display,s=t.ctx,a=n.global,c=o.valueOrDefault,h=c(i.fontSize,a.defaultFontSize),d=c(i.fontStyle,a.defaultFontStyle),u=c(i.fontFamily,a.defaultFontFamily),p=o.fontString(h,d,u),f=t.legendHitBoxes=[],m=t.minSize,g=t.isHorizontal();if(g?(m.width=t.maxWidth,m.height=r?10:0):(m.width=r?10:0,m.height=t.maxHeight),r)if(s.font=p,g){var v=t.lineWidths=[0],y=t.legendItems.length?h+i.padding:0;s.textAlign="left",s.textBaseline="top",o.each(t.legendItems,function(e,n){var r=l(i,h)+h/2+s.measureText(e.text).width;v[v.length-1]+r+i.padding>=t.width&&(y+=h+i.padding,v[v.length]=t.left),f[n]={left:0,top:0,width:r,height:h},v[v.length-1]+=r+i.padding}),m.height+=y}else{var b=i.padding,_=t.columnWidths=[],x=i.padding,w=0,k=0,C=h+b;o.each(t.legendItems,function(t,e){var n=l(i,h)+h/2+s.measureText(t.text).width;k+C>m.height&&(x+=w+i.padding,_.push(w),w=0,k=0),w=Math.max(w,n),k+=C,f[e]={left:0,top:0,width:n,height:h}}),x+=w,_.push(w),m.width+=x}t.width=m.width,t.height=m.height},afterFit:a,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,i=e.labels,r=n.global,s=r.elements.line,a=t.width,c=t.lineWidths;if(e.display){var h,d=t.ctx,u=o.valueOrDefault,p=u(i.fontColor,r.defaultFontColor),f=u(i.fontSize,r.defaultFontSize),m=u(i.fontStyle,r.defaultFontStyle),g=u(i.fontFamily,r.defaultFontFamily),v=o.fontString(f,m,g);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=p,d.fillStyle=p,d.font=v;var y=l(i,f),b=t.legendHitBoxes,_=t.isHorizontal();h=_?{x:t.left+(a-c[0])/2,y:t.top+i.padding,line:0}:{x:t.left+i.padding,y:t.top+i.padding,line:0};var x=f+i.padding;o.each(t.legendItems,function(n,l){var p=d.measureText(n.text).width,m=y+f/2+p,g=h.x,v=h.y;_?g+m>=a&&(v=h.y+=x,h.line++,g=h.x=t.left+(a-c[h.line])/2):v+x>t.bottom&&(g=h.x=g+t.columnWidths[h.line]+i.padding,v=h.y=t.top+i.padding,h.line++),function(t,i,n){if(!(isNaN(y)||y<=0)){d.save(),d.fillStyle=u(n.fillStyle,r.defaultColor),d.lineCap=u(n.lineCap,s.borderCapStyle),d.lineDashOffset=u(n.lineDashOffset,s.borderDashOffset),d.lineJoin=u(n.lineJoin,s.borderJoinStyle),d.lineWidth=u(n.lineWidth,s.borderWidth),d.strokeStyle=u(n.strokeStyle,r.defaultColor);var a=0===u(n.lineWidth,s.borderWidth);if(d.setLineDash&&d.setLineDash(u(n.lineDash,s.borderDash)),e.labels&&e.labels.usePointStyle){var l=f*Math.SQRT2/2,c=l/Math.SQRT2,h=t+c,p=i+c;o.canvas.drawPoint(d,n.pointStyle,l,h,p)}else a||d.strokeRect(t,i,y,f),d.fillRect(t,i,y,f);d.restore()}}(g,v,n),b[l].left=g,b[l].top=v,function(t,e,i,n){var r=f/2,o=y+r+t,s=e+r;d.fillText(i.text,o,s),i.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(o,s),d.lineTo(o+n,s),d.stroke())}(g,v,n,p),_?h.x+=m+i.padding:h.y+=x})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,r=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var o=t.x,s=t.y;if(o>=e.left&&o<=e.right&&s>=e.top&&s<=e.bottom)for(var a=e.legendHitBoxes,l=0;l<a.length;++l){var c=a[l];if(o>=c.left&&o<=c.left+c.width&&s>=c.top&&s<=c.top+c.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),r=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),r=!0;break}}}return r}});function h(t,e){var i=new c({ctx:t.ctx,options:e,chart:t});s.configure(t,i,e),s.addBox(t,i),t.legend=i}e.exports={id:"legend",_element:c,beforeInit:function(t){var e=t.options.legend;e&&h(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(o.mergeIf(e,n.global.legend),i?(s.configure(t,i,e),i.options=e):h(t,e)):i&&(s.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,i){"use strict";var n=t(25),r=t(26),o=t(45),s=t(30),a=o.noop;n._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var l=r.extend({initialize:function(t){o.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:a,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:a,beforeSetDimensions:a,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:a,beforeBuildLabels:a,buildLabels:a,afterBuildLabels:a,beforeFit:a,fit:function(){var t=this,e=o.valueOrDefault,i=t.options,r=i.display,s=e(i.fontSize,n.global.defaultFontSize),a=t.minSize,l=o.isArray(i.text)?i.text.length:1,c=o.options.toLineHeight(i.lineHeight,s),h=r?l*c+2*i.padding:0;t.isHorizontal()?(a.width=t.maxWidth,a.height=h):(a.width=h,a.height=t.maxHeight),t.width=a.width,t.height=a.height},afterFit:a,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=o.valueOrDefault,r=t.options,s=n.global;if(r.display){var a,l,c,h=i(r.fontSize,s.defaultFontSize),d=i(r.fontStyle,s.defaultFontStyle),u=i(r.fontFamily,s.defaultFontFamily),p=o.fontString(h,d,u),f=o.options.toLineHeight(r.lineHeight,h),m=f/2+r.padding,g=0,v=t.top,y=t.left,b=t.bottom,_=t.right;e.fillStyle=i(r.fontColor,s.defaultFontColor),e.font=p,t.isHorizontal()?(l=y+(_-y)/2,c=v+m,a=_-y):(l="left"===r.position?y+m:_-m,c=v+(b-v)/2,a=b-v,g=Math.PI*("left"===r.position?-.5:.5)),e.save(),e.translate(l,c),e.rotate(g),e.textAlign="center",e.textBaseline="middle";var x=r.text;if(o.isArray(x))for(var w=0,k=0;k<x.length;++k)e.fillText(x[k],0,w,a),w+=f;else e.fillText(x,0,0,a);e.restore()}}});function c(t,e){var i=new l({ctx:t.ctx,options:e,chart:t});s.configure(t,i,e),s.addBox(t,i),t.titleBlock=i}e.exports={id:"title",_element:l,beforeInit:function(t){var e=t.options.title;e&&c(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(o.mergeIf(e,n.global.title),i?(s.configure(t,i,e),i.options=e):c(t,e)):i&&(s.removeBox(t,i),delete t.titleBlock)}}},{25:25,26:26,30:30,45:45}],53:[function(t,e,i){"use strict";e.exports=function(t){var e=t.Scale.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=i.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=i.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,r=i.isHorizontal();return n.yLabels&&!r?i.getRightValue(n.datasets[e].data[t]):i.ticks[t-i.minIndex]},getPixelForValue:function(t,e){var i,n=this,r=n.options.offset,o=Math.max(n.maxIndex+1-n.minIndex-(r?0:1),1);if(void 0!==t&&null!==t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){var s=n.getLabels();t=i||t;var a=s.indexOf(t);e=-1!==a?a:e}if(n.isHorizontal()){var l=n.width/o,c=l*(e-n.minIndex);return r&&(c+=l/2),n.left+Math.round(c)}var h=n.height/o,d=h*(e-n.minIndex);return r&&(d+=h/2),n.top+Math.round(d)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,i=e.options.offset,n=Math.max(e._ticks.length-(i?0:1),1),r=e.isHorizontal(),o=(r?e.width:e.height)/n;return t-=r?e.left:e.top,i&&(t-=o/2),(t<=0?0:Math.round(t/o))+e.minIndex},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",e,{position:"bottom"})}},{}],54:[function(t,e,i){"use strict";var n=t(25),r=t(45),o=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:o.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,n=i.data.datasets,o=t.isHorizontal();function s(e){return o?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null;var a=e.stacked;if(void 0===a&&r.each(n,function(t,e){if(!a){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&s(n)&&void 0!==n.stack&&(a=!0)}}),e.stacked||a){var l={};r.each(n,function(n,o){var a=i.getDatasetMeta(o),c=[a.type,void 0===e.stacked&&void 0===a.stack?o:"",a.stack].join(".");void 0===l[c]&&(l[c]={positiveValues:[],negativeValues:[]});var h=l[c].positiveValues,d=l[c].negativeValues;i.isDatasetVisible(o)&&s(a)&&r.each(n.data,function(i,n){var r=+t.getRightValue(i);isNaN(r)||a.data[n].hidden||(h[n]=h[n]||0,d[n]=d[n]||0,e.relativePoints?h[n]=100:r<0?d[n]+=r:h[n]+=r)})}),r.each(l,function(e){var i=e.positiveValues.concat(e.negativeValues),n=r.min(i),o=r.max(i);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?o:Math.max(t.max,o)})}else r.each(n,function(e,n){var o=i.getDatasetMeta(n);i.isDatasetVisible(n)&&s(o)&&r.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||o.data[i].hidden||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n))})});t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var i=r.valueOrDefault(e.fontSize,n.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),r=e.end-i;return e.isHorizontal()?e.left+e.width/r*(n-i):e.bottom-e.height/r*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,r=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*r},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],55:[function(t,e,i){"use strict";var n=t(45);e.exports=function(t){var e=n.noop;t.LinearScaleBase=t.Scale.extend({getRightValue:function(e){return"string"==typeof e?+e:t.Scale.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=n.sign(t.min),r=n.sign(t.max);i<0&&r<0?t.max=0:i>0&&r>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,s=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),o!==s&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),r={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,stepSize:n.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=function(t,e){var i,r=[];if(t.stepSize&&t.stepSize>0)i=t.stepSize;else{var o=n.niceNum(e.max-e.min,!1);i=n.niceNum(o/(t.maxTicks-1),!0)}var s=Math.floor(e.min/i)*i,a=Math.ceil(e.max/i)*i;t.min&&t.max&&t.stepSize&&n.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(s=t.min,a=t.max);var l=(a-s)/i;l=n.almostEquals(l,Math.round(l),i/1e3)?Math.round(l):Math.ceil(l);var c=1;i<1&&(c=Math.pow(10,i.toString().length-2),s=Math.round(s*c)/c,a=Math.round(a*c)/c),r.push(void 0!==t.min?t.min:s);for(var h=1;h<l;++h)r.push(Math.round((s+h*i)*c)/c);return r.push(void 0!==t.max?t.max:a),r}(r,t);t.handleDirectionalChanges(),t.max=n.max(o),t.min=n.min(o),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(e)}})}},{45:45}],56:[function(t,e,i){"use strict";var n=t(45),r=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:r.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){var t=this,e=t.options,i=t.chart,r=i.data.datasets,o=t.isHorizontal();function s(e){return o?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var a=e.stacked;if(void 0===a&&n.each(r,function(t,e){if(!a){var n=i.getDatasetMeta(e);i.isDatasetVisible(e)&&s(n)&&void 0!==n.stack&&(a=!0)}}),e.stacked||a){var l={};n.each(r,function(r,o){var a=i.getDatasetMeta(o),c=[a.type,void 0===e.stacked&&void 0===a.stack?o:"",a.stack].join(".");i.isDatasetVisible(o)&&s(a)&&(void 0===l[c]&&(l[c]=[]),n.each(r.data,function(e,i){var n=l[c],r=+t.getRightValue(e);isNaN(r)||a.data[i].hidden||r<0||(n[i]=n[i]||0,n[i]+=r)}))}),n.each(l,function(e){if(e.length>0){var i=n.min(e),r=n.max(e);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?r:Math.max(t.max,r)}})}else n.each(r,function(e,r){var o=i.getDatasetMeta(r);i.isDatasetVisible(r)&&s(o)&&n.each(e.data,function(e,i){var n=+t.getRightValue(e);isNaN(n)||o.data[i].hidden||n<0||(null===t.min?t.min=n:n<t.min&&(t.min=n),null===t.max?t.max=n:n>t.max&&(t.max=n),0!==n&&(null===t.minNotZero||n<t.minNotZero)&&(t.minNotZero=n))})});this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks,i=n.valueOrDefault;t.min=i(e.min,t.min),t.max=i(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(n.log10(t.min))-1),t.max=Math.pow(10,Math.floor(n.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(n.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(n.log10(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(n.log10(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,i=!t.isHorizontal(),r={min:e.min,max:e.max},o=t.ticks=function(t,e){var i,r,o=[],s=n.valueOrDefault,a=s(t.min,Math.pow(10,Math.floor(n.log10(e.min)))),l=Math.floor(n.log10(e.max)),c=Math.ceil(e.max/Math.pow(10,l));0===a?(i=Math.floor(n.log10(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,i)),o.push(a),a=r*Math.pow(10,i)):(i=Math.floor(n.log10(a)),r=Math.floor(a/Math.pow(10,i)));var h=i<0?Math.pow(10,Math.abs(i)):1;do{o.push(a),10==++r&&(r=1,h=++i>=0?1:h),a=Math.round(r*Math.pow(10,i)*h)/h}while(i<l||i===l&&r<c);var d=s(t.max,a);return o.push(d),o}(r,t);t.max=n.max(o),t.min=n.min(o),e.reverse?(i=!i,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i&&o.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(n.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(e){var i,r,o,s,a,l=this,c=l.options.ticks.reverse,h=n.log10,d=l._getFirstTickValue(l.minNotZero),u=0;return e=+l.getRightValue(e),c?(o=l.end,s=l.start,a=-1):(o=l.start,s=l.end,a=1),l.isHorizontal()?(i=l.width,r=c?l.right:l.left):(i=l.height,a*=-1,r=c?l.top:l.bottom),e!==o&&(0===o&&(i-=u=n.getValueOrDefault(l.options.ticks.fontSize,t.defaults.global.defaultFontSize),o=d),0!==e&&(u+=i/(h(s)-h(o))*(h(e)-h(o))),r+=a*u),r},getValueForPixel:function(e){var i,r,o,s,a=this,l=a.options.ticks.reverse,c=n.log10,h=a._getFirstTickValue(a.minNotZero);if(l?(r=a.end,o=a.start):(r=a.start,o=a.end),a.isHorizontal()?(i=a.width,s=l?a.right-e:e-a.left):(i=a.height,s=l?e-a.top:a.bottom-e),s!==r){if(0===r){var d=n.getValueOrDefault(a.options.ticks.fontSize,t.defaults.global.defaultFontSize);s-=d,i-=d,r=h}s*=c(o)-c(r),s/=i,s=Math.pow(10,c(r)+s)}return s}});t.scaleService.registerScaleType("logarithmic",i,e)}},{34:34,45:45}],57:[function(t,e,i){"use strict";var n=t(25),r=t(45),o=t(34);e.exports=function(t){var e=n.global,i={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:o.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function s(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function a(t){var i=t.options.pointLabels,n=r.valueOrDefault(i.fontSize,e.defaultFontSize),o=r.valueOrDefault(i.fontStyle,e.defaultFontStyle),s=r.valueOrDefault(i.fontFamily,e.defaultFontFamily);return{size:n,style:o,family:s,font:r.fontString(n,o,s)}}function l(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:t<n||t>r?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function c(t){return 0===t||180===t?"center":t<180?"left":"right"}function h(t,e,i,n){if(r.isArray(e))for(var o=i.y,s=1.5*n,a=0;a<e.length;++a)t.fillText(e[a],i.x,o),o+=s;else t.fillText(e,i.x,i.y)}function d(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function u(t){return r.isNumber(t)?t:0}var p=t.LinearScaleBase.extend({setDimensions:function(){var t=this,i=t.options,n=i.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var o=r.min([t.height,t.width]),s=r.valueOrDefault(n.fontSize,e.defaultFontSize);t.drawingArea=i.display?o/2-(s/2+n.backdropPaddingY):o/2},determineDataLimits:function(){var t=this,e=t.chart,i=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;r.each(e.data.datasets,function(o,s){if(e.isDatasetVisible(s)){var a=e.getDatasetMeta(s);r.each(o.data,function(e,r){var o=+t.getRightValue(e);isNaN(o)||a.data[r].hidden||(i=Math.min(o,i),n=Math.max(o,n))})}}),t.min=i===Number.POSITIVE_INFINITY?0:i,t.max=n===Number.NEGATIVE_INFINITY?0:n,t.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,i=r.valueOrDefault(t.fontSize,e.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*i)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,i,n,o=a(t),c=Math.min(t.height/2,t.width/2),h={r:t.width,l:0,t:t.height,b:0},d={};t.ctx.font=o.font,t._pointLabelSizes=[];var u,p,f,m=s(t);for(e=0;e<m;e++){n=t.getPointPosition(e,c),u=t.ctx,p=o.size,f=t.pointLabels[e]||"",i=r.isArray(f)?{w:r.longestText(u,u.font,f),h:f.length*p+1.5*(f.length-1)*p}:{w:u.measureText(f).width,h:p},t._pointLabelSizes[e]=i;var g=t.getIndexAngle(e),v=r.toDegrees(g)%360,y=l(v,n.x,i.w,0,180),b=l(v,n.y,i.h,90,270);y.start<h.l&&(h.l=y.start,d.l=g),y.end>h.r&&(h.r=y.end,d.r=g),b.start<h.t&&(h.t=b.start,d.t=g),b.end>h.b&&(h.b=b.end,d.b=g)}t.setReductions(c,h,d)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,i){var n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-this.height,0)/Math.cos(i.b);n=u(n),r=u(r),o=u(o),s=u(s),this.drawingArea=Math.min(Math.round(t-(n+r)/2),Math.round(t-(o+s)/2)),this.setCenterPoint(n,r,o,s)},setCenterPoint:function(t,e,i,n){var r=this,o=r.width-e-r.drawingArea,s=t+r.drawingArea,a=i+r.drawingArea,l=r.height-n-r.drawingArea;r.xCenter=Math.round((s+o)/2+r.left),r.yCenter=Math.round((a+l)/2+r.top)},getIndexAngle:function(t){return t*(2*Math.PI/s(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+this.xCenter,y:Math.round(Math.sin(i)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0)},draw:function(){var t=this,i=t.options,n=i.gridLines,o=i.ticks,l=r.valueOrDefault;if(i.display){var u=t.ctx,p=this.getIndexAngle(0),f=l(o.fontSize,e.defaultFontSize),m=l(o.fontStyle,e.defaultFontStyle),g=l(o.fontFamily,e.defaultFontFamily),v=r.fontString(f,m,g);r.each(t.ticks,function(i,a){if(a>0||o.reverse){var c=t.getDistanceFromCenterForValue(t.ticksAsNumbers[a]);if(n.display&&0!==a&&function(t,e,i,n){var o=t.ctx;if(o.strokeStyle=r.valueAtIndexOrDefault(e.color,n-1),o.lineWidth=r.valueAtIndexOrDefault(e.lineWidth,n-1),t.options.gridLines.circular)o.beginPath(),o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),o.closePath(),o.stroke();else{var a=s(t);if(0===a)return;o.beginPath();var l=t.getPointPosition(0,i);o.moveTo(l.x,l.y);for(var c=1;c<a;c++)l=t.getPointPosition(c,i),o.lineTo(l.x,l.y);o.closePath(),o.stroke()}}(t,n,c,a),o.display){var h=l(o.fontColor,e.defaultFontColor);if(u.font=v,u.save(),u.translate(t.xCenter,t.yCenter),u.rotate(p),o.showLabelBackdrop){var d=u.measureText(i).width;u.fillStyle=o.backdropColor,u.fillRect(-d/2-o.backdropPaddingX,-c-f/2-o.backdropPaddingY,d+2*o.backdropPaddingX,f+2*o.backdropPaddingY)}u.textAlign="center",u.textBaseline="middle",u.fillStyle=h,u.fillText(i,0,-c),u.restore()}}}),(i.angleLines.display||i.pointLabels.display)&&function(t){var i=t.ctx,n=t.options,o=n.angleLines,l=n.pointLabels;i.lineWidth=o.lineWidth,i.strokeStyle=o.color;var u=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),p=a(t);i.textBaseline="top";for(var f=s(t)-1;f>=0;f--){if(o.display){var m=t.getPointPosition(f,u);i.beginPath(),i.moveTo(t.xCenter,t.yCenter),i.lineTo(m.x,m.y),i.stroke(),i.closePath()}if(l.display){var g=t.getPointPosition(f,u+5),v=r.valueAtIndexOrDefault(l.fontColor,f,e.defaultFontColor);i.font=p.font,i.fillStyle=v;var y=t.getIndexAngle(f),b=r.toDegrees(y);i.textAlign=c(b),d(b,t._pointLabelSizes[f],g),h(i,t.pointLabels[f]||"",g,p.size)}}}(t)}}});t.scaleService.registerScaleType("radialLinear",p,i)}},{25:25,34:34,45:45}],58:[function(t,e,i){"use strict";var n=t(6);n="function"==typeof n?n:window.moment;var r=t(25),o=t(45),s=Number.MIN_SAFE_INTEGER||-9007199254740991,a=Number.MAX_SAFE_INTEGER||9007199254740991,l={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},c=Object.keys(l);function h(t,e){return t-e}function d(t){var e,i,n,r={},o=[];for(e=0,i=t.length;e<i;++e)r[n=t[e]]||(r[n]=!0,o.push(n));return o}function u(t,e,i,n){var r=function(t,e,i){for(var n,r,o,s=0,a=t.length-1;s>=0&&s<=a;){if(r=t[(n=s+a>>1)-1]||null,o=t[n],!r)return{lo:null,hi:o};if(o[e]<i)s=n+1;else{if(!(r[e]>i))return{lo:r,hi:o};a=n-1}}return{lo:o,hi:null}}(t,e,i),o=r.lo?r.hi?r.lo:t[t.length-2]:t[0],s=r.lo?r.hi?r.hi:t[t.length-1]:t[1],a=s[e]-o[e],l=a?(i-o[e])/a:0,c=(s[n]-o[n])*l;return o[n]+c}function p(t,e){var i=e.parser,r=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof r?n(t,r):(t instanceof n||(t=n(t)),t.isValid()?t:"function"==typeof r?r(t):t)}function f(t,e){if(o.isNullOrUndef(t))return null;var i=e.options.time,n=p(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function m(t){for(var e=c.indexOf(t)+1,i=c.length;e<i;++e)if(l[c[e]].common)return c[e]}function g(t,e,i,r){var s,h=r.time,d=h.unit||function(t,e,i,n){var r,o,s,h=c.length;for(r=c.indexOf(t);r<h-1;++r)if(s=(o=l[c[r]]).steps?o.steps[o.steps.length-1]:a,o.common&&Math.ceil((i-e)/(s*o.size))<=n)return c[r];return c[h-1]}(h.minUnit,t,e,i),u=m(d),p=o.valueOrDefault(h.stepSize,h.unitStepSize),f="week"===d&&h.isoWeekday,g=r.ticks.major.enabled,v=l[d],y=n(t),b=n(e),_=[];for(p||(p=function(t,e,i,n){var r,o,s,a=e-t,c=l[i],h=c.size,d=c.steps;if(!d)return Math.ceil(a/(n*h));for(r=0,o=d.length;r<o&&(s=d[r],!(Math.ceil(a/(h*s))<=n));++r);return s}(t,e,d,i)),f&&(y=y.isoWeekday(f),b=b.isoWeekday(f)),y=y.startOf(f?"day":d),(b=b.startOf(f?"day":d))<e&&b.add(1,d),s=n(y),g&&u&&!f&&!h.round&&(s.startOf(u),s.add(~~((y-s)/(v.size*p))*p,d));s<b;s.add(p,d))_.push(+s);return _.push(+s),_}e.exports=function(t){var e=t.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),t.Scale.prototype.initialize.call(this)},update:function(){var e=this.options;return e.time&&e.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),t.Scale.prototype.update.apply(this,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),t.Scale.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var t,e,i,r,l,c,u=this,p=u.chart,m=u.options.time,g=m.unit||"day",v=a,y=s,b=[],_=[],x=[];for(t=0,i=p.data.labels.length;t<i;++t)x.push(f(p.data.labels[t],u));for(t=0,i=(p.data.datasets||[]).length;t<i;++t)if(p.isDatasetVisible(t))if(l=p.data.datasets[t].data,o.isObject(l[0]))for(_[t]=[],e=0,r=l.length;e<r;++e)c=f(l[e],u),b.push(c),_[t][e]=c;else b.push.apply(b,x),_[t]=x.slice(0);else _[t]=[];x.length&&(x=d(x).sort(h),v=Math.min(v,x[0]),y=Math.max(y,x[x.length-1])),b.length&&(b=d(b).sort(h),v=Math.min(v,b[0]),y=Math.max(y,b[b.length-1])),v=f(m.min,u)||v,y=f(m.max,u)||y,v=v===a?+n().startOf(g):v,y=y===s?+n().endOf(g)+1:y,u.min=Math.min(v,y),u.max=Math.max(v+1,y),u._horizontal=u.isHorizontal(),u._table=[],u._timestamps={data:b,datasets:_,labels:x}},buildTicks:function(){var t,e,i,r=this,o=r.min,s=r.max,a=r.options,h=a.time,d=[],v=[];switch(a.ticks.source){case"data":d=r._timestamps.data;break;case"labels":d=r._timestamps.labels;break;case"auto":default:d=g(o,s,r.getLabelCapacity(o),a)}for("ticks"===a.bounds&&d.length&&(o=d[0],s=d[d.length-1]),o=f(h.min,r)||o,s=f(h.max,r)||s,t=0,e=d.length;t<e;++t)(i=d[t])>=o&&i<=s&&v.push(i);return r.min=o,r.max=s,r._unit=h.unit||function(t,e,i,r){var o,s,a=n.duration(n(r).diff(n(i)));for(o=c.length-1;o>=c.indexOf(e);o--)if(s=c[o],l[s].common&&a.as(s)>=t.length)return s;return c[e?c.indexOf(e):0]}(v,h.minUnit,r.min,r.max),r._majorUnit=m(r._unit),r._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var r,o,s,a,l,c=[],h=[e];for(r=0,o=t.length;r<o;++r)(a=t[r])>e&&a<i&&h.push(a);for(h.push(i),r=0,o=h.length;r<o;++r)l=h[r+1],s=h[r-1],a=h[r],void 0!==s&&void 0!==l&&Math.round((l+s)/2)===a||c.push({time:a,pos:r/(o-1)});return c}(r._timestamps.data,o,s,a.distribution),r._offsets=function(t,e,i,n,r){var o,s,a=0,l=0;return r.offset&&e.length&&(r.time.min||(o=e.length>1?e[1]:n,s=e[0],a=(u(t,"time",o,"pos")-u(t,"time",s,"pos"))/2),r.time.max||(o=e[e.length-1],s=e.length>1?e[e.length-2]:i,l=(u(t,"time",o,"pos")-u(t,"time",s,"pos"))/2)),{left:a,right:l}}(r._table,v,o,s,a),r._labelFormat=function(t,e){var i,n,r,o=t.length;for(i=0;i<o;i++){if(0!==(n=p(t[i],e)).millisecond())return"MMM D, YYYY h:mm:ss.SSS a";0===n.second()&&0===n.minute()&&0===n.hour()||(r=!0)}return r?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}(r._timestamps.data,h),function(t,e){var i,r,o,s,a=[];for(i=0,r=t.length;i<r;++i)o=t[i],s=!!e&&o===+n(o).startOf(e),a.push({value:o,major:s});return a}(v,r._majorUnit)},getLabelForIndex:function(t,e){var i=this.chart.data,n=this.options.time,r=i.labels&&t<i.labels.length?i.labels[t]:"",s=i.datasets[e].data[t];return o.isObject(s)&&(r=this.getRightValue(s)),n.tooltipFormat?p(r,n).format(n.tooltipFormat):"string"==typeof r?r:p(r,n).format(this._labelFormat)},tickFormatFunction:function(t,e,i,n){var r=this.options,s=t.valueOf(),a=r.time.displayFormats,l=a[this._unit],c=this._majorUnit,h=a[c],d=t.clone().startOf(c).valueOf(),u=r.ticks.major,p=u.enabled&&c&&h&&s===d,f=t.format(n||(p?h:l)),m=p?u:r.ticks.minor,g=o.valueOrDefault(m.callback,m.userCallback);return g?g(f,e,i):f},convertTicksToLabels:function(t){var e,i,r=[];for(e=0,i=t.length;e<i;++e)r.push(this.tickFormatFunction(n(t[e].value),e,t));return r},getPixelForOffset:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,r=u(e._table,"time",t,"pos");return n+i*(e._offsets.left+r)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=f(t,this)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,i=e._horizontal?e.width:e.height,r=e._horizontal?e.left:e.top,o=(i?(t-r)/i:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,s=u(e._table,"pos",o,"time");return n(s)},getLabelWidth:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=o.toRadians(e.maxRotation),s=Math.cos(n),a=Math.sin(n);return i*s+o.valueOrDefault(e.fontSize,r.global.defaultFontSize)*a},getLabelCapacity:function(t){var e=this,i=e.options.time.displayFormats.millisecond,r=e.tickFormatFunction(n(t),0,[],i),o=e.getLabelWidth(r),s=e.isHorizontal()?e.width:e.height,a=Math.floor(s/o);return a>0?a:1}});t.scaleService.registerScaleType("time",e,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{25:25,45:45,6:6}]},{},[7])(7)}),Chart.elements.Rectangle.prototype.draw=function(){var t,e,i,n,r,o,s,a=this._chart.ctx,l=this._view,c=l.borderWidth,h=this._chart.options.barRadius?this._chart.options.barRadius:0;if(l.horizontal?(t=l.base,e=l.x,i=l.y-l.height/2,n=l.y+l.height/2,r=e>t?1:-1,o=1,s=l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,i=l.y>2*h?l.y-h:l.y,r=1,o=(n=l.base)>i?1:-1,s=l.borderSkipped||"bottom"),c){var d=Math.min(Math.abs(t-e),Math.abs(i-n)),u=(c=c>d?d:c)/2,p=t+("left"!==s?u*r:0),f=e+("right"!==s?-u*r:0),m=i+("top"!==s?u*o:0),g=n+("bottom"!==s?-u*o:0);p!==f&&(i=m,n=g),m!==g&&(t=p,e=f)}a.beginPath(),a.fillStyle=l.backgroundColor,a.strokeStyle=l.borderColor,a.lineWidth=c;var v=[[t,n],[t,i],[e,i],[e,n]],b=["bottom","left","top","right"].indexOf(s,0);function _(t){return v[(b+t)%4]}-1===b&&(b=0);var w=_(0);a.moveTo(w[0],w[1]);for(var k=1;k<4;k++){var C;w=_(k),nextCornerId=k+1,4==nextCornerId&&(nextCornerId=0),nextCorner=_(nextCornerId),width=v[2][0]-v[1][0],height=v[0][1]-v[1][1],x=v[1][0],y=v[1][1],(C=h)>height/2&&(C=height/2),C>width/2&&(C=width/2),a.moveTo(x+C,y),a.lineTo(x+width-C,y),a.quadraticCurveTo(x+width,y,x+width,y+C),a.lineTo(x+width,y+height-C),a.quadraticCurveTo(x+width,y+height,x+width-C,y+height),a.lineTo(x+C,y+height),a.quadraticCurveTo(x,y+height,x,y+height-C),a.lineTo(x,y+C),a.quadraticCurveTo(x,y,x+C,y)}a.fill(),c&&a.stroke()},function(t){"use strict";t.sessionTimeout=function(e){function i(){clearTimeout(r),(s.countdownMessage||s.countdownBar)&&n("session",!0),"function"==typeof s.onStart&&s.onStart(s),s.keepAlive&&(d||(t.ajax({type:s.ajaxType,url:s.keepAliveUrl,data:s.ajaxData}),d=!0,setTimeout(function(){d=!1},s.keepAliveInterval))),r=setTimeout(function(){"function"!=typeof s.onWarn?t("#session-timeout-dialog").modal("show"):s.onWarn(s),clearTimeout(r),t("#session-timeout-dialog").hasClass("in")||!s.countdownMessage&&!s.countdownBar||n("dialog",!0),r=setTimeout(function(){"function"!=typeof s.onRedir?window.location=s.redirUrl:s.onRedir(s)},s.redirAfter-s.warnAfter)},s.warnAfter)}function n(e,i){clearTimeout(a.timer),"dialog"===e&&i?a.timeLeft=Math.floor((s.redirAfter-s.warnAfter)/1e3):"session"===e&&i&&(a.timeLeft=Math.floor(s.redirAfter/1e3)),s.countdownBar&&"dialog"===e?a.percentLeft=Math.floor(a.timeLeft/((s.redirAfter-s.warnAfter)/1e3)*100):s.countdownBar&&"session"===e&&(a.percentLeft=Math.floor(a.timeLeft/(s.redirAfter/1e3)*100));var r=t(".countdown-holder"),o=a.timeLeft>=0?a.timeLeft:0;if(s.countdownSmart){var l=Math.floor(o/60),c=o%60,h=l>0?l+"m":"";h.length>0&&(h+=" "),h+=c+"s",r.text(h)}else r.text(o+"s");s.countdownBar&&t(".countdown-bar").css("width",a.percentLeft+"%"),a.timeLeft=a.timeLeft-1,a.timer=setTimeout(function(){n(e)},1e3)}var r,o={title:"Your Session is About to Expire!",message:"Your session is about to expire.",logoutButton:"Logout",keepAliveButton:"Stay Connected",keepAliveUrl:"/keep-alive",ajaxType:"POST",ajaxData:"",redirUrl:"/timed-out",logoutUrl:"/log-out",warnAfter:9e5,redirAfter:12e5,keepAliveInterval:5e3,keepAlive:!0,ignoreUserActivity:!1,onStart:!1,onWarn:!1,onRedir:!1,countdownMessage:!1,countdownBar:!1,countdownSmart:!1},s=o,a={};if(e&&(s=t.extend(o,e)),s.warnAfter>=s.redirAfter)return console.error('Bootstrap-session-timeout plugin is miss-configured. Option "redirAfter" must be equal or greater than "warnAfter".'),!1;if("function"!=typeof s.onWarn){var l=s.countdownMessage?"<p>"+s.countdownMessage.replace(/{timer}/g,'<span class="countdown-holder"></span>')+"</p>":"",c=s.countdownBar?'<div class="progress"> <div class="progress-bar progress-bar-striped countdown-bar active" role="progressbar" style="min-width: 15px; width: 100%;"> <span class="countdown-holder"></span> </div> </div>':"";t("body").append('<div class="modal fade" id="session-timeout-dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">'+s.title+'</h4> </div> <div class="modal-body"> <p>'+s.message+"</p> "+l+" "+c+' </div> <div class="modal-footer"> <button id="session-timeout-dialog-logout" type="button" class="btn btn-default">'+s.logoutButton+'</button> <button id="session-timeout-dialog-keepalive" type="button" class="btn btn-primary" data-dismiss="modal">'+s.keepAliveButton+"</button> </div> </div> </div> </div>"),t("#session-timeout-dialog-logout").on("click",function(){window.location=s.logoutUrl}),t("#session-timeout-dialog").on("hide.bs.modal",function(){i()})}if(!s.ignoreUserActivity){var h=[-1,-1];t(document).on("keyup mouseup mousemove touchend touchmove",function(e){if("mousemove"===e.type){if(e.clientX===h[0]&&e.clientY===h[1])return;h[0]=e.clientX,h[1]=e.clientY}i(),t("#session-timeout-dialog").length>0&&t("#session-timeout-dialog").data("bs.modal")&&t("#session-timeout-dialog").data("bs.modal").isShown&&(t("#session-timeout-dialog").modal("hide"),t("body").removeClass("modal-open"),t("div.modal-backdrop").remove())})}var d=!1;i()}}(jQuery),function(t){t.idleTimer=function(e,i){var n;"object"==typeof e?(n=e,e=null):"number"==typeof e&&(n={timeout:e},e=null),i=i||document,n=t.extend({idle:!1,timeout:3e4,events:"mousemove keydown wheel DOMMouseScroll mousewheel mousedown touchstart touchmove MSPointerDown MSPointerMove"},n);var r=t(i),o=r.data("idleTimerObj")||{},s=function(e){var n=t.data(i,"idleTimerObj")||{};n.idle=!n.idle,n.olddate=+new Date;var r=t.Event((n.idle?"idle":"active")+".idleTimer");t(i).trigger(r,[i,t.extend({},n),e])},a=function(e){var n=t.data(i,"idleTimerObj")||{};if(("storage"!==e.type||e.originalEvent.key===n.timerSyncId)&&null==n.remaining){if("mousemove"===e.type){if(e.pageX===n.pageX&&e.pageY===n.pageY)return;if(void 0===e.pageX&&void 0===e.pageY)return;if(200>+new Date-n.olddate)return}clearTimeout(n.tId),n.idle&&s(e),n.lastActive=+new Date,n.pageX=e.pageX,n.pageY=e.pageY,"storage"!==e.type&&n.timerSyncId&&"undefined"!=typeof localStorage&&localStorage.setItem(n.timerSyncId,n.lastActive),n.tId=setTimeout(s,n.timeout)}},l=function(){var e=t.data(i,"idleTimerObj")||{};e.idle=e.idleBackup,e.olddate=+new Date,e.lastActive=e.olddate,e.remaining=null,clearTimeout(e.tId),e.idle||(e.tId=setTimeout(s,e.timeout))};if(null===e&&void 0!==o.idle)return l(),r;if(null===e);else{if(null!==e&&void 0===o.idle)return!1;if("destroy"===e)return function(){var e=t.data(i,"idleTimerObj")||{};clearTimeout(e.tId),r.removeData("idleTimerObj"),r.off("._idleTimer")}(),r;if("pause"===e)return function(){var e=t.data(i,"idleTimerObj")||{};null==e.remaining&&(e.remaining=e.timeout-(+new Date-e.olddate),clearTimeout(e.tId))}(),r;if("resume"===e)return function(){var e=t.data(i,"idleTimerObj")||{};null!=e.remaining&&(e.idle||(e.tId=setTimeout(s,e.remaining)),e.remaining=null)}(),r;if("reset"===e)return l(),r;if("getRemainingTime"===e)return function(){var e=t.data(i,"idleTimerObj")||{};if(e.idle)return 0;if(null!=e.remaining)return e.remaining;var n=e.timeout-(+new Date-e.lastActive);return 0>n&&(n=0),n}();if("getElapsedTime"===e)return+new Date-o.olddate;if("getLastActiveTime"===e)return o.lastActive;if("isIdle"===e)return o.idle}return r.on(t.trim((n.events+" ").split(" ").join("._idleTimer ")),function(t){a(t)}),n.timerSyncId&&t(window).bind("storage",a),(o=t.extend({},{olddate:+new Date,lastActive:+new Date,idle:n.idle,idleBackup:n.idle,timeout:n.timeout,remaining:null,timerSyncId:n.timerSyncId,tId:null,pageX:null,pageY:null})).idle||(o.tId=setTimeout(s,o.timeout)),t.data(i,"idleTimerObj",o),r},t.fn.idleTimer=function(e){return this[0]?t.idleTimer(e,this[0]):this}}(jQuery),function(){"use strict";var t=0,e={};function i(n){if(!n)throw new Error("No options passed to Waypoint constructor");if(!n.element)throw new Error("No element option passed to Waypoint constructor");if(!n.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+t,this.options=i.Adapter.extend({},i.defaults,n),this.element=this.options.element,this.adapter=new i.Adapter(this.element),this.callback=n.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=i.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=i.Context.findOrCreateByElement(this.options.context),i.offsetAliases[this.options.offset]&&(this.options.offset=i.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),e[this.key]=this,t+=1}i.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},i.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},i.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete e[this.key]},i.prototype.disable=function(){return this.enabled=!1,this},i.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},i.prototype.next=function(){return this.group.next(this)},i.prototype.previous=function(){return this.group.previous(this)},i.invokeAll=function(t){var i=[];for(var n in e)i.push(e[n]);for(var r=0,o=i.length;r<o;r++)i[r][t]()},i.destroyAll=function(){i.invokeAll("destroy")},i.disableAll=function(){i.invokeAll("disable")},i.enableAll=function(){for(var t in i.Context.refreshAll(),e)e[t].enabled=!0;return this},i.refreshAll=function(){i.Context.refreshAll()},i.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},i.viewportWidth=function(){return document.documentElement.clientWidth},i.adapters=[],i.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},i.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=i}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}var e=0,i={},n=window.Waypoint,r=window.onload;function o(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+e,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,i[t.waypointContextKey]=this,e+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new o(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}o.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},o.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),n=this.element==this.element.window;t&&e&&!n&&(this.adapter.off(".waypoints"),delete i[this.key])},o.prototype.createThrottledResizeHandler=function(){var t=this;function e(){t.handleResize(),t.didResize=!1}this.adapter.on("resize.waypoints",function(){t.didResize||(t.didResize=!0,n.requestAnimationFrame(e))})},o.prototype.createThrottledScrollHandler=function(){var t=this;function e(){t.handleScroll(),t.didScroll=!1}this.adapter.on("scroll.waypoints",function(){t.didScroll&&!n.isTouch||(t.didScroll=!0,n.requestAnimationFrame(e))})},o.prototype.handleResize=function(){n.Context.refreshAll()},o.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var n=e[i],r=n.newScroll>n.oldScroll?n.forward:n.backward;for(var o in this.waypoints[i]){var s=this.waypoints[i][o];if(null!==s.triggerPoint){var a=n.oldScroll<s.triggerPoint,l=n.newScroll>=s.triggerPoint;(a&&l||!a&&!l)&&(s.queueTrigger(r),t[s.group.id]=s.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},o.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},o.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},o.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},o.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var n=0,r=t.length;n<r;n++)t[n].destroy()},o.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),r={};for(var o in this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var s=t[o];for(var a in this.waypoints[o]){var l,c,h,d,u=this.waypoints[o][a],p=u.options.offset,f=u.triggerPoint,m=0,g=null==f;u.element!==u.element.window&&(m=u.adapter.offset()[s.offsetProp]),"function"==typeof p?p=p.apply(u):"string"==typeof p&&(p=parseFloat(p),u.options.offset.indexOf("%")>-1&&(p=Math.ceil(s.contextDimension*p/100))),l=s.contextScroll-s.contextOffset,u.triggerPoint=Math.floor(m+l-p),c=f<s.oldScroll,h=u.triggerPoint>=s.oldScroll,d=!c&&!h,!g&&(c&&h)?(u.queueTrigger(s.backward),r[u.group.id]=u.group):!g&&d?(u.queueTrigger(s.forward),r[u.group.id]=u.group):g&&s.oldScroll>=u.triggerPoint&&(u.queueTrigger(s.forward),r[u.group.id]=u.group)}}return n.requestAnimationFrame(function(){for(var t in r)r[t].flushTriggers()}),this},o.findOrCreateByElement=function(t){return o.findByElement(t)||new o(t)},o.refreshAll=function(){for(var t in i)i[t].refresh()},o.findByElement=function(t){return i[t.waypointContextKey]},window.onload=function(){r&&r(),o.refreshAll()},n.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},n.Context=o}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}var i={vertical:{},horizontal:{}},n=window.Waypoint;function r(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),i[this.axis][this.name]=this}r.prototype.add=function(t){this.waypoints.push(t)},r.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},r.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var n=this.triggerQueues[i],r="up"===i||"left"===i;n.sort(r?e:t);for(var o=0,s=n.length;o<s;o+=1){var a=n[o];(a.options.continuous||o===n.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},r.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i===this.waypoints.length-1?null:this.waypoints[i+1]},r.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},r.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},r.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},r.prototype.first=function(){return this.waypoints[0]},r.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},r.findOrCreate=function(t){return i[t.axis][t.name]||new r(t)},n.Group=r}(),function(){"use strict";var t=window.jQuery,e=window.Waypoint;function i(e){this.$element=t(e)}t.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,e){i.prototype[e]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[e].apply(this.$element,t)}}),t.each(["extend","inArray","isEmptyObject"],function(e,n){i[n]=t[n]}),e.adapters.push({name:"jquery",Adapter:i}),e.Adapter=i}(),function(){"use strict";var t=window.Waypoint;function e(e){return function(){var i=[],n=arguments[0];return e.isFunction(arguments[0])&&((n=e.extend({},arguments[1])).handler=arguments[0]),this.each(function(){var r=e.extend({},n,{element:this});"string"==typeof r.context&&(r.context=e(this).closest(r.context)[0]),i.push(new t(r))}),i}}window.jQuery&&(window.jQuery.fn.waypoint=e(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=e(window.Zepto))}(),function(t){"use strict";t.fn.counterUp=function(e){var i=t.extend({time:400,delay:10},e);return this.each(function(){var e=t(this),n=i;e.waypoint(function(){var t=n.time/n.delay,i=e.attr("data-value"),r=[i],o=/[0-9]+,[0-9]+/.test(i);i=i.replace(/,/g,"");for(var s=(/^[0-9]+$/.test(i),/^[0-9]+\.[0-9]+$/.test(i)),a=s?(i.split(".")[1]||[]).length:0,l=t;l>=1;l--){var c=parseInt(i/t*l);if(s&&(c=parseFloat(i/t*l).toFixed(a)),o)for(;/(\d+)(\d{3})/.test(c.toString());)c=c.toString().replace(/(\d+)(\d{3})/,"$1,$2");r.unshift(c)}e.data("counterup-nums",r),e.text("0");e.data("counterup-func",function(){e.data("counterup-nums")&&(e.text(e.data("counterup-nums").shift()),e.data("counterup-nums").length?setTimeout(e.data("counterup-func"),n.delay):(e.data("counterup-nums"),e.data("counterup-nums",null),e.data("counterup-func",null)))}),setTimeout(e.data("counterup-func"),n.delay)},{offset:"100%",triggerOnce:!0})})}}(jQuery),function(t){function e(){for(var t=0;t<w.length;t++)w[t][0](w[t][1]);w=[],m=!1}function i(t,i){w.push([t,i]),m||(m=!0,x(e,0))}function n(t){var e=(i=t.owner).state_,i=i.data_,n=t[e];if(t=t.then,"function"==typeof n){e=y;try{i=n(i)}catch(e){a(t,e)}}r(t,i)||(e===y&&o(t,i),e===b&&a(t,i))}function r(t,e){var i;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"==typeof e)){var n=e.then;if("function"==typeof n)return n.call(e,function(n){i||(i=!0,e!==n?o(t,n):s(t,n))},function(e){i||(i=!0,a(t,e))}),!0}}catch(e){return i||a(t,e),!0}return!1}function o(t,e){t!==e&&r(t,e)||s(t,e)}function s(t,e){t.state_===g&&(t.state_=v,t.data_=e,i(c,t))}function a(t,e){t.state_===g&&(t.state_=v,t.data_=e,i(h,t))}function l(t){var e=t.then_;for(t.then_=void 0,t=0;t<e.length;t++)n(e[t])}function c(t){t.state_=y,l(t)}function h(t){t.state_=b,l(t)}function d(t){if("function"!=typeof t)throw new TypeError("Promise constructor takes a function argument");if(!1==this instanceof d)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this.then_=[],function(t,e){function i(t){a(e,t)}try{t(function(t){o(e,t)},i)}catch(t){i(t)}}(t,this)}var u,p=t.Promise,f=p&&"resolve"in p&&"reject"in p&&"all"in p&&"race"in p&&(new p(function(t){u=t}),"function"==typeof u);"undefined"!=typeof exports&&exports?(exports.Promise=f?p:d,exports.Polyfill=d):"function"==typeof define&&define.amd?define(function(){return f?p:d}):f||(t.Promise=d);var m,g="pending",v="sealed",y="fulfilled",b="rejected",_=function(){},x="undefined"!=typeof setImmediate?setImmediate:setTimeout,w=[];d.prototype={constructor:d,state_:g,then_:null,data_:void 0,then:function(t,e){var r={owner:this,then:new this.constructor(_),fulfilled:t,rejected:e};return this.state_===y||this.state_===b?i(n,r):this.then_.push(r),r.then},catch:function(t){return this.then(null,t)}},d.all=function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("You must pass an array to Promise.all().");return new this(function(e,i){function n(t){return s++,function(i){o[t]=i,--s||e(o)}}for(var r,o=[],s=0,a=0;a<t.length;a++)(r=t[a])&&"function"==typeof r.then?r.then(n(a),i):o[a]=r;s||e(o)})},d.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("You must pass an array to Promise.race().");return new this(function(e,i){for(var n,r=0;r<t.length;r++)(n=t[r])&&"function"==typeof n.then?n.then(e,i):e(n)})},d.resolve=function(t){return t&&"object"==typeof t&&t.constructor===this?t:new this(function(e){e(t)})},d.reject=function(t){return new this(function(e,i){i(t)})}}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Sweetalert2=e()}(this,function(){"use strict";function t(t){var e=function t(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];return this instanceof t?void Object.getPrototypeOf(t).apply(this,i):new(Function.prototype.bind.apply(t,[null].concat(i)))};return e.prototype=s(Object.create(t.prototype),{constructor:e}),"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}function e(){var t=pt.innerParams.get(this),e=pt.domCache.get(this);t.showConfirmButton||(E(e.confirmButton),!t.showCancelButton&&E(e.actions)),T([e.popup,e.actions],_.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.cancelButton.disabled=!1}function i(){if("undefined"!=typeof window){"undefined"==typeof Promise&&p("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)");for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];if(void 0===e[0])return p("SweetAlert2 expects at least 1 attribute!"),!1;vt=this;var n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0}});var r=this._main(this.params);pt.promise.set(this,r)}}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function t(t,e){for(var i,n=0;n<e.length;n++)(i=e[n]).enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),s=Object.assign||function(t){for(var e,i=1;i<arguments.length;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},a=function t(e,i,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,i);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,i,n)}if("value"in r)return r.value;var s=r.get;return void 0===s?void 0:s.call(n)},l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},c=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},h=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d="SweetAlert2:",u=function(t){console.warn(d+" "+t)},p=function(t){console.error(d+" "+t)},f=[],m=function(t){-1!==f.indexOf(t)||(f.push(t),u(t))},g=function(t){return"function"==typeof t?t():t},v=function(t){return"object"===(void 0===t?"undefined":n(t))&&"function"==typeof t.then},y=Object.freeze({cancel:"cancel",backdrop:"overlay",close:"close",esc:"esc",timer:"timer"}),b=function(t){var e={};for(var i in t)e[t[i]]="swal2-"+t[i];return e},_=b(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","toast","toast-shown","fade","show","hide","noanimation","close","title","header","content","actions","confirm","cancel","footer","icon","icon-text","image","input","has-input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen"]),x=b(["success","warning","info","question","error"]),w={previousBodyPadding:null},k=function(t,e){return!!t.classList&&t.classList.contains(e)},C=function(t){if(t.focus(),"file"!==t.type){var e=t.value;t.value="",t.value=e}},S=function(t,e,i){t&&e&&("string"==typeof e&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(function(e){t.forEach?t.forEach(function(t){i?t.classList.add(e):t.classList.remove(e)}):i?t.classList.add(e):t.classList.remove(e)}))},D=function(t,e){S(t,e,!0)},T=function(t,e){S(t,e,!1)},A=function(t,e){for(var i=0;i<t.childNodes.length;i++)if(k(t.childNodes[i],e))return t.childNodes[i]},M=function(t){t.style.opacity="",t.style.display=t.id===_.content?"block":"flex"},E=function(t){t.style.opacity="",t.style.display="none"},P=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},I=function(t){return t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},O=function(t,e){t.style.removeProperty?t.style.removeProperty(e):t.style.removeAttribute(e)},N=function(){return document.body.querySelector("."+_.container)},L=function(t){var e=N();return e?e.querySelector("."+t):null},j=function(){return L(_.popup)},F=function(){return j().querySelectorAll("."+_.icon)},$=function(){return L(_.title)},R=function(){return L(_.content)},H=function(){return L(_.image)},z=function(){return L(_.progresssteps)},B=function(){return L(_.confirm)},U=function(){return L(_.cancel)},W=function(){return L(_.actions)},Y=function(){return L(_.footer)},V=function(){return L(_.close)},q=function(){var t=Array.prototype.slice.call(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return(t=parseInt(t.getAttribute("tabindex")))>(e=parseInt(e.getAttribute("tabindex")))?1:t<e?-1:0}),e=Array.prototype.slice.call(j().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]'));return function(t){for(var e=[],i=0;i<t.length;i++)-1===e.indexOf(t[i])&&e.push(t[i]);return e}(t.concat(e))},G=function(){return!document.body.classList.contains(_["toast-shown"])},K=function(){return"undefined"==typeof window||"undefined"==typeof document},X=('\n <div aria-labelledby="'+_.title+'" aria-describedby="'+_.content+'" class="'+_.popup+'" tabindex="-1">\n <div class="'+_.header+'">\n <ul class="'+_.progresssteps+'"></ul>\n <div class="'+_.icon+" "+x.error+'">\n <span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span>\n </div>\n <div class="'+_.icon+" "+x.question+'">\n <span class="'+_["icon-text"]+'">?</span>\n </div>\n <div class="'+_.icon+" "+x.warning+'">\n <span class="'+_["icon-text"]+'">!</span>\n </div>\n <div class="'+_.icon+" "+x.info+'">\n <span class="'+_["icon-text"]+'">i</span>\n </div>\n <div class="'+_.icon+" "+x.success+'">\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n </div>\n <img class="'+_.image+'" />\n <h2 class="'+_.title+'" id="'+_.title+'"></h2>\n <button type="button" class="'+_.close+'">×</button>\n </div>\n <div class="'+_.content+'">\n <div id="'+_.content+'"></div>\n <input class="'+_.input+'" />\n <input type="file" class="'+_.file+'" />\n <div class="'+_.range+'">\n <input type="range" />\n <output></output>\n </div>\n <select class="'+_.select+'"></select>\n <div class="'+_.radio+'"></div>\n <label for="'+_.checkbox+'" class="'+_.checkbox+'">\n <input type="checkbox" />\n </label>\n <textarea class="'+_.textarea+'"></textarea>\n <div class="'+_.validationerror+'" id="'+_.validationerror+'"></div>\n </div>\n <div class="'+_.actions+'">\n <button type="button" class="'+_.confirm+'">OK</button>\n <button type="button" class="'+_.cancel+'">Cancel</button>\n </div>\n <div class="'+_.footer+'">\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),Z=function(t){var e=N();if(e&&(e.parentNode.removeChild(e),T([document.documentElement,document.body],[_["no-backdrop"],_["has-input"],_["toast-shown"]])),!K()){var i=document.createElement("div");i.className=_.container,i.innerHTML=X,("string"==typeof t.target?document.querySelector(t.target):t.target).appendChild(i);var n=j(),r=R(),o=A(r,_.input),s=A(r,_.file),a=r.querySelector("."+_.range+" input"),l=r.querySelector("."+_.range+" output"),c=A(r,_.select),h=r.querySelector("."+_.checkbox+" input"),d=A(r,_.textarea);n.setAttribute("role",t.toast?"alert":"dialog"),n.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||n.setAttribute("aria-modal","true");var u=void 0,f=function(t){yt.isVisible()&&u!==t.target.value&&yt.resetValidationError(),u=t.target.value};return o.oninput=f,s.onchange=f,c.onchange=f,h.onchange=f,d.oninput=f,a.oninput=function(t){f(t),l.value=a.value},a.onchange=function(t){f(t),a.nextSibling.value=a.value},n}p("SweetAlert2 requires document to initialize")},Q=function(t,e){if(!t)return E(e);if("object"===(void 0===t?"undefined":n(t)))if(e.innerHTML="",0 in t)for(var i=0;i in t;i++)e.appendChild(t[i].cloneNode(!0));else e.appendChild(t.cloneNode(!0));else t&&(e.innerHTML=t);M(e)},J=function(){if(K())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var i in e)if(e.hasOwnProperty(i)&&void 0!==t.style[i])return e[i];return!1}(),tt=function(){null!==w.previousBodyPadding||document.body.scrollHeight>window.innerHeight&&(w.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=w.previousBodyPadding+function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var t=document.createElement("div");t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}()+"px")},et={},it=function(t,e){var i=N(),n=j();if(n){null!==t&&"function"==typeof t&&t(n),T(n,_.show),D(n,_.hide);var r=function(){document.body.classList.contains(_["toast-shown"])||(function(){if(et.previousActiveElement&&et.previousActiveElement.focus){var t=et.previousActiveElement;et.previousActiveElement=null;var e=window.scrollX,i=window.scrollY;setTimeout(function(){t.focus&&t.focus()},100),void 0!==e&&void 0!==i&&window.scrollTo(e,i)}}(),window.removeEventListener("keydown",et.keydownHandler,{capture:!0}),et.keydownHandlerAdded=!1),i.parentNode&&i.parentNode.removeChild(i),T([document.documentElement,document.body],[_.shown,_["height-auto"],_["no-backdrop"],_["has-input"],_["toast-shown"]]),G()&&(null!==w.previousBodyPadding&&(document.body.style.paddingRight=w.previousBodyPadding,w.previousBodyPadding=null),function(){if(k(document.body,_.iosfix)){var t=parseInt(document.body.style.top,10);T(document.body,_.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}}()),null!==e&&"function"==typeof e&&setTimeout(function(){e()})};J&&!k(n,_.noanimation)?n.addEventListener(J,function t(){n.removeEventListener(J,t),k(n,_.hide)&&r()}):r()}},nt={title:"",titleText:"",text:"",html:"",footer:"",type:null,toast:!1,customClass:"",target:"body",backdrop:!0,animation:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:null,confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:null,cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageAlt:"",imageClass:null,timer:null,width:null,padding:null,background:null,input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,grow:!1,position:"center",progressSteps:[],currentProgressStep:null,progressStepsDistance:null,onBeforeOpen:null,onAfterClose:null,onOpen:null,onClose:null,useRejections:!1,expectRejections:!1},rt=["useRejections","expectRejections"],ot=function(t){return nt.hasOwnProperty(t)||"extraParams"===t},st=function(t){return-1!==rt.indexOf(t)},at=function(t){for(var e in t)ot(e)||u('Unknown parameter "'+e+'"'),st(e)&&m('The parameter "'+e+'" is deprecated and will be removed in the next major release.')},lt={},ct=[],ht=function(){var t=j();t||yt(""),t=j();var e=W(),i=B(),n=U();M(e),M(i),D([t,e],_.loading),i.disabled=!0,n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},dt=Object.freeze({isValidParameter:ot,isDeprecatedParameter:st,argsToParams:function(t){var e={};switch(n(t[0])){case"string":["title","html","type"].forEach(function(i,r){switch(n(t[r])){case"string":e[i]=t[r];break;case"undefined":break;default:p("Unexpected type of "+i+'! Expected "string", got '+n(t[r]))}});break;case"object":s(e,t[0]);break;default:return p('Unexpected type of argument! Expected "string" or "object", got '+n(t[0])),!1}return e},adaptInputValidator:function(t){return function(e,i){return t.call(this,e,i).then(function(){},function(t){return t})}},close:it,closePopup:it,closeModal:it,closeToast:it,isVisible:function(){return!!j()},clickConfirm:function(){return B().click()},clickCancel:function(){return U().click()},getPopup:j,getTitle:$,getContent:R,getImage:H,getButtonsWrapper:function(){return m("swal.getButtonsWrapper() is deprecated and will be removed in the next major release, use swal.getActions() instead"),L(_.actions)},getActions:W,getConfirmButton:B,getCancelButton:U,getFooter:Y,isLoading:function(){return j().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return new(Function.prototype.bind.apply(this,[null].concat(e)))},mixin:function(e){return t(function(t){function i(){return r(this,i),c(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return l(i,t),o(i,[{key:"_main",value:function(t){return a(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_main",this).call(this,s({},e,t))}}]),i}(this))},queue:function(t){var e=this;ct=t;var i=function(){ct=[],document.body.removeAttribute("data-swal2-queue-step")},n=[];return new Promise(function(t){!function r(o,s){o<ct.length?(document.body.setAttribute("data-swal2-queue-step",o),e(ct[o]).then(function(e){void 0===e.value?(i(),t({dismiss:e.dismiss})):(n.push(e.value),r(o+1,s))})):(i(),t({value:n}))}(0)})},getQueueStep:function(){return document.body.getAttribute("data-swal2-queue-step")},insertQueueStep:function(t,e){return e&&e<ct.length?ct.splice(e,0,t):ct.push(t)},deleteQueueStep:function(t){void 0!==ct[t]&&ct.splice(t,1)},showLoading:ht,enableLoading:ht,getTimerLeft:function(){return et.timeout&&et.timeout.getTimerLeft()}});if("undefined"!=typeof window&&"function"!=typeof window.WeakMap){var ut=0;window.Symbol=function(t){return"__"+t+"_"+Math.floor(1e9*Math.random())+"_"+ ++ut+"__"},Symbol.iterator=Symbol("Symbol.iterator"),window.WeakMap=function(t,e,i){function n(){e(this,t,{value:Symbol("WeakMap")})}return n.prototype={delete:function(e){delete e[this[t]]},get:function(e){return e[this[t]]},has:function(e){return i.call(e,this[t])},set:function(i,n){e(i,this[t],{configurable:!0,value:n})}},n}(Symbol("WeakMap"),Object.defineProperty,{}.hasOwnProperty)}var pt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},ft={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.reject(e&&e.validationMessage?e.validationMessage:"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)$/.test(t)?Promise.resolve():Promise.reject(e&&e.validationMessage?e.validationMessage:"Invalid URL")}},mt=function(t){var e=N(),i=j();null!==t.onBeforeOpen&&"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(i),t.animation?(D(i,_.show),D(e,_.fade),T(i,_.hide)):T(i,_.fade),M(i),e.style.overflowY="hidden",J&&!k(i,_.noanimation)?i.addEventListener(J,function t(){i.removeEventListener(J,t),e.style.overflowY="auto"}):e.style.overflowY="auto",D([document.documentElement,document.body,e],_.shown),t.heightAuto&&t.backdrop&&!t.toast&&D([document.documentElement,document.body],_["height-auto"]),G()&&(tt(),function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!k(document.body,_.iosfix)){var t=document.body.scrollTop;document.body.style.top=-1*t+"px",D(document.body,_.iosfix)}}()),et.previousActiveElement||(et.previousActiveElement=document.activeElement),null!==t.onOpen&&"function"==typeof t.onOpen&&setTimeout(function(){t.onOpen(i)})},gt=Object.freeze({hideLoading:e,disableLoading:e,getInput:function(t){var e=pt.innerParams.get(this),i=pt.domCache.get(this);return(t=t||e.input)?"select"===t||"textarea"===t||"file"===t?A(i.content,_[t]):"checkbox"===t?i.popup.querySelector("."+_.checkbox+" input"):"radio"===t?i.popup.querySelector("."+_.radio+" input:checked")||i.popup.querySelector("."+_.radio+" input:first-child"):"range"===t?i.popup.querySelector("."+_.range+" input"):A(i.content,_.input):null},enableButtons:function(){var t=pt.domCache.get(this);t.confirmButton.disabled=!1,t.cancelButton.disabled=!1},disableButtons:function(){var t=pt.domCache.get(this);t.confirmButton.disabled=!0,t.cancelButton.disabled=!0},enableConfirmButton:function(){pt.domCache.get(this).confirmButton.disabled=!1},disableConfirmButton:function(){pt.domCache.get(this).confirmButton.disabled=!0},enableInput:function(){var t=this.getInput();if(!t)return!1;if("radio"===t.type)for(var e=t.parentNode.parentNode.querySelectorAll("input"),i=0;i<e.length;i++)e[i].disabled=!1;else t.disabled=!1},disableInput:function(){var t=this.getInput();if(!t)return!1;if(t&&"radio"===t.type)for(var e=t.parentNode.parentNode.querySelectorAll("input"),i=0;i<e.length;i++)e[i].disabled=!0;else t.disabled=!0},showValidationError:function(t){var e=pt.domCache.get(this);e.validationError.innerHTML=t;var i=window.getComputedStyle(e.popup);e.validationError.style.marginLeft="-"+i.getPropertyValue("padding-left"),e.validationError.style.marginRight="-"+i.getPropertyValue("padding-right"),M(e.validationError);var n=this.getInput();n&&(n.setAttribute("aria-invalid",!0),n.setAttribute("aria-describedBy",_.validationerror),C(n),D(n,_.inputerror))},resetValidationError:function(){var t=pt.domCache.get(this);t.validationError&&E(t.validationError);var e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedBy"),T(e,_.inputerror))},_main:function(t){var e=this;at(t);var i=s({},nt,t);(function(t){t.inputValidator||Object.keys(ft).forEach(function(e){t.input===e&&(t.inputValidator=t.expectRejections?ft[e]:yt.adaptInputValidator(ft[e]))}),t.target&&("string"!=typeof t.target||document.querySelector(t.target))&&("string"==typeof t.target||t.target.appendChild)||(u('Target parameter is not valid, defaulting to "body"'),t.target="body");var e=void 0,i=j(),n="string"==typeof t.target?document.querySelector(t.target):t.target;e=i&&n&&i.parentNode!==n.parentNode?Z(t):i||Z(t),t.width&&(e.style.width="number"==typeof t.width?t.width+"px":t.width),t.padding&&(e.style.padding="number"==typeof t.padding?t.padding+"px":t.padding),t.background&&(e.style.background=t.background);for(var r=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),s=0;s<o.length;s++)o[s].style.backgroundColor=r;var a=N(),l=$(),c=R().querySelector("#"+_.content),h=W(),d=B(),f=U(),m=V(),g=Y();if(t.titleText?l.innerText=t.titleText:t.title&&(l.innerHTML=t.title.split("\n").join("<br />")),"string"==typeof t.backdrop?N().style.background=t.backdrop:!t.backdrop&&D([document.documentElement,document.body],_["no-backdrop"]),t.html?Q(t.html,c):t.text?(c.textContent=t.text,M(c)):E(c),t.position in _?D(a,_[t.position]):(u('The "position" parameter is not valid, defaulting to "center"'),D(a,_.center)),t.grow&&"string"==typeof t.grow){var v="grow-"+t.grow;v in _&&D(a,_[v])}"function"==typeof t.animation&&(t.animation=t.animation.call()),t.showCloseButton?(m.setAttribute("aria-label",t.closeButtonAriaLabel),M(m)):E(m),e.className=_.popup,t.toast?(D([document.documentElement,document.body],_["toast-shown"]),D(e,_.toast)):D(e,_.modal),t.customClass&&D(e,t.customClass);var y=z(),b=parseInt(null===t.currentProgressStep?yt.getQueueStep():t.currentProgressStep,10);t.progressSteps&&t.progressSteps.length?(M(y),P(y),b>=t.progressSteps.length&&u("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(function(e,i){var n=document.createElement("li");if(D(n,_.progresscircle),n.innerHTML=e,i===b&&D(n,_.activeprogressstep),y.appendChild(n),i!==t.progressSteps.length-1){var r=document.createElement("li");D(r,_.progressline),t.progressStepsDistance&&(r.style.width=t.progressStepsDistance),y.appendChild(r)}})):E(y);for(var w=F(),k=0;k<w.length;k++)E(w[k]);if(t.type){var C=!1;for(var S in x)if(t.type===S){C=!0;break}if(!C)return p("Unknown alert type: "+t.type),!1;var A=e.querySelector("."+_.icon+"."+x[t.type]);M(A),t.animation&&D(A,"swal2-animate-"+t.type+"-icon")}var I=H();if(t.imageUrl?(I.setAttribute("src",t.imageUrl),I.setAttribute("alt",t.imageAlt),M(I),t.imageWidth?I.setAttribute("width",t.imageWidth):I.removeAttribute("width"),t.imageHeight?I.setAttribute("height",t.imageHeight):I.removeAttribute("height"),I.className=_.image,t.imageClass&&D(I,t.imageClass)):E(I),t.showCancelButton?f.style.display="inline-block":E(f),t.showConfirmButton?O(d,"display"):E(d),t.showConfirmButton||t.showCancelButton?M(h):E(h),d.innerHTML=t.confirmButtonText,f.innerHTML=t.cancelButtonText,d.setAttribute("aria-label",t.confirmButtonAriaLabel),f.setAttribute("aria-label",t.cancelButtonAriaLabel),d.className=_.confirm,D(d,t.confirmButtonClass),f.className=_.cancel,D(f,t.cancelButtonClass),t.buttonsStyling){D([d,f],_.styled),t.confirmButtonColor&&(d.style.backgroundColor=t.confirmButtonColor),t.cancelButtonColor&&(f.style.backgroundColor=t.cancelButtonColor);var L=window.getComputedStyle(d).getPropertyValue("background-color");d.style.borderLeftColor=L,d.style.borderRightColor=L}else T([d,f],_.styled),d.style.backgroundColor=d.style.borderLeftColor=d.style.borderRightColor="",f.style.backgroundColor=f.style.borderLeftColor=f.style.borderRightColor="";Q(t.footer,g),!0===t.animation?T(e,_.noanimation):D(e,_.noanimation),t.showLoaderOnConfirm&&!t.preConfirm&&u("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request")})(i),Object.freeze(i),pt.innerParams.set(this,i),et.timeout&&(et.timeout.stop(),delete et.timeout);var o={popup:j(),container:N(),content:R(),actions:W(),confirmButton:B(),cancelButton:U(),closeButton:V(),validationError:L(_.validationerror),progressSteps:z()};pt.domCache.set(this,o);var a=this.constructor;return new Promise(function(t,s){var l=function(e){a.closePopup(i.onClose,i.onAfterClose),i.useRejections?t(e):t({value:e})},c=function(e){a.closePopup(i.onClose,i.onAfterClose),i.useRejections?s(e):t({dismiss:e})},d=function(t){a.closePopup(i.onClose,i.onAfterClose),s(t)};i.timer&&(et.timeout=new function t(e,i){r(this,t);var n,o,s,a=i;this.start=function(){s=!0,o=new Date,n=setTimeout(e,a)},this.stop=function(){s=!1,clearTimeout(n),a-=new Date-o},this.getTimerLeft=function(){return s&&(this.stop(),this.start()),a},this.getStateRunning=function(){return s},this.start()}(function(){c("timer"),delete et.timeout},i.timer));i.input&&setTimeout(function(){var t=e.getInput();t&&C(t)},0);for(var u=function(t){if(i.showLoaderOnConfirm&&a.showLoading(),i.preConfirm){e.resetValidationError();var n=Promise.resolve().then(function(){return i.preConfirm(t,i.extraParams)});i.expectRejections?n.then(function(e){return l(e||t)},function(t){e.hideLoading(),t&&e.showValidationError(t)}):n.then(function(i){I(o.validationError)||!1===i?e.hideLoading():l(i||t)},function(t){return d(t)})}else l(t)},f=function(t){var n=t||window.event,r=n.target||n.srcElement,s=o.confirmButton,l=o.cancelButton,h=s&&(s===r||s.contains(r)),p=l&&(l===r||l.contains(r));switch(n.type){case"click":if(h&&a.isVisible())if(e.disableButtons(),i.input){var f=function(){var t=e.getInput();if(!t)return null;switch(i.input){case"checkbox":return t.checked?1:0;case"radio":return t.checked?t.value:null;case"file":return t.files.length?t.files[0]:null;default:return i.inputAutoTrim?t.value.trim():t.value}}();if(i.inputValidator){e.disableInput();var m=Promise.resolve().then(function(){return i.inputValidator(f,i.extraParams)});i.expectRejections?m.then(function(){e.enableButtons(),e.enableInput(),u(f)},function(t){e.enableButtons(),e.enableInput(),t&&e.showValidationError(t)}):m.then(function(t){e.enableButtons(),e.enableInput(),t?e.showValidationError(t):u(f)},function(t){return d(t)})}else u(f)}else u(!0);else p&&a.isVisible()&&(e.disableButtons(),c(a.DismissReason.cancel))}},m=o.popup.querySelectorAll("button"),y=0;y<m.length;y++)m[y].onclick=f,m[y].onmouseover=f,m[y].onmouseout=f,m[y].onmousedown=f;if(o.closeButton.onclick=function(){c(a.DismissReason.close)},i.toast)o.popup.onclick=function(){i.showConfirmButton||i.showCancelButton||i.showCloseButton||i.input||(a.closePopup(i.onClose,i.onAfterClose),c(a.DismissReason.close))};else{var b=!1;o.popup.onmousedown=function(){o.container.onmouseup=function(t){o.container.onmouseup=void 0,t.target===o.container&&(b=!0)}},o.container.onmousedown=function(){o.popup.onmouseup=function(t){o.popup.onmouseup=void 0,(t.target===o.popup||o.popup.contains(t.target))&&(b=!0)}},o.container.onclick=function(t){return b?void(b=!1):void(t.target!==o.container||g(i.allowOutsideClick)&&c(a.DismissReason.backdrop))}}i.reverseButtons?o.confirmButton.parentNode.insertBefore(o.cancelButton,o.confirmButton):o.confirmButton.parentNode.insertBefore(o.confirmButton,o.cancelButton);var x,w=function(t,e){for(var n=q(i.focusCancel),r=0;r<n.length;r++){(t+=e)===n.length?t=0:-1===t&&(t=n.length-1);var s=n[t];if(I(s))return s.focus()}o.popup.focus()},k=function(t,i){if(t.stopPropagation(),"Enter"!==t.key||t.isComposing)if("Tab"===t.key){for(var n=t.target||t.srcElement,r=q(i.focusCancel),s=-1,l=0;l<r.length;l++)if(n===r[l]){s=l;break}t.shiftKey?w(s,-1):w(s,1),t.stopPropagation(),t.preventDefault()}else-1===["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Left","Right","Up","Down"].indexOf(t.key)?("Escape"===t.key||"Esc"===t.key)&&!0===g(i.allowEscapeKey)&&c(a.DismissReason.esc):document.activeElement===o.confirmButton&&I(o.cancelButton)?o.cancelButton.focus():document.activeElement===o.cancelButton&&I(o.confirmButton)&&o.confirmButton.focus();else if(t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(i.input))return;a.clickConfirm(),t.preventDefault()}};et.keydownHandlerAdded&&(window.removeEventListener("keydown",et.keydownHandler,{capture:!0}),et.keydownHandlerAdded=!1),i.toast||(et.keydownHandler=function(t){return k(t,i)},window.addEventListener("keydown",et.keydownHandler,{capture:!0}),et.keydownHandlerAdded=!0),e.enableButtons(),e.hideLoading(),e.resetValidationError(),i.input&&D(document.body,_["has-input"]);for(var S=["input","file","range","select","radio","checkbox","textarea"],T=void 0,P=0;P<S.length;P++){var O=_[S[P]],N=A(o.content,O);if(T=e.getInput(S[P])){for(var L in T.attributes)if(T.attributes.hasOwnProperty(L)){var j=T.attributes[L].name;"type"!==j&&"value"!==j&&T.removeAttribute(j)}for(var F in i.inputAttributes)T.setAttribute(F,i.inputAttributes[F])}N.className=O,i.inputClass&&D(N,i.inputClass),E(N)}switch(i.input){case"text":case"email":case"password":case"number":case"tel":case"url":(T=A(o.content,_.input)).value=i.inputValue,T.placeholder=i.inputPlaceholder,T.type=i.input,M(T);break;case"file":(T=A(o.content,_.file)).placeholder=i.inputPlaceholder,T.type=i.input,M(T);break;case"range":var $=A(o.content,_.range),R=$.querySelector("input"),H=$.querySelector("output");R.value=i.inputValue,R.type=i.input,H.value=i.inputValue,M($);break;case"select":var z=A(o.content,_.select);if(z.innerHTML="",i.inputPlaceholder){var B=document.createElement("option");B.innerHTML=i.inputPlaceholder,B.value="",B.disabled=!0,B.selected=!0,z.appendChild(B)}x=function(t){t.forEach(function(t){var e=h(t,2),n=e[0],r=e[1],o=document.createElement("option");o.value=n,o.innerHTML=r,i.inputValue.toString()===n.toString()&&(o.selected=!0),z.appendChild(o)}),M(z),z.focus()};break;case"radio":var U=A(o.content,_.radio);U.innerHTML="",x=function(t){t.forEach(function(t){var e=h(t,2),n=e[0],r=e[1],o=document.createElement("input"),s=document.createElement("label");o.type="radio",o.name=_.radio,o.value=n,i.inputValue.toString()===n.toString()&&(o.checked=!0),s.innerHTML=r,s.insertBefore(o,s.firstChild),U.appendChild(s)}),M(U);var e=U.querySelectorAll("input");e.length&&e[0].focus()};break;case"checkbox":var W=A(o.content,_.checkbox),Y=e.getInput("checkbox");Y.type="checkbox",Y.value=1,Y.id=_.checkbox,Y.checked=!!i.inputValue;var V=W.getElementsByTagName("span");V.length&&W.removeChild(V[0]),(V=document.createElement("span")).innerHTML=i.inputPlaceholder,W.appendChild(V),M(W);break;case"textarea":var G=A(o.content,_.textarea);G.value=i.inputValue,G.placeholder=i.inputPlaceholder,M(G);break;case null:break;default:p('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'+i.input+'"')}if("select"===i.input||"radio"===i.input){var K=function(t){return x(function(t){var e=[];return"undefined"!=typeof Map&&t instanceof Map?t.forEach(function(t,i){e.push([i,t])}):Object.keys(t).forEach(function(i){e.push([i,t[i]])}),e}(t))};v(i.inputOptions)?(a.showLoading(),i.inputOptions.then(function(t){e.hideLoading(),K(t)})):"object"===n(i.inputOptions)?K(i.inputOptions):p("Unexpected type of inputOptions! Expected object, Map or Promise, got "+n(i.inputOptions))}else-1!==["text","email","number","tel","textarea"].indexOf(i.input)&&v(i.inputValue)&&(a.showLoading(),E(T),i.inputValue.then(function(t){T.value="number"===i.input?parseFloat(t)||0:t+"",M(T),e.hideLoading()}).catch(function(t){p("Error in inputValue promise: "+t),T.value="",M(T),e.hideLoading()}));mt(i),i.toast||(g(i.allowEnterKey)?i.focusCancel&&I(o.cancelButton)?o.cancelButton.focus():i.focusConfirm&&I(o.confirmButton)?o.confirmButton.focus():w(-1,1):document.activeElement&&document.activeElement.blur()),o.container.scrollTop=0})}}),vt=void 0;i.prototype.then=function(t,e){return pt.promise.get(this).then(t,e)},i.prototype.catch=function(t){return pt.promise.get(this).catch(t)},i.prototype.finally=function(t){return pt.promise.get(this).finally(t)},s(i.prototype,gt),s(i,dt),Object.keys(gt).forEach(function(t){i[t]=function(){var e;if(vt)return(e=vt)[t].apply(e,arguments)}}),i.DismissReason=y,i.noop=function(){},i.version="7.22.0";var yt=t(function(t){var e=function(e){function i(){return r(this,i),c(this,(i.__proto__||Object.getPrototypeOf(i)).apply(this,arguments))}return l(i,t),o(i,[{key:"_main",value:function(t){return a(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"_main",this).call(this,s({},lt,t))}}],[{key:"setDefaults",value:function(e){if(m('"setDefaults" & "resetDefaults" methods are deprecated in favor of "mixin" method and will be removed in the next major release. For new projects, use "mixin". For past projects already using "setDefaults", support will be provided through an additional package.'),!e||"object"!==(void 0===e?"undefined":n(e)))throw new TypeError("SweetAlert2: The argument for setDefaults() is required and has to be a object");at(e),Object.keys(e).forEach(function(i){t.isValidParameter(i)&&(lt[i]=e[i])})}},{key:"resetDefaults",value:function(){m('"setDefaults" & "resetDefaults" methods are deprecated in favor of "mixin" method and will be removed in the next major release. For new projects, use "mixin". For past projects already using "setDefaults", support will be provided through an additional package.'),lt={}}}]),i}();return"undefined"!=typeof window&&"object"===n(window._swalDefaults)&&e.setDefaults(window._swalDefaults),e}(i));return yt.default=yt,yt}),"undefined"!=typeof window&&window.Sweetalert2&&(window.swal=window.sweetAlert=window.Swal=window.SweetAlert=window.Sweetalert2),swal.mixin({width:400,padding:"2.5rem",buttonsStyling:!1,confirmButtonClass:"btn btn-success m-btn m-btn--custom",confirmButtonColor:null,cancelButtonClass:"btn btn-secondary m-btn m-btn--custom",cancelButtonColor:null});
OHA YOOOO