PageSourceSearch

https://www.salmondo.cz/webtemp/jsloader-b81e5f9fa9b6.js?1610833676

js salmondo.cz collected 2026-10-07 16:53:55 UTC 471,683 bytes, 6,969 lines download raw bytes

1
2/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */�
vendor: 88,061 bytes, lines 2-3
2
3!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",$=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[k]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[k]&&(v=Ce(v)),y&&!y[k]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[k]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=N[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[k]?i.push(a):o.push(a);(a=N(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument===C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(S=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=k.split("").sort(D).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;var T=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=k.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&N.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!N.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return"undefined"!=typeof e.contentDocument?e.contentDocument:(A(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var R=/[^\x20\t\r\n\f]+/g;function M(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(R)||[],function(e,t){n[t]=!0}),n):k.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){k.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return k.each(arguments,function(e,t){var n;while(-1<(n=k.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,M,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,M,s),l(u,o,I,s),l(u,o,M,o.notifyWith))):(a!==M&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:M,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:M)),o[2][3].add(l(0,e,m(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=k.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(W(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)W(i[t],a(t),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var F=k.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),k.ready()}k.fn.ready=function(e){return F.then(e)["catch"](function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(U,X)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(R)||[]).length;while(n--)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Q.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")},ue=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function le(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&se(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ce[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ce[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){se(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={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 ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var me,xe,be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}me=E.createDocumentFragment().appendChild(E.createElement("div")),(xe=E.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),me.appendChild(xe),y.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){a=k.event.handlers.call(this,s,l),t=0;while((i=a[t++])&&!s.isPropagationStopped()){s.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!s.isImmediatePropagationStopped())s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Q.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ce.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Ne),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each(function(){k.event.remove(this,e,n,t)})}});var je=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/<script|<style|<link/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Ie(n,r,i,o){r=g.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Le.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Ie(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(ve(e,"script"),Pe)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,Re),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):b(u.textContent.replace(He,""),u,l))}return n}function We(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(je,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Me(o[r],a[r]);else Me(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!qe.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Ie(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var $e=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Be=new RegExp(re.join("|"),"i");function _e(e,t,n){var r,i,o,a,s=e.style;return(n=n||Fe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||oe(e)||(a=k.style(e,t)),!y.pixelBoxStyles()&&$e.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(s).appendChild(u);var e=C.getComputedStyle(u);n="1%"!==e.top,a=12===t(e.marginLeft),u.style.right="60%",o=36===t(e.right),r=36===t(e.width),u.style.position="absolute",i=12===t(u.offsetWidth/3),ie.removeChild(s),u=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s=E.createElement("div"),u=E.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),i}}))}();var Ue=["Webkit","Moz","ms"],Xe=E.createElement("div").style,Ve={};function Ge(e){var t=k.cssProps[e]||Ve[e];return t||(e in Xe?e:Ve[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;while(n--)if((e=Ue[n]+t)in Xe)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Ze(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function et(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+re[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[a]+"Width",!0,i))):(u+=k.css(e,"padding"+re[a],!0,i),"padding"!==n?u+=k.css(e,"border"+re[a]+"Width",!0,i):s+=k.css(e,"border"+re[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function tt(e,t,n){var r=Fe(e),i=(!y.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=_e(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if($e.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+et(e,t,n||(i?"border":"content"),o,r,a)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Qe.test(t),l=e.style;if(u||(t=Ge(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Qe.test(t)||(t=Ge(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=_e(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!Ye.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,u,n):ue(e,Je,function(){return tt(e,u,n)})},set:function(e,t,n){var r,i=Fe(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===k.css(e,"boxSizing",!1,i),s=n?et(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-et(e,u,"border",!1,i)-.5)),s&&(r=ne.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=k.css(e,u)),Ze(0,t,s)}}}),k.cssHooks.marginLeft=ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(_e(e,"marginLeft"))||e.getBoundingClientRect().left-ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=Ze)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=nt).prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}}).init.prototype=nt.prototype,(nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=nt.prototype.init,k.fx.step={};var rt,it,ot,at,st=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){it&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(lt):C.setTimeout(lt,k.fx.interval),k.fx.tick())}function ct(){return C.setTimeout(function(){rt=void 0}),rt=Date.now()}function ft(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function dt(o,e,t){var n,a,r=0,i=dt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=rt||ct(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:rt||ct(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=dt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,pt,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(R);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&se(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],st.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=pt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=k.isEmptyObject(t),o=k.speed(e,n,r),a=function(){var e=dt(this,k.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&ut.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(ft(r,!0),e,t,n)}}),k.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){it||(it=!0,lt())},k.fx.stop=function(){it=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ot=E.createElement("input"),at=E.createElement("select").appendChild(E.createElement("option")),ot.type="checkbox",y.checkOn=""!==ot.value,y.optSelected=at.selected,(ot=E.createElement("input")).value="t",ot.type="radio",y.radioValue="t"===ot.value;var ht,gt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=gt[t]||k.find.attr;gt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=gt[o],gt[o]=r,r=null!=a(e,t,n)?o:null,gt[o]=i),r}});var vt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function mt(e){return(e.match(R)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).addClass(t.call(this,e,xt(this)))});if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).removeClass(t.call(this,e,xt(this)))});if(!arguments.length)return this.attr("class","");if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,xt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=k(this),r=bt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=xt(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+mt(xt(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(wt,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:mt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=k.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var Tt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(d+k.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[k.expando]?e:new k.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,Tt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Q.get(o,"events")||{})[e.type]&&Q.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Ct),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Ct),k.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){k.event.simulate(r,e.target,k.event.fix(e))};k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var Et=C.location,kt=Date.now(),St=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Nt=/\[\]$/,At=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function qt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Nt.test(n)?i(n,t):qt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)qt(n+"["+t+"]",e[t],r,i)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){i(this.name,this.value)});else for(n in e)qt(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&jt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}});var Lt=/%20/g,Ht=/#.*$/,Ot=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,Mt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Ft=E.createElement("a");function Bt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(R)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function _t(t,i,o,a){var s={},u=t===Wt;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Ft.href=Et.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,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":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,k.ajaxSettings),t):zt(k.ajaxSettings,e)},ajaxPrefilter:Bt(It),ajaxTransport:Bt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Pt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace(Mt,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(R)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Ft.protocol+"//"+Ft.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),_t(It,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Rt.test(v.type),f=v.url.replace(Ht,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Lt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(St.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Ot,"$1"),o=(St.test(f)?"&":"?")+"_="+kt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+$t+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=_t(Wt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Xt=k.ajaxSettings.xhr();y.cors=!!Xt&&"withCredentials"in Xt,y.ajax=Xt=!!Xt,k.ajaxTransport(function(i){var o,a;if(y.cors||Xt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Ut[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.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(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=mt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=A,k.isFunction=m,k.isWindow=x,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var Qt=C.jQuery,Jt=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=Jt),e&&C.jQuery===k&&(C.jQuery=Qt),k},e||(C.jQuery=C.$=k),k});
4/*!
5  * Bootstrap v4.3.1 (https://getbootstrap.com/)
6  * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
7  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
8  */
9!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t=t||self).bootstrap={},t.jQuery)}(this,function(t,p){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function l(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,i;e=o,i=r[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return o}p=p&&p.hasOwnProperty("default")?p.default:p;var e="transitionend";function n(t){var e=this,n=!1;return p(this).one(m.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||m.triggerTransitionEnd(e)},t),this}var m={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=p(t).css("transition-duration"),n=p(t).css("transition-delay"),i=parseFloat(e),o=parseFloat(n);return i||o?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){p(t).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],r=e[i],s=r&&m.isElement(r)?"element":(a=r,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var a},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"!=typeof t.getRootNode)return t instanceof ShadowRoot?t:t.parentNode?m.findShadowRoot(t.parentNode):null;var e=t.getRootNode();return e instanceof ShadowRoot?e:null}};p.fn.emulateTransitionEnd=n,p.event.special[m.TRANSITION_END]={bindType:e,delegateType:e,handle:function(t){if(p(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var o="alert",r="bs.alert",a="."+r,c=p.fn[o],h={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},u="alert",f="fade",d="show",g=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){p.removeData(this._element,r),this._element=null},t._getRootElement=function(t){var e=m.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=p(t).closest("."+u)[0]),n},t._triggerCloseEvent=function(t){var e=p.Event(h.CLOSE);return p(t).trigger(e),e},t._removeElement=function(e){var n=this;if(p(e).removeClass(d),p(e).hasClass(f)){var t=m.getTransitionDurationFromElement(e);p(e).one(m.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){p(t).detach().trigger(h.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=p(this),e=t.data(r);e||(e=new i(this),t.data(r,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();p(document).on(h.CLICK_DATA_API,'[data-dismiss="alert"]',g._handleDismiss(new g)),p.fn[o]=g._jQueryInterface,p.fn[o].Constructor=g,p.fn[o].noConflict=function(){return p.fn[o]=c,g._jQueryInterface};var _="button",v="bs.button",y="."+v,E=".data-api",b=p.fn[_],w="active",C="btn",T="focus",S='[data-toggle^="button"]',D='[data-toggle="buttons"]',I='input
9:not([type="hidden"])',A=".active",O=".btn",N={CLICK_DATA_API:"click"+y+E,FOCUS_BLUR_DATA_API:"focus"+y+E+" blur"+y+E},k=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=p(this._element).closest(D)[0];if(n){var i=this._element.querySelector(I);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(w))t=!1;else{var o=n.querySelector(A);o&&p(o).removeClass(w)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(w),p(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(w)),t&&p(this._element).toggleClass(w)},t.dispose=function(){p.removeData(this._element,v),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=p(this).data(v);t||(t=new n(this),p(this).data(v,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();p(document).on(N.CLICK_DATA_API,S,function(t){t.preventDefault();var e=t.target;p(e).hasClass(C)||(e=p(e).closest(O)),k._jQueryInterface.call(p(e),"toggle")}).on(N.FOCUS_BLUR_DATA_API,S,function(t){var e=p(t.target).closest(O)[0];p(e).toggleClass(T,/^focus(in)?$/.test(t.type))}),p.fn[_]=k._jQueryInterface,p.fn[_].Constructor=k,p.fn[_].noConflict=function(){return p.fn[_]=b,k._jQueryInterface};var L="carousel",x="bs.carousel",P="."+x,H=".data-api",j=p.fn[L],R={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},F={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},M="next",W="prev",U="left",B="right",q={SLIDE:"slide"+P,SLID:"slid"+P,KEYDOWN:"keydown"+P,MOUSEENTER:"mouseenter"+P,MOUSELEAVE:"mouseleave"+P,TOUCHSTART:"touchstart"+P,TOUCHMOVE:"touchmove"+P,TOUCHEND:"touchend"+P,POINTERDOWN:"pointerdown"+P,POINTERUP:"pointerup"+P,DRAG_START:"dragstart"+P,LOAD_DATA_API:"load"+P+H,CLICK_DATA_API:"click"+P+H},K="carousel",Q="active",V="slide",Y="carousel-item-right",z="carousel-item-left",X="carousel-item-next",G="carousel-item-prev",$="pointer-event",J=".active",Z=".active.carousel-item",tt=".carousel-item",et=".carousel-item img",nt=".carousel-item-next, .carousel-item-prev",it=".carousel-indicators",ot="[data-slide], [data-slide-to]",rt='[data-ride="carousel"]',st={TOUCH:"touch",PEN:"pen"},at=function(){function r(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(it),this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var t=r.prototype;return t.next=function(){this._isSliding||this._slide(M)},t.nextWhenVisible=function(){!document.hidden&&p(this._element).is(":visible")&&"hidden"!==p(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(W)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(nt)&&(m.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.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))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(Z);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)p(this._element).one(q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?M:W;this._slide(i,this._items[t])}},t.dispose=function(){p(this._element).off(P),p.removeData(this._element,x),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l({},R,t),m.typeCheckConfig(L,t,F),t},t._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;0<e&&this.prev(),e<0&&this.next()}},t._addEventListeners=function(){var e=this;this._config.keyboard&&p(this._element).on(q.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&p(this._element).on(q.MOUSEENTER,function(t){return e.pause(t)}).on(q.MOUSELEAVE,function(t){return e.cycle(t)}),this._config.touch&&this._addTouchEventListeners()},t._addTouchEventListeners=function(){var n=this;if(this._touchSupported){var e=function(t){n._pointerEvent&&st[t.originalEvent.pointerType.toUpperCase()]?n.touchStartX=t.originalEvent.clientX:n._pointerEvent||(n.touchStartX=t.originalEvent.touches[0].clientX)},i=function(t){n._pointerEvent&&st[t.originalEvent.pointerType.toUpperCase()]&&(n.touchDeltaX=t.originalEvent.clientX-n.touchStartX),n._handleSwipe(),"hover"===n._config.pause&&(n.pause(),n.touchTimeout&&clearTimeout(n.touchTimeout),n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval))};p(this._element.querySelectorAll(et)).on(q.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(p(this._element).on(q.POINTERDOWN,function(t){return e(t)}),p(this._element).on(q.POINTERUP,function(t){return i(t)}),this._element.classList.add($)):(p(this._element).on(q.TOUCHSTART,function(t){return e(t)}),p(this._element).on(q.TOUCHMOVE,function(t){var e;(e=t).originalEvent.touches&&1<e.originalEvent.touches.length?n.touchDeltaX=0:n.touchDeltaX=e.originalEvent.touches[0].clientX-n.touchStartX}),p(this._element).on(q.TOUCHEND,function(t){return i(t)}))}},t._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()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(tt)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===M,i=t===W,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===W?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(Z)),o=p.Event(q.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return p(this._element).trigger(o),o},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(J));p(e).removeClass(Q);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&p(n).addClass(Q)}},t._slide=function(t,e){var n,i,o,r=this,s=this._element.querySelector(Z),a=this._getItemIndex(s),l=e||s&&this._getItemByDirection(t,s),c=this._getItemIndex(l),h=Boolean(this._interval);if(o=t===M?(n=z,i=X,U):(n=Y,i=G,B),l&&p(l).hasClass(Q))this._isSliding=!1;else if(!this._triggerSlideEvent(l,o).isDefaultPrevented()&&s&&l){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(l);var u=p.Event(q.SLID,{relatedTarget:l,direction:o,from:a,to:c});if(p(this._element).hasClass(V)){p(l).addClass(i),m.reflow(l),p(s).addClass(n),p(l).addClass(n);var f=parseInt(l.getAttribute("data-interval"),10);this._config.interval=f?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,f):this._config.defaultInterval||this._config.interval;var d=m.getTransitionDurationFromElement(s);p(s).one(m.TRANSITION_END,function(){p(l).removeClass(n+" "+i).addClass(Q),p(s).removeClass(Q+" "+i+" "+n),r._isSliding=!1,setTimeout(function(){return p(r._element).trigger(u)},0)}).emulateTransitionEnd(d)}else p(s).removeClass(Q),p(l).addClass(Q),this._isSliding=!1,p(this._element).trigger(u);h&&this.cycle()}},r._jQueryInterface=function(i){return this.each(function(){var t=p(this).data(x),e=l({},R,p(this).data());"object"==typeof i&&(e=l({},e,i));var n="string"==typeof i?i:e.slide;if(t||(t=new r(this,e),p(this).data(x,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method n
9amed "'+n+'"');t[n]()}else e.interval&&e.ride&&(t.pause(),t.cycle())})},r._dataApiClickHandler=function(t){var e=m.getSelectorFromElement(this);if(e){var n=p(e)[0];if(n&&p(n).hasClass(K)){var i=l({},p(n).data(),p(this).data()),o=this.getAttribute("data-slide-to");o&&(i.interval=!1),r._jQueryInterface.call(p(n),i),o&&p(n).data(x).to(o),t.preventDefault()}}},s(r,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return R}}]),r}();p(document).on(q.CLICK_DATA_API,ot,at._dataApiClickHandler),p(window).on(q.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(rt)),e=0,n=t.length;e<n;e++){var i=p(t[e]);at._jQueryInterface.call(i,i.data())}}),p.fn[L]=at._jQueryInterface,p.fn[L].Constructor=at,p.fn[L].noConflict=function(){return p.fn[L]=j,at._jQueryInterface};var lt="collapse",ct="bs.collapse",ht="."+ct,ut=p.fn[lt],ft={toggle:!0,parent:""},dt={toggle:"boolean",parent:"(string|element)"},pt={SHOW:"show"+ht,SHOWN:"shown"+ht,HIDE:"hide"+ht,HIDDEN:"hidden"+ht,CLICK_DATA_API:"click"+ht+".data-api"},mt="show",gt="collapse",_t="collapsing",vt="collapsed",yt="width",Et="height",bt=".show, .collapsing",wt='[data-toggle="collapse"]',Ct=function(){function a(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(wt)),i=0,o=n.length;i<o;i++){var r=n[i],s=m.getSelectorFromElement(r),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&0<a.length&&(this._selector=s,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 t=a.prototype;return t.toggle=function(){p(this._element).hasClass(mt)?this.hide():this.show()},t.show=function(){var t,e,n=this;if(!this._isTransitioning&&!p(this._element).hasClass(mt)&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(bt)).filter(function(t){return"string"==typeof n._config.parent?t.getAttribute("data-parent")===n._config.parent:t.classList.contains(gt)})).length&&(t=null),!(t&&(e=p(t).not(this._selector).data(ct))&&e._isTransitioning))){var i=p.Event(pt.SHOW);if(p(this._element).trigger(i),!i.isDefaultPrevented()){t&&(a._jQueryInterface.call(p(t).not(this._selector),"hide"),e||p(t).data(ct,null));var o=this._getDimension();p(this._element).removeClass(gt).addClass(_t),this._element.style[o]=0,this._triggerArray.length&&p(this._triggerArray).removeClass(vt).attr("aria-expanded",!0),this.setTransitioning(!0);var r="scroll"+(o[0].toUpperCase()+o.slice(1)),s=m.getTransitionDurationFromElement(this._element);p(this._element).one(m.TRANSITION_END,function(){p(n._element).removeClass(_t).addClass(gt).addClass(mt),n._element.style[o]="",n.setTransitioning(!1),p(n._element).trigger(pt.SHOWN)}).emulateTransitionEnd(s),this._element.style[o]=this._element[r]+"px"}}},t.hide=function(){var t=this;if(!this._isTransitioning&&p(this._element).hasClass(mt)){var e=p.Event(pt.HIDE);if(p(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",m.reflow(this._element),p(this._element).addClass(_t).removeClass(gt).removeClass(mt);var i=this._triggerArray.length;if(0<i)for(var o=0;o<i;o++){var r=this._triggerArray[o],s=m.getSelectorFromElement(r);if(null!==s)p([].slice.call(document.querySelectorAll(s))).hasClass(mt)||p(r).addClass(vt).attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var a=m.getTransitionDurationFromElement(this._element);p(this._element).one(m.TRANSITION_END,function(){t.setTransitioning(!1),p(t._element).removeClass(_t).addClass(gt).trigger(pt.HIDDEN)}).emulateTransitionEnd(a)}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){p.removeData(this._element,ct),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=l({},ft,t)).toggle=Boolean(t.toggle),m.typeCheckConfig(lt,t,dt),t},t._getDimension=function(){return p(this._element).hasClass(yt)?yt:Et},t._getParent=function(){var t,n=this;m.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(t.querySelectorAll(e));return p(i).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){var n=p(t).hasClass(mt);e.length&&p(e).toggleClass(vt,!n).attr("aria-expanded",n)},a._getTargetFromElement=function(t){var e=m.getSelectorFromElement(t);return e?document.querySelector(e):null},a._jQueryInterface=function(i){return this.each(function(){var t=p(this),e=t.data(ct),n=l({},ft,t.data(),"object"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(ct,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method n
9amed "'+i+'"');e[i]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return ft}}]),a}();p(document).on(pt.CLICK_DATA_API,wt,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=p(this),e=m.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));p(i).each(function(){var t=p(this),e=t.data(ct)?"toggle":n.data();Ct._jQueryInterface.call(t,e)})}),p.fn[lt]=Ct._jQueryInterface,p.fn[lt].Constructor=Ct,p.fn[lt].noConflict=function(){return p.fn[lt]=ut,Ct._jQueryInterface};for(var Tt="undefined"!=typeof window&&"undefined"!=typeof document,St=["Edge","Trident","Firefox"],Dt=0,It=0;It<St.length;It+=1)if(Tt&&0<=navigator.userAgent.indexOf(St[It])){Dt=1;break}var At=Tt&&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()},Dt))}};function Ot(t){return t&&"[object Function]"==={}.toString.call(t)}function Nt(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function kt(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function Lt(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=Nt(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:Lt(kt(t))}var xt=Tt&&!(!window.MSInputMethodContext||!document.documentMode),Pt=Tt&&/MSIE 10/.test(navigator.userAgent);function Ht(t){return 11===t?xt:10===t?Pt:xt||Pt}function jt(t){if(!t)return document.documentElement;for(var e=Ht(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===Nt(n,"position")?jt(n):n:t?t.ownerDocument.documentElement:document.documentElement}function Rt(t){return null!==t.parentNode?Rt(t.parentNode):t}function Ft(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s,a,l=r.commonAncestorContainer;if(t!==l&&e!==l||i.contains(o))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&jt(s.firstElementChild)!==s?jt(l):l;var c=Rt(t);return c.host?Ft(c.host,e):Ft(t,Rt(e).host)}function Mt(t){var e="top"===(1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"!==n&&"HTML"!==n)return t[e];var i=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||i)[e]}function Wt(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+i+"Width"],10)}function Ut(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],Ht(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function Bt(t){var e=t.body,n=t.documentElement,i=Ht(10)&&getComputedStyle(n);return{height:Ut("Height",e,n,i),width:Ut("Width",e,n,i)}}var qt=function(){function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}}(),Kt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Qt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};function Vt(t){return Qt({},t,{right:t.left+t.width,bottom:t.top+t.height})}function Yt(t){var e={};try{if(Ht(10)){e=t.getBoundingClientRect();var n=Mt(t,"top"),i=Mt(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?Bt(t.ownerDocument):{},s=r.width||t.clientWidth||o.right-o.left,a=r.height||t.clientHeight||o.bottom-o.top,l=t.offsetWidth-s,c=t.offsetHeight-a;if(l||c){var h=Nt(t);l-=Wt(h,"x"),c-=Wt(h,"y"),o.width-=l,o.height-=c}return Vt(o)}function zt(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=Ht(10),o="HTML"===e.n
vendor: 8,993 bytes, line 9
9odeName,r=Yt(t),s=Yt(e),a=Lt(t),l=Nt(e),c=parseFloat(l.borderTopWidth,10),h=parseFloat(l.borderLeftWidth,10);n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var u=Vt({top:r.top-s.top-c,left:r.left-s.left-h,width:r.width,height:r.height});if(u.marginTop=0,u.marginLeft=0,!i&&o){var f=parseFloat(l.marginTop,10),d=parseFloat(l.marginLeft,10);u.top-=c-f,u.bottom-=c-f,u.left-=h-d,u.right-=h-d,u.marginTop=f,u.marginLeft=d}return(i&&!n?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(u=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=Mt(e,"top"),o=Mt(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}(u,e)),u}function Xt(t){if(!t||!t.parentElement||Ht())return document.documentElement;for(var e=t.parentElement;e&&"none"===Nt(e,"transform");)e=e.parentElement;return e||document.documentElement}function Gt(t,e,n,i){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},s=o?Xt(t):Ft(t,e);if("viewport"===i)r=function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,i=zt(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:Mt(n),a=e?0:Mt(n,"left");return Vt({top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:r})}(s,o);else{var a=void 0;"scrollParent"===i?"BODY"===(a=Lt(kt(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===i?t.ownerDocument.documentElement:i;var l=zt(a,s,o);if("HTML"!==a.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===Nt(e,"position"))return!0;var i=kt(e);return!!i&&t(i)}(s))r=l;else{var c=Bt(t.ownerDocument),h=c.height,u=c.width;r.top+=l.top-l.marginTop,r.bottom=h+l.top,r.left+=l.left-l.marginLeft,r.right=u+l.left}}var f="number"==typeof(n=n||0);return r.left+=f?n:n.left||0,r.top+=f?n:n.top||0,r.right-=f?n:n.right||0,r.bottom-=f?n:n.bottom||0,r}function $t(t,e,i,n,o){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=Gt(i,n,r,o),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 Qt({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=0<c.length?c[0].key:l[0].key,u=t.split("-")[1];return h+(u?"-"+u:"")}function Jt(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return zt(n,i?Xt(e):Ft(e,n),i)}function Zt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function te(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 ee(t,e,n){n=n.split("-")[0];var i=Zt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",l=r?"height":"width",c=r?"width":"height";return o[s]=e[s]+e[l]/2-i[l]/2,o[a]=n===a?e[a]-i[c]:e[te(a)],o}function ne(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function ie(t,n,e){return(void 0===e?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=ne(t,function(t){return t[e]===n});return t.indexOf(i)}(t,"name",e))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var e=t.function||t.fn;t.enabled&&Ot(e)&&(n.offsets.popper=Vt(n.offsets.popper),n.offsets.reference=Vt(n.offsets.reference),n=e(n,t))}),n}function oe(t,n){return t.some(function(t){var e=t.name;return t.enabled&&e===n})}function re(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var o=e[i],r=o?""+o+n:t;if("undefined"!=typeof document.body.style[r])return r}return null}function se(t){var e=t.ownerDocument;return e?e.defaultView:window}function ae(t,e,n,i){n.updateBound=i,se(t).addEventListener("resize",n.updateBound,{passive:!0});var o=Lt(t);return function t(e,n,i,o){var r="BODY"===e.nodeName,s=r?e.ownerDocument.defaultView:e;s.addEventListener(n,i,{passive:!0}),r||t(Lt(s.parentNode),n,i,o),o.push(s)}(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function le(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,se(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 ce(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function he(n,i){Object.keys(i).forEach(function(t){var e="";-1!==["width","height","top","right","bottom","left"].indexOf(t)&&ce(i[t])&&(e="px"),n.style[t]=i[t]+e})}var ue=Tt&&/Firefox/i.test(navigator.userAgent);function fe(t,e,n){var i=ne(t,function(t){return t.name===e}),o=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!o){var r="`"+e+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}var de=["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"],pe=de.slice(3);function me(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=pe.indexOf(t),i=pe.slice(n+1).concat(pe.slice(0,n));return e?i.reverse():i}var ge="flip",_e="clockwise",ve="counterclockwise";function ye(t,o,r,e){var s=[0,0],a=-1!==["right","left"].indexOf(e),n=t.split(/(\+|\-)/).map(function(t){return t.trim()}),i=n.indexOf(ne(n,function(t){return-1!==t.search(/,|\s/)}));n[i]&&-1===n[i].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==i?[n.slice(0,i).concat([n[i].split(l)[0]]),[n[i].split(l)[1]].concat(n.slice(i+1))]:[n];return(c=c.map(function(t,e){var n=(1===e?!a:a)?"height":"width",i=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,i=!0,t):i?(t[t.length-1]+=e,i=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,n,i){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2];if(!r)return t;if(0!==s.indexOf("%"))return"vh"!==s&&"vw"!==s?r:("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r;var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return Vt(a)[e]/100*r}(t,n,o,r)})})).forEach(function(n,i){n.forEach(function(t,e){ce(t)&&(s[i]+=t*("-"===n[e-1]?-1:1))})}),s}var Ee={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var o=t.offsets,r=o.reference,s=o.popper,a=-1!==["bottom","top"].indexOf(n),l=a?"left":"top",c=a?"width":"height",h={start:Kt({},l,r[l]),end:Kt({},l,r[l]+r[c]-s[c])};t.offsets.popper=Qt({},s,h[i])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,i=t.placement,o=t.offsets,r=o.popper,s=o.reference,a=i.split("-")[0],l=void 0;return l=ce(+n)?[+n,0]:ye(n,r,s,a),"left"===a?(r.top+=l[0],r.left-=l[1]):"right"===a?(r.top+=l[0],r.left+=l[1]):"top"===a?(r.left+=l[0],r.top-=l[1]):"bottom"===a&&(r.left+=l[0],r.top+=l[1]),t.popper=r,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,i){var e=i.boundariesElement||jt(t.instance.popper);t.instance.reference===e&&(e=jt(e));var n=re("transform"),o=t.instance.popper.style,r=o.top,s=o.left,a=o[n];o.top="",o.left="",o[n]="";var l=Gt(t.instance.popper,t.instance.reference,i.padding,e,t.positionFixed);o.top=r,o.left=s,o[n]=a,i.boundaries=l;var c=i.priority,h=t.offsets.popper,u={primary:function(t){var e=h[t];return h[t]<l[t]&&!i.escapeWithReference&&(e=Math.max(h[t],l[t])),Kt({},t,e)},secondary:function(t){var e="right"===t?"left":"top",n=h[e];return h[t]>l[t]&&!i.escapeWithReference&&(n=Math.min(h[e],l[t]-("right"===t?h.width:h.height))),Kt({},e,n)}};return c.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";h=Qt({},h,u[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,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]<r(i[l])&&(t.offsets.popper[l]=r(i[l])-n[c]),n[l]>
vendor: 4,451 bytes, line 9
9r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!fe(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",h=l?"Top":"Left",u=h.toLowerCase(),f=l?"left":"top",d=l?"bottom":"right",p=Zt(i)[c];a[d]-p<s[u]&&(t.offsets.popper[u]-=s[u]-(a[d]-p)),a[u]+p>s[d]&&(t.offsets.popper[u]+=a[u]+p-s[d]),t.offsets.popper=Vt(t.offsets.popper);var m=a[u]+a[c]/2-p/2,g=Nt(t.instance.popper),_=parseFloat(g["margin"+h],10),v=parseFloat(g["border"+h+"Width"],10),y=m-t.offsets.popper[u]-_-v;return y=Math.max(Math.min(s[c]-p,y),0),t.arrowElement=i,t.offsets.arrow=(Kt(n={},u,Math.round(y)),Kt(n,f,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(p,m){if(oe(p.instance.modifiers,"inner"))return p;if(p.flipped&&p.placement===p.originalPlacement)return p;var g=Gt(p.instance.popper,p.instance.reference,m.padding,m.boundariesElement,p.positionFixed),_=p.placement.split("-")[0],v=te(_),y=p.placement.split("-")[1]||"",E=[];switch(m.behavior){case ge:E=[_,v];break;case _e:E=me(_);break;case ve:E=me(_,!0);break;default:E=m.behavior}return E.forEach(function(t,e){if(_!==t||E.length===e+1)return p;_=p.placement.split("-")[0],v=te(_);var n,i=p.offsets.popper,o=p.offsets.reference,r=Math.floor,s="left"===_&&r(i.right)>r(o.left)||"right"===_&&r(i.left)<r(o.right)||"top"===_&&r(i.bottom)>r(o.top)||"bottom"===_&&r(i.top)<r(o.bottom),a=r(i.left)<r(g.left),l=r(i.right)>r(g.right),c=r(i.top)<r(g.top),h=r(i.bottom)>r(g.bottom),u="left"===_&&a||"right"===_&&l||"top"===_&&c||"bottom"===_&&h,f=-1!==["top","bottom"].indexOf(_),d=!!m.flipVariations&&(f&&"start"===y&&a||f&&"end"===y&&l||!f&&"start"===y&&c||!f&&"end"===y&&h);(s||u||d)&&(p.flipped=!0,(s||u)&&(_=E[e+1]),d&&(y="end"===(n=y)?"start":"start"===n?"end":n),p.placement=_+(y?"-"+y:""),p.offsets.popper=Qt({},p.offsets.popper,ee(p.instance.popper,p.offsets.reference,p.placement)),p=ie(p.instance.modifiers,p,"flip"))}),p},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=te(e),t.offsets.popper=Vt(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!fe(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=ne(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var n=e.x,i=e.y,o=t.offsets.popper,r=ne(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s,a,l,c,h,u,f,d,p,m,g,_,v,y,E=void 0!==r?r:e.gpuAcceleration,b=jt(t.instance.popper),w=Yt(b),C={position:o.position},T=(s=t,a=window.devicePixelRatio<2||!ue,l=s.offsets,c=l.popper,h=l.reference,u=Math.round,f=Math.floor,d=function(t){return t},p=u(h.width),m=u(c.width),g=-1!==["left","right"].indexOf(s.placement),_=-1!==s.placement.indexOf("-"),y=a?u:d,{left:(v=a?g||_||p%2==m%2?u:f:d)(p%2==1&&m%2==1&&!_&&a?c.left-1:c.left),top:y(c.top),bottom:y(c.bottom),right:v(c.right)}),S="bottom"===n?"top":"bottom",D="right"===i?"left":"right",I=re("transform"),A=void 0,O=void 0;if(O="bottom"===S?"HTML"===b.nodeName?-b.clientHeight+T.bottom:-w.height+T.bottom:T.top,A="right"===D?"HTML"===b.nodeName?-b.clientWidth+T.right:-w.width+T.right:T.left,E&&I)C[I]="translate3d("+A+"px, "+O+"px, 0)",C[S]=0,C[D]=0,C.willChange="transform";else{var N="bottom"===S?-1:1,k="right"===D?-1:1;C[S]=O*N,C[D]=A*k,C.willChange=S+", "+D}var L={"x-placement":t.placement};return t.attributes=Qt({},L,t.attributes),t.styles=Qt({},C,t.styles),t.arrowStyles=Qt({},t.offsets.arrow,t.arrowStyles),t}
vendor: 4,105 bytes, line 9
9,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,n;return he(t.instance.popper,t.styles),e=t.instance.popper,n=t.attributes,Object.keys(n).forEach(function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)}),t.arrowElement&&Object.keys(t.arrowStyles).length&&he(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,n,i,o){var r=Jt(o,e,t,n.positionFixed),s=$t(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",s),he(e,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},be=function(){function r(t,e){var n=this,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=At(this.update.bind(this)),this.options=Qt({},r.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=e&&e.jquery?e[0]:e,this.options.modifiers={},Object.keys(Qt({},r.Defaults.modifiers,i.modifiers)).forEach(function(t){n.options.modifiers[t]=Qt({},r.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return Qt({name:t},n.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&Ot(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return qt(r,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=Jt(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=$t(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=ee(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=ie(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,oe(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[re("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=ae(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return le.call(this)}}]),r}();be.Utils=("undefined"!=typeof window?window:global).PopperUtils,be.placements=de,be.Defaults=Ee;var we="dropdown",Ce="bs.dropdown",Te="."+Ce,Se=".data-api",De=p.fn[we],Ie=new RegExp("38|40|27"),Ae={HIDE:"hide"+Te,HIDDEN:"hidden"+Te,SHOW:"show"+Te,SHOWN:"shown"+Te,CLICK:"click"+Te,CLICK_DATA_API:"click"+Te+Se,KEYDOWN_DATA_API:"keydown"+Te+Se,KEYUP_DATA_API:"keyup"+Te+Se},Oe="disabled",Ne="show",ke="dropup",Le="dropright",xe="dropleft",Pe="dropdown-menu-right",He="position-static",je='[data-toggle="dropdown"]',Re=".dropdown form",Fe=".dropdown-menu",Me=".navbar-nav",We=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Ue="top-start",Be="top-end",qe="bottom-start",Ke="bottom-end",Qe="right-start",Ve="left-start",Ye={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},ze={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"str
9ing"},Xe=function(){function c(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=c.prototype;return t.toggle=function(){if(!this._element.disabled&&!p(this._element).hasClass(Oe)){var t=c._getParentFromElement(this._element),e=p(this._menu).hasClass(Ne);if(c._clearMenus(),!e){var n={relatedTarget:this._element},i=p.Event(Ae.SHOW,n);if(p(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof be)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var o=this._element;"parent"===this._config.reference?o=t:m.isElement(this._config.reference)&&(o=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(o=this._config.reference[0])),"scrollParent"!==this._config.boundary&&p(t).addClass(He),this._popper=new be(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===p(t).closest(Me).length&&p(document.body).children().on("mouseover",null,p.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),p(this._menu).toggleClass(Ne),p(t).toggleClass(Ne).trigger(p.Event(Ae.SHOWN,n))}}}},t.show=function(){if(!(this._element.disabled||p(this._element).hasClass(Oe)||p(this._menu).hasClass(Ne))){var t={relatedTarget:this._element},e=p.Event(Ae.SHOW,t),n=c._getParentFromElement(this._element);p(n).trigger(e),e.isDefaultPrevented()||(p(this._menu).toggleClass(Ne),p(n).toggleClass(Ne).trigger(p.Event(Ae.SHOWN,t)))}},t.hide=function(){if(!this._element.disabled&&!p(this._element).hasClass(Oe)&&p(this._menu).hasClass(Ne)){var t={relatedTarget:this._element},e=p.Event(Ae.HIDE,t),n=c._getParentFromElement(this._element);p(n).trigger(e),e.isDefaultPrevented()||(p(this._menu).toggleClass(Ne),p(n).toggleClass(Ne).trigger(p.Event(Ae.HIDDEN,t)))}},t.dispose=function(){p.removeData(this._element,Ce),p(this._element).off(Te),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;p(this._element).on(Ae.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=l({},this.constructor.Default,p(this._element).data(),t),m.typeCheckConfig(we,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=c._getParentFromElement(this._element);t&&(this._menu=t.querySelector(Fe))}return this._menu},t._getPlacement=function(){var t=p(this._element.parentNode),e=qe;return t.hasClass(ke)?(e=Ue,p(this._menu).hasClass(Pe)&&(e=Be)):t.hasClass(Le)?e=Qe:t.hasClass(xe)?e=Ve:p(this._menu).hasClass(Pe)&&(e=Ke),e},t._detectNavbar=function(){return 0<p(this._element).closest(".navbar").length},t._getOffset=function(){var e=this,t={};return"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e._config.offset(t.offsets,e._element)||{}),t}:t.offset=this._config.offset,t},t._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),t},c._jQueryInterface=function(e){return this.each(function(){var t=p(this).data(Ce);if(t||(t=new c(this,"object"==typeof e?e:null),p(this).data(Ce,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},c._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var e=[].slice.call(document.querySelectorAll(je)),n=0,i=e.length;n<i;n++){var o=c._getParentFromElement(e[n]),r=p(e[n]).data(Ce),s={relatedTarget:e[n]};if(t&&"click"===t.type&&(s.clickEvent=t),r){var a=r._menu;if(p(o).hasClass(Ne)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&p.contains(o,t.target))){var l=p.Event(Ae.HIDE,s);p(o).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&p(document.body).children().off("mouseover",null,p.noop),e[n].setAttribute("aria-expanded","fal
9se"),p(a).removeClass(Ne),p(o).removeClass(Ne).trigger(p.Event(Ae.HIDDEN,s)))}}}},c._getParentFromElement=function(t){var e,n=m.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},c._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||p(t.target).closest(Fe).length)):Ie.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!p(this).hasClass(Oe))){var e=c._getParentFromElement(this),n=p(e).hasClass(Ne);if(n&&(!n||27!==t.which&&32!==t.which)){var i=[].slice.call(e.querySelectorAll(We));if(0!==i.length){var o=i.indexOf(t.target);38===t.which&&0<o&&o--,40===t.which&&o<i.length-1&&o++,o<0&&(o=0),i[o].focus()}}else{if(27===t.which){var r=e.querySelector(je);p(r).trigger("focus")}p(this).trigger("click")}}},s(c,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Ye}},{key:"DefaultType",get:function(){return ze}}]),c}();p(document).on(Ae.KEYDOWN_DATA_API,je,Xe._dataApiKeydownHandler).on(Ae.KEYDOWN_DATA_API,Fe,Xe._dataApiKeydownHandler).on(Ae.CLICK_DATA_API+" "+Ae.KEYUP_DATA_API,Xe._clearMenus).on(Ae.CLICK_DATA_API,je,function(t){t.preventDefault(),t.stopPropagation(),Xe._jQueryInterface.call(p(this),"toggle")}).on(Ae.CLICK_DATA_API,Re,function(t){t.stopPropagation()}),p.fn[we]=Xe._jQueryInterface,p.fn[we].Constructor=Xe,p.fn[we].noConflict=function(){return p.fn[we]=De,Xe._jQueryInterface};var Ge="modal",$e="bs.modal",Je="."+$e,Ze=p.fn[Ge],tn={backdrop:!0,keyboard:!0,focus:!0,show:!0},en={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},nn={HIDE:"hide"+Je,HIDDEN:"hidden"+Je,SHOW:"show"+Je,SHOWN:"shown"+Je,FOCUSIN:"focusin"+Je,RESIZE:"resize"+Je,CLICK_DISMISS:"click.dismiss"+Je,KEYDOWN_DISMISS:"keydown.dismiss"+Je,MOUSEUP_DISMISS:"mouseup.dismiss"+Je,MOUSEDOWN_DISMISS:"mousedown.dismiss"+Je,CLICK_DATA_API:"click"+Je+".data-api"},on="modal-dialog-scrollable",rn="modal-scrollbar-measure",sn="modal-backdrop",an="modal-open",ln="fade",cn="show",hn=".modal-dialog",un=".modal-body",fn='[data-toggle="modal"]',dn='[data-dismiss="modal"]',pn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",mn=".sticky-top",gn=function(){function o(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(hn),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var t=o.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){p(this._element).hasClass(ln)&&(this._isTransitioning=!0);var n=p.Event(nn.SHOW,{relatedTarget:t});p(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),p(this._element).on(nn.CLICK_DISMISS,dn,function(t){return e.hide(t)}),p(this._dialog).on(nn.MOUSEDOWN_DISMISS,function(){p(e._element).one(nn.MOUSEUP_DISMISS,function(t){p(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=p.Event(nn.HIDE);if(p(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=p(this._element).hasClass(ln);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),p(document).off(nn.FOCUSIN),p(this._element).removeClass(cn),p(this._element).off(nn.CLICK_DISMISS),p(this._dialog).off(nn.MOUSEDOWN_DISMISS),i){var o=m.getTransitionDurationFromElement(this._element);p(this._element).one(m.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(o)}else this._hideModal()}}},t.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return p(t).off(Je)}),p(document).off(nn.FOCUSIN),p.removeData(this._element,$e),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=l({},tn,t),m.typeCheckConfig(Ge,t,en),t},t._showElement=function(t){var e=this,n=p(this._element).hasClass(ln);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),p(this._dialog).hasClass(on)?this._dialog.querySelector(un).scrollTop=0:this._element.scrollTop=0,n&&m.reflow(this._element),p(this._element).addClass(cn),this._config.focus&&this._enforceFocus();var i=p.Event(nn.SHOWN,{relatedTarget:t}),o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,p(e._element).trigger(i)};if(n){var r=m.getTransitionDurationFromElement(this._dialog);p(this._dialog).one(m.TRANSITION_END,o).emulateTransitionEnd(r)}else o()},t._enforceFocus=function(){var e=this;p(document).off(nn.FOCUSIN).on(nn.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===p(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?p(this._element).on(nn.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||p(this._element).off(nn.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?p(window).on(nn.RESIZE,function(t){return e.handleUpdate(t)}):p(window).off(nn.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop(function(){p(document.body).removeClass(an),t._resetAdjustments(),t._resetScrollbar(),p(t._element).trigger(nn.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&(p(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,n=p(this._element).hasClass(ln)?ln:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=sn,n&&this._backdrop.classList.add(n),p(this._backdrop).appendTo(document.body),p(this._element).on(nn.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),n&&m.reflow(this._backdrop),p(this._backdrop).addClass(cn),!t)return;if(!n)return void t();var i=m.getTransitionDurationFromElement(this._backdrop);p(this._backdrop).one(m.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){p(this._backdrop).removeClass(cn);var o=function(){e._removeBackdrop(),t&&t()};if(p(this._element).hasClass(ln)){var r=m.getTransitionDurationFromElement(this._backdrop);p(this._backdrop).one(m.TRANSITION_END,o).emulateTransitionEnd(r)}else o()}else t&&t()},t._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")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var o=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(pn)),e=[].slice.call(document.querySelectorAll(mn));p(t).each(function(t,e){var n=e.style.paddingRight,i=p(e).css("padding-right");p(e).data("padding-right",n).css("padding-right",parseFloat(i)+o._scrollbarWidth+"px")}),p(e).each(function(t,e){var n=e.style.marginRight,i=p(e).css("margin-right");p(e).data("margin-right",n).css("margin-right",parseFloat(i)-o._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=p(document.body).css("padding-right");p(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}p(document.body).addClass(an)},t._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(pn));p(t).each(function(t,e){var n=p(e).data("padding-right");p(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(""+mn));p(e).each(function(t,e){var n=p(e).data("margin-right");"undefined"!=typeof n&&p(e).css("margin-right",n).removeData("margin-right")});var n=p(document.body).data("padding-right");p(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=rn,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(n,i){return this.each(function(){var t=p(this).data($e),e=l({},tn,p(this).data(),"object"==typeof n&&n?n:{});if(t||(t=new o(this,e),p(this).data($e,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method n
9amed "'+n+'"');t[n](i)}else e.show&&t.show(i)})},s(o,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return tn}}]),o}();p(document).on(nn.CLICK_DATA_API,fn,function(t){var e,n=this,i=m.getSelectorFromElement(this);i&&(e=document.querySelector(i));var o=p(e).data($e)?"toggle":l({},p(e).data(),p(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var r=p(e).one(nn.SHOW,function(t){t.isDefaultPrevented()||r.one(nn.HIDDEN,function(){p(n).is(":visible")&&n.focus()})});gn._jQueryInterface.call(p(e),o,this)}),p.fn[Ge]=gn._jQueryInterface,p.fn[Ge].Constructor=gn,p.fn[Ge].noConflict=function(){return p.fn[Ge]=Ze,gn._jQueryInterface};var _n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],vn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},yn=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,En=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function bn(t,s,e){if(0===t.length)return t;if(e&&"function"==typeof e)return e(t);for(var n=(new window.DOMParser).parseFromString(t,"text/html"),a=Object.keys(s),l=[].slice.call(n.body.querySelectorAll("*")),i=function(t,e){var n=l[t],i=n.nodeName.toLowerCase();if(-1===a.indexOf(n.nodeName.toLowerCase()))return n.parentNode.removeChild(n),"continue";var o=[].slice.call(n.attributes),r=[].concat(s["*"]||[],s[i]||[]);o.forEach(function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===_n.indexOf(n)||Boolean(t.nodeValue.match(yn)||t.nodeValue.match(En));for(var i=e.filter(function(t){return t instanceof RegExp}),o=0,r=i.length;o<r;o++)if(n.match(i[o]))return!0;return!1})(t,r)||n.removeAttribute(t.nodeName)})},o=0,r=l.length;o<r;o++)i(o);return n.body.innerHTML}var wn="tooltip",Cn="bs.tooltip",Tn="."+Cn,Sn=p.fn[wn],Dn="bs-tooltip",In=new RegExp("(^|\\s)"+Dn+"\\S+","g"),An=["sanitize","whiteList","sanitizeFn"],On={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},Nn={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},kn={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:vn},Ln="show",xn="out",Pn={HIDE:"hide"+Tn,HIDDEN:"hidden"+Tn,SHOW:"show"+Tn,SHOWN:"shown"+Tn,INSERTED:"inserted"+Tn,CLICK:"click"+Tn,FOCUSIN:"focusin"+Tn,FOCUSOUT:"focusout"+Tn,MOUSEENTER:"mouseenter"+Tn,MOUSELEAVE:"mouseleave"+Tn},Hn="fade",jn="show",Rn=".tooltip-inner",Fn=".arrow",Mn="hover",Wn="focus",Un="click",Bn="manual",qn=function(){function i(t,e){if("undefined"==typeof be)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=p(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(p(this.getTipElement()).hasClass(jn))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),p.removeData(this.element,this.constructor.DATA_KEY),p(this.element).off(this.constructor.EVENT_KEY),p(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&p(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},t.show=function(){var e=this;if("none"===p(this.element).css("display"))throw new Error("Please use show on visible elements");var t=p.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){p(this.element).trigger(t);var n=m.findShadowRoot(this.element),i=p.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=m.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&p(o).addClass(Hn);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();p(o).data(this.constructor.DATA_KEY,this),p.contains(this.element.ownerDocument.documentElement,this.tip)||p(o).appendTo(l),p(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new be(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Fn}
9,preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),p(o).addClass(jn),"ontouchstart"in document.documentElement&&p(document.body).children().on("mouseover",null,p.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,p(e.element).trigger(e.constructor.Event.SHOWN),t===xn&&e._leave(null,e)};if(p(this.tip).hasClass(Hn)){var h=m.getTransitionDurationFromElement(this.tip);p(this.tip).one(m.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=p.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==Ln&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),p(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(p(this.element).trigger(i),!i.isDefaultPrevented()){if(p(n).removeClass(jn),"ontouchstart"in document.documentElement&&p(document.body).children().off("mouseover",null,p.noop),this._activeTrigger[Un]=!1,this._activeTrigger[Wn]=!1,this._activeTrigger[Mn]=!1,p(this.tip).hasClass(Hn)){var r=m.getTransitionDurationFromElement(n);p(n).one(m.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){p(this.getTipElement()).addClass(Dn+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||p(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(p(t.querySelectorAll(Rn)),this.getTitle()),p(t).removeClass(Hn+" "+jn)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=bn(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?p(e).parent().is(t)||t.empty().append(e):t.text(p(e).text())},t.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},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:m.isElement(this.config.container)?p(this.config.container):p(document).find(this.config.container)},t._getAttachment=function(t){return Nn[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)p(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Bn){var e=t===Mn?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===Mn?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;p(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),p(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._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",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||p(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Wn:Mn]=!0),p(e.getTipElement()).hasClass(jn)||e._hoverState===Ln?e._hoverState=Ln:(clearTimeout(e._timeout),e._hoverState=Ln,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===Ln&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||p(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Wn:Mn]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=xn,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===xn&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=p(this.element).data();return Object.keys(e).forEach(function(t){-1!==An.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),m.typeCheckConfig(wn,t,this.constructor.DefaultType),t.sanitize&&(t.template=bn(t.template,t.whiteList,t.sanitizeFn)),t},t._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},t._cleanTipClass=function(){var t=p(this.getTipElement()),e=t.attr("class").match(In);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(p(t).removeClass(Hn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=p(this).data(Cn),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),p(this).data(Cn,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method n
9amed "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return kn}},{key:"NAME",get:function(){return wn}},{key:"DATA_KEY",get:function(){return Cn}},{key:"Event",get:function(){return Pn}},{key:"EVENT_KEY",get:function(){return Tn}},{key:"DefaultType",get:function(){return On}}]),i}();p.fn[wn]=qn._jQueryInterface,p.fn[wn].Constructor=qn,p.fn[wn].noConflict=function(){return p.fn[wn]=Sn,qn._jQueryInterface};var Kn="popover",Qn="bs.popover",Vn="."+Qn,Yn=p.fn[Kn],zn="bs-popover",Xn=new RegExp("(^|\\s)"+zn+"\\S+","g"),Gn=l({},qn.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>'}),$n=l({},qn.DefaultType,{content:"(string|element|function)"}),Jn="fade",Zn="show",ti=".popover-header",ei=".popover-body",ni={HIDE:"hide"+Vn,HIDDEN:"hidden"+Vn,SHOW:"show"+Vn,SHOWN:"shown"+Vn,INSERTED:"inserted"+Vn,CLICK:"click"+Vn,FOCUSIN:"focusin"+Vn,FOCUSOUT:"focusout"+Vn,MOUSEENTER:"mouseenter"+Vn,MOUSELEAVE:"mouseleave"+Vn},ii=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){p(this.getTipElement()).addClass(zn+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||p(this.config.template)[0],this.tip},o.setContent=function(){var t=p(this.getTipElement());this.setElementContent(t.find(ti),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(ei),e),t.removeClass(Jn+" "+Zn)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=p(this.getTipElement()),e=t.attr("class").match(Xn);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=p(this).data(Qn),e="object"==typeof n?n:null;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),p(this).data(Qn,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return Gn}},{key:"NAME",get:function(){return Kn}},{key:"DATA_KEY",get:function(){return Qn}},{key:"Event",get:function(){return ni}},{key:"EVENT_KEY",get:function(){return Vn}},{key:"DefaultType",get:function(){return $n}}]),i}(qn);p.fn[Kn]=ii._jQueryInterface,p.fn[Kn].Constructor=ii,p.fn[Kn].noConflict=function(){return p.fn[Kn]=Yn,ii._jQueryInterface};var oi="scrollspy",ri="bs.scrollspy",si="."+ri,ai=p.fn[oi],li={offset:10,method:"auto",target:""},ci={offset:"number",method:"string",target:"(string|element)"},hi={ACTIVATE:"activate"+si,SCROLL:"scroll"+si,LOAD_DATA_API:"load"+si+".data-api"},ui="dropdown-item",fi="active",di='[data-spy="scroll"]',pi=".nav, .list-group",mi=".nav-link",gi=".nav-item",_i=".list-group-item",vi=".dropdown",yi=".dropdown-item",Ei=".dropdown-toggle",bi="offset",wi="position",Ci=function(){function n(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+mi+","+this._config.target+" "+_i+","+this._config.target+" "+yi,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,p(this._scrollElement).on(hi.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?bi:wi,o="auto"===this._config.method?t:this._config.method,r=o===wi?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=m.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[p(e)[o]().top+r,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}
9).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){p.removeData(this._element,ri),p(this._scrollElement).off(si),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){if("string"!=typeof(t=l({},li,"object"==typeof t&&t?t:{})).target){var e=p(t.target).attr("id");e||(e=m.getUID(oi),p(t.target).attr("id",e)),t.target="#"+e}return m.typeCheckConfig(oi,t,ci),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",").map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'}),n=p([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(ui)?(n.closest(vi).find(Ei).addClass(fi),n.addClass(fi)):(n.addClass(fi),n.parents(pi).prev(mi+", "+_i).addClass(fi),n.parents(pi).prev(gi).children(mi).addClass(fi)),p(this._scrollElement).trigger(hi.ACTIVATE,{relatedTarget:e})},t._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(t){return t.classList.contains(fi)}).forEach(function(t){return t.classList.remove(fi)})},n._jQueryInterface=function(e){return this.each(function(){var t=p(this).data(ri);if(t||(t=new n(this,"object"==typeof e&&e),p(this).data(ri,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return li}}]),n}();p(window).on(hi.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(di)),e=t.length;e--;){var n=p(t[e]);Ci._jQueryInterface.call(n,n.data())}}),p.fn[oi]=Ci._jQueryInterface,p.fn[oi].Constructor=Ci,p.fn[oi].noConflict=function(){return p.fn[oi]=ai,Ci._jQueryInterface};var Ti="bs.tab",Si="."+Ti,Di=p.fn.tab,Ii={HIDE:"hide"+Si,HIDDEN:"hidden"+Si,SHOW:"show"+Si,SHOWN:"shown"+Si,CLICK_DATA_API:"click"+Si+".data-api"},Ai="dropdown-menu",Oi="active",Ni="disabled",ki="fade",Li="show",xi=".dropdown",Pi=".nav, .list-group",Hi=".active",ji="> li > .active",Ri='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Fi=".dropdown-toggle",Mi="> .dropdown-menu .active",Wi=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&p(this._element).hasClass(Oi)||p(this._element).hasClass(Ni))){var t,i,e=p(this._element).closest(Pi)[0],o=m.getSelectorFromElement(this._element);if(e){var r="UL"===e.nodeName||"OL"===e.nodeName?ji:Hi;i=(i=p.makeArray(p(e).find(r)))[i.length-1]}var s=p.Event(Ii.HIDE,{relatedTarget:this._element}),a=p.Event(Ii.SHOW,{relatedTarget:i});if(i&&p(i).trigger(s),p(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){o&&(t=document.querySelector(o)),this._activate(this._element,e);var l=function(){var t=p.Event(Ii.HIDDEN,{relatedTarget:n._element}),e=p.Event(Ii.SHOWN,{relatedTarget:i});p(i).trigger(t),p(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){p.removeData(this._element,Ti),this._element=null},t._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?p(e).children(Hi):p(e).find(ji))[0],r=n&&o&&p(o).hasClass(ki),s=function(){return i._transitionComplete(t,o,n)};if(o&&r){var a=m.getTransitionDurationFromElement(o);p(o).removeClass(Li).one(m.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){p(e).removeClass(Oi);var i=p(e.parentNode).find(Mi)[0];i&&p(i).removeClass(Oi),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(p(t).addClass(Oi),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),m.reflow(t),t.classList.contains(ki)&&t.classList.add(Li),t.parentNode&&p(t.parentNode).hasClass(Ai)){var o=p(t).closest(xi)[0];if(o){var r=[].slice.call(o.querySelectorAll(Fi));p(r).addClass(Oi)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=p(this),e=t.data(Ti);if(e||(e=new i(this),t.data(Ti,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method n
9amed "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();p(document).on(Ii.CLICK_DATA_API,Ri,function(t){t.preventDefault(),Wi._jQueryInterface.call(p(this),"show")}),p.fn.tab=Wi._jQueryInterface,p.fn.tab.Constructor=Wi,p.fn.tab.noConflict=function(){return p.fn.tab=Di,Wi._jQueryInterface};var Ui="toast",Bi="bs.toast",qi="."+Bi,Ki=p.fn[Ui],Qi={CLICK_DISMISS:"click.dismiss"+qi,HIDE:"hide"+qi,HIDDEN:"hidden"+qi,SHOW:"show"+qi,SHOWN:"shown"+qi},Vi="fade",Yi="hide",zi="show",Xi="showing",Gi={animation:"boolean",autohide:"boolean",delay:"number"},$i={animation:!0,autohide:!0,delay:500},Ji='[data-dismiss="toast"]',Zi=function(){function i(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var t=i.prototype;return t.show=function(){var t=this;p(this._element).trigger(Qi.SHOW),this._config.animation&&this._element.classList.add(Vi);var e=function(){t._element.classList.remove(Xi),t._element.classList.add(zi),p(t._element).trigger(Qi.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove(Yi),this._element.classList.add(Xi),this._config.animation){var n=m.getTransitionDurationFromElement(this._element);p(this._element).one(m.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},t.hide=function(t){var e=this;this._element.classList.contains(zi)&&(p(this._element).trigger(Qi.HIDE),t?this._close():this._timeout=setTimeout(function(){e._close()},this._config.delay))},t.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(zi)&&this._element.classList.remove(zi),p(this._element).off(Qi.CLICK_DISMISS),p.removeData(this._element,Bi),this._element=null,this._config=null},t._getConfig=function(t){return t=l({},$i,p(this._element).data(),"object"==typeof t&&t?t:{}),m.typeCheckConfig(Ui,t,this.constructor.DefaultType),t},t._setListeners=function(){var t=this;p(this._element).on(Qi.CLICK_DISMISS,Ji,function(){return t.hide(!0)})},t._close=function(){var t=this,e=function(){t._element.classList.add(Yi),p(t._element).trigger(Qi.HIDDEN)};if(this._element.classList.remove(zi),this._config.animation){var n=m.getTransitionDurationFromElement(this._element);p(this._element).one(m.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},i._jQueryInterface=function(n){return this.each(function(){var t=p(this),e=t.data(Bi);if(e||(e=new i(this,"object"==typeof n&&n),t.data(Bi,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n](this)}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return Gi}},{key:"Default",get:function(){return $i}}]),i}();p.fn[Ui]=Zi._jQueryInterface,p.fn[Ui].Constructor=Zi,p.fn[Ui].noConflict=function(){return p.fn[Ui]=Ki,Zi._jQueryInterface},function(){if("undefined"==typeof p)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=p.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||4<=t[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=m,t.Alert=g,t.Button=k,t.Carousel=at,t.Collapse=Ct,t.Dropdown=Xe,t.Modal=gn,t.Popover=ii,t.Scrollspy=Ci,t.Tab=Wi,t.Toast=Zi,t.Tooltip=qn,Object.defineProperty(t,"__esModule",{value:!0})});
10//# sourceMappingURL=bootstrap.bundle.min.js.map
11/**
12 * NetteForms - simple form validation.
13 *
14 * This file is part of the Nette Framework (https://nette.org)
15 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
16 */
17
18(function(global, factory) {
19	if (!global.JSON) {
20		return;
21	}
22
23	if (typeof define === 'function' && define.amd) {
24		define(function() {
25			return factory(global);
26		});
27	} else if (typeof module === 'object' && typeof module.exports === 'object') {
28		module.exports = factory(global);
29	} else {
30		var init = !global.Nette || !global.Nette.noInit;
31		global.Nette = factory(global);
32		if (init) {
33			global.Nette.initOnLoad();
34		}
35	}
36
37}(typeof window !== 'undefined' ? window : this, function(window) {
38
39	'use strict';
40
41	var Nette = {};
42
43	Nette.formErrors = [];
44	Nette.version = '2.4';
45
46
47	/**
48	 * Attaches a handler to an event for the element.
49	 */
50	Nette.addEvent = function(element, on, callback) {
51		if (element.addEventListener) {
52			element.addEventListener(on, callback);
53		} else if (on === 'DOMContentLoaded') {
54			element.attachEvent('onreadystatechange', function() {
55				if (element.readyState === 'complete') {
56					callback.call(this);
57				}
58			});
59		} else {
60			element.attachEvent('on' + on, getHandler(callback));
61		}
62	};
63
64
65	function getHandler(callback) {
66		return function(e) {
67			return callback.call(this, e);
68		};
69	}
70
71
72	/**
73	 * Returns the value of form element.
74	 */
75	Nette.getValue = function(elem) {
76		var i;
77		if (!elem) {
78			return null;
79
80		} else if (!elem.tagName) { // RadioNodeList, HTMLCollection, array
81			return elem[0] ? Nette.getValue(elem[0]) : null;
82
83		} else if (elem.type === 'radio') {
84			var elements = elem.form.elements; // prevents problem with name 'item' or 'namedItem'
85			for (i = 0; i < elements.length; i++) {
86				if (elements[i].name === elem.name && elements[i].checked) {
87					return elements[i].value;
88				}
89			}
90			return null;
91
92		} else if (elem.type === 'file') {
93			return elem.files || elem.value;
94
95		} else if (elem.tagName.toLowerCase() === 'select') {
96			var index = elem.selectedIndex,
97				options = elem.options,
98				values = [];
99
100			if (elem.type === 'select-one') {
101				return index < 0 ? null : options[index].value;
102			}
103
104			for (i = 0; i < options.length; i++) {
105				if (options[i].selected) {
106					values.push(options[i].value);
107				}
108			}
109			return values;
110
111		} else if (elem.name && elem.name.match(/\[\]$/)) { // multiple elements []
112			var elements = elem.form.elements[elem.name].tagName ? [elem] : elem.form.elements[elem.name],
113				values = [];
114
115			for (i = 0; i < elements.length; i++) {
116				if (elements[i].type !== 'checkbox' || elements[i].checked) {
117					values.push(elements[i].value);
118				}
119			}
120			return values;
121
122		} else if (elem.type === 'checkbox') {
123			return elem.checked;
124
125		} else if (elem.tagName.toLowerCase() === 'textarea') {
126			return elem.value.replace('\r', '');
127
128		} else {
129			return elem.value.replace('\r', '').replace(/^\s+|\s+$/g, '');
130		}
131	};
132
133
134	/**
135	 * Returns the effective value of form element.
136	 */
137	Nette.getEffectiveValue = function(elem) {
138		var val = Nette.getValue(elem);
139		if (elem.getAttribute) {
140			if (val === elem.getAttribute('data-nette-empty-value')) {
141				val = '';
142			}
143		}
144		return val;
145	};
146
147
148	/**
149	 * Validates form element against given rules.
150	 */
151	Nette.validateControl = function(elem, rules, onlyCheck, value, emptyOptional) {
152		elem = elem.tagName ? elem : elem[0]; // RadioNodeList
153		rules = rules || Nette.parseJSON(elem.getAttribute('data-nette-rules'));
154		value = value === undefined ? {value: Nette.getEffectiveValue(elem)} : value;
155
156		for (var id = 0, len = rules.length; id < len; id++) {
157			var rule = rules[id],
158				op = rule.op.match(/(~)?([^?]+)/),
159				curElem = rule.control ? elem.form.elements.namedItem(rule.control) : elem;
160
161			rule.neg = op[1];
162			rule.op = op[2];
163			rule.condition = !!rule.rules;
164
165			if (!curElem) {
166				continue;
167			} else if (rule.op === 'optional') {
168				emptyOptional = !Nette.validateRule(elem, ':filled', null, value);
169				continue;
170			} else if (emptyOptional && !rule.condition && rule.op !== ':filled') {
171				continue;
172			}
173
174			curElem = curElem.tagName ? curElem : curElem[0]; // RadioNodeList
175			var curValue = elem === curElem ? value : {value: Nette.getEffectiveValue(curElem)},
176				success = Nette.validateRule(curElem, rule.op, rule.arg, curValue);
177
178			if (success === null) {
179				continue;
180			} else if (rule.neg) {
181				success = !success;
182			}
183
184			if (rule.condition && success) {
185				if (!Nette.validateControl(elem, rule.rules, onlyCheck, value, rule.op === ':blank' ? false : emptyOptional)) {
186					return false;
187				}
188			} else if (!rule.condition && !success) {
189				if (Nette.isDisabled(curElem)) {
190					continue;
191				}
192				if (!onlyCheck) {
193					var arr = Nette.isArray(rule.arg) ? rule.arg : [rule.arg],
194						message = rule.msg.replace(/%(value|\d+)/g, function(foo, m) {
195							return Nette.getValue(m === 'value' ? curElem : elem.form.elements.namedItem(arr[m].control));
196						});
197					Nette.addError(curElem, message);
198				}
199				return false;
200			}
201		}
202
203		if (elem.type === 'number' && !elem.validity.valid) {
204			if (!onlyCheck) {
205				Nette.addError(elem, 'Please enter a valid value.');
206			}
207			return false;
208		}
209
210		return true;
211	};
212
213
214	/**
215	 * Validates whole form.
216	 */
217	Nette.validateForm = function(sender, onlyCheck) {
218		var form = sender.form || sender,
219			scope = false;
220
221		Nette.formErrors = [];
222
223		if (form['nette-submittedBy'] && form['nette-submittedBy'].getAttribute('formnovalidate') !== null) {
224			var scopeArr = Nette.parseJSON(form['nette-submittedBy'].getAttribute('data-nette-validation-scope'));
225			if (scopeArr.length) {
226				scope = new RegExp('^(' + scopeArr.join('-|') + '-)');
227			} else {
228				Nette.showFormErrors(form, []);
229				return true;
230			}
231		}
232
233		var radios = {}, i, elem;
234
235		for (i = 0; i < form.elements.length; i++) {
236			elem = form.elements[i];
237
238			if (elem.tagName && !(elem.tagName.toLowerCase() in {input: 1, select: 1, textarea: 1, button: 1})) {
239				continue;
240
241			} else if (elem.type === 'radio') {
242				if (radios[elem.name]) {
243					continue;
244				}
245				radios[elem.name] = true;
246			}
247
248			if ((scope && !elem.name.replace(/]\[|\[|]|$/g, '-').match(scope)) || Nette.isDisabled(elem)) {
249				continue;
250			}
251
252			if (!Nette.validateControl(elem, null, onlyCheck) && !Nette.formErrors.length) {
253				return false;
254			}
255		}
256		var success = !Nette.formErrors.length;
257		Nette.showFormErrors(form, Nette.formErrors);
258		return success;
259	};
260
261
262	/**
263	 * Check if input is disabled.
264	 */
265	Nette.isDisabled = function(elem) {
266		if (elem.type === 'radio') {
267			for (var i = 0, elements = elem.form.elements; i < elements.length; i++) {
268				if (elements[i].name === elem.name && !elements[i].disabled) {
269					return false;
270				}
271			}
272			return true;
273		}
274		return elem.disabled;
275	};
276
277
278	/**
279	 * Adds error message to the queue.
280	 */
281	Nette.addError = function(elem, message) {
282		Nette.formErrors.push({
283			element: elem,
284			message: message
285		});
286	};
287
288
289	/**
290	 * Display error messages.
291	 */
292	Nette.showFormErrors = function(form, errors) {
293		var messages = [],
294			focusElem;
295
296		for (var i = 0; i < errors.length; i++) {
297			var elem = errors[i].element,
298				message = errors[i].message;
299
300			if (!Nette.inArray(messages, message)) {
301				messages.push(message);
302
303				if (!focusElem && elem.focus) {
304					focusElem = elem;
305				}
306			}
307		}
308
309		if (messages.length) {
310			//alert(messages.join('\n'));
311
312			if (focusElem) {
313				focusElem.focus();
314			}
315		}
316	};
317
318
319	/**
320	 * Expand rule argument.
321	 */
322	Nette.expandRuleArgument = function(form, arg) {
323		if (arg && arg.control) {
324			var control = form.elements.namedItem(arg.control),
325				value = {value: Nette.getEffectiveValue(control)};
326			Nette.validateControl(control, null, true, value);
327			arg = value.value;
328		}
329		return arg;
330	};
331
332
333	/**
334	 * Validates single rule.
335	 */
336	Nette.validateRule = function(elem, op, arg, value) {
337		value = value === undefined ? {value: Nette.getEffectiveValue(elem)} : value;
338
339		if (op.charAt(0) === ':') {
340			op = op.substr(1);
341		}
342		op = op.replace('::', '_');
343		op = op.replace(/\\/g, '');
344
345		var arr = Nette.isArray(arg) ? arg.slice(0) : [arg];
346		for (var i = 0, len = arr.length; i < len; i++) {
347			arr[i] = Nette.expandRuleArgument(elem.form, arr[i]);
348		}
349		return Nette.validators[op]
350			? Nette.validators[op](elem, Nette.isArray(arg) ? arr : arr[0], value.value, value)
351			: null;
352	};
353
354
355	Nette.validators = {
356		filled: function(elem, arg, val) {
357			if (elem.type === 'number' && elem.validity.badInput) {
358				return true;
359			}
360			return val !== '' && val !== false && val !== null
361				&& (!Nette.isArray(val) || !!val.length)
362				&& (!window.FileList || !(val instanceof window.FileList) || val.length);
363		},
364
365		blank: function(elem, arg, val) {
366			return !Nette.validators.filled(elem, arg, val);
367		},
368
369		valid: function(elem) {
370			return Nette.validateControl(elem, null, true);
371		},
372
373		equal: function(elem, arg, val) {
374			if (arg === undefined) {
375				return null;
376			}
377
378			function toString(val) {
379				if (typeof val === 'number' || typeof val === 'string') {
380					return '' + val;
381				} else {
382					return val === true ? '1' : '';
383				}
384			}
385
386			val = Nette.isArray(val) ? val : [val];
387			arg = Nette.isArray(arg) ? arg : [arg];
388			loop:
389				for (var i1 = 0, len1 = val.length; i1 < len1; i1++) {
390					for (var i2 = 0, len2 = arg.length; i2 < len2; i2++) {
391						if (toString(val[i1]) === toString(arg[i2])) {
392							continue loop;
393						}
394					}
395					return false;
396				}
397			return true;
398		},
399
400		notEqual: function(elem, arg, val) {
401			return arg === undefined ? null : !Nette.validators.equal(elem, arg, val);
402		},
403
404		minLength: function(elem, arg, val) {
405			if (elem.type === 'number') {
406				if (elem.validity.tooShort) {
407					return false;
408				} else if (elem.validity.badInput) {
409					return null;
410				}
411			}
412			return val.length >= arg;
413		},
414
415		maxLength: function(elem, arg, val) {
416			if (elem.type === 'number') {
417				if (elem.validity.tooLong) {
418					return false;
419				} else if (elem.validity.badInput) {
420					return null;
421				}
422			}
423			return val.length <= arg;
424		},
425
426		length: function(elem, arg, val) {
427			if (elem.type === 'number') {
428				if (elem.validity.tooShort || elem.validity.tooLong) {
429					return false;
430				} else if (elem.validity.badInput) {
431					return null;
432				}
433			}
434			arg = Nette.isArray(arg) ? arg : [arg, arg];
435			return (arg[0] === null || val.length >= arg[0]) && (arg[1] === null || val.length <= arg[1]);
436		},
437
438		email: function(elem, arg, val) {
439			return (/^("([ !#-[\]-~]|\\[ -~])+"|[-a-z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-z0-9!#$%&'*+\/=?^_`{|}~]+)*)@([0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)+[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?$/i).test(val);
440		},
441
442		url: function(elem, arg, val, value) {
443			if (!(/^[a-z\d+.-]+:/).test(val)) {
444				val = 'http://' + val;
445			}
446			if ((/^https?:\/\/((([-_0-9a-z\u00C0-\u02FF\u0370-\u1EFF]+\.)*[0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)?[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[[0-9a-f:]{3,39}\])(:\d{1,5})?(\/\S*)?$/i).test(val)) {
447				value.value = val;
448				return true;
449			}
450			return false;
451		},
452
453		regexp: function(elem, arg, val) {
454			var parts = typeof arg === 'string' ? arg.match(/^\/(.*)\/([imu]*)$/) : false;
455			try {
456				return parts && (new RegExp(parts[1], parts[2].replace('u', ''))).test(val);
457			} catch (e) {}
458		},
459
460		pattern: function(elem, arg, val) {
461			try {
462				return typeof arg === 'string' ? (new RegExp('^(?:' + arg + ')$')).test(val) : null;
463			} catch (e) {}
464		},
465
466		integer: function(elem, arg, val) {
467			if (elem.type === 'number' && elem.validity.badInput) {
468				return false;
469			}
470			return (/^-?[0-9]+$/).test(val);
471		},
472
473		'float': function(elem, arg, val, value) {
474			if (elem.type === 'number' && elem.validity.badInput) {
475				return false;
476			}
477			val = val.replace(' ', '').replace(',', '.');
478			if ((/^-?[0-9]*[.,]?[0-9]+$/).test(val)) {
479				value.value = val;
480				return true;
481			}
482			return false;
483		},
484
485		min: function(elem, arg, val) {
486			if (elem.type === 'number') {
487				if (elem.validity.rangeUnderflow) {
488					return false;
489				} else if (elem.validity.badInput) {
490					return null;
491				}
492			}
493			return arg === null || parseFloat(val) >= arg;
494		},
495
496		max: function(elem, arg, val) {
497			if (elem.type === 'number') {
498				if (elem.validity.rangeOverflow) {
499					return false;
500				} else if (elem.validity.badInput) {
501					return null;
502				}
503			}
504			return arg === null || parseFloat(val) <= arg;
505		},
506
507		range: function(elem, arg, val) {
508			if (elem.type === 'number') {
509				if (elem.validity.rangeUnderflow || elem.validity.rangeOverflow) {
510					return false;
511				} else if (elem.validity.badInput) {
512					return null;
513				}
514			}
515			return Nette.isArray(arg) ?
516				((arg[0] === null || parseFloat(val) >= arg[0]) && (arg[1] === null || parseFloat(val) <= arg[1])) : null;
517		},
518
519		submitted: function(elem) {
520			return elem.form['nette-submittedBy'] === elem;
521		},
522
523		fileSize: function(elem, arg, val) {
524			if (window.FileList) {
525				for (var i = 0; i < val.length; i++) {
526					if (val[i].size > arg) {
527						return false;
528					}
529				}
530			}
531			return true;
532		},
533
534		image: function (elem, arg, val) {
535			if (window.FileList && val instanceof window.FileList) {
536				for (var i = 0; i < val.length; i++) {
537					var type = val[i].type;
538					if (type && type !== 'image/gif' && type !== 'image/png' && type !== 'image/jpeg') {
539						return false;
540					}
541				}
542			}
543			return true;
544		}
545	};
546
547
548	/**
549	 * Process all toggles in form.
550	 */
551	Nette.toggleForm = function(form, elem) {
552		var i;
553		Nette.toggles = {};
554		for (i = 0; i < form.elements.length; i++) {
555			if (form.elements[i].tagName.toLowerCase() in {input: 1, select: 1, textarea: 1, button: 1}) {
556				Nette.toggleControl(form.elements[i], null, null, !elem);
557			}
558		}
559
560		for (i in Nette.toggles) {
561			Nette.toggle(i, Nette.toggles[i], elem);
562		}
563	};
564
565
566	/**
567	 * Process toggles on form element.
568	 */
569	Nette.toggleControl = function(elem, rules, success, firsttime, value) {
570		rules = rules || Nette.parseJSON(elem.getAttribute('data-nette-rules'));
571		value = value === undefined ? {value: Nette.getEffectiveValue(elem)} : value;
572
573		var has = false,
574			handled = [],
575			handler = function () {
576				Nette.toggleForm(elem.form, elem);
577			},
578			curSuccess;
579
580		for (var id = 0, len = rules.length; id < len; id++) {
581			var rule = rules[id],
582				op = rule.op.match(/(~)?([^?]+)/),
583				curElem = rule.control ? elem.form.elements.namedItem(rule.control) : elem;
584
585			if (!curElem) {
586				continue;
587			}
588
589			curSuccess = success;
590			if (success !== false) {
591				rule.neg = op[1];
592				rule.op = op[2];
593				var curValue = elem === curElem ? value : {value: Nette.getEffectiveValue(curElem)};
594				curSuccess = Nette.validateRule(curElem, rule.op, rule.arg, curValue);
595				if (curSuccess === null) {
596					continue;
597
598				} else if (rule.neg) {
599					curSuccess = !curSuccess;
600				}
601				if (!rule.rules) {
602					success = curSuccess;
603				}
604			}
605
606			if ((rule.rules && Nette.toggleControl(elem, rule.rules, curSuccess, firsttime, value)) || rule.toggle) {
607				has = true;
608				if (firsttime) {
609					var oldIE = !document.addEventListener, // IE < 9
610						name = curElem.tagName ? curElem.name : curElem[0].name,
611						els = curElem.tagName ? curElem.form.elements : curElem;
612
613					for (var i = 0; i < els.length; i++) {
614						if (els[i].name === name && !Nette.inArray(handled, els[i])) {
615							Nette.addEvent(els[i], oldIE && els[i].type in {checkbox: 1, radio: 1} ? 'click' : 'change', handler);
616							handled.push(els[i]);
617						}
618					}
619				}
620				for (var id2 in rule.toggle || []) {
621					if (Object.prototype.hasOwnProperty.call(rule.toggle, id2)) {
622						Nette.toggles[id2] = Nette.toggles[id2] || (rule.toggle[id2] ? curSuccess : !curSuccess);
623					}
624				}
625			}
626		}
627		return has;
628	};
629
630
631	Nette.parseJSON = function(s) {
632		return (s || '').substr(0, 3) === '{op'
633			? eval('[' + s + ']') // backward compatibility with Nette 2.0.x
634			: JSON.parse(s || '[]');
635	};
636
637
638	/**
639	 * Displays or hides HTML element.
640	 */
641	Nette.toggle = function(id, visible, srcElement) {
642		var elem = document.getElementById(id);
643		if (elem) {
644			elem.style.display = visible ? '' : 'none';
645		}
646	};
647
648
649	/**
650	 * Setup handlers.
651	 */
652	Nette.initForm = function(form) {
653		Nette.toggleForm(form);
654
655		if (form.noValidate) {
656			return;
657		}
658
659		form.noValidate = true;
660
661		Nette.addEvent(form, 'submit', function(e) {
662			if (!Nette.validateForm(form)) {
663				if (e && e.stopPropagation) {
664					e.stopPropagation();
665					e.preventDefault();
666				} else if (window.event) {
667					event.cancelBubble = true;
668					event.returnValue = false;
669				}
670			}
671		});
672	};
673
674
675	/**
676	 * @private
677	 */
678	Nette.initOnLoad = function() {
679		Nette.addEvent(document, 'DOMContentLoaded', function() {
680			for (var i = 0; i < document.forms.length; i++) {
681				var form = document.forms[i];
682				for (var j = 0; j < form.elements.length; j++) {
683					if (form.elements[j].getAttribute('data-nette-rules')) {
684						Nette.initForm(form);
685						break;
686					}
687				}
688			}
689
690			Nette.addEvent(document.body, 'click', function(e) {
691				var target = e.target || e.srcElement;
692				while (target) {
693					if (target.form && target.type in {submit: 1, image: 1}) {
694						target.form['nette-submittedBy'] = target;
695						break;
696					}
697					target = target.parentNode;
698				}
699			});
700		});
701	};
702
703
704	/**
705	 * Determines whether the argument is an array.
706	 */
707	Nette.isArray = function(arg) {
708		return Object.prototype.toString.call(arg) === '[object Array]';
709	};
710
711
712	/**
713	 * Search for a specified value within an array.
714	 */
715	Nette.inArray = function(arr, val) {
716		if ([].indexOf) {
717			return arr.indexOf(val) > -1;
718		} else {
719			for (var i = 0; i < arr.length; i++) {
720				if (arr[i] === val) {
721					return true;
722				}
723			}
724			return false;
725		}
726	};
727
728
729	/**
730	 * Converts string to web safe characters [a-z0-9-] text.
731	 */
732	Nette.webalize = function(s) {
733		s = s.toLowerCase();
734		var res = '', i, ch;
735		for (i = 0; i < s.length; i++) {
736			ch = Nette.webalizeTable[s.charAt(i)];
737			res += ch ? ch : s.charAt(i);
738		}
739		return res.replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
740	};
741
742	Nette.webalizeTable = {\u00e1: 'a', \u00e4: 'a', \u010d: 'c', \u010f: 'd', \u00e9: 'e', \u011b: 'e', \u00ed: 'i', \u013e: 'l', \u0148: 'n', \u00f3: 'o', \u00f4: 'o', \u0159: 'r', \u0161: 's', \u0165: 't', \u00fa: 'u', \u016f: 'u', \u00fd: 'y', \u017e: 'z'};
743
744	return Nette;
745}));
746
747/*!
748 * jquery.confirm
749 *
750 * @version 2.3.1
751 *
752 * @author My C-Labs
753 * @author Matthieu Napoli <[email protected]>
754 * @author Russel Vela
755 * @author Marcus Schwarz <[email protected]>
756 *
757 * @license MIT
758 * @url http://myclabs.github.io/jquery.confirm/
759 */
760(function(a){a.fn.confirm=function(b){if(typeof b==="undefined"){b={}}this.click(function(c){c.preventDefault();var d=a.extend({button:a(this)},b);a.confirm(d,c)});return this};a.confirm=function(f,i){if(a(".confirmation-modal").length>0){return}var j={};if(f.button){var b={title:"title",text:"text","confirm-button":"confirmButton","cancel-button":"cancelButton","confirm-button-class":"confirmButtonClass","cancel-button-class":"cancelButtonClass","dialog-class":"dialogClass"};a.each(b,function(e,k){var l=f.button.data(e);if(l){j[k]=l}})}var g=a.extend({},a.confirm.options,{confirm:function(){var e=i&&(("string"===typeof i&&i)||
760(i.currentTarget&&i.currentTarget.attributes.href.value));if(e){if(f.post){var k=a('<form method="post" class="hide" action="'+e+'"></form>');a("body").append(k);k.submit()}else{window.location=e}}},cancel:function(e){},button:null},j,f);var c="";if(g.title!==""){c='<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button><h4 class="modal-title">'+g.title+"</h4></div>"}var d='<div class="confirmation-modal modal fade" tabindex="-1" role="dialog"><div class="'+g.dialogClass+'"><div class="modal-content">'+c+'<div class="modal-body">'+g.text+'</div><div class="modal-footer"><button class="confirm btn '+g.confirmButtonClass+'" type="button" data-dismiss="modal">'+g.confirmButton+'</button><button class="cancel btn '+g.cancelButtonClass+'" type="button" data-dismiss="modal">'+g.cancelButton+"</button></div></div></div></div>";var h=a(d);h.on("shown.bs.modal",function(){h.find(".btn-primary:first").focus()});h.on("hidden.bs.modal",function(){h.remove()});h.find(".confirm").click(function(){g.confirm(g.button)});h.find(".cancel").click(function(){g.cancel(g.button)});a("body").append(h);h.modal("show")};a.confirm.options={text:"Are you sure?",title:"",confirmButton:"Yes",cancelButton:"Cancel",post:false,confirmButtonClass:"btn-primary",cancelButtonClass:"btn-default",dialogClass:"modal-dialog"}})(jQuery);
761/**
762 * Live Form Validation for Nette Forms 2.4
763 * @author Robert P�sel, zakrava, Radek Je�d�k, MartyIX, David Grudl
764 * @version 1.9.0-dev
765 * @url https://github.com/Robyer/nette-live-form-validation/
766 */
767
768var LiveForm = {
769	options: {
770		// CSS class of control's parent where error/valid class should be added; or "false" to use control directly
771		showMessageClassOnParent: 'form-group',
772
773		// CSS class of control's parent where error/valid message should be added (fallback to direct parent if not found); or "false" to use control's direct parent
774		messageParentClass: false,
775
776		// CSS class for an invalid control
777		controlErrorClass: 'has-error',
778
779		// CSS class for a valid control
780		controlValidClass: 'has-success',
781
782		// CSS class for an error message
783		messageErrorClass: 'help-block text-danger',
784
785		// control with this CSS class will show error/valid message even when control itself is hidden (useful for controls which are hidden and wrapped into special component)
786		enableHiddenMessageClass: 'show-hidden-error',
787
788		// control with this CSS class will have disabled live validation
789		disableLiveValidationClass: 'no-live-validation',
790
791		// control with this CSS class will not show valid message
792		disableShowValidClass: 'no-show-valid',
793
794		// tag that will hold the error/valid message
795		messageTag: 'span',
796
797		// message element id = control id + this postfix
798		messageIdPostfix: '_message',
799
800		// show this html before error message itself
801		messageErrorPrefix: '&nbsp;<i class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></i>&nbsp;',
802
803		// show all errors when submitting form; or use "false" to show only first error
804		showAllErrors: true,
805
806		// show message when valid
807		showValid: false,
808
809		// delay in ms before validating on keyup/keydown; or use "false" to disable it
810		wait: false,
811
812		// vertical screen offset in px to scroll after focusing element with error (useful when using fixed navbar menu which may otherwise obscure the element in focus); or use "false" for default behavior
813		focusScreenOffsetY: false
814	},
815
816	forms: { }
817};
818
819LiveForm.setOptions = function(userOptions) {
820	for (prop in userOptions) {
821		if (Object.prototype.hasOwnProperty.call(this.options, prop)) {
822			this.options[prop] = userOptions[prop];
823		}
824	}
825}
826
827// Allow setting options before loading the script just by creating global LiveFormOptions object with options.
828if (typeof window.LiveFormOptions !== 'undefined') {
829	LiveForm.setOptions(window.LiveFormOptions);
830}
831
832LiveForm.isSpecialKey = function(k) {
833	// http://stackoverflow.com/questions/7770561/jquery-javascript-reject-control-keys-on-keydown-event
834	return (k == 20 /* Caps lock */
835	|| k == 16 /* Shift */
836	|| k == 9 /* Tab */
837	|| k == 27 /* Escape Key */
838	|| k == 17 /* Control Key */
839	|| k == 91 /* Windows Command Key */
840	|| k == 19 /* Pause Break */
841	|| k == 18 /* Alt Key */
842	|| k == 93 /* Right Click Point Key */
843	|| (k >= 35 && k <= 40) /* Home, End, Arrow Keys */
844	|| k == 45 /* Insert Key */
845	|| (k >= 33 && k <= 34) /*Page Down, Page Up */
846	|| (k >= 112 && k <= 123) /* F1 - F12 */
847	|| (k >= 144 && k <= 145)); /* Num Lock, Scroll Lock */
848}
849
850/**
851 * Handlers for all the events that trigger validation
852 * YOU CAN CHANGE these handlers (ie. to use jQuery events instead)
853 */
854LiveForm.setupHandlers = function(el) {
855	if (this.hasClass(el, this.options.disableLiveValidationClass))
856		return;
857
858	// Check if element was already initialized
859	if (el.getAttribute("data-lfv-initialized"))
860		return;
861
862	// Remember we initialized this element so we won't do it again
863	el.setAttribute('data-lfv-initialized', 'true');
864
865	var handler = function(event) {
866		event = event || window.event;
867
868		// check if form is submitted
869		var target = event.target || event.srcElement;
870		var isSubmit = false;
871		if (target.form && target.type in {submit: 1, image: 1}) {
872			isSubmit = true;
873		}
874		// if form is not submitted and value is empty, don't show error message
875		var value = Nette.getEffectiveValue(target);
876		if ( ! isSubmit && (value === undefined || value === '')) {
877			return;
878		}
879
880		Nette.validateControl(event.target ? event.target : event.srcElement);
881	};
882
883	var self = this;
884
885	Nette.addEvent(el, "change", handler);
886	Nette.addEvent(el, "blur", handler);
887	Nette.addEvent(el, "keydown", function (event) {
888		if (!self.isSpecialKey(event.which) && (self.options.wait === false || self.options.wait >= 200)) {
889			// Hide validation span tag.
890			self.removeClass(self.getGroupElement(this), self.options.controlErrorClass);
891			self.removeClass(self.getGroupElement(this), self.options.controlValidClass);
892
893			var messageEl = self.getMessageElement(this);
894			messageEl.innerHTML = '';
895			messageEl.className = '';
896
897			// Cancel timeout to run validation handler
898			if (self.timeout) {
899				clearTimeout(self.timeout);
900			}
901		}
902	});
903	Nette.addEvent(el, "keyup", function(event) {
904		if (self.options.wait !== false) {
905			event = event || window.event;
906			if (event.keyCode !== 9) {
907				if (self.timeout) clearTimeout(self.timeout);
908				self.timeout = setTimeout(function() {
909					handler(event);
910				}, self.options.wait);
911			}
912		}
913	});
914};
915
916LiveForm.processServerErrors = function(el) {
917	var messageEl = this.getMessageElement(el);
918	var parentEl = this.getMessageParent(el); // This is parent element which contain the error elements
919
920	var errors = [];
921
922	// Find existing error elements by class (from server-validation)
923	var errorEls = parentEl.getElementsByClassName(this.options.messageErrorClass);
924	for (var i = errorEls.length - 1; i > -1; i--) {
925		// Don't touch our main message element
926		if (errorEls[i] == messageEl)
927			continue;
928
929		// Remove only direct children
930		var errorParent = errorEls[i].parentNode;
931		if (errorParent == parentEl) {
932			errors.push(errorEls[i].outerHTML);
933			errorParent.removeChild(errorEls[i]);
934		}
935	}
936
937	// Wrap all server errors into one element
938	if (errors.length > 0) {
939		messageEl.innerHTML = errors.join("");
940	}
941};
942
943LiveForm.addError = function(el, message) {
944	// Ignore elements with disabled live validation
945	if (this.hasClass(el, this.options.disableLiveValidationClass))
946		return;
947
948	var groupEl = this.getGroupElement(el);
949	this.setFormProperty(el.form, "hasError", true);
950	this.addClass(groupEl, this.options.controlErrorClass);
951
952	if (this.options.showValid) {
953		this.removeClass(groupEl, this.options.controlValidClass);
954	}
955
956	if (!message) {
957		message = '&nbsp;';
958	} else {
959		message = this.options.messageErrorPrefix + message;
960	}
961
962	var messageEl = this.getMessageElement(el);
963	messageEl.innerHTML = message;
964	messageEl.className = this.options.messageErrorClass;
965};
966
967LiveForm.removeError = function(el) {
968	// We don't want to remove any errors during onLoadValidation
969	if (this.getFormProperty(el.form, "onLoadValidation"))
970		return;
971
972	var groupEl = this.getGroupElement(el);
973	this.removeClass(groupEl, this.options.controlErrorClass);
974
975	var id = el.getAttribute('data-lfv-message-id');
976	if (id) {
977		var messageEl = this.getMessageElement(el);
978		messageEl.innerHTML = '';
979		messageEl.className = '';
980	}
981
982	if (this.options.showValid) {
983		if (this.showValid(el))
984			this.addClass(groupEl, this.options.controlValidClass);
985		else
986			this.removeClass(groupEl, this.options.controlValidClass);
987	}
988};
989
990LiveForm.showValid = function(el) {
991	if (el.type) {
992		var type = el.type.toLowerCase();
993		if (type == 'checkbox' || type == 'radio') {
994			return false;
995		}
996	}
997
998	var rules = Nette.parseJSON(el.getAttribute('data-nette-rules'));
999	if (rules.length == 0) {
1000		return false;
1001	}
1002
1003	if (Nette.getEffectiveValue(el) == '') {
1004		return false;
1005	}
1006
1007	if (this.hasClass(el, this.options.disableShowValidClass)) {
1008		return false;
1009	}
1010
1011	return true;
1012};
1013
1014LiveForm.getGroupElement = function(el) {
1015	if (this.options.showMessageClassOnParent === false)
1016		return el;
1017
1018	var groupEl = el;
1019
1020	while (!this.hasClass(groupEl, this.options.showMessageClassOnParent)) {
1021		groupEl = groupEl.parentNode;
1022
1023		if (groupEl === null) {
1024			return el;
1025		}
1026	}
1027
1028	return groupEl;
1029}
1030
1031LiveForm.getMessageId = function(el) {
1032	var tmp = el.id + this.options.messageIdPostfix;
1033
1034	// For elements without ID, or multi elements (with same name), we must generate whole ID ourselves
1035	if (el.name && (!el.id || !el.form.elements[el.name].tagName)) {
1036		// Strip possible [] from name
1037		var name = el.name.match(/\[\]$/) ? el.name.match(/(.*)\[\]$/)[1] : el.name;
1038		// Generate new ID based on form ID, element name and messageIdPostfix from options
1039		tmp = (el.form.id ? el.form.id : 'frm') + '-' + name + this.options.messageIdPostfix;
1040	}
1041
1042	// We want unique ID which doesn't exist yet
1043	var id = tmp,
1044		i = 0;
1045	while (document.getElementById(id)) {
1046		id = id + '_' + ++i;
1047	}
1048
1049	return id;
1050}
1051
1052LiveForm.getMessageElement = function(el) {
1053	// For multi elements (with same name) work only with first element attributes
1054	if (el.name && el.name.match(/\[\]$/)) {
1055		el = el.form.elements[el.name].tagName ? el : el.form.elements[el.name][0];
1056	}
1057
1058	var id = el.getAttribute('data-lfv-message-id');
1059	if (!id) {
1060		// ID is not specified yet, let's create a new one
1061		id = this.getMessageId(el);
1062
1063		// Remember this id for next use
1064		el.setAttribute('data-lfv-message-id', id);
1065	}
1066
1067	var messageEl = document.getElementById(id);
1068	if (!messageEl) {
1069		// Message element doesn't exist, lets create a new one
1070		messageEl = document.createElement(this.options.messageTag);
1071		messageEl.id = id;
1072		if (el.style.display == 'none' && !this.hasClass(el, this.options.enableHiddenMessageClass)) {
1073			messageEl.style.display = 'none';
1074		}
1075
1076		var parentEl = this.getMessageParent(el);
1077		if (parentEl) {
1078			parentEl.appendChild(messageEl);
1079		}
1080	}
1081
1082	return messageEl;
1083};
1084
1085LiveForm.getMessageParent = function(el) {
1086	var parentEl = el.parentNode;
1087	var parentFound = false;
1088
1089	if (this.options.messageParentClass !== false) {
1090		parentFound = true;
1091		while (!this.hasClass(parentEl, this.options.messageParentClass)) {
1092			parentEl = parentEl.parentNode;
1093
1094			if (parentEl === null) {
1095				// We didn't found wanted parent, so use element's direct parent
1096				parentEl = el.parentNode;
1097				parentFound = false;
1098				break;
1099			}
1100		}
1101	}
1102
1103	// Don't append error message to radio/checkbox input's label, but along label
1104	if (el.type) {
1105		var type = el.type.toLowerCase();
1106		if ((type == 'checkbox' || type == 'radio') && parentEl.tagName == 'LABEL') {
1107			parentEl = parentEl.parentNode;
1108		}
1109	}
1110
1111	// For multi elements (with same name) use parent's parent as parent (if wanted one is not found)
1112	if (!parentFound && el.name && !el.form.elements[el.name].tagName) {
1113		parentEl = parentEl.parentNode;
1114	}
1115
1116	return parentEl;
1117}
1118
1119LiveForm.addClass = function(el, className) {
1120	if (!el.className) {
1121		el.className = className;
1122	} else if (!this.hasClass(el, className)) {
1123		el.className += ' ' + className;
1124	}
1125};
1126
1127LiveForm.hasClass = function(el, className) {
1128	if (el.className)
1129		return el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)'));
1130	return false;
1131};
1132
1133LiveForm.removeClass = function(el, className) {
1134	if (this.hasClass(el, className)) {
1135		var reg = new RegExp('(\\s|^)'+ className + '(\\s|$)');
1136		var m = el.className.match(reg);
1137		el.className = el.className.replace(reg, (m[1] == ' ' && m[2] == ' ') ? ' ' : '');
1138	}
1139};
1140
1141LiveForm.getFormProperty = function(form, propertyName) {
1142	if (form == null || this.forms[form.id] == null)
1143		return false;
1144
1145	return this.forms[form.id][propertyName];
1146};
1147
1148LiveForm.setFormProperty = function(form, propertyName, value) {
1149	if (form == null)
1150		return;
1151
1152	if (this.forms[form.id] == null)
1153		this.forms[form.id] = {};
1154
1155	this.forms[form.id][propertyName] = value;
1156};
1157
1158////////////////////////////   modified netteForms.js   ///////////////////////////////////
1159
1160/**
1161 * NetteForms - simple form validation.
1162 *
1163 * This file is part of the Nette Framework (https://nette.org)
1164 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
1165 */
1166
1167(function(global, factory) {
1168	if (!global.JSON) {
1169		return;
1170	}
1171
1172	if (typeof define === 'function' && define.amd) {
1173		define(function() {
1174			return factory(global);
1175		});
1176	} else if (typeof module === 'object' && typeof module.exports === 'object') {
1177		module.exports = factory(global);
1178	} else {
1179		var init = !global.Nette || !global.Nette.noInit;
1180		global.Nette = factory(global);
1181		if (init) {
1182			global.Nette.initOnLoad();
1183		}
1184	}
1185
1186}(typeof window !== 'undefined' ? window : this, function(window) {
1187
1188	'use strict';
1189
1190	var Nette = {};
1191
1192// LiveForm: original netteForms.js code
1193// Nette.formErrors = [];
1194	Nette.version = '2.4';
1195
1196
1197	/**
1198	 * Attaches a handler to an event for the element.
1199	 */
1200	Nette.addEvent = function(element, on, callback) {
1201		if (element.addEventListener) {
1202			element.addEventListener(on, callback);
1203		} else if (on === 'DOMContentLoaded') {
1204			element.attachEvent('onreadystatechange', function() {
1205				if (element.readyState === 'complete') {
1206					callback.call(this);
1207				}
1208			});
1209		} else {
1210			element.attachEvent('on' + on, getHandler(callback));
1211		}
1212	};
1213
1214
1215	function getHandler(callback) {
1216		return function(e) {
1217			return callback.call(this, e);
1218		};
1219	}
1220
1221
1222	/**
1223	 * Returns the value of form element.
1224	 */
1225	Nette.getValue = function(elem) {
1226		var i;
1227		if (!elem) {
1228			return null;
1229
1230		} else if (!elem.tagName) { // RadioNodeList, HTMLCollection, array
1231			return elem[0] ? Nette.getValue(elem[0]) : null;
1232
1233		} else if (elem.type === 'radio') {
1234			var elements = elem.form.elements; // prevents problem with name 'item' or 'namedItem'
1235			for (i = 0; i < elements.length; i++) {
1236				if (elements[i].name === elem.name && elements[i].checked) {
1237					return elements[i].value;
1238				}
1239			}
1240			return null;
1241
1242		} else if (elem.type === 'file') {
1243			return elem.files || elem.value;
1244
1245		} else if (elem.tagName.toLowerCase() === 'select') {
1246			var index = elem.selectedIndex,
1247				options = elem.options,
1248				values = [];
1249
1250			if (elem.type === 'select-one') {
1251				return index < 0 ? null : options[index].value;
1252			}
1253
1254			for (i = 0; i < options.length; i++) {
1255				if (options[i].selected) {
1256					values.push(options[i].value);
1257				}
1258			}
1259			return values;
1260
1261		} else if (elem.name && elem.name.match(/\[\]$/)) { // multiple elements []
1262			var elements = elem.form.elements[elem.name].tagName ? [elem] : elem.form.elements[elem.name],
1263				values = [];
1264
1265			for (i = 0; i < elements.length; i++) {
1266				// LiveForm: original netteForms.js code
1267				/*if (elements[i].type !== 'checkbox' || elements[i].checked) {
1268				 values.push(elements[i].value);
1269				 }*/
1270				// LiveForm: addition
1271				var value = elements[i].value;
1272				if (elements[i].type === 'checkbox' && elements[i].checked) {
1273					values.push(value);
1274				} else if (elements[i].type !== 'checkbox' && value !== '') {
1275					values.push(value);
1276				}
1277			}
1278			return values;
1279
1280		} else if (elem.type === 'checkbox') {
1281			return elem.checked;
1282
1283		} else if (elem.tagName.toLowerCase() === 'textarea') {
1284			return elem.value.replace("\r", '');
1285
1286		} else {
1287			return elem.value.replace("\r", '').replace(/^\s+|\s+$/g, '');
1288		}
1289	};
1290
1291
1292	/**
1293	 * Returns the effective value of form element.
1294	 */
1295	Nette.getEffectiveValue = function(elem) {
1296		var val = Nette.getValue(elem);
1297		if (elem.getAttribute) {
1298			if (val === elem.getAttribute('data-nette-empty-value')) {
1299				val = '';
1300			}
1301		}
1302		return val;
1303	};
1304
1305
1306	/**
1307	 * Validates form element against given rules.
1308	 */
1309	Nette.validateControl = function(elem, rules, onlyCheck, value, emptyOptional) {
1310		// LiveForm: addition
1311		// Fix for CheckboxList - validation rules are present always only on first input
1312		if (elem.name && elem.name.match(/\[\]$/) && elem.type.toLowerCase() == 'checkbox') {
1313			elem = elem.form.elements[elem.name].tagName ? elem : elem.form.elements[elem.name][0];
1314		}
1315
1316		elem = elem.tagName ? elem : elem[0]; // RadioNodeList
1317		rules = rules || Nette.parseJSON(elem.getAttribute('data-nette-rules'));
1318		value = value === undefined ? {value: Nette.getEffectiveValue(elem)} : value;
1319
1320		for (var id = 0, len = rules.length; id < len; id++) {
1321			var rule = rules[id],
1322				op = rule.op.match(/(~)?([^?]+)/),
1323				curElem = rule.control ? elem.form.elements.namedItem(rule.control) : elem;
1324
1325			rule.neg = op[1];
1326			rule.op = op[2];
1327			rule.condition = !!rule.rules;
1328
1329			if (!curElem) {
1330				continue;
1331			} else if (rule.op === 'optional') {
1332				emptyOptional = !Nette.validateRule(elem, ':filled', null, value);
1333				continue;
1334			} else if (emptyOptional && !rule.condition && rule.op !== ':filled') {
1335				continue;
1336			}
1337
1338			curElem = curElem.tagName ? curElem : curElem[0]; // RadioNodeList
1339			var curValue = elem === curElem ? value : {value: Nette.getEffectiveValue(curElem)},
1340				success = Nette.validateRule(curElem, rule.op, rule.arg, curValue);
1341
1342			if (success === null) {
1343				continue;
1344			} else if (rule.neg) {
1345				success = !success;
1346			}
1347
1348			if (rule.condition && success) {
1349				if (!Nette.validateControl(elem, rule.rules, onlyCheck, value, rule.op === ':blank' ? false : emptyOptional)) {
1350					return false;
1351				}
1352			} else if (!rule.condition && !success) {
1353				if (Nette.isDisabled(curElem)) {
1354					continue;
1355				}
1356				if (!onlyCheck) {
1357					var arr = Nette.isArray(rule.arg) ? rule.arg : [rule.arg],
1358						message = rule.msg.replace(/%(value|\d+)/g, function(foo, m) {
1359							return Nette.getValue(m === 'value' ? curElem : elem.form.elements.namedItem(arr[m].control));
1360						});
1361					Nette.addError(curElem, message);
1362				}
1363				return false;
1364			}
1365		}
1366
1367		if (elem.type === 'number' && !elem.validity.valid) {
1368			if (!onlyCheck) {
1369				Nette.addError(elem, 'Please enter a valid value.');
1370			}
1371			return false;
1372		}
1373
1374		// LiveForm: addition
1375		if (!onlyCheck) {
1376			LiveForm.removeError(elem);
1377		}
1378
1379		return true;
1380	};
1381
1382
1383	/**
1384	 * Validates whole form.
1385	 */
1386	Nette.validateForm = function(sender, onlyCheck) {
1387		var form = sender.form || sender,
1388			scope = false;
1389
1390		// LiveForm: addition
1391		LiveForm.setFormProperty(form, "hasError", false);
1392
1393		// LiveForm: original netteForms.js code
1394		// Nette.formErrors = [];
1395
1396		if (form['nette-submittedBy'] && form['nette-submittedBy'].getAttribute('formnovalidate') !== null) {
1397			var scopeArr = Nette.parseJSON(form['nette-submittedBy'].getAttribute('data-nette-validation-scope'));
1398			if (scopeArr.length) {
1399				scope = new RegExp('^(' + scopeArr.join('-|') + '-)');
1400			} else {
1401				// LiveForm: original netteForms.js code
1402				// Nette.showFormErrors(form, []);
1403				return true;
1404			}
1405		}
1406
1407		var radios = {}, i, elem;
1408		// LiveForm: addition
1409		var success = true;
1410
1411		for (i = 0; i < form.elements.length; i++) {
1412			elem = form.elements[i];
1413
1414			if (elem.tagName && !(elem.tagName.toLowerCase() in {input: 1, select: 1, textarea: 1, button: 1})) {
1415				continue;
1416
1417			} else if (elem.type === 'radio') {
1418				if (radios[elem.name]) {
1419					continue;
1420				}
1421				radios[elem.name] = true;
1422			}
1423
1424			if ((scope && !elem.name.replace(/]\[|\[|]|$/g, '-').match(scope)) || Nette.isDisabled(elem)) {
1425				continue;
1426			}
1427
1428			// LiveForm: addition
1429			success = Nette.validateControl(elem) && success;
1430			if (!success && !LiveForm.options.showAllErrors) {
1431				break;
1432			}
1433			// LiveForm: original netteForms.js code
1434			/*if (!Nette.validateControl(elem, null, onlyCheck) && !Nette.formErrors.length) {
1435			 return false;
1436			 }*/
1437		}
1438		// LiveForm: change
1439		return success;
1440
1441		// LiveForm: original netteForms.js code
1442		/*var success = !Nette.formErrors.length;
1443		 Nette.showFormErrors(form, Nette.formErrors);
1444		 return success;*/
1445	};
1446
1447
1448	/**
1449	 * Check if input is disabled.
1450	 */
1451	Nette.isDisabled = function(elem) {
1452		if (elem.type === 'radio') {
1453			for (var i = 0, elements = elem.form.elements; i < elements.length; i++) {
1454				if (elements[i].name === elem.name && !elements[i].disabled) {
1455					return false;
1456				}
1457			}
1458			return true;
1459		}
1460		return elem.disabled;
1461	};
1462
1463// LiveForm: change
1464	/**
1465	 * Display error message.
1466	 */
1467	Nette.addError = function(elem, message) {
1468		// LiveForm: addition
1469		var noLiveValidation = LiveForm.hasClass(elem, LiveForm.options.disableLiveValidationClass);
1470		// User explicitly disabled live-validation so we want to show simple alerts
1471		if (noLiveValidation) {
1472			// notify errors for elements with disabled live validation (but only errors and not during onLoadValidation)
1473			if (message && !LiveForm.getFormProperty(elem.form, "hasError") && !LiveForm.getFormProperty(elem.form, "onLoadValidation")) {
1474				alert(message);
1475			}
1476		}
1477		if (elem.focus && !LiveForm.getFormProperty(elem.form, "hasError")) {
1478			if (!LiveForm.focusing) {
1479				LiveForm.focusing = true;
1480				elem.focus();
1481				setTimeout(function() {
1482					LiveForm.focusing = false;
1483
1484					// Scroll by defined offset (if enabled)
1485					// NOTE: We use it with setTimetout because IE9 doesn't always catch instant scrollTo request
1486					var focusOffsetY = LiveForm.options.focusScreenOffsetY;
1487					if (focusOffsetY !== false && elem.getBoundingClientRect().top < focusOffsetY) {
1488						window.scrollBy(0, elem.getBoundingClientRect().top - focusOffsetY);
1489					}
1490				}, 10);
1491			}
1492		}
1493		if (!noLiveValidation) {
1494			LiveForm.addError(elem, message);
1495		}
1496	};
1497
1498
1499// LiveForm: original netteForms.js code
1500	/**
1501	 * Adds error message to the queue.
1502	 */
1503	/*Nette.addError = function(elem, message) {
1504	 Nette.formErrors.push({
1505	 element: elem,
1506	 message: message
1507	 });
1508	 };*/
1509
1510
1511// LiveForm: original netteForms.js code
1512	/**
1513	 * Display error messages.
1514	 */
1515	/*Nette.showFormErrors = function(form, errors) {
1516	 var messages = [],
1517	 focusElem;
1518
1519	 for (var i = 0; i < errors.length; i++) {
1520	 var elem = errors[i].element,
1521	 message = errors[i].message;
1522
1523	 if (!Nette.inArray(messages, message)) {
1524	 messages.push(message);
1525
1526	 if (!focusElem && elem.focus) {
1527	 focusElem = elem;
1528	 }
1529	 }
1530	 }
1531
1532	 if (messages.length) {
1533	 alert(messages.join('\n'));
1534
1535	 if (focusElem) {
1536	 focusElem.focus();
1537	 }
1538	 }
1539	 };*/
1540
1541
1542	/**
1543	 * Expand rule argument.
1544	 */
1545	Nette.expandRuleArgument = function(form, arg) {
1546		if (arg && arg.control) {
1547			var control = form.elements.namedItem(arg.control),
1548				value = {value: Nette.getEffectiveValue(control)};
1549			Nette.validateControl(control, null, true, value);
1550			arg = value.value;
1551		}
1552		return arg;
1553	};
1554
1555
1556	/**
1557	 * Validates single rule.
1558	 */
1559	Nette.validateRule = function(elem, op, arg, value) {
1560		value = value === undefined ? {value: Nette.getEffectiveValue(elem)} : value;
1561
1562		if (op.charAt(0) === ':') {
1563			op = op.substr(1);
1564		}
1565		op = op.replace('::', '_');
1566		op = op.replace(/\\/g, '');
1567
1568		var arr = Nette.isArray(arg) ? arg.slice(0) : [arg];
1569		for (var i = 0, len = arr.length; i < len; i++) {
1570			arr[i] = Nette.expandRuleArgument(elem.form, arr[i]);
1571		}
1572		return Nette.validators[op]
1573			? Nette.validators[op](elem, Nette.isArray(arg) ? arr : arr[0], value.value, value)
1574			: null;
1575	};
1576
1577
1578	Nette.validators = {
1579		filled: function(elem, arg, val) {
1580			if (elem.type === 'number' && elem.validity.badInput) {
1581				return true;
1582			}
1583			return val !== '' && val !== false && val !== null
1584				&& (!Nette.isArray(val) || !!val.length)
1585				&& (!window.FileList || !(val instanceof window.FileList) || val.length);
1586		},
1587
1588		blank: function(elem, arg, val) {
1589			return !Nette.validators.filled(elem, arg, val);
1590		},
1591
1592		valid: function(elem, arg, val) {
1593			return Nette.validateControl(elem, null, true);
1594		},
1595
1596		equal: function(elem, arg, val) {
1597			if (arg === undefined) {
1598				return null;
1599			}
1600
1601			function toString(val) {
1602				if (typeof val === 'number' || typeof val === 'string') {
1603					return '' + val;
1604				} else {
1605					return val === true ? '1' : '';
1606				}
1607			}
1608
1609			val = Nette.isArray(val) ? val : [val];
1610			arg = Nette.isArray(arg) ? arg : [arg];
1611			loop:
1612				for (var i1 = 0, len1 = val.length; i1 < len1; i1++) {
1613					for (var i2 = 0, len2 = arg.length; i2 < len2; i2++) {
1614						if (toString(val[i1]) === toString(arg[i2])) {
1615							continue loop;
1616						}
1617					}
1618					return false;
1619				}
1620			return true;
1621		},
1622
1623		notEqual: function(elem, arg, val) {
1624			return arg === undefined ? null : !Nette.validators.equal(elem, arg, val);
1625		},
1626
1627		minLength: function(elem, arg, val) {
1628			if (elem.type === 'number') {
1629				if (elem.validity.tooShort) {
1630					return false
1631				} else if (elem.validity.badInput) {
1632					return null;
1633				}
1634			}
1635			return val.length >= arg;
1636		},
1637
1638		maxLength: function(elem, arg, val) {
1639			if (elem.type === 'number') {
1640				if (elem.validity.tooLong) {
1641					return false
1642				} else if (elem.validity.badInput) {
1643					return null;
1644				}
1645			}
1646			return val.length <= arg;
1647		},
1648
1649		length: function(elem, arg, val) {
1650			if (elem.type === 'number') {
1651				if (elem.validity.tooShort || elem.validity.tooLong) {
1652					return false
1653				} else if (elem.validity.badInput) {
1654					return null;
1655				}
1656			}
1657			arg = Nette.isArray(arg) ? arg : [arg, arg];
1658			return (arg[0] === null || val.length >= arg[0]) && (arg[1] === null || val.length <= arg[1]);
1659		},
1660
1661		email: function(elem, arg, val) {
1662			return (/^("([ !#-[\]-~]|\\[ -~])+"|[-a-z0-9!#$%&'*+\/=?^_`{|}~]+(\.[-a-z0-9!#$%&'*+\/=?^_`{|}~]+)*)@([0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)+[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?$/i).test(val);
1663		},
1664
1665		url: function(elem, arg, val, value) {
1666			if (!(/^[a-z\d+.-]+:/).test(val)) {
1667				val = 'http://' + val;
1668			}
1669			if ((/^https?:\/\/((([-_0-9a-z\u00C0-\u02FF\u0370-\u1EFF]+\.)*[0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)?[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[[0-9a-f:]{3,39}\])(:\d{1,5})?(\/\S*)?$/i).test(val)) {
1670				value.value = val;
1671				return true;
1672			}
1673			return false;
1674		},
1675
1676		regexp: function(elem, arg, val) {
1677			var parts = typeof arg === 'string' ? arg.match(/^\/(.*)\/([imu]*)$/) : false;
1678			try {
1679				return parts && (new RegExp(parts[1], parts[2].replace('u', ''))).test(val);
1680			} catch (e) {}
1681		},
1682
1683		pattern: function(elem, arg, val) {
1684			try {
1685				return typeof arg === 'string' ? (new RegExp('^(?:' + arg + ')$')).test(val) : null;
1686			} catch (e) {}
1687		},
1688
1689		integer: function(elem, arg, val) {
1690			if (elem.type === 'number' && elem.validity.badInput) {
1691				return false;
1692			}
1693			return (/^-?[0-9]+$/).test(val);
1694		},
1695
1696		'float': function(elem, arg, val, value) {
1697			if (elem.type === 'number' && elem.validity.badInput) {
1698				return false;
1699			}
1700			val = val.replace(' ', '').replace(',', '.');
1701			if ((/^-?[0-9]*[.,]?[0-9]+$/).test(val)) {
1702				value.value = val;
1703				return true;
1704			}
1705			return false;
1706		},
1707
1708		min: function(elem, arg, val) {
1709			if (elem.type === 'number') {
1710				if (elem.validity.rangeUnderflow) {
1711					return false
1712				} else if (elem.validity.badInput) {
1713					return null;
1714				}
1715			}
1716			return Nette.validators.range(elem, [arg, null], val);
1717		},
1718
1719		max: function(elem, arg, val) {
1720			if (elem.type === 'number') {
1721				if (elem.validity.rangeOverflow) {
1722					return false
1723				} else if (elem.validity.badInput) {
1724					return null;
1725				}
1726			}
1727			return Nette.validators.range(elem, [null, arg], val);
1728		},
1729
1730		range: function(elem, arg, val) {
1731			if (elem.type === 'number') {
1732				if (elem.validity.rangeUnderflow || elem.validity.rangeOverflow) {
1733					return false
1734				} else if (elem.validity.badInput) {
1735					return null;
1736				}
1737			}
1738			return Nette.isArray(arg) ?
1739				((arg[0] === null || parseFloat(val) >= arg[0]) && (arg[1] === null || parseFloat(val) <= arg[1])) : null;
1740		},
1741
1742		submitted: function(elem, arg, val) {
1743			return elem.form['nette-submittedBy'] === elem;
1744		},
1745
1746		fileSize: function(elem, arg, val) {
1747			if (window.FileList) {
1748				for (var i = 0; i < val.length; i++) {
1749					if (val[i].size > arg) {
1750						return false;
1751					}
1752				}
1753			}
1754			return true;
1755		},
1756
1757		image: function (elem, arg, val) {
1758			if (window.FileList && val instanceof window.FileList) {
1759				for (var i = 0; i < val.length; i++) {
1760					var type = val[i].type;
1761					if (type && type !== 'image/gif' && type !== 'image/png' && type !== 'image/jpeg') {
1762						return false;
1763					}
1764				}
1765			}
1766			return true;
1767		}
1768	};
1769
1770
1771	/**
1772	 * Process all toggles in form.
1773	 */
1774	Nette.toggleForm = function(form, elem) {
1775		var i;
1776		Nette.toggles = {};
1777		for (i = 0; i < form.elements.length; i++) {
1778			if (form.elements[i].tagName.toLowerCase() in {input: 1, select: 1, textarea: 1, button: 1}) {
1779				Nette.toggleControl(form.elements[i], null, null, !elem);
1780			}
1781		}
1782
1783		for (i in Nette.toggles) {
1784			Nette.toggle(i, Nette.toggles[i], elem);
1785		}
1786	};
1787
1788
1789	/**
1790	 * Process toggles on form element.
1791	 */
1792	Nette.toggleControl = function(elem, rules, success, firsttime, value) {
1793		rules = rules || Nette.parseJSON(elem.getAttribute('data-nette-rules'));
1794		value = value === undefined ? {value: Nette.getEffectiveValue(elem)} : value;
1795
1796		var has = false,
1797			handled = [],
1798			handler = function () {
1799				Nette.toggleForm(elem.form, elem);
1800			},
1801			curSuccess;
1802
1803		for (var id = 0, len = rules.length; id < len; id++) {
1804			var rule = rules[id],
1805				op = rule.op.match(/(~)?([^?]+)/),
1806				curElem = rule.control ? elem.form.elements.namedItem(rule.control) : elem;
1807
1808			if (!curElem) {
1809				continue;
1810			}
1811
1812			curSuccess = success;
1813			if (success !== false) {
1814				rule.neg = op[1];
1815				rule.op = op[2];
1816				var curValue = elem === curElem ? value : {value: Nette.getEffectiveValue(curElem)};
1817				curSuccess = Nette.validateRule(curElem, rule.op, rule.arg, curValue);
1818				if (curSuccess === null) {
1819					continue;
1820
1821				} else if (rule.neg) {
1822					curSuccess = !curSuccess;
1823				}
1824				if (!rule.rules) {
1825					success = curSuccess;
1826				}
1827			}
1828
1829			if ((rule.rules && Nette.toggleControl(elem, rule.rules, curSuccess, firsttime, value)) || rule.toggle) {
1830				has = true;
1831				if (firsttime) {
1832					var oldIE = !document.addEventListener, // IE < 9
1833						name = curElem.tagName ? curElem.name : curElem[0].name,
1834						els = curElem.tagName ? curElem.form.elements : curElem;
1835
1836					for (var i = 0; i < els.length; i++) {
1837						if (els[i].name === name && !Nette.inArray(handled, els[i])) {
1838							Nette.addEvent(els[i], oldIE && els[i].type in {checkbox: 1, radio: 1} ? 'click' : 'change', handler);
1839							handled.push(els[i]);
1840						}
1841					}
1842				}
1843				for (var id2 in rule.toggle || []) {
1844					if (Object.prototype.hasOwnProperty.call(rule.toggle, id2)) {
1845						Nette.toggles[id2] = Nette.toggles[id2] || (rule.toggle[id2] ? curSuccess : !curSuccess);
1846					}
1847				}
1848			}
1849		}
1850		return has;
1851	};
1852
1853
1854	Nette.parseJSON = function(s) {
1855		return (s || '').substr(0, 3) === '{op'
1856			? eval('[' + s + ']') // backward compatibility with Nette 2.0.x
1857			: JSON.parse(s || '[]');
1858	};
1859
1860
1861	/**
1862	 * Displays or hides HTML element.
1863	 */
1864	Nette.toggle = function(id, visible, srcElement) {
1865		var elem = document.getElementById(id);
1866		if (elem) {
1867			elem.style.display = visible ? '' : 'none';
1868		}
1869	};
1870
1871
1872	/**
1873	 * Setup handlers.
1874	 */
1875	Nette.initForm = function(form) {
1876		form.noValidate = 'novalidate';
1877
1878		// LiveForm: addition
1879		LiveForm.forms[form.id] = {
1880			hasError: false,
1881			onLoadValidation: false
1882		};
1883
1884		Nette.addEvent(form, 'submit', function(e) {
1885			if (!Nette.validateForm(form)) {
1886				if (e && e.stopPropagation) {
1887					e.stopPropagation();
1888					e.preventDefault();
1889				} else if (window.event) {
1890					event.cancelBubble = true;
1891					event.returnValue = false;
1892				}
1893			}
1894		});
1895
1896		Nette.toggleForm(form);
1897
1898		// LiveForm: addition
1899		for (var i = 0; i < form.elements.length; i++) {
1900			LiveForm.setupHandlers(form.elements[i]);
1901			LiveForm.processServerErrors(form.elements[i]);
1902		}
1903	};
1904
1905
1906	/**
1907	 * @private
1908	 */
1909	Nette.initOnLoad = function() {
1910		Nette.addEvent(document, 'DOMContentLoaded', function() {
1911			for (var i = 0; i < document.forms.length; i++) {
1912				var form = document.forms[i];
1913				for (var j = 0; j < form.elements.length; j++) {
1914					if (form.elements[j].getAttribute('data-nette-rules')) {
1915						Nette.initForm(form);
1916
1917						// LiveForm: addition
1918						if (LiveForm.hasClass(form, 'validate-on-load')) {
1919							// This is not so nice way, but I don't want to spoil validateForm, validateControl and other methods with another parameter
1920							LiveForm.setFormProperty(form, "onLoadValidation", true);
1921							Nette.validateForm(form);
1922							LiveForm.setFormProperty(form, "onLoadValidation", false);
1923						}
1924
1925						break;
1926					}
1927				}
1928			}
1929
1930			Nette.addEvent(document.body, 'click', function(e) {
1931				var target = e.target || e.srcElement;
1932				if (target.form && target.type in {submit: 1, image: 1}) {
1933					target.form['nette-submittedBy'] = target;
1934				}
1935			});
1936		});
1937	};
1938
1939
1940	/**
1941	 * Determines whether the argument is an array.
1942	 */
1943	Nette.isArray = function(arg) {
1944		return Object.prototype.toString.call(arg) === '[object Array]';
1945	};
1946
1947
1948	/**
1949	 * Search for a specified value within an array.
1950	 */
1951	Nette.inArray = function(arr, val) {
1952		if ([].indexOf) {
1953			return arr.indexOf(val) > -1;
1954		} else {
1955			for (var i = 0; i < arr.length; i++) {
1956				if (arr[i] === val) {
1957					return true;
1958				}
1959			}
1960			return false;
1961		}
1962	};
1963
1964
1965	/**
1966	 * Converts string to web safe characters [a-z0-9-] text.
1967	 */
1968	Nette.webalize = function(s) {
1969		s = s.toLowerCase();
1970		var res = '', i, ch;
1971		for (i = 0; i < s.length; i++) {
1972			ch = Nette.webalizeTable[s.charAt(i)];
vendor: 16,371 bytes, lines 1973-2543
1973			res += ch ? ch : s.charAt(i);
1974		}
1975		return res.replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
1976	};
1977
1978	Nette.webalizeTable = {\u00e1: 'a', \u00e4: 'a', \u010d: 'c', \u010f: 'd', \u00e9: 'e', \u011b: 'e', \u00ed: 'i', \u013e: 'l', \u0148: 'n', \u00f3: 'o', \u00f4: 'o', \u0159: 'r', \u0161: 's', \u0165: 't', \u00fa: 'u', \u016f: 'u', \u00fd: 'y', \u017e: 'z'};
1979
1980	return Nette;
1981}));
1982
1983/**
1984 * AJAX Nette Framework plugin for jQuery
1985 *
1986 * @copyright Copyright (c) 2009, 2010 Jan Marek
1987 * @copyright Copyright (c) 2009, 2010 David Grudl
1988 * @copyright Copyright (c) 2012-2014 Vojtěch Dobeš
1989 * @license MIT
1990 *
1991 * @version 2.3.0
1992 */
1993
1994(function(window, $, undefined) {
1995
1996if (typeof $ !== 'function') {
1997	return console.error('nette.ajax.js: jQuery is missing, load it please');
1998}
1999
2000var nette = function () {
2001	var inner = {
2002		self: this,
2003		initialized: false,
2004		contexts: {},
2005		on: {
2006			init: {},
2007			load: {},
2008			prepare: {},
2009			before: {},
2010			start: {},
2011			success: {},
2012			complete: {},
2013			error: {}
2014		},
2015		fire: function () {
2016			var result = true;
2017			var args = Array.prototype.slice.call(arguments);
2018			var props = args.shift();
2019			var name = (typeof props === 'string') ? props : props.name;
2020			var off = (typeof props === 'object') ? props.off || {} : {};
2021			args.push(inner.self);
2022			$.each(inner.on[name], function (index, reaction) {
2023				if (reaction === undefined || $.inArray(index, off) !== -1) return true;
2024				var temp = reaction.apply(inner.contexts[index], args);
2025				return result = (temp === undefined || temp);
2026			});
2027			return result;
2028		},
2029		requestHandler: function (e) {
2030			var xhr = inner.self.ajax({}, this, e);
2031			if (xhr && xhr._returnFalse) { // for IE 8
2032				return false;
2033			}
2034		},
2035		ext: function (callbacks, context, name) {
2036			while (!name) {
2037				name = 'ext_' + Math.random();
2038				if (inner.contexts[name]) {
2039					name = undefined;
2040				}
2041			}
2042
2043			$.each(callbacks, function (event, callback) {
2044				inner.on[event][name] = callback;
2045			});
2046			inner.contexts[name] = $.extend(context ? context : {}, {
2047				name: function () {
2048					return name;
2049				},
2050				ext: function (name, force) {
2051					var ext = inner.contexts[name];
2052					if (!ext && force) throw "Extension '" + this.name() + "' depends on disabled extension '" + name + "'.";
2053					return ext;
2054				}
2055			});
2056		}
2057	};
2058
2059	/**
2060	 * Allows manipulation with extensions.
2061	 * When called with 1. argument only, it returns extension with given name.
2062	 * When called with 2. argument equal to false, it removes extension entirely.
2063	 * When called with 2. argument equal to hash of event callbacks, it adds new extension.
2064	 *
2065	 * @param  {string} Name of extension
2066	 * @param  {bool|object|null} Set of callbacks for any events OR false for removing extension.
2067	 * @param  {object|null} Context for added extension
2068	 * @return {$.nette|object} Provides a fluent interface OR returns extensions with given name
2069	 */
2070	this.ext = function (name, callbacks, context) {
2071		if (typeof name === 'object') {
2072			inner.ext(name, callbacks);
2073		} else if (callbacks === undefined) {
2074			return inner.contexts[name];
2075		} else if (!callbacks) {
2076			$.each(['init', 'load', 'prepare', 'before', 'start', 'success', 'complete', 'error'], function (index, event) {
2077				inner.on[event][name] = undefined;
2078			});
2079			inner.contexts[name] = undefined;
2080		} else if (typeof name === 'string' && inner.contexts[name] !== undefined) {
2081			throw "Cannot override already registered nette-ajax extension '" + name + "'.";
2082		} else {
2083			inner.ext(callbacks, context, name);
2084		}
2085		return this;
2086	};
2087
2088	/**
2089	 * Initializes the plugin:
2090	 * - fires 'init' event, then 'load' event
2091	 * - when called with any arguments, it will override default 'init' extension
2092	 *   with provided callbacks
2093	 *
2094	 * @param  {function|object|null} Callback for 'load' event or entire set of callbacks for any events
2095	 * @param  {object|null} Context provided for callbacks in first argument
2096	 * @return {$.nette} Provides a fluent interface
2097	 */
2098	this.init = function (load, loadContext) {
2099		if (inner.initialized) throw 'Cannot initialize nette-ajax twice.';
2100
2101		if (typeof load === 'function') {
2102			this.ext('init', null);
2103			this.ext('init', {
2104				load: load
2105			}, loadContext);
2106		} else if (typeof load === 'object') {
2107			this.ext('init', null);
2108			this.ext('init', load, loadContext);
2109		} else if (load !== undefined) {
2110			throw 'Argument of init() can be function or function-hash only.';
2111		}
2112
2113		inner.initialized = true;
2114
2115		inner.fire('init');
2116		this.load();
2117		return this;
2118	};
2119
2120	/**
2121	 * Fires 'load' event
2122	 *
2123	 * @return {$.nette} Provides a fluent interface
2124	 */
2125	this.load = function () {
2126		inner.fire('load', inner.requestHandler);
2127		return this;
2128	};
2129
2130	/**
2131	 * Executes AJAX request. Attaches listeners and events.
2132	 *
2133	 * @param  {object|string} settings or URL
2134	 * @param  {Element|null} ussually Anchor or Form
2135	 * @param  {event|null} event causing the request
2136	 * @return {jqXHR|null}
2137	 */
2138	this.ajax = function (settings, ui, e) {
2139		if ($.type(settings) === 'string') {
2140			settings = {url: settings};
2141		}
2142		if (!settings.nette && ui && e) {
2143			var $el = $(ui), xhr, originalBeforeSend;
2144			var analyze = settings.nette = {
2145				e: e,
2146				ui: ui,
2147				el: $el,
2148				isForm: $el.is('form'),
2149				isSubmit: $el.is('input[type=submit]') || $el.is('button[type=submit]'),
2150				isImage: $el.is('input[type=image]'),
2151				form: null
2152			};
2153
2154			if (analyze.isSubmit || analyze.isImage) {
2155				analyze.form = analyze.el.closest('form');
2156			} else if (analyze.isForm) {
2157				analyze.form = analyze.el;
2158			}
2159
2160			if (!settings.url) {
2161				settings.url = analyze.form ? analyze.form.attr('action') || window.location.pathname + window.location.search : ui.href;
2162			}
2163			if (!settings.type) {
2164				settings.type = analyze.form ? analyze.form.attr('method') : 'get';
2165			}
2166
2167			if ($el.is('[data-ajax-off]')) {
2168				var rawOff = $el.attr('data-ajax-off');
2169				if (rawOff.indexOf('[') === 0) {
2170					settings.off = $el.data('ajaxOff');
2171				} else if (rawOff.indexOf(',') !== -1) {
2172					settings.off = rawOff.split(',');
2173				} else if (rawOff.indexOf(' ') !== -1) {
2174					settings.off = rawOff.split(' ');
2175				} else {
2176					settings.off = rawOff;
2177				}
2178				if (typeof settings.off === 'string') settings.off = [settings.off];
2179				settings.off = $.grep($.each(settings.off, function (off) {
2180					return $.trim(off);
2181				}), function (off) {
2182					return off.length;
2183				});
2184			}
2185		}
2186
2187		inner.fire({
2188			name: 'prepare',
2189			off: settings.off || {}
2190		}, settings);
2191		if (settings.prepare) {
2192			settings.prepare(settings);
2193		}
2194
2195		originalBeforeSend = settings.beforeSend;
2196		settings.beforeSend = function (xhr, settings) {
2197			var result = inner.fire({
2198				name: 'before',
2199				off: settings.off || {}
2200			}, xhr, settings);
2201			if ((result || result === undefined) && originalBeforeSend) {
2202				result = originalBeforeSend(xhr, settings);
2203			}
2204			return result;
2205		};
2206
2207		return this.handleXHR($.ajax(settings), settings);
2208	};
2209
2210	/**
2211	 * Binds extension callbacks to existing XHR object
2212	 *
2213	 * @param  {jqXHR|null}
2214	 * @param  {object} settings
2215	 * @return {jqXHR|null}
2216	 */
2217	this.handleXHR = function (xhr, settings) {
2218		settings = settings || {};
2219
2220		if (xhr && (typeof xhr.statusText === 'undefined' || xhr.statusText !== 'canceled')) {
2221			xhr.done(function (payload, status, xhr) {
2222				inner.fire({
2223					name: 'success',
2224					off: settings.off || {}
2225				}, payload, status, xhr, settings);
2226			}).fail(function (xhr, status, error) {
2227				inner.fire({
2228					name: 'error',
2229					off: settings.off || {}
2230				}, xhr, status, error, settings);
2231			}).always(function (xhr, status) {
2232				inner.fire({
2233					name: 'complete',
2234					off: settings.off || {}
2235				}, xhr, status, settings);
2236			});
2237			inner.fire({
2238				name: 'start',
2239				off: settings.off || {}
2240			}, xhr, settings);
2241			if (settings.start) {
2242				settings.start(xhr, settings);
2243			}
2244		}
2245		return xhr;
2246	};
2247};
2248
2249$.nette = new ($.extend(nette, $.nette ? $.nette : {}));
2250
2251$.fn.netteAjax = function (e, options) {
2252	return $.nette.ajax(options || {}, this[0], e);
2253};
2254
2255$.fn.netteAjaxOff = function () {
2256	return this.off('.nette');
2257};
2258
2259$.nette.ext('validation', {
2260	before: function (xhr, settings) {
2261		if (!settings.nette) return true;
2262		else var analyze = settings.nette;
2263		var e = analyze.e;
2264
2265		var validate = $.extend(this.defaults, settings.validate || (function () {
2266			if (!analyze.el.is('[data-ajax-validate]')) return;
2267			var attr = analyze.el.data('ajaxValidate');
2268			if (attr === false) return {
2269				keys: false,
2270				url: false,
2271				form: false
2272			}; else if (typeof attr === 'object') return attr;
2273 		})() || {});
2274
2275		var passEvent = false;
2276		if (analyze.el.attr('data-ajax-pass') !== undefined) {
2277			passEvent = analyze.el.data('ajaxPass');
2278			passEvent = typeof passEvent === 'bool' ? passEvent : true;
2279		}
2280
2281		if (validate.keys) {
2282			// thx to @vrana
2283			var explicitNoAjax = e.button || e.ctrlKey || e.shiftKey || e.altKey || e.metaKey;
2284
2285			if (analyze.form) {
2286				if (explicitNoAjax && analyze.isSubmit) {
2287					this.explicitNoAjax = true;
2288					return false;
2289				} else if (analyze.isForm && this.explicitNoAjax) {
2290					this.explicitNoAjax = false;
2291					return false;
2292				}
2293			} else if (explicitNoAjax) return false;
2294		}
2295
2296		if (validate.form && analyze.form) {
2297			if (analyze.isSubmit || analyze.isImage) {
2298				analyze.form.get(0)["nette-submittedBy"] = analyze.el.get(0);
2299			}
2300			var notValid;
2301			if ((typeof Nette.version === 'undefined' || Nette.version == '2.3')) { // Nette 2.3 and older
2302				var ie = this.ie();
2303				notValid = (analyze.form.get(0).onsubmit && analyze.form.get(0).onsubmit((typeof ie !== 'undefined' && ie < 9) ? undefined : e) === false);
2304			} else { // Nette 2.4 and up
2305				notValid = ((analyze.form.get(0).onsubmit ? analyze.form.triggerHandler('submit') : Nette.validateForm(analyze.form.get(0))) === false)
2306			}
2307			if (notValid) {
2308				e.stopImmediatePropagation();
2309				e.preventDefault();
2310				return false;
2311			}
2312		}
2313
2314		if (validate.url) {
2315			// thx to @vrana
2316			var urlToValidate = analyze.form ? settings.url : analyze.el.attr('href');
2317			// Check if URL is absolute
2318			if (/(?:^[a-z][a-z0-9+.-]*:|\/\/)/.test(urlToValidate)) {
2319				// Parse absolute URL
2320				var parsedUrl = new URL(urlToValidate);
2321				if (/:|^#/.test(parsedUrl['pathname'] + parsedUrl['search'] + parsedUrl['hash'])) return false;
2322			} else {
2323				if (/:|^#/.test(urlToValidate)) return false;
2324			}
2325		}
2326
2327		if (!passEvent) {
2328			e.stopPropagation();
2329			e.preventDefault();
2330			xhr._returnFalse = true; // for IE 8
2331		}
2332		return true;
2333	}
2334}, {
2335	defaults: {
2336		keys: true,
2337		url: true,
2338		form: true
2339	},
2340	explicitNoAjax: false,
2341	ie: function (undefined) { // http://james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
2342		var v = 3;
2343		var div = document.createElement('div');
2344		var all = div.getElementsByTagName('i');
2345		while (
2346        		div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->',
2347			all[0]
2348		);
2349		return v > 4 ? v : undefined;
2350	}
2351});
2352
2353$.nette.ext('forms', {
2354	init: function () {
2355		var snippets;
2356		if (!window.Nette || !(snippets = this.ext('snippets'))) return;
2357
2358		snippets.after(function ($el) {
2359			$el.find('form').each(function() {
2360				window.Nette.initForm(this);
2361			});
2362		});
2363	},
2364	prepare: function (settings) {
2365		var analyze = settings.nette;
2366		if (!analyze || !analyze.form) return;
2367		var e = analyze.e;
2368		var originalData = settings.data || {};
2369		var data = {};
2370
2371		if (analyze.isSubmit) {
2372			data[analyze.el.attr('name')] = analyze.el.val() || '';
2373		} else if (analyze.isImage) {
2374			var offset = analyze.el.offset();
2375			var name = analyze.el.attr('name');
2376			var dataOffset = [ Math.max(0, e.pageX - offset.left), Math.max(0, e.pageY - offset.top) ];
2377
2378			if (name.indexOf('[', 0) !== -1) { // inside a container
2379				data[name] = dataOffset;
2380			} else {
2381				data[name + '.x'] = dataOffset[0];
2382				data[name + '.y'] = dataOffset[1];
2383			}
2384		}
2385		
2386		// https://developer.mozilla.org/en-US/docs/Web/Guide/Using_FormData_Objects#Sending_files_using_a_FormData_object
2387		var formMethod = analyze.form.attr('method');
2388		if (formMethod && formMethod.toLowerCase() === 'post' && 'FormData' in window) {
2389			var formData = new FormData(analyze.form[0]);
2390			for (var i in data) {
2391				formData.append(i, data[i]);
2392			}
2393
2394			if (typeof originalData !== 'string') {
2395				for (var i in originalData) {
2396					formData.append(i, originalData[i]);
2397				}
2398			}
2399			
2400			// remove empty file inputs as these causes Safari 11 to stall
2401			// https://stackoverflow.com/questions/49672992/ajax-request-fails-when-sending-formdata-including-empty-file-input-in-safari
2402			if (formData.entries && navigator.userAgent.match(/version\/11(\.[0-9]+)* safari/i)) {
2403				var entries = formData.entries();
2404				for (var i = 0; i < entries.length; i++) {
2405					var pair = entries[i];
2406					if (pair[1] instanceof File && pair[1].name === '' && pair[1].size === 0) {
2407						formData.delete(pair[0]);
2408					}
2409				}
2410			}
2411
2412			settings.data = formData;
2413			settings.processData = false;
2414			settings.contentType = false;
2415		} else {
2416			if (typeof originalData !== 'string') {
2417				originalData = $.param(originalData);
2418			}
2419			data = $.param(data);
2420			settings.data = analyze.form.serialize() + (data ? '&' + data : '') + '&' + originalData;
2421		}
2422	}
2423});
2424
2425// default snippet handler
2426$.nette.ext('snippets', {
2427	success: function (payload) {
2428		if (payload.snippets) {
2429			this.updateSnippets(payload.snippets);
2430		}
2431	}
2432}, {
2433	beforeQueue: $.Callbacks(),
2434	afterQueue: $.Callbacks(),
2435	completeQueue: $.Callbacks(),
2436	before: function (callback) {
2437		this.beforeQueue.add(callback);
2438	},
2439	after: function (callback) {
2440		this.afterQueue.add(callback);
2441	},
2442	complete: function (callback) {
2443		this.completeQueue.add(callback);
2444	},
2445	updateSnippets: function (snippets, back) {
2446		var that = this;
2447		var elements = [];
2448		for (var i in snippets) {
2449			var $el = this.getElement(i);
2450			if ($el.get(0)) {
2451				elements.push($el.get(0));
2452			}
2453			this.updateSnippet($el, snippets[i], back);
2454		}
2455		$(elements).promise().done(function () {
2456			that.completeQueue.fire();
2457		});
2458	},
2459	updateSnippet: function ($el, html, back) {
2460		// Fix for setting document title in IE
2461		if ($el.is('title')) {
2462			document.title = html;
2463		} else {
2464			this.beforeQueue.fire($el);
2465			this.applySnippet($el, html, back);
2466			this.afterQueue.fire($el);
2467		}
2468	},
2469	getElement: function (id) {
2470		return $('#' + this.escapeSelector(id));
2471	},
2472	applySnippet: function ($el, html, back) {
2473		if (!back && $el.is('[data-ajax-append]')) {
2474			$el.append(html);
2475		} else if (!back && $el.is('[data-ajax-prepend]')) {
2476			$el.prepend(html);
2477		} else if ($el.html() != html || /<[^>]*script/.test(html)) {
2478			$el.html(html);
2479		}
2480	},
2481	escapeSelector: function (selector) {
2482		// thx to @uestla (https://github.com/uestla)
2483		return selector.replace(/[\!"#\$%&'\(\)\*\+,\.\/:;<=>\?@\[\\\]\^`\{\|\}~]/g, '\\$&');
2484	}
2485});
2486
2487// support $this->redirect()
2488$.nette.ext('redirect', {
2489	success: function (payload) {
2490		if (payload.redirect) {
2491			window.location.href = payload.redirect;
2492			return false;
2493		}
2494	}
2495});
2496
2497// current page state
2498$.nette.ext('state', {
2499	success: function (payload) {
2500		if (payload.state) {
2501			this.state = payload.state;
2502		}
2503	}
2504}, {state: null});
2505
2506// abort last request if new started
2507$.nette.ext('unique', {
2508	start: function (xhr) {
2509		if (this.xhr) {
2510			this.xhr.abort();
2511		}
2512		this.xhr = xhr;
2513	},
2514	complete: function () {
2515		this.xhr = null;
2516	}
2517}, {xhr: null});
2518
2519// option to abort by ESC (thx to @vrana)
2520$.nette.ext('abort', {
2521	init: function () {
2522		$('body').keydown($.proxy(function (e) {
2523			if (this.xhr && (e.keyCode.toString() === '27' // Esc
2524			&& !(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey))
2525			) {
2526				this.xhr.abort();
2527			}
2528		}, this));
2529	},
2530	start: function (xhr) {
2531		this.xhr = xhr;
2532	},
2533	complete: function () {
2534		this.xhr = null;
2535	}
2536}, {xhr: null});
2537
2538$.nette.ext('load', {
2539	success: function () {
2540		$.nette.load();
2541	}
2542});
2543
2544// default ajaxification (can be overridden in init())
2545$.nette.ext('init', {
2546	load: function (rh) {
2547		$(this.linkSelector).off('click.nette', rh).on('click.nette', rh);
2548		$(this.formSelector).off('submit.nette', rh).on('submit.nette', rh)
2549			.off('click.nette', ':image', rh).on('click.nette', ':image', rh)
2550			.off('click.nette', ':submit', rh).on('click.nette', ':submit', rh);
2551		$(this.buttonSelector).closest('form')
2552			.off('click.nette', this.buttonSelector, rh).on('click.nette', this.buttonSelector, rh);
2553	}
2554}, {
2555	linkSelector: 'a.ajax',
2556	formSelector: 'form.ajax',
2557	buttonSelector: 'input.ajax[type="submit"], button.ajax[type="submit"], input.ajax[type="image"]'
2558});
2559
2560})(window, window.jQuery);
2561
2562(function ($) {
2563	$.nette.ext({
2564		init: function () {
2565			this.init();
2566		},
2567		success: function () {
2568			this.init();
2569		}
2570	}, {
2571		init: function () {
2572			$('[data-async]').each(function () {
2573				var $this = $(this);
2574				if ($this.data('asyncInitialized')) {
2575					return;
2576				}
2577				$this.data('asyncInitialized', true);
2578				$this.prepend('<i class="fa fa-spinner fa-spin"></i> ');
2579
2580				$.nette.ajax({
2581					url: $this.data('asyncLink') || $this.attr('href'),
2582					off: ['history', 'unique']
2583				}, $this, $.Event('asyncLoad'));
2584			});
2585		}
2586	});
2587})(window.jQuery);
2588
2589(function ($) {
2590
2591	$.nette.ext('bs-modal', {
2592		init: function () {
2593			var self = this;
2594
2595			this.ext('snippets', true).after($.proxy(function ($el) {
2596				if (!$el.is('.modal')) {
2597					return;
2598				}
2599
2600				self.open($el);
2601			}, this));
2602
2603			$('.modal[id^="snippet-"]').each(function () {
2604				self.open($(this));
2605			});
2606		}
2607	}, {
2608		open: function (el) {
2609			var content = el.find('.modal-content');
2610			if (!content.length) {
2611				return; // ignore empty modal
2612			}
2613
2614			el.modal({});
2615		}
2616	});
2617
2618})(jQuery);
2619
2620(function ($) {
2621
2622	$.nette.ext('overlay', {
2623		before: function (xhr, settings) {
2624			if (!settings.nette || !settings.nette.el) {
2625				return;
2626			}
2627
2628			var tar = $(settings.nette.el);
2629			var container = tar.closest('.ajax-overlay');
2630
2631			var text = container.data('overlay-text');
2632			if (typeof text == 'undefined') {
2633				text = '<p>Loading, please wait...</p>';
2634			}
2635
2636			if (container.length == 0) {
2637				return;
2638			}
2639
2640			var otherTarget = $(container.data('overlay-el'));
2641			if (otherTarget.length) {
2642				container = otherTarget.css({'position': 'relative'});
2643			}
2644
2645			this.overlay = $('<div class="overlay ajaxOverlay">' + text + '</div>');
2646			this.container = container;
2647			this.overlay.appendTo(this.container);
2648			this.overlay.show();
2649		},
2650		success: function (payload) {
2651			if (!this.overlay) {
2652				return;
2653			}
2654
2655			this.overlay.remove();
2656			this.overlay = null;
2657
2658			$('.modal-backdrop').remove();
2659		},
2660		error: function (xhr, status) {
2661			if (!this.overlay) {
2662				return;
2663			}
2664
2665			this.overlay.find('p').html("We're sorry, but something broke.<br>Please try again later.");
2666
2667			var overlay = this.overlay;
2668			setTimeout(function () {
2669				overlay.remove();
2670			}, 3000);
2671			this.overlay = null;
2672		}
2673	}, { container: null, overlay: null });
2674
2675})(jQuery);
2676
2677(function($, undefined) {
2678
2679$.nette.ext({
2680	before: function (xhr, settings) {
2681		if (!settings.nette) {
2682			return;
2683		}
2684
2685		var question = settings.nette.el.data('confirm-ajax');
2686		if (question) {
2687			return confirm(question);
2688		}
2689	}
2690});
2691
2692})(jQuery);
2693
2694// Ion.RangeSlider
2695// version 2.1.7 Build: 371
2696// © Denis Ineshin, 2017
2697// https://github.com/IonDen
2698//
2699// Project page:    http://ionden.com/a/plugins/ion.rangeSlider/en.html
2700// GitHub page:     https://github.com/IonDen/ion.rangeSlider
2701//
2702// Released under MIT licence:
2703// http://ionden.com/a/plugins/licence-en.html
2704// =====================================================================================================================
2705
2706;(function(factory) {
2707    if (typeof define === "function" && define.amd) {
2708        define(["jquery"], function (jQuery) {
2709            return factory(jQuery, document, window, navigator);
2710        });
2711    } else if (typeof exports === "object") {
2712        factory(require("jquery"), document, window, navigator);
2713    } else {
2714        factory(jQuery, document, window, navigator);
2715    }
2716} (function ($, document, window, navigator, undefined) {
2717    "use strict";
2718
2719    // =================================================================================================================
2720    // Service
2721
2722    var plugin_count = 0;
2723
2724    // IE8 fix
2725    var is_old_ie = (function () {
2726        var n = navigator.userAgent,
2727            r = /msie\s\d+/i,
2728            v;
2729        if (n.search(r) > 0) {
2730            v = r.exec(n).toString();
2731            v = v.split(" ")[1];
2732            if (v < 9) {
2733                $("html").addClass("lt-ie9");
2734                return true;
2735            }
2736        }
2737        return false;
2738    } ());
2739    if (!Function.prototype.bind) {
2740        Function.prototype.bind = function bind(that) {
2741
2742            var target = this;
2743            var slice = [].slice;
2744
2745            if (typeof target != "function") {
2746                throw new TypeError();
2747            }
2748
2749            var args = slice.call(arguments, 1),
2750                bound = function () {
2751
2752                    if (this instanceof bound) {
2753
2754                        var F = function(){};
2755                        F.prototype = target.prototype;
2756                        var self = new F();
2757
2758                        var result = target.apply(
2759                            self,
2760                            args.concat(slice.call(arguments))
2761                        );
2762                        if (Object(result) === result) {
2763                            return result;
2764                        }
2765                        return self;
2766
2767                    } else {
2768
2769                        return target.apply(
2770                            that,
2771                            args.concat(slice.call(arguments))
2772                        );
2773
2774                    }
2775
2776                };
2777
2778            return bound;
2779        };
2780    }
2781    if (!Array.prototype.indexOf) {
2782        Array.prototype.indexOf = function(searchElement, fromIndex) {
2783            var k;
2784            if (this == null) {
2785                throw new TypeError('"this" is null or not defined');
2786            }
2787            var O = Object(this);
2788            var len = O.length >>> 0;
2789            if (len === 0) {
2790                return -1;
2791            }
2792            var n = +fromIndex || 0;
2793            if (Math.abs(n) === Infinity) {
2794                n = 0;
2795            }
2796            if (n >= len) {
2797                return -1;
2798            }
2799            k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);
2800            while (k < len) {
2801                if (k in O && O[k] === searchElement) {
2802                    return k;
2803                }
2804                k++;
2805            }
2806            return -1;
2807        };
2808    }
2809
2810
2811
2812    // =================================================================================================================
2813    // Template
2814
2815    var base_html =
2816        '<span class="irs">' +
2817        '<span class="irs-line" tabindex="-1"><span class="irs-line-left"></span><span class="irs-line-mid"></span><span class="irs-line-right"></span></span>' +
2818        '<span class="irs-min">0</span><span class="irs-max">1</span>' +
2819        '<span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span>' +
2820        '</span>' +
2821        '<span class="irs-grid"></span>' +
2822        '<span class="irs-bar"></span>';
2823
2824    var single_html =
2825        '<span class="irs-bar-edge"></span>' +
2826        '<span class="irs-shadow shadow-single"></span>' +
2827        '<span class="irs-slider single"></span>';
2828
2829    var double_html =
2830        '<span class="irs-shadow shadow-from"></span>' +
2831        '<span class="irs-shadow shadow-to"></span>' +
2832        '<span class="irs-slider from"></span>' +
2833        '<span class="irs-slider to"></span>';
2834
2835    var disable_html =
2836        '<span class="irs-disable-mask"></span>';
2837
2838
2839
2840    // =================================================================================================================
2841    // Core
2842
2843    /**
2844     * Main plugin constructor
2845     *
2846     * @param input {Object} link to base input element
2847     * @param options {Object} slider config
2848     * @param plugin_count {Number}
2849     * @constructor
2850     */
2851    var IonRangeSlider = function (input, options, plugin_count) {
2852        this.VERSION = "2.1.7";
2853        this.input = input;
2854        this.plugin_count = plugin_count;
2855        this.current_plugin = 0;
2856        this.calc_count = 0;
2857        this.update_tm = 0;
2858        this.old_from = 0;
2859        this.old_to = 0;
2860        this.old_min_interval = null;
2861        this.raf_id = null;
2862        this.dragging = false;
2863        this.force_redraw = false;
2864        this.no_diapason = false;
2865        this.is_key = false;
2866        this.is_update = false;
2867        this.is_start = true;
2868        this.is_finish = false;
2869        this.is_active = false;
2870        this.is_resize = false;
2871        this.is_click = false;
2872
2873        options = options || {};
2874
2875        // cache for links to all DOM elements
2876        this.$cache = {
2877            win: $(window),
2878            body: $(document.body),
2879            input: $(input),
2880            cont: null,
2881            rs: null,
2882            min: null,
2883            max: null,
2884            from: null,
2885            to: null,
2886            single: null,
2887            bar: null,
2888            line: null,
2889            s_single: null,
2890            s_from: null,
2891            s_to: null,
2892            shad_single: null,
2893            shad_from: null,
2894            shad_to: null,
2895            edge: null,
2896            grid: null,
2897            grid_labels: []
2898        };
2899
2900        // storage for measure variables
2901        this.coords = {
2902            // left
2903            x_gap: 0,
2904            x_pointer: 0,
2905
2906            // width
2907            w_rs: 0,
2908            w_rs_old: 0,
2909            w_handle: 0,
2910
2911            // percents
2912            p_gap: 0,
2913            p_gap_left: 0,
2914            p_gap_right: 0,
2915            p_step: 0,
2916            p_pointer: 0,
2917            p_handle: 0,
2918            p_single_fake: 0,
2919            p_single_real: 0,
2920            p_from_fake: 0,
2921            p_from_real: 0,
2922            p_to_fake: 0,
2923            p_to_real: 0,
2924            p_bar_x: 0,
2925            p_bar_w: 0,
2926
2927            // grid
2928            grid_gap: 0,
2929            big_num: 0,
2930            big: [],
2931            big_w: [],
2932            big_p: [],
2933            big_x: []
2934        };
2935
2936        // storage for labels measure variables
2937        this.labels = {
2938            // width
2939            w_min: 0,
2940            w_max: 0,
2941            w_from: 0,
2942            w_to: 0,
2943            w_single: 0,
2944
2945            // percents
2946            p_min: 0,
2947            p_max: 0,
2948            p_from_fake: 0,
2949            p_from_left: 0,
2950            p_to_fake: 0,
2951            p_to_left: 0,
2952            p_single_fake: 0,
2953            p_single_left: 0
2954        };
2955
2956
2957
2958        /**
2959         * get and validate config
2960         */
2961        var $inp = this.$cache.input,
2962            val = $inp.prop("value"),
2963            config, config_from_data, prop;
2964
2965        // default config
2966        config = {
2967            type: "single",
2968
2969            min: 10,
2970            max: 100,
2971            from: null,
2972            to: null,
2973            step: 1,
2974
2975            min_interval: 0,
2976            max_interval: 0,
2977            drag_interval: false,
2978
2979            values: [],
2980            p_values: [],
2981
2982            from_fixed: false,
2983            from_min: null,
2984            from_max: null,
2985            from_shadow: false,
2986
2987            to_fixed: false,
2988            to_min: null,
2989            to_max: null,
2990            to_shadow: false,
2991
2992            prettify_enabled: true,
2993            prettify_separator: " ",
2994            prettify: null,
2995
2996            force_edges: false,
2997
2998            keyboard: false,
2999            keyboard_step: 5,
3000
3001            grid: false,
3002            grid_margin: true,
3003            grid_num: 4,
3004            grid_snap: false,
3005
3006            hide_min_max: false,
3007            hide_from_to: false,
3008
3009            prefix: "",
3010            postfix: "",
3011            max_postfix: "",
3012            decorate_both: true,
3013            values_separator: " — ",
3014
3015            input_values_separator: ";",
3016
3017            disable: false,
3018
3019            onStart: null,
3020            onChange: null,
3021            onFinish: null,
3022            onUpdate: null
3023        };
3024
3025
3026        // check if base element is input
3027        if ($inp[0].nodeName !== "INPUT") {
3028            console && console.warn && console.warn("Base element should be <input>!", $inp[0]);
3029        }
3030
3031
3032        // config from data-attributes extends js config
3033        config_from_data = {
3034            type: $inp.data("type"),
3035
3036            min: $inp.data("min"),
3037            max: $inp.data("max"),
3038            from: $inp.data("from"),
3039            to: $inp.data("to"),
3040            step: $inp.data("step"),
3041
3042            min_interval: $inp.data("minInterval"),
3043            max_interval: $inp.data("maxInterval"),
3044            drag_interval: $inp.data("dragInterval"),
3045
3046            values: $inp.data("values"),
3047
3048            from_fixed: $inp.data("fromFixed"),
3049            from_min: $inp.data("fromMin"),
3050            from_max: $inp.data("fromMax"),
3051            from_shadow: $inp.data("fromShadow"),
3052
3053            to_fixed: $inp.data("toFixed"),
3054            to_min: $inp.data("toMin"),
3055            to_max: $inp.data("toMax"),
3056            to_shadow: $inp.data("toShadow"),
3057
3058            prettify_enabled: $inp.data("prettifyEnabled"),
3059            prettify_separator: $inp.data("prettifySeparator"),
3060
3061            force_edges: $inp.data("forceEdges"),
3062
3063            keyboard: $inp.data("keyboard"),
3064            keyboard_step: $inp.data("keyboardStep"),
3065
3066            grid: $inp.data("grid"),
3067            grid_margin: $inp.data("gridMargin"),
3068            grid_num: $inp.data("gridNum"),
3069            grid_snap: $inp.data("gridSnap"),
3070
3071            hide_min_max: $inp.data("hideMinMax"),
3072            hide_from_to: $inp.data("hideFromTo"),
3073
3074            prefix: $inp.data("prefix"),
3075            postfix: $inp.data("postfix"),
3076            max_postfix: $inp.data("maxPostfix"),
3077            decorate_both: $inp.data("decorateBoth"),
3078            values_separator: $inp.data("valuesSeparator"),
3079
3080            input_values_separator: $inp.data("inputValuesSeparator"),
3081
3082            disable: $inp.data("disable")
3083        };
3084        config_from_data.values = config_from_data.values && config_from_data.values.split(",");
3085
3086        for (prop in config_from_data) {
3087            if (config_from_data.hasOwnProperty(prop)) {
3088                if (config_from_data[prop] === undefined || config_from_data[prop] === "") {
3089                    delete config_from_data[prop];
3090                }
3091            }
3092        }
3093
3094
3095        // input value extends default config
3096        if (val !== undefined && val !== "") {
3097            val = val.split(config_from_data.input_values_separator || options.input_values_separator || ";");
3098
3099            if (val[0] && val[0] == +val[0]) {
3100                val[0] = +val[0];
3101            }
3102            if (val[1] && val[1] == +val[1]) {
3103                val[1] = +val[1];
3104            }
3105
3106            if (options && options.values && options.values.length) {
3107                config.from = val[0] && options.values.indexOf(val[0]);
3108                config.to = val[1] && options.values.indexOf(val[1]);
3109            } else {
3110                config.from = val[0] && +val[0];
3111                config.to = val[1] && +val[1];
3112            }
3113        }
3114
3115
3116
3117        // js config extends default config
3118        $.extend(config, options);
3119
3120
3121        // data config extends config
3122        $.extend(config, config_from_data);
3123        this.options = config;
3124
3125
3126
3127        // validate config, to be sure that all data types are correct
3128        this.update_check = {};
3129        this.validate();
3130
3131
3132
3133        // default result object, returned to callbacks
3134        this.result = {
3135            input: this.$cache.input,
3136            slider: null,
3137
3138            min: this.options.min,
3139            max: this.options.max,
3140
3141            from: this.options.from,
3142            from_percent: 0,
3143            from_value: null,
3144
3145            to: this.options.to,
3146            to_percent: 0,
3147            to_value: null
3148        };
3149
3150
3151
3152        this.init();
3153    };
3154
3155    IonRangeSlider.prototype = {
3156
3157        /**
3158         * Starts or updates the plugin instance
3159         *
3160         * @param [is_update] {boolean}
3161         */
3162        init: function (is_update) {
3163            this.no_diapason = false;
3164            this.coords.p_step = this.convertToPercent(this.options.step, true);
3165
3166            this.target = "base";
3167
3168            this.toggleInput();
3169            this.append();
3170            this.setMinMax();
3171
3172            if (is_update) {
3173                this.force_redraw = true;
3174                this.calc(true);
3175
3176                // callbacks called
3177                this.callOnUpdate();
3178            } else {
3179                this.force_redraw = true;
3180                this.calc(true);
3181
3182                // callbacks called
3183                this.callOnStart();
3184            }
3185
3186            this.updateScene();
3187        },
3188
3189        /**
3190         * Appends slider template to a DOM
3191         */
3192        append: function () {
3193            var container_html = '<span class="irs js-irs-' + this.plugin_count + '"></span>';
3194            this.$cache.input.before(container_html);
3195            this.$cache.input.prop("readonly", true);
3196            this.$cache.cont = this.$cache.input.prev();
3197            this.result.slider = this.$cache.cont;
3198
3199            this.$cache.cont.html(base_html);
3200            this.$cache.rs = this.$cache.cont.find(".irs");
3201            this.$cache.min = this.$cache.cont.find(".irs-min");
3202            this.$cache.max = this.$cache.cont.find(".irs-max");
3203            this.$cache.from = this.$cache.cont.find(".irs-from");
3204            this.$cache.to = this.$cache.cont.find(".irs-to");
3205            this.$cache.single = this.$cache.cont.find(".irs-single");
3206            this.$cache.bar = this.$cache.cont.find(".irs-bar");
3207            this.$cache.line = this.$cache.cont.find(".irs-line");
3208            this.$cache.grid = this.$cache.cont.find(".irs-grid");
3209
3210            if (this.options.type === "single") {
3211                this.$cache.cont.append(single_html);
3212                this.$cache.edge = this.$cache.cont.find(".irs-bar-edge");
3213                this.$cache.s_single = this.$cache.cont.find(".single");
3214                this.$cache.from[0].style.visibility = "hidden";
3215                this.$cache.to[0].style.visibility = "hidden";
3216                this.$cache.shad_single = this.$cache.cont.find(".shadow-single");
3217            } else {
3218                this.$cache.cont.append(double_html);
3219                this.$cache.s_from = this.$cache.cont.find(".from");
3220                this.$cache.s_to = this.$cache.cont.find(".to");
3221                this.$cache.shad_from = this.$cache.cont.find(".shadow-from");
3222                this.$cache.shad_to = this.$cache.cont.find(".shadow-to");
3223
3224                this.setTopHandler();
3225            }
3226
3227            if (this.options.hide_from_to) {
3228                this.$cache.from[0].style.display = "none";
3229                this.$cache.to[0].style.display = "none";
3230                this.$cache.single[0].style.display = "none";
3231            }
3232
3233            this.appendGrid();
3234
3235            if (this.options.disable) {
3236                this.appendDisableMask();
3237                this.$cache.input[0].disabled = true;
3238            } else {
3239                this.$cache.cont.removeClass("irs-disabled");
3240                this.$cache.input[0].disabled = false;
3241                this.bindEvents();
3242            }
3243
3244            if (this.options.drag_interval) {
3245                this.$cache.bar[0].style.cursor = "ew-resize";
3246            }
3247        },
3248
3249        /**
3250         * Determine which handler has a priority
3251         * works only for double slider type
3252         */
3253        setTopHandler: function () {
3254            var min = this.options.min,
3255                max = this.options.max,
3256                from = this.options.from,
3257                to = this.options.to;
3258
3259            if (from > min && to === max) {
3260                this.$cache.s_from.addClass("type_last");
3261            } else if (to < max) {
3262                this.$cache.s_to.addClass("type_last");
3263            }
3264        },
3265
3266        /**
3267         * Determine which handles was clicked last
3268         * and which handler should have hover effect
3269         *
3270         * @param target {String}
3271         */
3272        changeLevel: function (target) {
3273            switch (target) {
3274                case "single":
3275                    this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_single_fake);
3276                    break;
3277                case "from":
3278                    this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake);
3279                    this.$cache.s_from.addClass("state_hover");
3280                    this.$cache.s_from.addClass("type_last");
3281                    this.$cache.s_to.removeClass("type_last");
3282                    break;
3283                case "to":
3284                    this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_to_fake);
3285                    this.$cache.s_to.addClass("state_hover");
3286                    this.$cache.s_to.addClass("type_last");
3287                    this.$cache.s_from.removeClass("type_last");
3288                    break;
3289                case "both":
3290                    this.coords.p_gap_left = this.toFixed(this.coords.p_pointer - this.coords.p_from_fake);
3291                    this.coords.p_gap_right = this.toFixed(this.coords.p_to_fake - this.coords.p_pointer);
3292                    this.$cache.s_to.removeClass("type_last");
3293                    this.$cache.s_from.removeClass("type_last");
3294                    break;
3295            }
3296        },
3297
3298        /**
3299         * Then slider is disabled
3300         * appends extra layer with opacity
3301         */
3302        appendDisableMask: function () {
3303            this.$cache.cont.append(disable_html);
3304            this.$cache.cont.addClass("irs-disabled");
3305        },
3306
3307        /**
3308         * Remove slider instance
3309         * and ubind all events
3310         */
3311        remove: function () {
3312            this.$cache.cont.remove();
3313            this.$cache.cont = null;
3314
3315            this.$cache.line.off("keydown.irs_" + this.plugin_count);
3316
3317            this.$cache.body.off("touchmove.irs_" + this.plugin_count);
3318            this.$cache.body.off("mousemove.irs_" + this.plugin_count);
3319
3320            this.$cache.win.off("touchend.irs_" + this.plugin_count);
3321            this.$cache.win.off("mouseup.irs_" + this.plugin_count);
3322
3323            if (is_old_ie) {
3324                this.$cache.body.off("mouseup.irs_" + this.plugin_count);
3325                this.$cache.body.off("mouseleave.irs_" + this.plugin_count);
3326            }
3327
3328            this.$cache.grid_labels = [];
3329            this.coords.big = [];
3330            this.coords.big_w = [];
3331            this.coords.big_p = [];
3332            this.coords.big_x = [];
3333
3334            cancelAnimationFrame(this.raf_id);
3335        },
3336
3337        /**
3338         * bind all slider events
3339         */
3340        bindEvents: function () {
3341            if (this.no_diapason) {
3342                return;
3343            }
3344
3345            this.$cache.body.on("touchmove.irs_" + this.plugin_count, this.pointerMove.bind(this));
3346            this.$cache.body.on("mousemove.irs_" + this.plugin_count, this.pointerMove.bind(this));
3347
3348            this.$cache.win.on("touchend.irs_" + this.plugin_count, this.pointerUp.bind(this));
3349            this.$cache.win.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this));
3350
3351            this.$cache.line.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3352            this.$cache.line.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3353
3354            if (this.options.drag_interval && this.options.type === "double") {
3355                this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "both"));
3356                this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "both"));
3357            } else {
3358                this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3359                this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3360            }
3361
3362            if (this.options.type === "single") {
3363                this.$cache.single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "single"));
3364                this.$cache.s_single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "single"));
3365                this.$cache.shad_single.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3366
3367                this.$cache.single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "single"));
3368                this.$cache.s_single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "single"));
3369                this.$cache.edge.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3370                this.$cache.shad_single.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3371            } else {
3372                this.$cache.single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, null));
3373                this.$cache.single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, null));
3374
3375                this.$cache.from.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "from"));
3376                this.$cache.s_from.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "from"));
3377                this.$cache.to.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "to"));
3378                this.$cache.s_to.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "to"));
3379                this.$cache.shad_from.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3380                this.$cache.shad_to.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3381
3382                this.$cache.from.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "from"));
3383                this.$cache.s_from.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "from"));
3384                this.$cache.to.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "to"));
3385                this.$cache.s_to.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "to"));
3386                this.$cache.shad_from.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3387                this.$cache.shad_to.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click"));
3388            }
3389
3390            if (this.options.keyboard) {
3391                this.$cache.line.on("keydown.irs_" + this.plugin_count, this.key.bind(this, "keyboard"));
3392            }
3393
3394            if (is_old_ie) {
3395                this.$cache.body.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this));
3396                this.$cache.body.on("mouseleave.irs_" + this.plugin_count, this.pointerUp.bind(this));
3397            }
3398        },
3399
3400        /**
3401         * Mousemove or touchmove
3402         * only for handlers
3403         *
3404         * @param e {Object} event object
3405         */
3406        pointerMove: function (e) {
3407            if (!this.dragging) {
3408                return;
3409            }
3410
3411            var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
3412            this.coords.x_pointer = x - this.coords.x_gap;
3413
3414            this.calc();
3415        },
3416
3417        /**
3418         * Mouseup or touchend
3419         * only for handlers
3420         *
3421         * @param e {Object} event object
3422         */
3423        pointerUp: function (e) {
3424            if (this.current_plugin !== this.plugin_count) {
3425                return;
3426            }
3427
3428            if (this.is_active) {
3429                this.is_active = false;
3430            } else {
3431                return;
3432            }
3433
3434            this.$cache.cont.find(".state_hover").removeClass("state_hover");
3435
3436            this.force_redraw = true;
3437
3438            if (is_old_ie) {
3439                $("*").prop("unselectable", false);
3440            }
3441
3442            this.updateScene();
3443            this.restoreOriginalMinInterval();
3444
3445            // callbacks call
3446            if ($.contains(this.$cache.cont[0], e.target) || this.dragging) {
3447                this.callOnFinish();
3448            }
3449            
3450            this.dragging = false;
3451        },
3452
3453        /**
3454         * Mousedown or touchstart
3455         * only for handlers
3456         *
3457         * @param target {String|null}
3458         * @param e {Object} event object
3459         */
3460        pointerDown: function (target, e) {
3461            e.preventDefault();
3462            var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
3463            if (e.button === 2) {
3464                return;
3465            }
3466
3467            if (target === "both") {
3468                this.setTempMinInterval();
3469            }
3470
3471            if (!target) {
3472                target = this.target || "from";
3473            }
3474
3475            this.current_plugin = this.plugin_count;
3476            this.target = target;
3477
3478            this.is_active = true;
3479            this.dragging = true;
3480
3481            this.coords.x_gap = this.$cache.rs.offset().left;
3482            this.coords.x_pointer = x - this.coords.x_gap;
3483
3484            this.calcPointerPercent();
3485            this.changeLevel(target);
3486
3487            if (is_old_ie) {
3488                $("*").prop("unselectable", true);
3489            }
3490
3491            this.$cache.line.trigger("focus");
3492
3493            this.updateScene();
3494        },
3495
3496        /**
3497         * Mousedown or touchstart
3498         * for other slider elements, like diapason line
3499         *
3500         * @param target {String}
3501         * @param e {Object} event object
3502         */
3503        pointerClick: function (target, e) {
3504            e.preventDefault();
3505            var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX;
3506            if (e.button === 2) {
3507                return;
3508            }
3509
3510            this.current_plugin = this.plugin_count;
3511            this.target = target;
3512
3513            this.is_click = true;
3514            this.coords.x_gap = this.$cache.rs.offset().left;
3515            this.coords.x_pointer = +(x - this.coords.x_gap).toFixed();
3516
3517            this.force_redraw = true;
3518            this.calc();
3519
3520            this.$cache.line.trigger("focus");
3521        },
3522
3523        /**
3524         * Keyborard controls for focused slider
3525         *
3526         * @param target {String}
3527         * @param e {Object} event object
3528         * @returns {boolean|undefined}
3529         */
3530        key: function (target, e) {
3531            if (this.current_plugin !== this.plugin_count || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
3532                return;
3533            }
3534
3535            switch (e.which) {
3536                case 83: // W
3537                case 65: // A
3538                case 40: // DOWN
3539                case 37: // LEFT
3540                    e.preventDefault();
3541                    this.moveByKey(false);
3542                    break;
3543
3544                case 87: // S
3545                case 68: // D
3546                case 38: // UP
3547                case 39: // RIGHT
3548                    e.preventDefault();
3549                    this.moveByKey(true);
3550                    break;
3551            }
3552
3553            return true;
3554        },
3555
3556        /**
3557         * Move by key. Beta
3558         * @todo refactor than have plenty of time
3559         *
3560         * @param right {boolean} direction to move
3561         */
3562        moveByKey: function (right) {
3563            var p = this.coords.p_pointer;
3564
3565            if (right) {
3566                p += this.options.keyboard_step;
3567            } else {
3568                p -= this.options.keyboard_step;
3569            }
3570
3571            this.coords.x_pointer = this.toFixed(this.coords.w_rs / 100 * p);
3572            this.is_key = true;
3573            this.calc();
3574        },
3575
3576        /**
3577         * Set visibility and content
3578         * of Min and Max labels
3579         */
3580        setMinMax: function () {
3581            if (!this.options) {
3582                return;
3583            }
3584
3585            if (this.options.hide_min_max) {
3586                this.$cache.min[0].style.display = "none";
3587                this.$cache.max[0].style.display = "none";
3588                return;
3589            }
3590
3591            if (this.options.values.length) {
3592                this.$cache.min.html(this.decorate(this.options.p_values[this.options.min]));
3593                this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));
3594            } else {
3595                this.$cache.min.html(this.decorate(this._prettify(this.options.min), this.options.min));
3596                this.$cache.max.html(this.decorate(this._prettify(this.options.max), this.options.max));
3597            }
3598
3599            this.labels.w_min = this.$cache.min.outerWidth(false);
3600            this.labels.w_max = this.$cache.max.outerWidth(false);
3601        },
3602
3603        /**
3604         * Then dragging interval, prevent interval collapsing
3605         * using min_interval option
3606         */
3607        setTempMinInterval: function () {
3608            var interval = this.result.to - this.result.from;
3609
3610            if (this.old_min_interval === null) {
3611                this.old_min_interval = this.options.min_interval;
3612            }
3613
3614            this.options.min_interval = interval;
3615        },
3616
3617        /**
3618         * Restore min_interval option to original
3619         */
3620        restoreOriginalMinInterval: function () {
3621            if (this.old_min_interval !== null) {
3622                this.options.min_interval = this.old_min_interval;
3623                this.old_min_interval = null;
3624            }
3625        },
3626
3627
3628
3629        // =============================================================================================================
3630        // Calculations
3631
3632        /**
3633         * All calculations and measures start here
3634         *
3635         * @param update {boolean=}
3636         */
3637        calc: function (update) {
3638            if (!this.options) {
3639                return;
3640            }
3641
3642            this.calc_count++;
3643
3644            if (this.calc_count === 10 || update) {
3645                this.calc_count = 0;
3646                this.coords.w_rs = this.$cache.rs.outerWidth(false);
3647
3648                this.calcHandlePercent();
3649            }
3650
3651            if (!this.coords.w_rs) {
3652                return;
3653            }
3654
3655            this.calcPointerPercent();
3656            var handle_x = this.getHandleX();
3657
3658
3659            if (this.target === "both") {
3660                this.coords.p_gap = 0;
3661                handle_x = this.getHandleX();
3662            }
3663
3664            if (this.target === "click") {
3665                this.coords.p_gap = this.coords.p_handle / 2;
3666                handle_x = this.getHandleX();
3667
3668                if (this.options.drag_interval) {
3669                    this.target = "both_one";
3670                } else {
3671                    this.target = this.chooseHandle(handle_x);
3672                }
3673            }
3674
3675            switch (this.target) {
3676                case "base":
3677                    var w = (this.options.max - this.options.min) / 100,
3678                        f = (this.result.from - this.options.min) / w,
3679                        t = (this.result.to - this.options.min) / w;
3680
3681                    this.coords.p_single_real = this.toFixed(f);
3682                    this.coords.p_from_real = this.toFixed(f);
3683                    this.coords.p_to_real = this.toFixed(t);
3684
3685                    this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);
3686                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);
3687                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);
3688
3689                    this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real);
3690                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);
3691                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);
3692
3693                    this.target = null;
3694
3695                    break;
3696
3697                case "single":
3698                    if (this.options.from_fixed) {
3699                        break;
3700                    }
3701
3702                    this.coords.p_single_real = this.convertToRealPercent(handle_x);
3703                    this.coords.p_single_real = this.calcWithStep(this.coords.p_single_real);
3704                    this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max);
3705
3706                    this.coords.p_single_fake = this.convertToFakePercent(this.coords.p_single_real);
3707
3708                    break;
3709
3710                case "from":
3711                    if (this.options.from_fixed) {
3712                        break;
3713                    }
3714
3715                    this.coords.p_from_real = this.convertToRealPercent(handle_x);
3716                    this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real);
3717                    if (this.coords.p_from_real > this.coords.p_to_real) {
3718                        this.coords.p_from_real = this.coords.p_to_real;
3719                    }
3720                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);
3721                    this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from");
3722                    this.coords.p_from_real = this.checkMaxInterval(this.coords.p_from_real, this.coords.p_to_real, "from");
3723
3724                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);
3725
3726                    break;
3727
3728                case "to":
3729                    if (this.options.to_fixed) {
3730                        break;
3731                    }
3732
3733                    this.coords.p_to_real = this.convertToRealPercent(handle_x);
3734                    this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real);
3735                    if (this.coords.p_to_real < this.coords.p_from_real) {
3736                        this.coords.p_to_real = this.coords.p_from_real;
3737                    }
3738                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);
3739                    this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to");
3740                    this.coords.p_to_real = this.checkMaxInterval(this.coords.p_to_real, this.coords.p_from_real, "to");
3741
3742                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);
3743
3744                    break;
3745
3746                case "both":
3747                    if (this.options.from_fixed || this.options.to_fixed) {
3748                        break;
3749                    }
3750
3751                    handle_x = this.toFixed(handle_x + (this.coords.p_handle * 0.001));
3752
3753                    this.coords.p_from_real = this.convertToRealPercent(handle_x) - this.coords.p_gap_left;
3754                    this.coords.p_from_real = this.calcWithStep(this.coords.p_from_real);
3755                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);
3756                    this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from");
3757                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);
3758
3759                    this.coords.p_to_real = this.convertToRealPercent(handle_x) + this.coords.p_gap_right;
3760                    this.coords.p_to_real = this.calcWithStep(this.coords.p_to_real);
3761                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);
3762                    this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to");
3763                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);
3764
3765                    break;
3766
3767                case "both_one":
3768                    if (this.options.from_fixed || this.options.to_fixed) {
3769                        break;
3770                    }
3771
3772                    var real_x = this.convertToRealPercent(handle_x),
3773                        from = this.result.from_percent,
3774                        to = this.result.to_percent,
3775                        full = to - from,
3776                        half = full / 2,
3777                        new_from = real_x - half,
3778                        new_to = real_x + half;
3779
3780                    if (new_from < 0) {
3781                        new_from = 0;
3782                        new_to = new_from + full;
3783                    }
3784
3785                    if (new_to > 100) {
3786                        new_to = 100;
3787                        new_from = new_to - full;
3788                    }
3789
3790                    this.coords.p_from_real = this.calcWithStep(new_from);
3791                    this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max);
3792                    this.coords.p_from_fake = this.convertToFakePercent(this.coords.p_from_real);
3793
3794                    this.coords.p_to_real = this.calcWithStep(new_to);
3795                    this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max);
3796                    this.coords.p_to_fake = this.convertToFakePercent(this.coords.p_to_real);
3797
3798                    break;
3799            }
3800
3801            if (this.options.type === "single") {
3802                this.coords.p_bar_x = (this.coords.p_handle / 2);
3803                this.coords.p_bar_w = this.coords.p_single_fake;
3804
3805                this.result.from_percent = this.coords.p_single_real;
3806                this.result.from = this.convertToValue(this.coords.p_single_real);
3807
3808                if (this.options.values.length) {
3809                    this.result.from_value = this.options.values[this.result.from];
3810                }
3811            } else {
3812                this.coords.p_bar_x = this.toFixed(this.coords.p_from_fake + (this.coords.p_handle / 2));
3813                this.coords.p_bar_w = this.toFixed(this.coords.p_to_fake - this.coords.p_from_fake);
3814
3815                this.result.from_percent = this.coords.p_from_real;
3816                this.result.from = this.convertToValue(this.coords.p_from_real);
3817                this.result.to_percent = this.coords.p_to_real;
3818                this.result.to = this.convertToValue(this.coords.p_to_real);
3819
3820                if (this.options.values.length) {
3821                    this.result.from_value = this.options.values[this.result.from];
3822                    this.result.to_value = this.options.values[this.result.to];
3823                }
3824            }
3825
3826            this.calcMinMax();
3827            this.calcLabels();
3828        },
3829
3830
3831        /**
3832         * calculates pointer X in percent
3833         */
3834        calcPointerPercent: function () {
3835            if (!this.coords.w_rs) {
3836                this.coords.p_pointer = 0;
3837                return;
3838            }
3839
3840            if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer)  ) {
3841                this.coords.x_pointer = 0;
3842            } else if (this.coords.x_pointer > this.coords.w_rs) {
3843                this.coords.x_pointer = this.coords.w_rs;
3844            }
3845
3846            this.coords.p_pointer = this.toFixed(this.coords.x_pointer / this.coords.w_rs * 100);
3847        },
3848
3849        convertToRealPercent: function (fake) {
3850            var full = 100 - this.coords.p_handle;
3851            return fake / full * 100;
3852        },
3853
3854        convertToFakePercent: function (real) {
3855            var full = 100 - this.coords.p_handle;
3856            return real / 100 * full;
3857        },
3858
3859        getHandleX: function () {
3860            var max = 100 - this.coords.p_handle,
3861                x = this.toFixed(this.coords.p_pointer - this.coords.p_gap);
3862
3863            if (x < 0) {
3864                x = 0;
3865            } else if (x > max) {
3866                x = max;
3867            }
3868
3869            return x;
3870        },
3871
3872        calcHandlePercent: function () {
3873            if (this.options.type === "single") {
3874                this.coords.w_handle = this.$cache.s_single.outerWidth(false);
3875            } else {
3876                this.coords.w_handle = this.$cache.s_from.outerWidth(false);
3877            }
3878
3879            this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100);
3880        },
3881
3882        /**
3883         * Find closest handle to pointer click
3884         *
3885         * @param real_x {Number}
3886         * @returns {String}
3887         */
3888        chooseHandle: function (real_x) {
3889            if (this.options.type === "single") {
3890                return "single";
3891            } else {
3892                var m_point = this.coords.p_from_real + ((this.coords.p_to_real - this.coords.p_from_real) / 2);
3893                if (real_x >= m_point) {
3894                    return this.options.to_fixed ? "from" : "to";
3895                } else {
3896                    return this.options.from_fixed ? "to" : "from";
3897                }
3898            }
3899        },
3900
3901        /**
3902         * Measure Min and Max labels width in percent
3903         */
3904        calcMinMax: function () {
3905            if (!this.coords.w_rs) {
3906                return;
3907            }
3908
3909            this.labels.p_min = this.labels.w_min / this.coords.w_rs * 100;
3910            this.labels.p_max = this.labels.w_max / this.coords.w_rs * 100;
3911        },
3912
3913        /**
3914         * Measure labels width and X in percent
3915         */
3916        calcLabels: function () {
3917            if (!this.coords.w_rs || this.options.hide_from_to) {
3918                return;
3919            }
3920
3921            if (this.options.type === "single") {
3922
3923                this.labels.w_single = this.$cache.single.outerWidth(false);
3924                this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;
3925                this.labels.p_single_left = this.coords.p_single_fake + (this.coords.p_handle / 2) - (this.labels.p_single_fake / 2);
3926                this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);
3927
3928            } else {
3929
3930                this.labels.w_from = this.$cache.from.outerWidth(false);
3931                this.labels.p_from_fake = this.labels.w_from / this.coords.w_rs * 100;
3932                this.labels.p_from_left = this.coords.p_from_fake + (this.coords.p_handle / 2) - (this.labels.p_from_fake / 2);
3933                this.labels.p_from_left = this.toFixed(this.labels.p_from_left);
3934                this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from_fake);
3935
3936                this.labels.w_to = this.$cache.to.outerWidth(false);
3937                this.labels.p_to_fake = this.labels.w_to / this.coords.w_rs * 100;
3938                this.labels.p_to_left = this.coords.p_to_fake + (this.coords.p_handle / 2) - (this.labels.p_to_fake / 2);
3939                this.labels.p_to_left = this.toFixed(this.labels.p_to_left);
3940                this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to_fake);
3941
3942                this.labels.w_single = this.$cache.single.outerWidth(false);
3943                this.labels.p_single_fake = this.labels.w_single / this.coords.w_rs * 100;
3944                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);
3945                this.labels.p_single_left = this.toFixed(this.labels.p_single_left);
3946                this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single_fake);
3947
3948            }
3949        },
3950
3951
3952
3953        // =============================================================================================================
3954        // Drawings
3955
3956        /**
3957         * Main function called in request animation frame
3958         * to update everything
3959         */
3960        updateScene: function () {
3961            if (this.raf_id) {
3962                cancelAnimationFrame(this.raf_id);
3963                this.raf_id = null;
3964            }
3965
3966            clearTimeout(this.update_tm);
3967            this.update_tm = null;
3968
3969            if (!this.options) {
3970                return;
3971            }
3972
3973            this.drawHandles();
3974
3975            if (this.is_active) {
3976                this.raf_id = requestAnimationFrame(this.updateScene.bind(this));
3977            } else {
3978                this.update_tm = setTimeout(this.updateScene.bind(this), 300);
3979            }
3980        },
3981
3982        /**
3983         * Draw handles
3984         */
3985        drawHandles: function () {
3986            this.coords.w_rs = this.$cache.rs.outerWidth(false);
3987
3988            if (!this.coords.w_rs) {
3989                return;
3990            }
3991
3992            if (this.coords.w_rs !== this.coords.w_rs_old) {
3993                this.target = "base";
3994                this.is_resize = true;
3995            }
3996
3997            if (this.coords.w_rs !== this.coords.w_rs_old || this.force_redraw) {
3998                this.setMinMax();
3999                this.calc(true);
4000                this.drawLabels();
4001                if (this.options.grid) {
4002                    this.calcGridMargin();
4003                    this.calcGridLabels();
4004                }
4005                this.force_redraw = true;
4006                this.coords.w_rs_old = this.coords.w_rs;
4007                this.drawShadow();
4008            }
4009
4010            if (!this.coords.w_rs) {
4011                return;
4012            }
4013
4014            if (!this.dragging && !this.force_redraw && !this.is_key) {
4015                return;
4016            }
4017
4018            if (this.old_from !== this.result.from || this.old_to !== this.result.to || this.force_redraw || this.is_key) {
4019
4020                this.drawLabels();
4021
4022                this.$cache.bar[0].style.left = this.coords.p_bar_x + "%";
4023                this.$cache.bar[0].style.width = this.coords.p_bar_w + "%";
4024
4025                if (this.options.type === "single") {
4026                    this.$cache.s_single[0].style.left = this.coords.p_single_fake + "%";
4027
4028                    this.$cache.single[0].style.left = this.labels.p_single_left + "%";
4029                } else {
4030                    this.$cache.s_from[0].style.left = this.coords.p_from_fake + "%";
4031                    this.$cache.s_to[0].style.left = this.coords.p_to_fake + "%";
4032
4033                    if (this.old_from !== this.result.from || this.force_redraw) {
4034                        this.$cache.from[0].style.left = this.labels.p_from_left + "%";
4035                    }
4036                    if (this.old_to !== this.result.to || this.force_redraw) {
4037                        this.$cache.to[0].style.left = this.labels.p_to_left + "%";
4038                    }
4039
4040                    this.$cache.single[0].style.left = this.labels.p_single_left + "%";
4041                }
4042
4043                this.writeToInput();
4044
4045                if ((this.old_from !== this.result.from || this.old_to !== this.result.to) && !this.is_start) {
4046                    this.$cache.input.trigger("change");
4047                    this.$cache.input.trigger("input");
4048                }
4049
4050                this.old_from = this.result.from;
4051                this.old_to = this.result.to;
4052
4053                // callbacks call
4054                if (!this.is_resize && !this.is_update && !this.is_start && !this.is_finish) {
4055                    this.callOnChange();
4056                }
4057                if (this.is_key || this.is_click) {
4058                    this.is_key = false;
4059                    this.is_click = false;
4060                    this.callOnFinish();
4061                }
4062
4063                this.is_update = false;
4064                this.is_resize = false;
4065                this.is_finish = false;
4066            }
4067
4068            this.is_start = false;
4069            this.is_key = false;
4070            this.is_click = false;
4071            this.force_redraw = false;
4072        },
4073
4074        /**
4075         * Draw labels
4076         * measure labels collisions
4077         * collapse close labels
4078         */
4079        drawLabels: function () {
4080            if (!this.options) {
4081                return;
4082            }
4083
4084            var values_num = this.options.values.length,
4085                p_values = this.options.p_values,
4086                text_single,
4087                text_from,
4088                text_to;
4089
4090            if (this.options.hide_from_to) {
4091                return;
4092            }
4093
4094            if (this.options.type === "single") {
4095
4096                if (values_num) {
4097                    text_single = this.decorate(p_values[this.result.from]);
4098                    this.$cache.single.html(text_single);
4099                } else {
4100                    text_single = this.decorate(this._prettify(this.result.from), this.result.from);
4101                    this.$cache.single.html(text_single);
4102                }
4103
4104                this.calcLabels();
4105
4106                if (this.labels.p_single_left < this.labels.p_min + 1) {
4107                    this.$cache.min[0].style.visibility = "hidden";
4108                } else {
4109                    this.$cache.min[0].style.visibility = "visible";
4110                }
4111
4112                if (this.labels.p_single_left + this.labels.p_single_fake > 100 - this.labels.p_max - 1) {
4113                    this.$cache.max[0].style.visibility = "hidden";
4114                } else {
4115                    this.$cache.max[0].style.visibility = "visible";
4116                }
4117
4118            } else {
4119
4120                if (values_num) {
4121
4122                    if (this.options.decorate_both) {
4123                        text_single = this.decorate(p_values[this.result.from]);
4124                        text_single += this.options.values_separator;
4125                        text_single += this.decorate(p_values[this.result.to]);
4126                    } else {
4127                        text_single = this.decorate(p_values[this.result.from] + this.options.values_separator + p_values[this.result.to]);
4128                    }
4129                    text_from = this.decorate(p_values[this.result.from]);
4130                    text_to = this.decorate(p_values[this.result.to]);
4131
4132                    this.$cache.single.html(text_single);
4133                    this.$cache.from.html(text_from);
4134                    this.$cache.to.html(text_to);
4135
4136                } else {
4137
4138                    if (this.options.decorate_both) {
4139                        text_single = this.decorate(this._prettify(this.result.from), this.result.from);
4140                        text_single += this.options.values_separator;
4141                        text_single += this.decorate(this._prettify(this.result.to), this.result.to);
4142                    } else {
4143                        text_single = this.decorate(this._prettify(this.result.from) + this.options.values_separator + this._prettify(this.result.to), this.result.to);
4144                    }
4145                    text_from = this.decorate(this._prettify(this.result.from), this.result.from);
4146                    text_to = this.decorate(this._prettify(this.result.to), this.result.to);
4147
4148                    this.$cache.single.html(text_single);
4149                    this.$cache.from.html(text_from);
4150                    this.$cache.to.html(text_to);
4151
4152                }
4153
4154                this.calcLabels();
4155
4156                var min = Math.min(this.labels.p_single_left, this.labels.p_from_left),
4157                    single_left = this.labels.p_single_left + this.labels.p_single_fake,
4158                    to_left = this.labels.p_to_left + this.labels.p_to_fake,
4159                    max = Math.max(single_left, to_left);
4160
4161                if (this.labels.p_from_left + this.labels.p_from_fake >= this.labels.p_to_left) {
4162                    this.$cache.from[0].style.visibility = "hidden";
4163                    this.$cache.to[0].style.visibility = "hidden";
4164                    this.$cache.single[0].style.visibility = "visible";
4165
4166                    if (this.result.from === this.result.to) {
4167                        if (this.target === "from") {
4168                            this.$cache.from[0].style.visibility = "visible";
4169                        } else if (this.target === "to") {
4170                            this.$cache.to[0].style.visibility = "visible";
4171                        } else if (!this.target) {
4172                            this.$cache.from[0].style.visibility = "visible";
4173                        }
4174                        this.$cache.single[0].style.visibility = "hidden";
4175                        max = to_left;
4176                    } else {
4177                        this.$cache.from[0].style.visibility = "hidden";
4178                        this.$cache.to[0].style.visibility = "hidden";
4179                        this.$cache.single[0].style.visibility = "visible";
4180                        max = Math.max(single_left, to_left);
4181                    }
4182                } else {
4183                    this.$cache.from[0].style.visibility = "visible";
4184                    this.$cache.to[0].style.visibility = "visible";
4185                    this.$cache.single[0].style.visibility = "hidden";
4186                }
4187
4188                if (min < this.labels.p_min + 1) {
4189                    this.$cache.min[0].style.visibility = "hidden";
4190                } else {
4191                    this.$cache.min[0].style.visibility = "visible";
4192                }
4193
4194                if (max > 100 - this.labels.p_max - 1) {
4195                    this.$cache.max[0].style.visibility = "hidden";
4196                } else {
4197                    this.$cache.max[0].style.visibility = "visible";
4198                }
4199
4200            }
4201        },
4202
4203        /**
4204         * Draw shadow intervals
4205         */
4206        drawShadow: function () {
4207            var o = this.options,
4208                c = this.$cache,
4209
4210                is_from_min = typeof o.from_min === "number" && !isNaN(o.from_min),
4211                is_from_max = typeof o.from_max === "number" && !isNaN(o.from_max),
4212                is_to_min = typeof o.to_min === "number" && !isNaN(o.to_min),
4213                is_to_max = typeof o.to_max === "number" && !isNaN(o.to_max),
4214
4215                from_min,
4216                from_max,
4217                to_min,
4218                to_max;
4219
4220            if (o.type === "single") {
4221                if (o.from_shadow && (is_from_min || is_from_max)) {
4222                    from_min = this.convertToPercent(is_from_min ? o.from_min : o.min);
4223                    from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min;
4224                    from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));
4225                    from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));
4226                    from_min = from_min + (this.coords.p_handle / 2);
4227
4228                    c.shad_single[0].style.display = "block";
4229                    c.shad_single[0].style.left = from_min + "%";
4230                    c.shad_single[0].style.width = from_max + "%";
4231                } else {
4232                    c.shad_single[0].style.display = "none";
4233                }
4234            } else {
4235                if (o.from_shadow && (is_from_min || is_from_max)) {
4236                    from_min = this.convertToPercent(is_from_min ? o.from_min : o.min);
4237                    from_max = this.convertToPercent(is_from_max ? o.from_max : o.max) - from_min;
4238                    from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min));
4239                    from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max));
4240                    from_min = from_min + (this.coords.p_handle / 2);
4241
4242                    c.shad_from[0].style.display = "block";
4243                    c.shad_from[0].style.left = from_min + "%";
4244                    c.shad_from[0].style.width = from_max + "%";
4245                } else {
4246                    c.shad_from[0].style.display = "none";
4247                }
4248
4249                if (o.to_shadow && (is_to_min || is_to_max)) {
4250                    to_min = this.convertToPercent(is_to_min ? o.to_min : o.min);
4251                    to_max = this.convertToPercent(is_to_max ? o.to_max : o.max) - to_min;
4252                    to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min));
4253                    to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max));
4254                    to_min = to_min + (this.coords.p_handle / 2);
4255
4256                    c.shad_to[0].style.display = "block";
4257                    c.shad_to[0].style.left = to_min + "%";
4258                    c.shad_to[0].style.width = to_max + "%";
4259                } else {
4260                    c.shad_to[0].style.display = "none";
4261                }
4262            }
4263        },
4264
4265
4266
4267        /**
4268         * Write values to input element
4269         */
4270        writeToInput: function () {
4271            if (this.options.type === "single") {
4272                if (this.options.values.length) {
4273                    this.$cache.input.prop("value", this.result.from_value);
4274                } else {
4275                    this.$cache.input.prop("value", this.result.from);
4276                }
4277                this.$cache.input.data("from", this.result.from);
4278            } else {
4279                if (this.options.values.length) {
4280                    this.$cache.input.prop("value", this.result.from_value + this.options.input_values_separator + this.result.to_value);
4281                } else {
4282                    this.$cache.input.prop("value", this.result.from + this.options.input_values_separator + this.result.to);
4283                }
4284                this.$cache.input.data("from", this.result.from);
4285                this.$cache.input.data("to", this.result.to);
4286            }
4287        },
4288
4289
4290
4291        // =============================================================================================================
4292        // Callbacks
4293
4294        callOnStart: function () {
4295            this.writeToInput();
4296
4297            if (this.options.onStart && typeof this.options.onStart === "function") {
4298                this.options.onStart(this.result);
4299            }
4300        },
4301        callOnChange: function () {
4302            this.writeToInput();
4303
4304            if (this.options.onChange && typeof this.options.onChange === "function") {
4305                this.options.onChange(this.result);
4306            }
4307        },
4308        callOnFinish: function () {
4309            this.writeToInput();
4310
4311            if (this.options.onFinish && typeof this.options.onFinish === "function") {
4312                this.options.onFinish(this.result);
4313            }
4314        },
4315        callOnUpdate: function () {
4316            this.writeToInput();
4317
4318            if (this.options.onUpdate && typeof this.options.onUpdate === "function") {
4319                this.options.onUpdate(this.result);
4320            }
4321        },
4322
4323
4324
4325
4326        // =============================================================================================================
4327        // Service methods
4328
4329        toggleInput: function () {
4330            this.$cache.input.toggleClass("irs-hidden-input");
4331        },
4332
4333        /**
4334         * Convert real value to percent
4335         *
4336         * @param value {Number} X in real
4337         * @param no_min {boolean=} don't use min value
4338         * @returns {Number} X in percent
4339         */
4340        convertToPercent: function (value, no_min) {
4341            var diapason = this.options.max - this.options.min,
4342                one_percent = diapason / 100,
4343                val, percent;
4344
4345            if (!diapason) {
4346                this.no_diapason = true;
4347                return 0;
4348            }
4349
4350            if (no_min) {
4351                val = value;
4352            } else {
4353                val = value - this.options.min;
4354            }
4355
4356            percent = val / one_percent;
4357
4358            return this.toFixed(percent);
4359        },
4360
4361        /**
4362         * Convert percent to real values
4363         *
4364         * @param percent {Number} X in percent
4365         * @returns {Number} X in real
4366         */
4367        convertToValue: function (percent) {
4368            var min = this.options.min,
4369                max = this.options.max,
4370                min_decimals = min.toString().split(".")[1],
4371                max_decimals = max.toString().split(".")[1],
4372                min_length, max_length,
4373                avg_decimals = 0,
4374                abs = 0;
4375
4376            if (percent === 0) {
4377                return this.options.min;
4378            }
4379            if (percent === 100) {
4380                return this.options.max;
4381            }
4382
4383
4384            if (min_decimals) {
4385                min_length = min_decimals.length;
4386                avg_decimals = min_length;
4387            }
4388            if (max_decimals) {
4389                max_length = max_decimals.length;
4390                avg_decimals = max_length;
4391            }
4392            if (min_length && max_length) {
4393                avg_decimals = (min_length >= max_length) ? min_length : max_length;
4394            }
4395
4396            if (min < 0) {
4397                abs = Math.abs(min);
4398                min = +(min + abs).toFixed(avg_decimals);
4399                max = +(max + abs).toFixed(avg_decimals);
4400            }
4401
4402            var number = ((max - min) / 100 * percent) + min,
4403                string = this.options.step.toString().split(".")[1],
4404                result;
4405
4406            if (string) {
4407                number = +number.toFixed(string.length);
4408            } else {
4409                number = number / this.options.step;
4410                number = number * this.options.step;
4411
4412                number = +number.toFixed(0);
4413            }
4414
4415            if (abs) {
4416                number -= abs;
4417            }
4418
4419            if (string) {
4420                result = +number.toFixed(string.length);
4421            } else {
4422                result = this.toFixed(number);
4423            }
4424
4425            if (result < this.options.min) {
4426                result = this.options.min;
4427            } else if (result > this.options.max) {
4428                result = this.options.max;
4429            }
4430
4431            return result;
4432        },
4433
4434        /**
4435         * Round percent value with step
4436         *
4437         * @param percent {Number}
4438         * @returns percent {Number} rounded
4439         */
4440        calcWithStep: function (percent) {
4441            var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step;
4442
4443            if (rounded > 100) {
4444                rounded = 100;
4445            }
4446            if (percent === 100) {
4447                rounded = 100;
4448            }
4449
4450            return this.toFixed(rounded);
4451        },
4452
4453        checkMinInterval: function (p_current, p_next, type) {
4454            var o = this.options,
4455                current,
4456                next;
4457
4458            if (!o.min_interval) {
4459                return p_current;
4460            }
4461
4462            current = this.convertToValue(p_current);
4463            next = this.convertToValue(p_next);
4464
4465            if (type === "from") {
4466
4467                if (next - current < o.min_interval) {
4468                    current = next - o.min_interval;
4469                }
4470
4471            } else {
4472
4473                if (current - next < o.min_interval) {
4474                    current = next + o.min_interval;
4475                }
4476
4477            }
4478
4479            return this.convertToPercent(current);
4480        },
4481
4482        checkMaxInterval: function (p_current, p_next, type) {
4483            var o = this.options,
4484                current,
4485                next;
4486
4487            if (!o.max_interval) {
4488                return p_current;
4489            }
4490
4491            current = this.convertToValue(p_current);
4492            next = this.convertToValue(p_next);
4493
4494            if (type === "from") {
4495
4496                if (next - current > o.max_interval) {
4497                    current = next - o.max_interval;
4498                }
4499
4500            } else {
4501
4502                if (current - next > o.max_interval) {
4503                    current = next + o.max_interval;
4504                }
4505
4506            }
4507
4508            return this.convertToPercent(current);
4509        },
4510
4511        checkDiapason: function (p_num, min, max) {
4512            var num = this.convertToValue(p_num),
4513                o = this.options;
4514
4515            if (typeof min !== "number") {
4516                min = o.min;
4517            }
4518
4519            if (typeof max !== "number") {
4520                max = o.max;
4521            }
4522
4523            if (num < min) {
4524                num = min;
4525            }
4526
4527            if (num > max) {
4528                num = max;
4529            }
4530
4531            return this.convertToPercent(num);
4532        },
4533
4534        toFixed: function (num) {
4535            num = num.toFixed(20);
4536            return +num;
4537        },
4538
4539        _prettify: function (num) {
4540            if (!this.options.prettify_enabled) {
4541                return num;
4542            }
4543
4544            if (this.options.prettify && typeof this.options.prettify === "function") {
4545                return this.options.prettify(num);
4546            } else {
4547                return this.prettify(num);
4548            }
4549        },
4550
4551        prettify: function (num) {
4552            var n = num.toString();
4553            return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, "$1" + this.options.prettify_separator);
4554        },
4555
4556        checkEdges: function (left, width) {
4557            if (!this.options.force_edges) {
4558                return this.toFixed(left);
4559            }
4560
4561            if (left < 0) {
4562                left = 0;
4563            } else if (left > 100 - width) {
4564                left = 100 - width;
4565            }
4566
4567            return this.toFixed(left);
4568        },
4569
4570        validate: function () {
4571            var o = this.options,
4572                r = this.result,
4573                v = o.values,
4574                vl = v.length,
4575                value,
4576                i;
4577
4578            if (typeof o.min === "string") o.min = +o.min;
4579            if (typeof o.max === "string") o.max = +o.max;
4580            if (typeof o.from === "string") o.from = +o.from;
4581            if (typeof o.to === "string") o.to = +o.to;
4582            if (typeof o.step === "string") o.step = +o.step;
4583
4584            if (typeof o.from_min === "string") o.from_min = +o.from_min;
4585            if (typeof o.from_max === "string") o.from_max = +o.from_max;
4586            if (typeof o.to_min === "string") o.to_min = +o.to_min;
4587            if (typeof o.to_max === "string") o.to_max = +o.to_max;
4588
4589            if (typeof o.keyboard_step === "string") o.keyboard_step = +o.keyboard_step;
4590            if (typeof o.grid_num === "string") o.grid_num = +o.grid_num;
4591
4592            if (o.max < o.min) {
4593                o.max = o.min;
4594            }
4595
4596            if (vl) {
4597                o.p_values = [];
4598                o.min = 0;
4599                o.max = vl - 1;
4600                o.step = 1;
4601                o.grid_num = o.max;
4602                o.grid_snap = true;
4603
4604                for (i = 0; i < vl; i++) {
4605                    value = +v[i];
4606
4607                    if (!isNaN(value)) {
4608                        v[i] = value;
4609                        value = this._prettify(value);
4610                    } else {
4611                        value = v[i];
4612                    }
4613
4614                    o.p_values.push(value);
4615                }
4616            }
4617
4618            if (typeof o.from !== "number" || isNaN(o.from)) {
4619                o.from = o.min;
4620            }
4621
4622            if (typeof o.to !== "number" || isNaN(o.to)) {
4623                o.to = o.max;
4624            }
4625
4626            if (o.type === "single") {
4627
4628                if (o.from < o.min) o.from = o.min;
4629                if (o.from > o.max) o.from = o.max;
4630
4631            } else {
4632
4633                if (o.from < o.min) o.from = o.min;
4634                if (o.from > o.max) o.from = o.max;
4635
4636                if (o.to < o.min) o.to = o.min;
4637                if (o.to > o.max) o.to = o.max;
4638
4639                if (this.update_check.from) {
4640
4641                    if (this.update_check.from !== o.from) {
4642                        if (o.from > o.to) o.from = o.to;
4643                    }
4644                    if (this.update_check.to !== o.to) {
4645                        if (o.to < o.from) o.to = o.from;
4646                    }
4647
4648                }
4649
4650                if (o.from > o.to) o.from = o.to;
4651                if (o.to < o.from) o.to = o.from;
4652
4653            }
4654
4655            if (typeof o.step !== "number" || isNaN(o.step) || !o.step || o.step < 0) {
4656                o.step = 1;
4657            }
4658
4659            if (typeof o.keyboard_step !== "number" || isNaN(o.keyboard_step) || !o.keyboard_step || o.keyboard_step < 0) {
4660                o.keyboard_step = 5;
4661            }
4662
4663            if (typeof o.from_min === "number" && o.from < o.from_min) {
4664                o.from = o.from_min;
4665            }
4666
4667            if (typeof o.from_max === "number" && o.from > o.from_max) {
4668                o.from = o.from_max;
4669            }
4670
4671            if (typeof o.to_min === "number" && o.to < o.to_min) {
4672                o.to = o.to_min;
4673            }
4674
4675            if (typeof o.to_max === "number" && o.from > o.to_max) {
4676                o.to = o.to_max;
4677            }
4678
4679            if (r) {
4680                if (r.min !== o.min) {
4681                    r.min = o.min;
4682                }
4683
4684                if (r.max !== o.max) {
4685                    r.max = o.max;
4686                }
4687
4688                if (r.from < r.min || r.from > r.max) {
4689                    r.from = o.from;
4690                }
4691
4692                if (r.to < r.min || r.to > r.max) {
4693                    r.to = o.to;
4694                }
4695            }
4696
4697            if (typeof o.min_interval !== "number" || isNaN(o.min_interval) || !o.min_interval || o.min_interval < 0) {
4698                o.min_interval = 0;
4699            }
4700
4701            if (typeof o.max_interval !== "number" || isNaN(o.max_interval) || !o.max_interval || o.max_interval < 0) {
4702                o.max_interval = 0;
4703            }
4704
4705            if (o.min_interval && o.min_interval > o.max - o.min) {
4706                o.min_interval = o.max - o.min;
4707            }
4708
4709            if (o.max_interval && o.max_interval > o.max - o.min) {
4710                o.max_interval = o.max - o.min;
4711            }
4712        },
4713
4714        decorate: function (num, original) {
4715            var decorated = "",
4716                o = this.options;
4717
4718            if (o.prefix) {
4719                decorated += o.prefix;
4720            }
4721
4722            decorated += num;
4723
4724            if (o.max_postfix) {
4725                if (o.values.length && num === o.p_values[o.max]) {
4726                    decorated += o.max_postfix;
4727                    if (o.postfix) {
4728                        decorated += " ";
4729                    }
4730                } else if (original === o.max) {
4731                    decorated += o.max_postfix;
4732                    if (o.postfix) {
4733                        decorated += " ";
4734                    }
4735                }
4736            }
4737
4738            if (o.postfix) {
4739                decorated += o.postfix;
4740            }
4741
4742            return decorated;
4743        },
4744
4745        updateFrom: function () {
4746            this.result.from = this.options.from;
4747            this.result.from_percent = this.convertToPercent(this.result.from);
4748            if (this.options.values) {
4749                this.result.from_value = this.options.values[this.result.from];
4750            }
4751        },
4752
4753        updateTo: function () {
4754            this.result.to = this.options.to;
4755            this.result.to_percent = this.convertToPercent(this.result.to);
4756            if (this.options.values) {
4757                this.result.to_value = this.options.values[this.result.to];
4758            }
4759        },
4760
4761        updateResult: function () {
4762            this.result.min = this.options.min;
4763            this.result.max = this.options.max;
4764            this.updateFrom();
4765            this.updateTo();
4766        },
4767
4768
4769        // =============================================================================================================
4770        // Grid
4771
4772        appendGrid: function () {
4773            if (!this.options.grid) {
4774                return;
4775            }
4776
4777            var o = this.options,
4778                i, z,
4779
4780                total = o.max - o.min,
4781                big_num = o.grid_num,
4782                big_p = 0,
4783                big_w = 0,
4784
4785                small_max = 4,
4786                local_small_max,
4787                small_p,
4788                small_w = 0,
4789
4790                result,
4791                html = '';
4792
4793
4794
4795            this.calcGridMargin();
4796
4797            if (o.grid_snap) {
4798
4799                if (total > 50) {
4800                    big_num = 50 / o.step;
4801                    big_p = this.toFixed(o.step / 0.5);
4802                } else {
4803                    big_num = total / o.step;
4804                    big_p = this.toFixed(o.step / (total / 100));
4805                }
4806
4807            } else {
4808                big_p = this.toFixed(100 / big_num);
4809            }
4810
4811            if (big_num > 4) {
4812                small_max = 3;
4813            }
4814            if (big_num > 7) {
4815                small_max = 2;
4816            }
4817            if (big_num > 14) {
4818                small_max = 1;
4819            }
4820            if (big_num > 28) {
4821                small_max = 0;
4822            }
4823
4824            for (i = 0; i < big_num + 1; i++) {
4825                local_small_max = small_max;
4826
4827                big_w = this.toFixed(big_p * i);
4828
4829                if (big_w > 100) {
4830                    big_w = 100;
4831
4832                    local_small_max -= 2;
4833                    if (local_small_max < 0) {
4834                        local_small_max = 0;
4835                    }
4836                }
4837                this.coords.big[i] = big_w;
4838
4839                small_p = (big_w - (big_p * (i - 1))) / (local_small_max + 1);
4840
4841                for (z = 1; z <= local_small_max; z++) {
4842                    if (big_w === 0) {
4843                        break;
4844                    }
4845
4846                    small_w = this.toFixed(big_w - (small_p * z));
4847
4848                    html += '<span class="irs-grid-pol small" style="left: ' + small_w + '%"></span>';
4849                }
4850
4851                html += '<span class="irs-grid-pol" style="left: ' + big_w + '%"></span>';
4852
4853                result = this.convertToValue(big_w);
4854                if (o.values.length) {
4855                    result = o.p_values[result];
4856                } else {
4857                    result = this._prettify(result);
4858                }
4859
4860                html += '<span class="irs-grid-text js-grid-text-' + i + '" style="left: ' + big_w + '%">' + result + '</span>';
4861            }
4862            this.coords.big_num = Math.ceil(big_num + 1);
4863
4864
4865
4866            this.$cache.cont.addClass("irs-with-grid");
4867            this.$cache.grid.html(html);
4868            this.cacheGridLabels();
4869        },
4870
4871        cacheGridLabels: function () {
4872            var $label, i,
4873                num = this.coords.big_num;
4874
4875            for (i = 0; i < num; i++) {
4876                $label = this.$cache.grid.find(".js-grid-text-" + i);
4877                this.$cache.grid_labels.push($label);
4878            }
4879
4880            this.calcGridLabels();
4881        },
4882
4883        calcGridLabels: function () {
4884            var i, label, start = [], finish = [],
4885                num = this.coords.big_num;
4886
4887            for (i = 0; i < num; i++) {
4888                this.coords.big_w[i] = this.$cache.grid_labels[i].outerWidth(false);
4889                this.coords.big_p[i] = this.toFixed(this.coords.big_w[i] / this.coords.w_rs * 100);
4890                this.coords.big_x[i] = this.toFixed(this.coords.big_p[i] / 2);
4891
4892                start[i] = this.toFixed(this.coords.big[i] - this.coords.big_x[i]);
4893                finish[i] = this.toFixed(start[i] + this.coords.big_p[i]);
4894            }
4895
4896            if (this.options.force_edges) {
4897                if (start[0] < -this.coords.grid_gap) {
4898                    start[0] = -this.coords.grid_gap;
4899                    finish[0] = this.toFixed(start[0] + this.coords.big_p[0]);
4900
4901                    this.coords.big_x[0] = this.coords.grid_gap;
4902                }
4903
4904                if (finish[num - 1] > 100 + this.coords.grid_gap) {
4905                    finish[num - 1] = 100 + this.coords.grid_gap;
4906                    start[num - 1] = this.toFixed(finish[num - 1] - this.coords.big_p[num - 1]);
4907
4908                    this.coords.big_x[num - 1] = this.toFixed(this.coords.big_p[num - 1] - this.coords.grid_gap);
4909                }
4910            }
4911
4912            this.calcGridCollision(2, start, finish);
4913            this.calcGridCollision(4, start, finish);
4914
4915            for (i = 0; i < num; i++) {
4916                label = this.$cache.grid_labels[i][0];
4917
4918                if (this.coords.big_x[i] !== Number.POSITIVE_INFINITY) {
4919                    label.style.marginLeft = -this.coords.big_x[i] + "%";
4920                }
4921            }
4922        },
4923
4924        // Collisions Calc Beta
4925        // TODO: Refactor then have plenty of time
4926        calcGridCollision: function (step, start, finish) {
4927            var i, next_i, label,
4928                num = this.coords.big_num;
4929
4930            for (i = 0; i < num; i += step) {
4931                next_i = i + (step / 2);
4932                if (next_i >= num) {
4933                    break;
4934                }
4935
4936                label = this.$cache.grid_labels[next_i][0];
4937
4938                if (finish[i] <= start[next_i]) {
4939                    label.style.visibility = "visible";
4940                } else {
4941                    label.style.visibility = "hidden";
4942                }
4943            }
4944        },
4945
4946        calcGridMargin: function () {
4947            if (!this.options.grid_margin) {
4948                return;
4949            }
4950
4951            this.coords.w_rs = this.$cache.rs.outerWidth(false);
4952            if (!this.coords.w_rs) {
4953                return;
4954            }
4955
4956            if (this.options.type === "single") {
4957                this.coords.w_handle = this.$cache.s_single.outerWidth(false);
4958            } else {
4959                this.coords.w_handle = this.$cache.s_from.outerWidth(false);
4960            }
4961            this.coords.p_handle = this.toFixed(this.coords.w_handle  / this.coords.w_rs * 100);
4962            this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1);
4963
4964            this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + "%";
4965            this.$cache.grid[0].style.left = this.coords.grid_gap + "%";
4966        },
4967
4968
4969
4970        // =============================================================================================================
4971        // Public methods
4972
4973        update: function (options) {
4974            if (!this.input) {
4975                return;
4976            }
4977
4978            this.is_update = true;
4979
4980            this.options.from = this.result.from;
4981            this.options.to = this.result.to;
4982            this.update_check.from = this.result.from;
4983            this.update_check.to = this.result.to;
4984
4985            this.options = $.extend(this.options, options);
4986            this.validate();
4987            this.updateResult(options);
4988
4989            this.toggleInput();
4990            this.remove();
4991            this.init(true);
4992        },
4993
4994        reset: function () {
4995            if (!this.input) {
4996                return;
4997            }
4998
4999            this.updateResult();
5000            this.update();
5001        },
5002
5003        destroy: function () {
5004            if (!this.input) {
5005                return;
5006            }
5007
5008            this.toggleInput();
5009            this.$cache.input.prop("readonly", false);
5010            $.data(this.input, "ionRangeSlider", null);
5011
5012            this.remove();
5013            this.input = null;
5014            this.options = null;
5015        }
5016    };
5017
5018    $.fn.ionRangeSlider = function (options) {
5019        return this.each(function() {
5020            if (!$.data(this, "ionRangeSlider")) {
5021                $.data(this, "ionRangeSlider", new IonRangeSlider(this, options, plugin_count++));
5022            }
5023        });
5024    };
5025
5026
5027
5028    // =================================================================================================================
5029    // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
5030    // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
5031
5032    // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
5033
5034    // MIT license
5035
5036    (function() {
5037        var lastTime = 0;
5038        var vendors = ['ms', 'moz', 'webkit', 'o'];
5039        for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
5040            window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
5041            window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
5042                || window[vendors[x]+'CancelRequestAnimationFrame'];
5043        }
5044
5045        if (!window.requestAnimationFrame)
5046            window.requestAnimationFrame = function(callback, element) {
5047                var currTime = new Date().getTime();
5048                var timeToCall = Math.max(0, 16 - (currTime - lastTime));
5049                var id = window.setTimeout(function() { callback(currTime + timeToCall); },
5050                    timeToCall);
5051                lastTime = currTime + timeToCall;
5052                return id;
5053            };
5054
5055        if (!window.cancelAnimationFrame)
5056            window.cancelAnimationFrame = function(id) {
5057                clearTimeout(id);
5058            };
5059    }());
5060
5061}));
5062
5063+function(a){"use strict";function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();(function(a){var d="ekkoLightbox",e=a.fn[d],f={title:"",footer:"",showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div></div><div></div></div></div>',leftArrow:"<span>&#10094;</span>",rightArrow:"<span>&#10095;</span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},g=function(){function d(c,e){var g=this;b(this,d),this._config=a.extend({},f,e),this._$modalArrows=null,this._galleryIndex=0,this._galleryName=null,this._padding=null,this._border=null,this._titleIsShown=!1,this._footerIsShown=!1,this._wantedWidth=0,this._wantedHeight=0,this._touchstartX=0,this._touchendX=0,this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1),this._$element=c instanceof jQuery?c:a(c),this._isBootstrap3=3==a.fn.modal.Constructor.VERSION[0];var h='<h4 class="modal-title">'+(this._config.title||"&nbsp;")+"</h4>",i='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">&times;</span></button>',j='<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?i+h:h+i)+"</div>",k='<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||"&nbsp;")+"</div>",l='<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"></div><div class="ekko-lightbox-item fade"></div></div></div>',m='<div class="modal-dialog" role="document"><div class="modal-content">'+j+l+k+"</div></div>";a(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+m+"</div>"),this._$modal=a("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal
5063-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName&&(this._$galleryItems=a(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),a(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'</a><a href="#">'+this._config.rightArrow+"</a></div>"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(a){return a.preventDefault(),g.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(a){return a.preventDefault(),g.navigateRight()}),this.updateNavigation())),this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return g._toggleLoading(!0),g._handle(),g._config.onShown.call(g)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return g._galleryName&&(a(document).off("keydown.ekkoLightbox"),a(window).off("resize.ekkoLightbox")),g._$modal.remove(),g._config.onHidden.call(g)}).modal(this._config),a(window).on("resize.ekkoLightbox",function(){g._resize(g._wantedWidth,g._wantedHeight)}),this._$lightboxContainer.on("touchstart",function(){g._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){g._touchendX=event.changedTouches[0].screenX,g._swipeGesure()})}return c(d,null,[{key:"Default",get:function(){return f}}]),c(d,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(b){return b<0||b>this._$galleryItems.length-1?this:(this._galleryIndex=b,this.updateNavigation(),this._$element=a(this._$galleryItems.get(this._galleryIndex)),void this._handle())}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var a=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?a.find("a:first-child").addClass("disabled"):a.find("a:first-child").removeClass("disabled"),this._galleryIndex===this._$galleryItems.length-1?a.find("a:last-child").addClass("disabled"):a.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(a){return a=a||window.event,39===a.keyCode?this.navigateRight():37===a.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(a,b){return b=b||!1,!b&&this._isImage(a)&&(b="image"),!b&&this._getYoutubeId(a)&&(b="youtube"),!b&&this._getVimeoId(a)&&(b="vimeo"),!b&&this._getInstagramId(a)&&(b="instagram"),(!b||["image","youtube","vimeo","instagram","video","url"].indexOf(b)<0)&&(b="url"),b}},{key:"_isImage",value:function(a){return a&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var a=this,b=this._$lightboxBodyTwo,c=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(b=this._$lightboxBodyOne,c=this._$lightboxBodyTwo),c.removeClass("in show"),setTimeout(function(){a._$lightboxBodyTwo.hasClass("in")||a._$lightboxBodyTwo.empty(),a._$lightboxBodyOne.hasClass("in")||a._$lightboxBodyOne.empty()},500),b.addClass("in show"),b}}
vendor: 6,534 bytes, line 5063
5063,{key:"_handle",value:function(){var a=this._containerToUse();this._updateTitleAndFooter();var b=this._$element.attr("data-remote")||this._$element.attr("href"),c=this._detectRemoteType(b,this._$element.attr("data-type")||!1);if(["image","youtube","vimeo","instagram","video","url"].indexOf(c)<0)return this._error(this._config.strings.type);switch(c){case"image":this._preloadImage(b,a),this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(b,a);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(b),a);break;case"instagram":this._showInstagramVideo(this._getInstagramId(b),a);break;case"video":this._showHtml5Video(b,a);break;default:this._loadRemoteContent(b,a)}return this}},{key:"_getYoutubeId",value:function(a){if(!a)return!1;var b=a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!b||11!==b[2].length)&&b[2]}},{key:"_getVimeoId",value:function(a){return!!(a&&a.indexOf("vimeo")>0)&&a}},{key:"_getInstagramId",value:function(a){return!!(a&&a.indexOf("instagram")>0)&&a}},{key:"_toggleLoading",value:function(b){return b=b||!1,b?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),a(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),a(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(a){return parseInt(this._$modalDialog.css(a),10)+parseInt(this._$modalContent.css(a),10)+parseInt(this._$modalBody.css(a),10)}},{key:"_updateTitleAndFooter",value:function(){var a=this._$element.data("title")||"",b=this._$element.data("footer")||"";return this._titleIsShown=!1,a||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(a||"&nbsp;")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,b?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(b)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(a,b){var c=this._getYoutubeId(a),d=a.indexOf("&")>0?a.substr(a.indexOf("&")):"",e=this._$element.data("width")||560,f=this._$element.data("height")||e/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+c+"?badge=0&autoplay=1&html5=1"+d,e,f,b)}},{key:"_showVimeoVideo",value:function(a,b){var c=this._$element.data("width")||500,d=this._$element.data("height")||c/(560/315);return this._showVideoIframe(a+"?autoplay=1",c,d,b)}},{key:"_showInstagramVideo",value:function(a,b){var c=this._$element.data("width")||612,d=c+80;return a="/"!==a.substr(-1)?a+"/":a,b.html('<iframe width="'+c+'" height="'+d+'" src="'+a+'embed/" frameborder="0" allowfullscreen></iframe>'),this._resize(c,d),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(a,b,c,d){return c=c||b,d.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+b+'" height="'+c+'" src="'+a+'" frameborder="0" allowfullscreen class="embed-responsive-item"></iframe></div>'),this._resize(b,c),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(a,b){var c=this._$element.data("width")||560,d=this._$element.data("height")||c/(560/315);return b.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+c+'" height="'+d+'" src="'+a+'" preload="auto" autoplay controls class="embed-responsive-item"></video></div>'),this._resize(c,d),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(b,c){var d=this,e=this._$element.data("width")||560,f=this._$element.data("height")||560,g=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),g||this._isExternal(b)?(c.html('<iframe src="'+b+'" frameborder="0" allowfullscreen></iframe>'),this._config.onContentLoaded.call(this)):c.load(b,a.proxy(function(){return d._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(e,f),this}},{key:"_isExternal",value:function(a){var b=a.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof b[1]&&b[1].length>0&&b[1].toLowerCase()!==location.protocol||"string"==typeof b[2]&&b[2].length>0&&b[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(a){return console.error(a),this._containerToUse().html(a),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(b,c){if(this._$galleryItems){var d=a(this._$galleryItems.get(b),!1);if("undefined"!=typeof d){var e=d.attr("data-remote")||d.attr("href");return("image"===d.attr("data-type")||this._isImage(e))&&this._preloadImage(e,!1),c>0?this._preloadImageByIndex(b+1,c-1):void 0}}}},{key:"_preloadImage",value:function(b,c){var d=this;c=c||!1;var e=new Image;return c&&!function(){var f=setTimeout(function(){c.append(d._config.loadingMessage)},200);e.onload=function(){f&&clearTimeout(f),f=null;var b=a("<img />");return b.attr("src",e.src),b.addClass("img-fluid"),b.css("width","100%"),c.html(b),d._$modalArrows&&d._$modalArrows.css("display",""),d._resize(e.width,e.height),d._toggleLoading(!1),d._config.onContentLoaded.call(d)},e.onerror=function(){return d._toggleLoading(!1),d._error(d._config.strings.fail+("  "+b))}}(),e.src=b,e}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(b,c){c=c||b,this._wantedWidth=b,this._wantedHeight=c;var d=this._padding.left+this._padding.right+this._border.left+this._border.right,e=Math.min(b+d,this._config.doc.body.clientWidth);b+d>e?(c=(e-d)/b*c,b=e):b+=d;var f=0,g=0;
5063this._footerIsShown&&(g=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(f=this._$modalHeader.outerHeight(!0)||67);var h=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,i=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),j=Math.min(c,a(window).height()-h-i-f-g);if(c>j){var k=Math.min(j/c,1);b=Math.ceil(k*b)}this._$lightboxContainer.css("height",j),this._$modalDialog.css("width","auto").css("maxWidth",b);var l=this._$modal.data("bs.modal");if(l)try{l._handleUpdate()}catch(m){l.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(b){var c=this;return b=b||{},this.each(function(){var e=a(c),f=a.extend({},d.Default,e.data(),"object"==typeof b&&b);new d(c,f)})}}]),d}();return a.fn[d]=g._jQueryInterface,a.fn[d].Constructor=g,a.fn[d].noConflict=function(){return a.fn[d]=e,g._jQueryInterface},g})(jQuery)}(jQuery);
5064//# sourceMappingURL=ekko-lightbox.min.js.map
5065/*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(
vendor: 23,902 bytes, line 5065
5065jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&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."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={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};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),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(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({}
vendor: 8,329 bytes, line 5065
5065,b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var 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","Ⓓ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(
vendor: 6,510 bytes, lines 5065-5066
5065a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){
5066	var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),void 0!==a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=(i.text||"").toUpperCase(),l=(b.term||"").toUpperCase(),m=k===l;if(m||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var n=e.createTag(b);if(null!=n){var o=e.option(n);o.attr("data-select2-tag",!0),e.addOptions([o]),e.insertTag(g,n
vendor: 26,358 bytes, line 5066
5066)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.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(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("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.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("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."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.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)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.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",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){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==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.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 a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){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==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.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",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),
vendor: 2,269 bytes, lines 5066-5067
5066
5067	this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("select2/compat/utils",["jquery"],function(a){function b(b,c,d){var e,f,g=[];e=a.trim(b.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&g.push(this)})),e=a.trim(c.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&(f=d(this),null!=f&&g.push(f))})),b.attr("class",g.join(" "))}return{syncCssClasses:b}}),b.define("select2/compat/containerCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("containerCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptContainerCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("containerCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/dropdownCss",["jquery","./utils"],function(a,b){function c(a){return null}function d(){}return d.prototype.render=function(d){var e=d.call(this),f=this.options.get("dropdownCssClass")||"";a.isFunction(f)&&(f=f(this.$element));var g=this.options.get("adaptDropdownCssClass");if(g=g||c,-1!==f.indexOf(":all:")){f=f.replace(":all:","");var h=g;g=function(a){var b=h(a);return null!=b?b+" "+a:a}}var i=this.options.get("dropdownCss")||{};return a.isFunction(i)&&(i=i(this.$element)),b.syncCssClasses(e,this.$element,g),e.css(i),e.addClass(f),e},d}),b.define("select2/compat/initSelection",["jquery"],function(a){function b(a,b,c){c.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated 
5067in 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=c.get("initSelection"),this._isInitialized=!1,a.call(this,b,c)}return b.prototype.current=function(b,c){var d=this;return this._isInitialized?void b.call(this,c):void this.initSelection.call(null,this.$element,function(b){d._isInitialized=!0,a.isArray(b)||(b=[b]),c(b)})},b}),b.define("select2/compat/inputData",["jquery"],function(a){function b(a,b,c){this._currentData=[],this._valueSeparator=c.get("valueSeparator")||",","hidden"===b.prop("type")&&c.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."),a.call(this,b,c)}return b.prototype.current=function(b,c){function d(b,c){var e=[];return b.selected||-1!==a.inArray(b.id,c)?(b.selected=!0,e.push(b)):b.selected=!1,b.children&&e.push.apply(e,d(b.children,c)),e}for(var e=[],f=0;f<this._currentData.length;f++){var g=this._currentData[f];e.push.apply(e,d(g,this.$element.val().split(this._valueSeparator)))}c(e)},b.prototype.select=function(b,c){if(this.options.get("multiple")){var d=this.$element.val();d+=this._valueSeparator+c.id,this.$element.val(d),this.$element.trigger("change")}else this.current(function(b){a.map(b,function(a){a.selected=!1})}),this.$element.val(c.id),this.$element.trigger("change")},b.prototype.unselect=function(a,b){var c=this;b.selected=!1,this.current(function(a){for(var d=[],e=0;e<a.length;e++){var f=a[e];b.id!=f.id&&d.push(f.id)}c.$element.val(d.join(c._valueSeparator)),c.$element.trigger("change")})},b.prototype.query=function(a,b,c){for(var d=[],e=0;e<this._currentData.length;e++){var f=this._currentData[e],g=this.matches(b,f);null!==g&&d.push(g)}c({results:d})},b.prototype.addOptions=function(b,c){var d=a.map(c,function(b){return a.data(b[0],"data")});this._currentData.push.apply(this._currentData,d)},b}),b.define("select2/compat/matcher",["jquery"],function(a){function b(b){function c(c,d){var e=a.extend(!0,{},d);if(null==c.term||""===a.trim(c.term))return e;if(d.children){for(var f=d.children.length-1;f>=0;f--){var g=d.children[f],h=b(c.term,g.text,g);h||e.children.splice(f,1)}if(e.children.length>0)return e}return b(c.term,d.text,d)?e:null}return c}return b}),b.define("select2/compat/query",[],function(){function a(a,b,c){c.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."),a.call(this,b,c)}return a.prototype.query=function(a,b,c){b.callback=c;var d=this.options.get("query");d.call(null,b)},a}),b.define("select2/dropdown/attachContainer",[],function(){function a(a,b,c){a.call(this,b,c)}return a.prototype.position=function(a,b,c){var d=c.find(".dropdown-wrapper");d.append(b),b.addClass("select2-dropdown--below"),c.addClass("select2-container--below")},a}),b.define("select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(d.join(" "),function(a){a.stopPropagation()})},a}),b.define("select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(a,b,c){a.call(this,b,c);var d=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(d.join(" "),function(a){a.stopPropagation()})},a}),function(c){"function"==typeof b.define&&b.define.amd?b.define("jquery-mousewheel",["jquery"],c):"object"==typeof exports?module.exports=c:c(a)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1
5067),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
5068
5069/**
5070 * Select2 Czech translation.
5071 * 
5072 * Author: Michal Marek <[email protected]>
5073 * Author - sklonovani: David Vallner <[email protected]>
5074 */
5075(function ($) {
5076    "use strict";
5077    // use text for the numbers 2 through 4
5078    var smallNumbers = {
5079        2: function(masc) { return (masc ? "dva" : "dvě"); },
5080        3: function() { return "tři"; },
5081        4: function() { return "čtyři"; }
5082    }
5083    $.extend($.fn.select2.defaults, {
5084        formatNoMatches: function () { return "Nenalezeny žádné položky"; },
5085        formatInputTooShort: function (input, min) {
5086            var n = min - input.length;
5087            if (n == 1) {
5088                return "Prosím zadejte ještě jeden znak";
5089            } else if (n <= 4) {
5090                return "Prosím zadejte ještě další "+smallNumbers[n](true)+" znaky";
5091            } else {
5092                return "Prosím zadejte ještě dalších "+n+" znaků";
5093            }
5094        },
5095        formatInputTooLong: function (input, max) {
5096            var n = input.length - max;
5097            if (n == 1) {
5098                return "Prosím zadejte o jeden znak méně";
5099            } else if (n <= 4) {
5100                return "Prosím zadejte o "+smallNumbers[n](true)+" znaky méně";
5101            } else {
5102                return "Prosím zadejte o "+n+" znaků méně";
5103            }
5104        },
5105        formatSelectionTooBig: function (limit) {
5106            if (limit == 1) {
5107                return "Můžete zvolit jen jednu položku";
5108            } else if (limit <= 4) {
5109                return "Můžete zvolit maximálně "+smallNumbers[limit](false)+" položky";
5110            } else {
5111                return "Můžete zvolit maximálně "+limit+" položek";
5112            }
5113        },
5114        formatLoadMore: function (pageNumber) { return "Načítají se další výsledky..."; },
5115        formatSearching: function () { return "Vyhledávání..."; }
5116    });
vendor: 21,669 bytes, lines 5117-5846
5117})(jQuery);
5118
5119/*! @license ScrollReveal v4.0.5
5120
5121	Copyright 2018 Fisssion LLC.
5122
5123	Licensed under the GNU General Public License 3.0 for
5124	compatible open source projects and non-commercial use.
5125
5126	For commercial sites, themes, projects, and applications,
5127	keep your source code private/proprietary by purchasing
5128	a commercial license from https://scrollrevealjs.org/
5129*/
5130(function (global, factory) {
5131	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
5132	typeof define === 'function' && define.amd ? define(factory) :
5133	(global.ScrollReveal = factory());
5134}(this, (function () { 'use strict';
5135
5136var defaults = {
5137	delay: 0,
5138	distance: '0',
5139	duration: 600,
5140	easing: 'cubic-bezier(0.5, 0, 0, 1)',
5141	interval: 0,
5142	opacity: 0,
5143	origin: 'bottom',
5144	rotate: {
5145		x: 0,
5146		y: 0,
5147		z: 0
5148	},
5149	scale: 1,
5150	cleanup: false,
5151	container: document.documentElement,
5152	desktop: true,
5153	mobile: true,
5154	reset: false,
5155	useDelay: 'always',
5156	viewFactor: 0.0,
5157	viewOffset: {
5158		top: 0,
5159		right: 0,
5160		bottom: 0,
5161		left: 0
5162	},
5163	afterReset: function afterReset() {},
5164	afterReveal: function afterReveal() {},
5165	beforeReset: function beforeReset() {},
5166	beforeReveal: function beforeReveal() {}
5167}
5168
5169function failure() {
5170	document.documentElement.classList.remove('sr');
5171
5172	return {
5173		clean: function clean() {},
5174		destroy: function destroy() {},
5175		reveal: function reveal() {},
5176		sync: function sync() {},
5177		get noop() {
5178			return true
5179		}
5180	}
5181}
5182
5183function success() {
5184	document.documentElement.classList.add('sr');
5185
5186	if (document.body) {
5187		document.body.style.height = '100%';
5188	} else {
5189		document.addEventListener('DOMContentLoaded', function () {
5190			document.body.style.height = '100%';
5191		});
5192	}
5193}
5194
5195var mount = { success: success, failure: failure }
5196
5197/*! @license is-dom-node v1.0.4
5198
5199	Copyright 2018 Fisssion LLC.
5200
5201	Permission is hereby granted, free of charge, to any person obtaining a copy
5202	of this software and associated documentation files (the "Software"), to deal
5203	in the Software without restriction, including without limitation the rights
5204	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5205	copies of the Software, and to permit persons to whom the Software is
5206	furnished to do so, subject to the following conditions:
5207
5208	The above copyright notice and this permission notice shall be included in all
5209	copies or substantial portions of the Software.
5210
5211	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5212	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5213	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5214	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5215	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5216	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
5217	SOFTWARE.
5218
5219*/
5220function isDomNode(x) {
5221	return typeof window.Node === 'object'
5222		? x instanceof window.Node
5223		: x !== null &&
5224				typeof x === 'object' &&
5225				typeof x.nodeType === 'number' &&
5226				typeof x.nodeName === 'string'
5227}
5228
5229/*! @license is-dom-node-list v1.2.1
5230
5231	Copyright 2018 Fisssion LLC.
5232
5233	Permission is hereby granted, free of charge, to any person obtaining a copy
5234	of this software and associated documentation files (the "Software"), to deal
5235	in the Software without restriction, including without limitation the rights
5236	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5237	copies of the Software, and to permit persons to whom the Software is
5238	furnished to do so, subject to the following conditions:
5239
5240	The above copyright notice and this permission notice shall be included in all
5241	copies or substantial portions of the Software.
5242
5243	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5244	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5245	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5246	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5247	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5248	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
5249	SOFTWARE.
5250
5251*/
5252function isDomNodeList(x) {
5253	var prototypeToString = Object.prototype.toString.call(x);
5254	var regex = /^\[object (HTMLCollection|NodeList|Object)\]$/;
5255
5256	return typeof window.NodeList === 'object'
5257		? x instanceof window.NodeList
5258		: x !== null &&
5259				typeof x === 'object' &&
5260				typeof x.length === 'number' &&
5261				regex.test(prototypeToString) &&
5262				(x.length === 0 || isDomNode(x[0]))
5263}
5264
5265/*! @license Tealight v0.3.6
5266
5267	Copyright 2018 Fisssion LLC.
5268
5269	Permission is hereby granted, free of charge, to any person obtaining a copy
5270	of this software and associated documentation files (the "Software"), to deal
5271	in the Software without restriction, including without limitation the rights
5272	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5273	copies of the Software, and to permit persons to whom the Software is
5274	furnished to do so, subject to the following conditions:
5275
5276	The above copyright notice and this permission notice shall be included in all
5277	copies or substantial portions of the Software.
5278
5279	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5280	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5281	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5282	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5283	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5284	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
5285	SOFTWARE.
5286
5287*/
5288function tealight(target, context) {
5289  if ( context === void 0 ) { context = document; }
5290
5291  if (target instanceof Array) { return target.filter(isDomNode); }
5292  if (isDomNode(target)) { return [target]; }
5293  if (isDomNodeList(target)) { return Array.prototype.slice.call(target); }
5294  if (typeof target === "string") {
5295    try {
5296      var query = context.querySelectorAll(target);
5297      return Array.prototype.slice.call(query);
5298    } catch (err) {
5299      return [];
5300    }
5301  }
5302  return [];
5303}
5304
5305function isObject(x) {
5306	return (
5307		x !== null &&
5308		x instanceof Object &&
5309		(x.constructor === Object ||
5310			Object.prototype.toString.call(x) === '[object Object]')
5311	)
5312}
5313
5314function each(collection, callback) {
5315	if (isObject(collection)) {
5316		var keys = Object.keys(collection);
5317		return keys.forEach(function (key) { return callback(collection[key], key, collection); })
5318	}
5319	if (collection instanceof Array) {
5320		return collection.forEach(function (item, i) { return callback(item, i, collection); })
5321	}
5322	throw new TypeError('Expected either an array or object literal.')
5323}
5324
5325function logger(message) {
5326	var details = [], len = arguments.length - 1;
5327	while ( len-- > 0 ) details[ len ] = arguments[ len + 1 ];
5328
5329	if (this.constructor.debug && console) {
5330		var report = "%cScrollReveal: " + message;
5331		details.forEach(function (detail) { return (report += "\n — " + detail); });
5332		console.log(report, 'color: #ea654b;'); // eslint-disable-line no-console
5333	}
5334}
5335
5336function rinse() {
5337	var this$1 = this;
5338
5339	var struct = function () { return ({
5340		active: [],
5341		stale: []
5342	}); };
5343
5344	var elementIds = struct();
5345	var sequenceIds = struct();
5346	var containerIds = struct();
5347
5348	/**
5349	 * Take stock of active element IDs.
5350	 */
5351	try {
5352		each(tealight('[data-sr-id]'), function (node) {
5353			var id = parseInt(node.getAttribute('data-sr-id'));
5354			elementIds.active.push(id);
5355		});
5356	} catch (e) {
5357		throw e
5358	}
5359	/**
5360	 * Destroy stale elements.
5361	 */
5362	each(this.store.elements, function (element) {
5363		if (elementIds.active.indexOf(element.id) === -1) {
5364			elementIds.stale.push(element.id);
5365		}
5366	});
5367
5368	each(elementIds.stale, function (staleId) { return delete this$1.store.elements[staleId]; });
5369
5370	/**
5371	 * Take stock of active container and sequence IDs.
5372	 */
5373	each(this.store.elements, function (element) {
5374		if (containerIds.active.indexOf(element.containerId) === -1) {
5375			containerIds.active.push(element.containerId);
5376		}
5377		if (element.hasOwnProperty('sequence')) {
5378			if (sequenceIds.active.indexOf(element.sequence.id) === -1) {
5379				sequenceIds.active.push(element.sequence.id);
5380			}
5381		}
5382	});
5383
5384	/**
5385	 * Destroy stale containers.
5386	 */
5387	each(this.store.containers, function (container) {
5388		if (containerIds.active.indexOf(container.id) === -1) {
5389			containerIds.stale.push(container.id);
5390		}
5391	});
5392
5393	each(containerIds.stale, function (staleId) {
5394		var stale = this$1.store.containers[staleId].node;
5395		stale.removeEventListener('scroll', this$1.delegate);
5396		stale.removeEventListener('resize', this$1.delegate);
5397		delete this$1.store.containers[staleId];
5398	});
5399
5400	/**
5401	 * Destroy stale sequences.
5402	 */
5403	each(this.store.sequences, function (sequence) {
5404		if (sequenceIds.active.indexOf(sequence.id) === -1) {
5405			sequenceIds.stale.push(sequence.id);
5406		}
5407	});
5408
5409	each(sequenceIds.stale, function (staleId) { return delete this$1.store.sequences[staleId]; });
5410}
5411
5412function clean(target) {
5413	var this$1 = this;
5414
5415	var dirty;
5416	try {
5417		each(tealight(target), function (node) {
5418			var id = node.getAttribute('data-sr-id');
5419			if (id !== null) {
5420				dirty = true;
5421				var element = this$1.store.elements[id];
5422				if (element.callbackTimer) {
5423					window.clearTimeout(element.callbackTimer.clock);
5424				}
5425				node.setAttribute('style', element.styles.inline.generated);
5426				node.removeAttribute('data-sr-id');
5427				delete this$1.store.elements[id];
5428			}
5429		});
5430	} catch (e) {
5431		return logger.call(this, 'Clean failed.', e.message)
5432	}
5433
5434	if (dirty) {
5435		try {
5436			rinse.call(this);
5437		} catch (e) {
5438			return logger.call(this, 'Clean failed.', e.message)
5439		}
5440	}
5441}
5442
5443function destroy() {
5444	var this$1 = this;
5445
5446	/**
5447	 * Remove all generated styles and element ids
5448	 */
5449	each(this.store.elements, function (element) {
5450		element.node.setAttribute('style', element.styles.inline.generated);
5451		element.node.removeAttribute('data-sr-id');
5452	});
5453
5454	/**
5455	 * Remove all event listeners.
5456	 */
5457	each(this.store.containers, function (container) {
5458		var target =
5459			container.node === document.documentElement ? window : container.node;
5460		target.removeEventListener('scroll', this$1.delegate);
5461		target.removeEventListener('resize', this$1.delegate);
5462	});
5463
5464	/**
5465	 * Clear all data from the store
5466	 */
5467	this.store = {
5468		containers: {},
5469		elements: {},
5470		history: [],
5471		sequences: {}
5472	};
5473}
5474
5475/*! @license Rematrix v0.3.0
5476
5477	Copyright 2018 Julian Lloyd.
5478
5479	Permission is hereby granted, free of charge, to any person obtaining a copy
5480	of this software and associated documentation files (the "Software"), to deal
5481	in the Software without restriction, including without limitation the rights
5482	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5483	copies of the Software, and to permit persons to whom the Software is
5484	furnished to do so, subject to the following conditions:
5485
5486	The above copyright notice and this permission notice shall be included in
5487	all copies or substantial portions of the Software.
5488
5489	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5490	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5491	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
5492	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
5493	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
5494	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
5495	THE SOFTWARE.
5496*/
5497/**
5498 * @module Rematrix
5499 */
5500
5501/**
5502 * Transformation matrices in the browser come in two flavors:
5503 *
5504 *  - `matrix` using 6 values (short)
5505 *  - `matrix3d` using 16 values (long)
5506 *
5507 * This utility follows this [conversion guide](https://goo.gl/EJlUQ1)
5508 * to expand short form matrices to their equivalent long form.
5509 *
5510 * @param  {array} source - Accepts both short and long form matrices.
5511 * @return {array}
5512 */
5513function format(source) {
5514	if (source.constructor !== Array) {
5515		throw new TypeError('Expected array.')
5516	}
5517	if (source.length === 16) {
5518		return source
5519	}
5520	if (source.length === 6) {
5521		var matrix = identity();
5522		matrix[0] = source[0];
5523		matrix[1] = source[1];
5524		matrix[4] = source[2];
5525		matrix[5] = source[3];
5526		matrix[12] = source[4];
5527		matrix[13] = source[5];
5528		return matrix
5529	}
5530	throw new RangeError('Expected array with either 6 or 16 values.')
5531}
5532
5533/**
5534 * Returns a matrix representing no transformation. The product of any matrix
5535 * multiplied by the identity matrix will be the original matrix.
5536 *
5537 * > **Tip:** Similar to how `5 * 1 === 5`, where `1` is the identity.
5538 *
5539 * @return {array}
5540 */
5541function identity() {
5542	var matrix = [];
5543	for (var i = 0; i < 16; i++) {
5544		i % 5 == 0 ? matrix.push(1) : matrix.push(0);
5545	}
5546	return matrix
5547}
5548
5549/**
5550 * Returns a 4x4 matrix describing the combined transformations
5551 * of both arguments.
5552 *
5553 * > **Note:** Order is very important. For example, rotating 45°
5554 * along the Z-axis, followed by translating 500 pixels along the
5555 * Y-axis... is not the same as translating 500 pixels along the
5556 * Y-axis, followed by rotating 45° along on the Z-axis.
5557 *
5558 * @param  {array} m - Accepts both short and long form matrices.
5559 * @param  {array} x - Accepts both short and long form matrices.
5560 * @return {array}
5561 */
5562function multiply(m, x) {
5563	var fm = format(m);
5564	var fx = format(x);
5565	var product = [];
5566
5567	for (var i = 0; i < 4; i++) {
5568		var row = [fm[i], fm[i + 4], fm[i + 8], fm[i + 12]];
5569		for (var j = 0; j < 4; j++) {
5570			var k = j * 4;
5571			var col = [fx[k], fx[k + 1], fx[k + 2], fx[k + 3]];
5572			var result =
5573				row[0] * col[0] + row[1] * col[1] + row[2] * col[2] + row[3] * col[3];
5574
5575			product[i + k] = result;
5576		}
5577	}
5578
5579	return product
5580}
5581
5582/**
5583 * Attempts to return a 4x4 matrix describing the CSS transform
5584 * matrix passed in, but will return the identity matrix as a
5585 * fallback.
5586 *
5587 * > **Tip:** This method is used to convert a CSS matrix (retrieved as a
5588 * `string` from computed styles) to its equivalent array format.
5589 *
5590 * @param  {string} source - `matrix` or `matrix3d` CSS Transform value.
5591 * @return {array}
5592 */
5593function parse(source) {
5594	if (typeof source === 'string') {
5595		var match = source.match(/matrix(3d)?\(([^)]+)\)/);
5596		if (match) {
5597			var raw = match[2].split(', ').map(parseFloat);
5598			return format(raw)
5599		}
5600	}
5601	return identity()
5602}
5603
5604/**
5605 * Returns a 4x4 matrix describing X-axis rotation.
5606 *
5607 * @param  {number} angle - Measured in degrees.
5608 * @return {array}
5609 */
5610function rotateX(angle) {
5611	var theta = Math.PI / 180 * angle;
5612	var matrix = identity();
5613
5614	matrix[5] = matrix[10] = Math.cos(theta);
5615	matrix[6] = matrix[9] = Math.sin(theta);
5616	matrix[9] *= -1;
5617
5618	return matrix
5619}
5620
5621/**
5622 * Returns a 4x4 matrix describing Y-axis rotation.
5623 *
5624 * @param  {number} angle - Measured in degrees.
5625 * @return {array}
5626 */
5627function rotateY(angle) {
5628	var theta = Math.PI / 180 * angle;
5629	var matrix = identity();
5630
5631	matrix[0] = matrix[10] = Math.cos(theta);
5632	matrix[2] = matrix[8] = Math.sin(theta);
5633	matrix[2] *= -1;
5634
5635	return matrix
5636}
5637
5638/**
5639 * Returns a 4x4 matrix describing Z-axis rotation.
5640 *
5641 * @param  {number} angle - Measured in degrees.
5642 * @return {array}
5643 */
5644function rotateZ(angle) {
5645	var theta = Math.PI / 180 * angle;
5646	var matrix = identity();
5647
5648	matrix[0] = matrix[5] = Math.cos(theta);
5649	matrix[1] = matrix[4] = Math.sin(theta);
5650	matrix[4] *= -1;
5651
5652	return matrix
5653}
5654
5655/**
5656 * Returns a 4x4 matrix describing 2D scaling. The first argument
5657 * is used for both X and Y-axis scaling, unless an optional
5658 * second argument is provided to explicitly define Y-axis scaling.
5659 *
5660 * @param  {number} scalar    - Decimal multiplier.
5661 * @param  {number} [scalarY] - Decimal multiplier.
5662 * @return {array}
5663 */
5664function scale(scalar, scalarY) {
5665	var matrix = identity();
5666
5667	matrix[0] = scalar;
5668	matrix[5] = typeof scalarY === 'number' ? scalarY : scalar;
5669
5670	return matrix
5671}
5672
5673/**
5674 * Returns a 4x4 matrix describing X-axis translation.
5675 *
5676 * @param  {number} distance - Measured in pixels.
5677 * @return {array}
5678 */
5679function translateX(distance) {
5680	var matrix = identity();
5681	matrix[12] = distance;
5682	return matrix
5683}
5684
5685/**
5686 * Returns a 4x4 matrix describing Y-axis translation.
5687 *
5688 * @param  {number} distance - Measured in pixels.
5689 * @return {array}
5690 */
5691function translateY(distance) {
5692	var matrix = identity();
5693	matrix[13] = distance;
5694	return matrix
5695}
5696
5697var getPrefixedCssProp = (function () {
5698	var properties = {};
5699	var style = document.documentElement.style;
5700
5701	function getPrefixedCssProperty(name, source) {
5702		if ( source === void 0 ) source = style;
5703
5704		if (name && typeof name === 'string') {
5705			if (properties[name]) {
5706				return properties[name]
5707			}
5708			if (typeof source[name] === 'string') {
5709				return (properties[name] = name)
5710			}
5711			if (typeof source[("-webkit-" + name)] === 'string') {
5712				return (properties[name] = "-webkit-" + name)
5713			}
5714			throw new RangeError(("Unable to find \"" + name + "\" style property."))
5715		}
5716		throw new TypeError('Expected a string.')
5717	}
5718
5719	getPrefixedCssProperty.clearCache = function () { return (properties = {}); };
5720
5721	return getPrefixedCssProperty
5722})();
5723
5724function style(element) {
5725	var computed = window.getComputedStyle(element.node);
5726	var position = computed.position;
5727	var config = element.config;
5728
5729	/**
5730	 * Generate inline styles
5731	 */
5732	var inline = {};
5733	var inlineStyle = element.node.getAttribute('style') || '';
5734	var inlineMatch = inlineStyle.match(/[\w-]+\s*:\s*[^;]+\s*/gi) || [];
5735
5736	inline.computed = inlineMatch ? inlineMatch.map(function (m) { return m.trim(); }).join('; ') + ';' : '';
5737
5738	inline.generated = inlineMatch.some(function (m) { return m.match(/visibility\s?:\s?visible/i); })
5739		? inline.computed
5740		: inlineMatch.concat( ['visibility: visible']).map(function (m) { return m.trim(); }).join('; ') + ';';
5741
5742	/**
5743	 * Generate opacity styles
5744	 */
5745	var computedOpacity = parseFloat(computed.opacity);
5746	var configOpacity = !isNaN(parseFloat(config.opacity))
5747		? parseFloat(config.opacity)
5748		: parseFloat(computed.opacity);
5749
5750	var opacity = {
5751		computed: computedOpacity !== configOpacity ? ("opacity: " + computedOpacity + ";") : '',
5752		generated: computedOpacity !== configOpacity ? ("opacity: " + configOpacity + ";") : ''
5753	};
5754
5755	/**
5756	 * Generate transformation styles
5757	 */
5758	var transformations = [];
5759
5760	if (parseFloat(config.distance)) {
5761		var axis = config.origin === 'top' || config.origin === 'bottom' ? 'Y' : 'X';
5762
5763		/**
5764		 * Let’s make sure our our pixel distances are negative for top and left.
5765		 * e.g. { origin: 'top', distance: '25px' } starts at `top: -25px` in CSS.
5766		 */
5767		var distance = config.distance;
5768		if (config.origin === 'top' || config.origin === 'left') {
5769			distance = /^-/.test(distance) ? distance.substr(1) : ("-" + distance);
5770		}
5771
5772		var ref = distance.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g);
5773		var value = ref[0];
5774		var unit = ref[1];
5775
5776		switch (unit) {
5777			case 'em':
5778				distance = parseInt(computed.fontSize) * value;
5779				break
5780			case 'px':
5781				distance = value;
5782				break
5783			case '%':
5784				/**
5785				 * Here we use `getBoundingClientRect` instead of
5786				 * the existing data attached to `element.geometry`
5787				 * because only the former includes any transformations
5788				 * current applied to the element.
5789				 *
5790				 * If that behavior ends up being unintuitive, this
5791				 * logic could instead utilize `element.geometry.height`
5792				 * and `element.geoemetry.width` for the distaince calculation
5793				 */
5794				distance =
5795					axis === 'Y'
5796						? element.node.getBoundingClientRect().height * value / 100
5797						: element.node.getBoundingClientRect().width * value / 100;
5798				break
5799			default:
5800				throw new RangeError('Unrecognized or missing distance unit.')
5801		}
5802
5803		if (axis === 'Y') {
5804			transformations.push(translateY(distance));
5805		} else {
5806			transformations.push(translateX(distance));
5807		}
5808	}
5809
5810	if (config.rotate.x) { transformations.push(rotateX(config.rotate.x)); }
5811	if (config.rotate.y) { transformations.push(rotateY(config.rotate.y)); }
5812	if (config.rotate.z) { transformations.push(rotateZ(config.rotate.z)); }
5813	if (config.scale !== 1) {
5814		if (config.scale === 0) {
5815			/**
5816			 * The CSS Transforms matrix interpolation specification
5817			 * basically disallows transitions of non-invertible
5818			 * matrixes, which means browsers won't transition
5819			 * elements with zero scale.
5820			 *
5821			 * That’s inconvenient for the API and developer
5822			 * experience, so we simply nudge their value
5823			 * slightly above zero; this allows browsers
5824			 * to transition our element as expected.
5825			 *
5826			 * `0.0002` was the smallest number
5827			 * that performed across browsers.
5828			 */
5829			transformations.push(scale(0.0002));
5830		} else {
5831			transformations.push(scale(config.scale));
5832		}
5833	}
5834
5835	var transform = {};
5836	if (transformations.length) {
5837		transform.property = getPrefixedCssProp('transform');
5838		/**
5839		 * The default computed transform value should be one of:
5840		 * undefined || 'none' || 'matrix()' || 'matrix3d()'
5841		 */
5842		transform.computed = {
5843			raw: computed[transform.property],
5844			matrix: parse(computed[transform.property])
5845		};
5846
vendor: 11,306 bytes, lines 5847-6265
5847		transformations.unshift(transform.computed.matrix);
5848		var product = transformations.reduce(multiply);
5849
5850		transform.generated = {
5851			initial: ((transform.property) + ": matrix3d(" + (product.join(', ')) + ");"),
5852			final: ((transform.property) + ": matrix3d(" + (transform.computed.matrix.join(
5853				', '
5854			)) + ");")
5855		};
5856	} else {
5857		transform.generated = {
5858			initial: '',
5859			final: ''
5860		};
5861	}
5862
5863	/**
5864	 * Generate transition styles
5865	 */
5866	var transition = {};
5867	if (opacity.generated || transform.generated.initial) {
5868		transition.property = getPrefixedCssProp('transition');
5869		transition.computed = computed[transition.property];
5870		transition.fragments = [];
5871
5872		var delay = config.delay;
5873		var duration = config.duration;
5874		var easing = config.easing;
5875
5876		if (opacity.generated) {
5877			transition.fragments.push({
5878				delayed: ("opacity " + (duration / 1000) + "s " + easing + " " + (delay / 1000) + "s"),
5879				instant: ("opacity " + (duration / 1000) + "s " + easing + " 0s")
5880			});
5881		}
5882
5883		if (transform.generated.initial) {
5884			transition.fragments.push({
5885				delayed: ((transform.property) + " " + (duration / 1000) + "s " + easing + " " + (delay /
5886					1000) + "s"),
5887				instant: ((transform.property) + " " + (duration / 1000) + "s " + easing + " 0s")
5888			});
5889		}
5890
5891		/**
5892		 * The default computed transition property should be one of:
5893		 * undefined || '' || 'all 0s ease 0s' || 'all 0s 0s cubic-bezier()'
5894		 */
5895		if (transition.computed && !transition.computed.match(/all 0s/)) {
5896			transition.fragments.unshift({
5897				delayed: transition.computed,
5898				instant: transition.computed
5899			});
5900		}
5901
5902		var composed = transition.fragments.reduce(
5903			function (composition, fragment, i) {
5904				composition.delayed +=
5905					i === 0 ? fragment.delayed : (", " + (fragment.delayed));
5906				composition.instant +=
5907					i === 0 ? fragment.instant : (", " + (fragment.instant));
5908				return composition
5909			},
5910			{
5911				delayed: '',
5912				instant: ''
5913			}
5914		);
5915
5916		transition.generated = {
5917			delayed: ((transition.property) + ": " + (composed.delayed) + ";"),
5918			instant: ((transition.property) + ": " + (composed.instant) + ";")
5919		};
5920	} else {
5921		transition.generated = {
5922			delayed: '',
5923			instant: ''
5924		};
5925	}
5926
5927	return {
5928		inline: inline,
5929		opacity: opacity,
5930		position: position,
5931		transform: transform,
5932		transition: transition
5933	}
5934}
5935
5936function animate(element, force) {
5937	if ( force === void 0 ) force = {};
5938
5939	var pristine = force.pristine || this.pristine;
5940	var delayed =
5941		element.config.useDelay === 'always' ||
5942		(element.config.useDelay === 'onload' && pristine) ||
5943		(element.config.useDelay === 'once' && !element.seen);
5944
5945	var shouldReveal = element.visible && !element.revealed;
5946	var shouldReset = !element.visible && element.revealed && element.config.reset;
5947
5948	if (force.reveal || shouldReveal) {
5949		return triggerReveal.call(this, element, delayed)
5950	}
5951
5952	if (force.reset || shouldReset) {
5953		return triggerReset.call(this, element)
5954	}
5955}
5956
5957function triggerReveal(element, delayed) {
5958	var styles = [
5959		element.styles.inline.generated,
5960		element.styles.opacity.computed,
5961		element.styles.transform.generated.final
5962	];
5963	if (delayed) {
5964		styles.push(element.styles.transition.generated.delayed);
5965	} else {
5966		styles.push(element.styles.transition.generated.instant);
5967	}
5968	element.revealed = element.seen = true;
5969	element.node.setAttribute('style', styles.filter(function (s) { return s !== ''; }).join(' '));
5970	registerCallbacks.call(this, element, delayed);
5971}
5972
5973function triggerReset(element) {
5974	var styles = [
5975		element.styles.inline.generated,
5976		element.styles.opacity.generated,
5977		element.styles.transform.generated.initial,
5978		element.styles.transition.generated.instant
5979	];
5980	element.revealed = false;
5981	element.node.setAttribute('style', styles.filter(function (s) { return s !== ''; }).join(' '));
5982	registerCallbacks.call(this, element);
5983}
5984
5985function registerCallbacks(element, isDelayed) {
5986	var this$1 = this;
5987
5988	var duration = isDelayed
5989		? element.config.duration + element.config.delay
5990		: element.config.duration;
5991
5992	var beforeCallback = element.revealed
5993		? element.config.beforeReveal
5994		: element.config.beforeReset;
5995
5996	var afterCallback = element.revealed
5997		? element.config.afterReveal
5998		: element.config.afterReset;
5999
6000	var elapsed = 0;
6001	if (element.callbackTimer) {
6002		elapsed = Date.now() - element.callbackTimer.start;
6003		window.clearTimeout(element.callbackTimer.clock);
6004	}
6005
6006	beforeCallback(element.node);
6007
6008	element.callbackTimer = {
6009		start: Date.now(),
6010		clock: window.setTimeout(function () {
6011			afterCallback(element.node);
6012			element.callbackTimer = null;
6013			if (element.revealed && !element.config.reset && element.config.cleanup) {
6014				clean.call(this$1, element.node);
6015			}
6016		}, duration - elapsed)
6017	};
6018}
6019
6020var nextUniqueId = (function () {
6021	var uid = 0;
6022	return function () { return uid++; }
6023})();
6024
6025function sequence(element, pristine) {
6026	if ( pristine === void 0 ) pristine = this.pristine;
6027
6028	/**
6029	 * We first check if the element should reset.
6030	 */
6031	if (!element.visible && element.revealed && element.config.reset) {
6032		return animate.call(this, element, { reset: true })
6033	}
6034
6035	var seq = this.store.sequences[element.sequence.id];
6036	var i = element.sequence.index;
6037
6038	if (seq) {
6039		var visible = new SequenceModel(seq, 'visible', this.store);
6040		var revealed = new SequenceModel(seq, 'revealed', this.store);
6041
6042		seq.models = { visible: visible, revealed: revealed };
6043
6044		/**
6045		 * If the sequence has no revealed members,
6046		 * then we reveal the first visible element
6047		 * within that sequence.
6048		 *
6049		 * The sequence then cues a recursive call
6050		 * in both directions.
6051		 */
6052		if (!revealed.body.length) {
6053			var nextId = seq.members[visible.body[0]];
6054			var nextElement = this.store.elements[nextId];
6055
6056			if (nextElement) {
6057				cue.call(this, seq, visible.body[0], -1, pristine);
6058				cue.call(this, seq, visible.body[0], +1, pristine);
6059				return animate.call(this, nextElement, { reveal: true, pristine: pristine })
6060			}
6061		}
6062
6063		/**
6064		 * If our element isn’t resetting, we check the
6065		 * element sequence index against the head, and
6066		 * then the foot of the sequence.
6067		 */
6068		if (
6069			!seq.blocked.head &&
6070			i === [].concat( revealed.head ).pop() &&
6071			i >= [].concat( visible.body ).shift()
6072		) {
6073			cue.call(this, seq, i, -1, pristine);
6074			return animate.call(this, element, { reveal: true, pristine: pristine })
6075		}
6076
6077		if (
6078			!seq.blocked.foot &&
6079			i === [].concat( revealed.foot ).shift() &&
6080			i <= [].concat( visible.body ).pop()
6081		) {
6082			cue.call(this, seq, i, +1, pristine);
6083			return animate.call(this, element, { reveal: true, pristine: pristine })
6084		}
6085	}
6086}
6087
6088function Sequence(interval) {
6089	var i = Math.abs(interval);
6090	if (!isNaN(i)) {
6091		this.id = nextUniqueId();
6092		this.interval = Math.max(i, 16);
6093		this.members = [];
6094		this.models = {};
6095		this.blocked = {
6096			head: false,
6097			foot: false
6098		};
6099	} else {
6100		throw new RangeError('Invalid sequence interval.')
6101	}
6102}
6103
6104function SequenceModel(seq, prop, store) {
6105	var this$1 = this;
6106
6107	this.head = [];
6108	this.body = [];
6109	this.foot = [];
6110
6111	each(seq.members, function (id, index) {
6112		var element = store.elements[id];
6113		if (element && element[prop]) {
6114			this$1.body.push(index);
6115		}
6116	});
6117
6118	if (this.body.length) {
6119		each(seq.members, function (id, index) {
6120			var element = store.elements[id];
6121			if (element && !element[prop]) {
6122				if (index < this$1.body[0]) {
6123					this$1.head.push(index);
6124				} else {
6125					this$1.foot.push(index);
6126				}
6127			}
6128		});
6129	}
6130}
6131
6132function cue(seq, i, direction, pristine) {
6133	var this$1 = this;
6134
6135	var blocked = ['head', null, 'foot'][1 + direction];
6136	var nextId = seq.members[i + direction];
6137	var nextElement = this.store.elements[nextId];
6138
6139	seq.blocked[blocked] = true;
6140
6141	setTimeout(function () {
6142		seq.blocked[blocked] = false;
6143		if (nextElement) {
6144			sequence.call(this$1, nextElement, pristine);
6145		}
6146	}, seq.interval);
6147}
6148
6149function initialize() {
6150	var this$1 = this;
6151
6152	rinse.call(this);
6153
6154	each(this.store.elements, function (element) {
6155		var styles = [element.styles.inline.generated];
6156
6157		if (element.visible) {
6158			styles.push(element.styles.opacity.computed);
6159			styles.push(element.styles.transform.generated.final);
6160			element.revealed = true;
6161		} else {
6162			styles.push(element.styles.opacity.generated);
6163			styles.push(element.styles.transform.generated.initial);
6164			element.revealed = false;
6165		}
6166
6167		element.node.setAttribute('style', styles.filter(function (s) { return s !== ''; }).join(' '));
6168	});
6169
6170	each(this.store.containers, function (container) {
6171		var target =
6172			container.node === document.documentElement ? window : container.node;
6173		target.addEventListener('scroll', this$1.delegate);
6174		target.addEventListener('resize', this$1.delegate);
6175	});
6176
6177	/**
6178	 * Manually invoke delegate once to capture
6179	 * element and container dimensions, container
6180	 * scroll position, and trigger any valid reveals
6181	 */
6182	this.delegate();
6183
6184	/**
6185	 * Wipe any existing `setTimeout` now
6186	 * that initialization has completed.
6187	 */
6188	this.initTimeout = null;
6189}
6190
6191function isMobile(agent) {
6192	if ( agent === void 0 ) agent = navigator.userAgent;
6193
6194	return /Android|iPhone|iPad|iPod/i.test(agent)
6195}
6196
6197function deepAssign(target) {
6198	var sources = [], len = arguments.length - 1;
6199	while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];
6200
6201	if (isObject(target)) {
6202		each(sources, function (source) {
6203			each(source, function (data, key) {
6204				if (isObject(data)) {
6205					if (!target[key] || !isObject(target[key])) {
6206						target[key] = {};
6207					}
6208					deepAssign(target[key], data);
6209				} else {
6210					target[key] = data;
6211				}
6212			});
6213		});
6214		return target
6215	} else {
6216		throw new TypeError('Target must be an object literal.')
6217	}
6218}
6219
6220function reveal(target, options, syncing) {
6221	var this$1 = this;
6222	if ( options === void 0 ) options = {};
6223	if ( syncing === void 0 ) syncing = false;
6224
6225	var containerBuffer = [];
6226	var sequence$$1;
6227	var interval = options.interval || defaults.interval;
6228
6229	try {
6230		if (interval) {
6231			sequence$$1 = new Sequence(interval);
6232		}
6233
6234		var nodes = tealight(target);
6235		if (!nodes.length) {
6236			throw new Error('Invalid reveal target.')
6237		}
6238
6239		var elements = nodes.reduce(function (elementBuffer, elementNode) {
6240			var element = {};
6241			var existingId = elementNode.getAttribute('data-sr-id');
6242
6243			if (existingId) {
6244				deepAssign(element, this$1.store.elements[existingId]);
6245
6246				/**
6247				 * In order to prevent previously generated styles
6248				 * from throwing off the new styles, the style tag
6249				 * has to be reverted to its pre-reveal state.
6250				 */
6251				element.node.setAttribute('style', element.styles.inline.computed);
6252			} else {
6253				element.id = nextUniqueId();
6254				element.node = elementNode;
6255				element.seen = false;
6256				element.revealed = false;
6257				element.visible = false;
6258			}
6259
6260			var config = deepAssign({}, element.config || this$1.defaults, options);
6261
6262			if ((!config.mobile && isMobile()) || (!config.desktop && !isMobile())) {
6263				if (existingId) {
6264					clean.call(this$1, element);
6265				}
vendor: 11,573 bytes, lines 6266-6678
6266				return elementBuffer // skip elements that are disabled
6267			}
6268
6269			var containerNode = tealight(config.container)[0];
6270			if (!containerNode) {
6271				throw new Error('Invalid container.')
6272			}
6273			if (!containerNode.contains(elementNode)) {
6274				return elementBuffer // skip elements found outside the container
6275			}
6276
6277			var containerId;
6278			{
6279				containerId = getContainerId(
6280					containerNode,
6281					containerBuffer,
6282					this$1.store.containers
6283				);
6284				if (containerId === null) {
6285					containerId = nextUniqueId();
6286					containerBuffer.push({ id: containerId, node: containerNode });
6287				}
6288			}
6289
6290			element.config = config;
6291			element.containerId = containerId;
6292			element.styles = style(element);
6293
6294			if (sequence$$1) {
6295				element.sequence = {
6296					id: sequence$$1.id,
6297					index: sequence$$1.members.length
6298				};
6299				sequence$$1.members.push(element.id);
6300			}
6301
6302			elementBuffer.push(element);
6303			return elementBuffer
6304		}, []);
6305
6306		/**
6307		 * Modifying the DOM via setAttribute needs to be handled
6308		 * separately from reading computed styles in the map above
6309		 * for the browser to batch DOM changes (limiting reflows)
6310		 */
6311		each(elements, function (element) {
6312			this$1.store.elements[element.id] = element;
6313			element.node.setAttribute('data-sr-id', element.id);
6314		});
6315	} catch (e) {
6316		return logger.call(this, 'Reveal failed.', e.message)
6317	}
6318
6319	/**
6320	 * Now that element set-up is complete...
6321	 * Let’s commit any container and sequence data we have to the store.
6322	 */
6323	each(containerBuffer, function (container) {
6324		this$1.store.containers[container.id] = {
6325			id: container.id,
6326			node: container.node
6327		};
6328	});
6329	if (sequence$$1) {
6330		this.store.sequences[sequence$$1.id] = sequence$$1;
6331	}
6332
6333	/**
6334	 * If reveal wasn't invoked by sync, we want to
6335	 * make sure to add this call to the history.
6336	 */
6337	if (syncing !== true) {
6338		this.store.history.push({ target: target, options: options });
6339
6340		/**
6341		 * Push initialization to the event queue, giving
6342		 * multiple reveal calls time to be interpreted.
6343		 */
6344		if (this.initTimeout) {
6345			window.clearTimeout(this.initTimeout);
6346		}
6347		this.initTimeout = window.setTimeout(initialize.bind(this), 0);
6348	}
6349}
6350
6351function getContainerId(node) {
6352	var collections = [], len = arguments.length - 1;
6353	while ( len-- > 0 ) collections[ len ] = arguments[ len + 1 ];
6354
6355	var id = null;
6356	each(collections, function (collection) {
6357		each(collection, function (container) {
6358			if (id === null && container.node === node) {
6359				id = container.id;
6360			}
6361		});
6362	});
6363	return id
6364}
6365
6366/**
6367 * Re-runs the reveal method for each record stored in history,
6368 * for capturing new content asynchronously loaded into the DOM.
6369 */
6370function sync() {
6371	var this$1 = this;
6372
6373	each(this.store.history, function (record) {
6374		reveal.call(this$1, record.target, record.options, true);
6375	});
6376
6377	initialize.call(this);
6378}
6379
6380var polyfill = function (x) { return (x > 0) - (x < 0) || +x; };
6381var mathSign = Math.sign || polyfill
6382
6383/*! @license miniraf v1.0.0
6384
6385	Copyright 2018 Fisssion LLC.
6386
6387	Permission is hereby granted, free of charge, to any person obtaining a copy
6388	of this software and associated documentation files (the "Software"), to deal
6389	in the Software without restriction, including without limitation the rights
6390	to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6391	copies of the Software, and to permit persons to whom the Software is
6392	furnished to do so, subject to the following conditions:
6393
6394	The above copyright notice and this permission notice shall be included in all
6395	copies or substantial portions of the Software.
6396
6397	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6398	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6399	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6400	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
6401	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
6402	OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
6403	SOFTWARE.
6404
6405*/
6406var polyfill$1 = (function () {
6407	var clock = Date.now();
6408
6409	return function (callback) {
6410		var currentTime = Date.now();
6411		if (currentTime - clock > 16) {
6412			clock = currentTime;
6413			callback(currentTime);
6414		} else {
6415			setTimeout(function () { return polyfill$1(callback); }, 0);
6416		}
6417	}
6418})();
6419
6420var index = window.requestAnimationFrame ||
6421	window.webkitRequestAnimationFrame ||
6422	window.mozRequestAnimationFrame ||
6423	polyfill$1;
6424
6425function getGeometry(target, isContainer) {
6426	/**
6427	 * We want to ignore padding and scrollbars for container elements.
6428	 * More information here: https://goo.gl/vOZpbz
6429	 */
6430	var height = isContainer ? target.node.clientHeight : target.node.offsetHeight;
6431	var width = isContainer ? target.node.clientWidth : target.node.offsetWidth;
6432
6433	var offsetTop = 0;
6434	var offsetLeft = 0;
6435	var node = target.node;
6436
6437	do {
6438		if (!isNaN(node.offsetTop)) {
6439			offsetTop += node.offsetTop;
6440		}
6441		if (!isNaN(node.offsetLeft)) {
6442			offsetLeft += node.offsetLeft;
6443		}
6444		node = node.offsetParent;
6445	} while (node)
6446
6447	return {
6448		bounds: {
6449			top: offsetTop,
6450			right: offsetLeft + width,
6451			bottom: offsetTop + height,
6452			left: offsetLeft
6453		},
6454		height: height,
6455		width: width
6456	}
6457}
6458
6459function getScrolled(container) {
6460	var top, left;
6461	if (container.node === document.documentElement) {
6462		top = window.pageYOffset;
6463		left = window.pageXOffset;
6464	} else {
6465		top = container.node.scrollTop;
6466		left = container.node.scrollLeft;
6467	}
6468	return { top: top, left: left }
6469}
6470
6471function isElementVisible(element) {
6472	if ( element === void 0 ) element = {};
6473
6474	var container = this.store.containers[element.containerId];
6475	if (!container) { return }
6476
6477	var viewFactor = Math.max(0, Math.min(1, element.config.viewFactor));
6478	var viewOffset = element.config.viewOffset;
6479
6480	var elementBounds = {
6481		top: element.geometry.bounds.top + element.geometry.height * viewFactor,
6482		right: element.geometry.bounds.right - element.geometry.width * viewFactor,
6483		bottom: element.geometry.bounds.bottom - element.geometry.height * viewFactor,
6484		left: element.geometry.bounds.left + element.geometry.width * viewFactor
6485	};
6486
6487	var containerBounds = {
6488		top: container.geometry.bounds.top + container.scroll.top + viewOffset.top,
6489		right: container.geometry.bounds.right + container.scroll.left - viewOffset.right,
6490		bottom:
6491			container.geometry.bounds.bottom + container.scroll.top - viewOffset.bottom,
6492		left: container.geometry.bounds.left + container.scroll.left + viewOffset.left
6493	};
6494
6495	return (
6496		(elementBounds.top < containerBounds.bottom &&
6497			elementBounds.right > containerBounds.left &&
6498			elementBounds.bottom > containerBounds.top &&
6499			elementBounds.left < containerBounds.right) ||
6500		element.styles.position === 'fixed'
6501	)
6502}
6503
6504function delegate(
6505	event,
6506	elements
6507) {
6508	var this$1 = this;
6509	if ( event === void 0 ) event = { type: 'init' };
6510	if ( elements === void 0 ) elements = this.store.elements;
6511
6512	index(function () {
6513		var stale = event.type === 'init' || event.type === 'resize';
6514
6515		each(this$1.store.containers, function (container) {
6516			if (stale) {
6517				container.geometry = getGeometry.call(this$1, container, true);
6518			}
6519			var scroll = getScrolled.call(this$1, container);
6520			if (container.scroll) {
6521				container.direction = {
6522					x: mathSign(scroll.left - container.scroll.left),
6523					y: mathSign(scroll.top - container.scroll.top)
6524				};
6525			}
6526			container.scroll = scroll;
6527		});
6528
6529		/**
6530		 * Due to how the sequencer is implemented, it’s
6531		 * important that we update the state of all
6532		 * elements, before any animation logic is
6533		 * evaluated (in the second loop below).
6534		 */
6535		each(elements, function (element) {
6536			if (stale) {
6537				element.geometry = getGeometry.call(this$1, element);
6538			}
6539			element.visible = isElementVisible.call(this$1, element);
6540		});
6541
6542		each(elements, function (element) {
6543			if (element.sequence) {
6544				sequence.call(this$1, element);
6545			} else {
6546				animate.call(this$1, element);
6547			}
6548		});
6549
6550		this$1.pristine = false;
6551	});
6552}
6553
6554function transformSupported() {
6555	var style = document.documentElement.style;
6556	return 'transform' in style || 'WebkitTransform' in style
6557}
6558
6559function transitionSupported() {
6560	var style = document.documentElement.style;
6561	return 'transition' in style || 'WebkitTransition' in style
6562}
6563
6564var version = "4.0.5";
6565
6566var boundDelegate;
6567var boundDestroy;
6568var boundReveal;
6569var boundClean;
6570var boundSync;
6571var config;
6572var debug;
6573var instance;
6574
6575function ScrollReveal(options) {
6576	if ( options === void 0 ) options = {};
6577
6578	var invokedWithoutNew =
6579		typeof this === 'undefined' ||
6580		Object.getPrototypeOf(this) !== ScrollReveal.prototype;
6581
6582	if (invokedWithoutNew) {
6583		return new ScrollReveal(options)
6584	}
6585
6586	if (!ScrollReveal.isSupported()) {
6587		logger.call(this, 'Instantiation failed.', 'This browser is not supported.');
6588		return mount.failure()
6589	}
6590
6591	var buffer;
6592	try {
6593		buffer = config
6594			? deepAssign({}, config, options)
6595			: deepAssign({}, defaults, options);
6596	} catch (e) {
6597		logger.call(this, 'Invalid configuration.', e.message);
6598		return mount.failure()
6599	}
6600
6601	try {
6602		var container = tealight(buffer.container)[0];
6603		if (!container) {
6604			throw new Error('Invalid container.')
6605		}
6606	} catch (e) {
6607		logger.call(this, e.message);
6608		return mount.failure()
6609	}
6610
6611	config = buffer;
6612
6613	if ((!config.mobile && isMobile()) || (!config.desktop && !isMobile())) {
6614		logger.call(
6615			this,
6616			'This device is disabled.',
6617			("desktop: " + (config.desktop)),
6618			("mobile: " + (config.mobile))
6619		);
6620		return mount.failure()
6621	}
6622
6623	mount.success();
6624
6625	this.store = {
6626		containers: {},
6627		elements: {},
6628		history: [],
6629		sequences: {}
6630	};
6631
6632	this.pristine = true;
6633
6634	boundDelegate = boundDelegate || delegate.bind(this);
6635	boundDestroy = boundDestroy || destroy.bind(this);
6636	boundReveal = boundReveal || reveal.bind(this);
6637	boundClean = boundClean || clean.bind(this);
6638	boundSync = boundSync || sync.bind(this);
6639
6640	Object.defineProperty(this, 'delegate', { get: function () { return boundDelegate; } });
6641	Object.defineProperty(this, 'destroy', { get: function () { return boundDestroy; } });
6642	Object.defineProperty(this, 'reveal', { get: function () { return boundReveal; } });
6643	Object.defineProperty(this, 'clean', { get: function () { return boundClean; } });
6644	Object.defineProperty(this, 'sync', { get: function () { return boundSync; } });
6645
6646	Object.defineProperty(this, 'defaults', { get: function () { return config; } });
6647	Object.defineProperty(this, 'version', { get: function () { return version; } });
6648	Object.defineProperty(this, 'noop', { get: function () { return false; } });
6649
6650	return instance ? instance : (instance = this)
6651}
6652
6653ScrollReveal.isSupported = function () { return transformSupported() && transitionSupported(); };
6654
6655Object.defineProperty(ScrollReveal, 'debug', {
6656	get: function () { return debug || false; },
6657	set: function (value) { return (debug = typeof value === 'boolean' ? value : debug); }
6658});
6659
6660ScrollReveal();
6661
6662return ScrollReveal;
6663
6664})));
6665
6666/**
6667* jQuery scroroller Plugin 1.0
6668*
6669* http://www.tinywall.net/
6670* 
6671* Developers: Arun David, Boobalan
6672* Copyright (c) 2014 
6673*/
6674(function($){
6675    $(window).on("load",function(){
6676        $(document).scrollzipInit();
6677        $(document).rollerInit();
6678    });
6679    $(window).on("load scroll resize", function(){
6680        $('.numscroller').scrollzip({
6681            showFunction    :   function() {
6682                                    numberRoller($(this).attr('data-slno'));
6683                                },
6684            wholeVisible    :     false,
6685        });
6686    });
6687    $.fn.scrollzipInit=function(){
6688        $('body').prepend("<div style='position:fixed;top:0px;left:0px;width:0;height:0;' id='scrollzipPoint'></div>" );
6689    };
6690    $.fn.rollerInit=function(){
6691        var i=0;
6692        $('.numscroller').each(function() {
6693            i++;
6694           $(this).attr('data-slno',i); 
6695           $(this).addClass("roller-title-number-"+i);
6696        });        
6697    };
6698    $.fn.scrollzip = function(options){
6699        var settings = $.extend({
6700            showFunction    : null,
6701            hideFunction    : null,
6702            showShift       : 0,
6703            wholeVisible    : false,
6704            hideShift       : 0,
6705        }, options);
6706        return this.each(function(i,obj){
6707            $(this).addClass('scrollzip');
6708            if ( $.isFunction( settings.showFunction ) ){
6709                if(
6710                    !$(this).hasClass('isShown')&&
6711                    ($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.showShift)>($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))&&
6712                    ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))<($(this).outerHeight()+$(this).offset().top-settings.showShift)
6713                ){
6714                    $(this).addClass('isShown');
6715                    settings.showFunction.call( this );
6716                }
6717            }
6718            if ( $.isFunction( settings.hideFunction ) ){
6719                if(
6720                    $(this).hasClass('isShown')&&
6721                    (($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.hideShift)<($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))||
6722                    ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))>($(this).outerHeight()+$(this).offset().top-settings.hideShift))
6723                ){
6724                    $(this).removeClass('isShown');
6725                    settings.hideFunction.call( this );
6726                }
6727            }
6728            return this;
6729        });
6730    };
6731    function numberRoller(slno){
6732            var min=$('.roller-title-number-'+slno).attr('data-min');
6733            var max=$('.roller-title-number-'+slno).attr('data-max');
6734            var timediff=$('.roller-title-number-'+slno).attr('data-delay');
6735            var increment=$('.roller-title-number-'+slno).attr('data-increment');
6736            var numdiff=max-min;
6737            var timeout=(timediff*1000)/numdiff;
6738            //if(numinc<10){
6739                //increment=Math.floor((timediff*1000)/10);
6740            //}//alert(increment);
6741            numberRoll(slno,min,max,increment,timeout);
6742            
6743    }
6744    function numberRoll(slno,min,max,increment,timeout){//alert(slno+"="+min+"="+max+"="+increment+"="+timeout);
6745        if(min<=max){
6746            $('.roller-title-number-'+slno).html(min);
6747            min=parseInt(min)+parseInt(increment);
6748            setTimeout(function(){numberRoll(eval(slno),eval(min),eval(max),eval(increment),eval(timeout))},timeout);
6749        }else{
6750            $('.roller-title-number-'+slno).html(max);
6751        }
6752    }
6753})(jQuery);
6754$( document ).ready(function() {
6755
6756	$.nette.ext('onCompleteAjaxForms', {
6757		complete: function () {
6758			$('body').removeClass('modal-open');
6759			$(window).resize();
6760			$('[data-toggle="tooltip"]').tooltip({ container: 'body' });
6761		}
6762	});
6763
6764	$('[data-toggle="tooltip"]').tooltip({ container: 'body' });
6765
6766	$(".panel-default").click(function(){
6767		$(".panel-default").removeClass("active");
6768		$(this).addClass("active");
6769	});
6770
6771	/*$('ul.nav li.dropdown').hover(function() {
6772		if($(window).width() < 768){ return; }
6773		$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
6774	}, function() {
6775		if($(window).width() < 768){ return; }
6776		$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
6777	});*/
6778
6779	var windowWidth = $(window).width();
6780	if(windowWidth <= 768){
6781		$('.panel-collapse').removeClass('in');
6782	}
6783
6784	$(document).on('click', '[data-toggle="lightbox"]', function(event) {
6785		event.preventDefault();
6786		$(this).ekkoLightbox({
6787			alwaysShowClose: true
6788		});
6789	});
6790
6791	$(".ion-slider").ionRangeSlider();
6792});
6793
6794
6795
6796
6797
6798
6799
6800$(document).ready(function(){
6801
6802	/*  Toggle nav
6803	-------------------------------------------------------------------------- */
6804
6805	$('.toggle-navbar').click(function() {
6806		var menu = $('.navbar');
6807		if (menu.hasClass('is-active')) {
6808			$('.toggle-navbar').removeClass('is-active');
6809			menu.removeClass('is-active');
6810		}
6811		else {
6812			$('.toggle-navbar').addClass("is-active");
6813			menu.addClass('is-active');
6814		}
6815		return false;
6816	});
6817
6818
6819});
6820
6821/*  Scroll events
6822-------------------------------------------------------------------------- */
6823
6824$(function(){
6825	var scroll = $(document).scrollTop();
6826
6827	$(window).scroll(function() {
6828		var scrolled = $(document).scrollTop();
6829
6830		if (scrolled > scroll){
6831			$('.page-header').removeClass('fixed');
6832			$('.toggle-navbar').removeClass('is-active');
6833			$('.navbar').removeClass('is-active');
6834		} else {
6835			$('.page-header').addClass('fixed');
6836		}
6837
6838		if (scrolled > 100){
6839			$('.page-header').addClass('off-canvas');
6840
6841		} else {
6842			$('.page-header').removeClass('off-canvas fixed');
6843		}
6844
6845		scroll = $(document).scrollTop();
6846	});
6847
6848});
6849
6850/*	scrollReveal
6851-------------------------------------------------------------------------- */
6852
6853window.sr = ScrollReveal({
6854	reset: false,
6855	mobile: true
6856});
6857sr.reveal( '.effect-fade-in',
6858	{
6859		easing   : 'linear',
6860		opacity	 : 0,
6861		origin	 : 'center',
6862		distance    : '0',
6863		duration : 800,
6864		delay    : 200
6865	}
6866);
6867sr.reveal( '.effect-roll-from-bottom',
6868	{
6869		easing   : 'linear',
6870		origin	 : 'bottom',
6871		distance    : '200px',
6872		duration : 500,
6873		delay    : 300
6874	}
6875);
6876
6877/*  Accordion items toggle
6878-------------------------------------------------------------------------- */
6879
6880$(".accordion-item__heading").click(function () {
6881	$(this).parent('.accordion-item').toggleClass("is-open").find(".accordion-item__desc").slideToggle();
6882	$(this).parent('.accordion-item').siblings().removeClass("is-open").find(".accordion-item__desc").slide
6882Up();
6883});
6884
6885/*	Custom select
6886-------------------------------------------------------------------------- */
6887
6888/*$('select').each(function(){
6889	var $this = $(this), numberOfOptions = $(this).children('option').length;
6890
6891	$this.addClass('select-hidden');
6892	$this.wrap('<div class="select"></div>');
6893	$this.after('<div class="select-styled"></div>');
6894
6895	var $styledSelect = $this.next('div.select-styled');
6896	$styledSelect.text($this.children('option').eq(0).text());
6897
6898	var $list = $('<ul />', {
6899		'class': 'select-options'
6900	}).insertAfter($styledSelect);
6901
6902	for (var i = 0; i < numberOfOptions; i++) {
6903		$('<li />', {
6904			text: $this.children('option').eq(i).text(),
6905			rel: $this.children('option').eq(i).val()
6906		}).appendTo($list);
6907	}
6908
6909	var $listItems = $list.children('li');
6910
6911	$styledSelect.click(function(e) {
6912		e.stopPropagation();
6913		$('div.select-styled.active').not(this).each(function(){
6914			$(this).removeClass('active').next('ul.select-options').hide();
6915		});
6916		$(this).toggleClass('active').next('ul.select-options').toggle();
6917	});
6918
6919	$listItems.click(function(e) {
6920		e.stopPropagation();
6921		$styledSelect.text($(this).text()).removeClass('active');
6922		$this.val($(this).attr('rel'));
6923		$list.hide();
6924		//console.log($this.val());
6925	});
6926
6927	$(document).click(function() {
6928		$styledSelect.removeClass('active');
6929		$list.hide();
6930	});
6931
6932});*/
6933
6934(function($) {
6935	$.fn.visible = function(partial) {
6936		var $t            = $(this),
6937			$w            = $(window),
6938			viewTop       = $w.scrollTop(),
6939			viewBottom    = viewTop + $w.height(),
6940			_top          = $t.offset().top,
6941			_bottom       = _top + $t.height(),
6942			compareTop    = partial === true ? _bottom : _top,
6943			compareBottom = partial === true ? _top : _bottom;
6944		return ((compareBottom <= viewBottom) && (compareTop >= viewTop));
6945	};
6946
6947})(jQuery);
6948
6949$(window).scroll(function(event) {
6950
6951	$(".value").each(function(i, el) {
6952		var el = $(el);
6953		if (el.visible(true)) {
6954			el.addClass("animate");
6955		}
6956	});
6957
6958});
6959
6960$(document).ready(function(event) {
6961
6962	$(".value").each(function(i, el) {
6963		var el = $(el);
6964		if (el.visible(true)) {
6965			el.addClass("animate");
6966		}
6967	});
6968
6969});

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